#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 _setvideomode(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x;
  x = _setvideomode(0);
  printf("_TEXTBW40 = %d\n", x);
  x = _setvideomode(1);
  printf("_TEXTC40 = %d\n", x);
  x = _setvideomode(2);
  printf("_TEXTBW80 = %d\n", x);
  x = _setvideomode(3);
  printf("_TEXTC80 = %d\n", x);
  x = _setvideomode(4);
  printf("_MRES4COLOR = %d\n", x);
  x = _setvideomode(5);
  printf("_MRESNOCOLOR = %d\n", x);
  x = _setvideomode(6);
  printf("_HRESBW = %d\n", x);
  x = _setvideomode(7);
  printf("_TEXTMONO = %d\n", x);
  x = _setvideomode(8);
  printf("_HERCMONO = %d\n", x);
  x = _setvideomode(13);
  printf("_MRES16COLOR = %d\n", x);
  x = _setvideomode(14);
  printf("_HRES16COLOR = %d\n", x);
  x = _setvideomode(15);
  printf("_ERESNOCOLOR = %d\n", x);
  x = _setvideomode(16);
  printf("_ERESCOLOR = %d\n", x);
  x = _setvideomode(17);
  printf("_VRES2COLOR = %d\n", x);
  x = _setvideomode(18);
  printf("_VRES16COLOR = %d\n", x);
  x = _setvideomode(19);
  printf("_MRES256COLOR = %d\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    $0x6,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x7,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    $0x8,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
mov    $0xd,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe59(%rip),%rdi
call   1040 <printf@plt>
mov    $0xe,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe47(%rip),%rdi
call   1040 <printf@plt>
mov    $0x10,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x11,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe33(%rip),%rdi
call   1040 <printf@plt>
mov    $0x12,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe29(%rip),%rdi
call   1040 <printf@plt>
mov    $0x13,%edi
call   1030 <_setvideomode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe20(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <_setvideomode@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <_setvideomode@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <_setvideomode@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3,%edi
call   1030 <_setvideomode@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x4,%edi
call   1030 <_setvideomode@plt>
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5,%edi
call   1030 <_setvideomode@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x6,%edi
call   1030 <_setvideomode@plt>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x7,%edi
call   1030 <_setvideomode@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x8,%edi
call   1030 <_setvideomode@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xd,%edi
call   1030 <_setvideomode@plt>
lea    0xe8a(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xe,%edi
call   1030 <_setvideomode@plt>
lea    0xe85(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1030 <_setvideomode@plt>
lea    0xe80(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x10,%edi
call   1030 <_setvideomode@plt>
lea    0xe7b(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x11,%edi
call   1030 <_setvideomode@plt>
lea    0xe74(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x12,%edi
call   1030 <_setvideomode@plt>
lea    0xe6e(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x13,%edi
call   1030 <_setvideomode@plt>
lea    0xe69(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"_TEXTBW40 = %d\0A\00"
@.str.1 = [15 x i8] c"_TEXTC40 = %d\0A\00"
@.str.2 = [16 x i8] c"_TEXTBW80 = %d\0A\00"
@.str.3 = [15 x i8] c"_TEXTC80 = %d\0A\00"
@.str.4 = [18 x i8] c"_MRES4COLOR = %d\0A\00"
@.str.5 = [19 x i8] c"_MRESNOCOLOR = %d\0A\00"
@.str.6 = [14 x i8] c"_HRESBW = %d\0A\00"
@.str.7 = [16 x i8] c"_TEXTMONO = %d\0A\00"
@.str.8 = [16 x i8] c"_HERCMONO = %d\0A\00"
@.str.9 = [19 x i8] c"_MRES16COLOR = %d\0A\00"
@.str.10 = [19 x i8] c"_HRES16COLOR = %d\0A\00"
@.str.11 = [19 x i8] c"_ERESNOCOLOR = %d\0A\00"
@.str.12 = [17 x i8] c"_ERESCOLOR = %d\0A\00"
@.str.13 = [18 x i8] c"_VRES2COLOR = %d\0A\00"
@.str.14 = [19 x i8] c"_VRES16COLOR = %d\0A\00"
@.str.15 = [20 x i8] c"_MRES256COLOR = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @_setvideomode(i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @_setvideomode(i32 1)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @_setvideomode(i32 2)
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = call i32 @_setvideomode(i32 3)
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = call i32 @_setvideomode(i32 4)
store i32 %14, i32* %1
%15 = load i32, i32* %1
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = call i32 @_setvideomode(i32 5)
store i32 %17, i32* %1
%18 = load i32, i32* %1
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %18)
%20 = call i32 @_setvideomode(i32 6)
store i32 %20, i32* %1
%21 = load i32, i32* %1
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %21)
%23 = call i32 @_setvideomode(i32 7)
store i32 %23, i32* %1
%24 = load i32, i32* %1
%25 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %24)
%26 = call i32 @_setvideomode(i32 8)
store i32 %26, i32* %1
%27 = load i32, i32* %1
%28 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %27)
%29 = call i32 @_setvideomode(i32 13)
store i32 %29, i32* %1
%30 = load i32, i32* %1
%31 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %30)
%32 = call i32 @_setvideomode(i32 14)
store i32 %32, i32* %1
%33 = load i32, i32* %1
%34 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %33)
%35 = call i32 @_setvideomode(i32 15)
store i32 %35, i32* %1
%36 = load i32, i32* %1
%37 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %36)
%38 = call i32 @_setvideomode(i32 16)
store i32 %38, i32* %1
%39 = load i32, i32* %1
%40 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %39)
%41 = call i32 @_setvideomode(i32 17)
store i32 %41, i32* %1
%42 = load i32, i32* %1
%43 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %42)
%44 = call i32 @_setvideomode(i32 18)
store i32 %44, i32* %1
%45 = load i32, i32* %1
%46 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 %45)
%47 = call i32 @_setvideomode(i32 19)
store i32 %47, i32* %1
%48 = load i32, i32* %1
%49 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %48)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"_TEXTBW40 = %d\0A\00"
@.str.1 = [15 x i8] c"_TEXTC40 = %d\0A\00"
@.str.2 = [16 x i8] c"_TEXTBW80 = %d\0A\00"
@.str.3 = [15 x i8] c"_TEXTC80 = %d\0A\00"
@.str.4 = [18 x i8] c"_MRES4COLOR = %d\0A\00"
@.str.5 = [19 x i8] c"_MRESNOCOLOR = %d\0A\00"
@.str.6 = [14 x i8] c"_HRESBW = %d\0A\00"
@.str.7 = [16 x i8] c"_TEXTMONO = %d\0A\00"
@.str.8 = [16 x i8] c"_HERCMONO = %d\0A\00"
@.str.9 = [19 x i8] c"_MRES16COLOR = %d\0A\00"
@.str.10 = [19 x i8] c"_HRES16COLOR = %d\0A\00"
@.str.11 = [19 x i8] c"_ERESNOCOLOR = %d\0A\00"
@.str.12 = [17 x i8] c"_ERESCOLOR = %d\0A\00"
@.str.13 = [18 x i8] c"_VRES2COLOR = %d\0A\00"
@.str.14 = [19 x i8] c"_VRES16COLOR = %d\0A\00"
@.str.15 = [20 x i8] c"_MRES256COLOR = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @_setvideomode(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @_setvideomode(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @_setvideomode(i32 2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @_setvideomode(i32 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 @_setvideomode(i32 4)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 @_setvideomode(i32 5)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 @_setvideomode(i32 6)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 @_setvideomode(i32 7)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = tail call i32 @_setvideomode(i32 8)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = tail call i32 @_setvideomode(i32 13)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = tail call i32 @_setvideomode(i32 14)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = tail call i32 @_setvideomode(i32 15)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %23)
%25 = tail call i32 @_setvideomode(i32 16)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%27 = tail call i32 @_setvideomode(i32 17)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %27)
%29 = tail call i32 @_setvideomode(i32 18)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 %29)
%31 = tail call i32 @_setvideomode(i32 19)
%32 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %31)
ret i32 0
}