	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm5102_clear_write_sequencer
_wm5102_clear_write_sequencer:          ## @wm5102_clear_write_sequencer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	movq	_ARIZONA_WRITE_SEQUENCER_CTRL_3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_arizona_enable_reset
	movl	4(%r14), %edi
	callq	_regulator_disable
	movl	$20, %edi
	callq	_msleep
	movl	4(%r14), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_arizona_disable_reset
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ARIZONA_WRITE_SEQUENCER_CTRL_3,4,2 ## @ARIZONA_WRITE_SEQUENCER_CTRL_3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to clear write sequencer state: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to re-enable DCVDD: %d\n"

	.no_dead_strip	_wm5102_clear_write_sequencer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm5102_clear_write_sequencer
_wm5102_clear_write_sequencer:          ; @wm5102_clear_write_sequencer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _ARIZONA_WRITE_SEQUENCER_CTRL_3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARIZONA_WRITE_SEQUENCER_CTRL_3@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_regmap_write
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_arizona_enable_reset
	ldr	w0, [x19, #4]
	bl	_regulator_disable
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x19, #4]
	bl	_regulator_enable
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x2, x20
	bl	_dev_err
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_arizona_disable_reset
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ARIZONA_WRITE_SEQUENCER_CTRL_3,4,2 ; @ARIZONA_WRITE_SEQUENCER_CTRL_3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to clear write sequencer state: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to re-enable DCVDD: %d\n"

	.no_dead_strip	_wm5102_clear_write_sequencer
.subsections_via_symbols
