	.file	"485761.c"
	.intel_syntax noprefix
	.text
	.globl	AC97_EXTCAPS
	.bss
	.align 4
	.type	AC97_EXTCAPS, @object
	.size	AC97_EXTCAPS, 4
AC97_EXTCAPS:
	.zero	4
	.globl	AC97_F_EAPD_INV
	.align 4
	.type	AC97_F_EAPD_INV, @object
	.size	AC97_F_EAPD_INV, 4
AC97_F_EAPD_INV:
	.zero	4
	.globl	AC97_F_RDCD_BUG
	.align 4
	.type	AC97_F_RDCD_BUG, @object
	.size	AC97_F_RDCD_BUG, 4
AC97_F_RDCD_BUG:
	.zero	4
	.globl	AC97_MIXER_SIZE
	.align 4
	.type	AC97_MIXER_SIZE, @object
	.size	AC97_MIXER_SIZE, 4
AC97_MIXER_SIZE:
	.zero	4
	.globl	AC97_MIX_BEEP
	.align 4
	.type	AC97_MIX_BEEP, @object
	.size	AC97_MIX_BEEP, 4
AC97_MIX_BEEP:
	.zero	4
	.globl	AC97_MIX_TONE
	.align 4
	.type	AC97_MIX_TONE, @object
	.size	AC97_MIX_TONE, 4
AC97_MIX_TONE:
	.zero	4
	.globl	AC97_REGEXT_ID
	.align 4
	.type	AC97_REGEXT_ID, @object
	.size	AC97_REGEXT_ID, 4
AC97_REGEXT_ID:
	.zero	4
	.globl	AC97_REGEXT_STAT
	.align 4
	.type	AC97_REGEXT_STAT, @object
	.size	AC97_REGEXT_STAT, 4
AC97_REGEXT_STAT:
	.zero	4
	.globl	AC97_REG_ID1
	.align 4
	.type	AC97_REG_ID1, @object
	.size	AC97_REG_ID1, 4
AC97_REG_ID1:
	.zero	4
	.globl	AC97_REG_ID2
	.align 4
	.type	AC97_REG_ID2, @object
	.size	AC97_REG_ID2, 4
AC97_REG_ID2:
	.zero	4
	.globl	AC97_REG_POWER
	.align 4
	.type	AC97_REG_POWER, @object
	.size	AC97_REG_POWER, 4
AC97_REG_POWER:
	.zero	4
	.globl	AC97_REG_RESET
	.align 4
	.type	AC97_REG_RESET, @object
	.size	AC97_REG_RESET, 4
AC97_REG_RESET:
	.zero	4
	.globl	ENODEV
	.align 4
	.type	ENODEV, @object
	.size	ENODEV, 4
ENODEV:
	.zero	4
	.globl	SOUND_MIXER_VOLUME
	.align 8
	.type	SOUND_MIXER_VOLUME, @object
	.size	SOUND_MIXER_VOLUME, 8
SOUND_MIXER_VOLUME:
	.zero	8
	.globl	ac97codecid
	.align 8
	.type	ac97codecid, @object
	.size	ac97codecid, 8
ac97codecid:
	.zero	8
	.globl	ac97enhancement
	.align 8
	.type	ac97enhancement, @object
	.size	ac97enhancement, 8
ac97enhancement:
	.zero	8
	.globl	ac97extfeature
	.align 8
	.type	ac97extfeature, @object
	.size	ac97extfeature, 8
ac97extfeature:
	.zero	8
	.globl	ac97feature
	.align 8
	.type	ac97feature, @object
	.size	ac97feature, 8
ac97feature:
	.zero	8
	.globl	ac97mixtable_default
	.align 8
	.type	ac97mixtable_default, @object
	.size	ac97mixtable_default, 8
ac97mixtable_default:
	.zero	8
	.globl	ac97vendorid
	.align 8
	.type	ac97vendorid, @object
	.size	ac97vendorid, 8
ac97vendorid:
	.zero	8
	.globl	bootverbose
	.align 8
	.type	bootverbose, @object
	.size	bootverbose, 8
bootverbose:
	.zero	8
	.section	.rodata
.LC0:
	.string	"ac97 codec init failed\n"
	.align 8
.LC1:
	.string	"ac97 codec invalid or not present (id == %x)\n"
.LC2:
	.string	"<%s>\n"
	.align 8
