	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_chunked_segment
_http_chunked_segment:                  ## @http_chunked_segment
	.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
	movl	32(%rdi), %edi
	callq	_sldns_buffer_limit
	subq	(%rbx), %rax
	movq	8(%rbx), %rsi
	movq	%rsi, %rcx
	subq	%rax, %rcx
	jbe	LBB0_1
## %bb.3:
	movq	%rcx, 8(%rbx)
	movl	32(%rbx), %edi
	callq	_sldns_buffer_capacity
	movq	%rax, %r14
	movl	32(%rbx), %edi
	callq	_sldns_buffer_limit
	subq	%rax, %r14
	cmpq	8(%rbx), %r14
	jae	LBB0_5
## %bb.4:
	cmpq	$2048, %r14                     ## imm = 0x800
	jae	LBB0_5
## %bb.6:
	movq	$0, (%rbx)
	movl	32(%rbx), %edi
	xorl	%esi, %esi
	callq	_sldns_buffer_set_position
	movq	24(%rbx), %rdi
	callq	_fptr_whitelist_comm_point
	movl	%eax, %edi
	callq	_fptr_ok
	movl	20(%rbx), %esi
	movq	_NETEVENT_NOERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	*24(%rbx)
	jmp	LBB0_7
LBB0_1:
	movq	$0, (%rbx)
	movl	32(%rbx), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_sldns_buffer_skip
	movl	36(%rbx), %edi
	callq	_sldns_buffer_clear
	movl	32(%rbx), %edi
	movl	36(%rbx), %r14d
	callq	_sldns_buffer_current
	movl	%eax, %r15d
	movl	32(%rbx), %edi
	callq	_sldns_buffer_remaining
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_sldns_buffer_write
	movl	36(%rbx), %edi
	callq	_sldns_buffer_flip
	movl	32(%rbx), %edi
	callq	_sldns_buffer_position
	movq	%rax, %r14
	movl	32(%rbx), %edi
	xorl	%esi, %esi
	callq	_sldns_buffer_set_position
	movl	32(%rbx), %edi
	movq	%r14, %rsi
	callq	_sldns_buffer_set_limit
	movl	40(%rbx), %eax
	movl	%eax, -32(%rbp)
	movq	24(%rbx), %rdi
	callq	_fptr_whitelist_comm_point
	movl	%eax, %edi
	callq	_fptr_ok
	movl	20(%rbx), %esi
	movq	_NETEVENT_NOERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	callq	*24(%rbx)
	cmpl	$0, -32(%rbp)
	je	LBB0_7
## %bb.2:
	movl	32(%rbx), %edi
	callq	_sldns_buffer_clear
	movl	32(%rbx), %r14d
	movl	36(%rbx), %edi
	callq	_sldns_buffer_begin
	movl	%eax, %r15d
	movl	36(%rbx), %edi
	callq	_sldns_buffer_remaining
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_sldns_buffer_write
	movl	32(%rbx), %edi
	callq	_sldns_buffer_flip
	movl	$3, 16(%rbx)
	movl	$2, %eax
	jmp	LBB0_8
LBB0_5:
	movl	32(%rbx), %edi
	callq	_sldns_buffer_limit
	movq	%rax, %r14
	movl	32(%rbx), %edi
	callq	_sldns_buffer_clear
	movl	32(%rbx), %edi
	movq	%r14, %rsi
	callq	_sldns_buffer_set_position
	movq	%r14, (%rbx)
LBB0_7:
	movl	$1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETEVENT_NOERROR,4,2           ## @NETEVENT_NOERROR
	.no_dead_strip	_http_chunked_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_chunked_segment
_http_chunked_segment:                  ; @http_chunked_segment
	.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
	ldr	w0, [x0, #32]
	bl	_sldns_buffer_limit
	ldp	x8, x1, [x19]
	sub	x8, x0, x8
	subs	x8, x1, x8
	b.ls	LBB0_4
; %bb.1:
	str	x8, [x19, #8]
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_capacity
	mov	x20, x0
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_limit
	ldr	x9, [x19, #8]
	sub	x8, x20, x0
	cmp	x8, x9
	b.hs	LBB0_6
; %bb.2:
	cmp	x8, #2048
	b.hs	LBB0_6
; %bb.3:
	str	xzr, [x19]
	ldr	w0, [x19, #32]
	mov	x1, #0
	bl	_sldns_buffer_set_position
	ldr	x0, [x19, #24]
	bl	_fptr_whitelist_comm_point
	bl	_fptr_ok
	ldr	x8, [x19, #24]
	ldr	w1, [x19, #20]
Lloh0:
	adrp	x9, _NETEVENT_NOERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NETEVENT_NOERROR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	x0, x19
	mov	x3, #0
	blr	x8
	b	LBB0_7
LBB0_4:
	str	xzr, [x19]
	ldr	w0, [x19, #32]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_sldns_buffer_skip
	ldr	w0, [x19, #36]
	bl	_sldns_buffer_clear
	ldp	w0, w20, [x19, #32]
	bl	_sldns_buffer_current
	mov	x21, x0
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_remaining
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_sldns_buffer_write
	ldr	w0, [x19, #36]
	bl	_sldns_buffer_flip
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_position
	mov	x20, x0
	ldr	w0, [x19, #32]
	mov	x1, #0
	bl	_sldns_buffer_set_position
	ldr	w0, [x19, #32]
	mov	x1, x20
	bl	_sldns_buffer_set_limit
	ldr	w8, [x19, #40]
	str	w8, [sp, #8]
	ldr	x0, [x19, #24]
	bl	_fptr_whitelist_comm_point
	bl	_fptr_ok
	ldr	x8, [x19, #24]
	ldr	w1, [x19, #20]
Lloh3:
	adrp	x9, _NETEVENT_NOERROR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NETEVENT_NOERROR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x9]
	add	x3, sp, #8
	mov	x0, x19
	blr	x8
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_7
; %bb.5:
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_clear
	ldp	w20, w0, [x19, #32]
	bl	_sldns_buffer_begin
	mov	x21, x0
	ldr	w0, [x19, #36]
	bl	_sldns_buffer_remaining
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_sldns_buffer_write
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_flip
	mov	w8, #3
	str	w8, [x19, #16]
	mov	w0, #2
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_limit
	mov	x20, x0
	ldr	w0, [x19, #32]
	bl	_sldns_buffer_clear
	ldr	w0, [x19, #32]
	mov	x1, x20
	bl	_sldns_buffer_set_position
	str	x20, [x19]
LBB0_7:
	mov	w0, #1
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NETEVENT_NOERROR,4,2           ; @NETEVENT_NOERROR
	.no_dead_strip	_http_chunked_segment
.subsections_via_symbols
