#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*/ ClrGyr(int, int);
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, 0x04);
  RegWriteA(0x0254, 0x04);
  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, 0x8001);
  RamAccFixMod(0x00);
  RamWrite32A(0x1020, 0x3F147AE1);
  RamWrite32A(0x1120, 0xBF147AE1);
  RamWrite32A(0x10E5, 0x3F800000);
  RamWrite32A(0x11E5, 0x3F800000);
  RamWrite32A(0x1000, 0x3EBFED46);
  RamWrite32A(0x1100, 0x3EBFED46);
  ClrGyr(0x00FF, 0x02);
  if (0) {
    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   10d0 <RegWriteA@plt>
mov    $0x0,%al
call   1090 <IniPtAve@plt>
mov    $0x251,%edi
mov    $0x33,%esi
call   10d0 <RegWriteA@plt>
mov    $0x253,%edi
mov    $0x4,%esi
call   10d0 <RegWriteA@plt>
mov    $0x254,%edi
mov    $0x4,%esi
call   10d0 <RegWriteA@plt>
mov    $0x252,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x255,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x257,%edi
mov    $0x2e,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a0,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a1,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a2,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a3,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1,%edi
call   10c0 <RamAccFixMod@plt>
mov    $0x1479,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x147a,%edi
mov    $0xe000,%esi
call   1070 <RamWriteA@plt>
mov    $0x14f9,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x14fa,%edi
mov    $0xe000,%esi
call   1070 <RamWriteA@plt>
mov    $0x1450,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x14d0,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x10d3,%edi
mov    $0x3000,%esi
call   1070 <RamWriteA@plt>
mov    $0x11d3,%edi
mov    $0x3000,%esi
call   1070 <RamWriteA@plt>
mov    $0x1529,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x152a,%edi
mov    $0x8001,%esi
call   1070 <RamWriteA@plt>
xor    %edi,%edi
call   10c0 <RamAccFixMod@plt>
mov    $0x1020,%edi
mov    $0x3f147ae1,%esi
call   1080 <RamWrite32A@plt>
mov    $0x1120,%edi
mov    $0xbf147ae1,%esi
call   1080 <RamWrite32A@plt>
mov    $0x10e5,%edi
mov    $0x3f800000,%esi
call   1080 <RamWrite32A@plt>
mov    $0x11e5,%edi
mov    $0x3f800000,%esi
call   1080 <RamWrite32A@plt>
mov    $0x1000,%edi
mov    $0x3ebfed46,%esi
call   1080 <RamWrite32A@plt>
mov    $0x1100,%edi
mov    $0x3ebfed46,%esi
call   1080 <RamWrite32A@plt>
mov    $0xff,%edi
mov    $0x2,%esi
call   1040 <ClrGyr@plt>
xor    %edi,%edi
call   1060 <SetZsp@plt>
mov    $0x10,%edi
mov    $0xc0,%esi
call   10d0 <RegWriteA@plt>
mov    $0x250,%edi
mov    $0xdf,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1e0,%edi
mov    $0x2,%esi
call   10d0 <RegWriteA@plt>
mov    $0x193,%edi
mov    $0x2,%esi
call   10d0 <RegWriteA@plt>
mov    $0x192,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1a3,%edi
mov    $0x2,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1a2,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
xor    %edi,%edi
call   1050 <SetPanTiltMode@plt>
xor    %edi,%edi
call   1030 <SetGcf@plt>
mov    $0x80,%edi
call   10b0 <SetH1cMod@plt>
mov    $0x1,%edi
call   10a0 <DrvSw@plt>
mov    $0x101,%edi
mov    $0x1,%esi
call   10d0 <RegWriteA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniAdj>:
push   %rax
mov    $0x18d,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
xor    %eax,%eax
call   1090 <IniPtAve@plt>
mov    $0x251,%edi
mov    $0x33,%esi
call   10d0 <RegWriteA@plt>
mov    $0x253,%edi
mov    $0x4,%esi
call   10d0 <RegWriteA@plt>
mov    $0x254,%edi
mov    $0x4,%esi
call   10d0 <RegWriteA@plt>
mov    $0x252,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x255,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x257,%edi
mov    $0x2e,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a0,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a1,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a2,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x2a3,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1,%edi
call   10c0 <RamAccFixMod@plt>
mov    $0x1479,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x147a,%edi
mov    $0xe000,%esi
call   1070 <RamWriteA@plt>
mov    $0x14f9,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x14fa,%edi
mov    $0xe000,%esi
call   1070 <RamWriteA@plt>
mov    $0x1450,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x14d0,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x10d3,%edi
mov    $0x3000,%esi
call   1070 <RamWriteA@plt>
mov    $0x11d3,%edi
mov    $0x3000,%esi
call   1070 <RamWriteA@plt>
mov    $0x1529,%edi
xor    %esi,%esi
call   1070 <RamWriteA@plt>
mov    $0x152a,%edi
mov    $0x8001,%esi
call   1070 <RamWriteA@plt>
xor    %edi,%edi
call   10c0 <RamAccFixMod@plt>
mov    $0x1020,%edi
mov    $0x3f147ae1,%esi
call   1080 <RamWrite32A@plt>
mov    $0x1120,%edi
mov    $0xbf147ae1,%esi
call   1080 <RamWrite32A@plt>
mov    $0x10e5,%edi
mov    $0x3f800000,%esi
call   1080 <RamWrite32A@plt>
mov    $0x11e5,%edi
mov    $0x3f800000,%esi
call   1080 <RamWrite32A@plt>
mov    $0x1000,%edi
mov    $0x3ebfed46,%esi
call   1080 <RamWrite32A@plt>
mov    $0x1100,%edi
mov    $0x3ebfed46,%esi
call   1080 <RamWrite32A@plt>
mov    $0xff,%edi
mov    $0x2,%esi
call   1040 <ClrGyr@plt>
xor    %edi,%edi
call   1060 <SetZsp@plt>
mov    $0x10,%edi
mov    $0xc0,%esi
call   10d0 <RegWriteA@plt>
mov    $0x250,%edi
mov    $0xdf,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1e0,%edi
mov    $0x2,%esi
call   10d0 <RegWriteA@plt>
mov    $0x193,%edi
mov    $0x2,%esi
call   10d0 <RegWriteA@plt>
mov    $0x192,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1a3,%edi
mov    $0x2,%esi
call   10d0 <RegWriteA@plt>
mov    $0x1a2,%edi
xor    %esi,%esi
call   10d0 <RegWriteA@plt>
xor    %edi,%edi
call   1050 <SetPanTiltMode@plt>
xor    %edi,%edi
call   1030 <SetGcf@plt>
mov    $0x80,%edi
call   10b0 <SetH1cMod@plt>
mov    $0x1,%edi
call   10a0 <DrvSw@plt>
mov    $0x101,%edi
mov    $0x1,%esi
pop    %rax
jmp    10d0 <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 4)
%5 = call i32 @RegWriteA(i32 596, i32 4)
%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 32769)
%24 = call i32 @RamAccFixMod(i32 0)
%25 = call i32 @RamWrite32A(i32 4128, i32 1058306785)
%26 = call i32 @RamWrite32A(i32 4384, i32 -1089176863)
%27 = call i32 @RamWrite32A(i32 4325, i32 1065353216)
%28 = call i32 @RamWrite32A(i32 4581, i32 1065353216)
%29 = call i32 @RamWrite32A(i32 4096, i32 1052765510)
%30 = call i32 @RamWrite32A(i32 4352, i32 1052765510)
%31 = call i32 @ClrGyr(i32 255, i32 2)
%32 = call i32 @SetZsp(i32 0)
%33 = call i32 @RegWriteA(i32 16, i32 192)
%34 = call i32 @RegWriteA(i32 592, i32 223)
%35 = call i32 @RegWriteA(i32 480, i32 2)
%36 = call i32 @RegWriteA(i32 403, i32 2)
%37 = call i32 @RegWriteA(i32 402, i32 0)
%38 = call i32 @RegWriteA(i32 419, i32 2)
%39 = call i32 @RegWriteA(i32 418, i32 0)
%40 = call i32 @SetPanTiltMode(i32 0)
%41 = call i32 @SetGcf(i32 0)
%42 = call i32 @SetH1cMod(i32 128)
%43 = call i32 @DrvSw(i32 1)
%44 = 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 4)
%5 = tail call i32 @RegWriteA(i32 596, i32 4)
%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 32769)
%24 = tail call i32 @RamAccFixMod(i32 0)
%25 = tail call i32 @RamWrite32A(i32 4128, i32 1058306785)
%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 1065353216)
%29 = tail call i32 @RamWrite32A(i32 4096, i32 1052765510)
%30 = tail call i32 @RamWrite32A(i32 4352, i32 1052765510)
%31 = tail call i32 @ClrGyr(i32 255, i32 2)
%32 = tail call i32 @SetZsp(i32 0)
%33 = tail call i32 @RegWriteA(i32 16, i32 192)
%34 = tail call i32 @RegWriteA(i32 592, i32 223)
%35 = tail call i32 @RegWriteA(i32 480, i32 2)
%36 = tail call i32 @RegWriteA(i32 403, i32 2)
%37 = tail call i32 @RegWriteA(i32 402, i32 0)
%38 = tail call i32 @RegWriteA(i32 419, i32 2)
%39 = tail call i32 @RegWriteA(i32 418, i32 0)
%40 = tail call i32 @SetPanTiltMode(i32 0)
%41 = tail call i32 @SetGcf(i32 0)
%42 = tail call i32 @SetH1cMod(i32 128)
%43 = tail call i32 @DrvSw(i32 1)
%44 = tail call i32 @RegWriteA(i32 257, i32 1)
ret void
}