#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_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_LINE_STIPPLE;
int /*<<< orphan*/ GL_LINE_STRIP;
int /*<<< orphan*/ drawOneLine(double, double, double, double);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glLineStipple(int, int);
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glVertex2f(double, double);
void display() {
  int i;
  glClear(GL_COLOR_BUFFER_BIT);
  glEnable(GL_LINE_STIPPLE);
  glColor3f(1.0, 0.5, 0.5);
  glLineStipple(1, 0x0101);
  drawOneLine(50.0, 125.0, 150.0, 125.0);
  glLineStipple(1, 0x00FF);
  drawOneLine(150.0, 125.0, 250.0, 125.0);
  glLineStipple(1, 0x1C47);
  drawOneLine(250.0, 125.0, 350.0, 125.0);
  glColor3f(0.5, 0.5, 1.0);
  glLineWidth(5.0);
  glLineStipple(1, 0x0101);
  drawOneLine(50.0, 100.0, 150.0, 100.0);
  glLineStipple(1, 0x00FF);
  drawOneLine(150.0, 100.0, 250.0, 100.0);
  glLineStipple(1, 0x1C47);
  drawOneLine(250.0, 100.0, 350.0, 100.0);
  glLineWidth(1.0);
  glColor3f(0.5, 1.0, 0.5);
  glLineStipple(1, 0x1C47);
  glBegin(GL_LINE_STRIP);
  for (i = 0; i < 7; ++i) {
    glVertex2f(50.0 + (GLfloat)i * 50.0, 75.0);
  }
  glEnd();
  glColor3f(1.0, 1.0, 0.5);
  for (i = 0; i < 6; ++i) {
    drawOneLine(50.0 + (GLfloat)i * 50.0, 50.0, 50.0 + (GLfloat)(i + 1) * 50.0,
                50.0);
  }
  glColor3f(0.5, 1.0, 1.0);
  glLineStipple(5, 0x1C47);
  drawOneLine(50.0, 25.0, 350.0, 25.0);
  glDisable(GL_LINE_STIPPLE);
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
call   1040 <glClear@plt>
mov    0x2e0b(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
movsd  0xe2c(%rip),%xmm0
movsd  0xe1c(%rip),%xmm2
movaps %xmm2,%xmm1
call   1090 <glColor3f@plt>
mov    $0x1,%edi
mov    $0x101,%esi
call   1080 <glLineStipple@plt>
movsd  0xe2d(%rip),%xmm0
movsd  0xe35(%rip),%xmm3
movsd  0xe15(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1080 <glLineStipple@plt>
movsd  0xdf6(%rip),%xmm0
movsd  0xe06(%rip),%xmm3
movsd  0xdce(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
movsd  0xdaf(%rip),%xmm0
movsd  0xdd7(%rip),%xmm3
movsd  0xdaf(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
movsd  0xd7f(%rip),%xmm1
movsd  0xd7f(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glColor3f@plt>
movsd  0xd9f(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    $0x1,%edi
mov    $0x101,%esi
call   1080 <glLineStipple@plt>
movsd  0xd7b(%rip),%xmm0
movsd  0xd5b(%rip),%xmm3
movsd  0xd63(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1080 <glLineStipple@plt>
movsd  0xd44(%rip),%xmm0
movsd  0xd2c(%rip),%xmm3
movsd  0xd1c(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
movsd  0xcfd(%rip),%xmm0
movsd  0xcfd(%rip),%xmm3
movsd  0xcfd(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
movsd  0xcd5(%rip),%xmm0
call   1030 <glLineWidth@plt>
movsd  0xcc0(%rip),%xmm2
movsd  0xcc0(%rip),%xmm1
movaps %xmm2,%xmm0
call   1090 <glColor3f@plt>
mov    $0x1,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
mov    0x2c82(%rip),%rax
mov    (%rax),%edi
call   10d0 <glBegin@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jge    13ae <display+0x1fe>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xca5(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xcb5(%rip),%xmm1
call   10b0 <glVertex2f@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1374 <display+0x1c4>
mov    $0x0,%al
call   1070 <glEnd@plt>
movsd  0xc4b(%rip),%xmm1
movsd  0xc3b(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glColor3f@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
jge    142b <display+0x27b>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xc45(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm2
movsd  0xc2b(%rip),%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm1,%xmm2
movsd  0xc1b(%rip),%xmm3
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13d4 <display+0x224>
movsd  0xbcd(%rip),%xmm0
movsd  0xbcd(%rip),%xmm2
movaps %xmm2,%xmm1
call   1090 <glColor3f@plt>
mov    $0x5,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
movsd  0xbd6(%rip),%xmm0
movsd  0xbe6(%rip),%xmm3
movsd  0xbb6(%rip),%xmm2
movaps %xmm3,%xmm1
call   1050 <drawOneLine@plt>
mov    0x2b5f(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    $0x0,%al
call   10a0 <glFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbx
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
call   1040 <glClear@plt>
mov    0x2e12(%rip),%rbx
mov    (%rbx),%edi
call   1060 <glEnable@plt>
movsd  0xe2b(%rip),%xmm0
movsd  0xe2b(%rip),%xmm1
movaps %xmm1,%xmm2
call   1090 <glColor3f@plt>
mov    $0x1,%edi
mov    $0x101,%esi
call   1080 <glLineStipple@plt>
movsd  0xe14(%rip),%xmm0
movsd  0xe14(%rip),%xmm2
movsd  0xe14(%rip),%xmm1
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1080 <glLineStipple@plt>
movsd  0xdfd(%rip),%xmm2
movsd  0xde5(%rip),%xmm0
movsd  0xde5(%rip),%xmm1
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
movsd  0xdd6(%rip),%xmm2
movsd  0xdc6(%rip),%xmm0
movsd  0xdb6(%rip),%xmm1
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xd8e(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xd7b(%rip),%xmm2
call   1090 <glColor3f@plt>
movsd  0xda6(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    $0x1,%edi
mov    $0x101,%esi
call   1080 <glLineStipple@plt>
movsd  0xd92(%rip),%xmm1
movsd  0xd5a(%rip),%xmm0
movsd  0xd5a(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1080 <glLineStipple@plt>
movsd  0xd3b(%rip),%xmm0
movsd  0xd5b(%rip),%xmm1
movsd  0xd3b(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
mov    $0x1,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
movsd  0xd1c(%rip),%xmm0
movsd  0xd2c(%rip),%xmm1
movsd  0xd14(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xcd4(%rip),%xmm0
call   1030 <glLineWidth@plt>
movsd  0xccf(%rip),%xmm0
movsd  0xcbf(%rip),%xmm1
movaps %xmm0,%xmm2
call   1090 <glColor3f@plt>
mov    $0x1,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
mov    0x2c89(%rip),%rax
mov    (%rax),%edi
call   10d0 <glBegin@plt>
movsd  0xcda(%rip),%xmm1
movsd  0xc9a(%rip),%xmm0
call   10b0 <glVertex2f@plt>
movsd  0xcbd(%rip),%xmm0
movsd  0xcbd(%rip),%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xc80(%rip),%xmm0
movsd  0xca8(%rip),%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xca3(%rip),%xmm0
movsd  0xc93(%rip),%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xc66(%rip),%xmm0
movsd  0xc7e(%rip),%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xc81(%rip),%xmm0
movsd  0xc69(%rip),%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xc44(%rip),%xmm0
movsd  0xc54(%rip),%xmm1
call   10b0 <glVertex2f@plt>
xor    %eax,%eax
call   1070 <glEnd@plt>
movsd  0xbf8(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xbf5(%rip),%xmm2
call   1090 <glColor3f@plt>
movsd  0xbf0(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xc15(%rip),%xmm2
movaps %xmm0,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xc05(%rip),%xmm0
movsd  0xbcd(%rip),%xmm1
movsd  0xbcd(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xbbd(%rip),%xmm0
movsd  0xbad(%rip),%xmm1
movsd  0xbe5(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xbd5(%rip),%xmm0
movsd  0xb8d(%rip),%xmm1
movsd  0xb9d(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xb8d(%rip),%xmm0
movsd  0xb6d(%rip),%xmm1
movsd  0xbad(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xb9d(%rip),%xmm0
movsd  0xb4d(%rip),%xmm1
movsd  0xb65(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
movsd  0xb2d(%rip),%xmm0
movsd  0xb1d(%rip),%xmm1
movaps %xmm1,%xmm2
call   1090 <glColor3f@plt>
mov    $0x5,%edi
mov    $0x1c47,%esi
call   1080 <glLineStipple@plt>
movsd  0xb5e(%rip),%xmm1
movsd  0xb06(%rip),%xmm0
movsd  0xb1e(%rip),%xmm2
movaps %xmm1,%xmm3
call   1050 <drawOneLine@plt>
mov    (%rbx),%edi
call   10c0 <glDisable@plt>
xor    %eax,%eax
pop    %rbx
jmp    10a0 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_LINE_STIPPLE = global i32 0
@GL_LINE_STRIP = global i32 0
define void @display() {
%1 = alloca i32
%2 = load i32, i32* @GL_COLOR_BUFFER_BIT
%3 = call i32 @glClear(i32 %2)
%4 = load i32, i32* @GL_LINE_STIPPLE
%5 = call i32 @glEnable(i32 %4)
%6 = call i32 @glColor3f(double 1.000000e+00, double 5.000000e-01, double 5.000000e-01)
%7 = call i32 @glLineStipple(i32 1, i32 257)
%8 = call i32 @drawOneLine(double 5.000000e+01, double 1.250000e+02, double 1.500000e+02, double 1.250000e+02)
%9 = call i32 @glLineStipple(i32 1, i32 255)
%10 = call i32 @drawOneLine(double 1.500000e+02, double 1.250000e+02, double 2.500000e+02, double 1.250000e+02)
%11 = call i32 @glLineStipple(i32 1, i32 7239)
%12 = call i32 @drawOneLine(double 2.500000e+02, double 1.250000e+02, double 3.500000e+02, double 1.250000e+02)
%13 = call i32 @glColor3f(double 5.000000e-01, double 5.000000e-01, double 1.000000e+00)
%14 = call i32 @glLineWidth(double 5.000000e+00)
%15 = call i32 @glLineStipple(i32 1, i32 257)
%16 = call i32 @drawOneLine(double 5.000000e+01, double 1.000000e+02, double 1.500000e+02, double 1.000000e+02)
%17 = call i32 @glLineStipple(i32 1, i32 255)
%18 = call i32 @drawOneLine(double 1.500000e+02, double 1.000000e+02, double 2.500000e+02, double 1.000000e+02)
%19 = call i32 @glLineStipple(i32 1, i32 7239)
%20 = call i32 @drawOneLine(double 2.500000e+02, double 1.000000e+02, double 3.500000e+02, double 1.000000e+02)
%21 = call i32 @glLineWidth(double 1.000000e+00)
%22 = call i32 @glColor3f(double 5.000000e-01, double 1.000000e+00, double 5.000000e-01)
%23 = call i32 @glLineStipple(i32 1, i32 7239)
%24 = load i32, i32* @GL_LINE_STRIP
%25 = call i32 @glBegin(i32 %24)
store i32 0, i32* %1
br label %26
26: ; preds = %34, %0
%27 = load i32, i32* %1
%28 = icmp slt i32 %27, 7
br i1 %28, label %29, label %37
29: ; preds = %26
%30 = load i32, i32* %1
%31 = sitofp i32 %30 to double
%32 = call double @llvm.fmuladd.f64(double %31, double 5.000000e+01, double 5.000000e+01)
%33 = call i32 @glVertex2f(double %32, double 7.500000e+01)
br label %34
34: ; preds = %29
%35 = load i32, i32* %1
%36 = add nsw i32 %35, 1
store i32 %36, i32* %1
br label %26
37: ; preds = %26
%38 = call i32 (...) @glEnd()
%39 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 5.000000e-01)
store i32 0, i32* %1
br label %40
40: ; preds = %52, %37
%41 = load i32, i32* %1
%42 = icmp slt i32 %41, 6
br i1 %42, label %43, label %55
43: ; preds = %40
%44 = load i32, i32* %1
%45 = sitofp i32 %44 to double
%46 = call double @llvm.fmuladd.f64(double %45, double 5.000000e+01, double 5.000000e+01)
%47 = load i32, i32* %1
%48 = add nsw i32 %47, 1
%49 = sitofp i32 %48 to double
%50 = call double @llvm.fmuladd.f64(double %49, double 5.000000e+01, double 5.000000e+01)
%51 = call i32 @drawOneLine(double %46, double 5.000000e+01, double %50, double 5.000000e+01)
br label %52
52: ; preds = %43
%53 = load i32, i32* %1
%54 = add nsw i32 %53, 1
store i32 %54, i32* %1
br label %40
55: ; preds = %40
%56 = call i32 @glColor3f(double 5.000000e-01, double 1.000000e+00, double 1.000000e+00)
%57 = call i32 @glLineStipple(i32 5, i32 7239)
%58 = call i32 @drawOneLine(double 5.000000e+01, double 2.500000e+01, double 3.500000e+02, double 2.500000e+01)
%59 = load i32, i32* @GL_LINE_STIPPLE
%60 = call i32 @glDisable(i32 %59)
%61 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_LINE_STIPPLE = global i32 0
@GL_LINE_STRIP = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = load i32, i32* @GL_LINE_STIPPLE
%4 = tail call i32 @glEnable(i32 %3)
%5 = tail call i32 @glColor3f(double 1.000000e+00, double 5.000000e-01, double 5.000000e-01)
%6 = tail call i32 @glLineStipple(i32 1, i32 257)
%7 = tail call i32 @drawOneLine(double 5.000000e+01, double 1.250000e+02, double 1.500000e+02, double 1.250000e+02)
%8 = tail call i32 @glLineStipple(i32 1, i32 255)
%9 = tail call i32 @drawOneLine(double 1.500000e+02, double 1.250000e+02, double 2.500000e+02, double 1.250000e+02)
%10 = tail call i32 @glLineStipple(i32 1, i32 7239)
%11 = tail call i32 @drawOneLine(double 2.500000e+02, double 1.250000e+02, double 3.500000e+02, double 1.250000e+02)
%12 = tail call i32 @glColor3f(double 5.000000e-01, double 5.000000e-01, double 1.000000e+00)
%13 = tail call i32 @glLineWidth(double 5.000000e+00)
%14 = tail call i32 @glLineStipple(i32 1, i32 257)
%15 = tail call i32 @drawOneLine(double 5.000000e+01, double 1.000000e+02, double 1.500000e+02, double 1.000000e+02)
%16 = tail call i32 @glLineStipple(i32 1, i32 255)
%17 = tail call i32 @drawOneLine(double 1.500000e+02, double 1.000000e+02, double 2.500000e+02, double 1.000000e+02)
%18 = tail call i32 @glLineStipple(i32 1, i32 7239)
%19 = tail call i32 @drawOneLine(double 2.500000e+02, double 1.000000e+02, double 3.500000e+02, double 1.000000e+02)
%20 = tail call i32 @glLineWidth(double 1.000000e+00)
%21 = tail call i32 @glColor3f(double 5.000000e-01, double 1.000000e+00, double 5.000000e-01)
%22 = tail call i32 @glLineStipple(i32 1, i32 7239)
%23 = load i32, i32* @GL_LINE_STRIP
%24 = tail call i32 @glBegin(i32 %23)
%25 = tail call i32 @glVertex2f(double 5.000000e+01, double 7.500000e+01)
%26 = tail call i32 @glVertex2f(double 1.000000e+02, double 7.500000e+01)
%27 = tail call i32 @glVertex2f(double 1.500000e+02, double 7.500000e+01)
%28 = tail call i32 @glVertex2f(double 2.000000e+02, double 7.500000e+01)
%29 = tail call i32 @glVertex2f(double 2.500000e+02, double 7.500000e+01)
%30 = tail call i32 @glVertex2f(double 3.000000e+02, double 7.500000e+01)
%31 = tail call i32 @glVertex2f(double 3.500000e+02, double 7.500000e+01)
%32 = tail call i32 (...) @glEnd()
%33 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 5.000000e-01)
%34 = tail call i32 @drawOneLine(double 5.000000e+01, double 5.000000e+01, double 1.000000e+02, double 5.000000e+01)
%35 = tail call i32 @drawOneLine(double 1.000000e+02, double 5.000000e+01, double 1.500000e+02, double 5.000000e+01)
%36 = tail call i32 @drawOneLine(double 1.500000e+02, double 5.000000e+01, double 2.000000e+02, double 5.000000e+01)
%37 = tail call i32 @drawOneLine(double 2.000000e+02, double 5.000000e+01, double 2.500000e+02, double 5.000000e+01)
%38 = tail call i32 @drawOneLine(double 2.500000e+02, double 5.000000e+01, double 3.000000e+02, double 5.000000e+01)
%39 = tail call i32 @drawOneLine(double 3.000000e+02, double 5.000000e+01, double 3.500000e+02, double 5.000000e+01)
%40 = tail call i32 @glColor3f(double 5.000000e-01, double 1.000000e+00, double 1.000000e+00)
%41 = tail call i32 @glLineStipple(i32 5, i32 7239)
%42 = tail call i32 @drawOneLine(double 5.000000e+01, double 2.500000e+01, double 3.500000e+02, double 2.500000e+01)
%43 = load i32, i32* @GL_LINE_STIPPLE
%44 = tail call i32 @glDisable(i32 %43)
%45 = tail call i32 (...) @glFlush()
ret void
}