#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_OFILM(int);
int /*<<< orphan*/ RamWriteA_Ofilm(int, int);
int /*<<< orphan*/ RegReadA_Ofilm(int, unsigned char *);
int /*<<< orphan*/ RegWriteA_Ofilm(int, int);
void IniAf_OFILM(void) {
  unsigned char UcStbb0_OFILM;
  AfDrvSw_OFILM(0x00);
  RegWriteA_Ofilm(0x0081, 0x20);
  RegWriteA_Ofilm(0x0083, 0x00);
  RegWriteA_Ofilm(0x0084, 0x80);
  RegWriteA_Ofilm(0x0090, 0x00);
  RegWriteA_Ofilm(0x0088, 0x80);
  RegWriteA_Ofilm(0x0082, 0x00);
  RegWriteA_Ofilm(0x0085, 0x00);
  RegWriteA_Ofilm(0x0091, 0x01);
  RegWriteA_Ofilm(0x0099, 0x20);
  RegWriteA_Ofilm(0x00A1, 0x40);
  RegReadA_Ofilm(0x0250, &UcStbb0_OFILM);
  UcStbb0_OFILM &= 0x7F;
  RegWriteA_Ofilm(0x0250, UcStbb0_OFILM);
  RegWriteA_Ofilm(0x0264, 0x00);
  RegWriteA_Ofilm(0x0302, 0x00);
  RamWriteA_Ofilm(0x0396, 0x7FFF);
  RamWriteA_Ofilm(0x0398, 0x146C);
  RamWriteA_Ofilm(0x039A, 0x6F50);
  RegWriteA_Ofilm(0x0303, 0xD1);
  RamWriteA_Ofilm(0x0304, 0x0000);
  UcStbb0_OFILM |= 0x80;
  RegWriteA_Ofilm(0x0250, UcStbb0_OFILM);
  RegWriteA_Ofilm(0x0264, 0x05);
  AfDrvSw_OFILM(0x01);
}


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

x86 assembly (clang, -O2):
<IniAf_OFILM>:
push   %rax
xor    %edi,%edi
call   1050 <AfDrvSw_OFILM@plt>
mov    $0x81,%edi
mov    $0x20,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x83,%edi
xor    %esi,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x84,%edi
mov    $0x80,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x90,%edi
xor    %esi,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x88,%edi
mov    $0x80,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x82,%edi
xor    %esi,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x85,%edi
xor    %esi,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x91,%edi
mov    $0x1,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x99,%edi
mov    $0x20,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0xa1,%edi
mov    $0x40,%esi
call   1060 <RegWriteA_Ofilm@plt>
lea    0x7(%rsp),%rsi
mov    $0x250,%edi
call   1030 <RegReadA_Ofilm@plt>
movzbl 0x7(%rsp),%esi
and    $0x7f,%esi
mov    %sil,0x7(%rsp)
mov    $0x250,%edi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x264,%edi
xor    %esi,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x302,%edi
xor    %esi,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x396,%edi
mov    $0x7fff,%esi
call   1040 <RamWriteA_Ofilm@plt>
mov    $0x398,%edi
mov    $0x146c,%esi
call   1040 <RamWriteA_Ofilm@plt>
mov    $0x39a,%edi
mov    $0x6f50,%esi
call   1040 <RamWriteA_Ofilm@plt>
mov    $0x303,%edi
mov    $0xd1,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x304,%edi
xor    %esi,%esi
call   1040 <RamWriteA_Ofilm@plt>
movzbl 0x7(%rsp),%esi
or     $0x80,%esi
mov    %sil,0x7(%rsp)
mov    $0x250,%edi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x264,%edi
mov    $0x5,%esi
call   1060 <RegWriteA_Ofilm@plt>
mov    $0x1,%edi
call   1050 <AfDrvSw_OFILM@plt>
pop    %rax
ret

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

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