#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(int);
int /*<<< orphan*/ RamWriteA_lc898122(int, int);
int /*<<< orphan*/ RegReadA_lc898122(int, unsigned char *);
int /*<<< orphan*/ RegWriteA_lc898122(int, int);
void IniAf_lc898122(void) {
  unsigned char UcStbb0;
  AfDrvSw_lc898122(0x00);
  RegWriteA_lc898122(0x0081, 0x20);
  RegWriteA_lc898122(0x0083, 0x00);
  RegWriteA_lc898122(0x0084, 0x80);
  RegWriteA_lc898122(0x0090, 0x00);
  RegWriteA_lc898122(0x0088, 0x80);
  RegWriteA_lc898122(0x0082, 0x00);
  RegWriteA_lc898122(0x0085, 0x00);
  RegWriteA_lc898122(0x0091, 0x01);
  RegWriteA_lc898122(0x0099, 0x20);
  RegWriteA_lc898122(0x00A1, 0x40);
  RegReadA_lc898122(0x0250, &UcStbb0);
  UcStbb0 &= 0x7F;
  RegWriteA_lc898122(0x0250, UcStbb0);
  RegWriteA_lc898122(0x0264, 0x00);
  RegWriteA_lc898122(0x0302, 0x00);
  RamWriteA_lc898122(0x0396, 0x7FFF);
  RamWriteA_lc898122(0x0398, 0x75FE);
  RamWriteA_lc898122(0x039A, 0x7F32);
  RegWriteA_lc898122(0x0303, 0xF1);
  RamWriteA_lc898122(0x0304, 0x0000);
  UcStbb0 |= 0x80;
  RegWriteA_lc898122(0x0250, UcStbb0);
  RegWriteA_lc898122(0x0264, 0x05);
  AfDrvSw_lc898122(0x01);
}


