	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hv_kbd_on_receive
_hv_kbd_on_receive:                     ## @hv_kbd_on_receive
	.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
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_hv_get_drvdata
	movq	%rax, %r14
	movl	(%r13), %edi
	callq	___le32_to_cpu
	cmpl	$129, %eax
	je	LBB0_7
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_19
## %bb.2:
	cmpl	$3, %ebx
	ja	LBB0_6
## %bb.3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_7:
	cmpl	$7, %ebx
	ja	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	movl	%ebx, %edx
	jmp	LBB0_5
LBB0_19:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_6:
	leaq	16(%r14), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcpy
	addq	$12, %r14
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_complete                       ## TAILCALL
LBB0_9:
	movl	4(%r13), %edi
	callq	___le32_to_cpu
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, 8(%r14)
	je	LBB0_17
## %bb.10:
	movq	_IS_E0@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.11:
	movl	4(%r14), %edi
	movq	_XTKBD_EMUL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_serio_interrupt
LBB0_12:
	movq	_IS_E1@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_14
## %bb.13:
	movl	4(%r14), %edi
	movq	_XTKBD_EMUL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_serio_interrupt
LBB0_14:
	movl	(%r13), %edi
	callq	___le16_to_cpu
	movq	_IS_BREAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%r12d, %esi
	je	LBB0_16
## %bb.15:
	movq	_XTKBD_RELEASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_16:
	orl	%eax, %esi
	movl	4(%r14), %edi
	xorl	%edx, %edx
	callq	_serio_interrupt
LBB0_17:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_IS_BREAK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_18
## %bb.20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pm_wakeup_hard_event           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Illegal protocol response packet (len: %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Illegal keyboard event packet (len: %d)\n"

	.comm	_IS_E0,4,2                      ## @IS_E0
	.comm	_XTKBD_EMUL0,4,2                ## @XTKBD_EMUL0
	.comm	_IS_E1,4,2                      ## @IS_E1
	.comm	_XTKBD_EMUL1,4,2                ## @XTKBD_EMUL1
	.comm	_IS_BREAK,4,2                   ## @IS_BREAK
	.comm	_XTKBD_RELEASE,4,2              ## @XTKBD_RELEASE
L_.str.2:                               ## @.str.2
	.asciz	"unhandled message type %d\n"

	.no_dead_strip	_hv_kbd_on_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hv_kbd_on_receive
_hv_kbd_on_receive:                     ; @hv_kbd_on_receive
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_hv_get_drvdata
	mov	x20, x0
	ldr	w0, [x21]
	bl	___le32_to_cpu
	cmp	w0, #129
	b.eq	LBB0_4
; %bb.1:
	mov	x2, x0
	cmp	w0, #128
	b.ne	LBB0_7
; %bb.2:
	cmp	w22, #3
	b.hi	LBB0_9
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	cmp	w22, #7
	b.hi	LBB0_10
; %bb.5:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	mov	x2, x22
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
LBB0_8:
	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
	b	_dev_err
LBB0_9:
	add	x0, x20, #16
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	add	x0, x20, #12
	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
	b	_complete
LBB0_10:
	ldr	w0, [x21, #4]
	bl	___le32_to_cpu
	mov	x22, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #8]
Lloh6:
	adrp	x23, _IS_BREAK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _IS_BREAK@GOTPAGEOFF]
	cbz	w8, LBB0_16
; %bb.11:
Lloh8:
	adrp	x8, _IS_E0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IS_E0@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_13
; %bb.12:
	ldr	w0, [x20, #4]
Lloh11:
	adrp	x8, _XTKBD_EMUL0@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XTKBD_EMUL0@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_serio_interrupt
LBB0_13:
Lloh14:
	adrp	x8, _IS_E1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IS_E1@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.14:
	ldr	w0, [x20, #4]
Lloh17:
	adrp	x8, _XTKBD_EMUL1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _XTKBD_EMUL1@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_serio_interrupt
LBB0_15:
	ldr	w0, [x21]
	bl	___le16_to_cpu
Lloh20:
	adrp	x8, _XTKBD_RELEASE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _XTKBD_RELEASE@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh22:
	ldr	w8, [x8]
	tst	w9, w22
	csel	w8, wzr, w8, eq
	orr	w1, w8, w0
	ldr	w0, [x20, #4]
	mov	w2, #0
	bl	_serio_interrupt
LBB0_16:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x23]
	tst	w8, w22
	b.eq	LBB0_18
; %bb.17:
	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
LBB0_18:
	mov	x0, x19
	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
	b	_pm_wakeup_hard_event
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Illegal protocol response packet (len: %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Illegal keyboard event packet (len: %d)\n"

	.comm	_IS_E0,4,2                      ; @IS_E0
	.comm	_XTKBD_EMUL0,4,2                ; @XTKBD_EMUL0
	.comm	_IS_E1,4,2                      ; @IS_E1
	.comm	_XTKBD_EMUL1,4,2                ; @XTKBD_EMUL1
	.comm	_IS_BREAK,4,2                   ; @IS_BREAK
	.comm	_XTKBD_RELEASE,4,2              ; @XTKBD_RELEASE
l_.str.2:                               ; @.str.2
	.asciz	"unhandled message type %d\n"

	.no_dead_strip	_hv_kbd_on_receive
.subsections_via_symbols
