	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function in_gp2x_clean_binds
_in_gp2x_clean_binds:                   ## @in_gp2x_clean_binds
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	_IN_GP2X_NBUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	_IN_BINDTYPE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	movq	_in_gp2x_keys@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_IN_GP2X_NBUTTONS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	%ecx, %rdx
	cmpq	%rdx, %r12
	jge	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$1, (%r14,%rax,4)
	sbbl	$-1, %r13d
	incl	%ebx
	movq	_IN_BINDTYPE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_IN_BIND_OFFS
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%r12,8)
	cltq
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, (%rcx,%rax,4)
	movl	$0, (%r14,%rax,4)
	jmp	LBB0_7
LBB0_1:
	xorl	%r13d, %r13d
LBB0_10:
	movq	_GP2X_BTN_PUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_in_gp2x_combo_keys@GOTPCREL(%rip), %rdx
	movq	_in_gp2x_combo_acts@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	callq	_in_combos_find
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IN_GP2X_NBUTTONS,4,2           ## @IN_GP2X_NBUTTONS
	.comm	_IN_BINDTYPE_COUNT,4,2          ## @IN_BINDTYPE_COUNT
	.comm	_in_gp2x_keys,8,3               ## @in_gp2x_keys
	.comm	_GP2X_BTN_PUSH,4,2              ## @GP2X_BTN_PUSH
	.comm	_in_gp2x_combo_keys,4,2         ## @in_gp2x_combo_keys
	.comm	_in_gp2x_combo_acts,4,2         ## @in_gp2x_combo_acts
	.comm	_GP2X_BTN_SELECT,8,3            ## @GP2X_BTN_SELECT
	.comm	_GP2X_BTN_VOL_DOWN,8,3          ## @GP2X_BTN_VOL_DOWN
	.comm	_GP2X_BTN_VOL_UP,8,3            ## @GP2X_BTN_VOL_UP
	.comm	_IN_BINDTYPE_EMU,4,2            ## @IN_BINDTYPE_EMU
	.comm	_PEV_MENU,4,2                   ## @PEV_MENU
	.comm	_PEV_VOL_DOWN,4,2               ## @PEV_VOL_DOWN
	.comm	_PEV_VOL_UP,4,2                 ## @PEV_VOL_UP
	.comm	_eb,4,2                         ## @eb
	.comm	_have_menu,4,2                  ## @have_menu
	.comm	_have_vol,4,2                   ## @have_vol
	.no_dead_strip	_in_gp2x_clean_binds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function in_gp2x_clean_binds
_in_gp2x_clean_binds:                   ; @in_gp2x_clean_binds
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
Lloh0:
	adrp	x24, _IN_GP2X_NBUTTONS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IN_GP2X_NBUTTONS@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x21, x2
	mov	x22, #0
	mov	w20, #0
Lloh2:
	adrp	x25, _IN_BINDTYPE_COUNT@GOTPAGE
Lloh3:
	ldr	x25, [x25, _IN_BINDTYPE_COUNT@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh4:
	adrp	x26, _in_gp2x_keys@GOTPAGE
Lloh5:
	ldr	x26, [x26, _in_gp2x_keys@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x22, w9, sxtw
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w23, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x19, x8, lsl #2]
	cmp	w8, #0
	cinc	w20, w20, ne
	add	w23, w23, #1
	ldr	w8, [x25]
	cmp	w23, w8
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x23
	bl	_IN_BIND_OFFS
	ldr	x8, [x26]
	ldr	x9, [x8, x22, lsl #3]
	sxtw	x8, w0
	cbnz	x9, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	lsl	x9, x8, #2
	str	wzr, [x21, x9]
	str	wzr, [x19, x9]
	b	LBB0_6
LBB0_9:
	mov	w20, #0
LBB0_10:
Lloh6:
	adrp	x8, _GP2X_BTN_PUSH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GP2X_BTN_PUSH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, _in_gp2x_combo_keys@GOTPAGE
Lloh10:
	ldr	x2, [x2, _in_gp2x_combo_keys@GOTPAGEOFF]
Lloh11:
	adrp	x3, _in_gp2x_combo_acts@GOTPAGE
Lloh12:
	ldr	x3, [x3, _in_gp2x_combo_acts@GOTPAGEOFF]
	mov	x0, x19
	bl	_in_combos_find
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IN_GP2X_NBUTTONS,4,2           ; @IN_GP2X_NBUTTONS
	.comm	_IN_BINDTYPE_COUNT,4,2          ; @IN_BINDTYPE_COUNT
	.comm	_in_gp2x_keys,8,3               ; @in_gp2x_keys
	.comm	_GP2X_BTN_PUSH,4,2              ; @GP2X_BTN_PUSH
	.comm	_in_gp2x_combo_keys,4,2         ; @in_gp2x_combo_keys
	.comm	_in_gp2x_combo_acts,4,2         ; @in_gp2x_combo_acts
	.comm	_GP2X_BTN_SELECT,8,3            ; @GP2X_BTN_SELECT
	.comm	_GP2X_BTN_VOL_DOWN,8,3          ; @GP2X_BTN_VOL_DOWN
	.comm	_GP2X_BTN_VOL_UP,8,3            ; @GP2X_BTN_VOL_UP
	.comm	_IN_BINDTYPE_EMU,4,2            ; @IN_BINDTYPE_EMU
	.comm	_PEV_MENU,4,2                   ; @PEV_MENU
	.comm	_PEV_VOL_DOWN,4,2               ; @PEV_VOL_DOWN
	.comm	_PEV_VOL_UP,4,2                 ; @PEV_VOL_UP
	.comm	_eb,4,2                         ; @eb
	.comm	_have_menu,4,2                  ; @have_menu
	.comm	_have_vol,4,2                   ; @have_vol
	.no_dead_strip	_in_gp2x_clean_binds
.subsections_via_symbols