x86 assembly (clang, -O0):
<IniAf_lc898122>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <AfDrvSw_lc898122@plt>
mov    $0x81,%edi
mov    $0x20,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x83,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x84,%edi
mov    $0x80,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x90,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x88,%edi
mov    $0x80,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x82,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x85,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x91,%edi
mov    $0x1,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x99,%edi
mov    $0x20,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0xa1,%edi
mov    $0x40,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x250,%edi
lea    -0x1(%rbp),%rsi
call   1060 <RegReadA_lc898122@plt>
movzbl -0x1(%rbp),%eax
and    $0x7f,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%esi
mov    $0x250,%edi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x264,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x302,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x396,%edi
mov    $0x7fff,%esi
call   1050 <RamWriteA_lc898122@plt>
mov    $0x398,%edi
mov    $0x75fe,%esi
call   1050 <RamWriteA_lc898122@plt>
mov    $0x39a,%edi
mov    $0x7f32,%esi
call   1050 <RamWriteA_lc898122@plt>
mov    $0x303,%edi
mov    $0xf1,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x304,%edi
xor    %esi,%esi
call   1050 <RamWriteA_lc898122@plt>
movzbl -0x1(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%esi
mov    $0x250,%edi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x264,%edi
mov    $0x5,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x1,%edi
call   1030 <AfDrvSw_lc898122@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniAf_lc898122>:
push   %rax
xor    %edi,%edi
call   1030 <AfDrvSw_lc898122@plt>
mov    $0x81,%edi
mov    $0x20,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x83,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x84,%edi
mov    $0x80,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x90,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x88,%edi
mov    $0x80,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x82,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x85,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x91,%edi
mov    $0x1,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x99,%edi
mov    $0x20,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0xa1,%edi
mov    $0x40,%esi
call   1040 <RegWriteA_lc898122@plt>
lea    0x7(%rsp),%rsi
mov    $0x250,%edi
call   1060 <RegReadA_lc898122@plt>
movzbl 0x7(%rsp),%esi
and    $0x7f,%esi
mov    %sil,0x7(%rsp)
mov    $0x250,%edi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x264,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x302,%edi
xor    %esi,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x396,%edi
mov    $0x7fff,%esi
call   1050 <RamWriteA_lc898122@plt>
mov    $0x398,%edi
mov    $0x75fe,%esi
call   1050 <RamWriteA_lc898122@plt>
mov    $0x39a,%edi
mov    $0x7f32,%esi
call   1050 <RamWriteA_lc898122@plt>
mov    $0x303,%edi
mov    $0xf1,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x304,%edi
xor    %esi,%esi
call   1050 <RamWriteA_lc898122@plt>
movzbl 0x7(%rsp),%esi
or     $0x80,%esi
mov    %sil,0x7(%rsp)
mov    $0x250,%edi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x264,%edi
mov    $0x5,%esi
call   1040 <RegWriteA_lc898122@plt>
mov    $0x1,%edi
call   1030 <AfDrvSw_lc898122@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @IniAf_lc898122() {
%1 = alloca i8
%2 = call i32 @AfDrvSw_lc898122(i32 0)
%3 = call i32 @RegWriteA_lc898122(i32 129, i32 32)
%4 = call i32 @RegWriteA_lc898122(i32 131, i32 0)
%5 = call i32 @RegWriteA_lc898122(i32 132, i32 128)
%6 = call i32 @RegWriteA_lc898122(i32 144, i32 0)
%7 = call i32 @RegWriteA_lc898122(i32 136, i32 128)
%8 = call i32 @RegWriteA_lc898122(i32 130, i32 0)
%9 = call i32 @RegWriteA_lc898122(i32 133, i32 0)
%10 = call i32 @RegWriteA_lc898122(i32 145, i32 1)
%11 = call i32 @RegWriteA_lc898122(i32 153, i32 32)
%12 = call i32 @RegWriteA_lc898122(i32 161, i32 64)
%13 = call i32 @RegReadA_lc898122(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(i32 592, i32 %19)
%21 = call i32 @RegWriteA_lc898122(i32 612, i32 0)
%22 = call i32 @RegWriteA_lc898122(i32 770, i32 0)
%23 = call i32 @RamWriteA_lc898122(i32 918, i32 32767)
%24 = call i32 @RamWriteA_lc898122(i32 920, i32 30206)
%25 = call i32 @RamWriteA_lc898122(i32 922, i32 32562)
%26 = call i32 @RegWriteA_lc898122(i32 771, i32 241)
%27 = call i32 @RamWriteA_lc898122(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(i32 592, i32 %33)
%35 = call i32 @RegWriteA_lc898122(i32 612, i32 5)
%36 = call i32 @AfDrvSw_lc898122(i32 1)
ret void
}

LLVM IR (-O2):
define void @IniAf_lc898122() {
%1 = alloca i8
%2 = tail call i32 @AfDrvSw_lc898122(i32 0)
%3 = tail call i32 @RegWriteA_lc898122(i32 129, i32 32)
%4 = tail call i32 @RegWriteA_lc898122(i32 131, i32 0)
%5 = tail call i32 @RegWriteA_lc898122(i32 132, i32 128)
%6 = tail call i32 @RegWriteA_lc898122(i32 144, i32 0)
%7 = tail call i32 @RegWriteA_lc898122(i32 136, i32 128)
%8 = tail call i32 @RegWriteA_lc898122(i32 130, i32 0)
%9 = tail call i32 @RegWriteA_lc898122(i32 133, i32 0)
%10 = tail call i32 @RegWriteA_lc898122(i32 145, i32 1)
%11 = tail call i32 @RegWriteA_lc898122(i32 153, i32 32)
%12 = tail call i32 @RegWriteA_lc898122(i32 161, i32 64)
%13 = call i32 @RegReadA_lc898122(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(i32 592, i32 %16)
%18 = call i32 @RegWriteA_lc898122(i32 612, i32 0)
%19 = call i32 @RegWriteA_lc898122(i32 770, i32 0)
%20 = call i32 @RamWriteA_lc898122(i32 918, i32 32767)
%21 = call i32 @RamWriteA_lc898122(i32 920, i32 30206)
%22 = call i32 @RamWriteA_lc898122(i32 922, i32 32562)
%23 = call i32 @RegWriteA_lc898122(i32 771, i32 241)
%24 = call i32 @RamWriteA_lc898122(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(i32 592, i32 %27)
%29 = call i32 @RegWriteA_lc898122(i32 612, i32 5)
%30 = call i32 @AfDrvSw_lc898122(i32 1)
ret void
}