	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_serf_linebuf_fetch             ## -- Begin function serf_linebuf_fetch
	.p2align	4, 0x90
_serf_linebuf_fetch:                    ## @serf_linebuf_fetch
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_SERF_LINEBUF_READY@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movq	_SERF_LINEBUF_EMPTY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	$0, 8(%rbx)
LBB0_2:
	leaq	-44(%rbp), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	movq	%rax, (%rbx)
	testq	%r14, %r14
	jne	LBB0_25
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	cmpq	(%r12), %rax
	je	LBB0_21
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SERF_LINEBUF_CRLF_SPLIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdx
	callq	_serf_bucket_peek
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_SERF_BUCKET_READ_ERROR
	testq	%rax, %rax
	jne	LBB0_25
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -44(%rbp)
	jle	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax
	cmpb	$10, (%rax)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rcx
	callq	_serf_bucket_read
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%r13, %r8
	callq	_serf_bucket_readline
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_SERF_BUCKET_READ_ERROR
	testq	%rax, %rax
	jne	LBB0_25
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_APR_STATUS_IS_EOF
	movl	-44(%rbp), %edx
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%edx, %edx
	je	LBB0_25
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%edx, %rax
	movq	8(%rbx), %rdi
	addq	%rdi, %rax
	cmpq	$9, %rax
	jae	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-64(%rbp), %eax
	movq	_SERF_NEWLINE_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_SERF_LINEBUF_PARTIAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_SERF_NEWLINE_CRLF_SPLIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_SERF_LINEBUF_CRLF_SPLIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	decl	%edx
	movl	%edx, -44(%rbp)
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	movq	_SERF_NEWLINE_CRLF@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	sete	%cl
	notl	%ecx
	addl	%ecx, %edx
	movl	%edx, -44(%rbp)
	movq	(%r12), %rax
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, (%rbx)
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	shlq	$2, %rdi
	addq	16(%rbx), %rdi
	movq	-56(%rbp), %rsi
	callq	_memcpy
	movslq	-44(%rbp), %rax
	addq	%rax, 8(%rbx)
	testq	%r14, %r14
	je	LBB0_20
	jmp	LBB0_25
LBB0_21:
	xorl	%r14d, %r14d
	jmp	LBB0_25
LBB0_22:
	movq	_APR_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_23:
	movq	_APR_EGENERAL@GOTPCREL(%rip), %rax
LBB0_24:
	movq	(%rax), %r14
LBB0_25:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERF_LINEBUF_READY,8,3         ## @SERF_LINEBUF_READY
	.comm	_SERF_LINEBUF_EMPTY,8,3         ## @SERF_LINEBUF_EMPTY
	.comm	_SERF_LINEBUF_CRLF_SPLIT,8,3    ## @SERF_LINEBUF_CRLF_SPLIT
	.comm	_APR_EAGAIN,8,3                 ## @APR_EAGAIN
	.comm	_APR_EGENERAL,8,3               ## @APR_EGENERAL
	.comm	_SERF_NEWLINE_NONE,4,2          ## @SERF_NEWLINE_NONE
	.comm	_SERF_LINEBUF_PARTIAL,8,3       ## @SERF_LINEBUF_PARTIAL
	.comm	_SERF_NEWLINE_CRLF_SPLIT,4,2    ## @SERF_NEWLINE_CRLF_SPLIT
	.comm	_SERF_NEWLINE_CRLF,4,2          ## @SERF_NEWLINE_CRLF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_serf_linebuf_fetch             ; -- Begin function serf_linebuf_fetch
	.p2align	2
_serf_linebuf_fetch:                    ; @serf_linebuf_fetch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _SERF_LINEBUF_READY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SERF_LINEBUF_READY@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _SERF_LINEBUF_EMPTY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SERF_LINEBUF_EMPTY@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stp	x8, xzr, [x21]
LBB0_2:
Lloh5:
	adrp	x24, _SERF_LINEBUF_CRLF_SPLIT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SERF_LINEBUF_CRLF_SPLIT@GOTPAGEOFF]
