	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_getkeycode
_ir_getkeycode:                         ## @ir_getkeycode
	.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	%rsi, %r12
	callq	_input_get_drvdata
	movq	%rax, %r15
	movq	%rax, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_INPUT_KEYMAP_BY_INDEX@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.1:
	movl	4(%r12), %eax
	cmpl	(%r15), %eax
	jae	LBB0_5
LBB0_2:
	movq	8(%r15), %rcx
	movl	%eax, %edx
	movl	%eax, 4(%r12)
	leaq	(%rcx,%rdx,8), %rsi
	movl	4(%rcx,%rdx,8), %eax
	movl	%eax, 12(%r12)
	movl	$4, 8(%r12)
	movl	16(%r12), %edi
	movl	$4, %edx
	callq	_memcpy
	jmp	LBB0_8
LBB0_3:
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	callq	_input_scancode_to_scalar
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_ir_lookup_by_scancode
	cmpl	(%r15), %eax
	jb	LBB0_2
LBB0_5:
	movl	(%r13), %ecx
	testl	%ecx, (%r12)
	je	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	movl	%eax, 4(%r12)
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INPUT_KEYMAP_BY_INDEX,4,2      ## @INPUT_KEYMAP_BY_INDEX
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ir_getkeycode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_getkeycode
_ir_getkeycode:                         ; @ir_getkeycode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	bl	_input_get_drvdata
	mov	x21, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _INPUT_KEYMAP_BY_INDEX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _INPUT_KEYMAP_BY_INDEX@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	w0, [x20, #4]
LBB0_2:
	ldr	w8, [x21]
	cmp	w0, w8
	b.hs	LBB0_6
; %bb.3:
	ldr	x8, [x21, #8]
	add	x1, x8, w0, uxtw #3
	ldr	w9, [x1, #4]
	mov	w8, #4
	str	w0, [x20, #4]
	stp	w8, w9, [x20, #8]
	ldr	w0, [x20, #16]
	mov	w2, #4
	bl	_memcpy
	mov	w22, #0
	b	LBB0_9
LBB0_4:
	add	x1, sp, #12
	mov	x0, x20
	bl	_input_scancode_to_scalar
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_ir_lookup_by_scancode
	b	LBB0_2
LBB0_6:
	ldr	w8, [x20]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_8:
	mov	w22, #0
	str	w0, [x20, #4]
Lloh5:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20, #12]
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_INPUT_KEYMAP_BY_INDEX,4,2      ; @INPUT_KEYMAP_BY_INDEX
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ir_getkeycode
.subsections_via_symbols
