#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*/ DrvSw(int);
int /*<<< orphan*/ IniPtAve();
int /*<<< orphan*/ RamAccFixMod(int);
int /*<<< orphan*/ RamWrite32A(int, int);
int /*<<< orphan*/ RamWriteA(int, int);
int /*<<< orphan*/ RegWriteA(int, int);
int /*<<< orphan*/ SetGcf(int /*<<< orphan*/);
int /*<<< orphan*/ SetH1cMod(int);
int /*<<< orphan*/ SetPanTiltMode(int);
int /*<<< orphan*/ SetZsp(int /*<<< orphan*/);
void IniAdj(void) {
  RegWriteA(0x018D, 0x00);
  IniPtAve();
  RegWriteA(0x0251, 0x33);
  RegWriteA(0x0253, 0x05);
  RegWriteA(0x0254, 0x05);
  RegWriteA(0x0252, 0x00);
  RegWriteA(0x0255, 0x00);
  RegWriteA(0x0257, 0x2E);
  RegWriteA(0x02A0, 0x00);
  RegWriteA(0x02A1, 0x00);
  RegWriteA(0x02A2, 0x00);
  RegWriteA(0x02A3, 0x00);
  RamAccFixMod(0x01);
  RamWriteA(0x1479, 0x0000);
  RamWriteA(0x147A, 0xE000);
  RamWriteA(0x14F9, 0x0000);
  RamWriteA(0x14FA, 0xE000);
  RamWriteA(0x1450, 0x0000);
  RamWriteA(0x14D0, 0x0000);
  RamWriteA(0x10D3, 0x3000);
  RamWriteA(0x11D3, 0x3000);
  RamWriteA(0x1529, 0x0000);
  RamWriteA(0x152A, 0x9000);
  RamAccFixMod(0x00);
  RamWrite32A(0x1020, 0xBF147AE1);
  RamWrite32A(0x1120, 0xBF147AE1);
  RamWrite32A(0x10E5, 0x3F800000);
  RamWrite32A(0x11E5, 0xBF800000);
  if (1) {
    RamWrite32A(0x10B8, 0x00000000);
    RamWrite32A(0x10B9, 0x3F800000);
    RamWrite32A(0x11B8, 0x00000000);
    RamWrite32A(0x11B9, 0x3F800000);
  }
  SetZsp(0);
  RegWriteA(0x0010, 0xC0);
  RegWriteA(0x0250, 0xDF);
  RegWriteA(0x01E0, 0x02);
  RegWriteA(0x0193, 0x02);
  RegWriteA(0x0192, 0x00);
  RegWriteA(0x01A3, 0x02);
  RegWriteA(0x01A2, 0x00);
  SetPanTiltMode(0x00);
  SetGcf(0);
  SetH1cMod(0x80);
  DrvSw(0x01);
  RegWriteA(0x0101, 0x01);
}


