	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8776_write
_wm8776_write:                          ## @wm8776_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	_OXYGEN_FUNCTION_2WIRE_SPI_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdi), %eax
	movq	8(%rdi), %r15
	movq	_OXYGEN_FUNCTION_SPI@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_wm8776_write_spi
	jmp	LBB0_3
LBB0_2:
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_wm8776_write_i2c
LBB0_3:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jbe	LBB0_5
## %bb.4:
	movq	_WM8776_HPLVOL@GOTPCREL(%rip), %rax
	movq	_WM8776_DACMASTER@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	movq	_WM8776_UPDATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	$-1, %edx
	cmovbl	%edx, %ecx
	cmpl	%ebx, (%rax)
	cmoval	%edx, %ecx
	andl	%r14d, %ecx
	movq	(%r15), %rax
	movl	%ebx, %edx
	movl	%ecx, (%rax,%rdx,4)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OXYGEN_FUNCTION_2WIRE_SPI_MASK,4,2 ## @OXYGEN_FUNCTION_2WIRE_SPI_MASK
	.comm	_OXYGEN_FUNCTION_SPI,4,2        ## @OXYGEN_FUNCTION_SPI
	.comm	_WM8776_HPLVOL,4,2              ## @WM8776_HPLVOL
	.comm	_WM8776_DACMASTER,4,2           ## @WM8776_DACMASTER
	.comm	_WM8776_UPDATE,4,2              ## @WM8776_UPDATE
	.no_dead_strip	_wm8776_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8776_write
_wm8776_write:                          ; @wm8776_write
	.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, x2
	mov	x19, x1
	ldr	x21, [x0, #8]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _OXYGEN_FUNCTION_2WIRE_SPI_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OXYGEN_FUNCTION_2WIRE_SPI_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _OXYGEN_FUNCTION_SPI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OXYGEN_FUNCTION_SPI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	bl	_wm8776_write_spi
	b	LBB0_3
LBB0_2:
	bl	_wm8776_write_i2c
LBB0_3:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, w19
	b.ls	LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _WM8776_HPLVOL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WM8776_HPLVOL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _WM8776_DACMASTER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WM8776_DACMASTER@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, w19
	ccmp	w8, w19, #2, hs
Lloh12:
	adrp	x8, _WM8776_UPDATE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WM8776_UPDATE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	w9, #-1
	csinv	w8, w9, w8, hi
	and	w8, w8, w20
	ldr	x9, [x21]
	str	w8, [x9, w19, uxtw #2]
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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OXYGEN_FUNCTION_2WIRE_SPI_MASK,4,2 ; @OXYGEN_FUNCTION_2WIRE_SPI_MASK
	.comm	_OXYGEN_FUNCTION_SPI,4,2        ; @OXYGEN_FUNCTION_SPI
	.comm	_WM8776_HPLVOL,4,2              ; @WM8776_HPLVOL
	.comm	_WM8776_DACMASTER,4,2           ; @WM8776_DACMASTER
	.comm	_WM8776_UPDATE,4,2              ; @WM8776_UPDATE
	.no_dead_strip	_wm8776_write
.subsections_via_symbols
