	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arizona_hpdet_read
_arizona_hpdet_read:                    ## @arizona_hpdet_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	%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	8(%rdi), %r15
	movl	4(%r15), %edi
	movq	_ARIZONA_HEADPHONE_DETECT_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_21
LBB0_2:
	movl	(%rbx), %edx
	cmpl	$2, %edx
	je	LBB0_9
## %bb.3:
	cmpl	$1, %edx
	je	LBB0_13
## %bb.4:
	testl	%edx, %edx
	jne	LBB0_18
## %bb.5:
	movl	-48(%rbp), %edx
	movq	_ARIZONA_HP_DONE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_16
## %bb.6:
	movq	_ARIZONA_HP_LVL_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
LBB0_7:
	movl	%edx, -48(%rbp)
LBB0_8:
	movl	(%r15), %edi
	leaq	L_.str.9(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	-48(%rbp), %r14d
	jmp	LBB0_21
LBB0_9:
	movl	-48(%rbp), %edx
	movq	_ARIZONA_HP_DONE_B@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_16
## %bb.10:
	movq	_ARIZONA_HP_LVL_B_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	shrl	%edx
	movl	%edx, -48(%rbp)
	movl	4(%r15), %edi
	movq	_ARIZONA_HEADPHONE_DETECT_1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	andl	-44(%rbp), %ebx
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %ebx
	movl	%ebx, -44(%rbp)
	movq	_arizona_hpdet_c_ranges@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	decl	%eax
	cmpl	%eax, %ebx
	jae	LBB0_22
## %bb.11:
	movl	-48(%rbp), %ecx
	movq	(%r14), %rdx
	movl	-44(%rbp), %eax
	leaq	(%rax,%rax,4), %rsi
	cmpl	8(%rdx,%rsi,4), %ecx
	jb	LBB0_23
## %bb.12:
	incl	%eax
	movl	%eax, -44(%rbp)
	movl	(%r15), %edi
	leaq	(%rax,%rax,4), %rax
	movl	8(%rdx,%rax,4), %ecx
	movl	12(%rdx,%rax,4), %edx
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	4(%r15), %edi
	movl	(%r13), %esi
	jmp	LBB0_30
LBB0_13:
	movl	-48(%rbp), %edx
	movq	_ARIZONA_HP_DONE_B@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_16
## %bb.14:
	movl	4(%r15), %edi
	movq	_ARIZONA_HP_DACVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_26
## %bb.15:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	jmp	LBB0_17
LBB0_16:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_17:
	callq	_dev_err
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_18:
	movl	(%r15), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_19:
	xorl	%r14d, %r14d
LBB0_20:
	subl	(%rax), %r14d
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	-44(%rbp), %eax
LBB0_23:
	movl	-48(%rbp), %edx
	testl	%eax, %eax
	je	LBB0_8
## %bb.24:
	movq	(%r14), %rcx
	movl	%eax, %eax
	leaq	(%rax,%rax,4), %rax
	movl	12(%rcx,%rax,4), %eax
	cmpl	%eax, %edx
	jae	LBB0_8
## %bb.25:
	movl	(%r15), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r14), %rax
	movl	-44(%rbp), %ecx
	leaq	(%rcx,%rcx,4), %rcx
	movl	12(%rax,%rcx,4), %edx
	jmp	LBB0_7
LBB0_26:
	movl	4(%r15), %edi
	movq	_ARIZONA_HEADPHONE_DETECT_1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	andl	-44(%rbp), %ebx
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %ebx
	movl	%ebx, -44(%rbp)
	movq	_arizona_hpdet_b_ranges@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	decl	%eax
	movq	(%r13), %rdx
	movl	-44(%rbp), %ecx
	leaq	(%rcx,%rcx,4), %rsi
	movl	(%rdx,%rsi,4), %esi
	movl	-48(%rbp), %edx
	cmpl	%eax, %ebx
	jae	LBB0_31
## %bb.27:
	movq	%r14, %rbx
	cmpl	%esi, %edx
	jb	LBB0_29
## %bb.28:
	movq	_ARIZONA_HPDET_B_RANGE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jb	LBB0_32
LBB0_29:
	leal	1(%rcx), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	4(%r15), %edi
	movl	(%rbx), %esi
LBB0_30:
	movl	(%r12), %edx
	movl	-44(%rbp), %eax
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_regmap_update_bits
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_31:
	movq	_ARIZONA_HPDET_B_RANGE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_32:
	movl	(%r15), %edi
	cmpl	%esi, %edx
	jb	LBB0_35
