#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 */
typedef double GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_BLEND;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DONT_CARE;
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_LINE_SMOOTH;
int /*<<< orphan*/ GL_LINE_SMOOTH_HINT;
int /*<<< orphan*/ GL_LINE_WIDTH_GRANULARITY;
int /*<<< orphan*/ GL_LINE_WIDTH_RANGE;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glGetFloatv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glHint(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double, ...);
void myinit(void) {
  GLfloat values[2];
  glGetFloatv(GL_LINE_WIDTH_GRANULARITY, values);
  printf("GL_LINE_WIDTH_GRANULARITY value is %3.1f\n", values[0]);
  glGetFloatv(GL_LINE_WIDTH_RANGE, values);
  printf("GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\n", values[0], values[1]);
  glEnable(GL_LINE_SMOOTH);
  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
  glLineWidth(1.5);
  glShadeModel(GL_FLAT);
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<myinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   10a0 <glGetFloatv@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xe52(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   10a0 <glGetFloatv@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
lea    0xe52(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
mov    0x2dcd(%rip),%rax
mov    (%rax),%esi
call   1040 <glBlendFunc@plt>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
call   1090 <glHint@plt>
movsd  0xdc7(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
call   10b0 <glShadeModel@plt>
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1080 <glClearColor@plt>
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myinit>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   10a0 <glGetFloatv@plt>
movsd  (%rsp),%xmm0
lea    0xe53(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   10a0 <glGetFloatv@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xe53(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2dcd(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
mov    0x2dce(%rip),%rax
mov    (%rax),%esi
call   1040 <glBlendFunc@plt>
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
mov    0x2dc7(%rip),%rax
mov    (%rax),%esi
call   1090 <glHint@plt>
movsd  0xdc8(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    0x2d7c(%rip),%rax
mov    (%rax),%edi
call   10b0 <glShadeModel@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1080 <glClearColor@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@GL_LINE_WIDTH_GRANULARITY = global i32 0
@.str = [42 x i8] c"GL_LINE_WIDTH_GRANULARITY value is %3.1f\0A\00"
@GL_LINE_WIDTH_RANGE = global i32 0
@.str.1 = [44 x i8] c"GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\0A\00"
@GL_LINE_SMOOTH = global i32 0
@GL_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_LINE_SMOOTH_HINT = global i32 0
@GL_DONT_CARE = global i32 0
@GL_FLAT = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @myinit() {
%1 = alloca [2 x double]
%2 = load i32, i32* @GL_LINE_WIDTH_GRANULARITY
%3 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%4 = call i32 @glGetFloatv(i32 %2, double* %3)
%5 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%6 = load double, double* %5
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load i32, i32* @GL_LINE_WIDTH_RANGE
%9 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%10 = call i32 @glGetFloatv(i32 %8, double* %9)
%11 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%12 = load double, double* %11
%13 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%14 = load double, double* %13
%15 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %12, double %14)
%16 = load i32, i32* @GL_LINE_SMOOTH
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_BLEND
%19 = call i32 @glEnable(i32 %18)
%20 = load i32, i32* @GL_SRC_ALPHA
%21 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%22 = call i32 @glBlendFunc(i32 %20, i32 %21)
%23 = load i32, i32* @GL_LINE_SMOOTH_HINT
%24 = load i32, i32* @GL_DONT_CARE
%25 = call i32 @glHint(i32 %23, i32 %24)
%26 = call i32 @glLineWidth(double 1.500000e+00)
%27 = load i32, i32* @GL_FLAT
%28 = call i32 @glShadeModel(i32 %27)
%29 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%30 = load i32, i32* @GL_LESS
%31 = call i32 @glDepthFunc(i32 %30)
%32 = load i32, i32* @GL_DEPTH_TEST
%33 = call i32 @glEnable(i32 %32)
ret void
}

LLVM IR (-O2):
@GL_LINE_WIDTH_GRANULARITY = global i32 0
@.str = [42 x i8] c"GL_LINE_WIDTH_GRANULARITY value is %3.1f\0A\00"
@GL_LINE_WIDTH_RANGE = global i32 0
@.str.1 = [44 x i8] c"GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\0A\00"
@GL_LINE_SMOOTH = global i32 0
@GL_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_LINE_SMOOTH_HINT = global i32 0
@GL_DONT_CARE = global i32 0
@GL_FLAT = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @myinit() {
%1 = alloca [2 x double]
%2 = bitcast [2 x double]* %1 to i8*
%3 = load i32, i32* @GL_LINE_WIDTH_GRANULARITY
%4 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%5 = call i32 @glGetFloatv(i32 %3, double* %4)
%6 = load double, double* %4
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load i32, i32* @GL_LINE_WIDTH_RANGE
%9 = call i32 @glGetFloatv(i32 %8, double* %4)
%10 = load double, double* %4
%11 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%12 = load double, double* %11
%13 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), double %10, double %12)
%14 = load i32, i32* @GL_LINE_SMOOTH
%15 = call i32 @glEnable(i32 %14)
%16 = load i32, i32* @GL_BLEND
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_SRC_ALPHA
%19 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%20 = call i32 @glBlendFunc(i32 %18, i32 %19)
%21 = load i32, i32* @GL_LINE_SMOOTH_HINT
%22 = load i32, i32* @GL_DONT_CARE
%23 = call i32 @glHint(i32 %21, i32 %22)
%24 = call i32 @glLineWidth(double 1.500000e+00)
%25 = load i32, i32* @GL_FLAT
%26 = call i32 @glShadeModel(i32 %25)
%27 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%28 = load i32, i32* @GL_LESS
%29 = call i32 @glDepthFunc(i32 %28)
%30 = load i32, i32* @GL_DEPTH_TEST
%31 = call i32 @glEnable(i32 %30)
ret void
}