#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 readVAC(int);
int /*<<< orphan*/ readVACEPROM();
int /*<<< orphan*/ writeVAC(int, int);
int /*<<< orphan*/ writeVIC(int, int);
void SetupVICVACDefault(void) {
  readVACEPROM();
  writeVIC(0xA7, 0x56);
  writeVIC(0xB3, 0x70);
  writeVIC(0xB7, 0x0D);
  writeVIC(0xC3, 0x10);
  writeVIC(0xC7, 0xFF);
  writeVIC(0xCB, 0x14);
  writeVIC(0xCF, 0xFF);
  writeVAC(0x0, 0xFFFF);
  writeVAC(0x1, 0xFFFE);
  writeVAC(0x2, 0xFF00);
  writeVAC(0x3, 0x3400);
  writeVAC(0x4, 0xF0F1);
  writeVAC(0x5, 0x0001);
  writeVAC(0x6, 0x0002);
  writeVAC(0x7, 0xFDFF);
  writeVAC(0x8, 0x7F00);
  writeVAC(0x9, 0x2C00);
  writeVAC(0xA, 0x4C00);
  writeVAC(0xB, 0x0400);
  writeVAC(0xC, 0xF810);
  writeVAC(0xD, 0xF810);
  writeVAC(0xE, 0xF110);
  writeVAC(0xF, 0xF810);
  writeVAC(0x10, 0xE014);
  writeVAC(0x11, 0xF810);
  writeVAC(0x12, 0xF810);
  writeVAC(0x13, 0xF810);
  writeVAC(0x14, 0xEBFE);
  writeVAC(0x1b, 0x1FFF);
  writeVAC(0x1c, 0x4200);
  writeVAC(0x1d, 0x77C0);
  writeVAC(0x29, readVAC(0x29));
}


