#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 int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glLineStipple(int, int);
int /*<<< orphan*/ glLineWidth(int);
int /*<<< orphan*/ glVertex3dv(int /*<<< orphan*/ *);
void drawLine(GLdouble v0[3], GLdouble v1[3], GLdouble r, GLdouble g,
              GLdouble b) {
  glLineWidth(3);
  glLineStipple(1, 0xE0E0);
  glColor3f(r, g, b);
  glBegin(GL_LINES);
  glVertex3dv(v0);
  glVertex3dv(v1);
  glEnd();
  glLineStipple(0, 0xFFFF);
}


x86 assembly (clang, -O0):
<drawLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    $0x3,%edi
call   1030 <glLineWidth@plt>
mov    $0x1,%edi
mov    $0xe0e0,%esi
call   1050 <glLineStipple@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1070 <glColor3f@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
mov    -0x8(%rbp),%rdi
call   1060 <glVertex3dv@plt>
mov    -0x10(%rbp),%rdi
call   1060 <glVertex3dv@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
xor    %edi,%edi
mov    $0xffff,%esi
call   1050 <glLineStipple@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawLine>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r15d
mov    %ecx,%ebx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r12
mov    $0x3,%edi
call   1030 <glLineWidth@plt>
mov    $0x1,%edi
mov    $0xe0e0,%esi
call   1050 <glLineStipple@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%edx
call   1070 <glColor3f@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
mov    %r12,%rdi
call   1060 <glVertex3dv@plt>
mov    %r14,%rdi
call   1060 <glVertex3dv@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
xor    %edi,%edi
mov    $0xffff,%esi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <glLineStipple@plt>

LLVM IR (-O0):
@GL_LINES = global i32 0
define void @drawLine(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = call i32 @glLineWidth(i32 3)
%12 = call i32 @glLineStipple(i32 1, i32 57568)
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @glColor3f(i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* @GL_LINES
%18 = call i32 @glBegin(i32 %17)
%19 = load i32*, i32** %6
%20 = call i32 @glVertex3dv(i32* %19)
%21 = load i32*, i32** %7
%22 = call i32 @glVertex3dv(i32* %21)
%23 = call i32 (...) @glEnd()
%24 = call i32 @glLineStipple(i32 0, i32 65535)
ret void
}

LLVM IR (-O2):
@GL_LINES = global i32 0
define void @drawLine(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @glLineWidth(i32 3)
%7 = tail call i32 @glLineStipple(i32 1, i32 57568)
%8 = tail call i32 @glColor3f(i32 %2, i32 %3, i32 %4)
%9 = load i32, i32* @GL_LINES
%10 = tail call i32 @glBegin(i32 %9)
%11 = tail call i32 @glVertex3dv(i32* %0)
%12 = tail call i32 @glVertex3dv(i32* %1)
%13 = tail call i32 (...) @glEnd()
%14 = tail call i32 @glLineStipple(i32 0, i32 65535)
ret void
}