	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_handshake
_test_handshake:                        ## @test_handshake
	.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	$424, %rsp                      ## imm = 0x1A8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_new_master_id
	movl	%eax, %ebx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ptls_iovec_init
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rsp)
	movl	%eax, (%rsp)
	movq	_client@GOTPCREL(%rip), %r14
	movq	_quic_ctx@GOTPCREL(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	movq	_fake_address@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	movl	%ebx, %r9d
	callq	_quicly_connect
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ok
	movq	$32, -440(%rbp)
	movl	(%r14), %edi
	leaq	-304(%rbp), %r15
	leaq	-440(%rbp), %rbx
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_quicly_send
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ok
	xorl	%edi, %edi
	cmpq	$1, -440(%rbp)
	sete	%dil
	callq	_ok
	movq	-304(%rbp), %rax
	xorl	%edi, %edi
	cmpl	$1280, (%rax)                   ## imm = 0x500
	sete	%dil
	callq	_ok
	movq	-440(%rbp), %rdx
	leaq	-432(%rbp), %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_decode_packets
	xorl	%edi, %edi
	cmpq	$1, %rax
	sete	%dil
	callq	_ok
	xorl	%eax, %eax
	callq	_new_master_id
	movl	%eax, (%rsp)
	movq	$0, 8(%rsp)
	movq	_server@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	movq	_quic_ctx@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	movq	_fake_address@GOTPCREL(%rip), %rcx
	movq	%r13, %r8
	xorl	%r9d, %r9d
	callq	_quicly_accept
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ok
	movq	-440(%rbp), %rsi
	movq	%r15, %rdi
	callq	_free_packets
	movl	(%r12), %edi
	callq	_quicly_get_state
	movq	_QUICLY_STATE_CONNECTED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_ok
	movl	(%r12), %edi
	callq	_quicly_connection_is_ready
	movl	%eax, %edi
	callq	_ok
	movq	$32, -440(%rbp)
	movl	(%r12), %edi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_quicly_send
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ok
	xorl	%edi, %edi
	cmpq	$0, -440(%rbp)
	setne	%dil
	callq	_ok
	movq	-440(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_decode_packets
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movq	_fake_address@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	_quicly_receive
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ok
	addq	$4, %r13
	decq	%rbx
	jne	LBB0_2
LBB0_3:
	movq	-440(%rbp), %rsi
	leaq	-304(%rbp), %rdi
	callq	_free_packets
	movl	(%r14), %edi
	callq	_quicly_get_state
	xorl	%edi, %edi
	movq	_QUICLY_STATE_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_ok
	movl	(%r14), %edi
	callq	_quicly_connection_is_ready
	movl	%eax, %edi
	callq	_ok
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$424, %rsp                      ## imm = 0x1A8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_client,4,2                     ## @client
	.comm	_quic_ctx,4,2                   ## @quic_ctx
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"example.com"

	.comm	_fake_address,4,2               ## @fake_address
	.comm	_server,4,2                     ## @server
	.comm	_QUICLY_STATE_CONNECTED,8,3     ## @QUICLY_STATE_CONNECTED
	.no_dead_strip	_test_handshake
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_handshake
_test_handshake:                        ; @test_handshake
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #496
	.cfi_def_cfa_offset 496
	stp	x28, x27, [sp, #416]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #432]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #448]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #464]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #480]            ; 16-byte Folded Spill
	add	x29, sp, #480
	.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 w27, -72
	.cfi_offset w28, -80
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_new_master_id
	mov	x22, x0
	mov	x0, #0
	mov	w1, #0
	bl	_ptls_iovec_init
	mov	x6, x0
	str	xzr, [sp]
Lloh3:
	adrp	x19, _client@GOTPAGE
Lloh4:
	ldr	x19, [x19, _client@GOTPAGEOFF]
Lloh5:
	adrp	x20, _quic_ctx@GOTPAGE
Lloh6:
	ldr	x20, [x20, _quic_ctx@GOTPAGEOFF]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
Lloh9:
	adrp	x21, _fake_address@GOTPAGE
Lloh10:
	ldr	x21, [x21, _fake_address@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	mov	x4, #0
	mov	x5, x22
	mov	x7, #0
	bl	_quicly_connect
	cmp	w0, #0
	cset	w0, eq
	bl	_ok
	mov	w23, #32
	str	x23, [sp, #16]
	ldr	w0, [x19]
	add	x1, sp, #152
	add	x2, sp, #16
	bl	_quicly_send
	cmp	w0, #0
	cset	w0, eq
	bl	_ok
	ldr	x8, [sp, #16]
	cmp	x8, #1
	cset	w0, eq
	bl	_ok
	ldr	x8, [sp, #152]
	ldr	w8, [x8]
	cmp	w8, #1280
	cset	w0, eq
	bl	_ok
	ldr	x2, [sp, #16]
	add	x0, sp, #24
	add	x1, sp, #152
	bl	_decode_packets
	cmp	x0, #1
	cset	w0, eq
	bl	_ok
	bl	_new_master_id
	mov	x6, x0
Lloh11:
	adrp	x22, _server@GOTPAGE
Lloh12:
	ldr	x22, [x22, _server@GOTPAGEOFF]
	add	x4, sp, #24
	mov	x0, x22
	mov	x1, x20
	mov	x2, #0
	mov	x3, x21
	mov	x5, #0
	mov	x7, #0
	bl	_quicly_accept
	cmp	w0, #0
	cset	w0, eq
	bl	_ok
	ldr	x1, [sp, #16]
	add	x0, sp, #152
	bl	_free_packets
	ldr	w0, [x22]
	bl	_quicly_get_state
Lloh13:
	adrp	x24, _QUICLY_STATE_CONNECTED@GOTPAGE
Lloh14:
	ldr	x24, [x24, _QUICLY_STATE_CONNECTED@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_ok
	ldr	w0, [x22]
	bl	_quicly_connection_is_ready
	bl	_ok
	str	x23, [sp, #16]
	ldr	w0, [x22]
	add	x1, sp, #152
	add	x2, sp, #16
	bl	_quicly_send
	cmp	w0, #0
	cset	w0, eq
	bl	_ok
	ldr	x8, [sp, #16]
	cmp	x8, #0
	cset	w0, ne
	bl	_ok
	ldr	x2, [sp, #16]
	add	x0, sp, #24
	add	x1, sp, #152
	bl	_decode_packets
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	add	x21, sp, #24
Lloh15:
	adrp	x22, _fake_address@GOTPAGE
Lloh16:
	ldr	x22, [x22, _fake_address@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, #0
	mov	x2, x22
	mov	x3, x21
	bl	_quicly_receive
	cmp	w0, #0
	cset	w0, eq
	bl	_ok
	add	x21, x21, #4
	subs	x20, x20, #1
	b.ne	LBB0_2
LBB0_3:
	ldr	x1, [sp, #16]
	add	x0, sp, #152
	bl	_free_packets
	ldr	w0, [x19]
	bl	_quicly_get_state
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_ok
	ldr	w0, [x19]
	bl	_quicly_connection_is_ready
	bl	_ok
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #480]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #464]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #448]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #432]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #416]            ; 16-byte Folded Reload
	add	sp, sp, #496
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_client,4,2                     ; @client
	.comm	_quic_ctx,4,2                   ; @quic_ctx
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"example.com"

	.comm	_fake_address,4,2               ; @fake_address
	.comm	_server,4,2                     ; @server
	.comm	_QUICLY_STATE_CONNECTED,8,3     ; @QUICLY_STATE_CONNECTED
	.no_dead_strip	_test_handshake
.subsections_via_symbols
