	.file	"extr_atiixp.c_snd_atiixp_pcm_new.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ATI IXP AC97"
.LC1:
	.string	"ATI IXP IEC958"
.LC2:
	.string	"ATI IXP IEC958 (AC97)"
.LC3:
	.string	"ATI IXP IEC958 (Direct)"
	.text
	.p2align 4
	.type	snd_atiixp_pcm_new, @function
snd_atiixp_pcm_new:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, snd_atiixp_playback_dma_ops[rip]
	mov	r12d, 3
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rdx, QWORD PTR ATI_DMA_PLAYBACK[rip]
	mov	rbp, QWORD PTR 64[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 56[rdi]
	cmp	QWORD PTR 32[rdi], 0
	mov	QWORD PTR [rax+rdx*8], rsi
	mov	rdx, QWORD PTR ATI_DMA_CAPTURE[rip]
	lea	rsi, snd_atiixp_capture_dma_ops[rip]
	mov	QWORD PTR [rax+rdx*8], rsi
	jne	.L2
	mov	rdx, QWORD PTR ATI_DMA_SPDIF[rip]
	lea	rcx, snd_atiixp_spdif_dma_ops[rip]
	mov	r12d, 2
	mov	QWORD PTR [rax+rdx*8], rcx
.L2:
	mov	edx, DWORD PTR atiixp_pcm_defs[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	snd_ac97_pcm_assign@PLT
	test	eax, eax
	js	.L1
	mov	rcx, QWORD PTR 48[rbx]
	xor	eax, eax
.L4:
	mov	rdx, rax
	sal	rdx, 4
	add	rdx, QWORD PTR 0[rbp]
	mov	QWORD PTR [rcx+rax*8], rdx
	add	rax, 1
	cmp	r12d, eax
	jg	.L4
	mov	rax, QWORD PTR ATI_PCM_OUT[rip]
	mov	edx, DWORD PTR AC97_SLOT_PCM_SLEFT[rip]
	mov	DWORD PTR [rbx], 2
	sal	rax, 4
	add	rax, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	bt	eax, edx
	jnc	.L5
	mov	ecx, DWORD PTR AC97_SLOT_LFE[rip]
	sar	eax, cl
	and	eax, 1
	cmp	eax, 1
	sbb	eax, eax
	and	eax, -2
	add	eax, 6
	mov	DWORD PTR [rbx], eax
.L5:
	lea	rbp, 8[rsp]
	mov	edi, DWORD PTR 40[rbx]
	mov	ecx, 1
	mov	rdx, QWORD PTR ATI_PCMDEV_ANALOG[rip]
	mov	r9, rbp
	mov	r8d, 1
	lea	rsi, .LC0[rip]
	call	snd_pcm_new@PLT
	test	eax, eax
	js	.L1
	mov	rsi, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rdi, QWORD PTR 8[rsp]
	lea	rdx, snd_atiixp_playback_ops[rip]
	call	snd_pcm_set_ops@PLT
	mov	rsi, QWORD PTR SNDRV_PCM_STREAM_CAPTURE[rip]
	mov	rdi, QWORD PTR 8[rsp]
	lea	rdx, snd_atiixp_capture_ops[rip]
	call	snd_pcm_set_ops@PLT
	mov	rax, QWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	mov	QWORD PTR 8[rax], rbx
	mov	edi, DWORD PTR [rax]
	call	strcpy@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR ATI_PCMDEV_ANALOG[rip]
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 16[rbx]
	mov	QWORD PTR [rax+rdx*8], rcx
	call	snd_dma_pci_data@PLT
	mov	esi, DWORD PTR SNDRV_DMA_TYPE_DEV[rip]
	mov	rdi, QWORD PTR 8[rsp]
	mov	r8d, 131072
	mov	edx, eax
	mov	ecx, 65536
	call	snd_pcm_lib_preallocate_pages_for_all@PLT
	mov	ecx, DWORD PTR [rbx]
	mov	edx, DWORD PTR snd_pcm_alt_chmaps[rip]
	xor	r8d, r8d
	mov	rsi, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rdi, QWORD PTR 8[rsp]
	lea	r9, 16[rsp]
	call	snd_pcm_add_chmap_ctls@PLT
	test	eax, eax
	js	.L1
	mov	rax, QWORD PTR 16[rsp]
	mov	edx, DWORD PTR SND_PCM_CHMAP_MASK_2468[rip]
	mov	rcx, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR [rdx]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR [rdx+rcx*8], rax
	mov	rax, QWORD PTR 48[rbx]
	mov	rdx, QWORD PTR ATI_PCM_SPDIF[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	test	rax, rax
	je	.L7
	cmp	QWORD PTR [rax], 0
	je	.L11
	mov	rdx, QWORD PTR SNDRV_PCM_RATE_48000[rip]
	mov	QWORD PTR [rax], rdx
.L7:
	mov	edi, DWORD PTR 40[rbx]
	mov	rdx, QWORD PTR ATI_PCMDEV_DIGITAL[rip]
	xor	r8d, r8d
	mov	r9, rbp
	mov	ecx, 1
	lea	rsi, .LC1[rip]
	call	snd_pcm_new@PLT
	test	eax, eax
	js	.L1
	mov	rsi, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rdi, QWORD PTR 8[rsp]
	lea	rdx, snd_atiixp_spdif_ops[rip]
	call	snd_pcm_set_ops@PLT
	mov	rax, QWORD PTR 8[rsp]
	cmp	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 8[rax], rbx
	je	.L9
	mov	edi, DWORD PTR [rax]
	lea	rsi, .LC2[rip]
	call	strcpy@PLT
.L10:
	mov	rcx, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR ATI_PCMDEV_DIGITAL[rip]
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 16[rbx]
	mov	QWORD PTR [rax+rdx*8], rcx
	call	snd_dma_pci_data@PLT
	mov	esi, DWORD PTR SNDRV_DMA_TYPE_DEV[rip]
	mov	rdi, QWORD PTR 8[rsp]
	mov	r8d, 131072
	mov	edx, eax
	mov	ecx, 65536
	call	snd_pcm_lib_preallocate_pages_for_all@PLT
	mov	eax, DWORD PTR NUM_ATI_CODECS[rip]
	test	eax, eax
	jle	.L11
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR [rax+rbp*8]
	test	rdi, rdi
	je	.L12
	mov	esi, DWORD PTR AC97_EXTENDED_STATUS[rip]
	mov	ecx, 48
	mov	edx, 48
	call	snd_ac97_update_bits@PLT
.L12:
	add	rbp, 1
	cmp	DWORD PTR NUM_ATI_CODECS[rip], ebp
	jg	.L13
.L11:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L30
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.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
	mov	edi, DWORD PTR [rax]
	lea	rsi, .LC3[rip]
	call	strcpy@PLT
	jmp	.L10
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	snd_atiixp_pcm_new, .-snd_atiixp_pcm_new
	.comm	snd_pcm_alt_chmaps,4,4
	.comm	snd_atiixp_spdif_ops,4,4
	.comm	snd_atiixp_spdif_dma_ops,4,4
	.comm	snd_atiixp_playback_ops,4,4
	.comm	snd_atiixp_playback_dma_ops,4,4
	.comm	snd_atiixp_capture_ops,4,4
	.comm	snd_atiixp_capture_dma_ops,4,4
	.comm	atiixp_pcm_defs,4,4
	.comm	SND_PCM_CHMAP_MASK_2468,4,4
	.comm	SNDRV_PCM_STREAM_PLAYBACK,8,8
	.comm	SNDRV_PCM_STREAM_CAPTURE,8,8
	.comm	SNDRV_PCM_RATE_48000,8,8
	.comm	SNDRV_DMA_TYPE_DEV,4,4
	.comm	NUM_ATI_CODECS,4,4
	.comm	ATI_PCM_SPDIF,8,8
	.comm	ATI_PCM_OUT,8,8
	.comm	ATI_PCMDEV_DIGITAL,8,8
	.comm	ATI_PCMDEV_ANALOG,8,8
	.comm	ATI_DMA_SPDIF,8,8
	.comm	ATI_DMA_PLAYBACK,8,8
	.comm	ATI_DMA_CAPTURE,8,8
	.comm	AC97_SLOT_PCM_SLEFT,4,4
	.comm	AC97_SLOT_LFE,4,4
	.comm	AC97_EXTENDED_STATUS,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_pcm_new.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ATI IXP AC97\000"
	.align	2
.LC1:
	.ascii	"ATI IXP IEC958\000"
	.align	2
.LC2:
	.ascii	"ATI IXP IEC958 (AC97)\000"
	.align	2
.LC3:
	.ascii	"ATI IXP IEC958 (Direct)\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_atiixp_pcm_new, %function
snd_atiixp_pcm_new:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r1, .L30
	ldr	r3, [r0, #28]
	ldr	r0, [r1]
	ldr	r1, [r4, #16]
	ldr	r2, .L30+4
	cmp	r1, #0
	moveq	r6, #2
	movne	r6, #3
	ldr	r2, [r2]
	ldr	r1, .L30+8
	ldr	ip, .L30+12
	ldr	lr, .L30+16
	sub	sp, sp, #24
	ldr	r5, [r4, #32]
	ldr	lr, [lr]
	str	lr, [sp, #20]
	mov	lr,#0
	str	ip, [r3, r0, lsl #2]
	str	r1, [r3, r2, lsl #2]
	ldreq	r2, .L30+20
	ldreq	r1, .L30+24
	ldreq	r2, [r2]
	mov	r0, r5
	streq	r1, [r3, r2, lsl #2]
	ldr	r3, .L30+28
	mov	r1, r6
	ldr	r2, [r3]
	bl	snd_ac97_pcm_assign
	cmp	r0, #0
	blt	.L1
	mov	r0, #0
	ldr	r2, [r4, #24]
	add	r1, r2, r6, lsl #2
.L4:
	ldr	r3, [r5]
	add	r3, r3, r0
	str	r3, [r2], #4
	cmp	r1, r2
	add	r0, r0, #8
	bne	.L4
	mov	r1, #2
	ldr	r2, .L30+32
	ldr	r3, [r5]
	ldr	r2, [r2]
	ldr	r0, .L30+36
	add	r3, r3, r2, lsl #3
	ldr	r2, [r3, #4]
	ldr	r3, [r0]
	ldr	r2, [r2]
	str	r1, [r4]
	asr	r3, r2, r3
	tst	r3, #1
	beq	.L5
	ldr	r3, .L30+40
	ldr	r3, [r3]
	asr	r2, r2, r3
	tst	r2, #1
	movne	r3, #6
	moveq	r3, #4
	str	r3, [r4]
.L5:
	mov	r3, #1
	ldr	r5, .L30+44
	str	r3, [sp]
	add	r1, sp, #12
	ldr	r2, [r5]
	str	r1, [sp, #4]
	ldr	r0, [r4, #20]
	ldr	r1, .L30+48
	bl	snd_pcm_new
	cmp	r0, #0
	blt	.L1
	ldr	r6, .L30+52
	ldr	r2, .L30+56
	ldr	r1, [r6]
	ldr	r0, [sp, #12]
	bl	snd_pcm_set_ops
	ldr	r3, .L30+60
	ldr	r2, .L30+64
	ldr	r1, [r3]
	ldr	r0, [sp, #12]
	bl	snd_pcm_set_ops
	ldr	r3, [sp, #12]
	ldr	r1, .L30+48
	ldr	r0, [r3]
	str	r4, [r3, #4]
	bl	strcpy
	ldr	r2, [r5]
	ldr	r3, [r4, #12]
	ldr	r5, [sp, #12]
	ldr	r7, .L30+68
	str	r5, [r3, r2, lsl #2]
	ldr	r0, [r4, #8]
	ldr	r8, [r7]
	bl	snd_dma_pci_data
	mov	r3, #131072
	mov	r2, r0
	mov	r1, r8
	str	r3, [sp]
	mov	r0, r5
	mov	r3, #65536
	bl	snd_pcm_lib_preallocate_pages_for_all
	mov	r0, #0
	ldr	r2, .L30+72
	ldr	r1, [r6]
	add	r3, sp, #16
	str	r0, [sp]
	ldr	r2, [r2]
	str	r3, [sp, #4]
	ldr	r3, [r4]
	ldr	r0, [sp, #12]
	bl	snd_pcm_add_chmap_ctls
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L30+76
	ldr	r2, [r4, #4]
	ldr	r0, [r3]
	ldr	r3, [r4, #24]
	ldr	r1, [r2]
	ldr	r2, .L30+80
	ldr	r3, [r3, r0, lsl #2]
	ldr	ip, [r2]
	ldr	r1, [r1]
	ldr	r2, [sp, #16]
	ldr	r0, [r6]
	cmp	r3, #0
	str	ip, [r2]
	str	r2, [r1, r0, lsl #2]
	beq	.L7
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L11
	ldr	r2, .L30+84
	ldr	r2, [r2]
	str	r2, [r3]
.L7:
	mov	r3, #0
	add	r2, sp, #12
	ldr	r5, .L30+88
	str	r3, [sp]
	str	r2, [sp, #4]
	mov	r3, #1
	ldr	r2, [r5]
	ldr	r1, .L30+92
	ldr	r0, [r4, #20]
	bl	snd_pcm_new
	cmp	r0, #0
	blt	.L1
	ldr	r1, [r6]
	ldr	r2, .L30+96
	ldr	r0, [sp, #12]
	bl	snd_pcm_set_ops
	ldr	r2, [r4, #16]
	ldr	r3, [sp, #12]
	cmp	r2, #0
	ldrne	r1, .L30+100
	ldreq	r1, .L30+104
	ldr	r0, [r3]
	str	r4, [r3, #4]
	bl	strcpy
	ldr	r2, [r5]
	ldr	r3, [r4, #12]
	ldr	r5, [sp, #12]
	ldr	r0, [r4, #8]
	str	r5, [r3, r2, lsl #2]
	ldr	r7, [r7]
	bl	snd_dma_pci_data
	mov	r3, #131072
	ldr	r6, .L30+108
	mov	r2, r0
	str	r3, [sp]
	mov	r1, r7
	mov	r3, #65536
	mov	r0, r5
	bl	snd_pcm_lib_preallocate_pages_for_all
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L11
	mov	r5, #0
	ldr	r7, .L30+112
.L13:
	ldr	r3, [r4, #4]
	ldr	r0, [r3, r5, lsl #2]
	cmp	r0, #0
	beq	.L12
	mov	r3, #48
	ldr	r1, [r7]
	mov	r2, r3
	bl	snd_ac97_update_bits
.L12:
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L13
.L11:
	mov	r0, #0
.L1:
	ldr	r3, .L30+16
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	ATI_DMA_PLAYBACK
	.word	ATI_DMA_CAPTURE
	.word	snd_atiixp_capture_dma_ops
	.word	snd_atiixp_playback_dma_ops
	.word	.LC4
	.word	ATI_DMA_SPDIF
	.word	snd_atiixp_spdif_dma_ops
	.word	atiixp_pcm_defs
	.word	ATI_PCM_OUT
	.word	AC97_SLOT_PCM_SLEFT
	.word	AC97_SLOT_LFE
	.word	ATI_PCMDEV_ANALOG
	.word	.LC0
	.word	SNDRV_PCM_STREAM_PLAYBACK
	.word	snd_atiixp_playback_ops
	.word	SNDRV_PCM_STREAM_CAPTURE
	.word	snd_atiixp_capture_ops
	.word	SNDRV_DMA_TYPE_DEV
	.word	snd_pcm_alt_chmaps
	.word	ATI_PCM_SPDIF
	.word	SND_PCM_CHMAP_MASK_2468
	.word	SNDRV_PCM_RATE_48000
	.word	ATI_PCMDEV_DIGITAL
	.word	.LC1
	.word	snd_atiixp_spdif_ops
	.word	.LC2
	.word	.LC3
	.word	NUM_ATI_CODECS
	.word	AC97_EXTENDED_STATUS
	.size	snd_atiixp_pcm_new, .-snd_atiixp_pcm_new
	.comm	snd_pcm_alt_chmaps,4,4
	.comm	snd_atiixp_spdif_ops,4,4
	.comm	snd_atiixp_spdif_dma_ops,4,4
	.comm	snd_atiixp_playback_ops,4,4
	.comm	snd_atiixp_playback_dma_ops,4,4
	.comm	snd_atiixp_capture_ops,4,4
	.comm	snd_atiixp_capture_dma_ops,4,4
	.comm	atiixp_pcm_defs,4,4
	.comm	SND_PCM_CHMAP_MASK_2468,4,4
	.comm	SNDRV_PCM_STREAM_PLAYBACK,4,4
	.comm	SNDRV_PCM_STREAM_CAPTURE,4,4
	.comm	SNDRV_PCM_RATE_48000,4,4
	.comm	SNDRV_DMA_TYPE_DEV,4,4
	.comm	NUM_ATI_CODECS,4,4
	.comm	ATI_PCM_SPDIF,4,4
	.comm	ATI_PCM_OUT,4,4
	.comm	ATI_PCMDEV_DIGITAL,4,4
	.comm	ATI_PCMDEV_ANALOG,4,4
	.comm	ATI_DMA_SPDIF,4,4
	.comm	ATI_DMA_PLAYBACK,4,4
	.comm	ATI_DMA_CAPTURE,4,4
	.comm	AC97_SLOT_PCM_SLEFT,4,4
	.comm	AC97_SLOT_LFE,4,4
	.comm	AC97_EXTENDED_STATUS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
