	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_branch
_get_branch:                            ## @get_branch
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %rdx
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -32(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_worktree_git_path
	leaq	-32(%rbp), %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_strbuf_read_file
	testq	%rax, %rax
	jle	LBB0_5
## %bb.1:
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	leaq	-32(%rbp), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-24(%rbp), %rdi
	movslq	%eax, %rsi
	cmpb	$10, -1(%rdi,%rsi)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	decq	%rsi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_strbuf_setlen
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_3
LBB0_5:
	leaq	-32(%rbp), %rdi
	callq	_strbuf_release
	xorl	%eax, %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %rdx
	callq	_skip_prefix
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	-48(%rbp), %edx
	subl	-24(%rbp), %edx
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	callq	_strbuf_remove
	jmp	LBB0_12
LBB0_8:
	movq	-24(%rbp), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_starts_with
	testq	%rax, %rax
	je	LBB0_9
LBB0_12:
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	jmp	LBB0_13
LBB0_9:
	movq	-24(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	callq	_get_oid_hex
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	-24(%rbp), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_5
LBB0_10:
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strbuf_reset
	movq	_DEFAULT_ABBREV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_strbuf_add_unique_abbrev
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,16,3               ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"refs/heads/"

L_.str.2:                               ## @.str.2
	.asciz	"refs/"

	.comm	_DEFAULT_ABBREV,4,2             ## @DEFAULT_ABBREV
L_.str.3:                               ## @.str.3
	.asciz	"detached HEAD"

	.no_dead_strip	_get_branch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_branch
_get_branch:                            ; @get_branch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
	mov	x2, x1
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [sp, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_worktree_git_path
	mov	x1, x0
	add	x0, sp, #16
	mov	w2, #0
	bl	_strbuf_read_file
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #24]
	sxtw	x8, w8
	sub	x1, x8, #1
	ldrb	w8, [x0, x1]
	cmp	w8, #10
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, sp, #16
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_strbuf_setlen
	ldr	w8, [sp, #16]
	cbnz	w8, LBB0_2
LBB0_4:
	add	x0, sp, #16
	bl	_strbuf_release
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, sp
	bl	_skip_prefix
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w8, [sp]
	ldr	w9, [sp, #24]
	sub	w2, w8, w9
	add	x0, sp, #16
	mov	w1, #0
	bl	_strbuf_remove
	b	LBB0_9
LBB0_8:
	ldr	x0, [sp, #24]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_starts_with
	cbz	x0, LBB0_10
LBB0_9:
	add	x0, sp, #16
	mov	x1, #0
	bl	_strbuf_detach
	b	LBB0_5
LBB0_10:
	ldr	x0, [sp, #24]
	add	x1, sp, #8
	bl	_get_oid_hex
	cbz	w0, LBB0_12
; %bb.11:
	ldr	x0, [sp, #24]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_9
	b	LBB0_4
LBB0_12:
	add	x0, sp, #16
	bl	_strbuf_reset
Lloh11:
	adrp	x8, _DEFAULT_ABBREV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEFAULT_ABBREV@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_strbuf_add_unique_abbrev
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,16,3               ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"refs/heads/"

l_.str.2:                               ; @.str.2
	.asciz	"refs/"

	.comm	_DEFAULT_ABBREV,4,2             ; @DEFAULT_ABBREV
l_.str.3:                               ; @.str.3
	.asciz	"detached HEAD"

	.no_dead_strip	_get_branch
.subsections_via_symbols
