	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function on_receive
_on_receive:                            ## @on_receive
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	(%rdi), %r13
	movq	$0, -96(%rbp)
	movq	16(%r13), %rax
	movq	24(%r13), %rcx
	movq	(%rax), %rax
	addq	(%rcx), %rax
	xorl	%edi, %edi
	cmpq	8(%r13), %rax
	sete	%dil
	callq	_assert
	movq	40(%r13), %rdi
	addq	$8, %rdi
	callq	_quicly_recvstate_transfer_complete
	movq	40(%r13), %rdi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	16(%rdi), %rax
	subq	8(%rdi), %rax
	jmp	LBB0_3
LBB0_2:
	addq	$8, %rdi
	callq	_quicly_recvstate_bytes_available
LBB0_3:
	leaq	32(%r13), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	32(%r13), %rsi
	movq	(%rsi), %rdx
	leaq	(%r15,%r12), %r14
	testq	%rdx, %rdx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.4:
	cmpq	%r14, %rax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, -48(%rbp)
	movq	%rbx, %rsi
	leaq	(%rbx,%r15,4), %r12
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_6:
	movq	8(%r13), %rcx
	subq	%rcx, %r14
	cmpq	%r14, %rdx
	jae	LBB0_8
## %bb.7:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_h2o_buffer_reserve
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_H2O_HTTP3_CHECK_SUCCESS
	movq	32(%r13), %rsi
	movq	%r14, (%rsi)
	movq	8(%r13), %rcx
LBB0_8:
	addq	8(%rsi), %r12
	subq	%rcx, %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	xorl	%r15d, %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	8(%r13), %rax
	je	LBB0_36
## %bb.9:
	seta	%al
	movzbl	%al, %edi
	callq	_assert
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	subq	8(%r13), %rcx
	movq	32(%r13), %rax
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	leaq	(%rax,%rcx,4), %r12
LBB0_10:
	leaq	16(%r13), %rbx
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.12:
	subq	%rsi, %r12
	shrq	$2, %r12
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_h2o_buffer_append
	movq	(%rbx), %rax
	movq	8(%rax), %rbx
	movq	%rbx, -48(%rbp)
	movq	(%rax), %rax
	leaq	(%rbx,%rax,4), %r12
	jmp	LBB0_13
LBB0_11:
	movq	%rsi, %rbx
LBB0_13:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	40(%r13), %rdi
	addq	$8, %rdi
	callq	_quicly_recvstate_transfer_complete
	movl	%eax, %r15d
	testl	%eax, %eax
	setne	%al
	cmpq	%r12, %rbx
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	leaq	-48(%rbp), %r13
	leaq	-96(%rbp), %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %ecx
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_H2O_HTTP3_ERROR_EOS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r14, %r8
	callq	*(%rdi)
	movl	%eax, %ebx
	movq	-48(%rbp), %rax
	testl	%ebx, %ebx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpq	%r12, %rax
	jne	LBB0_14
LBB0_18:
	movq	_H2O_HTTP3_ERROR_INCOMPLETE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_23
## %bb.19:
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.20:
	movq	_H2O_HTTP3_ERROR_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_36
LBB0_23:
	testl	%r15d, %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_30
## %bb.24:
	movq	40(%r14), %rdi
	callq	_quicly_sendstate_transfer_complete
	testl	%eax, %eax
	jne	LBB0_26
## %bb.25:
	movq	40(%r14), %rdi
	movq	_H2O_HTTP3_ERROR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_quicly_reset_stream
LBB0_26:
	movq	%r14, %rdi
	callq	_detach_stream
	jmp	LBB0_27
