	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc32xx_mod_states
_lpc32xx_mod_states:                    ## @lpc32xx_mod_states
	.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	%esi, %ebx
	movq	%rdi, %r13
	movq	24(%rdi), %r15
	movl	20(%rdi), %edi
	callq	_LPC32XX_KS_DATA
	movl	%eax, %edi
	callq	_readl
	movq	(%r13), %rdx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rcx
	movl	(%rdx,%rcx,4), %r12d
	xorl	%eax, %r12d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, (%rdx,%rcx,4)
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	%r12d, %eax
	shrl	%eax
	cmpl	$1, %r12d
	movl	%eax, %r12d
	jbe	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testb	$1, %r12b
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%r13), %edx
	movl	%ebx, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_MATRIX_SCAN_CODE
	movq	8(%r13), %rcx
	movl	%eax, %edx
	movl	(%rcx,%rdx,4), %r14d
	movq	_EV_MSC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_input_event
	movl	$1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	andl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_input_report_key
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.no_dead_strip	_lpc32xx_mod_states
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc32xx_mod_states
_lpc32xx_mod_states:                    ; @lpc32xx_mod_states
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #24]
	ldr	w0, [x0, #20]
	bl	_LPC32XX_KS_DATA
	bl	_readl
	ldr	x8, [x20]
	sbfiz	x9, x19, #2, #32
	ldr	w10, [x8, x9]
	str	w0, [x8, x9]
	eor	w25, w10, w0
	cbz	w25, LBB0_5
; %bb.1:
	mov	x22, x0
	mov	w23, #0
Lloh0:
	adrp	x26, _EV_MSC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EV_MSC@GOTPAGEOFF]
Lloh2:
	adrp	x27, _MSC_SCAN@GOTPAGE
Lloh3:
	ldr	x27, [x27, _MSC_SCAN@GOTPAGEOFF]
	mov	w28, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	lsr	w8, w25, #1
	cmp	w25, #1
	mov	x25, x8
	b.ls	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w25, #0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x20, #16]
	mov	x0, x23
	mov	x1, x19
	bl	_MATRIX_SCAN_CODE
	mov	x3, x0
	ldr	x8, [x20, #8]
	ldr	w24, [x8, w0, uxtw #2]
	ldr	w1, [x26]
	ldr	w2, [x27]
	mov	x0, x21
	bl	_input_event
	lsl	w8, w28, w23
	and	w2, w8, w22
	mov	x0, x21
	mov	x1, x24
	bl	_input_report_key
	b	LBB0_2
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.no_dead_strip	_lpc32xx_mod_states
.subsections_via_symbols