x86 assembly (clang, -O0):
<IniAdj>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18d,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x0,%al
call   1080 <IniPtAve@plt>
mov    $0x251,%edi
mov    $0x33,%esi
call   10c0 <RegWriteA@plt>
mov    $0x253,%edi
mov    $0x5,%esi
call   10c0 <RegWriteA@plt>
mov    $0x254,%edi
mov    $0x5,%esi
call   10c0 <RegWriteA@plt>
mov    $0x252,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x255,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x257,%edi
mov    $0x2e,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a0,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a1,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a2,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a3,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1,%edi
call   10b0 <RamAccFixMod@plt>
mov    $0x1479,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x147a,%edi
mov    $0xe000,%esi
call   1060 <RamWriteA@plt>
mov    $0x14f9,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x14fa,%edi
mov    $0xe000,%esi
call   1060 <RamWriteA@plt>
mov    $0x1450,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x14d0,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x10d3,%edi
mov    $0x3000,%esi
call   1060 <RamWriteA@plt>
mov    $0x11d3,%edi
mov    $0x3000,%esi
call   1060 <RamWriteA@plt>
mov    $0x1529,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x152a,%edi
mov    $0x9000,%esi
call   1060 <RamWriteA@plt>
xor    %edi,%edi
call   10b0 <RamAccFixMod@plt>
mov    $0x1020,%edi
mov    $0xbf147ae1,%esi
call   1070 <RamWrite32A@plt>
mov    $0x1120,%edi
mov    $0xbf147ae1,%esi
call   1070 <RamWrite32A@plt>
mov    $0x10e5,%edi
mov    $0x3f800000,%esi
call   1070 <RamWrite32A@plt>
mov    $0x11e5,%edi
mov    $0xbf800000,%esi
call   1070 <RamWrite32A@plt>
mov    $0x10b8,%edi
xor    %esi,%esi
call   1070 <RamWrite32A@plt>
mov    $0x10b9,%edi
mov    $0x3f800000,%esi
call   1070 <RamWrite32A@plt>
mov    $0x11b8,%edi
xor    %esi,%esi
call   1070 <RamWrite32A@plt>
mov    $0x11b9,%edi
mov    $0x3f800000,%esi
call   1070 <RamWrite32A@plt>
xor    %edi,%edi
call   1050 <SetZsp@plt>
mov    $0x10,%edi
mov    $0xc0,%esi
call   10c0 <RegWriteA@plt>
mov    $0x250,%edi
mov    $0xdf,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1e0,%edi
mov    $0x2,%esi
call   10c0 <RegWriteA@plt>
mov    $0x193,%edi
mov    $0x2,%esi
call   10c0 <RegWriteA@plt>
mov    $0x192,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1a3,%edi
mov    $0x2,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1a2,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
xor    %edi,%edi
call   1040 <SetPanTiltMode@plt>
xor    %edi,%edi
call   1030 <SetGcf@plt>
mov    $0x80,%edi
call   10a0 <SetH1cMod@plt>
mov    $0x1,%edi
call   1090 <DrvSw@plt>
mov    $0x101,%edi
mov    $0x1,%esi
call   10c0 <RegWriteA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniAdj>:
push   %rax
mov    $0x18d,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
xor    %eax,%eax
call   1080 <IniPtAve@plt>
mov    $0x251,%edi
mov    $0x33,%esi
call   10c0 <RegWriteA@plt>
mov    $0x253,%edi
mov    $0x5,%esi
call   10c0 <RegWriteA@plt>
mov    $0x254,%edi
mov    $0x5,%esi
call   10c0 <RegWriteA@plt>
mov    $0x252,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x255,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x257,%edi
mov    $0x2e,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a0,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a1,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a2,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x2a3,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1,%edi
call   10b0 <RamAccFixMod@plt>
mov    $0x1479,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x147a,%edi
mov    $0xe000,%esi
call   1060 <RamWriteA@plt>
mov    $0x14f9,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x14fa,%edi
mov    $0xe000,%esi
call   1060 <RamWriteA@plt>
mov    $0x1450,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x14d0,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x10d3,%edi
mov    $0x3000,%esi
call   1060 <RamWriteA@plt>
mov    $0x11d3,%edi
mov    $0x3000,%esi
call   1060 <RamWriteA@plt>
mov    $0x1529,%edi
xor    %esi,%esi
call   1060 <RamWriteA@plt>
mov    $0x152a,%edi
mov    $0x9000,%esi
call   1060 <RamWriteA@plt>
xor    %edi,%edi
call   10b0 <RamAccFixMod@plt>
mov    $0x1020,%edi
mov    $0xbf147ae1,%esi
call   1070 <RamWrite32A@plt>
mov    $0x1120,%edi
mov    $0xbf147ae1,%esi
call   1070 <RamWrite32A@plt>
mov    $0x10e5,%edi
mov    $0x3f800000,%esi
call   1070 <RamWrite32A@plt>
mov    $0x11e5,%edi
mov    $0xbf800000,%esi
call   1070 <RamWrite32A@plt>
mov    $0x10b8,%edi
xor    %esi,%esi
call   1070 <RamWrite32A@plt>
mov    $0x10b9,%edi
mov    $0x3f800000,%esi
call   1070 <RamWrite32A@plt>
mov    $0x11b8,%edi
xor    %esi,%esi
call   1070 <RamWrite32A@plt>
mov    $0x11b9,%edi
mov    $0x3f800000,%esi
call   1070 <RamWrite32A@plt>
xor    %edi,%edi
call   1050 <SetZsp@plt>
mov    $0x10,%edi
mov    $0xc0,%esi
call   10c0 <RegWriteA@plt>
mov    $0x250,%edi
mov    $0xdf,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1e0,%edi
mov    $0x2,%esi
call   10c0 <RegWriteA@plt>
mov    $0x193,%edi
mov    $0x2,%esi
call   10c0 <RegWriteA@plt>
mov    $0x192,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1a3,%edi
mov    $0x2,%esi
call   10c0 <RegWriteA@plt>
mov    $0x1a2,%edi
xor    %esi,%esi
call   10c0 <RegWriteA@plt>
xor    %edi,%edi
call   1040 <SetPanTiltMode@plt>
xor    %edi,%edi
call   1030 <SetGcf@plt>
mov    $0x80,%edi
call   10a0 <SetH1cMod@plt>
mov    $0x1,%edi
call   1090 <DrvSw@plt>
mov    $0x101,%edi
mov    $0x1,%esi
pop    %rax
jmp    10c0 <RegWriteA@plt>

