	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function on_read_core
_on_read_core:                          ## @on_read_core
	.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	%edi, %r12d
	movb	$1, %cl
	movq	_errno@GOTPCREL(%rip), %r15
	movq	_EINTR@GOTPCREL(%rip), %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_h2o_buffer_try_reserve
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	movq	%rdx, %r13
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	leal	1(%rcx), %edx
	cmpl	%ecx, %ebx
	cmovlel	%ebx, %edx
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_read
	movq	(%r15), %rcx
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpq	(%r14), %rcx
	je	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rcx
	addl	%eax, (%rcx)
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	je	LBB0_1
	jmp	LBB0_15
LBB0_8:
	movq	_h2o_socket_error_out_of_memory@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	jmp	LBB0_15
LBB0_9:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_14
## %bb.13:
	movq	_h2o_socket_error_io@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	jmp	LBB0_15
LBB0_11:
	testb	$1, -48(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_14
## %bb.12:
	movq	_h2o_socket_error_closed@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	jmp	LBB0_15
LBB0_14:
	xorl	%ecx, %ecx
LBB0_15:
	movq	%rcx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_h2o_socket_error_out_of_memory,8,3 ## @h2o_socket_error_out_of_memory
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_h2o_socket_error_io,8,3        ## @h2o_socket_error_io
	.comm	_h2o_socket_error_closed,8,3    ## @h2o_socket_error_closed
	.no_dead_strip	_on_read_core
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function on_read_core
_on_read_core:                          ; @on_read_core
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	mov	w24, #1
Lloh0:
	adrp	x23, _h2o_socket_error_out_of_memory@GOTPAGE
Lloh1:
	ldr	x23, [x23, _h2o_socket_error_out_of_memory@GOTPAGEOFF]
Lloh2:
	adrp	x25, _INT_MAX@GOTPAGE
Lloh3:
	ldr	x25, [x25, _INT_MAX@GOTPAGEOFF]
Lloh4:
	adrp	x26, _errno@GOTPAGE
Lloh5:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
Lloh6:
	adrp	x27, _EINTR@GOTPAGE
Lloh7:
	ldr	x27, [x27, _EINTR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x0, x19
	mov	w1, #4096
	bl	_h2o_buffer_try_reserve
	cbz	x1, LBB0_11
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x21, x0
	mov	x22, x1
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x25]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	cmp	w8, w21
	csinc	w2, w21, w8, ge
	mov	x0, x20
	mov	x1, x22
	bl	_read
	ldr	x8, [x26]
	ldr	x9, [x27]
	cmn	w0, #1
	ccmp	x8, x9, #0, eq
	b.eq	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w24, #0
	ldr	x8, [x19]
	ldr	w9, [x8]
	add	w9, w9, w0
	str	w9, [x8]
	cmp	w0, w21
	b.eq	LBB0_1
	b	LBB0_12
LBB0_7:
Lloh8:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.8:
Lloh11:
	adrp	x23, _h2o_socket_error_io@GOTPAGE
Lloh12:
	ldr	x23, [x23, _h2o_socket_error_io@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	tbz	w24, #0, LBB0_12
; %bb.10:
Lloh13:
	adrp	x23, _h2o_socket_error_closed@GOTPAGE
Lloh14:
	ldr	x23, [x23, _h2o_socket_error_closed@GOTPAGEOFF]
LBB0_11:
	ldr	x0, [x23]
	b	LBB0_13
LBB0_12:
	mov	x0, #0
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_h2o_socket_error_out_of_memory,8,3 ; @h2o_socket_error_out_of_memory
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_h2o_socket_error_io,8,3        ; @h2o_socket_error_io
	.comm	_h2o_socket_error_closed,8,3    ; @h2o_socket_error_closed
	.no_dead_strip	_on_read_core
.subsections_via_symbols
