#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*/ AfDrvSw_lc898122_sharp(int);
int /*<<< orphan*/ RamWriteA_lc898122_sharp(int, int);
int /*<<< orphan*/ RegReadA_lc898122_sharp(int, unsigned char *);
int /*<<< orphan*/ RegWriteA_lc898122_sharp(int, int);
void IniAf_lc898122_sharp(void) {
  unsigned char UcStbb0;
  AfDrvSw_lc898122_sharp(0x00);
  RegWriteA_lc898122_sharp(0x0081, 0x20);
  RegWriteA_lc898122_sharp(0x0083, 0x00);
  RegWriteA_lc898122_sharp(0x0084, 0x80);
  RegWriteA_lc898122_sharp(0x0090, 0x00);
  RegWriteA_lc898122_sharp(0x0088, 0x80);
  RegWriteA_lc898122_sharp(0x0082, 0x00);
  RegWriteA_lc898122_sharp(0x0085, 0x00);
  RegWriteA_lc898122_sharp(0x0091, 0x01);
  RegWriteA_lc898122_sharp(0x0099, 0x20);
  RegWriteA_lc898122_sharp(0x00A1, 0x40);
  RegReadA_lc898122_sharp(0x0250, &UcStbb0);
  UcStbb0 &= 0x7F;
  RegWriteA_lc898122_sharp(0x0250, UcStbb0);
  RegWriteA_lc898122_sharp(0x0264, 0x00);
  RegWriteA_lc898122_sharp(0x0302, 0x02);
  RamWriteA_lc898122_sharp(0x0396, 0x7FFF);
  RamWriteA_lc898122_sharp(0x0398, 0x4a02);
  RamWriteA_lc898122_sharp(0x039A, 0x7d62);
  RegWriteA_lc898122_sharp(0x0303, 0xF9);
  RamWriteA_lc898122_sharp(0x0304, 0x0000);
  UcStbb0 |= 0x80;
  RegWriteA_lc898122_sharp(0x0250, UcStbb0);
  RegWriteA_lc898122_sharp(0x0264, 0x05);
  AfDrvSw_lc898122_sharp(0x01);
}


