#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_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3f(double, double, double);
void drawAxis(void) {
  glColor3f(0.5, 0.5, 0.5);
  glBegin(GL_LINES);
  glColor3f(0.5, 0.0, 0.0);
  glVertex3f(-50.0, 0.0, 0.0);
  glVertex3f(50.0, 0.0, 0.0);
  glColor3f(0.0, 0.5, 0.0);
  glVertex3f(0.0, 50.0, 0.0);
  glVertex3f(0.0, -50.0, 0.0);
  glColor3f(0.0, 0.0, 0.5);
  glVertex3f(0.0, 0.0, -50.0);
  glVertex3f(0.0, 0.0, 50.0);
  glEnd();
  return;
}


x86 assembly (clang, -O0):
<drawAxis>:
push   %rbp
mov    %rsp,%rbp
movsd  0xec4(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
movsd  0xea3(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
movsd  0xe88(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xe6d(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe67(%rip),%xmm1
movaps %xmm2,%xmm0
call   1050 <glColor3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe44(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe39(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xe2e(%rip),%xmm2
movaps %xmm1,%xmm0
call   1050 <glColor3f@plt>
xorps  %xmm1,%xmm1
movsd  0xe13(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xdf8(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawAxis>:
push   %rax
movsd  0xeb7(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glColor3f@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xe90(%rip),%xmm0
call   1050 <glColor3f@plt>
movsd  0xe8b(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe80(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xe57(%rip),%xmm1
call   1050 <glColor3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xe54(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xe39(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe1e(%rip),%xmm2
call   1050 <glColor3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe13(%rip),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe08(%rip),%xmm2
call   1030 <glVertex3f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_LINES = global i32 0
define void @drawAxis() {
%1 = call i32 @glColor3f(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%2 = load i32, i32* @GL_LINES
%3 = call i32 @glBegin(i32 %2)
%4 = call i32 @glColor3f(double 5.000000e-01, double 0.000000e+00, double 0.000000e+00)
%5 = call i32 @glVertex3f(double -5.000000e+01, double 0.000000e+00, double 0.000000e+00)
%6 = call i32 @glVertex3f(double 5.000000e+01, double 0.000000e+00, double 0.000000e+00)
%7 = call i32 @glColor3f(double 0.000000e+00, double 5.000000e-01, double 0.000000e+00)
%8 = call i32 @glVertex3f(double 0.000000e+00, double 5.000000e+01, double 0.000000e+00)
%9 = call i32 @glVertex3f(double 0.000000e+00, double -5.000000e+01, double 0.000000e+00)
%10 = call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 5.000000e-01)
%11 = call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double -5.000000e+01)
%12 = call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 5.000000e+01)
%13 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_LINES = global i32 0
define void @drawAxis() {
%1 = tail call i32 @glColor3f(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%2 = load i32, i32* @GL_LINES
%3 = tail call i32 @glBegin(i32 %2)
%4 = tail call i32 @glColor3f(double 5.000000e-01, double 0.000000e+00, double 0.000000e+00)
%5 = tail call i32 @glVertex3f(double -5.000000e+01, double 0.000000e+00, double 0.000000e+00)
%6 = tail call i32 @glVertex3f(double 5.000000e+01, double 0.000000e+00, double 0.000000e+00)
%7 = tail call i32 @glColor3f(double 0.000000e+00, double 5.000000e-01, double 0.000000e+00)
%8 = tail call i32 @glVertex3f(double 0.000000e+00, double 5.000000e+01, double 0.000000e+00)
%9 = tail call i32 @glVertex3f(double 0.000000e+00, double -5.000000e+01, double 0.000000e+00)
%10 = tail call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 5.000000e-01)
%11 = tail call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double -5.000000e+01)
%12 = tail call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 5.000000e+01)
%13 = tail call i32 (...) @glEnd()
ret void
}