	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fetch_alternates
_fetch_alternates:                      ## @fetch_alternates
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r13
	cmpl	$1, (%r13)
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	$0, (%r13)
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_fprintf
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_strbuf_addf
	xorl	%eax, %eax
	callq	_get_active_slot
	movq	%rax, %rbx
	movq	_process_alternates_response@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r12, -64(%rbp)
	leaq	-104(%rbp), %rax
	movq	%rax, 8(%rbx)
	movl	(%rbx), %edi
	movq	_CURLOPT_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %r12
	movq	%r12, %rdx
	callq	_curl_easy_setopt
	movl	(%rbx), %edi
	movq	_CURLOPT_WRITEFUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_fwrite_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_curl_easy_setopt
	movl	(%rbx), %edi
	movq	_CURLOPT_URL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdx
	callq	_curl_easy_setopt
	movq	%r14, -104(%rbp)
	movq	%r15, -72(%rbp)
	movq	%r12, -80(%rbp)
	movl	$1, -96(%rbp)
	movq	%rbx, -88(%rbp)
	movq	%rbx, %rdi
	callq	_start_active_slot
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_run_active_slot
	jmp	LBB0_6
LBB0_5:
	movl	$-1, (%r13)
LBB0_6:
	leaq	-56(%rbp), %rdi
	callq	_strbuf_release
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
LBB0_7:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,8,3                ## @STRBUF_INIT
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Getting alternates list for %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s/objects/info/http-alternates"

	.comm	_process_alternates_response,4,2 ## @process_alternates_response
	.comm	_CURLOPT_FILE,4,2               ## @CURLOPT_FILE
	.comm	_CURLOPT_WRITEFUNCTION,4,2      ## @CURLOPT_WRITEFUNCTION
	.comm	_fwrite_buffer,8,3              ## @fwrite_buffer
	.comm	_CURLOPT_URL,4,2                ## @CURLOPT_URL
	.no_dead_strip	_fetch_alternates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fetch_alternates
_fetch_alternates:                      ; @fetch_alternates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, x8, [sp, #48]
	ldr	x22, [x0, #8]
	ldr	w8, [x22]
	cmp	w8, #1
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x21, x0
	str	wzr, [x22]
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_fprintf
LBB0_3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x23, sp, #48
	add	x0, sp, #48
	mov	x2, x19
	bl	_strbuf_addf
	bl	_get_active_slot
	mov	x20, x0
Lloh10:
	adrp	x8, _process_alternates_response@GOTPAGE
Lloh11:
	ldr	x8, [x8, _process_alternates_response@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	str	x21, [sp, #40]
	mov	x8, sp
	str	x8, [x0, #8]
	ldr	w0, [x0]
Lloh13:
	adrp	x8, _CURLOPT_FILE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CURLOPT_FILE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x21, sp, #56
	add	x2, sp, #56
	bl	_curl_easy_setopt
	ldr	w0, [x20]
Lloh16:
	adrp	x8, _CURLOPT_WRITEFUNCTION@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CURLOPT_WRITEFUNCTION@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _fwrite_buffer@GOTPAGE
Lloh20:
	ldr	x8, [x8, _fwrite_buffer@GOTPAGEOFF]
Lloh21:
	ldr	x2, [x8]
	bl	_curl_easy_setopt
	ldr	w0, [x20]
Lloh22:
	adrp	x8, _CURLOPT_URL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CURLOPT_URL@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	x2, [sp, #48]
	bl	_curl_easy_setopt
	str	x19, [sp]
	stp	x21, x23, [sp, #24]
	mov	w8, #1
	str	w8, [sp, #8]
	str	x20, [sp, #16]
	mov	x0, x20
	bl	_start_active_slot
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_run_active_slot
	b	LBB0_6
LBB0_5:
	mov	w8, #-1
	str	w8, [x22]
LBB0_6:
	add	x0, sp, #56
	bl	_strbuf_release
	add	x0, sp, #48
	bl	_strbuf_release
LBB0_7:
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,8,3                ; @STRBUF_INIT
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Getting alternates list for %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s/objects/info/http-alternates"

	.comm	_process_alternates_response,4,2 ; @process_alternates_response
	.comm	_CURLOPT_FILE,4,2               ; @CURLOPT_FILE
	.comm	_CURLOPT_WRITEFUNCTION,4,2      ; @CURLOPT_WRITEFUNCTION
	.comm	_fwrite_buffer,8,3              ; @fwrite_buffer
	.comm	_CURLOPT_URL,4,2                ; @CURLOPT_URL
	.no_dead_strip	_fetch_alternates
.subsections_via_symbols
