	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_remote_refs                ## -- Begin function get_remote_refs
	.p2align	4, 0x90
_get_remote_refs:                       ## @get_remote_refs
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r14
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movl	%edi, %r15d
	movq	%rdx, -56(%rbp)
	movq	$0, (%rdx)
	leaq	L_.str(%rip), %rdi
	movl	$1, %esi
	callq	_server_supports_v2
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_packet_write_fmt
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	xorl	%esi, %esi
	callq	_server_supports_v2
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_git_user_agent_sanitized
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_packet_write_fmt
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.5:
	cmpl	$0, (%rbx)
	je	LBB0_10
## %bb.6:
	leaq	L_.str.4(%rip), %rdi
	movl	$1, %esi
	callq	_server_supports_v2
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	cmpl	$0, (%rbx)
	jle	LBB0_10
## %bb.8:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax,%r12,4), %edx
	movl	%r15d, %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_packet_write_fmt
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jl	LBB0_9
LBB0_10:
	movl	%r15d, %edi
	callq	_packet_delim
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.6(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_packet_write_fmt
LBB0_12:
	leaq	L_.str.7(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_packet_write_fmt
	testq	%r14, %r14
	je	LBB0_16
## %bb.13:
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.14:
	leaq	L_.str.8(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edx
	movl	%r15d, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_packet_write_fmt
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	movl	%r15d, %edi
	callq	_packet_flush
	movq	%r13, %rdi
	callq	_packet_reader_read
	movq	_PACKET_READ_NORMAL@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_21
## %bb.17:
	leaq	-56(%rbp), %r14
	leaq	L_.str.9(%rip), %r15
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	callq	_packet_reader_read
	cmpq	(%r12), %rax
	jne	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %edi
	movq	%r14, %rsi
	callq	_process_ref_v2
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r15, %rdi
	callq	__
	movl	8(%r13), %esi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die
	jmp	LBB0_20
LBB0_21:
	movq	(%r13), %rax
	movq	_PACKET_READ_FLUSH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.10(%rip), %rdi
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die
LBB0_23:
	movq	-56(%rbp), %rax
	addq	$24, %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	"ls-refs"

L_.str.1:                               ## @.str.1
	.asciz	"command=ls-refs\n"

L_.str.2:                               ## @.str.2
	.asciz	"agent"

L_.str.3:                               ## @.str.3
	.asciz	"agent=%s"

L_.str.4:                               ## @.str.4
	.asciz	"server-option"

L_.str.5:                               ## @.str.5
	.asciz	"server-option=%s"

L_.str.6:                               ## @.str.6
	.asciz	"peel\n"

L_.str.7:                               ## @.str.7
	.asciz	"symrefs\n"

L_.str.8:                               ## @.str.8
	.asciz	"ref-prefix %s\n"

	.comm	_PACKET_READ_NORMAL,8,3         ## @PACKET_READ_NORMAL
L_.str.9:                               ## @.str.9
	.asciz	"invalid ls-refs response: %s"

	.comm	_PACKET_READ_FLUSH,8,3          ## @PACKET_READ_FLUSH
L_.str.10:                              ## @.str.10
	.asciz	"expected flush after ref listing"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_remote_refs                ; -- Begin function get_remote_refs
	.p2align	2
_get_remote_refs:                       ; @get_remote_refs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x23, x5
	mov	x20, x4
	mov	x22, x3
	mov	x19, x1
	mov	x21, x0
	str	x2, [sp, #8]
	str	xzr, [x2]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #1
	bl	_server_supports_v2
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_packet_write_fmt
LBB0_2:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	w1, #0
	bl	_server_supports_v2
	cbz	x0, LBB0_4
; %bb.3:
	bl	_git_user_agent_sanitized
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_packet_write_fmt
LBB0_4:
	cbz	x23, LBB0_10
; %bb.5:
	ldr	w8, [x23]
	cbz	w8, LBB0_10
; %bb.6:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #1
	bl	_server_supports_v2
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x25, #0
Lloh10:
	adrp	x24, l_.str.5@PAGE
Lloh11:
	add	x24, x24, l_.str.5@PAGEOFF
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	w8, [x8, x25, lsl #2]
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x24
	bl	_packet_write_fmt
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.lt	LBB0_9
LBB0_10:
	mov	x0, x21
	bl	_packet_delim
	cbnz	w22, LBB0_12
; %bb.11:
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_packet_write_fmt
LBB0_12:
Lloh14:
	adrp	x1, l_.str.7@PAGE
Lloh15:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_packet_write_fmt
	cbz	x20, LBB0_16
; %bb.13:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x23, #0
Lloh16:
	adrp	x22, l_.str.8@PAGE
Lloh17:
	add	x22, x22, l_.str.8@PAGEOFF
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x23, lsl #2]
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x22
	bl	_packet_write_fmt
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.lt	LBB0_15
LBB0_16:
	mov	x0, x21
	bl	_packet_flush
	mov	x0, x19
	bl	_packet_reader_read
Lloh18:
	adrp	x21, _PACKET_READ_NORMAL@GOTPAGE
Lloh19:
	ldr	x21, [x21, _PACKET_READ_NORMAL@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.17:
Lloh20:
	adrp	x20, l_.str.9@PAGE
Lloh21:
	add	x20, x20, l_.str.9@PAGEOFF
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x19
	bl	_packet_reader_read
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_21
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_process_ref_v2
	cbnz	w0, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x20
	bl	__
	ldr	w8, [x19, #8]
	str	x8, [sp]
	bl	_die
	b	LBB0_18
LBB0_21:
	ldr	x8, [x19]
Lloh22:
	adrp	x9, _PACKET_READ_FLUSH@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PACKET_READ_FLUSH@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.22:
Lloh25:
	adrp	x0, l_.str.10@PAGE
Lloh26:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	__
	bl	_die
LBB0_23:
	ldr	x0, [sp, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ls-refs"

l_.str.1:                               ; @.str.1
	.asciz	"command=ls-refs\n"

l_.str.2:                               ; @.str.2
	.asciz	"agent"

l_.str.3:                               ; @.str.3
	.asciz	"agent=%s"

l_.str.4:                               ; @.str.4
	.asciz	"server-option"

l_.str.5:                               ; @.str.5
	.asciz	"server-option=%s"

l_.str.6:                               ; @.str.6
	.asciz	"peel\n"

l_.str.7:                               ; @.str.7
	.asciz	"symrefs\n"

l_.str.8:                               ; @.str.8
	.asciz	"ref-prefix %s\n"

	.comm	_PACKET_READ_NORMAL,8,3         ; @PACKET_READ_NORMAL
l_.str.9:                               ; @.str.9
	.asciz	"invalid ls-refs response: %s"

	.comm	_PACKET_READ_FLUSH,8,3          ; @PACKET_READ_FLUSH
l_.str.10:                              ; @.str.10
	.asciz	"expected flush after ref listing"

.subsections_via_symbols