LBB0_21:
	xorl	%edi, %edi
	cmpq	%r12, %rax
	setb	%dil
	callq	_assert
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rcx
	movq	(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_28
## %bb.22:
	shlq	$2, %rax
	addq	8(%rcx), %rax
	xorl	%edi, %edi
	cmpq	%rax, %r12
	sete	%dil
	callq	_assert
	movq	-48(%rbp), %rsi
	movq	(%r14), %rax
	subq	8(%rax), %rsi
	sarq	$2, %rsi
	movq	%r14, %rdi
	callq	_h2o_buffer_consume
	jmp	LBB0_29
LBB0_28:
	movq	-48(%rbp), %rsi
	subq	%rsi, %r12
	shrq	$2, %r12
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_h2o_buffer_append
LBB0_29:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_30:
	testl	%ebx, %ebx
	je	LBB0_32
## %bb.31:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_close_stream
LBB0_27:
	movq	%r14, %rdi
	callq	_destroy_request
	xorl	%r15d, %r15d
LBB0_36:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_34
## %bb.33:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_h2o_buffer_consume
LBB0_34:
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	movq	%r14, %rbx
	movq	(%rax), %r14
	addq	(%rcx), %r14
	xorl	%r15d, %r15d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	subq	%r14, %r12
	je	LBB0_36
## %bb.35:
	seta	%al
	movzbl	%al, %edi
	callq	_assert
	movq	40(%rbx), %rdi
	movq	%r12, %rsi
	callq	_quicly_stream_sync_recvbuf
	movq	%r14, 8(%rbx)
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.comm	_H2O_HTTP3_ERROR_EOS,4,2        ## @H2O_HTTP3_ERROR_EOS
	.comm	_H2O_HTTP3_ERROR_INCOMPLETE,4,2 ## @H2O_HTTP3_ERROR_INCOMPLETE
	.comm	_H2O_HTTP3_ERROR_FRAME,4,2      ## @H2O_HTTP3_ERROR_FRAME
	.comm	_H2O_HTTP3_ERROR_NONE,4,2       ## @H2O_HTTP3_ERROR_NONE
	.no_dead_strip	_on_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function on_receive
_on_receive:                            ; @on_receive
	.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	x25, x3
	mov	x24, x2
	mov	x23, x1
	ldr	x19, [x0]
	str	xzr, [sp]
	ldr	x8, [x19, #24]
	mov	x21, x19
	ldr	x9, [x21, #16]!
	ldr	x8, [x8]
	ldr	x9, [x9]
	ldr	x10, [x19, #8]
	add	x8, x9, x8
	cmp	x8, x10
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #40]
	add	x0, x8, #8
	bl	_quicly_recvstate_transfer_complete
	ldr	x8, [x19, #40]
	cbz	w0, LBB0_2
; %bb.1:
	ldp	x8, x9, [x8, #8]
	sub	x20, x9, x8
	b	LBB0_3
LBB0_2:
	add	x0, x8, #8
	bl	_quicly_recvstate_bytes_available
	mov	x20, x0
LBB0_3:
	mov	x22, x19
	ldr	x8, [x22, #32]!
	ldr	x10, [x8]
	add	x11, x25, x23
	cmp	x10, #0
	ccmp	x20, x11, #0, eq
	b.eq	LBB0_8
; %bb.4:
	ldr	x9, [x19, #8]
	sub	x26, x11, x9
	cmp	x10, x26
	b.hs	LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x1, x26
	bl	_h2o_buffer_reserve
	cmp	x0, #0
	cset	w0, ne
	bl	_H2O_HTTP3_CHECK_SUCCESS
	ldr	x8, [x19, #32]
	str	x26, [x8]
	ldr	x9, [x19, #8]
LBB0_6:
	ldr	x8, [x8, #8]
	add	x8, x8, x23
	sub	x0, x8, x9
	mov	x1, x24
	mov	x2, x25
	bl	_memcpy
	ldr	x8, [x19, #8]
	cmp	x20, x8
	b.eq	LBB0_25
; %bb.7:
	cset	w0, hi
	bl	_assert
	ldr	x8, [x19, #8]
	sub	x23, x20, x8
	ldr	x8, [x19, #32]
	ldr	x24, [x8, #8]
	str	x24, [sp, #8]
	add	x25, x24, x23, lsl #2
	b	LBB0_9
LBB0_8:
	mov	x23, #0
	str	x24, [sp, #8]
	add	x25, x24, x25, lsl #2
LBB0_9:
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:
	sub	x8, x25, x24
	lsr	x2, x8, #2
	mov	x0, x21
	mov	x1, x24
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_h2o_buffer_append
	ldr	x8, [x21]
	ldr	x24, [x8, #8]
	str	x24, [sp, #8]
	ldr	x8, [x8]
	add	x25, x24, x8, lsl #2
LBB0_11:
	ldr	x8, [x19, #40]
	add	x0, x8, #8
	bl	_quicly_recvstate_transfer_complete
	mov	x26, x0
	cmp	w0, #0
	ccmp	x24, x25, #0, eq
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x27, _H2O_HTTP3_ERROR_EOS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _H2O_HTTP3_ERROR_EOS@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w9, [x27]
	cmp	w26, #0
	csel	w3, w9, wzr, ne
	add	x1, sp, #8
	mov	x4, sp
	mov	x0, x19
	mov	x2, x25
	blr	x8
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, x25, #4, eq
	b.ne	LBB0_12
; %bb.13:
	mov	x24, x0
Lloh2:
	adrp	x9, _H2O_HTTP3_ERROR_INCOMPLETE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _H2O_HTTP3_ERROR_INCOMPLETE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w0, w9
	b.ne	LBB0_16
; %bb.14:
	cbz	w26, LBB0_20
; %bb.15:
Lloh5:
	adrp	x8, _H2O_HTTP3_ERROR_FRAME@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H2O_HTTP3_ERROR_FRAME@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_26
LBB0_16:
	cbz	w26, LBB0_22
; %bb.17:
	ldr	x0, [x19, #40]
	bl	_quicly_sendstate_transfer_complete
	cbnz	w0, LBB0_19
; %bb.18:
	ldr	x0, [x19, #40]
Lloh8:
	adrp	x8, _H2O_HTTP3_ERROR_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H2O_HTTP3_ERROR_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_quicly_reset_stream
LBB0_19:
	mov	x0, x19
	bl	_detach_stream
	b	LBB0_24
LBB0_20:
	cmp	x8, x25
	cset	w0, lo
	bl	_assert
	ldr	x8, [x21]
	ldr	x9, [x8]
	cbz	x9, LBB0_27
; %bb.21:
	ldr	x8, [x8, #8]
	add	x8, x8, x9, lsl #2
	cmp	x25, x8
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #8]
	ldr	x9, [x21]
	ldr	x9, [x9, #8]
	sub	x8, x8, x9
	asr	x1, x8, #2
	mov	x0, x21
	bl	_h2o_buffer_consume
LBB0_22:
	cbz	w24, LBB0_28
LBB0_23:
	mov	x0, x19
	mov	x1, x24
	bl	_close_stream
LBB0_24:
	mov	x0, x19
	bl	_destroy_request
LBB0_25:
	mov	w0, #0
LBB0_26:
	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
LBB0_27:
	ldr	x1, [sp, #8]
	sub	x8, x25, x1
	lsr	x2, x8, #2
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_h2o_buffer_append
	cbnz	w24, LBB0_23
LBB0_28:
	cbz	x23, LBB0_30
; %bb.29:
	mov	x0, x22
	mov	x1, x23
	bl	_h2o_buffer_consume
LBB0_30:
	ldp	x9, x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x9, [x9]
	add	x21, x9, x8
	subs	x20, x20, x21
	b.eq	LBB0_25
; %bb.31:
	cset	w0, hi
	bl	_assert
	ldr	x0, [x19, #40]
	mov	x1, x20
	bl	_quicly_stream_sync_recvbuf
	mov	w0, #0
	str	x21, [x19, #8]
	b	LBB0_26
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_H2O_HTTP3_ERROR_EOS,4,2        ; @H2O_HTTP3_ERROR_EOS
	.comm	_H2O_HTTP3_ERROR_INCOMPLETE,4,2 ; @H2O_HTTP3_ERROR_INCOMPLETE
	.comm	_H2O_HTTP3_ERROR_FRAME,4,2      ; @H2O_HTTP3_ERROR_FRAME
	.comm	_H2O_HTTP3_ERROR_NONE,4,2       ; @H2O_HTTP3_ERROR_NONE
	.no_dead_strip	_on_receive
.subsections_via_symbols
