	.file	"extr_ac97_codec.c_snd_ac97_spdif_default_put.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ac97_spdif_default_put, @function
snd_ac97_spdif_default_put:
.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
	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, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	snd_kcontrol_chip@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	esi, DWORD PTR IEC958_AES0_PROFESSIONAL[rip]
	movzx	ebx, WORD PTR IEC958_AES0_NONAUDIO[rip]
	mov	r14, rax
	mov	eax, DWORD PTR [rdx]
	or	ebx, esi
	and	ebx, eax
	movzx	ecx, bx
	test	eax, esi
	je	.L2
	mov	edx, DWORD PTR IEC958_AES0_PRO_FS[rip]
	mov	esi, DWORD PTR IEC958_AES0_PRO_EMPHASIS_5015[rip]
	mov	ebp, edx
	or	ebp, esi
	and	ebp, eax
	mov	eax, edx
	or	ebp, ecx
	and	eax, ebp
	cmp	eax, 132
	je	.L3
	cmp	eax, 133
	je	.L4
	mov	edx, ebx
	or	bh, 16
	or	dh, 32
	cmp	eax, 131
	cmove	ebx, edx
.L3:
	mov	edx, DWORD PTR IEC958_AES0_PRO_EMPHASIS[rip]
	mov	eax, ebx
	or	eax, 8
	and	edx, ebp
	cmp	esi, edx
	cmove	ebx, eax
.L6:
	lea	r15, 16[r14]
	xor	r13d, r13d
	mov	rdi, r15
	call	mutex_lock@PLT
	cmp	DWORD PTR [r14], ebp
	mov	eax, DWORD PTR 4[r14]
	mov	DWORD PTR [r14], ebp
	setne	r13b
	test	DWORD PTR AC97_CS_SPDIF[rip], eax
	je	.L11
	xor	ecx, ecx
	test	bh, 48
	mov	esi, DWORD PTR AC97_CSR_SPDIF[rip]
	mov	edx, 16383
	sete	cl
	and	bh, -49
	mov	rdi, r14
	sal	ecx, 12
	or	ebx, ecx
	movzx	ecx, bx
	call	snd_ac97_update_bits_nolock@PLT
	or	r13d, eax
