	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_irdec_irq
_zx_irdec_irq:                          ## @zx_irdec_irq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_ZX_IR_INTSTCLR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_ZX_IR_CNUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_ZX_NECRPT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_rc_repeat
	jmp	LBB0_3
LBB0_2:
	movq	_ZX_IR_CODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %edx
	movzbl	%ah, %esi
	movzbl	%al, %edi
	movl	%eax, %ecx
	shrl	$24, %ecx
	shrl	$16, %edx
	movzbl	%dl, %edx
	leaq	-12(%rbp), %r8
	callq	_ir_nec_bytes_to_scancode
	movl	(%rbx), %edi
	movl	-12(%rbp), %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_rc_keydown
LBB0_3:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ZX_IR_INTSTCLR,8,3             ## @ZX_IR_INTSTCLR
	.comm	_ZX_IR_CNUM,8,3                 ## @ZX_IR_CNUM
	.comm	_ZX_NECRPT,4,2                  ## @ZX_NECRPT
	.comm	_ZX_IR_CODE,8,3                 ## @ZX_IR_CODE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_zx_irdec_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_irdec_irq
_zx_irdec_irq:                          ; @zx_irdec_irq
	.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
	mov	x19, x1
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _ZX_IR_INTSTCLR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ZX_IR_INTSTCLR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _ZX_IR_CNUM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ZX_IR_CNUM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh6:
	adrp	x8, _ZX_NECRPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ZX_NECRPT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_rc_repeat
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _ZX_IR_CODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ZX_IR_CODE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	lsr	w3, w0, #24
	ubfx	w2, w0, #16, #8
	ubfx	w1, w0, #8, #8
	and	w0, w0, #0xff
	add	x4, sp, #12
	bl	_ir_nec_bytes_to_scancode
	mov	x2, x0
	ldr	w0, [x19]
	ldr	w1, [sp, #12]
	mov	w3, #0
	bl	_rc_keydown
LBB0_3:
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ZX_IR_INTSTCLR,8,3             ; @ZX_IR_INTSTCLR
	.comm	_ZX_IR_CNUM,8,3                 ; @ZX_IR_CNUM
	.comm	_ZX_NECRPT,4,2                  ; @ZX_NECRPT
	.comm	_ZX_IR_CODE,8,3                 ; @ZX_IR_CODE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_zx_irdec_irq
.subsections_via_symbols
