	.file	"extr_netplay_handshake.c_netplay_handshake_init_send.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	netplay_handshake_init_send
	.type	netplay_handshake_init_send, @function
netplay_handshake_init_send:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	sub	rsp, 64
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	config_get_ptr@PLT
	mov	edi, DWORD PTR netplay_magic[rip]
	mov	rbp, rax
	call	htonl@PLT
	mov	QWORD PTR [rsp], rax
	xor	eax, eax
	call	netplay_platform_magic@PLT
	mov	edi, eax
	call	htonl@PLT
	mov	edi, DWORD PTR NETPLAY_COMPRESSION_SUPPORTED[rip]
	mov	QWORD PTR 8[rsp], rax
	call	htonl@PLT
	mov	edi, DWORD PTR NETPLAY_PROTOCOL_VERSION[rip]
	mov	QWORD PTR 24[rsp], 0
	mov	QWORD PTR 16[rsp], rax
	call	htonl@PLT
	mov	QWORD PTR 32[rsp], rax
	xor	eax, eax
	call	netplay_impl_magic@PLT
	mov	edi, eax
	call	htonl@PLT
	cmp	QWORD PTR [r12], 0
	mov	QWORD PTR 40[rsp], rax
	je	.L2
	mov	rax, QWORD PTR 8[rbp]
	cmp	QWORD PTR [rax], 0
	je	.L16
.L3:
	cmp	DWORD PTR simple_rand_next[rip], 1
	je	.L17
	xor	eax, eax
	call	simple_rand_uint32@PLT
	mov	edi, eax
	test	eax, eax
	je	.L5
.L19:
	mov	DWORD PTR [rbx], eax
.L14:
	call	htonl@PLT
	lea	rbp, 8[rbx]
	mov	esi, DWORD PTR 4[rbx]
	mov	rdx, rsp
	mov	ecx, 48
	mov	rdi, rbp
	mov	QWORD PTR 24[rsp], rax
	call	netplay_send@PLT
	test	eax, eax
	je	.L1
	mov	esi, DWORD PTR 4[rbx]
	xor	edx, edx
	mov	rdi, rbp
	call	netplay_send_flush@PLT
	test	eax, eax
	setne	al
	movzx	eax, al
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	cmp	QWORD PTR [rax], 0
	jne	.L3
.L2:
	xor	edi, edi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR [rbx], 1
	mov	edi, 1
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	xor	edi, edi
	call	time@PLT
	mov	rdi, rax
	call	simple_srand@PLT
	xor	eax, eax
	call	simple_rand_uint32@PLT
	mov	edi, eax
	test	eax, eax
	je	.L5
	jmp	.L19
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	netplay_handshake_init_send, .-netplay_handshake_init_send
	.comm	simple_rand_next,4,4
	.comm	netplay_magic,4,4
	.comm	NETPLAY_PROTOCOL_VERSION,4,4
	.comm	NETPLAY_COMPRESSION_SUPPORTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_netplay_handshake.c_netplay_handshake_init_send.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	netplay_handshake_init_send
	.syntax unified
	.arm
	.fpu softvfp
	.type	netplay_handshake_init_send, %function
netplay_handshake_init_send:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L25
	sub	sp, sp, #32
	mov	r4, r1
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	config_get_ptr
	ldr	r3, .L25+4
	mov	r5, r0
	ldr	r0, [r3]
	bl	htonl
	str	r0, [sp, #4]
	bl	netplay_platform_magic
	bl	htonl
	ldr	r3, .L25+8
	str	r0, [sp, #8]
	ldr	r0, [r3]
	bl	htonl
	mov	r3, #0
	ldr	r2, .L25+12
	str	r0, [sp, #12]
	ldr	r0, [r2]
	str	r3, [sp, #16]
	bl	htonl
	str	r0, [sp, #20]
	bl	netplay_impl_magic
	bl	htonl
	ldr	r3, [r6]
	str	r0, [sp, #24]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r5, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
.L3:
	ldr	r3, .L25+16
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L23
.L4:
	bl	simple_rand_uint32
	cmp	r0, #0
	moveq	r3, #1
	moveq	r0, r3
	strne	r0, [r4]
	streq	r3, [r4]
.L20:
	bl	htonl
	add	r5, r4, #8
	str	r0, [sp, #16]
	mov	r3, #24
	mov	r0, r5
	ldr	r1, [r4, #4]
	add	r2, sp, #4
	bl	netplay_send
	cmp	r0, #0
	beq	.L1
	mov	r0, r5
	mov	r2, #0
	ldr	r1, [r4, #4]
	bl	netplay_send_flush
	subs	r0, r0, #0
	movne	r0, #1
.L1:
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, pc}
.L22:
	ldr	r3, [r5]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
.L2:
	mov	r0, #0
	b	.L20
.L23:
	mov	r0, #0
	bl	time
	bl	simple_srand
	b	.L4
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC0
	.word	netplay_magic
	.word	NETPLAY_COMPRESSION_SUPPORTED
	.word	NETPLAY_PROTOCOL_VERSION
	.word	simple_rand_next
	.size	netplay_handshake_init_send, .-netplay_handshake_init_send
	.comm	simple_rand_next,4,4
	.comm	netplay_magic,4,4
	.comm	NETPLAY_PROTOCOL_VERSION,4,4
	.comm	NETPLAY_COMPRESSION_SUPPORTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
