	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_worktree_lock_reason           ## -- Begin function worktree_lock_reason
	.p2align	4, 0x90
_worktree_lock_reason:                  ## @worktree_lock_reason
	.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	%rdi, %rbx
	callq	_is_main_worktree
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	cmpl	$0, (%rbx)
	jne	LBB0_7
## %bb.1:
	movq	_STRBUF_INIT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, -24(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_worktree_git_path
	leaq	-24(%rbp), %rdi
	movl	%eax, %esi
	callq	_strbuf_addstr
	movl	-24(%rbp), %edi
	callq	_file_exists
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	(%r14), %eax
	movl	%eax, -32(%rbp)
	movl	-24(%rbp), %esi
	leaq	-32(%rbp), %rdi
	xorl	%edx, %edx
	callq	_strbuf_read_file
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	-24(%rbp), %esi
	movl	%eax, %edi
	callq	_die_errno
LBB0_4:
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	callq	_strbuf_trim
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, 8(%rbx)
	jmp	LBB0_6
LBB0_5:
	movq	$0, 8(%rbx)
LBB0_6:
	movl	$1, (%rbx)
	leaq	-24(%rbp), %rdi
	callq	_strbuf_release
LBB0_7:
	movq	8(%rbx), %rax
	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	"locked"

L_.str.1:                               ## @.str.1
	.asciz	"failed to read '%s'"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_worktree_lock_reason           ; -- Begin function worktree_lock_reason
	.p2align	2
_worktree_lock_reason:                  ; @worktree_lock_reason
	.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	x19, x0
	bl	_is_main_worktree
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19]
	cbnz	w8, LBB0_7
; %bb.1:
Lloh0:
	adrp	x20, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STRBUF_INIT@GOTPAGEOFF]
	ldr	w8, [x20]
	str	w8, [sp, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_worktree_git_path
	mov	x1, x0
	add	x0, sp, #8
	bl	_strbuf_addstr
	ldr	w0, [sp, #8]
	bl	_file_exists
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w8, [x20]
	str	w8, [sp]
	ldr	w1, [sp, #8]
	mov	x0, sp
	mov	w2, #0
	bl	_strbuf_read_file
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	ldr	w1, [sp, #8]
	bl	_die_errno
LBB0_4:
	mov	x0, sp
	bl	_strbuf_trim
	mov	x0, sp
	mov	x1, #0
	bl	_strbuf_detach
	str	x0, [x19, #8]
	b	LBB0_6
LBB0_5:
	str	xzr, [x19, #8]
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	add	x0, sp, #8
	bl	_strbuf_release
LBB0_7:
	ldr	x0, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"locked"

l_.str.1:                               ; @.str.1
	.asciz	"failed to read '%s'"

.subsections_via_symbols
