	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmic8xxx_chk_sync_read
_pmic8xxx_chk_sync_read:                ## @pmic8xxx_chk_sync_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	movq	_KEYP_SCAN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-28(%rbp), %edx
	orl	$1, %edx
	movl	%edx, -28(%rbp)
	movl	4(%r14), %edi
	movl	(%r15), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_KEYP_CLOCK_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	incl	%edi
	callq	_udelay
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEYP_SCAN,4,2                  ## @KEYP_SCAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading KEYP_SCAN reg, rc=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error writing KEYP_SCAN reg, rc=%d\n"

	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
	.comm	_KEYP_CLOCK_FREQ,4,2            ## @KEYP_CLOCK_FREQ
	.no_dead_strip	_pmic8xxx_chk_sync_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmic8xxx_chk_sync_read
_pmic8xxx_chk_sync_read:                ; @pmic8xxx_chk_sync_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x21, _KEYP_SCAN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KEYP_SCAN@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x1
	str	w2, [sp, #12]
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	bl	_regmap_write
	mov	x19, x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _USEC_PER_SEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USEC_PER_SEC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _KEYP_CLOCK_FREQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KEYP_CLOCK_FREQ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	w8, #1
	bfi	w8, w0, #1, #31
	mov	x0, x8
	bl	_udelay
	b	LBB0_6
LBB0_3:
	mov	x19, x0
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x2, x19
	bl	_dev_err
LBB0_6:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_KEYP_SCAN,4,2                  ; @KEYP_SCAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading KEYP_SCAN reg, rc=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error writing KEYP_SCAN reg, rc=%d\n"

	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
	.comm	_KEYP_CLOCK_FREQ,4,2            ; @KEYP_CLOCK_FREQ
	.no_dead_strip	_pmic8xxx_chk_sync_read
.subsections_via_symbols