x86 assembly (clang, -O0):
<IniAf_lc898122_sharp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1050 <AfDrvSw_lc898122_sharp@plt>
mov    $0x81,%edi
mov    $0x20,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x83,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x84,%edi
mov    $0x80,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x90,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x88,%edi
mov    $0x80,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x82,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x85,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x91,%edi
mov    $0x1,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x99,%edi
mov    $0x20,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0xa1,%edi
mov    $0x40,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x250,%edi
lea    -0x1(%rbp),%rsi
call   1060 <RegReadA_lc898122_sharp@plt>
movzbl -0x1(%rbp),%eax
and    $0x7f,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%esi
mov    $0x250,%edi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x264,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x302,%edi
mov    $0x2,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x396,%edi
mov    $0x7fff,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
mov    $0x398,%edi
mov    $0x4a02,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
mov    $0x39a,%edi
mov    $0x7d62,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
mov    $0x303,%edi
mov    $0xf9,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x304,%edi
xor    %esi,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
movzbl -0x1(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%esi
mov    $0x250,%edi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x264,%edi
mov    $0x5,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x1,%edi
call   1050 <AfDrvSw_lc898122_sharp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniAf_lc898122_sharp>:
push   %rax
xor    %edi,%edi
call   1050 <AfDrvSw_lc898122_sharp@plt>
mov    $0x81,%edi
mov    $0x20,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x83,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x84,%edi
mov    $0x80,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x90,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x88,%edi
mov    $0x80,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x82,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x85,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x91,%edi
mov    $0x1,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x99,%edi
mov    $0x20,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0xa1,%edi
mov    $0x40,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
lea    0x7(%rsp),%rsi
mov    $0x250,%edi
call   1060 <RegReadA_lc898122_sharp@plt>
movzbl 0x7(%rsp),%esi
and    $0x7f,%esi
mov    %sil,0x7(%rsp)
mov    $0x250,%edi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x264,%edi
xor    %esi,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x302,%edi
mov    $0x2,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x396,%edi
mov    $0x7fff,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
mov    $0x398,%edi
mov    $0x4a02,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
mov    $0x39a,%edi
mov    $0x7d62,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
mov    $0x303,%edi
mov    $0xf9,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x304,%edi
xor    %esi,%esi
call   1040 <RamWriteA_lc898122_sharp@plt>
movzbl 0x7(%rsp),%esi
or     $0x80,%esi
mov    %sil,0x7(%rsp)
mov    $0x250,%edi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x264,%edi
mov    $0x5,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x1,%edi
call   1050 <AfDrvSw_lc898122_sharp@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @IniAf_lc898122_sharp() {
%1 = alloca i8
%2 = call i32 @AfDrvSw_lc898122_sharp(i32 0)
%3 = call i32 @RegWriteA_lc898122_sharp(i32 129, i32 32)
%4 = call i32 @RegWriteA_lc898122_sharp(i32 131, i32 0)
%5 = call i32 @RegWriteA_lc898122_sharp(i32 132, i32 128)
%6 = call i32 @RegWriteA_lc898122_sharp(i32 144, i32 0)
%7 = call i32 @RegWriteA_lc898122_sharp(i32 136, i32 128)
%8 = call i32 @RegWriteA_lc898122_sharp(i32 130, i32 0)
%9 = call i32 @RegWriteA_lc898122_sharp(i32 133, i32 0)
%10 = call i32 @RegWriteA_lc898122_sharp(i32 145, i32 1)
%11 = call i32 @RegWriteA_lc898122_sharp(i32 153, i32 32)
%12 = call i32 @RegWriteA_lc898122_sharp(i32 161, i32 64)
%13 = call i32 @RegReadA_lc898122_sharp(i32 592, i8* %1)
%14 = load i8, i8* %1
%15 = zext i8 %14 to i32
%16 = and i32 %15, 127
%17 = trunc i32 %16 to i8
store i8 %17, i8* %1
%18 = load i8, i8* %1
%19 = zext i8 %18 to i32
%20 = call i32 @RegWriteA_lc898122_sharp(i32 592, i32 %19)
%21 = call i32 @RegWriteA_lc898122_sharp(i32 612, i32 0)
%22 = call i32 @RegWriteA_lc898122_sharp(i32 770, i32 2)
%23 = call i32 @RamWriteA_lc898122_sharp(i32 918, i32 32767)
%24 = call i32 @RamWriteA_lc898122_sharp(i32 920, i32 18946)
%25 = call i32 @RamWriteA_lc898122_sharp(i32 922, i32 32098)
%26 = call i32 @RegWriteA_lc898122_sharp(i32 771, i32 249)
%27 = call i32 @RamWriteA_lc898122_sharp(i32 772, i32 0)
%28 = load i8, i8* %1
%29 = zext i8 %28 to i32
%30 = or i32 %29, 128
%31 = trunc i32 %30 to i8
store i8 %31, i8* %1
%32 = load i8, i8* %1
%33 = zext i8 %32 to i32
%34 = call i32 @RegWriteA_lc898122_sharp(i32 592, i32 %33)
%35 = call i32 @RegWriteA_lc898122_sharp(i32 612, i32 5)
%36 = call i32 @AfDrvSw_lc898122_sharp(i32 1)
ret void
}

LLVM IR (-O2):
define void @IniAf_lc898122_sharp() {
%1 = alloca i8
%2 = tail call i32 @AfDrvSw_lc898122_sharp(i32 0)
%3 = tail call i32 @RegWriteA_lc898122_sharp(i32 129, i32 32)
%4 = tail call i32 @RegWriteA_lc898122_sharp(i32 131, i32 0)
%5 = tail call i32 @RegWriteA_lc898122_sharp(i32 132, i32 128)
%6 = tail call i32 @RegWriteA_lc898122_sharp(i32 144, i32 0)
%7 = tail call i32 @RegWriteA_lc898122_sharp(i32 136, i32 128)
%8 = tail call i32 @RegWriteA_lc898122_sharp(i32 130, i32 0)
%9 = tail call i32 @RegWriteA_lc898122_sharp(i32 133, i32 0)
%10 = tail call i32 @RegWriteA_lc898122_sharp(i32 145, i32 1)
%11 = tail call i32 @RegWriteA_lc898122_sharp(i32 153, i32 32)
%12 = tail call i32 @RegWriteA_lc898122_sharp(i32 161, i32 64)
%13 = call i32 @RegReadA_lc898122_sharp(i32 592, i8* %1)
%14 = load i8, i8* %1
%15 = and i8 %14, 127
store i8 %15, i8* %1
%16 = zext i8 %15 to i32
%17 = call i32 @RegWriteA_lc898122_sharp(i32 592, i32 %16)
%18 = call i32 @RegWriteA_lc898122_sharp(i32 612, i32 0)
%19 = call i32 @RegWriteA_lc898122_sharp(i32 770, i32 2)
%20 = call i32 @RamWriteA_lc898122_sharp(i32 918, i32 32767)
%21 = call i32 @RamWriteA_lc898122_sharp(i32 920, i32 18946)
%22 = call i32 @RamWriteA_lc898122_sharp(i32 922, i32 32098)
%23 = call i32 @RegWriteA_lc898122_sharp(i32 771, i32 249)
%24 = call i32 @RamWriteA_lc898122_sharp(i32 772, i32 0)
%25 = load i8, i8* %1
%26 = or i8 %25, -128
store i8 %26, i8* %1
%27 = zext i8 %26 to i32
%28 = call i32 @RegWriteA_lc898122_sharp(i32 592, i32 %27)
%29 = call i32 @RegWriteA_lc898122_sharp(i32 612, i32 5)
%30 = call i32 @AfDrvSw_lc898122_sharp(i32 1)
ret void
}