	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UpdateGamepad
_UpdateGamepad:                         ## @UpdateGamepad
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_FCEUI_IsMovieActive
	testq	%rax, %rax
	js	LBB0_26
## %bb.1:
	xorb	$1, _UpdateGamepad.rapid(%rip)
	movq	_GamePadConfig@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%r15d, %r14d
	movl	%r14d, %r13d
	movq	%r12, %r15
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %rbx
	cmpq	$32, %rbx
	je	LBB0_25
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	callq	_DTestButton
	movl	$1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$4, %rdi
	callq	_DTestButton
	movl	$2, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %r12d
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %r12d
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$8, %rdi
	callq	_DTestButton
	movl	$4, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$12, %rdi
	callq	_DTestButton
	movl	$8, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	orl	%r13d, %r14d
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$16, %rdi
	callq	_DTestButton
	movl	$16, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %r13d
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%r14d, %r12d
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	orl	-52(%rbp), %r14d                ## 4-byte Folded Reload
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$20, %rdi
	callq	_DTestButton
	movl	$32, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%ecx, %r13d
	orl	%r14d, %r12d
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$24, %rdi
	callq	_DTestButton
	movl	$64, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%ecx, %r13d
	orl	%r13d, %r12d
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$28, %rdi
	callq	_DTestButton
	movl	$128, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	testq	%rax, %rax
	movl	$0, %eax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %eax
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	orl	%r12d, %r13d
	cmpl	$0, _UpdateGamepad.rapid(%rip)
	je	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$32, %rdi
	callq	_DTestButton
	xorl	%r14d, %r14d
	movq	%r15, %rcx
	movl	$0, %r15d
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %r15d                ## 4-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%r13d, %r15d
	movq	%rcx, %r12
	movq	(%rcx), %rax
	movq	(%rax,%rbx), %rdi
	addq	$36, %rdi
	callq	_DTestButton
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_23
LBB0_25:
	movq	_JSreturn@GOTPCREL(%rip), %rax
	movl	%r13d, (%rax)
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_UpdateGamepad.rapid,4,2 ## @UpdateGamepad.rapid
	.comm	_GamePadConfig,8,3              ## @GamePadConfig
	.comm	_JSreturn,4,2                   ## @JSreturn
	.no_dead_strip	_UpdateGamepad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UpdateGamepad
_UpdateGamepad:                         ; @UpdateGamepad
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_FCEUI_IsMovieActive
	tbnz	x0, #63, LBB0_6
; %bb.1:
	mov	x19, #0
	mov	w24, #0
	adrp	x9, _UpdateGamepad.rapid@PAGE
	ldr	w8, [x9, _UpdateGamepad.rapid@PAGEOFF]
	eor	w8, w8, #0x1
Lloh0:
	adrp	x21, _GamePadConfig@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GamePadConfig@GOTPAGEOFF]
	str	w8, [x9, _UpdateGamepad.rapid@PAGEOFF]
	mov	w25, #8
	mov	w26, #16
	mov	w27, #32
	mov	w28, #64
	mov	w22, #128
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #8
	cmp	x19, #32
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x0, [x8, x19]
	bl	_DTestButton
	mov	w8, #1
	lsl	w23, w8, w19
	cmp	x0, #0
	csel	w8, wzr, w23, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #4
	bl	_DTestButton
	mov	w8, #2
	lsl	w20, w8, w19
	cmp	x0, #0
	csel	w8, wzr, w20, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #8
	bl	_DTestButton
	mov	w8, #4
	lsl	w8, w8, w19
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #12
	bl	_DTestButton
	lsl	w8, w25, w19
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #16
	bl	_DTestButton
	lsl	w8, w26, w19
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #20
	bl	_DTestButton
	lsl	w8, w27, w19
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #24
	bl	_DTestButton
	lsl	w8, w28, w19
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w24, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #28
	bl	_DTestButton
	lsl	w8, w22, w19
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w24, w8, w24
Lloh2:
	adrp	x8, _UpdateGamepad.rapid@PAGE
Lloh3:
	ldr	w8, [x8, _UpdateGamepad.rapid@PAGEOFF]
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #32
	bl	_DTestButton
	cmp	x0, #0
	csel	w8, wzr, w23, eq
	orr	w23, w8, w24
	ldr	x8, [x21]
	ldr	x8, [x8, x19]
	add	x0, x8, #36
	bl	_DTestButton
	cmp	x0, #0
	csel	w8, wzr, w20, eq
	orr	w24, w8, w23
	b	LBB0_2
LBB0_5:
Lloh4:
	adrp	x8, _JSreturn@GOTPAGE
Lloh5:
	ldr	x8, [x8, _JSreturn@GOTPAGEOFF]
Lloh6:
	str	w24, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_UpdateGamepad.rapid,4,2 ; @UpdateGamepad.rapid
	.comm	_GamePadConfig,8,3              ; @GamePadConfig
	.comm	_JSreturn,4,2                   ; @JSreturn
	.no_dead_strip	_UpdateGamepad
.subsections_via_symbols
