	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp5589_report_switch_state
_adp5589_report_switch_state:           ## @adp5589_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), %r14
	movq	24(%rdi), %rax
	movq	_ADP5589_GPI_STATUS_A@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	callq	*8(%rax)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_adp5589_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbx), %r15
	movq	24(%rbx), %rax
	movq	_ADP5589_GPI_STATUS_B@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	callq	*8(%rax)
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_adp5589_read
	movl	%eax, %r15d
	xorl	%r12d, %r12d
	cmpl	$0, 32(%rbx)
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%rbx)
	jg	LBB0_3
	jmp	LBB0_10
LBB0_1:
	movq	16(%rbx), %rdi
	movq	_ADP5589_GPI_STATUS_C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_adp5589_read
	movl	%eax, %r12d
	cmpl	$0, (%rbx)
	jle	LBB0_10
LBB0_3:
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rbx), %edi
	movl	4(%rax,%r13,8), %esi
	xorl	%edx, %edx
	btl	%r14d, %ecx
	setae	%dl
	callq	_input_report_switch
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	24(%rbx), %rcx
	movzwl	(%rax,%r13,8), %edx
	cmpw	(%rcx), %dx
	jbe	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movzwl	4(%rcx), %ecx
	movl	%edx, %esi
	subl	%ecx, %esi
	leal	-8(%rsi), %r14d
	cmpl	$8, %esi
	cmovll	%esi, %r14d
	movl	%r12d, %ecx
	cmovll	%r15d, %ecx
	testl	%ecx, %ecx
	jns	LBB0_9
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movzwl	2(%rcx), %ecx
	movl	%edx, %r14d
	subl	%ecx, %r14d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jns	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	8(%rbx), %rax
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_10:
	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	_ADP5589_GPI_STATUS_A,4,2       ## @ADP5589_GPI_STATUS_A
	.comm	_ADP5589_GPI_STATUS_B,4,2       ## @ADP5589_GPI_STATUS_B
	.comm	_ADP5589_GPI_STATUS_C,4,2       ## @ADP5589_GPI_STATUS_C
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't read GPIO_DAT_STAT switch %d, default to OFF\n"

	.no_dead_strip	_adp5589_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 adp5589_report_switch_state
_adp5589_report_switch_state:           ; @adp5589_report_switch_state
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldp	x20, x8, [x0, #16]
	ldr	x8, [x8, #8]
Lloh0:
	adrp	x9, _ADP5589_GPI_STATUS_A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADP5589_GPI_STATUS_A@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	blr	x8
	mov	x1, x0
	mov	x0, x20
	bl	_adp5589_read
	mov	x20, x0
	ldp	x21, x8, [x19, #16]
	ldr	x8, [x8, #8]
Lloh3:
	adrp	x9, _ADP5589_GPI_STATUS_B@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADP5589_GPI_STATUS_B@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
	blr	x8
	mov	x1, x0
	mov	x0, x21
	bl	_adp5589_read
	mov	x21, x0
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_3
LBB0_2:
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x8, _ADP5589_GPI_STATUS_C@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADP5589_GPI_STATUS_C@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_adp5589_read
	mov	x22, x0
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x24, #0
	mov	x25, #0
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19, #4]
	add	x8, x8, x24
	ldr	w1, [x8, #4]
	mvn	w8, w9
	lsr	w8, w8, w26
	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_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldrh	w2, [x8, x24]
	ldr	x9, [x19, #24]
	ldrh	w10, [x9]
	cmp	w2, w10
	b.ls	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrh	w9, [x9, #4]
	sub	w9, w2, w9
	subs	w10, w9, #8
	csel	w26, w9, w10, lt
	csel	w9, w21, w22, lt
	tbz	w9, #31, LBB0_5
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrh	w9, [x9, #2]
	sub	w26, w2, w9
	mov	x9, x20
	tbz	w9, #31, LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x19, #16]
	mov	x1, x23
	bl	_dev_err
	mov	w9, #0
	ldr	x8, [x19, #8]
	b	LBB0_5
LBB0_10:
	ldr	w0, [x19, #4]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ADP5589_GPI_STATUS_A,4,2       ; @ADP5589_GPI_STATUS_A
	.comm	_ADP5589_GPI_STATUS_B,4,2       ; @ADP5589_GPI_STATUS_B
	.comm	_ADP5589_GPI_STATUS_C,4,2       ; @ADP5589_GPI_STATUS_C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't read GPIO_DAT_STAT switch %d, default to OFF\n"

	.no_dead_strip	_adp5589_report_switch_state
.subsections_via_symbols
