	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tca6416_keys_scan
_tca6416_keys_scan:                     ## @tca6416_keys_scan
	.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	%rdi, %r12
	movq	16(%rdi), %r14
	movq	_TCA6416_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_tca6416_read_reg
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r12), %eax
	movl	-44(%rbp), %ecx
	andl	%eax, %ecx
	movl	%ecx, -44(%rbp)
	movl	4(%r12), %r15d
	xorl	%ecx, %r15d
	movl	%ecx, 4(%r12)
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r8,%rdi,4), %edx
	movl	-44(%rbp), %ecx
	xorl	%eax, %eax
	btl	%ebx, %ecx
	setb	%al
	xorl	%ecx, %ecx
	cmpl	4(%r8,%rdi,4), %eax
	setne	%cl
	movq	%r14, %rdi
	callq	_input_event
	movq	%r14, %rdi
	callq	_input_sync
	movl	(%r12), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	btl	%ebx, %eax
	adcl	$0, %r13d
	incl	%ebx
	cmpl	$16, %ebx
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	btl	%ebx, %r15d
	jae	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %r8
	movl	%r13d, %ecx
	leaq	(%rcx,%rcx,2), %rdi
	movl	(%r8,%rdi,4), %esi
	testl	%esi, %esi
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_TCA6416_INPUT,4,2              ## @TCA6416_INPUT
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.no_dead_strip	_tca6416_keys_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tca6416_keys_scan
_tca6416_keys_scan:                     ; @tca6416_keys_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _TCA6416_INPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCA6416_INPUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_tca6416_read_reg
	cbz	w0, LBB0_2
LBB0_1:
	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
	add	sp, sp, #96
	ret
LBB0_2:
	mov	w21, #0
	mov	w22, #0
	ldr	w9, [sp, #12]
	ldp	w8, w10, [x19]
	and	w9, w9, w8
	str	w9, [sp, #12]
	eor	w23, w10, w9
	str	w9, [x19, #4]
	mov	w24, #12
Lloh3:
	adrp	x25, _EV_KEY@GOTPAGE
Lloh4:
	ldr	x25, [x25, _EV_KEY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsr	w9, w8, w21
	and	w9, w9, #0x1
	add	w22, w9, w22
	add	w21, w21, #1
	cmp	w21, #16
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w9, w23, w21
	tbz	w9, #0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	umaddl	x8, w22, w24, x8
	ldr	w9, [x25]
	ldp	w10, w11, [x8]
	cmp	w10, #0
	csel	w1, w9, w10, eq
	ldr	w9, [sp, #12]
	lsr	w9, w9, w21
	and	w9, w9, #0x1
	ldr	w2, [x8, #8]
	cmp	w9, w11
	cset	w3, ne
	mov	x0, x20
	bl	_input_event
	mov	x0, x20
	bl	_input_sync
	ldr	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TCA6416_INPUT,4,2              ; @TCA6416_INPUT
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.no_dead_strip	_tca6416_keys_scan
.subsections_via_symbols