Lloh7:
	adrp	x25, _SERF_NEWLINE_NONE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SERF_NEWLINE_NONE@GOTPAGEOFF]
Lloh9:
	adrp	x26, _SERF_LINEBUF_PARTIAL@GOTPAGE
Lloh10:
	ldr	x26, [x26, _SERF_LINEBUF_PARTIAL@GOTPAGEOFF]
Lloh11:
	adrp	x27, _SERF_NEWLINE_CRLF_SPLIT@GOTPAGE
Lloh12:
	ldr	x27, [x27, _SERF_NEWLINE_CRLF_SPLIT@GOTPAGEOFF]
Lloh13:
	adrp	x28, _SERF_NEWLINE_CRLF@GOTPAGE
Lloh14:
	ldr	x28, [x28, _SERF_NEWLINE_CRLF@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x23]
	str	x8, [x21]
	cbnz	x22, LBB0_25
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x20
	bl	_serf_bucket_peek
	mov	x22, x0
	bl	_SERF_BUCKET_READ_ERROR
	cbnz	x0, LBB0_25
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #4]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	cmp	w8, #10
	b.ne	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x20
	mov	w1, #1
	bl	_serf_bucket_read
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, sp
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x20
	mov	x1, x19
	bl	_serf_bucket_readline
	mov	x22, x0
	bl	_SERF_BUCKET_READ_ERROR
	cbnz	x0, LBB0_25
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_APR_STATUS_IS_EOF
	ldr	w2, [sp, #4]
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	cbz	w2, LBB0_25
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x9, w2
	ldr	x8, [x21, #8]
	add	x9, x8, x9
	cmp	x9, #9
	b.hs	LBB0_23
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [sp]
	ldr	w10, [x25]
	cmp	w9, w10
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x26]
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x27]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x24]
	str	x9, [x21]
	sub	w2, w2, #1
	str	w2, [sp, #4]
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x28]
	cmp	w9, w10
	mov	w9, #-2
	cinc	w9, w9, ne
	add	w2, w9, w2
	str	w2, [sp, #4]
	ldr	x9, [x23]
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x9, [x21]
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x21, #16]
	add	x0, x9, x8, lsl #2
	ldr	x1, [sp, #8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	ldrsw	x8, [sp, #4]
	ldr	x9, [x21, #8]
	add	x8, x9, x8
	str	x8, [x21, #8]
	cbz	x22, LBB0_4
	b	LBB0_25
LBB0_21:
	mov	x22, #0
	b	LBB0_25
LBB0_22:
Lloh15:
	adrp	x8, _APR_EAGAIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _APR_EAGAIN@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:
Lloh17:
	adrp	x8, _APR_EGENERAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _APR_EGENERAL@GOTPAGEOFF]
LBB0_24:
	ldr	x22, [x8]
LBB0_25:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SERF_LINEBUF_READY,8,3         ; @SERF_LINEBUF_READY
	.comm	_SERF_LINEBUF_EMPTY,8,3         ; @SERF_LINEBUF_EMPTY
	.comm	_SERF_LINEBUF_CRLF_SPLIT,8,3    ; @SERF_LINEBUF_CRLF_SPLIT
	.comm	_APR_EAGAIN,8,3                 ; @APR_EAGAIN
	.comm	_APR_EGENERAL,8,3               ; @APR_EGENERAL
	.comm	_SERF_NEWLINE_NONE,4,2          ; @SERF_NEWLINE_NONE
	.comm	_SERF_LINEBUF_PARTIAL,8,3       ; @SERF_LINEBUF_PARTIAL
	.comm	_SERF_NEWLINE_CRLF_SPLIT,4,2    ; @SERF_NEWLINE_CRLF_SPLIT
	.comm	_SERF_NEWLINE_CRLF,4,2          ; @SERF_NEWLINE_CRLF
.subsections_via_symbols
