	.file	"extr_input_hid_common.c_gamepad_get_axis_value.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	gamepad_get_axis_value
	.type	gamepad_get_axis_value, @function
gamepad_get_axis_value:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, rdi
	test	rsi, rsi
	je	.L2
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 130
	je	.L3
	jg	.L4
	cmp	eax, 128
	je	.L5
	cmp	eax, 129
	jne	.L10
	mov	rax, QWORD PTR RETRO_DEVICE_ID_ANALOG_X[rip]
	mov	rcx, QWORD PTR RETRO_DEVICE_INDEX_ANALOG_RIGHT[rip]
	sal	rax, 2
	lea	rax, [rax+rcx*8]
	mov	edi, DWORD PTR [rdi+rax]
.L7:
	mov	esi, DWORD PTR 4[rsi]
	jmp	gamepad_clamp_axis@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	xor	edi, edi
	cmp	eax, 131
	jne	.L7
	mov	rax, QWORD PTR RETRO_DEVICE_ID_ANALOG_X[rip]
	mov	rcx, QWORD PTR RETRO_DEVICE_INDEX_ANALOG_LEFT[rip]
	mov	esi, DWORD PTR 4[rsi]
	sal	rax, 2
	lea	rax, [rax+rcx*8]
	mov	edi, DWORD PTR [rdx+rax]
	jmp	gamepad_clamp_axis@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR RETRO_DEVICE_ID_ANALOG_Y[rip]
	mov	rcx, QWORD PTR RETRO_DEVICE_INDEX_ANALOG_RIGHT[rip]
	mov	esi, DWORD PTR 4[rsi]
	sal	rax, 2
	lea	rax, [rax+rcx*8]
	mov	edi, DWORD PTR [rdi+rax]
	jmp	gamepad_clamp_axis@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR RETRO_DEVICE_ID_ANALOG_Y[rip]
	mov	rcx, QWORD PTR RETRO_DEVICE_INDEX_ANALOG_LEFT[rip]
	mov	esi, DWORD PTR 4[rsi]
	sal	rax, 2
	lea	rax, [rax+rcx*8]
	mov	edi, DWORD PTR [rdi+rax]
	jmp	gamepad_clamp_axis@PLT
.L10:
	xor	edi, edi
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	gamepad_get_axis_value, .-gamepad_get_axis_value
	.comm	RETRO_DEVICE_INDEX_ANALOG_RIGHT,8,8
	.comm	RETRO_DEVICE_INDEX_ANALOG_LEFT,8,8
	.comm	RETRO_DEVICE_ID_ANALOG_Y,8,8
	.comm	RETRO_DEVICE_ID_ANALOG_X,8,8
	.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_input_hid_common.c_gamepad_get_axis_value.c"
	.text
	.align	2
	.global	gamepad_get_axis_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	gamepad_get_axis_value, %function
gamepad_get_axis_value:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	@ link register save eliminated.
	cmp	r1, #0
	beq	.L2
	ldr	r3, [r1]
	sub	r3, r3, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L9
.L5:
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L4
.L4:
	ldr	r3, .L13
	ldr	r2, .L13+4
.L11:
	ldr	r3, [r3]
	ldr	r2, [r2]
	lsl	r3, r3, #2
	add	r3, r3, r2, lsl #3
	ldr	r0, [r0, r3]
.L3:
	ldr	r1, [r1, #4]
	b	gamepad_clamp_axis
.L8:
	ldr	r3, .L13+8
.L10:
	ldr	r2, .L13+12
	b	.L11
.L7:
	ldr	r3, .L13
	b	.L10
.L6:
	ldr	r3, .L13+8
	ldr	r2, .L13+4
	b	.L11
.L2:
	mov	r0, r1
	bx	lr
.L9:
	mov	r0, #0
	b	.L3
.L14:
	.align	2
.L13:
	.word	RETRO_DEVICE_ID_ANALOG_X
	.word	RETRO_DEVICE_INDEX_ANALOG_LEFT
	.word	RETRO_DEVICE_ID_ANALOG_Y
	.word	RETRO_DEVICE_INDEX_ANALOG_RIGHT
	.size	gamepad_get_axis_value, .-gamepad_get_axis_value
	.comm	RETRO_DEVICE_INDEX_ANALOG_RIGHT,4,4
	.comm	RETRO_DEVICE_INDEX_ANALOG_LEFT,4,4
	.comm	RETRO_DEVICE_ID_ANALOG_Y,4,4
	.comm	RETRO_DEVICE_ID_ANALOG_X,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
