#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*/ AccWit_lc898122(int);
int /*<<< orphan*/ GyOutSignal_lc898122();
int /*<<< orphan*/ RegReadA_lc898122(int, unsigned char *);
int /*<<< orphan*/ RegWriteA_lc898122(int, int);
void IniDgy_lc898122(void) {
  unsigned char UcGrini;
  RegWriteA_lc898122(0x028F, 0x01);
  RegWriteA_lc898122(0x0280, 0x01);
  RegWriteA_lc898122(0x0281, 0x80);
  RegReadA_lc898122(0x0281, &UcGrini);
  RegWriteA_lc898122(0x0281, (UcGrini | 0x04));
  RegWriteA_lc898122(0x0283, 0x6A);
  RegWriteA_lc898122(0x028A, 0x10);
  RegWriteA_lc898122(0x0282, 0x10);
  AccWit_lc898122(0x10);
  RegWriteA_lc898122(0x0283, 0x1B);
  RegWriteA_lc898122(0x028A, (3 << 3));
  RegWriteA_lc898122(0x0282, 0x10);
  AccWit_lc898122(0x10);
  RegReadA_lc898122(0x0281, &UcGrini);
  RegWriteA_lc898122(0x0281, (UcGrini & ~0x04));
  RegWriteA_lc898122(0x028B, 0x7C);
  GyOutSignal_lc898122();
}


x86 assembly (clang, -O0):
<IniDgy_lc898122>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x28f,%edi
mov    $0x1,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x280,%edi
mov    $0x1,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x281,%edi
mov    $0x80,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x281,%edi
lea    -0x1(%rbp),%rsi
call   1060 <RegReadA_lc898122@plt>
movzbl -0x1(%rbp),%esi
or     $0x4,%esi
mov    $0x281,%edi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x283,%edi
mov    $0x6a,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x28a,%edi
mov    $0x10,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x282,%edi
mov    $0x10,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x10,%edi
call   1030 <AccWit_lc898122@plt>
mov    $0x283,%edi
mov    $0x1b,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x28a,%edi
mov    $0x18,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x282,%edi
mov    $0x10,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x10,%edi
call   1030 <AccWit_lc898122@plt>
mov    $0x281,%edi
lea    -0x1(%rbp),%rsi
call   1060 <RegReadA_lc898122@plt>
movzbl -0x1(%rbp),%esi
and    $0xfffffffb,%esi
mov    $0x281,%edi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x28b,%edi
mov    $0x7c,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x0,%al
call   1040 <GyOutSignal_lc898122@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniDgy_lc898122>:
push   %rbx
sub    $0x10,%rsp
mov    $0x28f,%edi
mov    $0x1,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x280,%edi
mov    $0x1,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x281,%edi
mov    $0x80,%esi
call   1050 <RegWriteA_lc898122@plt>
lea    0xf(%rsp),%rbx
mov    $0x281,%edi
mov    %rbx,%rsi
call   1060 <RegReadA_lc898122@plt>
movzbl 0xf(%rsp),%esi
or     $0x4,%esi
mov    $0x281,%edi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x283,%edi
mov    $0x6a,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x28a,%edi
mov    $0x10,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x282,%edi
mov    $0x10,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x10,%edi
call   1030 <AccWit_lc898122@plt>
mov    $0x283,%edi
mov    $0x1b,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x28a,%edi
mov    $0x18,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x282,%edi
mov    $0x10,%esi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x10,%edi
call   1030 <AccWit_lc898122@plt>
mov    $0x281,%edi
mov    %rbx,%rsi
call   1060 <RegReadA_lc898122@plt>
movzbl 0xf(%rsp),%esi
and    $0xfffffffb,%esi
mov    $0x281,%edi
call   1050 <RegWriteA_lc898122@plt>
mov    $0x28b,%edi
mov    $0x7c,%esi
call   1050 <RegWriteA_lc898122@plt>
xor    %eax,%eax
call   1040 <GyOutSignal_lc898122@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @IniDgy_lc898122() {
%1 = alloca i8
%2 = call i32 @RegWriteA_lc898122(i32 655, i32 1)
%3 = call i32 @RegWriteA_lc898122(i32 640, i32 1)
%4 = call i32 @RegWriteA_lc898122(i32 641, i32 128)
%5 = call i32 @RegReadA_lc898122(i32 641, i8* %1)
%6 = load i8, i8* %1
%7 = zext i8 %6 to i32
%8 = or i32 %7, 4
%9 = call i32 @RegWriteA_lc898122(i32 641, i32 %8)
%10 = call i32 @RegWriteA_lc898122(i32 643, i32 106)
%11 = call i32 @RegWriteA_lc898122(i32 650, i32 16)
%12 = call i32 @RegWriteA_lc898122(i32 642, i32 16)
%13 = call i32 @AccWit_lc898122(i32 16)
%14 = call i32 @RegWriteA_lc898122(i32 643, i32 27)
%15 = call i32 @RegWriteA_lc898122(i32 650, i32 24)
%16 = call i32 @RegWriteA_lc898122(i32 642, i32 16)
%17 = call i32 @AccWit_lc898122(i32 16)
%18 = call i32 @RegReadA_lc898122(i32 641, i8* %1)
%19 = load i8, i8* %1
%20 = zext i8 %19 to i32
%21 = and i32 %20, -5
%22 = call i32 @RegWriteA_lc898122(i32 641, i32 %21)
%23 = call i32 @RegWriteA_lc898122(i32 651, i32 124)
%24 = call i32 (...) @GyOutSignal_lc898122()
ret void
}

LLVM IR (-O2):
define void @IniDgy_lc898122() {
%1 = alloca i8
%2 = tail call i32 @RegWriteA_lc898122(i32 655, i32 1)
%3 = tail call i32 @RegWriteA_lc898122(i32 640, i32 1)
%4 = tail call i32 @RegWriteA_lc898122(i32 641, i32 128)
%5 = call i32 @RegReadA_lc898122(i32 641, i8* %1)
%6 = load i8, i8* %1
%7 = or i8 %6, 4
%8 = zext i8 %7 to i32
%9 = call i32 @RegWriteA_lc898122(i32 641, i32 %8)
%10 = call i32 @RegWriteA_lc898122(i32 643, i32 106)
%11 = call i32 @RegWriteA_lc898122(i32 650, i32 16)
%12 = call i32 @RegWriteA_lc898122(i32 642, i32 16)
%13 = call i32 @AccWit_lc898122(i32 16)
%14 = call i32 @RegWriteA_lc898122(i32 643, i32 27)
%15 = call i32 @RegWriteA_lc898122(i32 650, i32 24)
%16 = call i32 @RegWriteA_lc898122(i32 642, i32 16)
%17 = call i32 @AccWit_lc898122(i32 16)
%18 = call i32 @RegReadA_lc898122(i32 641, i8* %1)
%19 = load i8, i8* %1
%20 = and i8 %19, -5
%21 = zext i8 %20 to i32
%22 = call i32 @RegWriteA_lc898122(i32 641, i32 %21)
%23 = call i32 @RegWriteA_lc898122(i32 651, i32 124)
%24 = call i32 (...) @GyOutSignal_lc898122()
ret void
}