	.file	"28813.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s: no arguments\n"
	.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -32[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	edi, 1
	call	exit@PLT
.L2:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	do_traverse
	add	DWORD PTR -4[rbp], 1
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L4
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"."
.LC2:
	.string	".."
.LC3:
	.string	"file"
.LC4:
	.string	"symlink"
.LC5:
	.string	"directory"
	.text
	.type	do_traverse, @function
do_traverse:
.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, 2256
	mov	QWORD PTR -2248[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -2248[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -2224[rbp], rax
	cmp	QWORD PTR -2224[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR -2248[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	rdx, QWORD PTR -2248[rbp]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	eax, 1
	mov	DWORD PTR -2228[rbp], eax
	cmp	DWORD PTR -2228[rbp], 0
	js	.L8
	mov	eax, DWORD PTR -2228[rbp]
	cdqe
	movzx	eax, BYTE PTR -2064[rbp+rax]
	cmp	al, 47
	je	.L8
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -2064[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
.L8:
	mov	rax, QWORD PTR -2216[rbp]
	lea	rdx, 19[rax]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -2216[rbp]
	add	rax, 19
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -2216[rbp]
	add	rax, 19
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L10
	jmp	.L7
.L10:
	lea	rdx, -2208[rbp]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	test	eax, eax
	jns	.L11
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	eax, DWORD PTR -2184[rbp]
	mov	edi, eax
	call	filetype
	lea	rdx, .LC3[rip]
	cmp	rax, rdx
	je	.L7
	mov	eax, DWORD PTR -2184[rbp]
	mov	edi, eax
	call	filetype
	lea	rdx, .LC4[rip]
	cmp	rax, rdx
	jne	.L13
	jmp	.L7
.L13:
	mov	eax, DWORD PTR -2184[rbp]
	mov	edi, eax
	call	filetype
	lea	rdx, .LC5[rip]
	cmp	rax, rdx
	jne	.L7
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	do_traverse
.L7:
	mov	rax, QWORD PTR -2224[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -2216[rbp], rax
	cmp	QWORD PTR -2216[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR -2224[rbp]
	mov	rdi, rax
	call	closedir@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	do_traverse, .-do_traverse
	.section	.rodata
.LC6:
	.string	"chardev"
.LC7:
	.string	"blockdev"
.LC8:
	.string	"fifo"
.LC9:
	.string	"socket"
.LC10:
	.string	"unknown"
	.text
	.type	filetype, @function
filetype:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L17
	lea	rax, .LC3[rip]
	jmp	.L18
.L17:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L19
	lea	rax, .LC5[rip]
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 8192
	jne	.L20
	lea	rax, .LC6[rip]
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 24576
	jne	.L21
	lea	rax, .LC7[rip]
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 4096
	jne	.L22
	lea	rax, .LC8[rip]
	jmp	.L18
.L22:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 40960
	jne	.L23
	lea	rax, .LC4[rip]
	jmp	.L18
.L23:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 61440
	cmp	eax, 49152
	jne	.L24
	lea	rax, .LC9[rip]
	jmp	.L18
.L24:
	lea	rax, .LC10[rip]
.L18:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	filetype, .-filetype
	.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	"28813.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: no arguments\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L5
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L5+4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	do_traverse
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L4
	mov	r0, #0
	bl	exit
.L6:
	.align	2
.L5:
	.word	stderr
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/\000"
	.align	2
.LC2:
	.ascii	".\000"
	.align	2
.LC3:
	.ascii	"..\000"
	.align	2
.LC4:
	.ascii	"file\000"
	.align	2
.LC5:
	.ascii	"symlink\000"
	.align	2
.LC6:
	.ascii	"directory\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_traverse, %function
do_traverse:
	@ args = 0, pretend = 0, frame = 2168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2160
	sub	sp, sp, #8
	str	r0, [fp, #-2168]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-2168]
	bl	opendir
	str	r0, [fp, #-2160]
	ldr	r3, [fp, #-2160]
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-2168]
	bl	perror
	mov	r0, #1
	bl	exit
.L16:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2168]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	str	r3, [fp, #-2152]
	ldr	r3, [fp, #-2152]
	cmp	r3, #0
	blt	.L10
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2152]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L10
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L18+4
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
.L10:
	ldr	r3, [fp, #-2156]
	add	r2, r3, #11
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-2156]
	add	r3, r3, #11
	ldr	r1, .L18+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-2156]
	add	r3, r3, #11
	ldr	r1, .L18+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	b	.L9
.L12:
	sub	r2, fp, #2144
	sub	r2, r2, #4
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-2132]
	mov	r0, r3
	bl	filetype
	mov	r3, r0
	ldr	r2, .L18+16
	cmp	r3, r2
	beq	.L9
	ldr	r3, [fp, #-2132]
	mov	r0, r3
	bl	filetype
	mov	r3, r0
	ldr	r2, .L18+20
	cmp	r3, r2
	bne	.L15
	b	.L9
.L15:
	ldr	r3, [fp, #-2132]
	mov	r0, r3
	bl	filetype
	mov	r3, r0
	ldr	r2, .L18+24
	cmp	r3, r2
	bne	.L9
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	do_traverse
.L9:
	ldr	r0, [fp, #-2160]
	bl	readdir
	str	r0, [fp, #-2156]
	ldr	r3, [fp, #-2156]
	cmp	r3, #0
	bne	.L16
	ldr	r0, [fp, #-2160]
	bl	closedir
	nop
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC7
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	do_traverse, .-do_traverse
	.section	.rodata
	.align	2
.LC8:
	.ascii	"chardev\000"
	.align	2
.LC9:
	.ascii	"blockdev\000"
	.align	2
.LC10:
	.ascii	"fifo\000"
	.align	2
.LC11:
	.ascii	"socket\000"
	.align	2
.LC12:
	.ascii	"unknown\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	filetype, %function
filetype:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L21
	ldr	r3, .L29
	b	.L22
.L21:
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L23
	ldr	r3, .L29+4
	b	.L22
.L23:
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #8192
	bne	.L24
	ldr	r3, .L29+8
	b	.L22
.L24:
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #24576
	bne	.L25
	ldr	r3, .L29+12
	b	.L22
.L25:
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #4096
	bne	.L26
	ldr	r3, .L29+16
	b	.L22
.L26:
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #40960
	bne	.L27
	ldr	r3, .L29+20
	b	.L22
.L27:
	ldr	r3, [fp, #-8]
	and	r3, r3, #61440
	cmp	r3, #49152
	bne	.L28
	ldr	r3, .L29+24
	b	.L22
.L28:
	ldr	r3, .L29+28
.L22:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L30:
	.align	2
.L29:
	.word	.LC4
	.word	.LC6
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC5
	.word	.LC11
	.word	.LC12
	.size	filetype, .-filetype
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
