	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_chunked_read
_do_chunked_read:                       ## @do_chunked_read
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_BIO_s_mem
	movl	%eax, %edi
	callq	_BIO_new
	movq	%rax, %r14
	movq	_verb@GOTPCREL(%rip), %r13
	cmpl	$3, (%r13)
	jl	LBB0_2
## %bb.1:
	leaq	L_str.8(%rip), %rdi
	callq	_puts
LBB0_2:
	testq	%r14, %r14
	je	LBB0_10
## %bb.3:
	leaq	-1072(%rbp), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read_ssl_line
	testq	%rax, %rax
	je	LBB0_28
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, (%r13)
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_printf
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	-1088(%rbp), %rsi
	callq	_parse_chunk_header
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, (%r13)
	jl	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-1088(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-1088(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_read_data_chunk
	testq	%rax, %rax
	je	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r12
	movl	-1088(%rbp), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_BIO_write
	testq	%rax, %rax
	jle	LBB0_24
## %bb.27:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_free
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read_ssl_line
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_28
LBB0_10:
	cmpl	$0, (%r13)
	je	LBB0_29
## %bb.11:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
	jmp	LBB0_29
LBB0_8:
	movq	%r14, %rdi
	callq	_BIO_free
	cmpl	$3, (%r13)
	jl	LBB0_29
## %bb.9:
	leaq	L_str.5(%rip), %rdi
	callq	_puts
	jmp	LBB0_29
LBB0_16:
	movb	$0, -1073(%rbp)
	leaq	-1072(%rbp), %r15
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read_ssl_line
	testq	%rax, %rax
	je	LBB0_28
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r15, %rdi
	callq	_strlen
	testq	%rax, %rax
	jg	LBB0_17
## %bb.19:
	leaq	-1073(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_BIO_write
	testq	%rax, %rax
	jg	LBB0_30
## %bb.20:
	cmpl	$0, (%r13)
	je	LBB0_28
## %bb.21:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
	jmp	LBB0_28
LBB0_24:
	cmpl	$0, (%r13)
	je	LBB0_26
## %bb.25:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
LBB0_26:
	movq	%r12, %rdi
	callq	_free
LBB0_28:
	movq	%r14, %rdi
	callq	_BIO_free
LBB0_29:
	xorl	%r14d, %r14d
LBB0_30:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_32
## %bb.31:
	movq	%r14, %rax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_verb,4,2                       ## @verb
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"chunk header: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"chunk len: %d\n"

L_str.5:                                ## @str.5
	.asciz	"could not parse chunk header"

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

L_str.8:                                ## @str.8
	.asciz	"do_chunked_read"

	.no_dead_strip	_do_chunked_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_chunked_read
_do_chunked_read:                       ; @do_chunked_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #1056
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_BIO_s_mem
	bl	_BIO_new
	mov	x19, x0
Lloh3:
	adrp	x24, _verb@GOTPAGE
Lloh4:
	ldr	x24, [x24, _verb@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_str.8@PAGE
Lloh6:
	add	x0, x0, l_str.8@PAGEOFF
	bl	_puts
LBB0_2:
	cbz	x19, LBB0_14
; %bb.3:
	add	x25, sp, #24
Lloh7:
	adrp	x21, l_.str.2@PAGE
Lloh8:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh9:
	adrp	x22, l_.str.4@PAGE
Lloh10:
	add	x22, x22, l_.str.4@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #1024
	bl	_read_ssl_line
	cbz	x0, LBB0_27
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x25, [sp]
	mov	x0, x21
	bl	_printf
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_parse_chunk_header
	cbz	w0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #16]
	str	x8, [sp]
	mov	x0, x22
	bl	_printf
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_read_data_chunk
	cbz	x0, LBB0_27
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	ldr	w2, [sp, #16]
	mov	x0, x19
	mov	x1, x23
	bl	_BIO_write
	cmp	x0, #0
	b.le	LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_free
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #1024
	bl	_read_ssl_line
	cbnz	x0, LBB0_4
	b	LBB0_27
LBB0_14:
	ldr	w8, [x24]
	cbz	w8, LBB0_28
; %bb.15:
Lloh11:
	adrp	x0, l_str.7@PAGE
Lloh12:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
	b	LBB0_28
LBB0_16:
	mov	x0, x19
	bl	_BIO_free
	ldr	w8, [x24]
	cmp	w8, #3
	b.lt	LBB0_28
; %bb.17:
Lloh13:
	adrp	x0, l_str.5@PAGE
Lloh14:
	add	x0, x0, l_str.5@PAGEOFF
	bl	_puts
	b	LBB0_28
LBB0_18:
	strb	wzr, [sp, #15]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #1024
	bl	_read_ssl_line
	cbz	x0, LBB0_27
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x0, sp, #24
	bl	_strlen
	cmp	x0, #0
	b.gt	LBB0_19
; %bb.21:
	add	x1, sp, #15
	mov	x0, x19
	mov	w2, #1
	bl	_BIO_write
	cmp	x0, #0
	b.gt	LBB0_29
; %bb.22:
	ldr	w8, [x24]
	cbz	w8, LBB0_27
; %bb.23:
Lloh15:
	adrp	x0, l_str.7@PAGE
Lloh16:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
	b	LBB0_27
LBB0_24:
	ldr	w8, [x24]
	cbz	w8, LBB0_26
; %bb.25:
Lloh17:
	adrp	x0, l_str.7@PAGE
Lloh18:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
LBB0_26:
	mov	x0, x23
	bl	_free
LBB0_27:
	mov	x0, x19
	bl	_BIO_free
LBB0_28:
	mov	x19, #0
LBB0_29:
	ldur	x8, [x29, #-72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.30:
	mov	x0, x19
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_verb,4,2                       ; @verb
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"chunk header: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"chunk len: %d\n"

l_str.5:                                ; @str.5
	.asciz	"could not parse chunk header"

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

l_str.8:                                ; @str.8
	.asciz	"do_chunked_read"

	.no_dead_strip	_do_chunked_read
.subsections_via_symbols
