	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_worktree_ref             ## -- Begin function parse_worktree_ref
	.p2align	4, 0x90
_parse_worktree_ref:                    ## @parse_worktree_ref
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	callq	_skip_prefix
	movq	-48(%rbp), %rdi
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	cmpb	$0, (%rdi)
	je	LBB0_2
## %bb.3:
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	movq	$0, (%r12)
LBB0_5:
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movl	$0, (%r15)
LBB0_7:
	testq	%r14, %r14
	je	LBB0_19
LBB0_18:
	movq	%rdi, (%r14)
LBB0_19:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %rdx
	callq	_skip_prefix
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	movq	-48(%rbp), %r13
	movq	%r13, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_20
## %bb.10:
	movq	%rax, %rdi
	cmpq	%r13, %rax
	je	LBB0_20
## %bb.11:
	cmpb	$0, 1(%rdi)
	je	LBB0_20
## %bb.12:
	testq	%r12, %r12
	je	LBB0_14
## %bb.13:
	movq	%r13, (%r12)
LBB0_14:
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:
	movl	%edi, %eax
	subl	%r13d, %eax
	movl	%eax, (%r15)
LBB0_16:
	testq	%r14, %r14
	je	LBB0_19
## %bb.17:
	incq	%rdi
	jmp	LBB0_18
LBB0_2:
	movl	$-1, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"main-worktree/"

L_.str.1:                               ## @.str.1
	.asciz	"worktrees/"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_worktree_ref             ; -- Begin function parse_worktree_ref
	.p2align	2
_parse_worktree_ref:                    ; @parse_worktree_ref
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	str	x0, [sp, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_skip_prefix
	mov	x8, x0
	ldr	x0, [sp, #8]
	cbz	x8, LBB0_8
; %bb.1:
	ldrb	w8, [x0]
	cbz	w8, LBB0_18
; %bb.2:
	cbz	x21, LBB0_4
; %bb.3:
	str	xzr, [x21]
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	str	wzr, [x20]
LBB0_6:
	cbz	x19, LBB0_17
LBB0_7:
	mov	w8, #0
	str	x0, [x19]
	b	LBB0_19
LBB0_8:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	bl	_skip_prefix
	cbz	x0, LBB0_18
; %bb.9:
	ldr	x22, [sp, #8]
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	mov	w8, #-1
	cbz	x0, LBB0_19
; %bb.10:
	mov	x9, x0
	cmp	x0, x22
	b.eq	LBB0_19
; %bb.11:
	mov	x0, x9
	ldrb	w8, [x0, #1]!
	cbz	w8, LBB0_18
; %bb.12:
	cbz	x21, LBB0_14
; %bb.13:
	str	x22, [x21]
LBB0_14:
	cbz	x20, LBB0_16
; %bb.15:
	sub	w8, w9, w22
	str	w8, [x20]
LBB0_16:
	cbnz	x19, LBB0_7
LBB0_17:
	mov	w8, #0
	b	LBB0_19
LBB0_18:
	mov	w8, #-1
LBB0_19:
	mov	x0, x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"main-worktree/"

l_.str.1:                               ; @.str.1
	.asciz	"worktrees/"

.subsections_via_symbols