## %bb.33:
	cmpl	%eax, %edx
	jae	LBB0_35
## %bb.34:
	leaq	L_.str.5(%rip), %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rax
	movl	-44(%rbp), %ecx
	leaq	(%rcx,%rcx,4), %rcx
	imull	$100, -48(%rbp), %esi
	subl	16(%rax,%rcx,4), %esi
	movl	4(%rax,%rcx,4), %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %edx
	movl	%eax, -48(%rbp)
	jmp	LBB0_8
LBB0_35:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ARIZONA_HPDET_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_ARIZONA_HEADPHONE_DETECT_2,4,2 ## @ARIZONA_HEADPHONE_DETECT_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read HPDET status: %d\n"

	.comm	_ARIZONA_HP_DONE,4,2            ## @ARIZONA_HP_DONE
L_.str.1:                               ## @.str.1
	.asciz	"HPDET did not complete: %x\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ARIZONA_HP_LVL_MASK,4,2        ## @ARIZONA_HP_LVL_MASK
	.comm	_ARIZONA_HP_DONE_B,4,2          ## @ARIZONA_HP_DONE_B
	.comm	_ARIZONA_HP_DACVAL,4,2          ## @ARIZONA_HP_DACVAL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to read HP value: %d\n"

	.comm	_ARIZONA_HEADPHONE_DETECT_1,4,2 ## @ARIZONA_HEADPHONE_DETECT_1
	.comm	_ARIZONA_HP_IMPEDANCE_RANGE_MASK,4,2 ## @ARIZONA_HP_IMPEDANCE_RANGE_MASK
	.comm	_ARIZONA_HP_IMPEDANCE_RANGE_SHIFT,4,2 ## @ARIZONA_HP_IMPEDANCE_RANGE_SHIFT
	.comm	_arizona_hpdet_b_ranges,8,3     ## @arizona_hpdet_b_ranges
	.comm	_ARIZONA_HPDET_B_RANGE_MAX,4,2  ## @ARIZONA_HPDET_B_RANGE_MAX
L_.str.3:                               ## @.str.3
	.asciz	"Moving to HPDET range %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Measurement out of range\n"

	.comm	_ARIZONA_HPDET_MAX,4,2          ## @ARIZONA_HPDET_MAX
L_.str.5:                               ## @.str.5
	.asciz	"HPDET read %d in range %d\n"

	.comm	_ARIZONA_HP_LVL_B_MASK,4,2      ## @ARIZONA_HP_LVL_B_MASK
	.comm	_arizona_hpdet_c_ranges,8,3     ## @arizona_hpdet_c_ranges
L_.str.6:                               ## @.str.6
	.asciz	"Moving to HPDET range %d-%d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Reporting range boundary %d\n"

L_.str.8:                               ## @.str.8
	.asciz	"Unknown HPDET IP revision %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.9:                               ## @.str.9
	.asciz	"HP impedance %d ohms\n"

	.no_dead_strip	_arizona_hpdet_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arizona_hpdet_read
