	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_send_cur_input         ## -- Begin function netplay_send_cur_input
	.p2align	4, 0x90
_netplay_send_cur_input:                ## @netplay_send_cur_input
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	(%rdi), %r15
	shlq	$3, %r15
	addq	48(%rdi), %r15
	cmpq	$0, 40(%rdi)
	je	LBB0_12
## %bb.1:
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	jl	LBB0_9
## %bb.2:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	subq	32(%r12), %r14
	shrq	$3, %r14
	incl	%r14d
	movl	$1, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r14
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r12), %ecx
	btl	%ebx, %ecx
	jae	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_send_input_frame
	testl	%eax, %eax
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_9:
	movq	16(%r12), %rax
	movq	_NETPLAY_CONNECTION_PLAYING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.10:
	movl	28(%r12), %edi
	callq	_htonl
	movl	%eax, -52(%rbp)
	movq	_NETPLAY_CMD_NOINPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$4, %r8d
	callq	_netplay_send_raw_cmd
	testl	%eax, %eax
	je	LBB0_11
LBB0_12:
	movq	16(%r12), %rax
	movq	_NETPLAY_CONNECTION_PLAYING@GOTPCREL(%rip), %rdx
	movq	_NETPLAY_CONNECTION_SLAVE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_14
## %bb.13:
	cmpq	%rcx, %rax
	jne	LBB0_15
LBB0_14:
	xorl	%r9d, %r9d
	cmpq	%rcx, %rax
	sete	%r9b
	movl	24(%r12), %r8d
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_send_input_frame
	testl	%eax, %eax
	je	LBB0_16
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	addq	$4, %rdi
	xorl	%edx, %edx
	callq	_netplay_send_flush
	xorl	%r13d, %r13d
	testl	%eax, %eax
	setne	%r13b
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CLIENTS,4,2                ## @MAX_CLIENTS
	.comm	_NETPLAY_CONNECTION_PLAYING,8,3 ## @NETPLAY_CONNECTION_PLAYING
	.comm	_NETPLAY_CMD_NOINPUT,4,2        ## @NETPLAY_CMD_NOINPUT
	.comm	_NETPLAY_CONNECTION_SLAVE,8,3   ## @NETPLAY_CONNECTION_SLAVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_send_cur_input         ; -- Begin function netplay_send_cur_input
	.p2align	2
_netplay_send_cur_input:                ; @netplay_send_cur_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldp	x10, x9, [x0, #40]
	add	x21, x9, x8, lsl #3
Lloh0:
	adrp	x23, _NETPLAY_CONNECTION_PLAYING@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NETPLAY_CONNECTION_PLAYING@GOTPAGEOFF]
	cbz	x10, LBB0_11
; %bb.1:
Lloh2:
	adrp	x24, _MAX_CLIENTS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MAX_CLIENTS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.2:
	ldr	x9, [x20, #32]
	sub	x9, x19, x9
	lsr	x9, x9, #3
	add	w25, w9, #1
	mov	w22, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x25, x22
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #8]
	lsr	w9, w9, w22
	tbz	w9, #0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x21]
	ldr	x9, [x9, x22, lsl #3]
	cbz	x9, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, #0
	mov	x4, x22
	mov	w5, #0
	bl	_send_input_frame
	cbnz	w0, LBB0_3
	b	LBB0_14
LBB0_9:
	ldr	x8, [x20, #16]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	ldr	w0, [x20, #28]
	bl	_htonl
	str	w0, [sp, #12]
Lloh4:
	adrp	x8, _NETPLAY_CMD_NOINPUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NETPLAY_CMD_NOINPUT@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	w4, #4
	bl	_netplay_send_raw_cmd
	cbz	w0, LBB0_14
LBB0_11:
	ldr	x8, [x20, #16]
	ldr	x10, [x23]
Lloh7:
	adrp	x9, _NETPLAY_CONNECTION_SLAVE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NETPLAY_CONNECTION_SLAVE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_13
; %bb.12:
	cmp	x8, x9
	cset	w5, eq
	ldr	w4, [x20, #24]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, #0
	bl	_send_input_frame
	cbz	w0, LBB0_14
LBB0_13:
	ldr	w1, [x19], #4
	mov	x0, x19
	mov	w2, #0
	bl	_netplay_send_flush
	cmp	w0, #0
	cset	w0, ne
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CLIENTS,4,2                ; @MAX_CLIENTS
	.comm	_NETPLAY_CONNECTION_PLAYING,8,3 ; @NETPLAY_CONNECTION_PLAYING
	.comm	_NETPLAY_CMD_NOINPUT,4,2        ; @NETPLAY_CMD_NOINPUT
	.comm	_NETPLAY_CONNECTION_SLAVE,8,3   ; @NETPLAY_CONNECTION_SLAVE
.subsections_via_symbols
