	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_find_worktree                  ## -- Begin function find_worktree
	.p2align	4, 0x90
_find_worktree:                         ## @find_worktree
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rdx, %rsi
	callq	_find_worktree_by_suffix
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_prefix_filename
	movq	%rax, %r15
	movq	%rax, %r14
	jmp	LBB0_4
LBB0_2:
	xorl	%r14d, %r14d
LBB0_4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_real_pathdup
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %r15
	movq	(%rbx), %rax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %rax
	addq	$8, %rbx
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rax), %edi
	callq	_real_path_if_valid
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_fspathcmp
	testl	%eax, %eax
	jne	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movq	(%rbx), %rax
	jmp	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	callq	_free
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_find_worktree                  ; -- Begin function find_worktree
	.p2align	2
_find_worktree:                         ; @find_worktree
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x1, x2
	bl	_find_worktree_by_suffix
	cbnz	x0, LBB0_10
; %bb.1:
	cbz	x20, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_prefix_filename
	mov	x21, x0
	mov	x20, x0
LBB0_3:
	mov	x0, x21
	mov	w1, #0
	bl	_real_pathdup
	cbz	x0, LBB0_9
; %bb.4:
	mov	x21, x0
	ldr	x8, [x19]
	cbnz	x8, LBB0_6
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]!
	cbz	x8, LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x8]
	bl	_real_path_if_valid
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x0
	mov	x0, x21
	bl	_fspathcmp
	cbnz	w0, LBB0_5
LBB0_8:
	mov	x0, x21
	bl	_free
	mov	x0, x20
	bl	_free
	ldr	x0, [x19]
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_free
	mov	x0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
