	.file	"extr_cheat_manager.c_cheat_manager_apply_rumble.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cheat_manager_apply_rumble
	.type	cheat_manager_apply_rumble, @function
cheat_manager_apply_rumble:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR [rdi]
	add	eax, -128
	cmp	eax, 10
	ja	.L2
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L14-.L4
	.long	.L13-.L4
	.long	.L12-.L4
	.long	.L11-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L1-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	xor	edx, edx
	cmp	DWORD PTR 4[rdi], esi
	seta	dl
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR 12[rbx]
	mov	DWORD PTR 4[rbx], esi
	cmp	eax, 300
	jle	.L16
	test	edx, edx
	je	.L18
	xor	eax, eax
	call	cpu_features_get_time_usec@PLT
	mov	r8, rax
	imul	eax, DWORD PTR 24[rbx], 1000
	cdqe
	add	rax, r8
	mov	QWORD PTR 16[rbx], rax
	xor	eax, eax
	call	cpu_features_get_time_usec@PLT
	mov	edx, DWORD PTR 52[rbx]
	mov	edi, DWORD PTR 48[rbx]
	mov	r8, rax
	imul	eax, DWORD PTR 40[rbx], 1000
	mov	esi, DWORD PTR RETRO_RUMBLE_STRONG[rip]
	cdqe
	add	rax, r8
	mov	QWORD PTR 32[rbx], rax
	call	input_driver_set_rumble_state@PLT
	mov	edx, DWORD PTR 44[rbx]
	mov	edi, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR RETRO_RUMBLE_WEAK[rip]
	call	input_driver_set_rumble_state@PLT
.L18:
	mov	rbp, QWORD PTR 16[rbx]
	xor	eax, eax
	call	cpu_features_get_time_usec@PLT
	cmp	rbp, rax
	jg	.L19
	cmp	QWORD PTR 16[rbx], 0
	jne	.L29
.L20:
	mov	QWORD PTR 16[rbx], 0
.L21:
	mov	rbp, QWORD PTR 32[rbx]
	xor	eax, eax
	call	cpu_features_get_time_usec@PLT
	cmp	rbp, rax
	jg	.L22
	cmp	QWORD PTR 32[rbx], 0
	jne	.L30
.L23:
	mov	QWORD PTR 32[rbx], 0
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	edx, edx
	cmp	DWORD PTR 4[rdi], esi
	setne	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L14:
	xor	edx, edx
	cmp	DWORD PTR 8[rdi], esi
	setne	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L13:
	xor	edx, edx
	cmp	DWORD PTR 8[rdi], esi
	seta	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR 8[rdi]
	add	eax, DWORD PTR 4[rdi]
	xor	edx, edx
	cmp	eax, esi
	sete	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L11:
	xor	edx, edx
	cmp	DWORD PTR 4[rdi], esi
	setb	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	xor	edx, edx
	cmp	DWORD PTR 8[rdi], esi
	setb	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L9:
	xor	edx, edx
	cmp	DWORD PTR 8[rdi], esi
	sete	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L8:
	xor	edx, edx
	cmp	DWORD PTR 4[rdi], esi
	sete	dl
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 4[rdi]
	sub	eax, DWORD PTR 8[rdi]
	xor	edx, edx
	cmp	eax, esi
	sete	dl
	jmp	.L17
.L2:
	mov	eax, DWORD PTR 12[rdi]
	mov	DWORD PTR 4[rdi], esi
	cmp	eax, 300
	jg	.L18
