	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_expand_ref                     ## -- Begin function expand_ref
	.p2align	4, 0x90
_expand_ref:                            ## @expand_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	$0, (%r8)
	movq	_ref_rev_parse_rules@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	cmpq	$0, (%r13)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	addq	$8, %r13
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movq	_warn_ambiguous_refs@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, (%r13)
	leaq	8(%r13), %r13
	je	LBB0_16
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	leaq	-88(%rbp), %r12
	cmoveq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	movq	%r15, %rdi
	callq	_strbuf_reset
	movq	-8(%r13), %rsi
	movq	%r15, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_strbuf_addf
	movq	%r14, %rdi
	callq	_get_main_ref_store
	movl	-48(%rbp), %esi
	movq	_RESOLVE_REF_READING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%r12, %rcx
	leaq	-52(%rbp), %r8
	callq	_refs_resolve_ref_unsafe
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_xstrdup
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %eax
	movq	_REF_ISSYMREF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %eax
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_REF_ISBROKEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %edi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.2(%rip), %rdi
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	callq	__
	movl	-48(%rbp), %esi
	movl	%eax, %edi
	callq	_warning
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
LBB0_16:
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.comm	_ref_rev_parse_rules,8,3        ## @ref_rev_parse_rules
	.comm	_RESOLVE_REF_READING,4,2        ## @RESOLVE_REF_READING
	.comm	_warn_ambiguous_refs,4,2        ## @warn_ambiguous_refs
	.comm	_REF_ISSYMREF,4,2               ## @REF_ISSYMREF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HEAD"

L_.str.1:                               ## @.str.1
	.asciz	"ignoring dangling symref %s"

	.comm	_REF_ISBROKEN,4,2               ## @REF_ISBROKEN
L_.str.2:                               ## @.str.2
	.asciz	"ignoring broken ref %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_expand_ref                     ; -- Begin function expand_ref
	.p2align	2
_expand_ref:                            ; @expand_ref
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x4, [sp]                        ; 8-byte Folded Spill
	str	xzr, [x4]
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
Lloh3:
	adrp	x8, _ref_rev_parse_rules@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ref_rev_parse_rules@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x8]
	cbz	x9, LBB0_15
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
	mov	w22, #0
	add	x25, x8, #8
	add	x27, sp, #16
Lloh6:
	adrp	x26, _RESOLVE_REF_READING@GOTPAGE
Lloh7:
	ldr	x26, [x26, _RESOLVE_REF_READING@GOTPAGEOFF]
Lloh8:
	adrp	x19, _warn_ambiguous_refs@GOTPAGE
Lloh9:
	ldr	x19, [x19, _warn_ambiguous_refs@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19]
	cbz	w8, LBB0_16
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25], #8
	cbz	x8, LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, #0
	csel	x28, x20, x27, eq
	add	x0, sp, #24
	bl	_strbuf_reset
	ldur	x1, [x25, #-8]
	add	x0, sp, #24
	mov	x2, x21
	mov	x3, x23
	bl	_strbuf_addf
	mov	x0, x24
	bl	_get_main_ref_store
	ldr	w1, [sp, #24]
	ldr	w2, [x26]
	add	x4, sp, #12
	mov	x3, x28
	bl	_refs_resolve_ref_unsafe
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w22, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_xstrdup
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x0, [x8]
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x9, _REF_ISSYMREF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _REF_ISSYMREF@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #24]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #12]
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh17:
	adrp	x9, _REF_ISBROKEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _REF_ISBROKEN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #24]
	mov	w1, #47
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	__
	ldr	w1, [sp, #24]
	bl	_warning
	b	LBB0_3
LBB0_15:
	mov	w22, #0
LBB0_16:
	add	x0, sp, #24
	bl	_strbuf_release
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.comm	_ref_rev_parse_rules,8,3        ; @ref_rev_parse_rules
	.comm	_RESOLVE_REF_READING,4,2        ; @RESOLVE_REF_READING
	.comm	_warn_ambiguous_refs,4,2        ; @warn_ambiguous_refs
	.comm	_REF_ISSYMREF,4,2               ; @REF_ISSYMREF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HEAD"

l_.str.1:                               ; @.str.1
	.asciz	"ignoring dangling symref %s"

	.comm	_REF_ISBROKEN,4,2               ; @REF_ISBROKEN
l_.str.2:                               ; @.str.2
	.asciz	"ignoring broken ref %s"

.subsections_via_symbols
