	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_validate_worktree              ## -- Begin function validate_worktree
	.p2align	4, 0x90
_validate_worktree:                     ## @validate_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	4(%rdi), %edx
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdi
	callq	_strbuf_addf
	movq	%rbx, %rdi
	callq	_is_main_worktree
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	-48(%rbp), %edi
	callq	_is_directory
	testq	%rax, %rax
	je	LBB0_10
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_3:
	movl	4(%rbx), %edi
	callq	_is_absolute_path
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	movq	_WT_VALIDATE_WORKTREE_MISSING_OK@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movl	4(%rbx), %edi
	callq	_file_exists
	testl	%eax, %eax
	je	LBB0_2
LBB0_6:
	movl	-48(%rbp), %edi
	callq	_file_exists
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movl	-48(%rbp), %edi
	leaq	-52(%rbp), %rsi
	callq	_read_gitfile_gently
	movl	%eax, %edi
	callq	_xstrdup_or_null
	testq	%rax, %rax
	je	LBB0_17
## %bb.8:
	movq	%rax, %r15
	movl	(%rbx), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_git_common_path
	movl	%eax, %edi
	callq	_real_path
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_fspathcmp
	testl	%eax, %eax
	je	LBB0_18
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.7(%rip), %rdi
	callq	__
	movl	%eax, %r13d
	movl	(%rbx), %esi
	movl	4(%rbx), %ebx
	leaq	L_.str.6(%rip), %rdi
	callq	_git_common_path
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_strbuf_addf_gently
	jmp	LBB0_16
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %r12d
	movl	(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_git_common_path
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
LBB0_13:
	callq	__
	movl	-48(%rbp), %edx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
LBB0_14:
	xorl	%eax, %eax
	callq	_strbuf_addf_gently
LBB0_15:
	movl	$-1, %r12d
LBB0_16:
	movq	%r15, %rdi
	callq	_free
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movl	-48(%rbp), %edx
	movl	-52(%rbp), %ecx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_strbuf_addf_gently
	jmp	LBB0_15
LBB0_18:
	xorl	%r12d, %r12d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/.git"

L_.str.1:                               ## @.str.1
	.asciz	"'%s' at main working tree is not the repository directory"

L_.str.2:                               ## @.str.2
	.asciz	"'%s' file does not contain absolute path to the working tree location"

L_.str.3:                               ## @.str.3
	.asciz	"worktrees/%s/gitdir"

	.comm	_WT_VALIDATE_WORKTREE_MISSING_OK,4,2 ## @WT_VALIDATE_WORKTREE_MISSING_OK
L_.str.4:                               ## @.str.4
	.asciz	"'%s' does not exist"

L_.str.5:                               ## @.str.5
	.asciz	"'%s' is not a .git file, error code %d"

L_.str.6:                               ## @.str.6
	.asciz	"worktrees/%s"

L_.str.7:                               ## @.str.7
	.asciz	"'%s' does not point back to '%s'"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_validate_worktree              ; -- Begin function validate_worktree
	.p2align	2
_validate_worktree:                     ; @validate_worktree
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	w2, [x0, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #24
	bl	_strbuf_addf
	mov	x0, x20
	bl	_is_main_worktree
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [sp, #24]
	bl	_is_directory
	cbz	x0, LBB0_10
LBB0_2:
	mov	x21, #0
	mov	w22, #0
	b	LBB0_16
LBB0_3:
	ldr	w0, [x20, #4]
	bl	_is_absolute_path
	cbz	w0, LBB0_11
; %bb.4:
Lloh5:
	adrp	x8, _WT_VALIDATE_WORKTREE_MISSING_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WT_VALIDATE_WORKTREE_MISSING_OK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x20, #4]
	bl	_file_exists
	cbz	w0, LBB0_2
LBB0_6:
	ldr	w0, [sp, #24]
	bl	_file_exists
	cbz	w0, LBB0_12
; %bb.7:
	ldr	w0, [sp, #24]
	add	x1, sp, #20
	bl	_read_gitfile_gently
	bl	_xstrdup_or_null
	mov	x21, x0
	cbz	x0, LBB0_17
; %bb.8:
	ldr	w1, [x20]
Lloh8:
	adrp	x0, l_.str.6@PAGE
Lloh9:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_git_common_path
	bl	_real_path
	mov	x1, x0
	mov	x0, x21
	bl	_fspathcmp
	mov	x22, x0
	cbz	w0, LBB0_16
; %bb.9:
Lloh10:
	adrp	x0, l_.str.7@PAGE
Lloh11:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	__
	mov	x23, x0
	ldp	w1, w24, [x20]
Lloh12:
	adrp	x0, l_.str.6@PAGE
Lloh13:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_git_common_path
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_strbuf_addf_gently
	b	LBB0_16
LBB0_10:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x21, x0
	ldr	w1, [x20]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_git_common_path
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	b	LBB0_14
LBB0_12:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_13:
	bl	__
	mov	x1, x0
	ldr	w2, [sp, #24]
	mov	x0, x19
LBB0_14:
	bl	_strbuf_addf_gently
	mov	x21, #0
LBB0_15:
	mov	w22, #-1
LBB0_16:
	mov	x0, x21
	bl	_free
	add	x0, sp, #24
	bl	_strbuf_release
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_17:
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	mov	x1, x0
	ldp	w8, w2, [sp, #20]
	str	x8, [sp]
	mov	x0, x19
	bl	_strbuf_addf_gently
	b	LBB0_15
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/.git"

l_.str.1:                               ; @.str.1
	.asciz	"'%s' at main working tree is not the repository directory"

l_.str.2:                               ; @.str.2
	.asciz	"'%s' file does not contain absolute path to the working tree location"

l_.str.3:                               ; @.str.3
	.asciz	"worktrees/%s/gitdir"

	.comm	_WT_VALIDATE_WORKTREE_MISSING_OK,4,2 ; @WT_VALIDATE_WORKTREE_MISSING_OK
l_.str.4:                               ; @.str.4
	.asciz	"'%s' does not exist"

l_.str.5:                               ; @.str.5
	.asciz	"'%s' is not a .git file, error code %d"

l_.str.6:                               ; @.str.6
	.asciz	"worktrees/%s"

l_.str.7:                               ; @.str.7
	.asciz	"'%s' does not point back to '%s'"

.subsections_via_symbols
