#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_RGB;
int /*<<< orphan*/ glutDisplayFunc(void (*)());
int /*<<< orphan*/ glutInitDisplayMode(int);
int /*<<< orphan*/ glutKeyboardFunc(void (*)(unsigned char, int, int));
int /*<<< orphan*/ glutSpecialFunc(void (*)(int, int, int));
void initGlut(void (*cbDisplay)(void),
              void (*cbKeyboard)(unsigned char ucKey, int iX, int iY),
              void (*cbKeyboardSpecial)(int iKey, int iX, int iY)) {
  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
  glutDisplayFunc(cbDisplay);
  glutKeyboardFunc(cbKeyboard);
  glutSpecialFunc(cbKeyboardSpecial);
}


x86 assembly (clang, -O0):
<initGlut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
or     (%rax),%edi
mov    0x2e73(%rip),%rax
or     (%rax),%edi
call   1040 <glutInitDisplayMode@plt>
mov    -0x8(%rbp),%rdi
call   1030 <glutDisplayFunc@plt>
mov    -0x10(%rbp),%rdi
call   1050 <glutKeyboardFunc@plt>
mov    -0x18(%rbp),%rdi
call   1060 <glutSpecialFunc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initGlut>:
push   %r15
push   %r14
push   %rbx
mov    0x2e84(%rip),%rcx
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    0x2e79(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%edi
call   1040 <glutInitDisplayMode@plt>
mov    %rbx,%rdi
call   1030 <glutDisplayFunc@plt>
mov    %r15,%rdi
call   1050 <glutKeyboardFunc@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <glutSpecialFunc@plt>

LLVM IR (-O0):
@GLUT_DOUBLE = global i32 0
@GLUT_RGB = global i32 0
@GLUT_DEPTH = global i32 0
define void @initGlut(void ()* %0, void (i8, i32, i32)* %1, void (i32, i32, i32)* %2) {
%4 = alloca void ()*
%5 = alloca void (i8, i32, i32)*
%6 = alloca void (i32, i32, i32)*
store void ()* %0, void ()** %4
store void (i8, i32, i32)* %1, void (i8, i32, i32)** %5
store void (i32, i32, i32)* %2, void (i32, i32, i32)** %6
%7 = load i32, i32* @GLUT_DOUBLE
%8 = load i32, i32* @GLUT_RGB
%9 = or i32 %7, %8
%10 = load i32, i32* @GLUT_DEPTH
%11 = or i32 %9, %10
%12 = call i32 @glutInitDisplayMode(i32 %11)
%13 = load void ()*, void ()** %4
%14 = bitcast void ()* %13 to void (...)*
%15 = call i32 @glutDisplayFunc(void (...)* %14)
%16 = load void (i8, i32, i32)*, void (i8, i32, i32)** %5
%17 = call i32 @glutKeyboardFunc(void (i8, i32, i32)* %16)
%18 = load void (i32, i32, i32)*, void (i32, i32, i32)** %6
%19 = call i32 @glutSpecialFunc(void (i32, i32, i32)* %18)
ret void
}

LLVM IR (-O2):
@GLUT_DOUBLE = global i32 0
@GLUT_RGB = global i32 0
@GLUT_DEPTH = global i32 0
define void @initGlut(void ()* %0, void (i8, i32, i32)* %1, void (i32, i32, i32)* %2) {
%4 = load i32, i32* @GLUT_DOUBLE
%5 = load i32, i32* @GLUT_RGB
%6 = or i32 %5, %4
%7 = load i32, i32* @GLUT_DEPTH
%8 = or i32 %6, %7
%9 = tail call i32 @glutInitDisplayMode(i32 %8)
%10 = bitcast void ()* %0 to void (...)*
%11 = tail call i32 @glutDisplayFunc(void (...)* %10)
%12 = tail call i32 @glutKeyboardFunc(void (i8, i32, i32)* %1)
%13 = tail call i32 @glutSpecialFunc(void (i32, i32, i32)* %2)
ret void
}