x86 assembly (clang, -O0):
<SetupVICVACDefault>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <readVACEPROM@plt>
mov    $0xa7,%edi
mov    $0x56,%esi
call   1060 <writeVIC@plt>
mov    $0xb3,%edi
mov    $0x70,%esi
call   1060 <writeVIC@plt>
mov    $0xb7,%edi
mov    $0xd,%esi
call   1060 <writeVIC@plt>
mov    $0xc3,%edi
mov    $0x10,%esi
call   1060 <writeVIC@plt>
mov    $0xc7,%edi
mov    $0xff,%esi
call   1060 <writeVIC@plt>
mov    $0xcb,%edi
mov    $0x14,%esi
call   1060 <writeVIC@plt>
mov    $0xcf,%edi
mov    $0xff,%esi
call   1060 <writeVIC@plt>
xor    %edi,%edi
mov    $0xffff,%esi
call   1050 <writeVAC@plt>
mov    $0x1,%edi
mov    $0xfffe,%esi
call   1050 <writeVAC@plt>
mov    $0x2,%edi
mov    $0xff00,%esi
call   1050 <writeVAC@plt>
mov    $0x3,%edi
mov    $0x3400,%esi
call   1050 <writeVAC@plt>
mov    $0x4,%edi
mov    $0xf0f1,%esi
call   1050 <writeVAC@plt>
mov    $0x5,%edi
mov    $0x1,%esi
call   1050 <writeVAC@plt>
mov    $0x6,%edi
mov    $0x2,%esi
call   1050 <writeVAC@plt>
mov    $0x7,%edi
mov    $0xfdff,%esi
call   1050 <writeVAC@plt>
mov    $0x8,%edi
mov    $0x7f00,%esi
call   1050 <writeVAC@plt>
mov    $0x9,%edi
mov    $0x2c00,%esi
call   1050 <writeVAC@plt>
mov    $0xa,%edi
mov    $0x4c00,%esi
call   1050 <writeVAC@plt>
mov    $0xb,%edi
mov    $0x400,%esi
call   1050 <writeVAC@plt>
mov    $0xc,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0xd,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0xe,%edi
mov    $0xf110,%esi
call   1050 <writeVAC@plt>
mov    $0xf,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x10,%edi
mov    $0xe014,%esi
call   1050 <writeVAC@plt>
mov    $0x11,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x12,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x13,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x14,%edi
mov    $0xebfe,%esi
call   1050 <writeVAC@plt>
mov    $0x1b,%edi
mov    $0x1fff,%esi
call   1050 <writeVAC@plt>
mov    $0x1c,%edi
mov    $0x4200,%esi
call   1050 <writeVAC@plt>
mov    $0x1d,%edi
mov    $0x77c0,%esi
call   1050 <writeVAC@plt>
mov    $0x29,%edi
call   1040 <readVAC@plt>
mov    %eax,%esi
mov    $0x29,%edi
call   1050 <writeVAC@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetupVICVACDefault>:
push   %rax
xor    %eax,%eax
call   1030 <readVACEPROM@plt>
mov    $0xa7,%edi
mov    $0x56,%esi
call   1060 <writeVIC@plt>
mov    $0xb3,%edi
mov    $0x70,%esi
call   1060 <writeVIC@plt>
mov    $0xb7,%edi
mov    $0xd,%esi
call   1060 <writeVIC@plt>
mov    $0xc3,%edi
mov    $0x10,%esi
call   1060 <writeVIC@plt>
mov    $0xc7,%edi
mov    $0xff,%esi
call   1060 <writeVIC@plt>
mov    $0xcb,%edi
mov    $0x14,%esi
call   1060 <writeVIC@plt>
mov    $0xcf,%edi
mov    $0xff,%esi
call   1060 <writeVIC@plt>
xor    %edi,%edi
mov    $0xffff,%esi
call   1050 <writeVAC@plt>
mov    $0x1,%edi
mov    $0xfffe,%esi
call   1050 <writeVAC@plt>
mov    $0x2,%edi
mov    $0xff00,%esi
call   1050 <writeVAC@plt>
mov    $0x3,%edi
mov    $0x3400,%esi
call   1050 <writeVAC@plt>
mov    $0x4,%edi
mov    $0xf0f1,%esi
call   1050 <writeVAC@plt>
mov    $0x5,%edi
mov    $0x1,%esi
call   1050 <writeVAC@plt>
mov    $0x6,%edi
mov    $0x2,%esi
call   1050 <writeVAC@plt>
mov    $0x7,%edi
mov    $0xfdff,%esi
call   1050 <writeVAC@plt>
mov    $0x8,%edi
mov    $0x7f00,%esi
call   1050 <writeVAC@plt>
mov    $0x9,%edi
mov    $0x2c00,%esi
call   1050 <writeVAC@plt>
mov    $0xa,%edi
mov    $0x4c00,%esi
call   1050 <writeVAC@plt>
mov    $0xb,%edi
mov    $0x400,%esi
call   1050 <writeVAC@plt>
mov    $0xc,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0xd,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0xe,%edi
mov    $0xf110,%esi
call   1050 <writeVAC@plt>
mov    $0xf,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x10,%edi
mov    $0xe014,%esi
call   1050 <writeVAC@plt>
mov    $0x11,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x12,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x13,%edi
mov    $0xf810,%esi
call   1050 <writeVAC@plt>
mov    $0x14,%edi
mov    $0xebfe,%esi
call   1050 <writeVAC@plt>
mov    $0x1b,%edi
mov    $0x1fff,%esi
call   1050 <writeVAC@plt>
mov    $0x1c,%edi
mov    $0x4200,%esi
call   1050 <writeVAC@plt>
mov    $0x1d,%edi
mov    $0x77c0,%esi
call   1050 <writeVAC@plt>
mov    $0x29,%edi
call   1040 <readVAC@plt>
mov    $0x29,%edi
mov    %eax,%esi
pop    %rax
jmp    1050 <writeVAC@plt>