LLVM IR (-O0):
define void @IniAdj() {
%1 = call i32 @RegWriteA(i32 397, i32 0)
%2 = call i32 (...) @IniPtAve()
%3 = call i32 @RegWriteA(i32 593, i32 51)
%4 = call i32 @RegWriteA(i32 595, i32 5)
%5 = call i32 @RegWriteA(i32 596, i32 5)
%6 = call i32 @RegWriteA(i32 594, i32 0)
%7 = call i32 @RegWriteA(i32 597, i32 0)
%8 = call i32 @RegWriteA(i32 599, i32 46)
%9 = call i32 @RegWriteA(i32 672, i32 0)
%10 = call i32 @RegWriteA(i32 673, i32 0)
%11 = call i32 @RegWriteA(i32 674, i32 0)
%12 = call i32 @RegWriteA(i32 675, i32 0)
%13 = call i32 @RamAccFixMod(i32 1)
%14 = call i32 @RamWriteA(i32 5241, i32 0)
%15 = call i32 @RamWriteA(i32 5242, i32 57344)
%16 = call i32 @RamWriteA(i32 5369, i32 0)
%17 = call i32 @RamWriteA(i32 5370, i32 57344)
%18 = call i32 @RamWriteA(i32 5200, i32 0)
%19 = call i32 @RamWriteA(i32 5328, i32 0)
%20 = call i32 @RamWriteA(i32 4307, i32 12288)
%21 = call i32 @RamWriteA(i32 4563, i32 12288)
%22 = call i32 @RamWriteA(i32 5417, i32 0)
%23 = call i32 @RamWriteA(i32 5418, i32 36864)
%24 = call i32 @RamAccFixMod(i32 0)
%25 = call i32 @RamWrite32A(i32 4128, i32 -1089176863)
%26 = call i32 @RamWrite32A(i32 4384, i32 -1089176863)
%27 = call i32 @RamWrite32A(i32 4325, i32 1065353216)
%28 = call i32 @RamWrite32A(i32 4581, i32 -1082130432)
%29 = call i32 @RamWrite32A(i32 4280, i32 0)
%30 = call i32 @RamWrite32A(i32 4281, i32 1065353216)
%31 = call i32 @RamWrite32A(i32 4536, i32 0)
%32 = call i32 @RamWrite32A(i32 4537, i32 1065353216)
%33 = call i32 @SetZsp(i32 0)
%34 = call i32 @RegWriteA(i32 16, i32 192)
%35 = call i32 @RegWriteA(i32 592, i32 223)
%36 = call i32 @RegWriteA(i32 480, i32 2)
%37 = call i32 @RegWriteA(i32 403, i32 2)
%38 = call i32 @RegWriteA(i32 402, i32 0)
%39 = call i32 @RegWriteA(i32 419, i32 2)
%40 = call i32 @RegWriteA(i32 418, i32 0)
%41 = call i32 @SetPanTiltMode(i32 0)
%42 = call i32 @SetGcf(i32 0)
%43 = call i32 @SetH1cMod(i32 128)
%44 = call i32 @DrvSw(i32 1)
%45 = call i32 @RegWriteA(i32 257, i32 1)
ret void
}

