#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_LINE_STRIP;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glEvalCoord1d(double);
void DrawMapEval1(float du) {
  float u;
  glColor3f(1.0, 0.0, 0.0);
  glBegin(GL_LINE_STRIP);
  for (u = 0.0; u < 1.0; u += du) {
    glEvalCoord1d(u);
  }
  glEvalCoord1d(1.0);
  glEnd();
}


x86 assembly (clang, -O0):
<DrawMapEval1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movsd  0xeab(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1040 <glColor3f@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe79(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11b3 <DrawMapEval1+0x73>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <glEvalCoord1d@plt>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1176 <DrawMapEval1+0x36>
movsd  0xe45(%rip),%xmm0
call   1050 <glEvalCoord1d@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawMapEval1>:
push   %rax
movss  %xmm0,0x4(%rsp)
movsd  0xeb1(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1040 <glColor3f@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
movss  %xmm0,(%rsp)
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <glEvalCoord1d@plt>
movss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
movss  0xe72(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     1170 <DrawMapEval1+0x30>
movsd  0xe5d(%rip),%xmm0
call   1050 <glEvalCoord1d@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_LINE_STRIP = global i32 0
define void @DrawMapEval1(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%5 = load i32, i32* @GL_LINE_STRIP
%6 = call i32 @glBegin(i32 %5)
store float 0.000000e+00, float* %3
br label %7
7: ; preds = %15, %1
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fcmp olt double %9, 1.000000e+00
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call i32 @glEvalCoord1d(double %13)
br label %15
15: ; preds = %11
%16 = load float, float* %2
%17 = load float, float* %3
%18 = fadd float %17, %16
store float %18, float* %3
br label %7
19: ; preds = %7
%20 = call i32 @glEvalCoord1d(double 1.000000e+00)
%21 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_LINE_STRIP = global i32 0
define void @DrawMapEval1(float %0) {
%2 = tail call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = load i32, i32* @GL_LINE_STRIP
%4 = tail call i32 @glBegin(i32 %3)
br label %5
5: ; preds = %1, %5
%6 = phi float [ 0.000000e+00, %1 ], [ %9, %5 ]
%7 = fpext float %6 to double
%8 = tail call i32 @glEvalCoord1d(double %7)
%9 = fadd float %6, %0
%10 = fcmp olt float %9, 1.000000e+00
br i1 %10, label %5, label %11
11: ; preds = %5
%12 = tail call i32 @glEvalCoord1d(double 1.000000e+00)
%13 = tail call i32 (...) @glEnd()
ret void
}