	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function in_evdev_menu_translate
_in_evdev_menu_translate:               ## @in_evdev_menu_translate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	testl	%esi, %esi
	js	LBB0_7
## %bb.1:
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:
	movq	8(%rcx), %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, 4(%rcx,%rdi,8)
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_3
LBB0_5:
	xorl	%eax, %eax
	testq	%rdx, %rdx
	jne	LBB0_14
	jmp	LBB0_6
LBB0_7:
	movl	(%rcx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_19
## %bb.8:
	negl	%esi
	movq	8(%rcx), %rdx
	xorl	%ecx, %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%rcx
	cmpq	%rcx, %r8
	je	LBB0_19
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, (%rdx,%rcx,8)
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	4(%rdx,%rcx,8), %eax
	cmpl	%eax, (%rdi)
	jg	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	4(%rdi), %eax
	jg	LBB0_9
	jmp	LBB0_6
LBB0_19:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_13:
	movl	(%rcx,%rdi,8), %eax
	testq	%rdx, %rdx
	je	LBB0_6
LBB0_14:
	movq	_KEY_CNT@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jbe	LBB0_6
## %bb.15:
	movq	_in_evdev_keys@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%esi, %rsi
	movq	(%rcx,%rsi,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.16:
	cmpb	$0, 1(%rcx)
	je	LBB0_17
LBB0_6:
	popq	%rbp
	retq
LBB0_17:
	movzbl	(%rcx), %ecx
	leal	-65(%rcx), %esi
	leal	32(%rcx), %edi
	cmpb	$26, %sil
	movzbl	%dil, %esi
	cmovael	%ecx, %esi
	movq	_PBTN_CHAR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movb	%sil, (%rdx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_CNT,4,2                    ## @KEY_CNT
	.comm	_in_evdev_keys,8,3              ## @in_evdev_keys
	.comm	_PBTN_CHAR,4,2                  ## @PBTN_CHAR
	.no_dead_strip	_in_evdev_menu_translate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function in_evdev_menu_translate
_in_evdev_menu_translate:               ; @in_evdev_menu_translate
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0, #8]
	ldr	x11, [x9]
	tbnz	w1, #31, LBB0_6
; %bb.1:
	ldr	w8, [x11]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x9, [x11, #8]
	add	x9, x9, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	cmp	w10, w1
	b.eq	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
	cbnz	x2, LBB0_14
	b	LBB0_17
LBB0_6:
	ldr	w9, [x11]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x8, x0
	neg	w10, w1
	ldr	x11, [x11, #8]
	add	x11, x11, #4
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x11, x11, #8
	subs	x9, x9, #1
	b.eq	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x11, #-4]
	cmp	w12, w10
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x11]
	ldr	w12, [x8]
	cmp	w12, w0
	b.gt	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w12, [x8, #4]
	cmp	w0, w12
	b.gt	LBB0_8
	b	LBB0_17
LBB0_12:
	mov	w0, #0
	ret
LBB0_13:
	ldur	w0, [x9, #-4]
	cbz	x2, LBB0_17
LBB0_14:
Lloh0:
	adrp	x8, _KEY_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ls	LBB0_17
; %bb.15:
Lloh3:
	adrp	x8, _in_evdev_keys@GOTPAGE
Lloh4:
	ldr	x8, [x8, _in_evdev_keys@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8, w1, sxtw #3]
	cbz	x8, LBB0_17
; %bb.16:
	ldrb	w9, [x8, #1]
	cbz	w9, LBB0_18
LBB0_17:
	ret
LBB0_18:
	ldrb	w8, [x8]
	sub	w9, w8, #65
	add	w10, w8, #32
	cmp	w9, #26
	csel	w8, w10, w8, lo
Lloh6:
	adrp	x9, _PBTN_CHAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PBTN_CHAR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w0, w9, w0
	strb	w8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_CNT,4,2                    ; @KEY_CNT
	.comm	_in_evdev_keys,8,3              ; @in_evdev_keys
	.comm	_PBTN_CHAR,4,2                  ; @PBTN_CHAR
	.no_dead_strip	_in_evdev_menu_translate
.subsections_via_symbols
