	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8776_field_set_from_ctl
_wm8776_field_set_from_ctl:             ## @wm8776_field_set_from_ctl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %rax
	movq	8(%rdi), %rdi
	movq	(%rdi), %rcx
	movq	(%rcx), %r8
	movq	_WM8776_ALCCTRL1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_WM8776_LCSEL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%r8,%rcx,4), %edx
	movq	_WM8776_LCSEL_LIMITER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_1
## %bb.2:
	movq	_LC_CONTROL_LIMITER@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_LC_CONTROL_ALC@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rax), %eax
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.4:
	movl	%eax, %edx
	andl	$15, %edx
	movl	%eax, %r9d
	shrl	$16, %r9d
	andl	$15, %r9d
	movl	%eax, %ecx
	shrl	$20, %ecx
	andl	$15, %ecx
	movl	%eax, %esi
	shrl	$24, %esi
	andl	$31, %esi
	testl	$536870912, %eax                ## imm = 0x20000000
	je	LBB0_6
## %bb.5:
	movl	%eax, %r10d
	shrl	$12, %r10d
	andl	$15, %r10d
	shrl	$8, %eax
	andl	$15, %eax
	subl	%edx, %eax
	addl	%r10d, %eax
	movl	%eax, %edx
LBB0_6:
	shll	%cl, %r9d
	notl	%r9d
	andl	(%r8,%rsi,4), %r9d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	%r9d, %edx
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbp
	jmp	_wm8776_write_cached            ## TAILCALL
LBB0_7:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM8776_ALCCTRL1,8,3            ## @WM8776_ALCCTRL1
	.comm	_WM8776_LCSEL_MASK,4,2          ## @WM8776_LCSEL_MASK
	.comm	_WM8776_LCSEL_LIMITER,4,2       ## @WM8776_LCSEL_LIMITER
	.comm	_LC_CONTROL_LIMITER,4,2         ## @LC_CONTROL_LIMITER
	.comm	_LC_CONTROL_ALC,4,2             ## @LC_CONTROL_ALC
	.no_dead_strip	_wm8776_field_set_from_ctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8776_field_set_from_ctl
_wm8776_field_set_from_ctl:             ; @wm8776_field_set_from_ctl
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	ldr	x0, [x0, #8]
	ldr	x9, [x0]
	ldr	x9, [x9]
Lloh0:
	adrp	x10, _WM8776_ALCCTRL1@GOTPAGE
Lloh1:
	ldr	x10, [x10, _WM8776_ALCCTRL1@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	w10, [x9, x10, lsl #2]
Lloh3:
	adrp	x11, _WM8776_LCSEL_MASK@GOTPAGE
Lloh4:
	ldr	x11, [x11, _WM8776_LCSEL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	and	w10, w11, w10
Lloh6:
	adrp	x11, _WM8776_LCSEL_LIMITER@GOTPAGE
Lloh7:
	ldr	x11, [x11, _WM8776_LCSEL_LIMITER@GOTPAGEOFF]
Lloh8:
	adrp	x12, _LC_CONTROL_LIMITER@GOTPAGE
Lloh9:
	ldr	x12, [x12, _LC_CONTROL_LIMITER@GOTPAGEOFF]
Lloh10:
	adrp	x13, _LC_CONTROL_ALC@GOTPAGE
Lloh11:
	ldr	x13, [x13, _LC_CONTROL_ALC@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	cmp	w10, w11
	csel	x10, x12, x13, eq
	ldr	w10, [x10]
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_2
; %bb.1:
	and	w10, w8, #0xf
	ubfx	w11, w8, #16, #4
	ubfx	w12, w8, #20, #4
	ubfx	x1, x8, #24, #5
	ubfx	w13, w8, #12, #4
	ubfx	w14, w8, #8, #4
	sub	w14, w14, w10
	add	w13, w14, w13
	tst	w8, #0x20000000
	csel	w8, w10, w13, eq
	ldr	w9, [x9, x1, lsl #2]
	lsl	w10, w11, w12
	bic	w9, w9, w10
	lsl	w8, w8, w12
	orr	w2, w9, w8
                                        ; kill: def $w1 killed $w1 killed $x1
	b	_wm8776_write_cached
LBB0_2:
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WM8776_ALCCTRL1,8,3            ; @WM8776_ALCCTRL1
	.comm	_WM8776_LCSEL_MASK,4,2          ; @WM8776_LCSEL_MASK
	.comm	_WM8776_LCSEL_LIMITER,4,2       ; @WM8776_LCSEL_LIMITER
	.comm	_LC_CONTROL_LIMITER,4,2         ; @LC_CONTROL_LIMITER
	.comm	_LC_CONTROL_ALC,4,2             ; @LC_CONTROL_ALC
	.no_dead_strip	_wm8776_field_set_from_ctl
.subsections_via_symbols
