#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*/ GL_LUMINANCE16;
int /*<<< orphan*/ GL_RGB32F;
int /*<<< orphan*/ True;
int /*<<< orphan*/ glFinish();
int /*<<< orphan*/ glXCreateContext(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ glXGetCurrentDisplay();
int /*<<< orphan*/ glXGetProcAddressARB(char *);
int /*<<< orphan*/ glXQueryExtensionsString(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  glXCreateContext(NULL, NULL, NULL, True);
  glXQueryExtensionsString(NULL, 0);
  glXGetProcAddressARB("");
  glXGetCurrentDisplay();
  glFinish();
  (void)GL_RGB32F;
  (void)GL_LUMINANCE16;
  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    0x2e7b(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1060 <glXCreateContext@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <glXQueryExtensionsString@plt>
lea    0xe70(%rip),%rdi
call   1070 <glXGetProcAddressARB@plt>
mov    $0x0,%al
call   1050 <glXGetCurrentDisplay@plt>
mov    $0x0,%al
call   1040 <glFinish@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e90(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <glXCreateContext@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <glXQueryExtensionsString@plt>
lea    0xe8b(%rip),%rdi
call   1070 <glXGetProcAddressARB@plt>
xor    %eax,%eax
call   1050 <glXGetCurrentDisplay@plt>
xor    %eax,%eax
call   1040 <glFinish@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@True = global i32 0
@.str = [1 x i8] zeroinitializer
@GL_RGB32F = global i32 0
@GL_LUMINANCE16 = global i32 0
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 i32, i32* @True
%7 = call i32 @glXCreateContext(i32* null, i32* null, i32* null, i32 %6)
%8 = call i32 @glXQueryExtensionsString(i32* null, i32 0)
%9 = call i32 @glXGetProcAddressARB(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @glXGetCurrentDisplay()
%11 = call i32 (...) @glFinish()
%12 = load i32, i32* @GL_RGB32F
%13 = load i32, i32* @GL_LUMINANCE16
ret i32 0
}

LLVM IR (-O2):
@True = global i32 0
@.str = [1 x i8] zeroinitializer
@GL_RGB32F = global i32 0
@GL_LUMINANCE16 = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @True
%4 = tail call i32 @glXCreateContext(i32* null, i32* null, i32* null, i32 %3)
%5 = tail call i32 @glXQueryExtensionsString(i32* null, i32 0)
%6 = tail call i32 @glXGetProcAddressARB(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @glXGetCurrentDisplay()
%8 = tail call i32 (...) @glFinish()
ret i32 0
}