	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hil_dev_interrupt
_hil_dev_interrupt:                     ## @hil_dev_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	callq	_serio_get_drvdata
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movslq	(%rbx), %rax
	movq	_HIL_PACKET_MAX_LENGTH@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	shlq	$2, %rcx
	cmpq	%rax, %rcx
	jbe	LBB0_1
## %bb.2:
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movq	8(%rbx), %rdx
	movslq	%ecx, %rsi
	testb	$3, %al
	je	LBB0_4
## %bb.3:
	movl	(%rdx,%rsi,4), %r8d
	jmp	LBB0_5
LBB0_4:
	movl	$0, (%rdx,%rsi,4)
	movl	(%rbx), %eax
	xorl	%r8d, %r8d
LBB0_5:
	movzbl	%r14b, %edi
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	andl	$28, %ecx
	subl	%ecx, %eax
	shll	$3, %eax
	movb	$24, %cl
	subb	%al, %cl
	shll	%cl, %edi
	orl	%r8d, %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	(%rbx), %eax
	incl	%eax
	movl	%eax, (%rbx)
	testb	$3, %al
	jne	LBB0_14
## %bb.6:
	movl	%edi, %eax
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	movq	_HIL_ERR_INT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.7:
	movq	_HIL_PKT_CMD@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_14
## %bb.8:
	callq	_hil_dev_is_command_response
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_hil_dev_handle_command_response
	jmp	LBB0_13
LBB0_1:
	movq	%rbx, %rdi
	callq	_hil_dev_process_err
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	cmpq	$0, 16(%rbx)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_hil_dev_handle_ptr_events
	jmp	LBB0_13
LBB0_12:
	movq	%rbx, %rdi
	callq	_hil_dev_handle_kbd_events
LBB0_13:
	movl	$0, (%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_HIL_PACKET_MAX_LENGTH,4,2      ## @HIL_PACKET_MAX_LENGTH
	.comm	_HIL_ERR_INT,4,2                ## @HIL_ERR_INT
	.comm	_HIL_PKT_CMD,4,2                ## @HIL_PKT_CMD
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_hil_dev_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hil_dev_interrupt
_hil_dev_interrupt:                     ; @hil_dev_interrupt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_serio_get_drvdata
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldrsw	x8, [x19]
Lloh0:
	adrp	x9, _HIL_PACKET_MAX_LENGTH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HIL_PACKET_MAX_LENGTH@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	cmp	x8, x9, lsl #2
	b.hs	LBB0_9
; %bb.1:
	add	w9, w8, #3
	cmp	w8, #0
	csel	w10, w9, w8, lt
	ldr	x9, [x19, #8]
	sbfx	x10, x10, #2, #30
	tst	w8, #0x3
	b.eq	LBB0_3
; %bb.2:
	ldr	w11, [x9, x10, lsl #2]
	b	LBB0_4
LBB0_3:
	mov	w11, #0
	str	wzr, [x9, x10, lsl #2]
	ldr	w8, [x19]
LBB0_4:
	negs	w12, w8
	and	w12, w12, #0x3
	and	w8, w8, #0x3
	csneg	w8, w8, w12, mi
	mov	w12, #24
	sub	w8, w12, w8, lsl #3
	lsl	w8, w20, w8
	orr	w0, w8, w11
	str	w0, [x9, x10, lsl #2]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	tst	w8, #0x3
	b.ne	LBB0_10
; %bb.5:
	and	w8, w0, #0xffff0000
Lloh3:
	adrp	x9, _HIL_ERR_INT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HIL_ERR_INT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.6:
Lloh6:
	adrp	x8, _HIL_PKT_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HIL_PKT_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.7:
	bl	_hil_dev_is_command_response
	cbz	x0, LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_hil_dev_handle_command_response
	b	LBB0_14
LBB0_9:
	mov	x0, x19
	bl	_hil_dev_process_err
LBB0_10:
Lloh9:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_hil_dev_handle_ptr_events
	b	LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_hil_dev_handle_kbd_events
LBB0_14:
	str	wzr, [x19]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HIL_PACKET_MAX_LENGTH,4,2      ; @HIL_PACKET_MAX_LENGTH
	.comm	_HIL_ERR_INT,4,2                ; @HIL_ERR_INT
	.comm	_HIL_PKT_CMD,4,2                ; @HIL_PKT_CMD
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_hil_dev_interrupt
.subsections_via_symbols
