	.file	"61075031.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"regular file"
.LC1:
	.string	"directory"
.LC2:
	.string	"character special"
.LC3:
	.string	"block special"
.LC4:
	.string	"FIFO"
.LC5:
	.string	"symbolic link"
.LC6:
	.string	"socket"
.LC7:
	.string	"unknown"
	.text
	.globl	getType
	.type	getType, @function
getType:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L2
	lea	rax, .LC0[rip]
	jmp	.L3
.L2:
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L4
	lea	rax, .LC1[rip]
	jmp	.L3
.L4:
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 8192
	jne	.L5
	lea	rax, .LC2[rip]
	jmp	.L3
.L5:
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 24576
	jne	.L6
	lea	rax, .LC3[rip]
	jmp	.L3
.L6:
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 4096
	jne	.L7
	lea	rax, .LC4[rip]
	jmp	.L3
.L7:
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 40960
	jne	.L8
	lea	rax, .LC5[rip]
	jmp	.L3
.L8:
	mov	eax, DWORD PTR 40[rbp]
	and	eax, 61440
	cmp	eax, 49152
	jne	.L9
	lea	rax, .LC6[rip]
	jmp	.L3
.L9:
	lea	rax, .LC7[rip]
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getType, .-getType
	.section	.rodata
.LC8:
	.string	"usage: %s dir_name\n"
.LC9:
	.string	"can't open '%s'\n"
.LC10:
	.string	"can't chdir to '%s': %s\n"
.LC11:
	.string	"%s: "
.LC12:
	.string	"Can't stat %s: %s\n"
.LC13:
	.string	"Can't lstat %s: %s\n"
.LC14:
	.string	"symlink to "
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -196[rbp], 2
	je	.L11
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	lea	rax, -160[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	stat@PLT
	cmp	eax, -1
	jne	.L15
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rax, .LC7[rip]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L16
.L15:
	push	QWORD PTR -24[rbp]
	push	QWORD PTR -32[rbp]
	push	QWORD PTR -40[rbp]
	push	QWORD PTR -48[rbp]
	push	QWORD PTR -56[rbp]
	push	QWORD PTR -64[rbp]
	push	QWORD PTR -72[rbp]
	push	QWORD PTR -80[rbp]
	push	QWORD PTR -88[rbp]
	push	QWORD PTR -96[rbp]
	push	QWORD PTR -104[rbp]
	push	QWORD PTR -112[rbp]
	push	QWORD PTR -120[rbp]
	push	QWORD PTR -128[rbp]
	push	QWORD PTR -136[rbp]
	push	QWORD PTR -144[rbp]
	push	QWORD PTR -152[rbp]
	push	QWORD PTR -160[rbp]
	call	getType
	add	rsp, 144
	mov	QWORD PTR -184[rbp], rax
.L16:
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	lea	rax, -160[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	lstat@PLT
	cmp	eax, -1
	jne	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L14
.L17:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 40960
	jne	.L18
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	puts@PLT
.L14:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L19
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"61075031.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"regular file\000"
	.align	2
.LC1:
	.ascii	"directory\000"
	.align	2
.LC2:
	.ascii	"character special\000"
	.align	2
.LC3:
	.ascii	"block special\000"
	.align	2
.LC4:
	.ascii	"FIFO\000"
	.align	2
.LC5:
	.ascii	"symbolic link\000"
	.align	2
.LC6:
	.ascii	"socket\000"
	.align	2
.LC7:
	.ascii	"unknown\000"
	.text
	.align	2
	.global	getType
	.syntax unified
	.arm
	.fpu softvfp
	.type	getType, %function
getType:
	@ args = 88, pretend = 16, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	sub	sp, sp, #16
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	add	ip, fp, #4
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L2
	ldr	r3, .L10
	b	.L3
.L2:
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L4
	ldr	r3, .L10+4
	b	.L3
.L4:
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #8192
	bne	.L5
	ldr	r3, .L10+8
	b	.L3
.L5:
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #24576
	bne	.L6
	ldr	r3, .L10+12
	b	.L3
.L6:
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #4096
	bne	.L7
	ldr	r3, .L10+16
	b	.L3
.L7:
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #40960
	bne	.L8
	ldr	r3, .L10+20
	b	.L3
.L8:
	ldr	r3, [fp, #20]
	and	r3, r3, #61440
	cmp	r3, #49152
	bne	.L9
	ldr	r3, .L10+24
	b	.L3
.L9:
	ldr	r3, .L10+28
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	add	sp, sp, #16
	bx	lr
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	getType, .-getType
	.section	.rodata
	.align	2
.LC8:
	.ascii	"usage: %s dir_name\012\000"
	.align	2
.LC9:
	.ascii	"can't open '%s'\012\000"
	.align	2
.LC10:
	.ascii	"can't chdir to '%s': %s\012\000"
	.align	2
.LC11:
	.ascii	"%s: \000"
	.align	2
.LC12:
	.ascii	"Can't stat %s: %s\012\000"
	.align	2
.LC13:
	.ascii	"Can't lstat %s: %s\012\000"
	.align	2
.LC14:
	.ascii	"symlink to \000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #192
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-128]
	cmp	r3, #2
	beq	.L13
	ldr	r3, .L24+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-132]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L24+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-132]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	opendir
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L14
	ldr	r3, .L24+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-132]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L24+12
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, [fp, #-132]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r3, .L24+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-132]
	add	r3, r3, #4
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L24+16
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L21:
	ldr	r3, [fp, #-112]
	add	r3, r3, #11
	mov	r1, r3
	ldr	r0, .L24+20
	bl	printf
	ldr	r3, [fp, #-112]
	add	r3, r3, #11
	sub	r2, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L17
	ldr	r3, .L24+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-112]
	add	r5, r3, #11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L24+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L24+28
	str	r3, [fp, #-120]
	b	.L18
.L17:
	mov	r0, sp
	sub	r3, fp, #92
	mov	r2, #72
	mov	r1, r3
	bl	memcpy
	sub	r3, fp, #108
	ldm	r3, {r0, r1, r2, r3}
	bl	getType
	str	r0, [fp, #-120]
.L18:
	ldr	r3, [fp, #-112]
	add	r3, r3, #11
	sub	r2, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	lstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L19
	ldr	r3, .L24+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-112]
	add	r5, r3, #11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L24+32
	mov	r0, r4
	bl	fprintf
	b	.L16
.L19:
	ldr	r3, [fp, #-92]
	and	r3, r3, #61440
	cmp	r3, #40960
	bne	.L20
	ldr	r0, .L24+36
	bl	printf
.L20:
	ldr	r0, [fp, #-120]
	bl	puts
.L16:
	ldr	r0, [fp, #-116]
	bl	readdir
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L21
	ldr	r0, [fp, #-116]
	bl	closedir
	mov	r3, #0
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC15
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC7
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
