	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serf_response_body_read
_serf_response_body_read:               ## @serf_response_body_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	(%rdi), %r15
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_SERF_READ_ALL_AVAIL@GOTPCREL(%rip), %rcx
	movq	_REQUESTED_MAX@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	cmpq	%rdi, %rax
	cmovlq	%rax, %rdi
	cmpq	%rsi, %rax
	movq	%rsi, %rax
	cmovlq	%rdi, %rax
	cmpq	%rsi, (%rcx)
	cmoveq	%rdi, %rax
	movl	8(%r15), %edi
	movq	%rax, %rsi
	movq	%r14, %rcx
	callq	_serf_bucket_read
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_SERF_BUCKET_READ_ERROR
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rax
	subq	%rax, (%r15)
LBB0_4:
	movl	%ebx, %edi
	callq	_APR_STATUS_IS_EOF
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	cmpq	$0, (%r15)
	jle	LBB0_8
## %bb.6:
	movq	_SERF_ERROR_TRUNCATED_HTTP_RESPONSE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	$0, (%r14)
	movq	_APR_EOF@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APR_EOF,4,2                    ## @APR_EOF
	.comm	_SERF_READ_ALL_AVAIL,8,3        ## @SERF_READ_ALL_AVAIL
	.comm	_REQUESTED_MAX,8,3              ## @REQUESTED_MAX
	.comm	_SERF_ERROR_TRUNCATED_HTTP_RESPONSE,4,2 ## @SERF_ERROR_TRUNCATED_HTTP_RESPONSE
	.no_dead_strip	_serf_response_body_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serf_response_body_read
_serf_response_body_read:               ; @serf_response_body_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x3
	ldr	x21, [x0]
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _SERF_READ_ALL_AVAIL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SERF_READ_ALL_AVAIL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _REQUESTED_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _REQUESTED_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	csel	x10, x8, x10, lt
	cmp	x8, x1
	ccmp	x9, x1, #4, ge
	csel	x1, x10, x1, eq
	ldr	w0, [x21, #8]
	mov	x3, x19
	bl	_serf_bucket_read
	mov	x20, x0
	bl	_SERF_BUCKET_READ_ERROR
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x8, [x19]
	ldr	x9, [x21]
	sub	x8, x9, x8
	str	x8, [x21]
LBB0_3:
	mov	x0, x20
	bl	_APR_STATUS_IS_EOF
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _SERF_ERROR_TRUNCATED_HTTP_RESPONSE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SERF_ERROR_TRUNCATED_HTTP_RESPONSE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w20, w9, w20, gt
	b	LBB0_6
LBB0_5:
	str	xzr, [x19]
Lloh9:
	adrp	x8, _APR_EOF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _APR_EOF@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_APR_EOF,4,2                    ; @APR_EOF
	.comm	_SERF_READ_ALL_AVAIL,8,3        ; @SERF_READ_ALL_AVAIL
	.comm	_REQUESTED_MAX,8,3              ; @REQUESTED_MAX
	.comm	_SERF_ERROR_TRUNCATED_HTTP_RESPONSE,4,2 ; @SERF_ERROR_TRUNCATED_HTTP_RESPONSE
	.no_dead_strip	_serf_response_body_read
.subsections_via_symbols
