	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_do_keydown
_ir_do_keydown:                         ## @ir_do_keydown
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	callq	_input_event
	cmpl	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	cmpl	%r14d, 4(%rbx)
	jne	LBB0_3
## %bb.2:
	cmpq	%r12, 8(%rbx)
	je	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_ir_do_keyup
	movl	%r14d, 4(%rbx)
	movq	%r12, 8(%rbx)
	movl	%r15d, 20(%rbx)
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	$1, (%rbx)
	movl	24(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_IR_dprintk
	movl	16(%rbx), %edi
	movl	20(%rbx), %esi
	movl	$1, %edx
	callq	_input_report_key
	movl	16(%rbx), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: key down event, key 0x%04x, scancode 0x%04x\n"

	.no_dead_strip	_ir_do_keydown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_do_keydown
_ir_do_keydown:                         ; @ir_do_keydown
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_input_event
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, w20
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	cmp	x8, x22
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_ir_do_keyup
	str	w20, [x19, #4]
	str	x22, [x19, #8]
	str	w21, [x19, #20]
Lloh6:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	w8, #1
	str	w8, [x19]
	ldr	w2, [x19, #24]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x21
	mov	x4, x20
	bl	_IR_dprintk
	ldp	w0, w1, [x19, #16]
	mov	w2, #1
	bl	_input_report_key
	ldr	w0, [x19, #16]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: key down event, key 0x%04x, scancode 0x%04x\n"

	.no_dead_strip	_ir_do_keydown
.subsections_via_symbols
