	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_worktree_location       ## -- Begin function update_worktree_location
	.p2align	4, 0x90
_update_worktree_location:              ## @update_worktree_location
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	callq	_is_main_worktree
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_BUG
LBB0_2:
	leaq	-24(%rbp), %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_strbuf_realpath
	movl	(%rbx), %edi
	movl	-24(%rbp), %esi
	callq	_fspathcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_git_common_path
	movl	-24(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_write_file
	movl	(%rbx), %edi
	callq	_free
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movl	%eax, (%rbx)
LBB0_4:
	leaq	-24(%rbp), %rdi
	callq	_strbuf_release
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't relocate main worktree"

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

L_.str.2:                               ## @.str.2
	.asciz	"%s/.git"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_worktree_location       ; -- Begin function update_worktree_location
	.p2align	2
_update_worktree_location:              ; @update_worktree_location
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	bl	_is_main_worktree
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
LBB0_2:
	add	x0, sp, #8
	mov	x1, x20
	mov	w2, #1
	bl	_strbuf_realpath
	ldr	w0, [x19]
	ldr	w1, [sp, #8]
	bl	_fspathcmp
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x19, #4]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_git_common_path
	ldr	w2, [sp, #8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_write_file
	ldr	w0, [x19]
	bl	_free
	add	x0, sp, #8
	mov	x1, #0
	bl	_strbuf_detach
	str	w0, [x19]
LBB0_4:
	add	x0, sp, #8
	bl	_strbuf_release
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't relocate main worktree"

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

l_.str.2:                               ; @.str.2
	.asciz	"%s/.git"

.subsections_via_symbols
