#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 GLUT_DOUBLE;
int GLUT_RGB;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glutCreateWindow(char *);
int /*<<< orphan*/ glutInit(int *, char **);
int /*<<< orphan*/ glutInitDisplayMode(int);
int /*<<< orphan*/ glutInitWindowSize(int, int);
int /*<<< orphan*/ glutMainLoop();
int main(int argc, char *argv[]) {
  glutInit(&argc, argv);
  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
  glutInitWindowSize(640, 480);
  glutCreateWindow("Test");
  glClearColor(0.0, 0.0, 0.0, 1.0);
  glutMainLoop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdi
call   1070 <glutInit@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
mov    0x2e55(%rip),%rax
or     (%rax),%edi
call   1030 <glutInitDisplayMode@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
call   1080 <glutInitWindowSize@plt>
lea    0xe58(%rip),%rdi
call   1060 <glutCreateWindow@plt>
xorps  %xmm2,%xmm2
movsd  0xe40(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glClearColor@plt>
mov    $0x0,%al
call   1040 <glutMainLoop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1070 <glutInit@plt>
mov    0x2e62(%rip),%rax
mov    0x2e6b(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glutInitDisplayMode@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
call   1080 <glutInitWindowSize@plt>
lea    0xe6c(%rip),%rdi
call   1060 <glutCreateWindow@plt>
movsd  0xe57(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <glClearColor@plt>
xor    %eax,%eax
call   1040 <glutMainLoop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@GLUT_DOUBLE = global i32 0
@GLUT_RGB = global i32 0
@.str = [5 x i8] c"Test\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = call i32 @glutInit(i32* %4, i8** %6)
%8 = load i32, i32* @GLUT_DOUBLE
%9 = load i32, i32* @GLUT_RGB
%10 = or i32 %8, %9
%11 = call i32 @glutInitDisplayMode(i32 %10)
%12 = call i32 @glutInitWindowSize(i32 640, i32 480)
%13 = call i32 @glutCreateWindow(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%15 = call i32 (...) @glutMainLoop()
ret i32 0
}

LLVM IR (-O2):
@GLUT_DOUBLE = global i32 0
@GLUT_RGB = global i32 0
@.str = [5 x i8] c"Test\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @glutInit(i32* %3, i8** %1)
%5 = load i32, i32* @GLUT_DOUBLE
%6 = load i32, i32* @GLUT_RGB
%7 = or i32 %6, %5
%8 = call i32 @glutInitDisplayMode(i32 %7)
%9 = call i32 @glutInitWindowSize(i32 640, i32 480)
%10 = call i32 @glutCreateWindow(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%12 = call i32 (...) @glutMainLoop()
ret i32 0
}