	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function draw_key_config
_draw_key_config:                       ## @draw_key_config
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -160(%rbp)                ## 4-byte Spill
	movl	%r8d, -156(%rbp)                ## 4-byte Spill
	movl	%ecx, -152(%rbp)                ## 4-byte Spill
	movl	%edx, %r15d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, -176(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%edx, %edx
	movl	$20, %eax
	movl	$30, %r12d
	cmovnsl	%eax, %r12d
	movq	_me_mfont_w@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	%edi, %r12d
	movq	_g_menuscreen_w@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%r12d, %ecx
	sarl	%ecx
	subl	%ecx, %eax
	movq	_g_menuscreen_h@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_me_mfont_h@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leal	(,%rdx,4), %ebx
	subl	%ebx, %ecx
	movl	%ecx, %r14d
	shrl	$31, %r14d
	addl	%ecx, %r14d
	movq	%rsi, %r13
	leal	2(%rsi), %ecx
	imull	%edx, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%r14d
	sarl	%edx
	subl	%edx, %r14d
	addl	%edi, %edi
	cmpl	%edi, %eax
	cmovgl	%eax, %edi
	movl	%edi, -148(%rbp)                ## 4-byte Spill
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_menu_draw_begin
	testl	%r15d, %r15d
	movq	%r15, -168(%rbp)                ## 8-byte Spill
	js	LBB0_2
## %bb.1:
	leal	1(%r15), %ecx
	leaq	L_.str(%rip), %rdx
	movl	-148(%rbp), %edi                ## 4-byte Reload
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_text_out16
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdx
	movl	-148(%rbp), %edi                ## 4-byte Reload
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_text_out16
LBB0_3:
	movq	_me_mfont_h@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	leal	(%r14,%rax,2), %ebx
	movq	_me_mfont_w@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	-148(%rbp), %edi                ## 4-byte Reload
	subl	%ecx, %edi
	subl	%ecx, %edi
	movl	-152(%rbp), %esi                ## 4-byte Reload
	imull	%eax, %esi
	addl	%ebx, %esi
	leal	(%r12,%rcx,2), %edx
	callq	_menu_draw_selection
	testl	%r13d, %r13d
	movq	%r15, %rax
	movq	-168(%rbp), %r15                ## 8-byte Reload
	movq	-176(%rbp), %r12                ## 8-byte Reload
	jle	LBB0_6
## %bb.4:
	movl	%r13d, %edx
	movq	%rdx, -184(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r14,8), %esi
	movl	4(%r12,%r14,8), %edx
	movl	%edx, -152(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	movl	-156(%rbp), %edx                ## 4-byte Reload
	movq	%rax, %r13
	callq	_action_binds
	movl	-148(%rbp), %edi                ## 4-byte Reload
	movl	%ebx, %esi
	leaq	L_.str.2(%rip), %rdx
	movl	-152(%rbp), %ecx                ## 4-byte Reload
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_text_out16
	movq	%r13, %rax
	incq	%r14
	addl	(%r13), %ebx
	cmpq	%r14, -184(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_5
LBB0_6:
	movq	%rax, %r13
	movl	16(%rbp), %r14d
	xorl	%eax, %eax
	callq	_menu_separation
	movl	-156(%rbp), %edi                ## 4-byte Reload
	testl	%edi, %edi
	js	LBB0_7
## %bb.8:
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_in_get_dev_name
	movq	%rax, %r15
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.3(%rip), %r15
LBB0_9:
	movq	%r15, %rdi
	callq	_strlen
	movq	_me_mfont_w@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%ecx, %eax
	movl	%ecx, %edx
	shll	$5, %edx
	subl	%ecx, %edx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	cmovgl	%eax, %edx
	movq	_g_menuscreen_w@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	cmovgel	%eax, %edx
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	subl	%eax, %ebx
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.11:
	movq	_g_menuscreen_h@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	(%r13), %eax
	shll	$2, %eax
	subl	%eax, %esi
	leaq	L_.str.6(%rip), %rdx
	movl	%ebx, %edi
	jmp	LBB0_12
LBB0_10:
	movq	_PBTN_MOK@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movl	$-1, %edi
	callq	_in_get_key_name
	leaq	L_.str.4(%rip), %rdx
	leaq	-144(%rbp), %r14
	movq	%r14, %rdi
	movl	$32, %esi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	_PBTN_MA2@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movl	$-1, %edi
	callq	_in_get_key_name
	leaq	L_.str.5(%rip), %rdx
	leaq	-112(%rbp), %r12
	movq	%r12, %rdi
	movl	$64, %esi
	movq	%r14, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_snprintf
	movq	_g_menuscreen_h@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	(%r13), %eax
	shll	$2, %eax
	subl	%eax, %esi
	movl	%ebx, %edi
	movq	%r12, %rdx
LBB0_12:
	xorl	%eax, %eax
	callq	_text_out16
	cmpl	$2, -160(%rbp)                  ## 4-byte Folded Reload
	jl	LBB0_14
## %bb.13:
	movl	(%r14), %esi
	movl	(%r13), %eax
	leal	(%rax,%rax,2), %eax
	subl	%eax, %esi
	movl	%ebx, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_text_out16
	movl	(%r14), %esi
	movl	(%r13), %eax
	addl	%eax, %eax
	subl	%eax, %esi
	leaq	L_.str.7(%rip), %rdx
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_text_out16
LBB0_14:
	xorl	%eax, %eax
	callq	_menu_draw_end
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_me_mfont_w,4,2                 ## @me_mfont_w
	.comm	_g_menuscreen_w,4,2             ## @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ## @g_menuscreen_h
	.comm	_me_mfont_h,4,2                 ## @me_mfont_h
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Player %i controls"

L_.str.1:                               ## @.str.1
	.asciz	"Emulator controls"

L_.str.2:                               ## @.str.2
	.asciz	"%s : %s"

L_.str.3:                               ## @.str.3
	.asciz	"(all devices)"

L_.str.4:                               ## @.str.4
	.asciz	"%s"

	.comm	_PBTN_MOK,4,2                   ## @PBTN_MOK
L_.str.5:                               ## @.str.5
	.asciz	"%s - bind, %s - clear"

	.comm	_PBTN_MA2,4,2                   ## @PBTN_MA2
L_.str.6:                               ## @.str.6
	.asciz	"Press a button to bind/unbind"

L_.str.7:                               ## @.str.7
	.asciz	"Press left/right for other devs"

	.no_dead_strip	_draw_key_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_key_config
_draw_key_config:                       ; @draw_key_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	stp	w6, w5, [sp, #16]               ; 8-byte Folded Spill
	mov	x21, x4
	mov	x26, x3
	mov	x22, x2
	mov	x25, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	w8, #30
	mov	w9, #20
	cmp	w2, #0
	csel	w8, w9, w8, ge
Lloh3:
	adrp	x28, _me_mfont_w@GOTPAGE
Lloh4:
	ldr	x28, [x28, _me_mfont_w@GOTPAGEOFF]
	ldr	w9, [x28]
	mul	w20, w9, w8
Lloh5:
	adrp	x8, _g_menuscreen_w@GOTPAGE
Lloh6:
	ldr	x8, [x8, _g_menuscreen_w@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	orr	w10, w20, #0x1
	cmp	w20, #0
	csel	w10, w10, w20, lt
	sub	w8, w8, w10, asr #1
Lloh8:
	adrp	x10, _g_menuscreen_h@GOTPAGE
Lloh9:
	ldr	x10, [x10, _g_menuscreen_h@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x19, _me_mfont_h@GOTPAGE
Lloh12:
	ldr	x19, [x19, _me_mfont_h@GOTPAGEOFF]
	ldr	w11, [x19]
	sub	w10, w10, w11, lsl #2
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	add	w12, w1, #2
	mul	w11, w11, w12
	cmp	w11, #0
	cinc	w11, w11, lt
	sub	w27, w10, w11, asr #1
	lsl	w9, w9, #1
	cmp	w8, w9
	csel	w23, w8, w9, gt
	mov	w0, #1
	mov	w1, #0
	bl	_menu_draw_begin
	tbnz	w22, #31, LBB0_2
; %bb.1:
	add	w8, w22, #1
	str	x8, [sp]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_3:
	mov	x0, x23
	mov	x1, x27
	bl	_text_out16
	ldr	w8, [x19]
	add	w27, w27, w8, lsl #1
	ldr	w9, [x28]
	lsl	w9, w9, #1
	sub	w0, w23, w9
	madd	w1, w8, w26, w27
	add	w2, w9, w20
	bl	_menu_draw_selection
	cmp	w25, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w20, w25
	add	x25, x24, #4
Lloh17:
	adrp	x24, l_.str.2@PAGE
Lloh18:
	add	x24, x24, l_.str.2@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w26, [x25, #-4]
	mov	x0, x22
	mov	x2, x21
	bl	_action_binds
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x26, x0, [sp]
	mov	x0, x23
	mov	x1, x27
	mov	x2, x24
	bl	_text_out16
	ldr	w8, [x19]
	add	w27, w8, w27
	add	x25, x25, #8
	subs	x20, x20, #1
	b.ne	LBB0_5
LBB0_6:
	bl	_menu_separation
	tbnz	w21, #31, LBB0_8
; %bb.7:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #1
	bl	_in_get_dev_name
	mov	x21, x0
	b	LBB0_9
LBB0_8:
Lloh19:
	adrp	x21, l_.str.3@PAGE
Lloh20:
	add	x21, x21, l_.str.3@PAGEOFF
LBB0_9:
Lloh21:
	adrp	x20, _g_menuscreen_h@GOTPAGE
Lloh22:
	ldr	x20, [x20, _g_menuscreen_h@GOTPAGEOFF]
	mov	x0, x21
	bl	_strlen
	ldr	w8, [x28]
	mul	w9, w8, w0
	mov	w10, #30
	mul	w8, w8, w10
	cmp	w9, w8
	csel	w8, w9, w8, gt
Lloh23:
	adrp	x9, _g_menuscreen_w@GOTPAGE
Lloh24:
	ldr	x9, [x9, _g_menuscreen_w@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	cmp	w8, #0
	cinc	w8, w8, lt
	sub	w22, w9, w8, asr #1
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_11
; %bb.10:
	ldr	w8, [x20]
	ldr	w9, [x19]
	sub	w1, w8, w9, lsl #2
Lloh26:
	adrp	x2, l_.str.6@PAGE
Lloh27:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh28:
	adrp	x8, _PBTN_MOK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PBTN_MOK@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w1, w8
	mov	w0, #-1
	bl	_in_get_key_name
	mov	x3, x0
Lloh31:
	adrp	x2, l_.str.4@PAGE
Lloh32:
	add	x2, x2, l_.str.4@PAGEOFF
	add	x0, sp, #24
	mov	w1, #32
	bl	_snprintf
Lloh33:
	adrp	x8, _PBTN_MA2@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PBTN_MA2@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w1, w8
	mov	w0, #-1
	bl	_in_get_key_name
	str	x0, [sp]
Lloh36:
	adrp	x2, l_.str.5@PAGE
Lloh37:
	add	x2, x2, l_.str.5@PAGEOFF
	add	x0, sp, #56
	add	x3, sp, #24
	mov	w1, #64
	bl	_snprintf
	ldr	w8, [x20]
	ldr	w9, [x19]
	sub	w1, w8, w9, lsl #2
	add	x2, sp, #56
LBB0_12:
	mov	x0, x22
	bl	_text_out16
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.13:
	ldr	w8, [x20]
	ldr	w9, [x19]
	sub	w9, w9, w9, lsl #2
	add	w1, w9, w8
	mov	x0, x22
	mov	x2, x21
	bl	_text_out16
	ldr	w8, [x20]
	ldr	w9, [x19]
	sub	w1, w8, w9, lsl #1
Lloh38:
	adrp	x2, l_.str.7@PAGE
Lloh39:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x22
	bl	_text_out16
LBB0_14:
	bl	_menu_draw_end
	ldur	x8, [x29, #-88]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_me_mfont_w,4,2                 ; @me_mfont_w
	.comm	_g_menuscreen_w,4,2             ; @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ; @g_menuscreen_h
	.comm	_me_mfont_h,4,2                 ; @me_mfont_h
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Player %i controls"

l_.str.1:                               ; @.str.1
	.asciz	"Emulator controls"

l_.str.2:                               ; @.str.2
	.asciz	"%s : %s"

l_.str.3:                               ; @.str.3
	.asciz	"(all devices)"

l_.str.4:                               ; @.str.4
	.asciz	"%s"

	.comm	_PBTN_MOK,4,2                   ; @PBTN_MOK
l_.str.5:                               ; @.str.5
	.asciz	"%s - bind, %s - clear"

	.comm	_PBTN_MA2,4,2                   ; @PBTN_MA2
l_.str.6:                               ; @.str.6
	.asciz	"Press a button to bind/unbind"

l_.str.7:                               ; @.str.7
	.asciz	"Press left/right for other devs"

	.no_dead_strip	_draw_key_config
.subsections_via_symbols
