	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function legacy_dvb_usb_get_keymap_index
_legacy_dvb_usb_get_keymap_index:       ## @legacy_dvb_usb_get_keymap_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_INPUT_KEYMAP_BY_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movl	4(%rdi), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	%edx, %ebx
	movq	%rsi, %r14
	leaq	-20(%rbp), %rsi
	callq	_input_scancode_to_scalar
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.5:
	movl	%ebx, %eax
	movl	-20(%rbp), %edx
	xorl	%ecx, %ecx
	movq	%r14, %rsi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, (%rsi)
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rcx
	addq	$16, %rsi
	cmpq	%rcx, %rax
	jne	LBB0_6
## %bb.8:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_KEY_UNKNOWN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edx, %edi
	shlq	$4, %rdi
	movq	8(%r14,%rdi), %rdi
	cmpq	%rcx, %rdi
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%rsi, %rdi
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%edx
	cmpl	%edx, %ebx
	jne	LBB0_9
## %bb.12:
	movl	%eax, %ebx
	jmp	LBB0_3
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_14:
	movl	%ecx, %ebx
	jmp	LBB0_3
LBB0_16:
	movl	%edx, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_INPUT_KEYMAP_BY_INDEX,4,2      ## @INPUT_KEYMAP_BY_INDEX
	.comm	_KEY_RESERVED,8,3               ## @KEY_RESERVED
	.comm	_KEY_UNKNOWN,8,3                ## @KEY_UNKNOWN
	.no_dead_strip	_legacy_dvb_usb_get_keymap_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function legacy_dvb_usb_get_keymap_index
_legacy_dvb_usb_get_keymap_index:       ; @legacy_dvb_usb_get_keymap_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _INPUT_KEYMAP_BY_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INPUT_KEYMAP_BY_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w19, [x0, #4]
	b	LBB0_3
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	add	x1, sp, #12
	bl	_input_scancode_to_scalar
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	cbz	w19, LBB0_3
; %bb.5:
	mov	x9, #0
	mov	w8, w19
	ldr	w10, [sp, #12]
	mov	x11, x20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	cmp	w12, w10
	b.eq	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #1
	add	x11, x11, #16
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.8:
	mov	w9, #0
Lloh3:
	adrp	x10, _KEY_RESERVED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _KEY_RESERVED@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _KEY_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x11, [x11, _KEY_UNKNOWN@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x12, x20, w9, uxtw #4
	ldr	x12, [x12, #8]
	cmp	x12, x10
	ccmp	x12, x11, #4, ne
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w9, w9, #1
	cmp	w19, w9
	b.ne	LBB0_9
; %bb.11:
	mov	x19, x8
	b	LBB0_3
LBB0_12:
	mov	x19, x9
	b	LBB0_3
LBB0_13:
	mov	x19, x9
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_INPUT_KEYMAP_BY_INDEX,4,2      ; @INPUT_KEYMAP_BY_INDEX
	.comm	_KEY_RESERVED,8,3               ; @KEY_RESERVED
	.comm	_KEY_UNKNOWN,8,3                ; @KEY_UNKNOWN
	.no_dead_strip	_legacy_dvb_usb_get_keymap_index
.subsections_via_symbols
