	.file	"191415.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/"
.LC1:
	.string	"."
	.text
	.globl	openbsd_dirname
	.type	openbsd_dirname, @function
openbsd_dirname:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
.L2:
	mov	WORD PTR bname.0[rip], 46
	lea	rax, bname.0[rip]
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	jmp	.L5
.L7:
	sub	rbx, 1
.L5:
	cmp	rbx, QWORD PTR -24[rbp]
	jbe	.L8
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 47
	je	.L7
	jmp	.L8
.L10:
	sub	rbx, 1
.L8:
	cmp	rbx, QWORD PTR -24[rbp]
	jbe	.L9
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 47
	jne	.L10
.L9:
	cmp	rbx, QWORD PTR -24[rbp]
	jne	.L11
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 47
	jne	.L12
	lea	rax, .LC0[rip]
	jmp	.L13
.L12:
	lea	rax, .LC1[rip]
.L13:
	mov	rsi, rax
	lea	rdi, bname.0[rip]
	call	strcpy@PLT
	lea	rax, bname.0[rip]
	jmp	.L4
.L11:
	sub	rbx, 1
	cmp	rbx, QWORD PTR -24[rbp]
	jbe	.L14
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 47
	je	.L11
.L14:
	mov	rax, rbx
	sub	rax, QWORD PTR -24[rbp]
	cmp	rax, 4095
	jle	.L15
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 36
	mov	eax, 0
	jmp	.L4
.L15:
	mov	rax, rbx
	sub	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, bname.0[rip]
	call	strncpy@PLT
	mov	rax, rbx
	sub	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	lea	rax, bname.0[rip]
	mov	BYTE PTR [rdx+rax], 0
	lea	rax, bname.0[rip]
.L4:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	openbsd_dirname, .-openbsd_dirname
	.local	bname.0
	.comm	bname.0,4096,32
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"191415.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/\000"
	.align	2
.LC1:
	.ascii	".\000"
	.text
	.align	2
	.global	openbsd_dirname
	.syntax unified
	.arm
	.fpu softvfp
	.type	openbsd_dirname, %function
openbsd_dirname:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, .L16
	mov	r2, #46
	strh	r2, [r3]	@ movhi
	ldr	r3, .L16
	b	.L4
.L3:
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	b	.L5
.L7:
	sub	r4, r4, #1
.L5:
	ldr	r3, [fp, #-16]
	cmp	r4, r3
	bls	.L8
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L7
	b	.L8
.L10:
	sub	r4, r4, #1
.L8:
	ldr	r3, [fp, #-16]
	cmp	r4, r3
	bls	.L9
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L10
.L9:
	ldr	r3, [fp, #-16]
	cmp	r4, r3
	bne	.L11
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L12
	ldr	r3, .L16+4
	b	.L13
.L12:
	ldr	r3, .L16+8
.L13:
	mov	r1, r3
	ldr	r0, .L16
	bl	strcpy
	ldr	r3, .L16
	b	.L4
.L11:
	sub	r4, r4, #1
	ldr	r3, [fp, #-16]
	cmp	r4, r3
	bls	.L14
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L11
.L14:
	ldr	r3, [fp, #-16]
	sub	r3, r4, r3
	cmp	r3, #4096
	blt	.L15
	bl	__errno_location
	mov	r3, r0
	mov	r2, #36
	str	r2, [r3]
	mov	r3, #0
	b	.L4
.L15:
	ldr	r3, [fp, #-16]
	sub	r3, r4, r3
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L16
	bl	strncpy
	ldr	r3, [fp, #-16]
	sub	r3, r4, r3
	add	r3, r3, #1
	ldr	r2, .L16
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r3, .L16
.L4:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	bname.4968
	.word	.LC0
	.word	.LC1
	.size	openbsd_dirname, .-openbsd_dirname
	.local	bname.4968
	.comm	bname.4968,4096,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
