	.file	"767194.c"
	.intel_syntax noprefix
	.text
	.globl	basename
	.type	basename, @function
basename:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	cmp	QWORD PTR -40[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
.L2:
	mov	BYTE PTR bname.0[rip], 46
	mov	BYTE PTR bname.0[rip+1], 0
	lea	rax, bname.0[rip]
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	jmp	.L5
.L7:
	sub	QWORD PTR -24[rbp], 1
.L5:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jbe	.L6
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	je	.L7
.L6:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jne	.L8
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L8
	mov	BYTE PTR bname.0[rip], 47
	mov	BYTE PTR bname.0[rip+1], 0
	lea	rax, bname.0[rip]
	jmp	.L4
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L9
.L11:
	sub	QWORD PTR -16[rbp], 1
.L9:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jbe	.L10
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L11
.L10:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR -16[rbp]
	add	rax, 1
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 4095
	jbe	.L12
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 36
	mov	eax, 0
	jmp	.L4
.L12:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, bname.0[rip]
	call	memcpy@PLT
	lea	rdx, bname.0[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, bname.0[rip]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	basename, .-basename
	.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	"767194.c"
	.text
	.align	2
	.global	basename
	.syntax unified
	.arm
	.fpu softvfp
	.type	basename, %function
basename:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, .L13
	mov	r2, #46
	strb	r2, [r3]
	ldr	r3, .L13
	mov	r2, #0
	strb	r2, [r3, #1]
	ldr	r3, .L13
	b	.L4
.L3:
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	b	.L5
.L7:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L5:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bls	.L6
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L7
.L6:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bne	.L8
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L8
	ldr	r3, .L13
	mov	r2, #47
	strb	r2, [r3]
	ldr	r3, .L13
	mov	r2, #0
	strb	r2, [r3, #1]
	ldr	r3, .L13
	b	.L4
.L8:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	b	.L9
.L11:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bls	.L10
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L11
.L10:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #4096
	bcc	.L12
	bl	__errno_location
	mov	r3, r0
	mov	r2, #36
	str	r2, [r3]
	mov	r3, #0
	b	.L4
.L12:
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L13
	bl	memcpy
	ldr	r2, .L13
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L13
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	bname.4380
	.size	basename, .-basename
	.local	bname.4380
	.comm	bname.4380,4096,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
