	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arizona_start_hpdet_acc_id
_arizona_start_hpdet_acc_id:            ## @arizona_start_hpdet_acc_id
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movl	$32, -36(%rbp)
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	16(%rbx), %edi
	callq	_pm_runtime_get_sync
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_arizona_extcon_hp_clamp
	movq	_ARIZONA_ACCESSORY_DETECT_MODE_1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_ARIZONA_ACCDET_SRC@GOTPCREL(%rip), %rax
	movq	_ARIZONA_ACCDET_MODE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%rax), %edx
	movq	8(%rbx), %rax
	movl	4(%r14), %edi
	movl	8(%r14), %ecx
	orl	(%rax), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%eax, %edx
	callq	_dev_err
	movl	4(%r14), %edi
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	_ARIZONA_ACCDET_MODE_MIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_update_bits
	movl	4(%rbx), %edi
	movq	_EXTCON_JACK_HEADPHONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_extcon_set_state_sync
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
LBB0_4:
	movl	$0, (%rbx)
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.6:
	movl	4(%r14), %edi
	movq	_ARIZONA_HEADPHONE_DETECT_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARIZONA_HP_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_8:
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_arizona_hpdet_do_id
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Starting identification via HPDET\n"

	.comm	_ARIZONA_ACCESSORY_DETECT_MODE_1,4,2 ## @ARIZONA_ACCESSORY_DETECT_MODE_1
	.comm	_ARIZONA_ACCDET_SRC,4,2         ## @ARIZONA_ACCDET_SRC
	.comm	_ARIZONA_ACCDET_MODE_MASK,4,2   ## @ARIZONA_ACCDET_MODE_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set HPDET mode: %d\n"

	.comm	_ARIZONA_HEADPHONE_DETECT_1,4,2 ## @ARIZONA_HEADPHONE_DETECT_1
	.comm	_ARIZONA_HP_POLL,4,2            ## @ARIZONA_HP_POLL
L_.str.2:                               ## @.str.2
	.asciz	"Can't start HPDETL measurement: %d\n"

	.comm	_ARIZONA_ACCDET_MODE_MIC,4,2    ## @ARIZONA_ACCDET_MODE_MIC
	.comm	_EXTCON_JACK_HEADPHONE,4,2      ## @EXTCON_JACK_HEADPHONE
L_.str.3:                               ## @.str.3
	.asciz	"Failed to report headphone: %d\n"

	.no_dead_strip	_arizona_start_hpdet_acc_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arizona_start_hpdet_acc_id
_arizona_start_hpdet_acc_id:            ; @arizona_start_hpdet_acc_id
	.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	x19, x0
	ldr	x20, [x0, #24]
	mov	w8, #32
	str	w8, [sp, #12]
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #16]
	bl	_pm_runtime_get_sync
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_arizona_extcon_hp_clamp
Lloh2:
	adrp	x21, _ARIZONA_ACCESSORY_DETECT_MODE_1@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ARIZONA_ACCESSORY_DETECT_MODE_1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh4:
	adrp	x8, _ARIZONA_ACCDET_SRC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ARIZONA_ACCDET_SRC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x22, _ARIZONA_ACCDET_MODE_MASK@GOTPAGE
Lloh8:
	ldr	x22, [x22, _ARIZONA_ACCDET_MODE_MASK@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w2, w9, w8
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldp	w0, w9, [x20, #4]
	orr	w3, w9, w8
	bl	_regmap_update_bits
	cbz	w0, LBB0_6
; %bb.1:
	mov	x2, x0
	ldr	w0, [x20]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_2:
	bl	_dev_err
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	ldr	w2, [x22]
Lloh11:
	adrp	x8, _ARIZONA_ACCDET_MODE_MIC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ARIZONA_ACCDET_MODE_MIC@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	bl	_regmap_update_bits
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _EXTCON_JACK_HEADPHONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EXTCON_JACK_HEADPHONE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_extcon_set_state_sync
	cbz	w0, LBB0_4
; %bb.3:
	mov	x2, x0
	ldr	w0, [x20]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_4:
	str	wzr, [x19]
LBB0_5:
	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
LBB0_6:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w0, [x20, #4]
Lloh19:
	adrp	x8, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _ARIZONA_HP_POLL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ARIZONA_HP_POLL@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	cbz	w0, LBB0_5
; %bb.8:
	mov	x2, x0
	ldr	w0, [x20]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_9:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_arizona_hpdet_do_id
	b	LBB0_5
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Starting identification via HPDET\n"

	.comm	_ARIZONA_ACCESSORY_DETECT_MODE_1,4,2 ; @ARIZONA_ACCESSORY_DETECT_MODE_1
	.comm	_ARIZONA_ACCDET_SRC,4,2         ; @ARIZONA_ACCDET_SRC
	.comm	_ARIZONA_ACCDET_MODE_MASK,4,2   ; @ARIZONA_ACCDET_MODE_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set HPDET mode: %d\n"

	.comm	_ARIZONA_HEADPHONE_DETECT_1,4,2 ; @ARIZONA_HEADPHONE_DETECT_1
	.comm	_ARIZONA_HP_POLL,4,2            ; @ARIZONA_HP_POLL
l_.str.2:                               ; @.str.2
	.asciz	"Can't start HPDETL measurement: %d\n"

	.comm	_ARIZONA_ACCDET_MODE_MIC,4,2    ; @ARIZONA_ACCDET_MODE_MIC
	.comm	_EXTCON_JACK_HEADPHONE,4,2      ; @EXTCON_JACK_HEADPHONE
l_.str.3:                               ; @.str.3
	.asciz	"Failed to report headphone: %d\n"

	.no_dead_strip	_arizona_start_hpdet_acc_id
.subsections_via_symbols
