	.file	"extr_via82xx.c_snd_via82xx_codec_valid.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_via82xx_codec_valid, @function
snd_via82xx_codec_valid:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	test	esi, esi
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, DWORD PTR VIA_REG_AC97_PRIMARY_VALID[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmovne	ebp, DWORD PTR VIA_REG_AC97_SECONDARY_VALID[rip]
	mov	ebx, 1000
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 1
	call	udelay@PLT
	sub	ebx, 1
	je	.L10
.L6:
	mov	rdi, r12
	call	snd_via82xx_codec_xread@PLT
	mov	edx, DWORD PTR VIA_REG_AC97_BUSY[rip]
	or	edx, ebp
	and	edx, eax
	cmp	ebp, edx
	jne	.L4
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movzx	eax, ax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR EIO[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	snd_via82xx_codec_valid, .-snd_via82xx_codec_valid
	.comm	VIA_REG_AC97_SECONDARY_VALID,4,4
	.comm	VIA_REG_AC97_PRIMARY_VALID,4,4
	.comm	VIA_REG_AC97_BUSY,4,4
	.comm	EIO,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_via82xx.c_snd_via82xx_codec_valid.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_via82xx_codec_valid, %function
snd_via82xx_codec_valid:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	ldreq	r3, .L11
	ldrne	r3, .L11+4
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r4, #1000
	ldr	r5, [r3]
	ldr	r7, .L11+8
	b	.L6
.L4:
	mov	r0, #1
	bl	udelay
	subs	r4, r4, #1
	beq	.L10
.L6:
	mov	r0, r6
	bl	snd_via82xx_codec_xread
	ldr	r3, [r7]
	orr	r3, r5, r3
	and	r3, r3, r0
	cmp	r5, r3
	bne	.L4
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r3, .L11+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	VIA_REG_AC97_PRIMARY_VALID
	.word	VIA_REG_AC97_SECONDARY_VALID
	.word	VIA_REG_AC97_BUSY
	.word	EIO
	.size	snd_via82xx_codec_valid, .-snd_via82xx_codec_valid
	.comm	VIA_REG_AC97_SECONDARY_VALID,4,4
	.comm	VIA_REG_AC97_PRIMARY_VALID,4,4
	.comm	VIA_REG_AC97_BUSY,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
