	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_chunked_zero_terminate
_read_chunked_zero_terminate:           ## @read_chunked_zero_terminate
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_do_chunked_read
	movq	$0, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	leaq	-48(%rbp), %rsi
	movq	%rax, %rdi
	callq	_BIO_get_mem_data
	movq	%rax, %r12
	movq	_verb@GOTPCREL(%rip), %r13
	cmpl	$2, (%r13)
	jl	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_3:
	testq	%r12, %r12
	je	LBB0_10
## %bb.4:
	cmpq	$0, -48(%rbp)
	je	LBB0_10
## %bb.5:
	movq	%r12, %rax
	decq	%rax
	movq	%rax, (%r14)
	movq	%r12, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %rbx
	movq	-48(%rbp), %rsi
	movq	%rax, %rdi
	movq	%r12, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_BIO_free
	jmp	LBB0_14
LBB0_10:
	cmpl	$0, (%r13)
	je	LBB0_13
## %bb.11:
	leaq	L_str.4(%rip), %rdi
	jmp	LBB0_12
LBB0_7:
	movq	_verb@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_13
## %bb.8:
	leaq	L_str(%rip), %rdi
LBB0_12:
	callq	_puts
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verb,4,2                       ## @verb
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"chunked data is %d\n"

L_str:                                  ## @str
	.asciz	"could not read from https"

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

	.no_dead_strip	_read_chunked_zero_terminate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_chunked_zero_terminate
_read_chunked_zero_terminate:           ; @read_chunked_zero_terminate
	.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	x20, x1
	bl	_do_chunked_read
	str	xzr, [sp, #8]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	add	x1, sp, #8
	bl	_BIO_get_mem_data
	mov	x21, x0
Lloh0:
	adrp	x22, _verb@GOTPAGE
Lloh1:
	ldr	x22, [x22, _verb@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.2:
	str	x21, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_3:
	cbz	x21, LBB0_7
; %bb.4:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_7
; %bb.5:
	sub	x8, x21, #1
	str	x8, [x20]
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.6:
	mov	x20, x0
	ldr	x1, [sp, #8]
	mov	x2, x21
	bl	_memcpy
	mov	x0, x19
	bl	_BIO_free
	b	LBB0_13
LBB0_7:
	ldr	w8, [x22]
	cbz	w8, LBB0_12
; %bb.8:
Lloh4:
	adrp	x0, l_str.4@PAGE
Lloh5:
	add	x0, x0, l_str.4@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh6:
	adrp	x8, _verb@GOTPAGE
Lloh7:
	ldr	x8, [x8, _verb@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.10:
Lloh9:
	adrp	x0, l_str@PAGE
Lloh10:
	add	x0, x0, l_str@PAGEOFF
LBB0_11:
	bl	_puts
LBB0_12:
	mov	x20, #0
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_verb,4,2                       ; @verb
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"chunked data is %d\n"

l_str:                                  ; @str
	.asciz	"could not read from https"

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

	.no_dead_strip	_read_chunked_zero_terminate
.subsections_via_symbols
