	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_http_result
_read_http_result:                      ## @read_http_result
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -32(%rbp)
	leaq	-32(%rbp), %rsi
	callq	_read_http_headers
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	-32(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_read_data_chunk
	jmp	LBB0_5
LBB0_4:
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_read_chunked_zero_terminate
LBB0_5:
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	_verb@GOTPCREL(%rip), %r15
	cmpl	$4, (%r15)
	jl	LBB0_8
## %bb.7:
	movl	-32(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_print_data
LBB0_8:
	xorl	%eax, %eax
	callq	_BIO_s_mem
	movl	%eax, %edi
	callq	_BIO_new
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	%rax, %rbx
	movl	-32(%rbp), %edx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_BIO_write
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_11
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	cmpl	$0, (%r15)
	je	LBB0_14
## %bb.13:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_14:
	movq	%r14, %rdi
	callq	_free
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_verb,4,2                       ## @verb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read data"

L_str:                                  ## @str
	.asciz	"out of memory"

	.no_dead_strip	_read_http_result
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_http_result
_read_http_result:                      ; @read_http_result
	.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, x0
	str	xzr, [sp, #8]
	add	x1, sp, #8
	bl	_read_http_headers
	cbz	w0, LBB0_8
; %bb.1:
	ldr	x1, [sp, #8]
	cbz	x1, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_read_data_chunk
	mov	x19, x0
	cbz	x0, LBB0_8
LBB0_3:
Lloh0:
	adrp	x21, _verb@GOTPAGE
Lloh1:
	ldr	x21, [x21, _verb@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #4
	b.lt	LBB0_5
; %bb.4:
	ldr	w2, [sp, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_print_data
LBB0_5:
	bl	_BIO_s_mem
	bl	_BIO_new
	cbz	x0, LBB0_10
; %bb.6:
	mov	x20, x0
	ldr	w2, [sp, #8]
	mov	x1, x19
	bl	_BIO_write
	mov	x0, x19
	bl	_free
	b	LBB0_9
LBB0_7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_read_chunked_zero_terminate
	mov	x19, x0
	cbnz	x0, LBB0_3
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x20
	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
LBB0_10:
	ldr	w8, [x21]
	cbz	w8, LBB0_12
; %bb.11:
Lloh4:
	adrp	x0, l_str@PAGE
Lloh5:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_12:
	mov	x0, x19
	bl	_free
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_verb,4,2                       ; @verb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read data"

l_str:                                  ; @str
	.asciz	"out of memory"

	.no_dead_strip	_read_http_result
.subsections_via_symbols
