#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*/ RamAccFixMod(int);
int /*<<< orphan*/ RamWriteA(int, int);
int /*<<< orphan*/ RegWriteA(int, int);
void StmvSetClAf(void) {
  RegWriteA(0x01E0, 0x10);
  RegWriteA(0x01E4, 0x00);
  RamAccFixMod(0x01);
  RamWriteA(0x1514, 0x0040);
  RamWriteA(0x1222, 0x6000);
  RamWriteA(0x1223, 0x7000);
  RamWriteA(0x121D, 0x7fff);
  RamWriteA(0x121E, 0x2000);
  RamWriteA(0x121F, 0x0a00);
  RamAccFixMod(0x00);
  RegWriteA(0x01E2, 0x00);
}


x86 assembly (clang, -O0):
<StmvSetClAf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e0,%edi
mov    $0x10,%esi
call   1050 <RegWriteA@plt>
mov    $0x1e4,%edi
xor    %esi,%esi
call   1050 <RegWriteA@plt>
mov    $0x1,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1514,%edi
mov    $0x40,%esi
call   1030 <RamWriteA@plt>
mov    $0x1222,%edi
mov    $0x6000,%esi
call   1030 <RamWriteA@plt>
mov    $0x1223,%edi
mov    $0x7000,%esi
call   1030 <RamWriteA@plt>
mov    $0x121d,%edi
mov    $0x7fff,%esi
call   1030 <RamWriteA@plt>
mov    $0x121e,%edi
mov    $0x2000,%esi
call   1030 <RamWriteA@plt>
mov    $0x121f,%edi
mov    $0xa00,%esi
call   1030 <RamWriteA@plt>
xor    %edi,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1e2,%edi
xor    %esi,%esi
call   1050 <RegWriteA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StmvSetClAf>:
push   %rax
mov    $0x1e0,%edi
mov    $0x10,%esi
call   1050 <RegWriteA@plt>
mov    $0x1e4,%edi
xor    %esi,%esi
call   1050 <RegWriteA@plt>
mov    $0x1,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1514,%edi
mov    $0x40,%esi
call   1030 <RamWriteA@plt>
mov    $0x1222,%edi
mov    $0x6000,%esi
call   1030 <RamWriteA@plt>
mov    $0x1223,%edi
mov    $0x7000,%esi
call   1030 <RamWriteA@plt>
mov    $0x121d,%edi
mov    $0x7fff,%esi
call   1030 <RamWriteA@plt>
mov    $0x121e,%edi
mov    $0x2000,%esi
call   1030 <RamWriteA@plt>
mov    $0x121f,%edi
mov    $0xa00,%esi
call   1030 <RamWriteA@plt>
xor    %edi,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1e2,%edi
xor    %esi,%esi
pop    %rax
jmp    1050 <RegWriteA@plt>

LLVM IR (-O0):
define void @StmvSetClAf() {
%1 = call i32 @RegWriteA(i32 480, i32 16)
%2 = call i32 @RegWriteA(i32 484, i32 0)
%3 = call i32 @RamAccFixMod(i32 1)
%4 = call i32 @RamWriteA(i32 5396, i32 64)
%5 = call i32 @RamWriteA(i32 4642, i32 24576)
%6 = call i32 @RamWriteA(i32 4643, i32 28672)
%7 = call i32 @RamWriteA(i32 4637, i32 32767)
%8 = call i32 @RamWriteA(i32 4638, i32 8192)
%9 = call i32 @RamWriteA(i32 4639, i32 2560)
%10 = call i32 @RamAccFixMod(i32 0)
%11 = call i32 @RegWriteA(i32 482, i32 0)
ret void
}

LLVM IR (-O2):
define void @StmvSetClAf() {
%1 = tail call i32 @RegWriteA(i32 480, i32 16)
%2 = tail call i32 @RegWriteA(i32 484, i32 0)
%3 = tail call i32 @RamAccFixMod(i32 1)
%4 = tail call i32 @RamWriteA(i32 5396, i32 64)
%5 = tail call i32 @RamWriteA(i32 4642, i32 24576)
%6 = tail call i32 @RamWriteA(i32 4643, i32 28672)
%7 = tail call i32 @RamWriteA(i32 4637, i32 32767)
%8 = tail call i32 @RamWriteA(i32 4638, i32 8192)
%9 = tail call i32 @RamWriteA(i32 4639, i32 2560)
%10 = tail call i32 @RamAccFixMod(i32 0)
%11 = tail call i32 @RegWriteA(i32 482, i32 0)
ret void
}