.LC3:
	.string	"Buggy AC97 Codec: aggressive ac97_rdcd() workaround enabled\n"
.LC4:
	.string	"Codec features "
.LC5:
	.string	", "
.LC6:
	.string	""
.LC7:
	.string	"%s%s"
.LC8:
	.string	"%s%d bit master volume"
.LC9:
	.string	"%s%s\n"
.LC10:
	.string	"Secondary"
.LC11:
	.string	"Primary"
.LC12:
	.string	"%s codec"
.LC13:
	.string	" extended features "
	.align 8
.LC14:
	.string	"ac97 codec reports dac not ready\n"
	.align 8
.LC15:
	.string	"ac97 codec dac ready count: %d\n"
	.text
	.type	ac97_initmixer, @function
ac97_initmixer:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 184
	.cfi_offset 3, -24
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	edi, eax
	call	snd_mtxlock@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 64[rax]
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 68[rax]
	mov	esi, edx
	mov	edi, eax
	call	AC97_INIT@PLT
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	lea	rsi, .LC0[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	edi, eax
	call	snd_mtxunlock@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	jmp	.L67
.L2:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR AC97_F_EAPD_INV[rip]
	and	eax, edx
	test	eax, eax
	je	.L4
	mov	edx, 32768
	jmp	.L5
.L4:
	mov	edx, 0
.L5:
	mov	ecx, DWORD PTR AC97_REG_POWER[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	ac97_wrcd@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	ac97_reset@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR AC97_F_EAPD_INV[rip]
	and	eax, edx
	test	eax, eax
	je	.L6
	mov	edx, 32768
	jmp	.L7
.L6:
	mov	edx, 0
.L7:
	mov	ecx, DWORD PTR AC97_REG_POWER[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	ac97_wrcd@PLT
	mov	edx, DWORD PTR AC97_REG_RESET[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -176[rbp], eax
	mov	edx, DWORD PTR AC97_REG_RESET[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -172[rbp], eax
	mov	edx, DWORD PTR AC97_REG_RESET[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -168[rbp], eax
	mov	eax, DWORD PTR -176[rbp]
	cmp	eax, DWORD PTR -172[rbp]
	jne	.L8
	mov	eax, DWORD PTR -172[rbp]
	cmp	eax, DWORD PTR -168[rbp]
	je	.L9
.L8:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR AC97_F_RDCD_BUG[rip]
	or	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	edx, DWORD PTR AC97_REG_RESET[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -176[rbp], eax
.L9:
	mov	eax, DWORD PTR -176[rbp]
	and	eax, 1023
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	eax, DWORD PTR -176[rbp]
	shr	eax, 10
	and	eax, 31
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	edx, DWORD PTR AC97_REG_ID1[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	sal	eax, 16
	mov	ebx, eax
	mov	edx, DWORD PTR AC97_REG_ID2[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	or	eax, ebx
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	je	.L10
	cmp	DWORD PTR -156[rbp], -1
	jne	.L11
.L10:
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	mov	edx, DWORD PTR -156[rbp]
	lea	rsi, .LC1[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	edi, eax
	call	snd_mtxunlock@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	jmp	.L67
.L11:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR -156[rbp]
	mov	DWORD PTR 20[rax], edx
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	mov	edi, eax
	call	pci_get_subdevice@PLT
	sal	eax, 16
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	mov	edi, eax
	call	pci_get_subvendor@PLT
	movzx	edx, ax
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 24[rax]
	or	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -184[rbp]
	mov	QWORD PTR 56[rax], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	DWORD PTR -152[rbp], 0
	mov	eax, DWORD PTR -152[rbp]
	mov	DWORD PTR -148[rbp], eax
	mov	DWORD PTR -176[rbp], 0
	jmp	.L12
.L15:
	mov	rdx, QWORD PTR ac97codecid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	not	eax
	mov	DWORD PTR -144[rbp], eax
	mov	rdx, QWORD PTR ac97codecid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	xor	eax, DWORD PTR -156[rbp]
	and	eax, DWORD PTR -144[rbp]
	test	eax, eax
	jne	.L13
	mov	rdx, QWORD PTR ac97codecid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -184[rbp]
	mov	QWORD PTR 56[rax], rdx
	mov	rdx, QWORD PTR ac97codecid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -136[rbp], rax
	mov	rdx, QWORD PTR ac97codecid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -128[rbp], rax
	mov	eax, DWORD PTR -156[rbp]
	and	eax, DWORD PTR -144[rbp]
	and	eax, 255
	mov	DWORD PTR -148[rbp], eax
	mov	eax, DWORD PTR -144[rbp]
	not	eax
	and	eax, DWORD PTR -156[rbp]
	and	eax, 255
	mov	DWORD PTR -152[rbp], eax
	jmp	.L14
.L13:
	add	DWORD PTR -176[rbp], 1
.L12:
	mov	rdx, QWORD PTR ac97codecid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L15
.L14:
	mov	QWORD PTR -120[rbp], 0
	mov	DWORD PTR -176[rbp], 0
	jmp	.L16
.L19:
	mov	rdx, QWORD PTR ac97vendorid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, eax
	mov	eax, DWORD PTR -156[rbp]
	mov	al, 0
	cmp	edx, eax
	jne	.L17
	mov	rdx, QWORD PTR ac97vendorid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -120[rbp], rax
	jmp	.L18
.L17:
	add	DWORD PTR -176[rbp], 1
.L16:
	mov	rdx, QWORD PTR ac97vendorid[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L19
.L18:
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 28[rax], 0
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 32[rax], 0
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 36[rax], 0
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR 56[rax]
	test	rax, rax
	jne	.L20
	mov	edx, DWORD PTR AC97_REGEXT_ID[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -176[rbp], eax
	cmp	DWORD PTR -176[rbp], 65535
	je	.L20
	mov	eax, DWORD PTR -176[rbp]
	and	eax, 16383
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 28[rax], edx
	mov	eax, DWORD PTR -176[rbp]
	shr	eax, 14
	and	eax, 3
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	edx, DWORD PTR AC97_REGEXT_STAT[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	edx, DWORD PTR AC97_EXTCAPS[rip]
	and	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 36[rax], edx
.L20:
	mov	DWORD PTR -176[rbp], 0
	jmp	.L21
.L22:
	mov	rcx, QWORD PTR ac97mixtable_default[rip]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rsi, [rcx+rax]
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rcx, rax
	mov	rax, QWORD PTR [rsi]
	mov	rdx, QWORD PTR 8[rsi]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	rax, QWORD PTR 16[rsi]
	mov	QWORD PTR 16[rcx], rax
	add	DWORD PTR -176[rbp], 1
.L21:
	mov	eax, DWORD PTR AC97_MIXER_SIZE[rip]
	cmp	DWORD PTR -176[rbp], eax
	jb	.L22
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	ac97_fix_auxout@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	ac97_fix_tone@PLT
	cmp	QWORD PTR -136[rbp], 0
	je	.L23
	mov	rax, QWORD PTR -184[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	rdx
.L23:
	mov	DWORD PTR -176[rbp], 0
	jmp	.L24
.L41:
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR 56[rax]
	test	rax, rax
	je	.L25
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	jmp	.L26
.L25:
	mov	eax, 1
.L26:
	mov	DWORD PTR -168[rbp], eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -160[rbp], eax
	cmp	DWORD PTR -160[rbp], 0
	jns	.L27
	neg	DWORD PTR -160[rbp]
.L27:
	cmp	DWORD PTR -168[rbp], 0
	je	.L28
	cmp	DWORD PTR -160[rbp], 0
	je	.L28
	mov	edx, DWORD PTR -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -140[rbp], eax
	mov	eax, DWORD PTR -140[rbp]
	mov	DWORD PTR -172[rbp], eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L29
	mov	eax, DWORD PTR -172[rbp]
	or	ah, -128
	mov	edx, eax
	mov	ecx, DWORD PTR -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	ac97_wrcd@PLT
	mov	edx, DWORD PTR -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	mov	DWORD PTR -172[rbp], eax
	jmp	.L30
.L29:
	or	DWORD PTR -172[rbp], 32768
.L30:
	mov	eax, DWORD PTR -172[rbp]
	and	eax, 32768
	test	eax, eax
	je	.L31
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 5
	jne	.L32
	add	DWORD PTR -164[rbp], 1
.L32:
	mov	eax, DWORD PTR -164[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	lea	esi, -1[rax]
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	mov	DWORD PTR -172[rbp], eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L33
	mov	eax, 32768
	jmp	.L34
.L33:
	mov	eax, 0
.L34:
	or	eax, DWORD PTR -172[rbp]
	mov	edx, eax
	mov	ecx, DWORD PTR -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	ac97_wrcd@PLT
	mov	edx, DWORD PTR -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	and	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR -168[rbp], eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	mov	ecx, eax
	shr	DWORD PTR -168[rbp], cl
	mov	eax, DWORD PTR AC97_MIX_TONE[rip]
	cmp	DWORD PTR -160[rbp], eax
	jne	.L35
	mov	eax, DWORD PTR -168[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L35
	shr	DWORD PTR -168[rbp]
.L35:
	mov	DWORD PTR -172[rbp], 0
	jmp	.L36
.L37:
	add	DWORD PTR -172[rbp], 1
.L36:
	mov	eax, DWORD PTR -172[rbp]
	mov	edx, DWORD PTR -168[rbp]
	mov	ecx, eax
	shr	edx, cl
	mov	eax, edx
	test	eax, eax
	jne	.L37
	cmp	DWORD PTR -172[rbp], 0
	je	.L38
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR 8[rdx], eax
	jmp	.L39
.L38:
	mov	eax, DWORD PTR AC97_MIX_BEEP[rip]
	cmp	DWORD PTR -160[rbp], eax
	jne	.L40
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR [rax], 1
	jmp	.L39
.L40:
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR [rax], 0
	jmp	.L39
.L31:
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	edx, DWORD PTR -176[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR [rax], 0
.L39:
	mov	edx, DWORD PTR -140[rbp]
	mov	ecx, DWORD PTR -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	ac97_wrcd@PLT
.L28:
	add	DWORD PTR -176[rbp], 1
.L24:
	mov	eax, DWORD PTR AC97_MIXER_SIZE[rip]
	cmp	DWORD PTR -176[rbp], eax
	jb	.L41
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 20[rax]
	lea	rcx, -112[rbp]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rsi, QWORD PTR -120[rbp]
	mov	edi, eax
	call	ac97_hw_desc@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	lea	rsi, .LC2[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
	mov	rax, QWORD PTR bootverbose[rip]
	test	rax, rax
	je	.L42
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR AC97_F_RDCD_BUG[rip]
	and	eax, edx
	test	eax, eax
	je	.L43
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	lea	rsi, .LC3[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
.L43:
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	lea	rsi, .LC4[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
	mov	DWORD PTR -172[rbp], 0
	mov	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR -176[rbp], eax
	jmp	.L44
.L48:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	eax, DWORD PTR -176[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	and	eax, edx
	test	eax, eax
	je	.L45
	mov	rdx, QWORD PTR ac97feature[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -172[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -172[rbp], ecx
	test	eax, eax
	je	.L46
	lea	rax, .LC5[rip]
	jmp	.L47
.L46:
	lea	rax, .LC6[rip]
.L47:
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L45:
	add	DWORD PTR -176[rbp], 1
.L44:
	cmp	DWORD PTR -176[rbp], 9
	jbe	.L48
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR 48[rax]
	mov	rdx, QWORD PTR SOUND_MIXER_VOLUME[rip]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -172[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -172[rbp], ecx
	test	eax, eax
	je	.L49
	lea	rax, .LC5[rip]
	jmp	.L50
.L49:
	lea	rax, .LC6[rip]
.L50:
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR ac97enhancement[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	eax, eax
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	cmp	DWORD PTR -172[rbp], 0
	je	.L51
	lea	rax, .LC5[rip]
	jmp	.L52
.L51:
	lea	rax, .LC6[rip]
.L52:
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 28[rax]
	test	eax, eax
	jne	.L53
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 32[rax]
	test	eax, eax
	je	.L42
.L53:
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 32[rax]
	test	eax, eax
	je	.L54
	lea	rax, .LC10[rip]
	jmp	.L55
.L54:
	lea	rax, .LC11[rip]
.L55:
	mov	rdx, QWORD PTR -184[rbp]
	mov	ecx, DWORD PTR 44[rdx]
	mov	rdx, rax
	lea	rsi, .LC12[rip]
	mov	edi, ecx
	mov	eax, 0
	call	device_printf@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 28[rax]
	test	eax, eax
	je	.L56
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L56:
	mov	DWORD PTR -172[rbp], 0
	mov	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR -176[rbp], eax
	jmp	.L57
.L61:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 28[rax]
	mov	eax, DWORD PTR -176[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	and	eax, edx
	test	eax, eax
	je	.L58
	mov	rdx, QWORD PTR ac97extfeature[rip]
	mov	eax, DWORD PTR -176[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -172[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -172[rbp], ecx
	test	eax, eax
	je	.L59
	lea	rax, .LC5[rip]
	jmp	.L60
.L59:
	lea	rax, .LC6[rip]
.L60:
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L58:
	add	DWORD PTR -176[rbp], 1
.L57:
	cmp	DWORD PTR -176[rbp], 13
	jbe	.L61
	mov	edi, 10
	call	putchar@PLT
.L42:
	mov	DWORD PTR -176[rbp], 0
	jmp	.L62
.L65:
	add	DWORD PTR -176[rbp], 1
	cmp	DWORD PTR -176[rbp], 100
	jne	.L63
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	lea	rsi, .LC14[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
	jmp	.L64
.L63:
	mov	edi, 1000
	call	DELAY@PLT
.L62:
	mov	edx, DWORD PTR AC97_REG_POWER[rip]
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ac97_rdcd@PLT
	and	eax, 2
	test	eax, eax
	je	.L65
.L64:
	mov	rax, QWORD PTR bootverbose[rip]
	test	rax, rax
	je	.L66
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 44[rax]
	mov	edx, DWORD PTR -176[rbp]
	lea	rsi, .LC15[rip]
	mov	edi, eax
	mov	eax, 0
	call	device_printf@PLT
.L66:
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	edi, eax
	call	snd_mtxunlock@PLT
	mov	eax, 0
.L67:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ac97_initmixer, .-ac97_initmixer
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"485761.c"
	.text
	.comm	AC97_EXTCAPS,4,4
	.comm	AC97_F_EAPD_INV,4,4
	.comm	AC97_F_RDCD_BUG,4,4
	.comm	AC97_MIXER_SIZE,4,4
	.comm	AC97_MIX_BEEP,4,4
	.comm	AC97_MIX_TONE,4,4
	.comm	AC97_REGEXT_ID,4,4
	.comm	AC97_REGEXT_STAT,4,4
	.comm	AC97_REG_ID1,4,4
	.comm	AC97_REG_ID2,4,4
	.comm	AC97_REG_POWER,4,4
	.comm	AC97_REG_RESET,4,4
	.comm	ENODEV,4,4
	.comm	SOUND_MIXER_VOLUME,4,4
	.comm	ac97codecid,4,4
	.comm	ac97enhancement,4,4
	.comm	ac97extfeature,4,4
	.comm	ac97feature,4,4
	.comm	ac97mixtable_default,4,4
	.comm	ac97vendorid,4,4
	.comm	bootverbose,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ac97 codec init failed\012\000"
	.align	2
.LC1:
	.ascii	"ac97 codec invalid or not present (id == %x)\012\000"
	.align	2
.LC2:
	.ascii	"<%s>\012\000"
	.align	2
.LC3:
	.ascii	"Buggy AC97 Codec: aggressive ac97_rdcd() workaround"
	.ascii	" enabled\012\000"
	.align	2
.LC4:
	.ascii	"Codec features \000"
	.align	2
.LC5:
	.ascii	", \000"
	.align	2
.LC6:
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"%s%s\000"
	.align	2
.LC8:
	.ascii	"%s%d bit master volume\000"
	.align	2
.LC9:
	.ascii	"%s%s\012\000"
	.align	2
.LC10:
	.ascii	"Secondary\000"
	.align	2
.LC11:
	.ascii	"Primary\000"
	.align	2
.LC12:
	.ascii	"%s codec\000"
	.align	2
.LC13:
	.ascii	" extended features \000"
	.align	2
.LC14:
	.ascii	"ac97 codec reports dac not ready\012\000"
	.align	2
.LC15:
	.ascii	"ac97 codec dac ready count: %d\012\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ac97_initmixer, %function
ac97_initmixer:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #148
	str	r0, [fp, #-152]
	ldr	r3, .L69
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #36]
	mov	r0, r3
	bl	snd_mtxlock
	ldr	r3, [fp, #-152]
	ldr	r2, [r3, #56]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #52]
	mov	r1, r3
	mov	r0, r2
	bl	AC97_INIT
	mov	r2, r0
	ldr	r3, [fp, #-152]
	str	r2, [r3]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	ldr	r1, .L69+4
	mov	r0, r3
	bl	device_printf
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #36]
	mov	r0, r3
	bl	snd_mtxunlock
	ldr	r3, .L69+8
	ldr	r3, [r3]
	b	.L67
.L2:
	ldr	r3, .L69+12
	ldr	r1, [r3]
	ldr	r3, [fp, #-152]
	ldr	r2, [r3, #4]
	ldr	r3, .L69+16
	ldr	r3, [r3]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L4
	mov	r3, #32768
	b	.L5
.L4:
	mov	r3, #0
.L5:
	mov	r2, r3
	ldr	r0, [fp, #-152]
	bl	ac97_wrcd
	ldr	r0, [fp, #-152]
	bl	ac97_reset
	ldr	r3, .L69+12
	ldr	r1, [r3]
	ldr	r3, [fp, #-152]
	ldr	r2, [r3, #4]
	ldr	r3, .L69+16
	ldr	r3, [r3]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L6
	mov	r3, #32768
	b	.L7
.L6:
	mov	r3, #0
.L7:
	mov	r2, r3
	ldr	r0, [fp, #-152]
	bl	ac97_wrcd
	ldr	r3, .L69+20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-136]
	ldr	r3, .L69+20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-132]
	ldr	r3, .L69+20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-128]
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	bne	.L8
	ldr	r2, [fp, #-132]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	beq	.L9
.L8:
	ldr	r3, [fp, #-152]
	ldr	r2, [r3, #4]
	ldr	r3, .L69+24
	ldr	r3, [r3]
	orr	r2, r2, r3
	ldr	r3, [fp, #-152]
	str	r2, [r3, #4]
	ldr	r3, .L69+20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-136]
.L9:
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	ldr	r2, [fp, #-152]
	str	r3, [r2, #8]
	ldr	r3, [fp, #-136]
	lsr	r3, r3, #10
	and	r2, r3, #31
	ldr	r3, [fp, #-152]
	str	r2, [r3, #12]
	ldr	r3, .L69+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	lsl	r4, r3, #16
	ldr	r3, .L69+32
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	orr	r3, r4, r3
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-116]
	cmn	r3, #1
	bne	.L11
.L10:
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	ldr	r2, [fp, #-116]
	ldr	r1, .L69+36
	mov	r0, r3
	bl	device_printf
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #36]
	mov	r0, r3
	bl	snd_mtxunlock
	ldr	r3, .L69+8
	ldr	r3, [r3]
	b	.L67
.L11:
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-116]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	mov	r0, r3
	bl	pci_get_subdevice
	mov	r3, r0
	lsl	r2, r3, #16
	ldr	r3, [fp, #-152]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	mov	r0, r3
	bl	pci_get_subvendor
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, [fp, #-152]
	ldr	r2, [r2, #20]
	orr	r2, r3, r2
	ldr	r3, [fp, #-152]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-152]
	mov	r2, #0
	str	r2, [r3, #48]
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-112]
	str	r3, [fp, #-108]
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L12
.L15:
	ldr	r3, .L69+40
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	mvn	r3, r3
	str	r3, [fp, #-104]
	ldr	r3, .L69+40
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-116]
	eor	r2, r2, r3
	ldr	r3, [fp, #-104]
	and	r3, r3, r2
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L69+40
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-152]
	str	r2, [r3, #48]
	ldr	r3, .L69+40
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	str	r3, [fp, #-148]
	ldr	r3, .L69+40
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #8]
	str	r3, [fp, #-144]
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-104]
	and	r3, r3, r2
	and	r3, r3, #255
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-104]
	mvn	r2, r3
	ldr	r3, [fp, #-116]
	and	r3, r3, r2
	and	r3, r3, #255
	str	r3, [fp, #-112]
	b	.L14
.L13:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L12:
	ldr	r3, .L69+40
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L15
.L14:
	mov	r3, #0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L16
.L19:
	ldr	r3, .L69+44
	ldr	r2, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-116]
	bic	r3, r3, #255
	cmp	r2, r3
	bne	.L17
	ldr	r3, .L69+44
	ldr	r2, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-140]
	b	.L18
.L17:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L16:
	ldr	r3, .L69+44
	ldr	r2, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
.L18:
	ldr	r3, [fp, #-152]
	mov	r2, #0
	str	r2, [r3, #24]
	ldr	r3, [fp, #-152]
	mov	r2, #0
	str	r2, [r3, #28]
	ldr	r3, [fp, #-152]
	mov	r2, #0
	str	r2, [r3, #32]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #48]
	cmp	r3, #0
	bne	.L20
	ldr	r3, .L69+48
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-136]
	ldr	r2, .L69+52
	cmp	r3, r2
	beq	.L20
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #18
	lsr	r3, r3, #18
	ldr	r2, [fp, #-152]
	str	r3, [r2, #24]
	ldr	r3, [fp, #-136]
	lsr	r3, r3, #14
	and	r2, r3, #3
	ldr	r3, [fp, #-152]
	str	r2, [r3, #28]
	ldr	r3, .L69+56
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r2, r0
	ldr	r3, .L69+60
	ldr	r3, [r3]
	and	r2, r2, r3
	ldr	r3, [fp, #-152]
	str	r2, [r3, #32]
.L20:
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L21
.L22:
	ldr	r3, .L69+64
	ldr	r1, [r3]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r0, r1, r3
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	ip, r3
	mov	lr, r0
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L21:
	ldr	r3, .L69+68
	ldr	r3, [r3]
	ldr	r2, [fp, #-136]
	cmp	r2, r3
	bcc	.L22
	ldr	r0, [fp, #-152]
	bl	ac97_fix_auxout
	ldr	r0, [fp, #-152]
	bl	ac97_fix_tone
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-148]
	ldr	r0, [fp, #-152]
	blx	r3
.L23:
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L24
.L41:
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #48]
	cmp	r3, #0
	beq	.L25
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	b	.L26
.L25:
	mov	r3, #1
.L26:
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bge	.L27
	ldr	r3, [fp, #-120]
	rsb	r3, r3, #0
	str	r3, [fp, #-120]
.L27:
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L28
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	beq	.L28
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-100]
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L29
	ldr	r3, [fp, #-132]
	orr	r3, r3, #32768
	mov	r2, r3
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-152]
	bl	ac97_wrcd
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	str	r3, [fp, #-132]
	b	.L30
.L29:
	ldr	r3, [fp, #-132]
	orr	r3, r3, #32768
	str	r3, [fp, #-132]
.L30:
	ldr	r3, [fp, #-132]
	and	r3, r3, #32768
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #8]
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #5
	bne	.L32
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L32:
	mov	r2, #1
	ldr	r3, [fp, #-124]
	lsl	r3, r2, r3
	sub	r1, r3, #1
	ldr	r3, [fp, #-152]
	ldr	r0, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3, #12]
	lsl	r3, r1, r3
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L33
	mov	r2, #32768
	b	.L34
.L33:
	mov	r2, #0
.L34:
	ldr	r3, [fp, #-132]
	orr	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-152]
	bl	ac97_wrcd
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-132]
	and	r3, r3, r2
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-128]
	lsr	r3, r2, r3
	str	r3, [fp, #-128]
	ldr	r3, .L69+72
	ldr	r3, [r3]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	bne	.L35
	ldr	r3, [fp, #-128]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-128]
	lsr	r3, r3, #1
	str	r3, [fp, #-128]
.L35:
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L36
.L37:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L36:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	lsr	r3, r2, r3
	cmp	r3, #0
	bne	.L37
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-132]
	str	r2, [r3, #8]
	b	.L39
.L38:
	ldr	r3, .L69+76
	ldr	r3, [r3]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	bne	.L40
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #1
	str	r2, [r3]
	b	.L39
.L40:
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3]
	b	.L39
.L31:
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3]
.L39:
	ldr	r2, [fp, #-100]
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-152]
	bl	ac97_wrcd
.L28:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L24:
	ldr	r3, .L69+68
	ldr	r3, [r3]
	ldr	r2, [fp, #-136]
	cmp	r2, r3
	bcc	.L41
	ldr	r3, [fp, #-152]
	ldr	r4, [r3, #40]
	ldr	r3, [fp, #-152]
	ldr	r0, [r3, #16]
	sub	r3, fp, #96
	ldr	r2, [fp, #-144]
	ldr	r1, [fp, #-140]
	bl	ac97_hw_desc
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L69+80
	mov	r0, r4
	bl	device_printf
	ldr	r3, .L69+84
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L42
	ldr	r3, [fp, #-152]
	ldr	r2, [r3, #4]
	ldr	r3, .L69+24
	ldr	r3, [r3]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L43
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	ldr	r1, .L69+88
	mov	r0, r3
	bl	device_printf
.L43:
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	ldr	r1, .L69+92
	mov	r0, r3
	bl	device_printf
	mov	r3, #0
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-132]
	str	r3, [fp, #-136]
	b	.L44
.L48:
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #8]
	mov	r1, #1
	ldr	r2, [fp, #-136]
	lsl	r2, r1, r2
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L45
	ldr	r3, [fp, #-132]
	add	r2, r3, #1
	str	r2, [fp, #-132]
	cmp	r3, #0
	beq	.L46
	ldr	r1, .L69+96
	b	.L47
.L46:
	ldr	r1, .L69+100
.L47:
	ldr	r3, .L69+104
	ldr	r2, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L69+108
	bl	printf
.L45:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L44:
	ldr	r3, [fp, #-136]
	cmp	r3, #9
	bls	.L48
	ldr	r3, [fp, #-132]
	add	r2, r3, #1
	str	r2, [fp, #-132]
	cmp	r3, #0
	beq	.L49
	ldr	r0, .L69+96
	b	.L50
.L49:
	ldr	r0, .L69+100
.L50:
	ldr	r3, [fp, #-152]
	ldr	r1, [r3, #44]
	ldr	r3, .L69+112
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #8]
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L69+116
	bl	printf
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	beq	.L51
	ldr	r1, .L69+96
	b	.L52
.L51:
	ldr	r1, .L69+100
.L52:
	ldr	r3, .L69+120
	ldr	r2, [r3]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L69+124
	bl	printf
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	bne	.L53
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	beq	.L42
.L53:
	ldr	r3, [fp, #-152]
	ldr	r0, [r3, #40]
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	beq	.L54
	ldr	r3, .L69+128
	b	.L55
.L54:
	ldr	r3, .L69+132
.L55:
	mov	r2, r3
	ldr	r1, .L69+136
	bl	device_printf
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L56
	ldr	r0, .L69+140
	bl	printf
.L56:
	mov	r3, #0
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-132]
	str	r3, [fp, #-136]
	b	.L57
.L61:
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #24]
	mov	r1, #1
	ldr	r2, [fp, #-136]
	lsl	r2, r1, r2
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L58
	ldr	r3, [fp, #-132]
	add	r2, r3, #1
	str	r2, [fp, #-132]
	cmp	r3, #0
	beq	.L59
	ldr	r1, .L69+96
	b	.L60
.L59:
	ldr	r1, .L69+100
.L60:
	ldr	r3, .L69+144
	ldr	r2, [r3]
	ldr	r3, [fp, #-136]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L69+108
	bl	printf
.L58:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L57:
	ldr	r3, [fp, #-136]
	cmp	r3, #13
	bls	.L61
	mov	r0, #10
	bl	putchar
.L42:
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L62
.L65:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-136]
	cmp	r3, #100
	bne	.L63
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	ldr	r1, .L69+148
	mov	r0, r3
	bl	device_printf
	b	.L64
.L63:
	mov	r0, #1000
	bl	DELAY
.L62:
	ldr	r3, .L69+12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	ac97_rdcd
	mov	r3, r0
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L65
.L64:
	ldr	r3, .L69+84
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L66
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #40]
	ldr	r2, [fp, #-136]
	ldr	r1, .L69+152
	mov	r0, r3
	bl	device_printf
.L66:
	ldr	r3, [fp, #-152]
	ldr	r3, [r3, #36]
	mov	r0, r3
	bl	snd_mtxunlock
	mov	r3, #0
.L67:
	ldr	r2, .L69
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L68
	bl	__stack_chk_fail
.L68:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L70:
	.align	2
.L69:
	.word	.LC16
	.word	.LC0
	.word	ENODEV
	.word	AC97_REG_POWER
	.word	AC97_F_EAPD_INV
	.word	AC97_REG_RESET
	.word	AC97_F_RDCD_BUG
	.word	AC97_REG_ID1
	.word	AC97_REG_ID2
	.word	.LC1
	.word	ac97codecid
	.word	ac97vendorid
	.word	AC97_REGEXT_ID
	.word	65535
	.word	AC97_REGEXT_STAT
	.word	AC97_EXTCAPS
	.word	ac97mixtable_default
	.word	AC97_MIXER_SIZE
	.word	AC97_MIX_TONE
	.word	AC97_MIX_BEEP
	.word	.LC2
	.word	bootverbose
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	ac97feature
	.word	.LC7
	.word	SOUND_MIXER_VOLUME
	.word	.LC8
	.word	ac97enhancement
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	ac97extfeature
	.word	.LC14
	.word	.LC15
	.size	ac97_initmixer, .-ac97_initmixer
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
