	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp5588_report_switch_state
_adp5588_report_switch_state:           ## @adp5588_report_switch_state
	.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, %rbx
	movq	16(%rdi), %rdi
	movq	_GPIO_DAT_STAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_adp5588_read
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	16(%rbx), %rdi
	movq	_GPIO_DAT_STAT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_adp5588_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbx), %rdi
	movq	_GPIO_DAT_STAT3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_adp5588_read
	cmpl	$0, (%rbx)
	jle	LBB0_8
## %bb.1:
	movl	%eax, %r12d
	xorl	%r13d, %r13d
	movq	_GPI_PIN_ROW_END@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	movl	4(%rax,%r13,8), %esi
	xorl	%edx, %edx
	btl	%r15d, %ecx
	setae	%dl
	callq	_input_report_switch
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movzwl	(%rax,%r13,8), %edx
	cmpw	(%r14), %dx
	jbe	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GPI_PIN_COL_BASE@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	movl	%edx, %esi
	subl	%ecx, %esi
	leal	-8(%rsi), %r15d
	cmpl	$8, %esi
	cmovll	%esi, %r15d
	movl	%r12d, %ecx
	cmovll	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	testl	%ecx, %ecx
	jns	LBB0_7
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_GPI_PIN_ROW_BASE@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	movl	%edx, %r15d
	subl	%ecx, %r15d
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jns	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	8(%rbx), %rax
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_8:
	movl	4(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_DAT_STAT1,4,2             ## @GPIO_DAT_STAT1
	.comm	_GPIO_DAT_STAT2,4,2             ## @GPIO_DAT_STAT2
	.comm	_GPIO_DAT_STAT3,4,2             ## @GPIO_DAT_STAT3
	.comm	_GPI_PIN_ROW_END,2,1            ## @GPI_PIN_ROW_END
	.comm	_GPI_PIN_ROW_BASE,2,1           ## @GPI_PIN_ROW_BASE
	.comm	_GPI_PIN_COL_BASE,2,1           ## @GPI_PIN_COL_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't read GPIO_DAT_STAT switch %d default to OFF\n"

	.no_dead_strip	_adp5588_report_switch_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adp5588_report_switch_state
_adp5588_report_switch_state:           ; @adp5588_report_switch_state
	.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, x0
	ldr	x0, [x0, #16]
Lloh0:
	adrp	x8, _GPIO_DAT_STAT1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_DAT_STAT1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_adp5588_read
	mov	x20, x0
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x8, _GPIO_DAT_STAT2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIO_DAT_STAT2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_adp5588_read
	mov	x21, x0
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x8, _GPIO_DAT_STAT3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPIO_DAT_STAT3@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_adp5588_read
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x22, x0
	mov	x24, #0
	mov	x25, #0
Lloh9:
	adrp	x26, _GPI_PIN_ROW_END@GOTPAGE
Lloh10:
	ldr	x26, [x26, _GPI_PIN_ROW_END@GOTPAGEOFF]
Lloh11:
	adrp	x27, _GPI_PIN_COL_BASE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _GPI_PIN_COL_BASE@GOTPAGEOFF]
Lloh13:
	adrp	x28, _GPI_PIN_ROW_BASE@GOTPAGE
Lloh14:
	ldr	x28, [x28, _GPI_PIN_ROW_BASE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #4]
	add	x8, x8, x24
	ldr	w1, [x8, #4]
	mvn	w8, w9
	lsr	w8, w8, w23
	and	w2, w8, #0x1
	bl	_input_report_switch
	add	x25, x25, #1
	ldrsw	x8, [x19]
	add	x24, x24, #8
	cmp	x25, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldrh	w2, [x8, x24]
	ldrh	w9, [x26]
	cmp	w2, w9
	b.ls	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrh	w9, [x27]
	sub	w9, w2, w9
	subs	w10, w9, #8
	csel	w23, w9, w10, lt
	csel	w9, w21, w22, lt
	tbz	w9, #31, LBB0_2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrh	w9, [x28]
	sub	w23, w2, w9
	mov	x9, x20
	tbz	w9, #31, LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #16]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w9, #0
	ldr	x8, [x19, #8]
	b	LBB0_2
LBB0_7:
	ldr	w0, [x19, #4]
	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
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_DAT_STAT1,4,2             ; @GPIO_DAT_STAT1
	.comm	_GPIO_DAT_STAT2,4,2             ; @GPIO_DAT_STAT2
	.comm	_GPIO_DAT_STAT3,4,2             ; @GPIO_DAT_STAT3
	.comm	_GPI_PIN_ROW_END,2,1            ; @GPI_PIN_ROW_END
	.comm	_GPI_PIN_ROW_BASE,2,1           ; @GPI_PIN_ROW_BASE
	.comm	_GPI_PIN_COL_BASE,2,1           ; @GPI_PIN_COL_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't read GPIO_DAT_STAT switch %d default to OFF\n"

	.no_dead_strip	_adp5588_report_switch_state
.subsections_via_symbols
