	.file	"162642388.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: %s path mode\n"
.LC1:
	.string	"Invalid perm '%c'\n"
	.align 8
.LC2:
	.string	"FAIL: access %s %s failed - %s\n"
.LC3:
	.string	"PASS"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 3
	je	.L2
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L4
.L10:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 120
	je	.L5
	cmp	eax, 120
	jg	.L6
	cmp	eax, 114
	je	.L7
	cmp	eax, 119
	je	.L8
	jmp	.L6
.L7:
	or	DWORD PTR -32[rbp], 4
	jmp	.L9
.L8:
	or	DWORD PTR -32[rbp], 2
	jmp	.L9
.L5:
	or	DWORD PTR -32[rbp], 1
	jmp	.L9
.L6:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L9:
	add	QWORD PTR -24[rbp], 1
.L4:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	access@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	r8, rsi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L11:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"162642388.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s path mode\012\000"
	.align	2
.LC1:
	.ascii	"Invalid perm '%c'\012\000"
	.align	2
.LC2:
	.ascii	"FAIL: access %s %s failed - %s\012\000"
	.align	2
.LC3:
	.ascii	"PASS\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L12
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+4
	bl	fprintf
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L4
.L10:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L5
	cmp	r3, #120
	bgt	.L6
	cmp	r3, #114
	beq	.L7
	cmp	r3, #119
	beq	.L8
	b	.L6
.L7:
	ldr	r3, [fp, #-32]
	orr	r3, r3, #4
	str	r3, [fp, #-32]
	b	.L9
.L8:
	ldr	r3, [fp, #-32]
	orr	r3, r3, #2
	str	r3, [fp, #-32]
	b	.L9
.L5:
	ldr	r3, [fp, #-32]
	orr	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L9
.L6:
	ldr	r3, .L12
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L12+8
	bl	fprintf
	mov	r3, #1
	b	.L3
.L9:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L4:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	access
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L11
	ldr	r3, .L12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r1, .L12+12
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L3
.L11:
	ldr	r0, .L12+16
	bl	puts
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
