	.file	"extr_netplay_frontend.c_netplay_input_state.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	netplay_input_state, @function
netplay_input_state:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, ecx
	mov	ecx, DWORD PTR MAX_INPUT_DEVICES[rip]
	mov	rax, QWORD PTR 8[rdi]
	cmp	QWORD PTR 32[rdi], 0
	cmovne	rax, QWORD PTR [rdi]
	cmp	ecx, esi
	jbe	.L30
	mov	r12, rax
	mov	esi, esi
	cmp	edx, 131
	je	.L5
	mov	r10, QWORD PTR 16[rdi]
	mov	r11d, DWORD PTR RETRO_DEVICE_MASK[rip]
	mov	eax, DWORD PTR [r10+rsi*4]
	and	eax, r11d
	cmp	eax, edx
	je	.L5
	test	ecx, ecx
	je	.L30
	lea	ebp, -1[rcx]
	xor	eax, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L33:
	lea	esi, 1[rax]
	lea	r9, 1[rax]
	cmp	rax, rbp
	je	.L7
	mov	rax, r9
.L8:
	mov	r9d, DWORD PTR [r10+rax*4]
	mov	esi, eax
	and	r9d, r11d
	cmp	r9d, edx
	jne	.L33
.L7:
	cmp	ecx, esi
	je	.L30
.L5:
	mov	rax, QWORD PTR 24[rdi]
	mov	rax, QWORD PTR [rax+r12*8]
	mov	rbp, QWORD PTR [rax+rsi*8]
	test	rbp, rbp
	je	.L30
	mov	eax, DWORD PTR 16[rbp]
	test	eax, eax
	je	.L30
	mov	rax, QWORD PTR 0[rbp]
	test	rax, rax
	je	.L30
	mov	r12, QWORD PTR 8[rbp]
	cmp	edx, 131
	je	.L9
	ja	.L10
	cmp	edx, 130
	jne	.L34
	mov	edi, r8d
	call	netplay_key_hton@PLT
	cmp	DWORD PTR NETPLAY_KEY_UNKNOWN[rip], eax
	mov	ecx, eax
	je	.L30
	shr	eax, 5
	cmp	rax, QWORD PTR 0[rbp]
	jg	.L30
	mov	eax, DWORD PTR [r12+rax*4]
	shr	eax, cl
	and	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	cmp	edx, 127
	ja	.L12
	.p2align 4,,10
	.p2align 3
.L30:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.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
.L10:
	.cfi_restore_state
	cmp	edx, 132
	jne	.L30
	cmp	rax, 3
	jne	.L30
	lea	eax, 1[rbx]
	mov	ecx, r8d
	mov	eax, DWORD PTR [r12+rax*4]
	sal	ecx, 4
	sar	eax, cl
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	rax, 2
	jne	.L30
	cmp	DWORD PTR RETRO_DEVICE_ID_MOUSE_Y[rip], r8d
	jnb	.L35
	mov	eax, DWORD PTR [r12]
.L31:
	mov	ecx, r8d
	sar	eax, cl
	and	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	DWORD PTR RETRO_DEVICE_ID_JOYPAD_MASK[rip], r8d
	mov	eax, DWORD PTR [r12]
	jne	.L31
	jmp	.L1
.L35:
	mov	eax, DWORD PTR 4[r12]
	mov	ecx, r8d
	sal	ecx, 4
	sar	eax, cl
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	netplay_input_state, .-netplay_input_state
	.comm	RETRO_DEVICE_MASK,4,4
	.comm	RETRO_DEVICE_ID_MOUSE_Y,4,4
	.comm	RETRO_DEVICE_ID_JOYPAD_MASK,4,4
	.comm	NETPLAY_KEY_UNKNOWN,4,4
	.comm	MAX_INPUT_DEVICES,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_frontend.c_netplay_input_state.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netplay_input_state, %function
