#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*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(int, float, int /*<<< orphan*/);
int /*<<< orphan*/ pickets();
int /*<<< orphan*/ rail();
int /*<<< orphan*/ side_pickets();
int /*<<< orphan*/ side_rail();
void picket_fence(void) {
  glPushMatrix();
  glTranslatef(0, 0, 0);
  rail();
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0, 8, 0);
  rail();
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0, 0, 0);
  side_rail();
  glPopMatrix();
  glPushMatrix();
  glTranslatef(8, 0, 0);
  side_rail();
  glPopMatrix();
  float a;
  for (a = -4; a <= 4; a += 0.375) {
    glPushMatrix();
    glTranslatef(a, 0, 0);
    pickets();
    glPopMatrix();
    glPushMatrix();
    glTranslatef(a, 8, 0);
    pickets();
    glPopMatrix();
    glPushMatrix();
    glTranslatef(0, a, 0);
    side_pickets();
    glPopMatrix();
    glPushMatrix();
    glTranslatef(8, a, 0);
    side_pickets();
    glPopMatrix();
  }
}


x86 assembly (clang, -O0):
<picket_fence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
xor    %esi,%esi
xorps  %xmm0,%xmm0
mov    %esi,%edi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1050 <rail@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
xor    %esi,%esi
movss  0xe5a(%rip),%xmm0
mov    %esi,%edi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1050 <rail@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
xor    %esi,%esi
xorps  %xmm0,%xmm0
mov    %esi,%edi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1070 <side_rail@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
mov    $0x8,%edi
xorps  %xmm0,%xmm0
xor    %esi,%esi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1070 <side_rail@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
movss  0xdf4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xdef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     12dc <picket_fence+0x16c>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
cvttss2si -0x4(%rbp),%edi
xorps  %xmm0,%xmm0
xor    %esi,%esi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1090 <pickets@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
cvttss2si -0x4(%rbp),%edi
movss  0xda9(%rip),%xmm0
xor    %esi,%esi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1090 <pickets@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movss  -0x4(%rbp),%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1030 <side_pickets@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movss  -0x4(%rbp),%xmm0
mov    $0x8,%edi
xor    %esi,%esi
call   1080 <glTranslatef@plt>
mov    $0x0,%al
call   1030 <side_pickets@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd46(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1211 <picket_fence+0xa1>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<picket_fence>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1050 <rail@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movss  0xe5b(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1050 <rail@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1070 <side_rail@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
mov    $0x8,%edi
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1070 <side_rail@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
movss  0xdfb(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
nop
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
cvttss2si 0xc(%rsp),%ebx
xorps  %xmm0,%xmm0
mov    %ebx,%edi
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1090 <pickets@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
mov    %ebx,%edi
movss  0xdb8(%rip),%xmm0
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1090 <pickets@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
xor    %edi,%edi
movss  0xc(%rsp),%xmm0
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1030 <side_pickets@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
mov    $0x8,%edi
movss  0xc(%rsp),%xmm0
xor    %esi,%esi
call   1080 <glTranslatef@plt>
xor    %eax,%eax
call   1030 <side_pickets@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
movss  0xc(%rsp),%xmm1
addss  0xd52(%rip),%xmm1
movss  %xmm1,0xc(%rsp)
movss  0xd48(%rip),%xmm0
ucomiss %xmm1,%xmm0
jae    1210 <picket_fence+0xa0>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @picket_fence() {
%1 = alloca float
%2 = call i32 (...) @glPushMatrix()
%3 = call i32 @glTranslatef(i32 0, float 0.000000e+00, i32 0)
%4 = call i32 (...) @rail()
%5 = call i32 (...) @glPopMatrix()
%6 = call i32 (...) @glPushMatrix()
%7 = call i32 @glTranslatef(i32 0, float 8.000000e+00, i32 0)
%8 = call i32 (...) @rail()
%9 = call i32 (...) @glPopMatrix()
%10 = call i32 (...) @glPushMatrix()
%11 = call i32 @glTranslatef(i32 0, float 0.000000e+00, i32 0)
%12 = call i32 (...) @side_rail()
%13 = call i32 (...) @glPopMatrix()
%14 = call i32 (...) @glPushMatrix()
%15 = call i32 @glTranslatef(i32 8, float 0.000000e+00, i32 0)
%16 = call i32 (...) @side_rail()
%17 = call i32 (...) @glPopMatrix()
store float -4.000000e+00, float* %1
br label %18
18: ; preds = %44, %0
%19 = load float, float* %1
%20 = fcmp ole float %19, 4.000000e+00
br i1 %20, label %21, label %49
21: ; preds = %18
%22 = call i32 (...) @glPushMatrix()
%23 = load float, float* %1
%24 = fptosi float %23 to i32
%25 = call i32 @glTranslatef(i32 %24, float 0.000000e+00, i32 0)
%26 = call i32 (...) @pickets()
%27 = call i32 (...) @glPopMatrix()
%28 = call i32 (...) @glPushMatrix()
%29 = load float, float* %1
%30 = fptosi float %29 to i32
%31 = call i32 @glTranslatef(i32 %30, float 8.000000e+00, i32 0)
%32 = call i32 (...) @pickets()
%33 = call i32 (...) @glPopMatrix()
%34 = call i32 (...) @glPushMatrix()
%35 = load float, float* %1
%36 = call i32 @glTranslatef(i32 0, float %35, i32 0)
%37 = call i32 (...) @side_pickets()
%38 = call i32 (...) @glPopMatrix()
%39 = call i32 (...) @glPushMatrix()
%40 = load float, float* %1
%41 = call i32 @glTranslatef(i32 8, float %40, i32 0)
%42 = call i32 (...) @side_pickets()
%43 = call i32 (...) @glPopMatrix()
br label %44
44: ; preds = %21
%45 = load float, float* %1
%46 = fpext float %45 to double
%47 = fadd double %46, 3.750000e-01
%48 = fptrunc double %47 to float
store float %48, float* %1
br label %18
49: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @picket_fence() {
%1 = tail call i32 (...) @glPushMatrix()
%2 = tail call i32 @glTranslatef(i32 0, float 0.000000e+00, i32 0)
%3 = tail call i32 (...) @rail()
%4 = tail call i32 (...) @glPopMatrix()
%5 = tail call i32 (...) @glPushMatrix()
%6 = tail call i32 @glTranslatef(i32 0, float 8.000000e+00, i32 0)
%7 = tail call i32 (...) @rail()
%8 = tail call i32 (...) @glPopMatrix()
%9 = tail call i32 (...) @glPushMatrix()
%10 = tail call i32 @glTranslatef(i32 0, float 0.000000e+00, i32 0)
%11 = tail call i32 (...) @side_rail()
%12 = tail call i32 (...) @glPopMatrix()
%13 = tail call i32 (...) @glPushMatrix()
%14 = tail call i32 @glTranslatef(i32 8, float 0.000000e+00, i32 0)
%15 = tail call i32 (...) @side_rail()
%16 = tail call i32 (...) @glPopMatrix()
br label %17
17: ; preds = %0, %17
%18 = phi float [ -4.000000e+00, %0 ], [ %36, %17 ]
%19 = tail call i32 (...) @glPushMatrix()
%20 = fptosi float %18 to i32
%21 = tail call i32 @glTranslatef(i32 %20, float 0.000000e+00, i32 0)
%22 = tail call i32 (...) @pickets()
%23 = tail call i32 (...) @glPopMatrix()
%24 = tail call i32 (...) @glPushMatrix()
%25 = tail call i32 @glTranslatef(i32 %20, float 8.000000e+00, i32 0)
%26 = tail call i32 (...) @pickets()
%27 = tail call i32 (...) @glPopMatrix()
%28 = tail call i32 (...) @glPushMatrix()
%29 = tail call i32 @glTranslatef(i32 0, float %18, i32 0)
%30 = tail call i32 (...) @side_pickets()
%31 = tail call i32 (...) @glPopMatrix()
%32 = tail call i32 (...) @glPushMatrix()
%33 = tail call i32 @glTranslatef(i32 8, float %18, i32 0)
%34 = tail call i32 (...) @side_pickets()
%35 = tail call i32 (...) @glPopMatrix()
%36 = fadd float %18, 3.750000e-01
%37 = fcmp ugt float %36, 4.000000e+00
br i1 %37, label %38, label %17
38: ; preds = %17
ret void
}