	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arizona_hpdet_irq
_arizona_hpdet_irq:                     ## @arizona_hpdet_irq
	.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	%rsi, %rbx
	movq	32(%rsi), %r12
	movl	8(%r12), %r15d
	movl	$0, -44(%rbp)
	leaq	8(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movl	24(%rbx), %edi
	movq	_EXTCON_MECHANICAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_extcon_get_state
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_arizona_hpdet_read
	movq	_EAGAIN@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	addl	%eax, %ecx
	je	LBB0_23
## %bb.7:
	testl	%eax, %eax
	js	LBB0_15
## %bb.8:
	movl	%eax, -48(%rbp)
	movl	(%r12), %edi
	movq	_ARIZONA_HEADPHONE_DETECT_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPCREL(%rip), %rax
	movq	_ARIZONA_HP_POLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_arizona_hpdet_do_id
	movl	(%r13), %ecx
	addl	%eax, %ecx
	je	LBB0_23
## %bb.9:
	testl	%eax, %eax
	js	LBB0_15
## %bb.10:
	cmpl	$5000, -48(%rbp)                ## imm = 0x1388
	jl	LBB0_11
## %bb.12:
	movq	_EXTCON_JACK_LINE_OUT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_1:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_3:
	movl	4(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_23
LBB0_5:
	movl	4(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
LBB0_15:
	movl	(%r12), %edi
	movq	_ARIZONA_HEADPHONE_DETECT_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPCREL(%rip), %rax
	movq	_ARIZONA_HP_POLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_arizona_extcon_hp_clamp
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.16:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_gpio_set_value_cansleep
LBB0_17:
	movl	(%r12), %edi
	movq	_ARIZONA_ACCESSORY_DETECT_MODE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARIZONA_ACCDET_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ARIZONA_ACCDET_MODE_MIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_update_bits
	cmpl	$0, -44(%rbp)
	jne	LBB0_19
## %bb.18:
	cmpq	$0, 16(%rbx)
	je	LBB0_20
LBB0_19:
	movq	%rbx, %rdi
	callq	_arizona_start_mic
LBB0_20:
	cmpl	$0, (%rbx)
	je	LBB0_22
## %bb.21:
	movl	12(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
	movl	$0, (%rbx)
LBB0_22:
	movl	$1, 4(%rbx)
LBB0_23:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_EXTCON_JACK_HEADPHONE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movl	24(%rbx), %edi
	movl	$1, %edx
	callq	_extcon_set_state_sync
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	4(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTCON_JACK_HEADPHONE,4,2      ## @EXTCON_JACK_HEADPHONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Spurious HPDET IRQ\n"

	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_EXTCON_MECHANICAL,4,2          ## @EXTCON_MECHANICAL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to check cable state: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Ignoring HPDET for removed cable\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.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_POLL,4,2            ## @ARIZONA_HP_POLL
	.comm	_EXTCON_JACK_LINE_OUT,4,2       ## @EXTCON_JACK_LINE_OUT
L_.str.3:                               ## @.str.3
	.asciz	"Failed to report HP/line: %d\n"

	.comm	_ARIZONA_ACCESSORY_DETECT_MODE_1,4,2 ## @ARIZONA_ACCESSORY_DETECT_MODE_1
	.comm	_ARIZONA_ACCDET_MODE_MASK,4,2   ## @ARIZONA_ACCDET_MODE_MASK
	.comm	_ARIZONA_ACCDET_MODE_MIC,4,2    ## @ARIZONA_ACCDET_MODE_MIC
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_arizona_hpdet_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arizona_hpdet_irq
_arizona_hpdet_irq:                     ; @arizona_hpdet_irq
	.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, x1
	ldr	x22, [x1, #32]
	ldr	w21, [x22, #8]
	str	wzr, [sp, #8]
	add	x19, x1, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.1:
	ldr	w0, [x20, #24]
Lloh0:
	adrp	x8, _EXTCON_MECHANICAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTCON_MECHANICAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_extcon_get_state
	mov	x2, x0
	tbnz	w0, #31, LBB0_10
; %bb.2:
	cbz	w2, LBB0_11
; %bb.3:
	mov	x0, x20
	bl	_arizona_hpdet_read
Lloh3:
	adrp	x23, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _EAGAIN@GOTPAGEOFF]
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_20
; %bb.4:
	tbnz	w0, #31, LBB0_12
; %bb.5:
	str	w0, [sp, #12]
	ldr	w0, [x22]
Lloh5:
	adrp	x8, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGEOFF]
Lloh7:
	adrp	x9, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	ldr	w8, [x9]
Lloh11:
	adrp	x9, _ARIZONA_HP_POLL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ARIZONA_HP_POLL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w3, #0
	bl	_regmap_update_bits
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x20
	bl	_arizona_hpdet_do_id
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_20
; %bb.6:
	tbnz	w0, #31, LBB0_12
; %bb.7:
Lloh14:
	adrp	x8, _EXTCON_JACK_LINE_OUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EXTCON_JACK_LINE_OUT@GOTPAGEOFF]
Lloh16:
	adrp	x9, _EXTCON_JACK_HEADPHONE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EXTCON_JACK_HEADPHONE@GOTPAGEOFF]
	ldr	w10, [sp, #12]
	mov	w11, #4999
	cmp	w10, w11
	csel	x8, x8, x9, gt
	ldr	w1, [x8]
	ldr	w0, [x20, #24]
	mov	w2, #1
	bl	_extcon_set_state_sync
	cbz	w0, LBB0_12
; %bb.8:
	mov	x2, x0
	ldr	w0, [x22, #4]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_12
LBB0_9:
	ldr	w0, [x22, #4]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	x0, x19
	bl	_mutex_unlock
Lloh22:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_21
LBB0_10:
	ldr	w0, [x22, #4]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_20
LBB0_11:
	ldr	w0, [x22, #4]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
LBB0_12:
	ldr	w0, [x22]
Lloh28:
	adrp	x8, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ARIZONA_HEADPHONE_DETECT_1@GOTPAGEOFF]
Lloh30:
	adrp	x9, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ARIZONA_HP_IMPEDANCE_RANGE_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	ldr	w8, [x9]
Lloh34:
	adrp	x9, _ARIZONA_HP_POLL@GOTPAGE
Lloh35:
	ldr	x9, [x9, _ARIZONA_HP_POLL@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w3, #0
	bl	_regmap_update_bits
	mov	x0, x20
	mov	w1, #0
	bl	_arizona_extcon_hp_clamp
	cbz	w21, LBB0_14
; %bb.13:
	mov	x0, x21
	mov	w1, #0
	bl	_gpio_set_value_cansleep
LBB0_14:
	ldr	w0, [x22]
Lloh37:
	adrp	x8, _ARIZONA_ACCESSORY_DETECT_MODE_1@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ARIZONA_ACCESSORY_DETECT_MODE_1@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _ARIZONA_ACCDET_MODE_MASK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ARIZONA_ACCDET_MODE_MASK@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
Lloh43:
	adrp	x8, _ARIZONA_ACCDET_MODE_MIC@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ARIZONA_ACCDET_MODE_MIC@GOTPAGEOFF]
Lloh45:
	ldr	w3, [x8]
	bl	_regmap_update_bits
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_16
; %bb.15:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_17
LBB0_16:
	mov	x0, x20
	bl	_arizona_start_mic
LBB0_17:
	ldr	w8, [x20]
	cbz	w8, LBB0_19
; %bb.18:
	ldr	w0, [x20, #12]
	bl	_pm_runtime_put_autosuspend
	str	wzr, [x20]
LBB0_19:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
Lloh46:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh47:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_21:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh32
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTCON_JACK_HEADPHONE,4,2      ; @EXTCON_JACK_HEADPHONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Spurious HPDET IRQ\n"

	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_EXTCON_MECHANICAL,4,2          ; @EXTCON_MECHANICAL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to check cable state: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Ignoring HPDET for removed cable\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.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_POLL,4,2            ; @ARIZONA_HP_POLL
	.comm	_EXTCON_JACK_LINE_OUT,4,2       ; @EXTCON_JACK_LINE_OUT
l_.str.3:                               ; @.str.3
	.asciz	"Failed to report HP/line: %d\n"

	.comm	_ARIZONA_ACCESSORY_DETECT_MODE_1,4,2 ; @ARIZONA_ACCESSORY_DETECT_MODE_1
	.comm	_ARIZONA_ACCDET_MODE_MASK,4,2   ; @ARIZONA_ACCDET_MODE_MASK
	.comm	_ARIZONA_ACCDET_MODE_MIC,4,2    ; @ARIZONA_ACCDET_MODE_MIC
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_arizona_hpdet_irq
.subsections_via_symbols
