	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8775_s_ctrl
_wm8775_s_ctrl:                         ## @wm8775_s_ctrl
	.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, %r12
	callq	_to_sd
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_state
	cmpl	$128, (%r12)
	jne	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	_R21@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$192, %edx
	callq	_wm8775_write
	movq	_R14@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$468, %edx                      ## imm = 0x1D4
	callq	_wm8775_write
	movq	_R15@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$468, %edx                      ## imm = 0x1D4
	callq	_wm8775_write
	xorl	%ebx, %ebx
	cmpl	$0, 4(%r12)
	jne	LBB0_4
## %bb.2:
	movl	(%r13), %esi
	movl	$256, %edx                      ## imm = 0x100
	addl	(%r15), %edx
	movq	%r14, %rdi
	callq	_wm8775_write
	jmp	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R21,4,2                        ## @R21
	.comm	_R14,4,2                        ## @R14
	.comm	_R15,4,2                        ## @R15
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wm8775_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8775_s_ctrl
_wm8775_s_ctrl:                         ; @wm8775_s_ctrl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	bl	_to_sd
	mov	x19, x0
	bl	_to_state
	ldr	w8, [x20]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x22, _R21@GOTPAGE
Lloh1:
	ldr	x22, [x22, _R21@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #192
	bl	_wm8775_write
Lloh2:
	adrp	x8, _R14@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R14@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #468
	bl	_wm8775_write
Lloh5:
	adrp	x8, _R15@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R15@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #468
	bl	_wm8775_write
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w1, [x22]
	ldr	w8, [x21]
	add	w2, w8, #256
	mov	x0, x19
	bl	_wm8775_write
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_R21,4,2                        ; @R21
	.comm	_R14,4,2                        ; @R14
	.comm	_R15,4,2                        ; @R15
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wm8775_s_ctrl
.subsections_via_symbols
