	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ams_delta_serio_interrupt
_ams_delta_serio_interrupt:             ## @ams_delta_serio_interrupt
	.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), %rax
	movq	_FIQ_CIRC_BUFF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_FIQ_IRQ_PEND@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	$0, (%rax,%rdx,4)
	movq	_FIQ_KEYS_CNT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpl	$0, (%rax,%rdx,4)
	jle	LBB0_5
## %bb.1:
	movq	%rsi, %r14
	leaq	(%rax,%rcx,4), %r12
	leaq	(%rax,%rdx,4), %rcx
	movq	_FIQ_HEAD_OFFSET@GOTPCREL(%rip), %r13
	movq	_FIQ_BUF_LEN@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r14), %edi
	movl	%ebx, %esi
	callq	_check_data
	shrl	%ebx
	movzbl	%bl, %esi
	movl	8(%r14), %edi
	movl	%eax, %edx
	callq	_serio_interrupt
	movq	(%r14), %rax
	movq	_FIQ_KEYS_CNT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leaq	(%rax,%rdx,4), %rcx
	cmpl	$0, (%rax,%rdx,4)
	jle	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdx
	movslq	(%rax,%rdx,4), %rsi
	leal	1(%rsi), %edi
	movl	%edi, (%rax,%rdx,4)
	movl	(%r12,%rsi,4), %ebx
	decl	(%rcx)
	movl	(%rax,%rdx,4), %ecx
	movq	(%r15), %rsi
	cmpl	(%rax,%rsi,4), %ecx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rax,%rdx,4)
	jmp	LBB0_4
LBB0_5:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIQ_CIRC_BUFF,8,3              ## @FIQ_CIRC_BUFF
	.comm	_FIQ_IRQ_PEND,8,3               ## @FIQ_IRQ_PEND
	.comm	_FIQ_KEYS_CNT,8,3               ## @FIQ_KEYS_CNT
	.comm	_FIQ_HEAD_OFFSET,8,3            ## @FIQ_HEAD_OFFSET
	.comm	_FIQ_BUF_LEN,8,3                ## @FIQ_BUF_LEN
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ams_delta_serio_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ams_delta_serio_interrupt
_ams_delta_serio_interrupt:             ; @ams_delta_serio_interrupt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _FIQ_CIRC_BUFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FIQ_CIRC_BUFF@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x9]
Lloh3:
	adrp	x9, _FIQ_IRQ_PEND@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FIQ_IRQ_PEND@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
Lloh6:
	adrp	x21, _FIQ_KEYS_CNT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _FIQ_KEYS_CNT@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x9, x8, x9, lsl #2
	ldr	w11, [x9]
	cmp	w11, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x1
	add	x22, x8, x10, lsl #2
Lloh8:
	adrp	x23, _FIQ_HEAD_OFFSET@GOTPAGE
Lloh9:
	ldr	x23, [x23, _FIQ_HEAD_OFFSET@GOTPAGEOFF]
Lloh10:
	adrp	x24, _FIQ_BUF_LEN@GOTPAGE
Lloh11:
	ldr	x24, [x24, _FIQ_BUF_LEN@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_check_data
	mov	x2, x0
	ubfx	w1, w20, #1, #8
	ldr	w0, [x19, #8]
	bl	_serio_interrupt
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x9, x8, x9, lsl #2
	ldr	w10, [x9]
	cmp	w10, #0
	b.le	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x23]
	lsl	x11, x10, #2
	ldrsw	x12, [x8, x11]
	add	w13, w12, #1
	str	w13, [x8, x11]
	ldr	w20, [x22, x12, lsl #2]
	ldr	w12, [x9]
	sub	w12, w12, #1
	str	w12, [x9]
	ldr	w9, [x8, x11]
	ldr	x11, [x24]
	ldr	w11, [x8, x11, lsl #2]
	cmp	w9, w11
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x8, x10, lsl #2]
	b	LBB0_2
LBB0_5:
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_FIQ_CIRC_BUFF,8,3              ; @FIQ_CIRC_BUFF
	.comm	_FIQ_IRQ_PEND,8,3               ; @FIQ_IRQ_PEND
	.comm	_FIQ_KEYS_CNT,8,3               ; @FIQ_KEYS_CNT
	.comm	_FIQ_HEAD_OFFSET,8,3            ; @FIQ_HEAD_OFFSET
	.comm	_FIQ_BUF_LEN,8,3                ; @FIQ_BUF_LEN
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ams_delta_serio_interrupt
.subsections_via_symbols
