#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ CodecPageSelect(int);
int /*<<< orphan*/ CodecRegWrite(int, int);
int /*<<< orphan*/ CodecReset();
void ConfigureAudioCodec(unsigned long ulWordLength) {
  CodecReset();
  CodecPageSelect(0);
  CodecRegWrite(0x1b, 0x00);
  CodecRegWrite(0x04, 0x03);
  CodecRegWrite(0x05, 0x94);
  CodecRegWrite(0x06, 0x20);
  CodecRegWrite(0x0B, 0x82);
  CodecRegWrite(0x0C, 0x88);
  CodecRegWrite(0x0D, 0x01);
  CodecRegWrite(0x0E, 0x80);
  CodecRegWrite(0x12, 0x82);
  CodecRegWrite(0x13, 0x98);
  CodecRegWrite(0x14, 0x80);
  CodecPageSelect(1);
  CodecRegWrite(0x01, 0x08);
  CodecRegWrite(0x02, 0x01);
  CodecRegWrite(0x47, 0x32);
  CodecRegWrite(0x7B, 0x01);
}


x86 assembly (clang, -O0):
<ConfigureAudioCodec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <CodecReset@plt>
xor    %edi,%edi
call   1050 <CodecPageSelect@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x5,%edi
mov    $0x94,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x6,%edi
mov    $0x20,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xb,%edi
mov    $0x82,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xc,%edi
mov    $0x88,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xd,%edi
mov    $0x1,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xe,%edi
mov    $0x80,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x12,%edi
mov    $0x82,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x13,%edi
mov    $0x98,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x14,%edi
mov    $0x80,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x1,%edi
call   1050 <CodecPageSelect@plt>
mov    $0x1,%edi
mov    $0x8,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x47,%edi
mov    $0x32,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x7b,%edi
mov    $0x1,%esi
call   1040 <CodecRegWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConfigureAudioCodec>:
push   %rax
xor    %eax,%eax
call   1030 <CodecReset@plt>
xor    %edi,%edi
call   1050 <CodecPageSelect@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x5,%edi
mov    $0x94,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x6,%edi
mov    $0x20,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xb,%edi
mov    $0x82,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xc,%edi
mov    $0x88,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xd,%edi
mov    $0x1,%esi
call   1040 <CodecRegWrite@plt>
mov    $0xe,%edi
mov    $0x80,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x12,%edi
mov    $0x82,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x13,%edi
mov    $0x98,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x14,%edi
mov    $0x80,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x1,%edi
call   1050 <CodecPageSelect@plt>
mov    $0x1,%edi
mov    $0x8,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x47,%edi
mov    $0x32,%esi
call   1040 <CodecRegWrite@plt>
mov    $0x7b,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <CodecRegWrite@plt>

LLVM IR (-O0):
define void @ConfigureAudioCodec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @CodecReset()
%4 = call i32 @CodecPageSelect(i32 0)
%5 = call i32 @CodecRegWrite(i32 27, i32 0)
%6 = call i32 @CodecRegWrite(i32 4, i32 3)
%7 = call i32 @CodecRegWrite(i32 5, i32 148)
%8 = call i32 @CodecRegWrite(i32 6, i32 32)
%9 = call i32 @CodecRegWrite(i32 11, i32 130)
%10 = call i32 @CodecRegWrite(i32 12, i32 136)
%11 = call i32 @CodecRegWrite(i32 13, i32 1)
%12 = call i32 @CodecRegWrite(i32 14, i32 128)
%13 = call i32 @CodecRegWrite(i32 18, i32 130)
%14 = call i32 @CodecRegWrite(i32 19, i32 152)
%15 = call i32 @CodecRegWrite(i32 20, i32 128)
%16 = call i32 @CodecPageSelect(i32 1)
%17 = call i32 @CodecRegWrite(i32 1, i32 8)
%18 = call i32 @CodecRegWrite(i32 2, i32 1)
%19 = call i32 @CodecRegWrite(i32 71, i32 50)
%20 = call i32 @CodecRegWrite(i32 123, i32 1)
ret void
}

LLVM IR (-O2):
define void @ConfigureAudioCodec(i64 %0) {
%2 = tail call i32 (...) @CodecReset()
%3 = tail call i32 @CodecPageSelect(i32 0)
%4 = tail call i32 @CodecRegWrite(i32 27, i32 0)
%5 = tail call i32 @CodecRegWrite(i32 4, i32 3)
%6 = tail call i32 @CodecRegWrite(i32 5, i32 148)
%7 = tail call i32 @CodecRegWrite(i32 6, i32 32)
%8 = tail call i32 @CodecRegWrite(i32 11, i32 130)
%9 = tail call i32 @CodecRegWrite(i32 12, i32 136)
%10 = tail call i32 @CodecRegWrite(i32 13, i32 1)
%11 = tail call i32 @CodecRegWrite(i32 14, i32 128)
%12 = tail call i32 @CodecRegWrite(i32 18, i32 130)
%13 = tail call i32 @CodecRegWrite(i32 19, i32 152)
%14 = tail call i32 @CodecRegWrite(i32 20, i32 128)
%15 = tail call i32 @CodecPageSelect(i32 1)
%16 = tail call i32 @CodecRegWrite(i32 1, i32 8)
%17 = tail call i32 @CodecRegWrite(i32 2, i32 1)
%18 = tail call i32 @CodecRegWrite(i32 71, i32 50)
%19 = tail call i32 @CodecRegWrite(i32 123, i32 1)
ret void
}