LLVM IR (-O0):
define void @SetupVICVACDefault() {
%1 = call i32 (...) @readVACEPROM()
%2 = call i32 @writeVIC(i32 167, i32 86)
%3 = call i32 @writeVIC(i32 179, i32 112)
%4 = call i32 @writeVIC(i32 183, i32 13)
%5 = call i32 @writeVIC(i32 195, i32 16)
%6 = call i32 @writeVIC(i32 199, i32 255)
%7 = call i32 @writeVIC(i32 203, i32 20)
%8 = call i32 @writeVIC(i32 207, i32 255)
%9 = call i32 @writeVAC(i32 0, i32 65535)
%10 = call i32 @writeVAC(i32 1, i32 65534)
%11 = call i32 @writeVAC(i32 2, i32 65280)
%12 = call i32 @writeVAC(i32 3, i32 13312)
%13 = call i32 @writeVAC(i32 4, i32 61681)
%14 = call i32 @writeVAC(i32 5, i32 1)
%15 = call i32 @writeVAC(i32 6, i32 2)
%16 = call i32 @writeVAC(i32 7, i32 65023)
%17 = call i32 @writeVAC(i32 8, i32 32512)
%18 = call i32 @writeVAC(i32 9, i32 11264)
%19 = call i32 @writeVAC(i32 10, i32 19456)
%20 = call i32 @writeVAC(i32 11, i32 1024)
%21 = call i32 @writeVAC(i32 12, i32 63504)
%22 = call i32 @writeVAC(i32 13, i32 63504)
%23 = call i32 @writeVAC(i32 14, i32 61712)
%24 = call i32 @writeVAC(i32 15, i32 63504)
%25 = call i32 @writeVAC(i32 16, i32 57364)
%26 = call i32 @writeVAC(i32 17, i32 63504)
%27 = call i32 @writeVAC(i32 18, i32 63504)
%28 = call i32 @writeVAC(i32 19, i32 63504)
%29 = call i32 @writeVAC(i32 20, i32 60414)
%30 = call i32 @writeVAC(i32 27, i32 8191)
%31 = call i32 @writeVAC(i32 28, i32 16896)
%32 = call i32 @writeVAC(i32 29, i32 30656)
%33 = call i32 @readVAC(i32 41)
%34 = call i32 @writeVAC(i32 41, i32 %33)
ret void
}

LLVM IR (-O2):
define void @SetupVICVACDefault() {
%1 = tail call i32 (...) @readVACEPROM()
%2 = tail call i32 @writeVIC(i32 167, i32 86)
%3 = tail call i32 @writeVIC(i32 179, i32 112)
%4 = tail call i32 @writeVIC(i32 183, i32 13)
%5 = tail call i32 @writeVIC(i32 195, i32 16)
%6 = tail call i32 @writeVIC(i32 199, i32 255)
%7 = tail call i32 @writeVIC(i32 203, i32 20)
%8 = tail call i32 @writeVIC(i32 207, i32 255)
%9 = tail call i32 @writeVAC(i32 0, i32 65535)
%10 = tail call i32 @writeVAC(i32 1, i32 65534)
%11 = tail call i32 @writeVAC(i32 2, i32 65280)
%12 = tail call i32 @writeVAC(i32 3, i32 13312)
%13 = tail call i32 @writeVAC(i32 4, i32 61681)
%14 = tail call i32 @writeVAC(i32 5, i32 1)
%15 = tail call i32 @writeVAC(i32 6, i32 2)
%16 = tail call i32 @writeVAC(i32 7, i32 65023)
%17 = tail call i32 @writeVAC(i32 8, i32 32512)
%18 = tail call i32 @writeVAC(i32 9, i32 11264)
%19 = tail call i32 @writeVAC(i32 10, i32 19456)
%20 = tail call i32 @writeVAC(i32 11, i32 1024)
%21 = tail call i32 @writeVAC(i32 12, i32 63504)
%22 = tail call i32 @writeVAC(i32 13, i32 63504)
%23 = tail call i32 @writeVAC(i32 14, i32 61712)
%24 = tail call i32 @writeVAC(i32 15, i32 63504)
%25 = tail call i32 @writeVAC(i32 16, i32 57364)
%26 = tail call i32 @writeVAC(i32 17, i32 63504)
%27 = tail call i32 @writeVAC(i32 18, i32 63504)
%28 = tail call i32 @writeVAC(i32 19, i32 63504)
%29 = tail call i32 @writeVAC(i32 20, i32 60414)
%30 = tail call i32 @writeVAC(i32 27, i32 8191)
%31 = tail call i32 @writeVAC(i32 28, i32 16896)
%32 = tail call i32 @writeVAC(i32 29, i32 30656)
%33 = tail call i32 @readVAC(i32 41)
%34 = tail call i32 @writeVAC(i32 41, i32 %33)
ret void
}