	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netplay_handshake_ready
_netplay_handshake_ready:               ## @netplay_handshake_ready
	.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	%rbx
	subq	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movb	$0, -544(%rbp)
	cmpq	$0, 24(%rdi)
	je	LBB0_3
## %bb.1:
	movl	(%r14), %eax
	shll	$4, %eax
	movl	%ebx, %r15d
	subl	%eax, %r15d
	movq	(%rbx), %rdx
	addq	$8, %rbx
	leaq	-544(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$512, %r8d                      ## imm = 0x200
	callq	_netplay_log_connection
	movq	_MSG_CONNECTION_SLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movq	_NETPLAY_QUIRK_NO_SAVESTATES@GOTPCREL(%rip), %rax
	movq	_NETPLAY_QUIRK_NO_TRANSMISSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, 4(%r14)
	jne	LBB0_4
## %bb.2:
	movl	$1, 8(%r14)
	jmp	LBB0_4
LBB0_3:
	movl	$1, 12(%r14)
	movq	_MSG_CONNECTED_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	(%rbx), %r8
	leaq	L_.str.1(%rip), %rdx
	leaq	-544(%rbp), %rdi
	movl	$512, %esi                      ## imm = 0x200
	movq	%rax, %rcx
	callq	_snprintf
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	leaq	-544(%rbp), %rbx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movq	_MESSAGE_QUEUE_ICON_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MESSAGE_QUEUE_CATEGORY_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$180, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_runloop_msg_queue_push
	movq	16(%r14), %rax
	movq	_NETPLAY_STALL_NO_CONNECTION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_NETPLAY_STALL_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %u\n"

	.comm	_MSG_CONNECTION_SLOT,4,2        ## @MSG_CONNECTION_SLOT
	.comm	_NETPLAY_QUIRK_NO_SAVESTATES,4,2 ## @NETPLAY_QUIRK_NO_SAVESTATES
	.comm	_NETPLAY_QUIRK_NO_TRANSMISSION,4,2 ## @NETPLAY_QUIRK_NO_TRANSMISSION
L_.str.1:                               ## @.str.1
	.asciz	"%s: \"%s\""

	.comm	_MSG_CONNECTED_TO,4,2           ## @MSG_CONNECTED_TO
L_.str.2:                               ## @.str.2
	.asciz	"%s\n"

	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ## @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ## @MESSAGE_QUEUE_CATEGORY_INFO
	.comm	_NETPLAY_STALL_NO_CONNECTION,8,3 ## @NETPLAY_STALL_NO_CONNECTION
	.comm	_NETPLAY_STALL_NONE,8,3         ## @NETPLAY_STALL_NONE
	.no_dead_strip	_netplay_handshake_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netplay_handshake_ready
_netplay_handshake_ready:               ; @netplay_handshake_ready
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #528
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	strb	wzr, [sp, #8]
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_3
; %bb.1:
	ldrsw	x8, [x19]
	sub	x21, x20, x8, lsl #4
	ldr	x2, [x20], #8
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x21
	mov	w4, #512
	bl	_netplay_log_connection
Lloh3:
	adrp	x8, _MSG_CONNECTION_SLOT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_CONNECTION_SLOT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
	str	x21, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_LOG
	ldr	w8, [x19, #4]
Lloh8:
	adrp	x9, _NETPLAY_QUIRK_NO_SAVESTATES@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NETPLAY_QUIRK_NO_SAVESTATES@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _NETPLAY_QUIRK_NO_TRANSMISSION@GOTPAGE
Lloh12:
	ldr	x10, [x10, _NETPLAY_QUIRK_NO_TRANSMISSION@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_4
; %bb.2:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_4
LBB0_3:
	mov	w8, #1
	str	w8, [x19, #12]
Lloh14:
	adrp	x8, _MSG_CONNECTED_TO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_CONNECTED_TO@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x3, x0
	ldr	x4, [x20]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w1, #512
	bl	_snprintf
LBB0_4:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #8
	bl	_RARCH_LOG
Lloh21:
	adrp	x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x8]
Lloh24:
	adrp	x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGEOFF]
Lloh26:
	ldr	w6, [x8]
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #180
	mov	w3, #0
	mov	x4, #0
	bl	_runloop_msg_queue_push
	ldr	x8, [x19, #16]
Lloh27:
	adrp	x9, _NETPLAY_STALL_NO_CONNECTION@GOTPAGE
Lloh28:
	ldr	x9, [x9, _NETPLAY_STALL_NO_CONNECTION@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh30:
	adrp	x8, _NETPLAY_STALL_NONE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _NETPLAY_STALL_NONE@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	add	sp, sp, #528
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %u\n"

	.comm	_MSG_CONNECTION_SLOT,4,2        ; @MSG_CONNECTION_SLOT
	.comm	_NETPLAY_QUIRK_NO_SAVESTATES,4,2 ; @NETPLAY_QUIRK_NO_SAVESTATES
	.comm	_NETPLAY_QUIRK_NO_TRANSMISSION,4,2 ; @NETPLAY_QUIRK_NO_TRANSMISSION
l_.str.1:                               ; @.str.1
	.asciz	"%s: \"%s\""

	.comm	_MSG_CONNECTED_TO,4,2           ; @MSG_CONNECTED_TO
l_.str.2:                               ; @.str.2
	.asciz	"%s\n"

	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ; @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ; @MESSAGE_QUEUE_CATEGORY_INFO
	.comm	_NETPLAY_STALL_NO_CONNECTION,8,3 ; @NETPLAY_STALL_NO_CONNECTION
	.comm	_NETPLAY_STALL_NONE,8,3         ; @NETPLAY_STALL_NONE
	.no_dead_strip	_netplay_handshake_ready
.subsections_via_symbols