.L16:
	add	eax, 1
	mov	DWORD PTR 12[rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	edx, DWORD PTR 44[rbx]
	mov	edi, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR RETRO_RUMBLE_WEAK[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	input_driver_set_rumble_state@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edx, DWORD PTR 52[rbx]
	mov	edi, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR RETRO_RUMBLE_STRONG[rip]
	call	input_driver_set_rumble_state@PLT
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR RETRO_RUMBLE_STRONG[rip]
	xor	edx, edx
	call	input_driver_set_rumble_state@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR RETRO_RUMBLE_WEAK[rip]
	xor	edx, edx
	call	input_driver_set_rumble_state@PLT
	jmp	.L23
	.cfi_endproc
.LFE0:
	.size	cheat_manager_apply_rumble, .-cheat_manager_apply_rumble
	.comm	RETRO_RUMBLE_WEAK,4,4
	.comm	RETRO_RUMBLE_STRONG,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_cheat_manager.c_cheat_manager_apply_rumble.c"
	.text
	.align	2
	.global	cheat_manager_apply_rumble
	.syntax unified
	.arm
	.fpu softvfp
	.type	cheat_manager_apply_rumble, %function
cheat_manager_apply_rumble:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	sub	r3, r3, #128
	mov	r4, r0
	cmp	r3, #10
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L14
	.word	.L13
	.word	.L12
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L1
	.word	.L6
	.word	.L5
	.word	.L3
.L1:
	pop	{r4, r5, r6, pc}
.L3:
	ldr	r3, [r0, #4]
	subs	r3, r3, r1
	movne	r3, #1
.L17:
	ldr	r2, [r4, #12]
	str	r1, [r4, #4]
	cmp	r2, #300
	ble	.L16
	cmp	r3, #0
	beq	.L18
	bl	cpu_features_get_time_usec
	ldr	r3, [r4, #20]
	rsb	r2, r3, r3, lsl #5
	add	r3, r3, r2, lsl #2
	add	r3, r0, r3, lsl #3
	str	r3, [r4, #16]
	bl	cpu_features_get_time_usec
	ldr	r3, [r4, #28]
	ldr	r2, .L37
	rsb	r1, r3, r3, lsl #5
	add	r3, r3, r1, lsl #2
	add	r3, r0, r3, lsl #3
	ldr	r1, [r2]
	str	r3, [r4, #24]
	ldr	r2, [r4, #40]
	ldr	r0, [r4, #36]
	bl	input_driver_set_rumble_state
	ldr	r3, .L37+4
	ldr	r2, [r4, #32]
	ldr	r1, [r3]
	ldr	r0, [r4, #36]
	bl	input_driver_set_rumble_state
.L18:
	ldr	r5, [r4, #16]
	bl	cpu_features_get_time_usec
	cmp	r5, r0
	bgt	.L19
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L35
.L20:
	mov	r3, #0
	str	r3, [r4, #16]
.L21:
	ldr	r5, [r4, #24]
	bl	cpu_features_get_time_usec
	cmp	r5, r0
	bgt	.L22
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L36
.L23:
	mov	r3, #0
	str	r3, [r4, #24]
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r3, [r0, #8]
	subs	r3, r3, r1
	movne	r3, #1
	b	.L17
.L13:
	ldr	r3, [r0, #8]
	cmp	r3, r1
	movls	r3, #0
	movhi	r3, #1
	b	.L17
.L12:
	ldmib	r0, {r2, r3}
	add	r3, r3, r2
	sub	r3, r3, r1
	clz	r3, r3
	lsr	r3, r3, #5
	b	.L17
.L11:
	ldr	r3, [r0, #4]
	cmp	r3, r1
	movcs	r3, #0
	movcc	r3, #1
	b	.L17
.L10:
	ldr	r3, [r0, #8]
	cmp	r3, r1
	movcs	r3, #0
	movcc	r3, #1
	b	.L17
.L9:
	ldr	r3, [r0, #8]
	sub	r3, r3, r1
	clz	r3, r3
	lsr	r3, r3, #5
	b	.L17
.L8:
	ldr	r3, [r0, #4]
	sub	r3, r3, r1
	clz	r3, r3
	lsr	r3, r3, #5
	b	.L17
.L6:
	ldr	r3, [r0, #4]
	ldr	r2, [r0, #8]
	sub	r3, r3, r2
	sub	r3, r3, r1
	clz	r3, r3
	lsr	r3, r3, #5
	b	.L17
.L5:
	ldr	r3, [r0, #4]
	cmp	r3, r1
	movls	r3, #0
	movhi	r3, #1
	b	.L17
.L2:
	ldr	r2, [r0, #12]
	str	r1, [r0, #4]
	cmp	r2, #300
	bgt	.L18
.L16:
	add	r2, r2, #1
	str	r2, [r4, #12]
	pop	{r4, r5, r6, pc}
.L22:
	ldr	r3, .L37+4
	ldr	r2, [r4, #32]
	ldr	r0, [r4, #36]
	ldr	r1, [r3]
	pop	{r4, r5, r6, lr}
	b	input_driver_set_rumble_state
.L19:
	ldr	r3, .L37
	ldr	r2, [r4, #40]
	ldr	r1, [r3]
	ldr	r0, [r4, #36]
	bl	input_driver_set_rumble_state
	b	.L21
.L35:
	ldr	r3, .L37
	mov	r2, #0
	ldr	r1, [r3]
	ldr	r0, [r4, #36]
	bl	input_driver_set_rumble_state
	b	.L20
.L36:
	ldr	r3, .L37+4
	mov	r2, #0
	ldr	r1, [r3]
	ldr	r0, [r4, #36]
	bl	input_driver_set_rumble_state
	b	.L23
.L38:
	.align	2
.L37:
	.word	RETRO_RUMBLE_STRONG
	.word	RETRO_RUMBLE_WEAK
	.size	cheat_manager_apply_rumble, .-cheat_manager_apply_rumble
	.comm	RETRO_RUMBLE_WEAK,4,4
	.comm	RETRO_RUMBLE_STRONG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
