	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arizona_poll_reg
_arizona_poll_reg:                      ## @arizona_poll_reg
	.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
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_ktime_get
	movq	_USEC_PER_MSEC@GOTPCREL(%rip), %rcx
	imull	(%rcx), %r14d
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ktime_add_us
	movl	%eax, %r15d
	movl	$0, -48(%rbp)
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	movl	%eax, %r14d
	movl	-48(%rbp), %eax
	andl	%r13d, %eax
	cmpl	%r12d, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %edi
	callq	_arizona_poll_reg_delay
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	movl	(%rbx), %edi
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_dev_err
	jmp	LBB0_7
LBB0_2:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_6:
	movl	-48(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USEC_PER_MSEC,4,2              ## @USEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed polling reg 0x%x: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Polling reg 0x%x timed out: %x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_arizona_poll_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arizona_poll_reg
_arizona_poll_reg:                      ; @arizona_poll_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x22, x0
	bl	_ktime_get
Lloh0:
	adrp	x8, _USEC_PER_MSEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USEC_PER_MSEC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w1, w8, w23
	bl	_ktime_add_us
	mov	x24, x0
	str	wzr, [sp, #12]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22, #4]
	add	x2, sp, #12
	mov	x1, x19
	bl	_regmap_read
	ldr	w8, [sp, #12]
	and	w8, w8, w21
	cmp	w8, w20
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	mov	x0, x24
	bl	_arizona_poll_reg_delay
	cbnz	x0, LBB0_1
; %bb.3:
	ldr	w0, [x22]
	cbz	w23, LBB0_6
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x23
	bl	_dev_err
	b	LBB0_7
LBB0_5:
	mov	w23, #0
	b	LBB0_7
LBB0_6:
	ldr	w3, [sp, #12]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_USEC_PER_MSEC,4,2              ; @USEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed polling reg 0x%x: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Polling reg 0x%x timed out: %x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_arizona_poll_reg
.subsections_via_symbols
