	.file	"extr_atiixp.c_snd_atiixp_codec_read.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"codec read timeout (reg %x)\n"
	.text
	.p2align 4
	.type	snd_atiixp_codec_read, @function
snd_atiixp_codec_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	snd_atiixp_acquire_codec@PLT
	test	rax, rax
	js	.L9
	movzx	edx, WORD PTR ATI_REG_PHYS_OUT_ADDR_EN[rip]
	movzx	ecx, WORD PTR ATI_REG_PHYS_OUT_ADDR_SHIFT[rip]
	movzx	r13d, r12w
	mov	rdi, rbp
	or	dx, WORD PTR ATI_REG_PHYS_OUT_RW[rip]
	mov	eax, r13d
	mov	esi, DWORD PTR PHYS_OUT_ADDR[rip]
	or	edx, ebx
	sal	eax, cl
	movzx	edx, dx
	or	edx, eax
	call	atiixp_write@PLT
	mov	rdi, rbp
	call	snd_atiixp_acquire_codec@PLT
	test	rax, rax
	js	.L9
	mov	ebx, 1000
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, 1
	call	udelay@PLT
	sub	ebx, 1
	je	.L11
.L6:
	mov	esi, DWORD PTR PHYS_IN_ADDR[rip]
	mov	rdi, rbp
	call	atiixp_read@PLT
	test	DWORD PTR ATI_REG_PHYS_IN_READ_FLAG[rip], eax
	je	.L5
	mov	ecx, DWORD PTR ATI_REG_PHYS_IN_DATA_SHIFT[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	shr	eax, cl
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	cmp	r12w, 123
	ja	.L9
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, r13d
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR [rax]
	call	dev_warn@PLT
.L9:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	snd_atiixp_codec_read, .-snd_atiixp_codec_read
	.comm	PHYS_OUT_ADDR,4,4
	.comm	PHYS_IN_ADDR,4,4
	.comm	ATI_REG_PHYS_OUT_RW,2,2
	.comm	ATI_REG_PHYS_OUT_ADDR_SHIFT,2,2
	.comm	ATI_REG_PHYS_OUT_ADDR_EN,2,2
	.comm	ATI_REG_PHYS_IN_READ_FLAG,4,4
	.comm	ATI_REG_PHYS_IN_DATA_SHIFT,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_atiixp.c_snd_atiixp_codec_read.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"codec read timeout (reg %x)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_atiixp_codec_read, %function
snd_atiixp_codec_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r8, r2
	mov	r5, r0
	bl	snd_atiixp_acquire_codec
	cmp	r0, #0
	blt	.L9
	ldr	r2, .L12
	ldr	r3, .L12+4
	ldrh	r1, [r2]
	ldrh	r3, [r3]
	ldr	r0, .L12+8
	orr	r3, r3, r1
	ldrh	r2, [r0]
	ldr	r0, .L12+12
	orr	r3, r4, r3
	ldr	r1, [r0]
	orr	r2, r3, r8, lsl r2
	mov	r0, r5
	bl	atiixp_write
	mov	r0, r5
	bl	snd_atiixp_acquire_codec
	cmp	r0, #0
	blt	.L9
	mov	r4, #1000
	ldr	r7, .L12+16
	ldr	r6, .L12+20
	b	.L6
.L5:
	mov	r0, #1
	bl	udelay
	subs	r4, r4, #1
	beq	.L11
.L6:
	mov	r0, r5
	ldr	r1, [r7]
	bl	atiixp_read
	ldr	r3, [r6]
	tst	r0, r3
	beq	.L5
	ldr	r3, .L12+24
	ldr	r3, [r3]
	lsr	r0, r0, r3
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	cmp	r8, #123
	bhi	.L9
	ldr	r3, [r5]
	mov	r2, r8
	ldr	r0, [r3]
	ldr	r1, .L12+28
	bl	dev_warn
.L9:
	ldr	r0, .L12+32
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	ATI_REG_PHYS_OUT_RW
	.word	ATI_REG_PHYS_OUT_ADDR_EN
	.word	ATI_REG_PHYS_OUT_ADDR_SHIFT
	.word	PHYS_OUT_ADDR
	.word	PHYS_IN_ADDR
	.word	ATI_REG_PHYS_IN_READ_FLAG
	.word	ATI_REG_PHYS_IN_DATA_SHIFT
	.word	.LC0
	.word	65535
	.size	snd_atiixp_codec_read, .-snd_atiixp_codec_read
	.comm	PHYS_OUT_ADDR,4,4
	.comm	PHYS_IN_ADDR,4,4
	.comm	ATI_REG_PHYS_OUT_RW,2,2
	.comm	ATI_REG_PHYS_OUT_ADDR_SHIFT,2,2
	.comm	ATI_REG_PHYS_OUT_ADDR_EN,2,2
	.comm	ATI_REG_PHYS_IN_READ_FLAG,4,4
	.comm	ATI_REG_PHYS_IN_DATA_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
