#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_QUADS;
float RAND_MAX;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor4f(float, float, float, float const);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3f(float const, double, float const);
scalar_t__ rand();
int /*<<< orphan*/ srand(int);
void makeFloor(const float size) {
  const float alpha = 0.3;
  const float num = 100.0;
  float ix, iy;
  srand(10);
  iy = -num;
  ix = -num;
  glBegin(GL_QUADS);
  while (iy < num) {
    while (ix < num) {
      glColor4f((float)(rand()) / RAND_MAX, (float)(rand()) / RAND_MAX,
                (float)(rand()) / RAND_MAX, alpha);
      glVertex3f(size * ix, 0.0, size * iy);
      glColor4f((float)(rand()) / RAND_MAX, (float)(rand()) / RAND_MAX,
                (float)(rand()) / RAND_MAX, alpha);
      glVertex3f(size + size * ix, 0.0, size * iy);
      glColor4f((float)(rand()) / RAND_MAX, (float)(rand()) / RAND_MAX,
                (float)(rand()) / RAND_MAX, alpha);
      glVertex3f(size + size * ix, 0.0, size + size * iy);
      glColor4f((float)(rand()) / RAND_MAX, (float)(rand()) / RAND_MAX,
                (float)(rand()) / RAND_MAX, alpha);
      glVertex3f(size * ix, 0.0, size + size * iy);
      ix += 1.0;
    }
    ix = -num;
    iy += 1.0;
  }
  glEnd();
}


