	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pathfind
_pathfind:                              ## @pathfind
	.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, %r13
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -56(%rbp)
	movq	_AG_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r13, %rdi
	movl	$114, %esi
	callq	_strchr
	xorl	%r12d, %r12d
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_R_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_2:
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$119, %esi
	callq	_strchr
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_W_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
LBB0_4:
	movq	%r13, %rdi
	movl	$120, %esi
	callq	_strchr
	movl	$0, %r13d
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_X_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_6:
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_extract_colon_unit
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movq	%rax, %r14
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	orl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	orl	%r13d, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r12d, %r12d
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	callq	_closedir
	testq	%r12, %r12
	jne	LBB0_20
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	leaq	-56(%rbp), %rdx
	callq	_extract_colon_unit
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_19
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	%r14, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r13
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_make_absolute
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_access
	testq	%rax, %rax
	js	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_canonicalize_pathname
	movq	%rax, %r12
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r12d, %r12d
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_17
LBB0_19:
	xorl	%r12d, %r12d
LBB0_20:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movq	%r12, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AG_PATH_MAX,4,2                ## @AG_PATH_MAX
	.comm	_R_OK,4,2                       ## @R_OK
	.comm	_W_OK,4,2                       ## @W_OK
	.comm	_X_OK,4,2                       ## @X_OK
	.no_dead_strip	_pathfind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pathfind
_pathfind:                              ; @pathfind
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	stur	wzr, [x29, #-76]
Lloh3:
	adrp	x8, _AG_PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AG_PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #1
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x2
	mov	w1, #114
	bl	_strchr
Lloh8:
	adrp	x8, _R_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R_OK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w23, wzr, w8, eq
	mov	x0, x22
	mov	w1, #119
	bl	_strchr
Lloh11:
	adrp	x8, _W_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _W_OK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w25, wzr, w8, eq
	mov	x0, x22
	mov	w1, #120
	bl	_strchr
Lloh14:
	adrp	x8, _X_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _X_OK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w22, wzr, w8, eq
	sub	x2, x29, #76
	mov	x0, x21
	mov	x1, x20
	bl	_extract_colon_unit
	mov	x24, x0
	cbz	x0, LBB0_13
; %bb.1:
	orr	w8, w25, w23
	orr	w22, w8, w22
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, #0
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_closedir
	cbnz	x24, LBB0_13
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	x2, x29, #76
	mov	x0, x21
	mov	x1, x20
	bl	_extract_colon_unit
	mov	x24, x0
	cbz	x0, LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x0, x24
	bl	_opendir
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_readdir
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w0, [x0]
	mov	x1, x19
	bl	_strcmp
	cbnz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_make_absolute
	mov	x25, x0
	mov	x1, x22
	bl	_access
	tbnz	x0, #63, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_canonicalize_pathname
	mov	x24, x0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, #0
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_free
	b	LBB0_3
LBB0_13:
	mov	sp, x26
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x24
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AG_PATH_MAX,4,2                ; @AG_PATH_MAX
	.comm	_R_OK,4,2                       ; @R_OK
	.comm	_W_OK,4,2                       ; @W_OK
	.comm	_X_OK,4,2                       ; @X_OK
	.no_dead_strip	_pathfind
.subsections_via_symbols
