#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_BLEND;
int /*<<< orphan*/ GL_POINTS;
int /*<<< orphan*/ GL_POINT_SMOOTH;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor4f(float, float, float, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glPointSize(float);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScalef(float, float, float);
int /*<<< orphan*/ glVertex3f(float, float, float);
void draw_lights(void) {
  int i;
  glEnable(GL_BLEND);
  glColor4f(.7f, .7f, .1f, 1.0);
  glPushMatrix();
  glScalef(.1f, 1.f, 1.f);
  glEnable(GL_POINT_SMOOTH);
  for (i = 0; i <= 20; i++) {
    glPointSize((float)i / 2.);
    glBegin(GL_POINTS);
    glVertex3f(-1.f, 0.f, -1.f + 2.f / 20 * i);
    glVertex3f(1.f, 0.f, -1.f + 2.f / 20 * i);
    glEnd();
  }
  glPopMatrix();
  glDisable(GL_BLEND);
}


x86 assembly (clang, -O0):
<draw_lights>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movss  0xe4a(%rip),%xmm1
movss  0xe3a(%rip),%xmm2
movsd  0xe42(%rip),%xmm3
movaps %xmm1,%xmm0
call   1030 <glColor4f@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
movss  0xe1b(%rip),%xmm0
movss  0xe17(%rip),%xmm2
movaps %xmm2,%xmm1
call   1080 <glScalef@plt>
mov    0x2de4(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jg     12af <draw_lights+0x10f>
cvtsi2ssl -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   10a0 <glPointSize@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
call   10c0 <glBegin@plt>
cvtsi2ssl -0x4(%rbp),%xmm2
movss  0xdb3(%rip),%xmm0
mulss  %xmm0,%xmm2
movss  0xdb3(%rip),%xmm0
addss  %xmm0,%xmm2
movss  0xda7(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
cvtsi2ssl -0x4(%rbp),%xmm2
movss  0xd86(%rip),%xmm0
mulss  %xmm0,%xmm2
movss  0xd86(%rip),%xmm0
addss  %xmm0,%xmm2
movss  0xd72(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1060 <glEnd@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    120a <draw_lights+0x6a>
mov    $0x0,%al
call   1070 <glPopMatrix@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_lights>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2e39(%rip),%r14
mov    (%r14),%edi
call   1050 <glEnable@plt>
movss  0xe41(%rip),%xmm0
movss  0xe3d(%rip),%xmm2
movsd  0xe49(%rip),%xmm3
movaps %xmm0,%xmm1
call   1030 <glColor4f@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
movss  0xe22(%rip),%xmm1
movss  0xe16(%rip),%xmm0
movaps %xmm1,%xmm2
call   1080 <glScalef@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2dcd(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0xc(%rsp)
mulss  0xde7(%rip),%xmm0
call   10a0 <glPointSize@plt>
mov    (%rbx),%edi
call   10c0 <glBegin@plt>
movss  0xc(%rsp),%xmm2
mulss  0xdc5(%rip),%xmm2
movss  0xdc9(%rip),%xmm0
addss  %xmm0,%xmm2
movss  %xmm2,0xc(%rsp)
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movss  0xda4(%rip),%xmm0
movss  0xc(%rsp),%xmm2
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1060 <glEnd@plt>
add    $0x1,%ebp
cmp    $0x15,%ebp
jne    1210 <draw_lights+0x70>
xor    %eax,%eax
call   1070 <glPopMatrix@plt>
mov    (%r14),%edi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    10b0 <glDisable@plt>

LLVM IR (-O0):
@GL_BLEND = global i32 0
@GL_POINT_SMOOTH = global i32 0
@GL_POINTS = global i32 0
define void @draw_lights() {
%1 = alloca i32
%2 = load i32, i32* @GL_BLEND
%3 = call i32 @glEnable(i32 %2)
%4 = call i32 @glColor4f(float 0x3FE6666660000000, float 0x3FE6666660000000, float 0x3FB99999A0000000, double 1.000000e+00)
%5 = call i32 (...) @glPushMatrix()
%6 = call i32 @glScalef(float 0x3FB99999A0000000, float 1.000000e+00, float 1.000000e+00)
%7 = load i32, i32* @GL_POINT_SMOOTH
%8 = call i32 @glEnable(i32 %7)
store i32 0, i32* %1
br label %9
9: ; preds = %30, %0
%10 = load i32, i32* %1
%11 = icmp sle i32 %10, 20
br i1 %11, label %12, label %33
12: ; preds = %9
%13 = load i32, i32* %1
%14 = sitofp i32 %13 to float
%15 = fpext float %14 to double
%16 = fdiv double %15, 2.000000e+00
%17 = fptrunc double %16 to float
%18 = call i32 @glPointSize(float %17)
%19 = load i32, i32* @GL_POINTS
%20 = call i32 @glBegin(i32 %19)
%21 = load i32, i32* %1
%22 = sitofp i32 %21 to float
%23 = call float @llvm.fmuladd.f32(float 0x3FB99999A0000000, float %22, float -1.000000e+00)
%24 = call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float %23)
%25 = load i32, i32* %1
%26 = sitofp i32 %25 to float
%27 = call float @llvm.fmuladd.f32(float 0x3FB99999A0000000, float %26, float -1.000000e+00)
%28 = call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float %27)
%29 = call i32 (...) @glEnd()
br label %30
30: ; preds = %12
%31 = load i32, i32* %1
%32 = add nsw i32 %31, 1
store i32 %32, i32* %1
br label %9
33: ; preds = %9
%34 = call i32 (...) @glPopMatrix()
%35 = load i32, i32* @GL_BLEND
%36 = call i32 @glDisable(i32 %35)
ret void
}

LLVM IR (-O2):
@GL_BLEND = global i32 0
@GL_POINT_SMOOTH = global i32 0
@GL_POINTS = global i32 0
define void @draw_lights() {
%1 = load i32, i32* @GL_BLEND
%2 = tail call i32 @glEnable(i32 %1)
%3 = tail call i32 @glColor4f(float 0x3FE6666660000000, float 0x3FE6666660000000, float 0x3FB99999A0000000, double 1.000000e+00)
%4 = tail call i32 (...) @glPushMatrix()
%5 = tail call i32 @glScalef(float 0x3FB99999A0000000, float 1.000000e+00, float 1.000000e+00)
%6 = load i32, i32* @GL_POINT_SMOOTH
%7 = tail call i32 @glEnable(i32 %6)
br label %8
8: ; preds = %0, %8
%9 = phi i32 [ 0, %0 ], [ %19, %8 ]
%10 = sitofp i32 %9 to float
%11 = fmul float %10, 5.000000e-01
%12 = tail call i32 @glPointSize(float %11)
%13 = load i32, i32* @GL_POINTS
%14 = tail call i32 @glBegin(i32 %13)
%15 = tail call float @llvm.fmuladd.f32(float %10, float 0x3FB99999A0000000, float -1.000000e+00)
%16 = tail call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float %15)
%17 = tail call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float %15)
%18 = tail call i32 (...) @glEnd()
%19 = add nuw nsw i32 %9, 1
%20 = icmp eq i32 %19, 21
br i1 %20, label %21, label %8
21: ; preds = %8
%22 = tail call i32 (...) @glPopMatrix()
%23 = load i32, i32* @GL_BLEND
%24 = tail call i32 @glDisable(i32 %23)
ret void
}