	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_fillbuf
_http_fillbuf:                          ## @http_fillbuf
	.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
	cmpq	$0, 56(%rdi)
	je	LBB0_2
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_3
LBB0_2:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	cmpl	$0, (%rdi)
	je	LBB0_4
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rsi, %r15
	cmpq	$0, 8(%r14)
	je	LBB0_14
## %bb.5:
	movq	32(%r14), %rax
	testq	%rax, %rax
	je	LBB0_17
LBB0_6:
	cmpq	%r15, %rax
	cmovbq	%rax, %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_http_growbuf
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.7:
	movl	40(%r14), %edi
	movq	16(%r14), %rsi
	movl	%r15d, %edx
	callq	_fetch_read
	cmpl	$-1, %eax
	je	LBB0_20
## %bb.8:
	movl	%eax, %ebx
	movq	$0, 48(%r14)
	movl	%eax, 24(%r14)
	cltq
	subq	%rax, 32(%r14)
	jne	LBB0_3
## %bb.9:
	movl	40(%r14), %edi
	leaq	-25(%rbp), %rsi
	movl	$1, %edx
	callq	_fetch_read
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.10:
	cmpb	$13, -25(%rbp)
	jne	LBB0_1
## %bb.11:
	movl	40(%r14), %edi
	leaq	-25(%rbp), %rsi
	movl	$1, %edx
	callq	_fetch_read
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.12:
	cmpb	$10, -25(%rbp)
	movl	$-1, %ebx
	jne	LBB0_3
## %bb.13:
	movl	24(%r14), %ebx
	jmp	LBB0_3
LBB0_14:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_http_growbuf
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.15:
	movl	40(%r14), %edi
	movq	16(%r14), %rsi
	movl	%r15d, %edx
	callq	_fetch_read
	cmpl	$-1, %eax
	je	LBB0_20
## %bb.16:
	movl	%eax, %ebx
	movl	%eax, 24(%r14)
	movq	$0, 48(%r14)
	jmp	LBB0_3
LBB0_17:
	movq	%r14, %rdi
	callq	_http_new_chunk
	cmpl	$-1, %eax
	je	LBB0_23
## %bb.18:
	testl	%eax, %eax
	jne	LBB0_25
## %bb.19:
	movl	$1, (%r14)
	jmp	LBB0_3
LBB0_20:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_23:
	movq	_EPROTO@GOTPCREL(%rip), %rax
LBB0_24:
	movq	(%rax), %rax
	movq	%rax, 56(%r14)
	movl	$-1, %ebx
	jmp	LBB0_3
LBB0_25:
	movq	32(%r14), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EPROTO,8,3                     ## @EPROTO
	.no_dead_strip	_http_fillbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_fillbuf
_http_fillbuf:                          ; @http_fillbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0, #56]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #-1
	b	LBB0_4
LBB0_2:
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.3:
	mov	w0, #0
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	mov	x20, x1
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.6:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_18
LBB0_7:
	cmp	x8, x20
	csel	x20, x8, x20, lo
	mov	x0, x19
	mov	x1, x20
	bl	_http_growbuf
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.8:
	ldr	w0, [x19, #40]
	ldr	x1, [x19, #16]
	mov	x2, x20
	bl	_fetch_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.9:
	str	xzr, [x19, #48]
	str	w0, [x19, #24]
	sxtw	x8, w0
	ldr	x9, [x19, #32]
	subs	x8, x9, x8
	str	x8, [x19, #32]
	b.ne	LBB0_4
; %bb.10:
	ldr	w0, [x19, #40]
	add	x1, sp, #15
	mov	w2, #1
	bl	_fetch_read
	mov	x8, x0
	mov	w0, #-1
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.11:
	ldrb	w8, [sp, #15]
	cmp	w8, #13
	b.ne	LBB0_4
; %bb.12:
	ldr	w0, [x19, #40]
	add	x1, sp, #15
	mov	w2, #1
	bl	_fetch_read
	mov	x8, x0
	mov	w0, #-1
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.13:
	ldrb	w8, [sp, #15]
	cmp	w8, #10
	b.ne	LBB0_4
; %bb.14:
	ldr	w0, [x19, #24]
	b	LBB0_4
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_http_growbuf
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.16:
	ldr	w0, [x19, #40]
	ldr	x1, [x19, #16]
	mov	x2, x20
	bl	_fetch_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.17:
	str	w0, [x19, #24]
	str	xzr, [x19, #48]
	b	LBB0_4
LBB0_18:
	mov	x0, x19
	bl	_http_new_chunk
	cmn	w0, #1
	b.eq	LBB0_22
; %bb.19:
	cbnz	w0, LBB0_24
; %bb.20:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_4
LBB0_21:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh2:
	adrp	x8, _EPROTO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
LBB0_23:
	ldr	x8, [x8]
	str	x8, [x19, #56]
	mov	w0, #-1
	b	LBB0_4
LBB0_24:
	ldr	x8, [x19, #32]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EPROTO,8,3                     ; @EPROTO
	.no_dead_strip	_http_fillbuf
.subsections_via_symbols
