#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*/ GL_BLEND;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ glDepthMask(int /*<<< orphan*/);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glutCreateWindow(char *);
int /*<<< orphan*/ glutInit(int *, char **);
int /*<<< orphan*/ glutInitDisplayMode(int);
int /*<<< orphan*/ glutInitWindowPosition(int /*<<< orphan*/,
                                          int /*<<< orphan*/);
int /*<<< orphan*/ glutInitWindowSize(int, int);
int init(int argc, char **argv, int w, int h) {
  glutInit(&argc, argv);
  glutInitWindowPosition(0, 0);
  glutInitWindowSize(w, h);
  glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
  glutCreateWindow(argv[0]);
  glDepthMask(0);
  glDisable(GL_DEPTH_TEST);
  glDisable(GL_BLEND);
  return 0;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x4(%rbp),%rdi
call   1080 <glutInit@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1070 <glutInitWindowPosition@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1090 <glutInitWindowSize@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
mov    0x2e1a(%rip),%rax
or     (%rax),%edi
call   1030 <glutInitDisplayMode@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <glutCreateWindow@plt>
xor    %edi,%edi
call   1040 <glDepthMask@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
call   1060 <glDisable@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
call   1060 <glDisable@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1080 <glutInit@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1070 <glutInitWindowPosition@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1090 <glutInitWindowSize@plt>
mov    0x2e40(%rip),%rax
mov    0x2e21(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glutInitDisplayMode@plt>
mov    (%rbx),%rdi
call   1050 <glutCreateWindow@plt>
xor    %edi,%edi
call   1040 <glDepthMask@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
call   1060 <glDisable@plt>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
call   1060 <glDisable@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@GLUT_RGB = global i32 0
@GLUT_DOUBLE = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_BLEND = global i32 0
define i32 @init(i32 %0, i8** %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8**, i8*** %6
%10 = call i32 @glutInit(i32* %5, i8** %9)
%11 = call i32 @glutInitWindowPosition(i32 0, i32 0)
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @glutInitWindowSize(i32 %12, i32 %13)
%15 = load i32, i32* @GLUT_RGB
%16 = load i32, i32* @GLUT_DOUBLE
%17 = or i32 %15, %16
%18 = call i32 @glutInitDisplayMode(i32 %17)
%19 = load i8**, i8*** %6
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 @glutCreateWindow(i8* %21)
%23 = call i32 @glDepthMask(i32 0)
%24 = load i32, i32* @GL_DEPTH_TEST
%25 = call i32 @glDisable(i32 %24)
%26 = load i32, i32* @GL_BLEND
%27 = call i32 @glDisable(i32 %26)
ret i32 0
}

LLVM IR (-O2):
@GLUT_RGB = global i32 0
@GLUT_DOUBLE = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_BLEND = global i32 0
define i32 @init(i32 %0, i8** %1, i32 %2, i32 %3) {
%5 = alloca i32
store i32 %0, i32* %5
%6 = call i32 @glutInit(i32* %5, i8** %1)
%7 = call i32 @glutInitWindowPosition(i32 0, i32 0)
%8 = call i32 @glutInitWindowSize(i32 %2, i32 %3)
%9 = load i32, i32* @GLUT_RGB
%10 = load i32, i32* @GLUT_DOUBLE
%11 = or i32 %10, %9
%12 = call i32 @glutInitDisplayMode(i32 %11)
%13 = load i8*, i8** %1
%14 = call i32 @glutCreateWindow(i8* %13)
%15 = call i32 @glDepthMask(i32 0)
%16 = load i32, i32* @GL_DEPTH_TEST
%17 = call i32 @glDisable(i32 %16)
%18 = load i32, i32* @GL_BLEND
%19 = call i32 @glDisable(i32 %18)
ret i32 0
}