	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_dir
_add_dir:                               ## @add_dir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_close
	movl	$-1, (%r13)
	movq	8(%r13), %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	$0, -48(%rbp)
	movl	8(%r13), %esi
	movl	$1, %edi
	callq	_DPRINTF
	movq	$0, 16(%r13)
	movq	%r14, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	leaq	24(%r13), %r15
	leaq	-48(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_free
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rax), %edi
	callq	_copy
	movq	%rax, %rbx
	movq	_NO_PROB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r13), %rdx
	movq	%rbx, %rsi
	movq	%r15, %rcx
	movq	%r12, %r8
	movq	%r13, %r9
	callq	_add_file
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	16(%r13)
	jmp	LBB0_8
LBB0_9:
	cmpq	$0, 16(%r13)
	je	LBB0_11
## %bb.10:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r13), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
LBB0_12:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	8(%r13), %rdi
	callq	_perror
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_stderr,4,2                     ## @stderr
	.comm	_NO_PROB,4,2                    ## @NO_PROB
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"fortune: %s: No fortune files in directory.\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_add_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_dir
_add_dir:                               ; @add_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w0, [x0]
	bl	_close
	mov	w8, #-1
	str	w8, [x19]
	ldr	x0, [x19, #8]
	bl	_opendir
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	str	xzr, [sp, #8]
	ldr	w1, [x19, #8]
	mov	w0, #1
	bl	_DPRINTF
	str	xzr, [x19, #16]
	mov	x0, x20
	bl	_readdir
	cbz	x0, LBB0_8
; %bb.2:
	add	x21, x19, #24
Lloh0:
	adrp	x23, _NO_PROB@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NO_PROB@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_free
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_readdir
	cbz	x0, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x0]
	cbz	x1, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x0, #8]
	bl	_copy
	mov	x22, x0
	ldr	w0, [x23]
	ldr	x2, [x19, #8]
	add	x4, sp, #8
	mov	x1, x22
	mov	x3, x21
	mov	x5, x19
	bl	_add_file
	cbz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
	b	LBB0_4
LBB0_8:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.9:
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	x2, [x19, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_11:
Lloh9:
	adrp	x8, _FALSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	ldr	x0, [x19, #8]
	bl	_perror
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_stderr,4,2                     ; @stderr
	.comm	_NO_PROB,4,2                    ; @NO_PROB
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"fortune: %s: No fortune files in directory.\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_add_dir
.subsections_via_symbols
