#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*/ _setvideomode(int);
int /*<<< orphan*/ test_mode(int, char *);
int main() {
  test_mode(17, "VRES2COLOR");
  test_mode(18, "VRES16COLOR");
  test_mode(19, "MRES256COLOR");
  test_mode(-3, "MAXRESMODE");
  test_mode(-2, "MAXCOLORMODE");
  _setvideomode(-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x11,%edi
lea    0xec5(%rip),%rsi
call   1030 <test_mode@plt>
mov    $0x12,%edi
lea    0xebf(%rip),%rsi
call   1030 <test_mode@plt>
mov    $0x13,%edi
lea    0xeba(%rip),%rsi
call   1030 <test_mode@plt>
mov    $0xfffffffd,%edi
lea    0xeb6(%rip),%rsi
call   1030 <test_mode@plt>
mov    $0xfffffffe,%edi
lea    0xeb0(%rip),%rsi
call   1030 <test_mode@plt>
mov    $0xffffffff,%edi
call   1040 <_setvideomode@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x11,%edi
call   1030 <test_mode@plt>
lea    0xed2(%rip),%rsi
mov    $0x12,%edi
call   1030 <test_mode@plt>
lea    0xecd(%rip),%rsi
mov    $0x13,%edi
call   1030 <test_mode@plt>
lea    0xec9(%rip),%rsi
mov    $0xfffffffd,%edi
call   1030 <test_mode@plt>
lea    0xec3(%rip),%rsi
mov    $0xfffffffe,%edi
call   1030 <test_mode@plt>
mov    $0xffffffff,%edi
call   1040 <_setvideomode@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"VRES2COLOR\00"
@.str.1 = [12 x i8] c"VRES16COLOR\00"
@.str.2 = [13 x i8] c"MRES256COLOR\00"
@.str.3 = [11 x i8] c"MAXRESMODE\00"
@.str.4 = [13 x i8] c"MAXCOLORMODE\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test_mode(i32 17, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @test_mode(i32 18, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @test_mode(i32 19, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @test_mode(i32 -3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @test_mode(i32 -2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @_setvideomode(i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"VRES2COLOR\00"
@.str.1 = [12 x i8] c"VRES16COLOR\00"
@.str.2 = [13 x i8] c"MRES256COLOR\00"
@.str.3 = [11 x i8] c"MAXRESMODE\00"
@.str.4 = [13 x i8] c"MAXCOLORMODE\00"
define i32 @main() {
%1 = tail call i32 @test_mode(i32 17, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @test_mode(i32 18, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @test_mode(i32 19, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @test_mode(i32 -3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @test_mode(i32 -2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @_setvideomode(i32 -1)
ret i32 0
}