	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_readfn
_http_readfn:                           ## @http_readfn
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	je	LBB0_2
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%rdi, %r13
	xorl	%ebx, %ebx
	cmpq	$0, 32(%rdi)
	jne	LBB0_10
## %bb.3:
	movl	%edx, %r15d
	movq	%rsi, %r14
	movl	8(%r13), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.4:
	movq	16(%r13), %rax
	movq	24(%r13), %r12
	cmpq	%r12, %rax
	jne	LBB0_8
LBB0_5:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_http_fillbuf
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	je	LBB0_10
## %bb.7:
	movq	24(%r13), %r12
	movq	16(%r13), %rax
	movl	8(%r13), %esi
	addq	$16, %r13
	jmp	LBB0_9
LBB0_8:
	addq	$16, %r13
LBB0_9:
	subl	%eax, %r12d
	cmpl	%r15d, %r12d
	cmovgel	%r15d, %r12d
	addl	%eax, %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	%r12d, %rax
	addq	%rax, (%r13)
	movl	%r12d, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%r13), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.12:
	movq	$0, (%r13)
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.no_dead_strip	_http_readfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_readfn
_http_readfn:                           ; @http_readfn
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w20, #-1
	b	LBB0_10
LBB0_2:
	mov	x21, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
LBB0_3:
	mov	w20, #0
	b	LBB0_10
LBB0_4:
	mov	x20, x2
	mov	x19, x1
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_6
; %bb.5:
	mov	x22, x21
	ldp	x9, x10, [x22, #16]!
	cmp	x9, x10
	b.ne	LBB0_9
LBB0_6:
	mov	x0, x21
	mov	x1, x20
	bl	_http_fillbuf
	tbnz	w0, #31, LBB0_11
; %bb.7:
	cbz	w0, LBB0_3
; %bb.8:
	ldp	x9, x10, [x21, #16]!
	ldur	w8, [x21, #-8]
	mov	x22, x21
LBB0_9:
	sub	w10, w10, w9
	cmp	w10, w20
	csel	w20, w10, w20, lt
	add	w1, w8, w9
	mov	x0, x19
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [x22]
	add	x8, x8, w20, sxtw
	str	x8, [x22]
LBB0_10:
	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
LBB0_11:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh2:
	str	x9, [x8]
Lloh3:
	adrp	x8, _EINTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_1
; %bb.12:
	str	xzr, [x21]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.no_dead_strip	_http_readfn
.subsections_via_symbols
