#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_DEPTH;
int GLUT_DOUBLE;
int GLUT_RGBA;
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_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
  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    0x2e12(%rip),%rax
or     (%rax),%edi
mov    0x2e11(%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    0x2de0(%rip),%rax
mov    (%rax),%edi
call   1060 <glDisable@plt>
mov    0x2df2(%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    0x2e19(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
mov    0x2e16(%rip),%rax
or     (%rax),%edi
call   1030 <glutInitDisplayMode@plt>
mov    (%rbx),%rdi
call   1050 <glutCreateWindow@plt>
xor    %edi,%edi
call   1040 <glDepthMask@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
call   1060 <glDisable@plt>
mov    0x2dfb(%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_DEPTH = global i32 0
@GLUT_DOUBLE = global i32 0
@GLUT_RGBA = 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_DEPTH
%16 = load i32, i32* @GLUT_DOUBLE
%17 = or i32 %15, %16
%18 = load i32, i32* @GLUT_RGBA
%19 = or i32 %17, %18
%20 = call i32 @glutInitDisplayMode(i32 %19)
%21 = load i8**, i8*** %6
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 @glutCreateWindow(i8* %23)
%25 = call i32 @glDepthMask(i32 0)
%26 = load i32, i32* @GL_DEPTH_TEST
%27 = call i32 @glDisable(i32 %26)
%28 = load i32, i32* @GL_BLEND
%29 = call i32 @glDisable(i32 %28)
ret i32 0
}

LLVM IR (-O2):
@GLUT_DEPTH = global i32 0
@GLUT_DOUBLE = global i32 0
@GLUT_RGBA = 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_DEPTH
%10 = load i32, i32* @GLUT_DOUBLE
%11 = or i32 %10, %9
%12 = load i32, i32* @GLUT_RGBA
%13 = or i32 %11, %12
%14 = call i32 @glutInitDisplayMode(i32 %13)
%15 = load i8*, i8** %1
%16 = call i32 @glutCreateWindow(i8* %15)
%17 = call i32 @glDepthMask(i32 0)
%18 = load i32, i32* @GL_DEPTH_TEST
%19 = call i32 @glDisable(i32 %18)
%20 = load i32, i32* @GL_BLEND
%21 = call i32 @glDisable(i32 %20)
ret i32 0
}