	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_handshake_init_send    ## -- Begin function netplay_handshake_init_send
	.p2align	4, 0x90
_netplay_handshake_init_send:           ## @netplay_handshake_init_send
	.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	%rsi, %r13
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r15
	movq	_netplay_magic@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movq	%rax, -96(%rbp)
	xorl	%eax, %eax
	callq	_netplay_platform_magic
	movl	%eax, %edi
	callq	_htonl
	movq	%rax, -88(%rbp)
	movq	_NETPLAY_COMPRESSION_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movq	%rax, -80(%rbp)
	movq	_NETPLAY_PROTOCOL_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movq	%rax, -64(%rbp)
	xorl	%eax, %eax
	callq	_netplay_impl_magic
	movl	%eax, %edi
	callq	_htonl
	movq	%rax, -56(%rbp)
	cmpq	$0, (%r12)
	movl	$0, %edi
	je	LBB0_6
## %bb.1:
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	movl	$0, %edi
	je	LBB0_6
LBB0_3:
	movq	_simple_rand_next@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	callq	_time
	movl	%eax, %edi
	callq	_simple_srand
LBB0_5:
	xorl	%eax, %eax
	callq	_simple_rand_uint32
	testl	%eax, %eax
	movl	$1, %edi
	cmovnel	%eax, %edi
	movl	%edi, (%r13)
LBB0_6:
	callq	_htonl
	movq	%rax, -72(%rbp)
	leaq	8(%r13), %rbx
	movl	4(%r13), %esi
	leaq	-96(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$48, %ecx
	callq	_netplay_send
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	4(%r13), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_netplay_send_flush
	xorl	%r14d, %r14d
	testl	%eax, %eax
	setne	%r14b
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_netplay_magic,4,2              ## @netplay_magic
	.comm	_NETPLAY_COMPRESSION_SUPPORTED,4,2 ## @NETPLAY_COMPRESSION_SUPPORTED
	.comm	_NETPLAY_PROTOCOL_VERSION,4,2   ## @NETPLAY_PROTOCOL_VERSION
	.comm	_simple_rand_next,4,2           ## @simple_rand_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_handshake_init_send    ; -- Begin function netplay_handshake_init_send
	.p2align	2
_netplay_handshake_init_send:           ; @netplay_handshake_init_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_config_get_ptr
	mov	x20, x0
Lloh3:
	adrp	x8, _netplay_magic@GOTPAGE
Lloh4:
	ldr	x8, [x8, _netplay_magic@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_htonl
	str	x0, [sp, #8]
	bl	_netplay_platform_magic
	bl	_htonl
	str	x0, [sp, #16]
Lloh6:
	adrp	x8, _NETPLAY_COMPRESSION_SUPPORTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NETPLAY_COMPRESSION_SUPPORTED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_htonl
	str	x0, [sp, #24]
Lloh9:
	adrp	x8, _NETPLAY_PROTOCOL_VERSION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETPLAY_PROTOCOL_VERSION@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_htonl
	str	x0, [sp, #40]
	bl	_netplay_impl_magic
	bl	_htonl
	str	x0, [sp, #48]
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
LBB0_3:
Lloh12:
	adrp	x8, _simple_rand_next@GOTPAGE
Lloh13:
	ldr	x8, [x8, _simple_rand_next@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.4:
	mov	x0, #0
	bl	_time
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_simple_srand
LBB0_5:
	bl	_simple_rand_uint32
	cmp	w0, #0
	csinc	w0, w0, wzr, ne
	str	w0, [x19]
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	bl	_htonl
	str	x0, [sp, #32]
	add	x20, x19, #8
	ldr	w1, [x19, #4]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #48
	bl	_netplay_send
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	w2, #0
	bl	_netplay_send_flush
	cmp	w0, #0
	cset	w0, ne
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	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
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_netplay_magic,4,2              ; @netplay_magic
	.comm	_NETPLAY_COMPRESSION_SUPPORTED,4,2 ; @NETPLAY_COMPRESSION_SUPPORTED
	.comm	_NETPLAY_PROTOCOL_VERSION,4,2   ; @NETPLAY_PROTOCOL_VERSION
	.comm	_simple_rand_next,4,2           ; @simple_rand_next
.subsections_via_symbols
