#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*/ glutCreateWindow(int *);
int /*<<< orphan*/ glutDisplayFunc(int);
int /*<<< orphan*/ glutFullScreen();
int /*<<< orphan*/ glutIdleFunc();
int /*<<< orphan*/ glutInit(int *, char **);
int /*<<< orphan*/ glutInitDisplayMode(int);
int /*<<< orphan*/ glutKeyboardFunc(int);
int /*<<< orphan*/ glutMainLoop();
int /*<<< orphan*/ glutReshapeFunc(int);
int /*<<< orphan*/ glutSpecialFunc(int);
int /*<<< orphan*/ proc2();
int main(int argc, char *argv[], char *envp[]) {
  int *local0;
  glutInit(&argc, argv);
  glutInitDisplayMode(18);
  local0 = *argv;
  glutCreateWindow(local0);
  proc2();
  glutDisplayFunc(0x804d640);
  glutKeyboardFunc(0x804d884);
  glutSpecialFunc(0x804db14);
  glutReshapeFunc(0x804d758);
  glutIdleFunc();
  glutFullScreen();
  glutMainLoop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdi
call   10c0 <glutInit@plt>
mov    $0x12,%edi
call   1040 <glutInitDisplayMode@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   10a0 <glutCreateWindow@plt>
mov    $0x0,%al
call   1060 <proc2@plt>
mov    $0x804d640,%edi
call   1030 <glutDisplayFunc@plt>
mov    $0x804d884,%edi
call   10b0 <glutKeyboardFunc@plt>
mov    $0x804db14,%edi
call   10d0 <glutSpecialFunc@plt>
mov    $0x804d758,%edi
call   1070 <glutReshapeFunc@plt>
mov    $0x0,%al
call   1080 <glutIdleFunc@plt>
mov    $0x0,%al
call   1090 <glutFullScreen@plt>
mov    $0x0,%al
call   1050 <glutMainLoop@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   10c0 <glutInit@plt>
mov    $0x12,%edi
call   1040 <glutInitDisplayMode@plt>
mov    (%rbx),%rdi
call   10a0 <glutCreateWindow@plt>
xor    %eax,%eax
call   1060 <proc2@plt>
mov    $0x804d640,%edi
call   1030 <glutDisplayFunc@plt>
mov    $0x804d884,%edi
call   10b0 <glutKeyboardFunc@plt>
mov    $0x804db14,%edi
call   10d0 <glutSpecialFunc@plt>
mov    $0x804d758,%edi
call   1070 <glutReshapeFunc@plt>
xor    %eax,%eax
call   1080 <glutIdleFunc@plt>
xor    %eax,%eax
call   1090 <glutFullScreen@plt>
xor    %eax,%eax
call   1050 <glutMainLoop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32*
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = load i8**, i8*** %6
%10 = call i32 @glutInit(i32* %5, i8** %9)
%11 = call i32 @glutInitDisplayMode(i32 18)
%12 = load i8**, i8*** %6
%13 = load i8*, i8** %12
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %8
%15 = load i32*, i32** %8
%16 = call i32 @glutCreateWindow(i32* %15)
%17 = call i32 (...) @proc2()
%18 = call i32 @glutDisplayFunc(i32 134534720)
%19 = call i32 @glutKeyboardFunc(i32 134535300)
%20 = call i32 @glutSpecialFunc(i32 134535956)
%21 = call i32 @glutReshapeFunc(i32 134535000)
%22 = call i32 (...) @glutIdleFunc()
%23 = call i32 (...) @glutFullScreen()
%24 = call i32 (...) @glutMainLoop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1, i8** nocapture readnone %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = call i32 @glutInit(i32* %4, i8** %1)
%6 = call i32 @glutInitDisplayMode(i32 18)
%7 = bitcast i8** %1 to i32**
%8 = load i32*, i32** %7
%9 = call i32 @glutCreateWindow(i32* %8)
%10 = call i32 (...) @proc2()
%11 = call i32 @glutDisplayFunc(i32 134534720)
%12 = call i32 @glutKeyboardFunc(i32 134535300)
%13 = call i32 @glutSpecialFunc(i32 134535956)
%14 = call i32 @glutReshapeFunc(i32 134535000)
%15 = call i32 (...) @glutIdleFunc()
%16 = call i32 (...) @glutFullScreen()
%17 = call i32 (...) @glutMainLoop()
ret i32 0
}