x86 assembly (clang, -O0):
<makeFloor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xe93(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe82(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0xa,%edi
call   1060 <srand@plt>
movss  0xe67(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe5a(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
movss  0xe43(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1471 <makeFloor+0x311>
jmp    11d0 <makeFloor+0x70>
movss  0xe2c(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1441 <makeFloor+0x2e1>
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2deb(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2dcf(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
movss  -0x34(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
cvtsi2ss %rax,%xmm2
mov    0x2da9(%rip),%rax
divss  (%rax),%xmm2
movss  0xdc5(%rip),%xmm3
call   1030 <glColor4f@plt>
movss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2d69(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2d4d(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
movss  -0x2c(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
cvtsi2ss %rax,%xmm2
mov    0x2d27(%rip),%rax
divss  (%rax),%xmm2
movss  0xd43(%rip),%xmm3
call   1030 <glColor4f@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2cda(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2cbe(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
movss  -0x24(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
cvtsi2ss %rax,%xmm2
mov    0x2c98(%rip),%rax
divss  (%rax),%xmm2
movss  0xcb4(%rip),%xmm3
call   1030 <glColor4f@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
mulss  %xmm3,%xmm2
addss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2c3e(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2c22(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
movss  -0x1c(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
cvtsi2ss %rax,%xmm2
mov    0x2bfc(%rip),%rax
divss  (%rax),%xmm2
movss  0xc18(%rip),%xmm3
call   1030 <glColor4f@plt>
movss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
mulss  %xmm3,%xmm2
addss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
call   1040 <glVertex3f@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbe1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11d0 <makeFloor+0x70>
movss  0xbb7(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbb1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11b9 <makeFloor+0x59>
mov    $0x0,%al
call   1050 <glEnd@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeFloor>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
movss  %xmm0,0x10(%rsp)
mov    $0xa,%edi
call   1060 <srand@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    $0xffffff9c,%r14d
mov    0x2e4d(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
movss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,0x18(%rsp)
addss  %xmm1,%xmm0
movss  %xmm0,0x14(%rsp)
mov    $0xffffff9c,%ebp
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm2,%xmm2
cvtsi2ss %rax,%xmm2
divss  (%rbx),%xmm2
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0xdca(%rip),%xmm3
call   1030 <glColor4f@plt>
movss  0xc(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
xorps  %xmm1,%xmm1
movss  0x18(%rsp),%xmm2
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm2,%xmm2
cvtsi2ss %rax,%xmm2
divss  (%rbx),%xmm2
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0xd4c(%rip),%xmm3
call   1030 <glColor4f@plt>
movss  0xc(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
xorps  %xmm1,%xmm1
movss  0x18(%rsp),%xmm2
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x1c(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm2,%xmm2
cvtsi2ss %rax,%xmm2
divss  (%rbx),%xmm2
movss  0x4(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
movss  0xcce(%rip),%xmm3
call   1030 <glColor4f@plt>
xorps  %xmm1,%xmm1
movss  0x8(%rsp),%xmm0
movss  0x14(%rsp),%xmm2
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  (%rbx),%xmm0
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1080 <rand@plt>
xorps  %xmm2,%xmm2
cvtsi2ss %rax,%xmm2
divss  (%rbx),%xmm2
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0xc5c(%rip),%xmm3
call   1030 <glColor4f@plt>
xorps  %xmm1,%xmm1
movss  0xc(%rsp),%xmm0
movss  0x14(%rsp),%xmm2
call   1040 <glVertex3f@plt>
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    11d0 <makeFloor+0x70>
add    $0x1,%r14d
cmp    $0x64,%r14d
jne    11a0 <makeFloor+0x40>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
@RAND_MAX = global float 0.000000e+00
define void @makeFloor(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %2
store float 0x3FD3333340000000, float* %3
store float 1.000000e+02, float* %4
%7 = call i32 @srand(i32 10)
store float -1.000000e+02, float* %6
store float -1.000000e+02, float* %5
%8 = load i32, i32* @GL_QUADS
%9 = call i32 @glBegin(i32 %8)
br label %10
10: ; preds = %106, %1
%11 = load float, float* %6
%12 = fcmp olt float %11, 1.000000e+02
br i1 %12, label %13, label %111
13: ; preds = %10
br label %14
14: ; preds = %17, %13
%15 = load float, float* %5
%16 = fcmp olt float %15, 1.000000e+02
br i1 %16, label %17, label %106
17: ; preds = %14
%18 = call i64 (...) @rand()
%19 = sitofp i64 %18 to float
%20 = load float, float* @RAND_MAX
%21 = fdiv float %19, %20
%22 = call i64 (...) @rand()
%23 = sitofp i64 %22 to float
%24 = load float, float* @RAND_MAX
%25 = fdiv float %23, %24
%26 = call i64 (...) @rand()
%27 = sitofp i64 %26 to float
%28 = load float, float* @RAND_MAX
%29 = fdiv float %27, %28
%30 = call i32 @glColor4f(float %21, float %25, float %29, float 0x3FD3333340000000)
%31 = load float, float* %2
%32 = load float, float* %5
%33 = fmul float %31, %32
%34 = load float, float* %2
%35 = load float, float* %6
%36 = fmul float %34, %35
%37 = call i32 @glVertex3f(float %33, double 0.000000e+00, float %36)
%38 = call i64 (...) @rand()
%39 = sitofp i64 %38 to float
%40 = load float, float* @RAND_MAX
%41 = fdiv float %39, %40
%42 = call i64 (...) @rand()
%43 = sitofp i64 %42 to float
%44 = load float, float* @RAND_MAX
%45 = fdiv float %43, %44
%46 = call i64 (...) @rand()
%47 = sitofp i64 %46 to float
%48 = load float, float* @RAND_MAX
%49 = fdiv float %47, %48
%50 = call i32 @glColor4f(float %41, float %45, float %49, float 0x3FD3333340000000)
%51 = load float, float* %2
%52 = load float, float* %2
%53 = load float, float* %5
%54 = call float @llvm.fmuladd.f32(float %52, float %53, float %51)
%55 = load float, float* %2
%56 = load float, float* %6
%57 = fmul float %55, %56
%58 = call i32 @glVertex3f(float %54, double 0.000000e+00, float %57)
%59 = call i64 (...) @rand()
%60 = sitofp i64 %59 to float
%61 = load float, float* @RAND_MAX
%62 = fdiv float %60, %61
%63 = call i64 (...) @rand()
%64 = sitofp i64 %63 to float
%65 = load float, float* @RAND_MAX
%66 = fdiv float %64, %65
%67 = call i64 (...) @rand()
%68 = sitofp i64 %67 to float
%69 = load float, float* @RAND_MAX
%70 = fdiv float %68, %69
%71 = call i32 @glColor4f(float %62, float %66, float %70, float 0x3FD3333340000000)
%72 = load float, float* %2
%73 = load float, float* %2
%74 = load float, float* %5
%75 = call float @llvm.fmuladd.f32(float %73, float %74, float %72)
%76 = load float, float* %2
%77 = load float, float* %2
%78 = load float, float* %6
%79 = call float @llvm.fmuladd.f32(float %77, float %78, float %76)
%80 = call i32 @glVertex3f(float %75, double 0.000000e+00, float %79)
%81 = call i64 (...) @rand()
%82 = sitofp i64 %81 to float
%83 = load float, float* @RAND_MAX
%84 = fdiv float %82, %83
%85 = call i64 (...) @rand()
%86 = sitofp i64 %85 to float
%87 = load float, float* @RAND_MAX
%88 = fdiv float %86, %87
%89 = call i64 (...) @rand()
%90 = sitofp i64 %89 to float
%91 = load float, float* @RAND_MAX
%92 = fdiv float %90, %91
%93 = call i32 @glColor4f(float %84, float %88, float %92, float 0x3FD3333340000000)
%94 = load float, float* %2
%95 = load float, float* %5
%96 = fmul float %94, %95
%97 = load float, float* %2
%98 = load float, float* %2
%99 = load float, float* %6
%100 = call float @llvm.fmuladd.f32(float %98, float %99, float %97)
%101 = call i32 @glVertex3f(float %96, double 0.000000e+00, float %100)
%102 = load float, float* %5
%103 = fpext float %102 to double
%104 = fadd double %103, 1.000000e+00
%105 = fptrunc double %104 to float
store float %105, float* %5
br label %14
106: ; preds = %14
store float -1.000000e+02, float* %5
%107 = load float, float* %6
%108 = fpext float %107 to double
%109 = fadd double %108, 1.000000e+00
%110 = fptrunc double %109 to float
store float %110, float* %6
br label %10
111: ; preds = %10
%112 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
@RAND_MAX = global float 0.000000e+00
define void @makeFloor(float %0) {
%2 = tail call i32 @srand(i32 10)
%3 = load i32, i32* @GL_QUADS
%4 = tail call i32 @glBegin(i32 %3)
br label %5
5: ; preds = %1, %73
%6 = phi i32 [ -100, %1 ], [ %74, %73 ]
%7 = sitofp i32 %6 to float
%8 = fmul float %7, %0
%9 = tail call float @llvm.fmuladd.f32(float %0, float %7, float %0)
br label %10
10: ; preds = %5, %10
%11 = phi i32 [ -100, %5 ], [ %71, %10 ]
%12 = sitofp i32 %11 to float
%13 = tail call i64 (...) @rand()
%14 = sitofp i64 %13 to float
%15 = load float, float* @RAND_MAX
%16 = fdiv float %14, %15
%17 = tail call i64 (...) @rand()
%18 = sitofp i64 %17 to float
%19 = load float, float* @RAND_MAX
%20 = fdiv float %18, %19
%21 = tail call i64 (...) @rand()
%22 = sitofp i64 %21 to float
%23 = load float, float* @RAND_MAX
%24 = fdiv float %22, %23
%25 = tail call i32 @glColor4f(float %16, float %20, float %24, float 0x3FD3333340000000)
%26 = fmul float %12, %0
%27 = tail call i32 @glVertex3f(float %26, double 0.000000e+00, float %8)
%28 = tail call i64 (...) @rand()
%29 = sitofp i64 %28 to float
%30 = load float, float* @RAND_MAX
%31 = fdiv float %29, %30
%32 = tail call i64 (...) @rand()
%33 = sitofp i64 %32 to float
%34 = load float, float* @RAND_MAX
%35 = fdiv float %33, %34
%36 = tail call i64 (...) @rand()
%37 = sitofp i64 %36 to float
%38 = load float, float* @RAND_MAX
%39 = fdiv float %37, %38
%40 = tail call i32 @glColor4f(float %31, float %35, float %39, float 0x3FD3333340000000)
%41 = tail call float @llvm.fmuladd.f32(float %0, float %12, float %0)
%42 = tail call i32 @glVertex3f(float %41, double 0.000000e+00, float %8)
%43 = tail call i64 (...) @rand()
%44 = sitofp i64 %43 to float
%45 = load float, float* @RAND_MAX
%46 = fdiv float %44, %45
%47 = tail call i64 (...) @rand()
%48 = sitofp i64 %47 to float
%49 = load float, float* @RAND_MAX
%50 = fdiv float %48, %49
%51 = tail call i64 (...) @rand()
%52 = sitofp i64 %51 to float
%53 = load float, float* @RAND_MAX
%54 = fdiv float %52, %53
%55 = tail call i32 @glColor4f(float %46, float %50, float %54, float 0x3FD3333340000000)
%56 = tail call i32 @glVertex3f(float %41, double 0.000000e+00, float %9)
%57 = tail call i64 (...) @rand()
%58 = sitofp i64 %57 to float
%59 = load float, float* @RAND_MAX
%60 = fdiv float %58, %59
%61 = tail call i64 (...) @rand()
%62 = sitofp i64 %61 to float
%63 = load float, float* @RAND_MAX
%64 = fdiv float %62, %63
%65 = tail call i64 (...) @rand()
%66 = sitofp i64 %65 to float
%67 = load float, float* @RAND_MAX
%68 = fdiv float %66, %67
%69 = tail call i32 @glColor4f(float %60, float %64, float %68, float 0x3FD3333340000000)
%70 = tail call i32 @glVertex3f(float %26, double 0.000000e+00, float %9)
%71 = add nsw i32 %11, 1
%72 = icmp eq i32 %71, 100
br i1 %72, label %73, label %10
73: ; preds = %10
%74 = add nsw i32 %6, 1
%75 = icmp eq i32 %74, 100
br i1 %75, label %76, label %5
76: ; preds = %73
%77 = tail call i32 (...) @glEnd()
ret void
}