	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_quicly_streambuf_ingress_receive
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	callq	_quicly_streambuf_ingress_get
	movq	%rax, %r15
	movq	%rax, %r12
	shrq	$32, %r12
	xorl	%eax, %eax
	callq	_is_server
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	leaq	8(%rbx), %rdi
	callq	_quicly_sendstate_is_open
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_quicly_streambuf_egress_write
	leaq	4(%rbx), %rdi
	callq	_quicly_recvstate_transfer_complete
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_quicly_streambuf_egress_shutdown
	jmp	LBB0_7
LBB0_5:
	movq	_stdout@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%r12d, %edi
	movl	$1, %esi
	movl	%r15d, %edx
	callq	_fwrite
	movl	(%r13), %edi
	callq	_fflush
	leaq	4(%rbx), %rdi
	callq	_quicly_recvstate_transfer_complete
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	xorl	%esi, %esi
	callq	_quicly_close
LBB0_7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_quicly_streambuf_ingress_shift
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,4,2                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.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:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_quicly_streambuf_ingress_receive
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_quicly_streambuf_ingress_get
	mov	x21, x0
	lsr	x22, x0, #32
	bl	_is_server
	cbz	x0, LBB0_5
; %bb.2:
	add	x0, x19, #8
	bl	_quicly_sendstate_is_open
	cbz	x0, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_quicly_streambuf_egress_write
	add	x0, x19, #4
	bl	_quicly_recvstate_transfer_complete
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_quicly_streambuf_egress_shutdown
	b	LBB0_7
LBB0_5:
Lloh0:
	adrp	x23, _stdout@GOTPAGE
Lloh1:
	ldr	x23, [x23, _stdout@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x22
	mov	w1, #1
	mov	x2, x21
	bl	_fwrite
	ldr	w0, [x23]
	bl	_fflush
	add	x0, x19, #4
	bl	_quicly_recvstate_transfer_complete
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x19]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #0
	bl	_quicly_close
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	bl	_quicly_streambuf_ingress_shift
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,4,2                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.no_dead_strip	_on_receive
.subsections_via_symbols
