	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function search_directory
_search_directory:                      ## @search_directory
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rsi), %r13
	callq	_strlen
	movq	$0, (%r13)
	cmpq	$0, 8(%r13)
	jle	LBB0_12
## %bb.1:
	movl	%eax, %ebx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r14
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	(%r13), %r14
	movq	%r14, (%r13)
	cmpq	8(%r13), %r14
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r15, %rdi
	leaq	-72(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_buf_read_file
	testl	%eax, %eax
	jne	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r14
	testq	%r14, %r14
	jle	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %r15
	addq	%r15, %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	movslq	12(%r15), %rax
	addq	%rax, %r15
	cmpq	%r14, %r15
	jae	LBB0_10
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, (%r15)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	%ebx, 8(%r15)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	16(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	(%r15), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_12:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_search_directory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function search_directory
_search_directory:                      ; @search_directory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x1]
	bl	_strlen
	str	xzr, [x23]
	ldr	x8, [x23, #8]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x22, x0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	x9, x10, [x23]
	add	x8, x9, x8
	cmp	x8, x10
	str	x8, [x23]
	b.ge	LBB0_12
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x20
	bl	_buf_read_file
	cbnz	w0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x24, [sp, #8]
	add	x25, x24, x8
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldrsw	x8, [x24, #12]
	add	x24, x24, x8
	cmp	x24, x25
	b.hs	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24]
	cbz	x8, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w8, [x24, #8]
	cmp	w8, w22
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w1, [x24, #16]
	mov	x0, x21
	mov	x2, x22
	bl	_strncmp
	cbnz	x0, LBB0_7
; %bb.11:
	ldr	x8, [x24]
	str	x8, [x19]
	b	LBB0_13
LBB0_12:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_search_directory
.subsections_via_symbols