LLVM IR (-O2):
define void @IniAdj() {
%1 = tail call i32 @RegWriteA(i32 397, i32 0)
%2 = tail call i32 (...) @IniPtAve()
%3 = tail call i32 @RegWriteA(i32 593, i32 51)
%4 = tail call i32 @RegWriteA(i32 595, i32 5)
%5 = tail call i32 @RegWriteA(i32 596, i32 5)
%6 = tail call i32 @RegWriteA(i32 594, i32 0)
%7 = tail call i32 @RegWriteA(i32 597, i32 0)
%8 = tail call i32 @RegWriteA(i32 599, i32 46)
%9 = tail call i32 @RegWriteA(i32 672, i32 0)
%10 = tail call i32 @RegWriteA(i32 673, i32 0)
%11 = tail call i32 @RegWriteA(i32 674, i32 0)
%12 = tail call i32 @RegWriteA(i32 675, i32 0)
%13 = tail call i32 @RamAccFixMod(i32 1)
%14 = tail call i32 @RamWriteA(i32 5241, i32 0)
%15 = tail call i32 @RamWriteA(i32 5242, i32 57344)
%16 = tail call i32 @RamWriteA(i32 5369, i32 0)
%17 = tail call i32 @RamWriteA(i32 5370, i32 57344)
%18 = tail call i32 @RamWriteA(i32 5200, i32 0)
%19 = tail call i32 @RamWriteA(i32 5328, i32 0)
%20 = tail call i32 @RamWriteA(i32 4307, i32 12288)
%21 = tail call i32 @RamWriteA(i32 4563, i32 12288)
%22 = tail call i32 @RamWriteA(i32 5417, i32 0)
%23 = tail call i32 @RamWriteA(i32 5418, i32 36864)
%24 = tail call i32 @RamAccFixMod(i32 0)
%25 = tail call i32 @RamWrite32A(i32 4128, i32 -1089176863)
%26 = tail call i32 @RamWrite32A(i32 4384, i32 -1089176863)
%27 = tail call i32 @RamWrite32A(i32 4325, i32 1065353216)
%28 = tail call i32 @RamWrite32A(i32 4581, i32 -1082130432)
%29 = tail call i32 @RamWrite32A(i32 4280, i32 0)
%30 = tail call i32 @RamWrite32A(i32 4281, i32 1065353216)
%31 = tail call i32 @RamWrite32A(i32 4536, i32 0)
%32 = tail call i32 @RamWrite32A(i32 4537, i32 1065353216)
%33 = tail call i32 @SetZsp(i32 0)
%34 = tail call i32 @RegWriteA(i32 16, i32 192)
%35 = tail call i32 @RegWriteA(i32 592, i32 223)
%36 = tail call i32 @RegWriteA(i32 480, i32 2)
%37 = tail call i32 @RegWriteA(i32 403, i32 2)
%38 = tail call i32 @RegWriteA(i32 402, i32 0)
%39 = tail call i32 @RegWriteA(i32 419, i32 2)
%40 = tail call i32 @RegWriteA(i32 418, i32 0)
%41 = tail call i32 @SetPanTiltMode(i32 0)
%42 = tail call i32 @SetGcf(i32 0)
%43 = tail call i32 @SetH1cMod(i32 128)
%44 = tail call i32 @DrvSw(i32 1)
%45 = tail call i32 @RegWriteA(i32 257, i32 1)
ret void
}