	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netplay_input_state
_netplay_input_state:                   ## @netplay_input_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $ecx killed $ecx def $rcx
                                        ## kill: def $edx killed $edx def $rdx
	xorl	%eax, %eax
	cmpq	$0, 32(%rdi)
	sete	%r9b
	movq	_MAX_INPUT_DEVICES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	cmpl	%esi, %ebx
	jbe	LBB0_7
## %bb.1:
	movb	%r9b, %al
	movq	(%rdi,%rax,8), %r9
	cmpl	$131, %edx
	je	LBB0_9
## %bb.2:
	movq	16(%rdi), %r10
	movl	%esi, %r11d
	movq	_RETRO_DEVICE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%r10,%r11,4), %eax
	andl	%r14d, %eax
	cmpl	%edx, %eax
	je	LBB0_9
## %bb.3:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, %eax
	movl	(%r10,%rax,4), %eax
	andl	%r14d, %eax
	cmpl	%edx, %eax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%esi
	cmpl	%esi, %ebx
	jne	LBB0_4
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	cmpl	%esi, %ebx
	je	LBB0_32
LBB0_9:
	movq	24(%rdi), %rax
	movq	(%rax,%r9,8), %rax
	movl	%esi, %esi
	movq	(%rax,%rsi,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.10:
	cmpl	$0, 16(%rbx)
	je	LBB0_7
## %bb.11:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.12:
	addl	$-128, %edx
	cmpl	$4, %edx
	ja	LBB0_7
## %bb.13:
	movq	8(%rbx), %r14
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdx,4), %rdx
	addq	%rax, %rdx
	jmpq	*%rdx
LBB0_14:
	movl	$0, %eax
	cmpq	$2, %rsi
	jne	LBB0_32
## %bb.15:
	movq	_RETRO_DEVICE_ID_MOUSE_Y@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	jae	LBB0_30
## %bb.16:
	movl	(%r14), %ecx
	xorl	%eax, %eax
	btl	%r8d, %ecx
	jmp	LBB0_29
LBB0_20:
	movl	$0, %eax
	cmpq	$3, %rsi
	jne	LBB0_32
## %bb.21:
	incl	%ecx
	movl	(%r14,%rcx,4), %eax
	jmp	LBB0_31
LBB0_23:
	movl	%r8d, %edi
	callq	_netplay_key_hton
	movl	%eax, %ecx
	movq	_NETPLAY_KEY_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_27
LBB0_7:
	xorl	%eax, %eax
LBB0_32:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_25:
	movq	_RETRO_DEVICE_ID_JOYPAD_MASK@GOTPCREL(%rip), %rcx
	movl	(%r14), %eax
	cmpl	%r8d, (%rcx)
	je	LBB0_32
## %bb.26:
	xorl	%ecx, %ecx
	btl	%r8d, %eax
	setb	%cl
	movl	%ecx, %eax
	jmp	LBB0_32
LBB0_27:
	movl	%ecx, %edx
	shrl	$5, %edx
	movl	$0, %eax
	cmpq	%rdx, (%rbx)
	jl	LBB0_32
## %bb.28:
	movl	(%r14,%rdx,4), %edx
	xorl	%eax, %eax
	btl	%ecx, %edx
LBB0_29:
	setb	%al
	jmp	LBB0_32
LBB0_30:
	movl	4(%r14), %eax
LBB0_31:
	shll	$4, %r8d
	movl	%r8d, %ecx
	sarl	%cl, %eax
	jmp	LBB0_32
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_23
	.long	L0_0_set_25
	.long	L0_0_set_20
	.end_data_region
                                        ## -- End function
	.comm	_MAX_INPUT_DEVICES,4,2          ## @MAX_INPUT_DEVICES
	.comm	_RETRO_DEVICE_MASK,4,2          ## @RETRO_DEVICE_MASK
	.comm	_RETRO_DEVICE_ID_JOYPAD_MASK,4,2 ## @RETRO_DEVICE_ID_JOYPAD_MASK
	.comm	_RETRO_DEVICE_ID_MOUSE_Y,4,2    ## @RETRO_DEVICE_ID_MOUSE_Y
	.comm	_NETPLAY_KEY_UNKNOWN,4,2        ## @NETPLAY_KEY_UNKNOWN
	.no_dead_strip	_netplay_input_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netplay_input_state
