	.file	"extr_xonar_wm87x6.c_wm8776_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	wm8776_write, @function
wm8776_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	mov	eax, DWORD PTR [rdi]
	and	eax, DWORD PTR OXYGEN_FUNCTION_2WIRE_SPI_MASK[rip]
	cmp	eax, DWORD PTR OXYGEN_FUNCTION_SPI[rip]
	mov	esi, ebx
	mov	r12, QWORD PTR 8[rdi]
	je	.L8
	call	wm8776_write_i2c@PLT
.L3:
	mov	rdi, QWORD PTR [r12]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jbe	.L1
	cmp	DWORD PTR WM8776_HPLVOL[rip], ebx
	jbe	.L9
.L5:
	mov	rax, QWORD PTR [r12]
	mov	DWORD PTR [rax+rbx*4], ebp
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	cmp	DWORD PTR WM8776_DACMASTER[rip], ebx
	jb	.L5
	mov	eax, DWORD PTR WM8776_UPDATE[rip]
	not	eax
	and	ebp, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	call	wm8776_write_spi@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	wm8776_write, .-wm8776_write
	.comm	WM8776_UPDATE,4,4
	.comm	WM8776_HPLVOL,4,4
	.comm	WM8776_DACMASTER,4,4
	.comm	OXYGEN_FUNCTION_SPI,4,4
	.comm	OXYGEN_FUNCTION_2WIRE_SPI_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_xonar_wm87x6.c_wm8776_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wm8776_write, %function
wm8776_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	lr, .L9
	ldr	ip, [r0]
	ldr	r4, [lr]
	ldr	lr, .L9+4
	and	ip, ip, r4
	ldr	lr, [lr]
	mov	r4, r1
	cmp	ip, lr
	mov	r5, r2
	ldr	r6, [r0, #4]
	beq	.L8
	bl	wm8776_write_i2c
.L3:
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r0, r4
	popls	{r4, r5, r6, pc}
	ldr	r3, .L9+8
	ldr	r3, [r3]
	cmp	r3, r4
	bhi	.L5
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmp	r3, r4
	ldrcs	r3, .L9+16
	ldrcs	r3, [r3]
	biccs	r5, r5, r3
.L5:
	ldr	r3, [r6]
	str	r5, [r3, r4, lsl #2]
	pop	{r4, r5, r6, pc}
.L8:
	bl	wm8776_write_spi
	b	.L3
.L10:
	.align	2
.L9:
	.word	OXYGEN_FUNCTION_2WIRE_SPI_MASK
	.word	OXYGEN_FUNCTION_SPI
	.word	WM8776_HPLVOL
	.word	WM8776_DACMASTER
	.word	WM8776_UPDATE
	.size	wm8776_write, .-wm8776_write
	.comm	WM8776_UPDATE,4,4
	.comm	WM8776_HPLVOL,4,4
	.comm	WM8776_DACMASTER,4,4
	.comm	OXYGEN_FUNCTION_SPI,4,4
	.comm	OXYGEN_FUNCTION_2WIRE_SPI_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