netplay_input_state:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldm	r0, {r5, ip}
	ldr	r4, .L35
	ldr	lr, [r0, #16]
	ldr	r4, [r4]
	cmp	lr, #0
	moveq	r5, ip
	cmp	r4, r1
	bls	.L15
	cmp	r2, #131
	lsl	ip, r1, #2
	beq	.L5
	ldr	lr, [r0, #8]
	ldr	r6, .L35+4
	ldr	r1, [lr, r1, lsl #2]
	ldr	r6, [r6]
	and	r1, r1, r6
	cmp	r1, r2
	beq	.L5
	cmp	r4, #0
	beq	.L15
	mov	ip, #0
	sub	lr, lr, #4
	b	.L8
.L34:
	add	ip, ip, #1
	cmp	r4, ip
	beq	.L15
.L8:
	ldr	r1, [lr, #4]!
	and	r1, r1, r6
	cmp	r1, r2
	bne	.L34
	cmp	r4, ip
	beq	.L15
	lsl	ip, ip, #2
.L5:
	ldr	r1, [r0, #12]
	ldr	r1, [r1, r5, lsl #2]
	ldr	r4, [r1, ip]
	cmp	r4, #0
	beq	.L15
	ldr	r1, [r4, #8]
	cmp	r1, #0
	beq	.L15
	ldr	r1, [r4]
	cmp	r1, #0
	beq	.L15
	sub	r2, r2, #128
	ldr	r5, [r4, #4]
	cmp	r2, #4
	ldrls	pc, [pc, r2, asl #2]
	b	.L15
.L10:
	.word	.L13
	.word	.L13
	.word	.L12
	.word	.L11
	.word	.L9
.L15:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L13:
	cmp	r1, #2
	bne	.L15
	ldr	r3, .L35+8
	ldr	r2, [sp, #16]
	ldr	r3, [r3]
	cmp	r3, r2
	movcs	r3, r2
	ldrcs	r0, [r5, #4]
	lslcs	r3, r3, #4
	ldrcc	r3, [sp, #16]
	asrcs	r0, r0, r3
	ldrcc	r0, [r5]
	asrcc	r0, r0, r3
	andcc	r0, r0, #1
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r0, [sp, #16]
	bl	netplay_key_hton
	ldr	r3, .L35+12
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L15
	ldr	r3, [r4]
	lsr	r2, r0, #5
	cmp	r3, r0, lsr #5
	bcc	.L15
	ldr	r3, [r5, r2, lsl #2]
	and	r0, r0, #31
	lsr	r0, r3, r0
	and	r0, r0, #1
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r3, .L35+16
	ldr	r2, [sp, #16]
	ldr	r3, [r3]
	ldr	r0, [r5]
	cmp	r3, r2
	movne	r3, r2
	asrne	r0, r0, r3
	andne	r0, r0, #1
	pop	{r4, r5, r6, pc}
.L9:
	cmp	r1, #3
	bne	.L15
	add	r3, r3, #1
	ldr	r0, [r5, r3, lsl #2]
	ldr	r3, [sp, #16]
	lsl	r3, r3, #4
	asr	r0, r0, r3
	pop	{r4, r5, r6, pc}
.L36:
	.align	2
.L35:
	.word	MAX_INPUT_DEVICES
	.word	RETRO_DEVICE_MASK
	.word	RETRO_DEVICE_ID_MOUSE_Y
	.word	NETPLAY_KEY_UNKNOWN
	.word	RETRO_DEVICE_ID_JOYPAD_MASK
	.size	netplay_input_state, .-netplay_input_state
	.comm	RETRO_DEVICE_MASK,4,4
	.comm	RETRO_DEVICE_ID_MOUSE_Y,4,4
	.comm	RETRO_DEVICE_ID_JOYPAD_MASK,4,4
	.comm	NETPLAY_KEY_UNKNOWN,4,4
	.comm	MAX_INPUT_DEVICES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