_netplay_input_state:                   ; @netplay_input_state
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #32]
	cmp	x8, #0
	cset	w8, eq
Lloh0:
	adrp	x9, _MAX_INPUT_DEVICES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_INPUT_DEVICES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w1
	b.ls	LBB0_19
; %bb.1:
	ldr	x8, [x0, w8, uxtw #3]
	cmp	w2, #131
	b.eq	LBB0_7
; %bb.2:
	ldr	x10, [x0, #16]
	ldr	w12, [x10, w1, uxtw #2]
Lloh3:
	adrp	x11, _RETRO_DEVICE_MASK@GOTPAGE
Lloh4:
	ldr	x11, [x11, _RETRO_DEVICE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	and	w12, w11, w12
	cmp	w12, w2
	b.eq	LBB0_7
; %bb.3:
	mov	w1, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10, w1, uxtw #2]
	and	w12, w12, w11
	cmp	w12, w2
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w1, #1
	cmp	w9, w1
	b.ne	LBB0_4
	b	LBB0_19
LBB0_6:
	cmp	w9, w1
	b.eq	LBB0_19
LBB0_7:
	ldr	x9, [x0, #24]
	ldr	x8, [x9, x8, lsl #3]
	ldr	x20, [x8, w1, uxtw #3]
	cbz	x20, LBB0_19
; %bb.8:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_19
; %bb.9:
	ldr	x8, [x20]
	cbz	x8, LBB0_19
; %bb.10:
	sub	w9, w2, #128
	cmp	w9, #4
	b.hi	LBB0_19
; %bb.11:
	ldr	x19, [x20, #8]
Lloh6:
	adrp	x10, lJTI0_0@PAGE
Lloh7:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_12
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_12:
	cmp	x8, #2
	b.ne	LBB0_19
; %bb.13:
Lloh8:
	adrp	x8, _RETRO_DEVICE_ID_MOUSE_Y@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RETRO_DEVICE_ID_MOUSE_Y@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w4
	b.hs	LBB0_23
; %bb.14:
	ldr	w8, [x19]
	lsr	w8, w8, w4
	b	LBB0_26
LBB0_15:
	cmp	x8, #3
	b.ne	LBB0_19
; %bb.16:
	add	w8, w3, #1
	ldr	w8, [x19, w8, uxtw #2]
	b	LBB0_24
LBB0_17:
	mov	x0, x4
	bl	_netplay_key_hton
Lloh11:
	adrp	x8, _NETPLAY_KEY_UNKNOWN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NETPLAY_KEY_UNKNOWN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_19
; %bb.18:
	lsr	w8, w0, #5
	ldr	x9, [x20]
	cmp	x9, x8
	b.ge	LBB0_25
LBB0_19:
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_21:
Lloh14:
	adrp	x8, _RETRO_DEVICE_ID_JOYPAD_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RETRO_DEVICE_ID_JOYPAD_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w0, [x19]
	cmp	w8, w4
	b.eq	LBB0_20
; %bb.22:
	lsr	w8, w0, w4
	b	LBB0_26
LBB0_23:
	ldr	w8, [x19, #4]
LBB0_24:
	lsl	w9, w4, #4
	asr	w0, w8, w9
	b	LBB0_20
LBB0_25:
	ldr	w8, [x19, x8, lsl #2]
	lsr	w8, w8, w0
LBB0_26:
	and	w0, w8, #0x1
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_17-LBB0_12)>>2
	.byte	(LBB0_21-LBB0_12)>>2
	.byte	(LBB0_15-LBB0_12)>>2
                                        ; -- End function
	.comm	_MAX_INPUT_DEVICES,4,2          ; @MAX_INPUT_DEVICES
	.comm	_RETRO_DEVICE_MASK,4,2          ; @RETRO_DEVICE_MASK
	.comm	_RETRO_DEVICE_ID_JOYPAD_MASK,4,2 ; @RETRO_DEVICE_ID_JOYPAD_MASK
	.comm	_RETRO_DEVICE_ID_MOUSE_Y,4,2    ; @RETRO_DEVICE_ID_MOUSE_Y
	.comm	_NETPLAY_KEY_UNKNOWN,4,2        ; @NETPLAY_KEY_UNKNOWN
	.no_dead_strip	_netplay_input_state
.subsections_via_symbols
