	.file	"40523.c"
	.intel_syntax noprefix
	.text
	.local	num_dirs
	.comm	num_dirs,4,4
	.local	num_regular
	.comm	num_regular,4,4
	.globl	is_dir
	.type	is_dir, @function
is_dir:
.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, 176
	mov	QWORD PTR -168[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	sete	al
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	is_dir, .-is_dir
	.section	.rodata
.LC0:
	.string	"."
.LC1:
	.string	".."
	.text
	.globl	process_directory
	.type	process_directory, @function
process_directory:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, DWORD PTR num_dirs[rip]
	add	eax, 1
	mov	DWORD PTR num_dirs[rip], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	chdir@PLT
	jmp	.L5
.L6:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	mov	rdi, rax
	call	process_path
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	lea	rdi, .LC1[rip]
	call	chdir@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	closedir@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	process_directory, .-process_directory
	.globl	process_file
	.type	process_file, @function
process_file:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, DWORD PTR num_regular[rip]
	add	eax, 1
	mov	DWORD PTR num_regular[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	process_file, .-process_file
	.globl	process_path
	.type	process_path, @function
process_path:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	is_dir
	test	al, al
	je	.L9
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	process_directory
	jmp	.L11
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	process_file
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	process_path, .-process_path
	.section	.rodata
.LC2:
	.string	"Usage: %s <path>\n"
	.align 8
.LC3:
	.string	"       where <path> is the file or root of the tree you want to summarize."
.LC4:
	.string	"There were %d directories.\n"
.LC5:
	.string	"There were %d regular files.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 2
	je	.L13
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L13:
	mov	DWORD PTR num_dirs[rip], 0
	mov	DWORD PTR num_regular[rip], 0
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	process_path
	mov	eax, DWORD PTR num_dirs[rip]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR num_regular[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"40523.c"
	.text
	.local	num_dirs
	.comm	num_dirs,4,4
	.local	num_regular
	.comm	num_regular,4,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	is_dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_dir, %function
is_dir:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	stat
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #16384
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	is_dir, .-is_dir
	.section	.rodata
	.align	2
.LC1:
	.ascii	".\000"
	.align	2
.LC2:
	.ascii	"..\000"
	.text
	.align	2
	.global	process_directory
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_directory, %function
process_directory:
	@ 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]
	ldr	r3, .L9
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9
	str	r3, [r2]
	ldr	r0, [fp, #-16]
	bl	opendir
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	chdir
	b	.L7
.L8:
	ldr	r3, [fp, #-8]
	add	r3, r3, #11
	ldr	r1, .L9+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-8]
	add	r3, r3, #11
	ldr	r1, .L9+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-8]
	add	r3, r3, #11
	mov	r0, r3
	bl	process_path
.L7:
	ldr	r0, [fp, #-12]
	bl	readdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L9+8
	bl	chdir
	ldr	r0, [fp, #-12]
	bl	closedir
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	num_dirs
	.word	.LC1
	.word	.LC2
	.size	process_directory, .-process_directory
	.align	2
	.global	process_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_file, %function
process_file:
	@ 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, .L12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L12
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L13:
	.align	2
.L12:
	.word	num_regular
	.size	process_file, .-process_file
	.align	2
	.global	process_path
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_path, %function
process_path:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	is_dir
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, [fp, #-8]
	bl	process_directory
	b	.L17
.L15:
	ldr	r0, [fp, #-8]
	bl	process_file
.L17:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	process_path, .-process_path
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Usage: %s <path>\012\000"
	.align	2
.LC4:
	.ascii	"       where <path> is the file or root of the tree"
	.ascii	" you want to summarize.\000"
	.align	2
.LC5:
	.ascii	"There were %d directories.\012\000"
	.align	2
.LC6:
	.ascii	"There were %d regular files.\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L19
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21
	bl	printf
	ldr	r0, .L21+4
	bl	puts
	mov	r3, #1
	b	.L20
.L19:
	ldr	r3, .L21+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L21+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	process_path
	ldr	r3, .L21+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+16
	bl	printf
	ldr	r3, .L21+12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+20
	bl	printf
	mov	r3, #0
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC3
	.word	.LC4
	.word	num_dirs
	.word	num_regular
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
