	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function key_config_loop
_key_config_loop:                       ## @key_config_loop
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rdi, %r13
	movl	%edx, %eax
	shll	$16, %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_14 Depth 3
	movslq	%r14d, %r12
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_14 Depth 3
	movq	%r13, %rdi
	movl	%r15d, %edx
	movl	%esi, %ebx
	movl	%r14d, %ecx
	callq	_draw_key_config
	movq	_PBTN_HOME@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_CONFIGURABLE_KEYS@GOTPCREL(%rip), %rax
	orq	(%rax), %rdi
	callq	_in_menu_wait
	movl	%ebx, %esi
	movq	%rax, %rbx
	movq	_PBTN_HOME@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rcx
	andq	%rbx, %rcx
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	%rcx, %rdx
	movq	_PBTN_UP@GOTPCREL(%rip), %rcx
	testq	%rbx, (%rcx)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movq	_PBTN_DOWN@GOTPCREL(%rip), %rcx
	testq	%rbx, (%rcx)
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%rdx, %rcx
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	cmpl	%esi, %r14d
	jge	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=2
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	(%r13,%r12,4), %edi
	callq	_unbind_action
	movq	_PBTN_HOME@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rcx
	andq	%rbx, %rcx
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	notq	%rax
	andq	%rax, %rbx
	movq	_CONFIGURABLE_KEYS@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=3
	incq	%r14
	cmpq	$32, %r14
	je	LBB0_22
LBB0_14:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	cltq
	testq	%rax, %rbx
	je	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=3
	movl	(%r13,%r12,4), %edi
	movl	%r15d, %esi
	callq	_count_bound_keys
	movl	(%r13,%r12,4), %ecx
	cmpl	$2, %eax
	jl	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=3
	notl	%ecx
	movq	_currentConfig@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andl	(%rax,%r14,4), %ecx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=3
	movq	_currentConfig@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	(%rax,%r14,4), %ecx
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=3
	movl	%ecx, (%rax,%r14,4)
	testl	%r15d, %r15d
	js	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=3
	testl	%ecx, (%r13,%r12,4)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=3
	andl	$-196609, %ecx                  ## imm = 0xFFFCFFFF
	orl	-68(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, (%rax,%r14,4)
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	_PBTN_STOP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PBTN_PLAY@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	testq	%rbx, %rax
	je	LBB0_2
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	leal	-1(%rax), %eax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmovlel	%esi, %eax
	movl	%eax, %r14d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%esi, %r14d
	leal	1(%r14), %eax
	movl	$0, %ecx
	cmovgel	%ecx, %eax
	movl	%eax, %r14d
	jmp	LBB0_1
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIGURABLE_KEYS,8,3          ## @CONFIGURABLE_KEYS
	.comm	_PBTN_HOME,8,3                  ## @PBTN_HOME
	.comm	_PBTN_UP,8,3                    ## @PBTN_UP
	.comm	_PBTN_DOWN,8,3                  ## @PBTN_DOWN
	.comm	_PBTN_PLAY,8,3                  ## @PBTN_PLAY
	.comm	_PBTN_STOP,8,3                  ## @PBTN_STOP
	.comm	_currentConfig,8,3              ## @currentConfig
	.no_dead_strip	_key_config_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function key_config_loop
_key_config_loop:                       ; @key_config_loop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w8, #0
Lloh0:
	adrp	x24, _PBTN_HOME@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PBTN_HOME@GOTPAGEOFF]
	lsl	w26, w2, #16
	mov	w28, #1
Lloh2:
	adrp	x27, _currentConfig@GOTPAGE
Lloh3:
	ldr	x27, [x27, _currentConfig@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	mov	w25, #0
	sxtw	x22, w8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=2
Lloh4:
	adrp	x24, _PBTN_HOME@GOTPAGE
Lloh5:
	ldr	x24, [x24, _PBTN_HOME@GOTPAGEOFF]
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_draw_key_config
Lloh6:
	adrp	x8, _CONFIGURABLE_KEYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONFIGURABLE_KEYS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x24]
	orr	x0, x9, x8
	bl	_in_menu_wait
	mov	x23, x0
	ldr	x8, [x24]
	ands	x9, x8, x0
	b.eq	LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	cmp	w22, w20
	b.ge	LBB0_18
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=2
	cmp	x9, #0
	ccmp	w25, #0, #0, ne
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w0, [x21, x22, lsl #2]
	bl	_unbind_action
	ldr	x8, [x24]
	and	x9, x8, x23
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=2
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	mov	x25, #0
Lloh9:
	adrp	x9, _CONFIGURABLE_KEYS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CONFIGURABLE_KEYS@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	bic	x8, x23, x8
	and	x23, x8, x9
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=3
	add	x25, x25, #1
	cmp	x25, #32
	b.eq	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_3 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	lsl	w8, w28, w25
	sxtw	x8, w8
	tst	x23, x8
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	lsl	x24, x22, #2
	ldr	w0, [x21, x24]
	mov	x1, x19
	bl	_count_bound_keys
	ldr	w9, [x21, x24]
	lsl	x10, x25, #2
	cmp	w0, #2
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=3
	ldr	x8, [x27]
	ldr	w11, [x8, x10]
	bic	w9, w11, w9
	str	w9, [x8, x10]
	tbz	w19, #31, LBB0_13
	b	LBB0_8
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=3
	ldr	x8, [x27]
	ldr	w11, [x8, x10]
	eor	w9, w11, w9
	str	w9, [x8, x10]
	tbnz	w19, #31, LBB0_8
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=3
	ldr	w10, [x21, x22, lsl #2]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=3
	and	w9, w9, #0xfffcffff
	orr	w9, w9, w26
	str	w9, [x8, x25, lsl #2]
	b	LBB0_8
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=2
Lloh12:
	adrp	x10, _PBTN_UP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PBTN_UP@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	tst	x10, x23
	b.ne	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=2
Lloh15:
	adrp	x10, _PBTN_DOWN@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PBTN_DOWN@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	tst	x10, x23
	b.ne	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=2
	mov	w25, #0
	cmp	w22, w20
	b.lt	LBB0_5
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=2
Lloh18:
	adrp	x8, _PBTN_PLAY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PBTN_PLAY@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _PBTN_STOP@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PBTN_STOP@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	orr	x8, x9, x8
	tst	x8, x23
	b.eq	LBB0_3
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w8, w22, #1
	csel	w8, w20, w8, lt
	b	LBB0_1
LBB0_20:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w22, w20
	csinc	w8, wzr, w22, ge
	b	LBB0_1
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIGURABLE_KEYS,8,3          ; @CONFIGURABLE_KEYS
	.comm	_PBTN_HOME,8,3                  ; @PBTN_HOME
	.comm	_PBTN_UP,8,3                    ; @PBTN_UP
	.comm	_PBTN_DOWN,8,3                  ; @PBTN_DOWN
	.comm	_PBTN_PLAY,8,3                  ; @PBTN_PLAY
	.comm	_PBTN_STOP,8,3                  ; @PBTN_STOP
	.comm	_currentConfig,8,3              ; @currentConfig
	.no_dead_strip	_key_config_loop
.subsections_via_symbols
