	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_handle_slaves          ## -- Begin function netplay_handle_slaves
	.p2align	4, 0x90
_netplay_handle_slaves:                 ## @netplay_handle_slaves
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movq	%rdi, %rbx
	movq	48(%rdi), %rcx
	movq	(%rdi), %rdx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %r15
	addq	%rdx, %rcx
	addq	$8, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_NETPLAY_CONNECTION_SLAVE@GOTPCREL(%rip), %rsi
	movq	_MAX_INPUT_DEVICES@GOTPCREL(%rip), %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	movl	$1, 4(%rax,%r14,4)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	callq	_send_input_frame
	movq	(%rbx), %rdi
	callq	_NEXT_PTR
	movq	40(%rbx), %rcx
	movl	%eax, 4(%rcx,%r14,4)
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	incq	%rcx
	movq	%rcx, 8(%rax,%r14,8)
	movq	8(%rbx), %rax
	movq	_NETPLAY_CONNECTION_SLAVE@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpq	%rax, %r14
	jae	LBB0_19
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##       Child Loop BB0_11 Depth 3
	movq	56(%rbx), %rcx
	movq	%r14, %rdx
	shlq	$4, %rdx
	cmpq	$0, 8(%rcx,%rdx)
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rcx,%rdx), %rcx
	cmpq	(%rsi), %rcx
	jne	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rcx
	movq	8(%rcx,%r14,8), %rcx
	cmpq	24(%rbx), %rcx
	jg	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	1(%r14), %r12
	movq	(%r15), %rax
	cmpl	$0, 4(%rax,%r14,4)
	jne	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdi
	movq	32(%rbx), %rax
	movq	8(%rax,%r14,8), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	48(%rbx), %rbx
	callq	_PREV_PTR
	cmpq	$0, (%r13)
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	shlq	$4, %rax
	addq	%rbx, %rax
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	%r13, %rbx
	leaq	(,%r15,8), %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %r13
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netplay_expected_input_size
	movq	%r13, %rdi
	movq	%rbx, %r13
	movq	%r12, %rsi
	movl	%eax, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_netplay_input_state_for
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=2
	incq	%r15
	cmpq	(%r13), %r15
	jae	LBB0_16
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_11 Depth 3
	movl	$1, %esi
	movl	%r15d, %ecx
	shll	%cl, %esi
	movslq	%esi, %rax
	testq	%rax, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	%r12, (%rbx)
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=3
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_11
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=2
	leaq	(,%r15,8), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	movl	8(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_netplay_input_state_for
	movl	12(%rax), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	shll	$3, %edx
	callq	_memcpy
	jmp	LBB0_15
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETPLAY_CONNECTION_SLAVE,8,3   ## @NETPLAY_CONNECTION_SLAVE
	.comm	_MAX_INPUT_DEVICES,8,3          ## @MAX_INPUT_DEVICES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_handle_slaves          ; -- Begin function netplay_handle_slaves
	.p2align	2
_netplay_handle_slaves:                 ; @netplay_handle_slaves
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_18
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	ldr	x9, [x0, #48]
	ldr	x10, [x0]
	add	x20, x9, x10, lsl #4
	add	x24, x20, #8
Lloh0:
	adrp	x22, _NETPLAY_CONNECTION_SLAVE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NETPLAY_CONNECTION_SLAVE@GOTPAGEOFF]
Lloh2:
	adrp	x26, _MAX_INPUT_DEVICES@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MAX_INPUT_DEVICES@GOTPAGEOFF]
	mov	w27, #1
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x8, [x20]
	str	w27, [x8, x21, lsl #2]
Lloh4:
	adrp	x22, _NETPLAY_CONNECTION_SLAVE@GOTPAGE
Lloh5:
	ldr	x22, [x22, _NETPLAY_CONNECTION_SLAVE@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	x3, #0
	mov	x4, x21
	mov	w5, #0
	bl	_send_input_frame
	ldr	x0, [x19]
	bl	_NEXT_PTR
	ldr	x8, [x19, #40]
	str	w0, [x8, x21, lsl #2]
	ldp	x9, x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x9, x21, lsl #3]
	ldr	x8, [x19, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	cmp	x23, x8
	b.hs	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;       Child Loop BB0_15 Depth 3
	ldr	x9, [x19, #56]
	add	x10, x9, x23, lsl #4
	ldr	x10, [x10, #8]
	cbz	x10, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	x10, x23, #4
	ldr	x9, [x9, x10]
	ldr	x10, [x22]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x23, #1
	ldp	x9, x10, [x19, #16]
	ldr	x9, [x9, x21, lsl #3]
	cmp	x9, x10
	b.gt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
	ldr	w8, [x8, x21, lsl #2]
	cbnz	w8, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #32]
	ldr	x28, [x8, x21, lsl #3]
	ldr	x20, [x19, #48]
	ldr	x0, [x19]
	bl	_PREV_PTR
	ldr	x8, [x26]
	cbz	x8, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, #0
	add	x8, x20, x0, lsl #4
	add	x20, x8, #8
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x24]
	add	x22, x8, x25, lsl #3
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_netplay_expected_input_size
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	mov	w3, #1
	mov	w4, #0
	bl	_netplay_input_state_for
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	add	x25, x25, #1
	ldr	x8, [x26]
	cmp	x25, x8
	b.hs	LBB0_2
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_15 Depth 3
	lsl	w1, w27, w25
	sxtw	x8, w1
	tst	x28, x8
	b.eq	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x20]
	ldr	x22, [x8, x25, lsl #3]
	cbz	x22, LBB0_11
LBB0_15:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_13 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x22]
	cmp	x8, x21
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=3
	ldr	x22, [x22, #16]
	cbnz	x22, LBB0_15
	b	LBB0_11
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x24]
	add	x0, x8, x25, lsl #3
	ldr	w2, [x22, #8]
	mov	x1, x21
	mov	w3, #1
	mov	w4, #0
	bl	_netplay_input_state_for
	ldr	w0, [x0, #12]
	ldp	w8, w1, [x22, #8]
	lsl	w2, w8, #3
	bl	_memcpy
	b	LBB0_12
LBB0_18:
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NETPLAY_CONNECTION_SLAVE,8,3   ; @NETPLAY_CONNECTION_SLAVE
	.comm	_MAX_INPUT_DEVICES,8,3          ; @MAX_INPUT_DEVICES
.subsections_via_symbols
