	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movb	$1, %r13b
	cmpl	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	cmpl	%r12d, 4(%rbx)
	jne	LBB0_4
## %bb.2:
	cmpq	%r15, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	cmpq	%r8, 16(%rbx)
	setne	%r13b
LBB0_4:
	movq	%r15, -80(%rbp)
	movl	%r12d, -72(%rbp)
	movq	%r14, -64(%rbp)
	xorl	%eax, %eax
	testq	%r8, %r8
	je	LBB0_6
## %bb.5:
	movq	_LIRC_SCANCODE_FLAG_TOGGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%eax, -56(%rbp)
	movq	24(%rbx), %rax
	movq	_RC_PROTO_BIT_CEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ir_lirc_scancode_event
LBB0_8:
	testb	%r13b, %r13b
	je	LBB0_11
## %bb.9:
	cmpl	$0, (%rbx)
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ir_do_keyup
LBB0_11:
	movq	32(%rbx), %rdi
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	%r15d, %ecx
	callq	_input_event
	movl	%r12d, 4(%rbx)
	movq	%r15, 8(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	%r14, 56(%rbx)
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	%r13b, %r13b
	je	LBB0_14
## %bb.12:
	cmpq	%r14, %rax
	je	LBB0_14
## %bb.13:
	movl	$1, (%rbx)
	leaq	48(%rbx), %rdi
	movl	44(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rcx
	movl	%r12d, %r8d
	movq	%r15, %r9
	callq	_dev_dbg
	movq	32(%rbx), %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_input_report_key
	movq	_led_feedback@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LED_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_led_trigger_event
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_14:
	cmpq	%r14, %rax
	sete	%al
	orb	%al, %r13b
	jne	LBB0_20
## %bb.15:
	movq	24(%rbx), %rax
	movq	_RC_PROTO_BIT_CEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.16:
	leaq	40(%rbx), %r15
	movq	%r15, %rdi
	callq	_timer_pending
	testl	%eax, %eax
	je	LBB0_17
LBB0_20:
	movq	32(%rbx), %rdi
	callq	_input_sync
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	32(%rbx), %rdi
	movq	(%rdi), %rax
	movq	_REP_PERIOD@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_20
## %bb.18:
	movq	_REP_DELAY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_20
## %bb.19:
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	_input_event
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_msecs_to_jiffies
	addq	%rax, %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mod_timer
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_LIRC_SCANCODE_FLAG_TOGGLE,4,2  ## @LIRC_SCANCODE_FLAG_TOGGLE
	.comm	_RC_PROTO_BIT_CEC,8,3           ## @RC_PROTO_BIT_CEC
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,8,3                   ## @MSC_SCAN
	.comm	_KEY_RESERVED,8,3               ## @KEY_RESERVED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n"

	.comm	_led_feedback,4,2               ## @led_feedback
	.comm	_LED_FULL,4,2                   ## @LED_FULL
	.comm	_REP_PERIOD,8,3                 ## @REP_PERIOD
	.comm	_REP_DELAY,8,3                  ## @REP_DELAY
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_jiffies,8,3                    ## @jiffies
	.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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	cmp	x8, x21
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	cmp	x8, x23
	cset	w24, ne
	b	LBB0_5
LBB0_4:
	mov	w24, #1
LBB0_5:
	str	x21, [sp]
	str	w22, [sp, #8]
	str	x20, [sp, #16]
Lloh0:
	adrp	x8, _LIRC_SCANCODE_FLAG_TOGGLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIRC_SCANCODE_FLAG_TOGGLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	x23, #0
	csel	w8, wzr, w8, eq
	str	w8, [sp, #24]
	ldr	x8, [x19, #24]
Lloh3:
	adrp	x25, _RC_PROTO_BIT_CEC@GOTPAGE
Lloh4:
	ldr	x25, [x25, _RC_PROTO_BIT_CEC@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	mov	x1, sp
	mov	x0, x19
	bl	_ir_lirc_scancode_event
LBB0_7:
	cbz	w24, LBB0_10
; %bb.8:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #0
	bl	_ir_do_keyup
LBB0_10:
	ldr	x0, [x19, #32]
Lloh5:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh10:
	ldr	x2, [x8]
	mov	x3, x21
	bl	_input_event
	str	w22, [x19, #4]
	stp	x21, x23, [x19, #8]
	str	x20, [x19, #56]
Lloh11:
	adrp	x23, _KEY_RESERVED@GOTPAGE
Lloh12:
	ldr	x23, [x23, _KEY_RESERVED@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	w24, LBB0_13
; %bb.11:
	cmp	x8, x20
	b.eq	LBB0_13
; %bb.12:
	mov	w8, #1
	str	w8, [x19]
	add	x0, x19, #48
	ldr	w2, [x19, #44]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x22
	mov	x5, x21
	bl	_dev_dbg
	ldr	x0, [x19, #32]
	mov	x1, x20
	mov	w2, #1
	bl	_input_report_key
Lloh15:
	adrp	x8, _led_feedback@GOTPAGE
Lloh16:
	ldr	x8, [x8, _led_feedback@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _LED_FULL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LED_FULL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_led_trigger_event
	ldr	x8, [x23]
LBB0_13:
	cmp	x8, x20
	cset	w8, eq
	orr	w8, w24, w8
	tbnz	w8, #0, LBB0_16
; %bb.14:
	ldr	x8, [x19, #24]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	add	x21, x19, #40
	mov	x0, x21
	bl	_timer_pending
	cbz	w0, LBB0_17
LBB0_16:
	ldr	x0, [x19, #32]
	bl	_input_sync
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_17:
	ldr	x0, [x19, #32]
	ldr	x8, [x0]
Lloh21:
	adrp	x22, _REP_PERIOD@GOTPAGE
Lloh22:
	ldr	x22, [x22, _REP_PERIOD@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	x9, [x8, x9, lsl #3]
	cbz	x9, LBB0_16
; %bb.18:
Lloh23:
	adrp	x9, _REP_DELAY@GOTPAGE
Lloh24:
	ldr	x9, [x9, _REP_DELAY@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbnz	x8, LBB0_16
; %bb.19:
Lloh26:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x2, x20
	mov	w3, #2
	bl	_input_event
Lloh29:
	adrp	x8, _jiffies@GOTPAGE
Lloh30:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh31:
	ldr	x20, [x8]
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	x9, [x22]
	ldr	x0, [x8, x9, lsl #3]
	bl	_msecs_to_jiffies
	add	x1, x0, x20
	mov	x0, x21
	bl	_mod_timer
	b	LBB0_16
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_LIRC_SCANCODE_FLAG_TOGGLE,4,2  ; @LIRC_SCANCODE_FLAG_TOGGLE
	.comm	_RC_PROTO_BIT_CEC,8,3           ; @RC_PROTO_BIT_CEC
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,8,3                   ; @MSC_SCAN
	.comm	_KEY_RESERVED,8,3               ; @KEY_RESERVED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n"

	.comm	_led_feedback,4,2               ; @led_feedback
	.comm	_LED_FULL,4,2                   ; @LED_FULL
	.comm	_REP_PERIOD,8,3                 ; @REP_PERIOD
	.comm	_REP_DELAY,8,3                  ; @REP_DELAY
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_jiffies,8,3                    ; @jiffies
	.no_dead_strip	_ir_do_keydown
.subsections_via_symbols
