	.file	"extr_ac97_codec.c_snd_ac97_put_spsa.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ac97_put_spsa, @function
snd_ac97_put_spsa:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	snd_kcontrol_chip@PLT
	mov	edx, DWORD PTR [rbx]
	mov	rbp, rax
	mov	rax, QWORD PTR 0[r13]
	mov	r14d, edx
	movzx	r12d, dl
	sar	edx, 16
	mov	rdi, rbp
	movzx	r13d, WORD PTR [rax]
	sar	r14d, 8
	movzx	ebx, dl
	call	mutex_lock@PLT
	and	r14d, 15
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, r14d
	and	r13d, ebx
	xor	r14d, r14d
	sal	ebx, cl
	movsx	r13d, r13w
	sal	r13d, cl
	call	snd_ac97_read_cache@PLT
	mov	edx, ebx
	not	edx
	and	edx, eax
	or	edx, r13d
	cmp	ax, dx
	jne	.L9
.L2:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	mov	rdi, rbp
	call	snd_ac97_read_cache@PLT
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	movzx	edx, WORD PTR AC97_EA_SPDIF[rip]
	mov	r15d, eax
	call	snd_ac97_update_bits_nolock@PLT
	movzx	edx, bx
	movzx	ecx, r13w
	mov	esi, r12d
	mov	rdi, rbp
	call	snd_ac97_update_bits_nolock@PLT
	movzx	edx, WORD PTR AC97_EA_SPDIF[rip]
	mov	r14d, eax
	test	dx, r15w
	je	.L2
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	mov	ecx, edx
	mov	rdi, rbp
	call	snd_ac97_update_bits_nolock@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	snd_ac97_put_spsa, .-snd_ac97_put_spsa
	.comm	AC97_EXTENDED_STATUS,4,4
	.comm	AC97_EA_SPDIF,2,2
	.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_ac97_codec.c_snd_ac97_put_spsa.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ac97_put_spsa, %function
snd_ac97_put_spsa:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r1
	mov	r6, r0
	bl	snd_kcontrol_chip
	mov	r5, r0
	ldr	r6, [r6]
	ldr	r3, [r4]
	asr	r7, r6, #8
	asr	r4, r6, #16
	and	r6, r6, #255
	ldr	r8, [r3]
	bl	mutex_lock
	mov	r1, r6
	mov	r0, r5
	bl	snd_ac97_read_cache
	and	r4, r4, #255
	and	r7, r7, #15
	and	r8, r8, r4
	lsl	r4, r4, r7
	bic	r3, r0, r4
	lsl	r7, r8, r7
	orr	r3, r3, r7
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	cmp	r0, r3
	moveq	r4, #0
	bne	.L9
.L2:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r9, .L10
	mov	r0, r5
	ldr	r1, [r9]
	bl	snd_ac97_read_cache
	ldr	r10, .L10+4
	mov	r8, r0
	mov	r3, #0
	ldr	r1, [r9]
	ldrh	r2, [r10]
	mov	r0, r5
	bl	snd_ac97_update_bits_nolock
	lsl	r2, r4, #16
	lsl	r3, r7, #16
	lsr	r3, r3, #16
	mov	r1, r6
	mov	r0, r5
	lsr	r2, r2, #16
	bl	snd_ac97_update_bits_nolock
	ldrh	r3, [r10]
	mov	r4, r0
	tst	r3, r8
	beq	.L2
	mov	r2, r3
	mov	r0, r5
	ldr	r1, [r9]
	bl	snd_ac97_update_bits_nolock
	b	.L2
.L11:
	.align	2
.L10:
	.word	AC97_EXTENDED_STATUS
	.word	AC97_EA_SPDIF
	.size	snd_ac97_put_spsa, .-snd_ac97_put_spsa
	.comm	AC97_EXTENDED_STATUS,4,4
	.comm	AC97_EA_SPDIF,2,2
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
