	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp5589_report_events
_adp5589_report_events:                 ## @adp5589_report_events
	.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
	testl	%esi, %esi
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	movl	%esi, %r14d
	xorl	%ebx, %ebx
	movq	_ADP5589_5_FIFO_1@GOTPCREL(%rip), %r12
	movq	_KEY_EV_MASK@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%edx, %rcx
	movl	8(%r15), %edi
	movq	(%r15), %rdx
	movl	-4(%rdx,%rcx,4), %esi
	movq	_KEY_EV_PRESSED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	callq	_input_report_key
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%r15), %edi
	movq	(%r12), %rsi
	addq	%rbx, %rsi
	callq	_adp5589_read
	movl	%eax, %edx
	andl	(%r13), %edx
	movq	16(%r15), %rcx
	cmpl	(%rcx), %edx
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	4(%rcx), %edx
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_adp5589_report_switches
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADP5589_5_FIFO_1,8,3           ## @ADP5589_5_FIFO_1
	.comm	_KEY_EV_MASK,4,2                ## @KEY_EV_MASK
	.comm	_KEY_EV_PRESSED,4,2             ## @KEY_EV_PRESSED
	.no_dead_strip	_adp5589_report_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adp5589_report_events
_adp5589_report_events:                 ; @adp5589_report_events
	.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
	cmp	w1, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x21, _ADP5589_5_FIFO_1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ADP5589_5_FIFO_1@GOTPAGEOFF]
Lloh2:
	adrp	x22, _KEY_EV_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _KEY_EV_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x23, _KEY_EV_PRESSED@GOTPAGE
Lloh5:
	ldr	x23, [x23, _KEY_EV_PRESSED@GOTPAGEOFF]
	mov	w24, w1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #8]
	ldr	x9, [x19]
	sub	w10, w2, #1
	ldr	w1, [x9, w10, sxtw #2]
	ldr	w9, [x23]
	and	w2, w9, w8
	bl	_input_report_key
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x24, x20
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #24]
	ldr	x8, [x21]
	add	x1, x20, x8
	bl	_adp5589_read
	mov	x8, x0
	ldr	w9, [x22]
	and	w2, w9, w0
	ldr	x9, [x19, #16]
	ldr	w10, [x9]
	cmp	w2, w10
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x9, #4]
	cmp	w2, w9
	b.gt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x8
	bl	_adp5589_report_switches
	b	LBB0_3
LBB0_7:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ADP5589_5_FIFO_1,8,3           ; @ADP5589_5_FIFO_1
	.comm	_KEY_EV_MASK,4,2                ; @KEY_EV_MASK
	.comm	_KEY_EV_PRESSED,4,2             ; @KEY_EV_PRESSED
	.no_dead_strip	_adp5589_report_events
.subsections_via_symbols