.L13:
	mov	rdi, r15
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR IEC958_AES0_CON_EMPHASIS_5015[rip]
	mov	ebp, DWORD PTR IEC958_AES1_CON_CATEGORY[rip]
	or	ebp, DWORD PTR IEC958_AES1_CON_ORIGINAL[rip]
	and	ebp, DWORD PTR 4[rdx]
	mov	edx, DWORD PTR 12[rdx]
	and	edx, DWORD PTR IEC958_AES3_CON_FS[rip]
	sal	ebp, 8
	sal	edx, 24
	mov	esi, DWORD PTR IEC958_AES0_CON_NOT_COPYRIGHT[rip]
	or	ebp, edx
	mov	edx, edi
	or	edx, esi
	and	eax, edx
	mov	edx, DWORD PTR IEC958_AES0_CON_EMPHASIS[rip]
	or	ebp, eax
	mov	eax, ebx
	or	ebp, ecx
	or	eax, 8
	and	edx, ebp
	cmp	edi, edx
	cmove	ebx, eax
	mov	eax, ebx
	or	eax, 4
	test	esi, ebp
	cmove	ebx, eax
	mov	eax, ebp
	shr	eax, 8
	sal	eax, 4
	and	ax, 4080
	or	ebx, eax
	mov	eax, ebp
	shr	eax, 24
	cmp	eax, 129
	je	.L6
	cmp	eax, 130
	je	.L9
	mov	edx, ebx
	or	bh, 16
	or	dh, 32
	cmp	eax, 128
	cmove	ebx, edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	test	DWORD PTR AC97_CX_SPDIF[rip], eax
	je	.L14
	movzx	edx, WORD PTR AC97_CXR_COPYRGT[rip]
	mov	eax, DWORD PTR IEC958_AES0_CON_EMPHASIS_5015[rip]
	mov	ecx, 0
	mov	rdi, r14
	or	eax, DWORD PTR IEC958_AES0_CON_NOT_COPYRIGHT[rip]
	mov	esi, DWORD PTR AC97_CXR_AUDIO_MISC[rip]
	test	eax, ebp
	mov	eax, DWORD PTR AC97_CXR_SPDIF_AC3[rip]
	cmove	ecx, edx
	test	DWORD PTR IEC958_AES0_NONAUDIO[rip], ebp
	cmove	eax, DWORD PTR AC97_CXR_SPDIF_PCM[rip]
	or	dx, WORD PTR AC97_CXR_SPDIF_MASK[rip]
	or	ecx, eax
	movzx	edx, dx
	movzx	ecx, cx
	call	snd_ac97_update_bits_nolock@PLT
	or	r13d, eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR AC97_ID_YMF743[rip]
	movzx	r12d, bx
	cmp	QWORD PTR 8[r14], rax
	je	.L32
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	mov	rdi, r14
	call	snd_ac97_read_cache@PLT
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	xor	ecx, ecx
	mov	rdi, r14
	movzx	edx, WORD PTR AC97_EA_SPDIF[rip]
	mov	ebx, eax
	call	snd_ac97_update_bits_nolock@PLT
	mov	edx, 16383
	mov	ecx, r12d
	mov	rdi, r14
	mov	esi, DWORD PTR AC97_SPDIF[rip]
	call	snd_ac97_update_bits_nolock@PLT
	movzx	edx, WORD PTR AC97_EA_SPDIF[rip]
	or	r13d, eax
	test	dx, bx
	je	.L13
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	mov	ecx, edx
	mov	rdi, r14
	call	snd_ac97_update_bits_nolock@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	or	bh, 48
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	or	bh, 48
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L32:
	mov	ecx, r12d
	lea	ebx, 0[0+r12*4]
	mov	edx, 65336
	mov	rdi, r14
	sal	ecx, 4
	and	ebx, 56
	mov	esi, DWORD PTR AC97_YMF7X3_DIT_CTRL[rip]
	xor	cl, cl
	or	ebx, ecx
	movzx	ecx, bx
	call	snd_ac97_update_bits_nolock@PLT
	or	r13d, eax
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	snd_ac97_spdif_default_put, .-snd_ac97_spdif_default_put
	.comm	IEC958_AES3_CON_FS,4,4
	.comm	IEC958_AES1_CON_ORIGINAL,4,4
	.comm	IEC958_AES1_CON_CATEGORY,4,4
	.comm	IEC958_AES0_PRO_FS,4,4
	.comm	IEC958_AES0_PRO_EMPHASIS_5015,4,4
	.comm	IEC958_AES0_PRO_EMPHASIS,4,4
	.comm	IEC958_AES0_PROFESSIONAL,4,4
	.comm	IEC958_AES0_NONAUDIO,4,4
	.comm	IEC958_AES0_CON_NOT_COPYRIGHT,4,4
	.comm	IEC958_AES0_CON_EMPHASIS_5015,4,4
	.comm	IEC958_AES0_CON_EMPHASIS,4,4
	.comm	AC97_YMF7X3_DIT_CTRL,4,4
	.comm	AC97_SPDIF,4,4
	.comm	AC97_ID_YMF743,8,8
	.comm	AC97_EXTENDED_STATUS,4,4
	.comm	AC97_EA_SPDIF,2,2
	.comm	AC97_CX_SPDIF,4,4
	.comm	AC97_CXR_SPDIF_PCM,4,4
	.comm	AC97_CXR_SPDIF_MASK,2,2
	.comm	AC97_CXR_SPDIF_AC3,4,4
	.comm	AC97_CXR_COPYRGT,2,2
	.comm	AC97_CXR_AUDIO_MISC,4,4
	.comm	AC97_CS_SPDIF,4,4
	.comm	AC97_CSR_SPDIF,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_ac97_codec.c_snd_ac97_spdif_default_put.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ac97_spdif_default_put, %function