_arizona_hpdet_read:                    ; @arizona_hpdet_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	w0, [x21, #4]
Lloh0:
	adrp	x8, _ARIZONA_HEADPHONE_DETECT_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARIZONA_HEADPHONE_DETECT_2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_regmap_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_21
LBB0_2:
	ldr	w2, [x20]
	cmp	w2, #2
	b.eq	LBB0_9
; %bb.3:
	cmp	w2, #1
	b.eq	LBB0_13
; %bb.4:
	cbnz	w2, LBB0_19
; %bb.5:
	ldr	w2, [sp, #28]
Lloh5:
	adrp	x8, _ARIZONA_HP_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARIZONA_HP_DONE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_16
; %bb.6:
Lloh8:
	adrp	x8, _ARIZONA_HP_LVL_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARIZONA_HP_LVL_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w2
LBB0_7:
	str	w8, [sp, #28]
LBB0_8:
	ldr	w0, [x21]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.9@PAGE
Lloh12:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_dev_dbg
	ldr	w19, [sp, #28]
	b	LBB0_21
LBB0_9:
	ldr	w2, [sp, #28]
Lloh13:
	adrp	x8, _ARIZONA_HP_DONE_B@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARIZONA_HP_DONE_B@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_16
; %bb.10:
Lloh16:
	adrp	x8, _ARIZONA_HP_LVL_B_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ARIZONA_HP_LVL_B_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	and	w8, w8, w2
	lsr	w8, w8, #1
	str	w8, [sp, #28]
	ldr	w0, [x21, #4]
Lloh19:
	adrp	x19, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGE
Lloh20:
	ldr	x19, [x19, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x2, sp, #24
	bl	_regmap_read
	ldr	w8, [sp, #24]
Lloh21:
	adrp	x22, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGE
Lloh22:
	ldr	x22, [x22, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGEOFF]
	ldr	w9, [x22]
	and	w8, w9, w8
Lloh23:
	adrp	x23, _ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPAGE
Lloh24:
	ldr	x23, [x23, _ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x23]
	lsr	w24, w8, w9
	str	w24, [sp, #24]
Lloh25:
	adrp	x20, _arizona_hpdet_c_ranges@GOTPAGE
Lloh26:
	ldr	x20, [x20, _arizona_hpdet_c_ranges@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	sub	w8, w0, #1
	cmp	w24, w8
	b.hs	LBB0_22
; %bb.11:
	ldp	w9, w11, [sp, #24]
	ldr	x8, [x20]
	mov	w10, #20
	madd	x12, x9, x10, x8
	ldr	w12, [x12, #8]
	cmp	w11, w12
	b.lo	LBB0_23
; %bb.12:
	add	w9, w9, #1
	str	w9, [sp, #24]
	ldr	w0, [x21]
	umaddl	x8, w9, w10, x8
	ldp	w8, w9, [x8, #8]
	stp	x9, x8, [sp]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_29
LBB0_13:
	ldr	w2, [sp, #28]
Lloh29:
	adrp	x8, _ARIZONA_HP_DONE_B@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ARIZONA_HP_DONE_B@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_16
; %bb.14:
	ldr	w0, [x21, #4]
Lloh32:
	adrp	x8, _ARIZONA_HP_DACVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ARIZONA_HP_DACVAL@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_regmap_read
	cbz	w0, LBB0_26
; %bb.15:
	mov	x2, x0
	ldr	w0, [x21]
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_16:
	ldr	w0, [x21]
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_17:
	bl	_dev_err
LBB0_18:
Lloh39:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
	ldr	w0, [x21]
Lloh41:
	adrp	x1, l_.str.8@PAGE
Lloh42:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_warn
Lloh43:
	adrp	x8, _EINVAL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_21:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_22:
	ldr	w9, [sp, #24]
LBB0_23:
	ldr	w8, [sp, #28]
	cbz	w9, LBB0_8
; %bb.24:
	ldr	x10, [x20]
	mov	w11, #20
	umaddl	x9, w9, w11, x10
	ldr	w9, [x9, #12]
	cmp	w8, w9
	b.hs	LBB0_8
; %bb.25:
	ldr	w0, [x21]
	str	x9, [sp]
Lloh45:
	adrp	x1, l_.str.7@PAGE
Lloh46:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x20]
	ldr	w9, [sp, #24]
	mov	w10, #20
	madd	x8, x9, x10, x8
	ldr	w8, [x8, #12]
	b	LBB0_7
LBB0_26:
	ldr	w0, [x21, #4]
Lloh47:
	adrp	x19, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGE
Lloh48:
	ldr	x19, [x19, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x2, sp, #24
	bl	_regmap_read
	ldr	w8, [sp, #24]
Lloh49:
	adrp	x22, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGE
Lloh50:
	ldr	x22, [x22, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGEOFF]
	ldr	w9, [x22]
	and	w8, w9, w8
Lloh51:
	adrp	x23, _ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPAGE
Lloh52:
	ldr	x23, [x23, _ARIZONA_HP_IMPEDANCE_RANGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x23]
	lsr	w24, w8, w9
	str	w24, [sp, #24]
Lloh53:
	adrp	x20, _arizona_hpdet_b_ranges@GOTPAGE
Lloh54:
	ldr	x20, [x20, _arizona_hpdet_b_ranges@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	sub	w11, w0, #1
	ldp	w9, w8, [sp, #24]
	ldr	x10, [x20]
	mov	w12, #20
	mul	x12, x9, x12
	ldr	w10, [x10, x12]
	cmp	w24, w11
	b.hs	LBB0_30
; %bb.27:
Lloh55:
	adrp	x11, _ARIZONA_HPDET_B_RANGE_MAX@GOTPAGE
Lloh56:
	ldr	x11, [x11, _ARIZONA_HPDET_B_RANGE_MAX@GOTPAGEOFF]
Lloh57:
	ldr	w11, [x11]
	cmp	w8, w10
	ccmp	w8, w11, #2, hs
	b.lo	LBB0_31
; %bb.28:
	add	w8, w9, #1
	str	w8, [sp, #24]
	ldr	w0, [x21]
	str	x8, [sp]
Lloh58:
	adrp	x1, l_.str.3@PAGE
Lloh59:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_29:
	bl	_dev_dbg
	ldr	w0, [x21, #4]
	ldr	w1, [x19]
	ldr	w2, [x22]
	ldr	w8, [sp, #24]
	ldr	w9, [x23]
	lsl	w3, w8, w9
	bl	_regmap_update_bits
	b	LBB0_18
LBB0_30:
Lloh60:
	adrp	x11, _ARIZONA_HPDET_B_RANGE_MAX@GOTPAGE
Lloh61:
	ldr	x11, [x11, _ARIZONA_HPDET_B_RANGE_MAX@GOTPAGEOFF]
Lloh62:
	ldr	w11, [x11]
LBB0_31:
	ldr	w0, [x21]
	cmp	w8, w10
	ccmp	w8, w11, #2, hs
	b.lo	LBB0_33
; %bb.32:
Lloh63:
	adrp	x1, l_.str.4@PAGE
Lloh64:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
Lloh65:
	adrp	x8, _ARIZONA_HPDET_MAX@GOTPAGE
Lloh66:
	ldr	x8, [x8, _ARIZONA_HPDET_MAX@GOTPAGEOFF]
Lloh67:
	ldr	w19, [x8]
	b	LBB0_21
LBB0_33:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	stp	x8, x9, [sp]
Lloh68:
	adrp	x1, l_.str.5@PAGE
Lloh69:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x20]
	ldr	w9, [sp, #24]
	mov	w10, #20
	madd	x8, x9, x10, x8
	ldr	w9, [x8, #4]
	ldr	w10, [sp, #28]
	mov	w11, #100
	mul	w10, w10, w11
	ldr	w8, [x8, #16]
	sub	w8, w10, w8
	udiv	w8, w9, w8
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpAdd	Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_ARIZONA_HEADPHONE_DETECT_2,4,2 ; @ARIZONA_HEADPHONE_DETECT_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read HPDET status: %d\n"

	.comm	_ARIZONA_HP_DONE,4,2            ; @ARIZONA_HP_DONE
l_.str.1:                               ; @.str.1
	.asciz	"HPDET did not complete: %x\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ARIZONA_HP_LVL_MASK,4,2        ; @ARIZONA_HP_LVL_MASK
	.comm	_ARIZONA_HP_DONE_B,4,2          ; @ARIZONA_HP_DONE_B
	.comm	_ARIZONA_HP_DACVAL,4,2          ; @ARIZONA_HP_DACVAL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to read HP value: %d\n"

	.comm	_ARIZONA_HEADPHONE_DETECT_1,4,2 ; @ARIZONA_HEADPHONE_DETECT_1
	.comm	_ARIZONA_HP_IMPEDANCE_RANGE_MASK,4,2 ; @ARIZONA_HP_IMPEDANCE_RANGE_MASK
	.comm	_ARIZONA_HP_IMPEDANCE_RANGE_SHIFT,4,2 ; @ARIZONA_HP_IMPEDANCE_RANGE_SHIFT
	.comm	_arizona_hpdet_b_ranges,8,3     ; @arizona_hpdet_b_ranges
	.comm	_ARIZONA_HPDET_B_RANGE_MAX,4,2  ; @ARIZONA_HPDET_B_RANGE_MAX
l_.str.3:                               ; @.str.3
	.asciz	"Moving to HPDET range %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Measurement out of range\n"

	.comm	_ARIZONA_HPDET_MAX,4,2          ; @ARIZONA_HPDET_MAX
l_.str.5:                               ; @.str.5
	.asciz	"HPDET read %d in range %d\n"

	.comm	_ARIZONA_HP_LVL_B_MASK,4,2      ; @ARIZONA_HP_LVL_B_MASK
	.comm	_arizona_hpdet_c_ranges,8,3     ; @arizona_hpdet_c_ranges
l_.str.6:                               ; @.str.6
	.asciz	"Moving to HPDET range %d-%d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Reporting range boundary %d\n"

l_.str.8:                               ; @.str.8
	.asciz	"Unknown HPDET IP revision %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.9:                               ; @.str.9
	.asciz	"HP impedance %d ohms\n"

	.no_dead_strip	_arizona_hpdet_read
.subsections_via_symbols
