	.file	"3114.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"--help"
	.align 8
.LC1:
	.string	"\nUsage: basename PATHNAME [SUFFIX]\n\nPrint PATHNAME with directory components stripped,\nremoving trailing SUFFIX, if any.\n"
.LC2:
	.string	"too few arguments"
.LC3:
	.string	"too many arguments"
.LC4:
	.string	"/"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	jne	.L2
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L3
.L2:
	cmp	DWORD PTR -20[rbp], 1
	jg	.L4
	lea	rsi, .LC2[rip]
	mov	edi, 255
	mov	eax, 0
	call	errx@PLT
.L4:
	cmp	DWORD PTR -20[rbp], 3
	jle	.L5
	lea	rsi, .LC3[rip]
	mov	edi, 255
	mov	eax, 0
	call	errx@PLT
.L5:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L7
	add	QWORD PTR -8[rbp], 1
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L8:
	cmp	DWORD PTR -20[rbp], 3
	jne	.L9
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L9
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	sub	rax, rdx
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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	"3114.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"--help\000"
	.align	2
.LC1:
	.ascii	"\012Usage: basename PATHNAME [SUFFIX]\012\012Print "
	.ascii	"PATHNAME with directory components stripped,\012rem"
	.ascii	"oving trailing SUFFIX, if any.\012\000"
	.align	2
.LC2:
	.ascii	"too few arguments\000"
	.align	2
.LC3:
	.ascii	"too many arguments\000"
	.align	2
.LC4:
	.ascii	"/\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L2
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L10+4
	bl	puts
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L4
	ldr	r1, .L10+8
	mov	r0, #255
	bl	errx
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	ble	.L5
	ldr	r1, .L10+12
	mov	r0, #255
	bl	errx
.L5:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L10+16
	bl	puts
	mov	r3, #0
	b	.L3
.L6:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #47
	mov	r0, r3
	bl	strrchr
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L8
.L7:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
.L8:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	bne	.L9
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	ble	.L9
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r0, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r1, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L9:
	ldr	r0, [fp, #-16]
	bl	puts
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