snd_ac97_spdif_default_put:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	bl	snd_kcontrol_chip
	ldr	r8, .L33
	ldr	r3, .L33+4
	ldr	ip, [r4]
	ldr	r2, [r3]
	ldr	r4, [r8]
	ldr	r3, [ip]
	orr	r4, r4, r2
	and	r4, r4, r3
	lsl	r4, r4, #16
	tst	r3, r2
	mov	r7, r0
	lsr	r4, r4, #16
	beq	.L2
	ldr	r2, .L33+8
	ldr	r1, .L33+12
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r5, r2, r1
	and	r5, r5, r3
	orr	r5, r5, r4
	and	r3, r2, r5
	cmp	r3, #132
	beq	.L3
	cmp	r3, #133
	orreq	r4, r4, #12288
	beq	.L3
	cmp	r3, #131
	orreq	r4, r4, #8192
	orrne	r4, r4, #4096
.L3:
	ldr	r3, .L33+16
	ldr	r3, [r3]
	and	r3, r3, r5
	cmp	r1, r3
	orreq	r4, r4, #8
.L6:
	add	r9, r7, #12
	mov	r0, r9
	bl	mutex_lock
	ldr	r3, .L33+20
	ldr	r6, [r7]
	ldr	r2, [r3]
	ldr	r3, [r7, #4]
	subs	r6, r6, r5
	movne	r6, #1
	tst	r3, r2
	str	r5, [r7]
	beq	.L11
	tst	r4, #12288
	moveq	r1, #4096
	movne	r1, #0
	ldr	r3, .L33+24
	ldr	r2, .L33+28
	and	r3, r3, r4
	orr	r3, r3, r1
	mov	r0, r7
	ldr	r1, [r2]
	ldr	r2, .L33+32
	bl	snd_ac97_update_bits_nolock
	orr	r6, r6, r0
.L13:
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r6
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	lr, .L33+36
	ldr	r2, .L33+40
	ldr	r5, [lr]
	ldr	r1, .L33+44
	ldr	r2, [r2]
	ldr	lr, [r1]
	orr	r2, r2, r5
	ldr	r0, .L33+48
	ldr	r5, [ip, #12]
	ldr	r1, .L33+52
	ldr	r6, [ip, #4]
	ldr	r0, [r0]
	ldr	r1, [r1]
	and	r5, r5, lr
	and	r2, r2, r6
	lsl	r5, r5, #24
	orr	r5, r5, r2, lsl #8
	orr	ip, r0, r1
	ldr	r2, .L33+56
	and	r3, r3, ip
	orr	r5, r5, r3
	ldr	r3, [r2]
	orr	r5, r5, r4
	and	r3, r3, r5
	cmp	r0, r3
	orreq	r4, r4, #8
	lsr	r3, r5, #4
	tst	r1, r5
	lsr	r2, r5, #24
	orreq	r4, r4, #4
	and	r3, r3, #4080
	cmp	r2, #129
	orr	r4, r4, r3
	beq	.L6
	cmp	r2, #130
	orreq	r4, r4, #12288
	beq	.L6
	cmp	r2, #128
	orreq	r4, r4, #8192
	lsleq	r4, r4, #16
	lsreq	r4, r4, #16
	orrne	r4, r4, #4096
	b	.L6
.L11:
	ldr	r2, .L33+60
	ldr	r10, [r2]
	ands	r10, r3, r10
	beq	.L14
	ldr	r2, .L33+52
	ldr	r3, .L33+48
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r2, .L33+64
	orr	r3, r3, r0
	ldrh	r2, [r2]
	tst	r3, r5
	moveq	r3, r2
	movne	r3, #0
	ldr	r1, [r8]
	tst	r5, r1
	ldrne	r1, .L33+68
	ldreq	r1, .L33+72
	ldr	r0, [r1]
	ldr	r1, .L33+76
	orr	r3, r3, r0
	ldrh	ip, [r1]
	ldr	r1, .L33+80
	lsl	r3, r3, #16
	mov	r0, r7
	ldr	r1, [r1]
	lsr	r3, r3, #16
	orr	r2, r2, ip
	bl	snd_ac97_update_bits_nolock
	orr	r6, r6, r0
	b	.L13
.L14:
	ldr	r3, .L33+84
	ldr	r2, [r7, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L32
	ldr	r8, .L33+88
	mov	r0, r7
	ldr	r1, [r8]
	bl	snd_ac97_read_cache
	ldr	fp, .L33+92
	mov	r5, r0
	mov	r3, r10
	ldr	r1, [r8]
	ldrh	r2, [fp]
	mov	r0, r7
	bl	snd_ac97_update_bits_nolock
	ldr	r2, .L33+96
	mov	r3, r4
	ldr	r1, [r2]
	mov	r0, r7
	ldr	r2, .L33+32
	bl	snd_ac97_update_bits_nolock
	ldrh	r3, [fp]
	orr	r6, r6, r0
	tst	r3, r5
	beq	.L13
	mov	r0, r7
	mov	r2, r3
	ldr	r1, [r8]
	bl	snd_ac97_update_bits_nolock
	b	.L13
.L32:
	ldr	r2, .L33+100
	lsl	r3, r4, #4
	lsl	r4, r4, #2
	and	r3, r3, #65280
	and	r4, r4, #56
	ldr	r1, [r2]
	mov	r0, r7
	ldr	r2, .L33+104
	orr	r3, r3, r4
	bl	snd_ac97_update_bits_nolock
	orr	r6, r6, r0
	b	.L13
.L34:
	.align	2
.L33:
	.word	IEC958_AES0_NONAUDIO
	.word	IEC958_AES0_PROFESSIONAL
	.word	IEC958_AES0_PRO_FS
	.word	IEC958_AES0_PRO_EMPHASIS_5015
	.word	IEC958_AES0_PRO_EMPHASIS
	.word	AC97_CS_SPDIF
	.word	53247
	.word	AC97_CSR_SPDIF
	.word	16383
	.word	IEC958_AES1_CON_ORIGINAL
	.word	IEC958_AES1_CON_CATEGORY
	.word	IEC958_AES3_CON_FS
	.word	IEC958_AES0_CON_EMPHASIS_5015
	.word	IEC958_AES0_CON_NOT_COPYRIGHT
	.word	IEC958_AES0_CON_EMPHASIS
	.word	AC97_CX_SPDIF
	.word	AC97_CXR_COPYRGT
	.word	AC97_CXR_SPDIF_AC3
	.word	AC97_CXR_SPDIF_PCM
	.word	AC97_CXR_SPDIF_MASK
	.word	AC97_CXR_AUDIO_MISC
	.word	AC97_ID_YMF743
	.word	AC97_EXTENDED_STATUS
	.word	AC97_EA_SPDIF
	.word	AC97_SPDIF
	.word	AC97_YMF7X3_DIT_CTRL
	.word	65336
	.size	snd_ac97_spdif_default_put, .-snd_ac97_spdif_default_put
	.comm	IEC958_AES3_CON_FS,4,4
	.comm	IEC958_AES1_CON_ORIGINAL,4,4
	.comm	IEC958_AES1_CON_CATEGORY,4,4
	.comm	IEC958_AES0_PRO_FS,4,4
	.comm	IEC958_AES0_PRO_EMPHASIS_5015,4,4
	.comm	IEC958_AES0_PRO_EMPHASIS,4,4
	.comm	IEC958_AES0_PROFESSIONAL,4,4
	.comm	IEC958_AES0_NONAUDIO,4,4
	.comm	IEC958_AES0_CON_NOT_COPYRIGHT,4,4
	.comm	IEC958_AES0_CON_EMPHASIS_5015,4,4
	.comm	IEC958_AES0_CON_EMPHASIS,4,4
	.comm	AC97_YMF7X3_DIT_CTRL,4,4
	.comm	AC97_SPDIF,4,4
	.comm	AC97_ID_YMF743,4,4
	.comm	AC97_EXTENDED_STATUS,4,4
	.comm	AC97_EA_SPDIF,2,2
	.comm	AC97_CX_SPDIF,4,4
	.comm	AC97_CXR_SPDIF_PCM,4,4
	.comm	AC97_CXR_SPDIF_MASK,2,2
	.comm	AC97_CXR_SPDIF_AC3,4,4
	.comm	AC97_CXR_COPYRGT,2,2
	.comm	AC97_CXR_AUDIO_MISC,4,4
	.comm	AC97_CS_SPDIF,4,4
	.comm	AC97_CSR_SPDIF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
