#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int write_terrain_quad(FILE *f, float flr, float ax, float ay, float az,
                       float bx, float by, float bz, float cx, float cy,
                       float cz, float dx, float dy, float dz) {
  if (az <= flr && bz <= flr && cz <= flr && dz <= flr)
    return 1;
  fprintf(f, "  {\n");
  fprintf(f, "   ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) ground1_1 0 0 0 1 1\n",
          ax, ay, az, bx, by, bz, cx, cy, cz);
  fprintf(f, "   ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) black 0 0 0 1 1\n",
          0.0f, 0.0f, flr, 4096.0f, 0.0f, flr, 0.0f, 4096.0f, flr);
  if (dz > flr || cz > flr)
    fprintf(f, "   ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\n",
            dx, dy, dz, cx, cy, cz, cx, cy, cz - 128);
  if (cz > flr || bz > flr)
    fprintf(f, "   ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\n",
            cx, cy, cz, bx, by, bz, bx, by, bz - 128);
  if (bz > flr || az > flr)
    fprintf(f, "   ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\n",
            bx, by, bz, ax, ay, az, ax, ay, az - 128);
  if (az > flr || dz > flr)
    fprintf(f, "   ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\n",
            ax, ay, az, dx, dy, dz, dx, dy, dz - 128);
  fprintf(f, "  }\n");
  return 0;
}


x86 assembly (clang, -O0):
<write_terrain_quad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  0x30(%rbp),%xmm8
movss  0x28(%rbp),%xmm8
movss  0x20(%rbp),%xmm8
movss  0x18(%rbp),%xmm8
movss  0x10(%rbp),%xmm8
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
movss  %xmm2,-0x1c(%rbp)
movss  %xmm3,-0x20(%rbp)
movss  %xmm4,-0x24(%rbp)
movss  %xmm5,-0x28(%rbp)
movss  %xmm6,-0x2c(%rbp)
movss  %xmm7,-0x30(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11ba <write_terrain_quad+0xaa>
movss  -0x2c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11ba <write_terrain_quad+0xaa>
movss  0x18(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11ba <write_terrain_quad+0xaa>
movss  0x30(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11ba <write_terrain_quad+0xaa>
movl   $0x1,-0x4(%rbp)
jmp    14f7 <write_terrain_quad+0x3e7>
mov    -0x10(%rbp),%rdi
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x20(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x24(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x28(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x2c(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x30(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  0x10(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  0x18(%rbp),%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xde7(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm5
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm8
lea    0xdf2(%rip),%rsi
xorps  %xmm6,%xmm6
movsd  0xd97(%rip),%xmm7
movaps %xmm6,%xmm0
movaps %xmm6,%xmm1
movaps %xmm7,%xmm3
movaps %xmm6,%xmm4
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0x30(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     12a0 <write_terrain_quad+0x190>
movss  0x18(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1319 <write_terrain_quad+0x209>
mov    -0x10(%rbp),%rdi
movss  0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x30(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x30(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x10(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  0x18(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x30(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  0x10(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  0x18(%rbp),%xmm8
movss  0xd0d(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xd7f(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0x18(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     1337 <write_terrain_quad+0x227>
movss  -0x2c(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    13b0 <write_terrain_quad+0x2a0>
mov    -0x10(%rbp),%rdi
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x24(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x28(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x2c(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x24(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  -0x28(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  -0x2c(%rbp),%xmm8
movss  0xc76(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xce8(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  -0x2c(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     13ce <write_terrain_quad+0x2be>
movss  -0x20(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1447 <write_terrain_quad+0x337>
mov    -0x10(%rbp),%rdi
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x2c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x18(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x1c(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x20(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x18(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  -0x1c(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  -0x20(%rbp),%xmm8
movss  0xbdf(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xc51(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  -0x20(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     1465 <write_terrain_quad+0x355>
movss  0x30(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    14de <write_terrain_quad+0x3ce>
mov    -0x10(%rbp),%rdi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x20(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x20(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x28(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  0x30(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  0x20(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  0x28(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  0x30(%rbp),%xmm8
movss  0xb48(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xbba(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xbdf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_terrain_quad>:
push   %rbx
sub    $0x60,%rsp
mov    %rdi,%rbx
ucomiss %xmm3,%xmm0
jb     114c <write_terrain_quad+0x2c>
ucomiss %xmm6,%xmm0
jb     114c <write_terrain_quad+0x2c>
ucomiss 0x78(%rsp),%xmm0
jb     114c <write_terrain_quad+0x2c>
mov    $0x1,%eax
ucomiss 0x90(%rsp),%xmm0
jae    148a <write_terrain_quad+0x36a>
lea    0xeb9(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
movss  %xmm0,0xc(%rsp)
movss  %xmm3,0x14(%rsp)
movss  %xmm6,0x10(%rsp)
movss  %xmm7,0x38(%rsp)
movss  %xmm5,0x30(%rsp)
movss  %xmm4,0x28(%rsp)
movss  %xmm2,0x20(%rsp)
movss  %xmm1,0x18(%rsp)
call   1040 <fwrite@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x14(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x28(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x30(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  0x10(%rsp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  0x38(%rsp),%xmm6
cvtss2sd %xmm6,%xmm8
movss  0x70(%rsp),%xmm6
xorps  %xmm7,%xmm7
cvtss2sd %xmm6,%xmm7
movss  0x78(%rsp),%xmm6
cvtss2sd %xmm6,%xmm6
movsd  %xmm6,0x40(%rsp)
movsd  %xmm6,(%rsp)
lea    0xe0c(%rip),%rsi
mov    %rbx,%rdi
movsd  %xmm0,0x38(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm5,0x58(%rsp)
movsd  %xmm8,0x50(%rsp)
movaps %xmm8,%xmm6
movsd  %xmm7,0x48(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  %xmm2,(%rsp)
lea    0xdf3(%rip),%rsi
movsd  0xd9b(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm4,%xmm4
xorps  %xmm6,%xmm6
mov    %rbx,%rdi
movaps %xmm2,%xmm5
movaps %xmm3,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0x78(%rsp),%xmm4
movss  0xc(%rsp),%xmm1
movss  0x90(%rsp),%xmm0
ucomiss %xmm1,%xmm4
ja     12a0 <write_terrain_quad+0x180>
ucomiss %xmm1,%xmm0
jbe    131a <write_terrain_quad+0x1fa>
movss  0x80(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x88(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x90(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0xd39(%rip),%xmm3
addss  %xmm4,%xmm3
cvtss2sd %xmm3,%xmm3
movsd  %xmm3,(%rsp)
lea    0xda8(%rip),%rsi
mov    %rbx,%rdi
movsd  0x50(%rsp),%xmm3
movsd  0x48(%rsp),%xmm4
movsd  0x40(%rsp),%xmm5
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0x78(%rsp),%xmm4
movss  0xc(%rsp),%xmm1
movss  0x90(%rsp),%xmm0
movss  0x10(%rsp),%xmm3
ucomiss %xmm1,%xmm3
ja     132a <write_terrain_quad+0x20a>
ucomiss %xmm1,%xmm4
jbe    138f <write_terrain_quad+0x26f>
movss  0xcd6(%rip),%xmm0
addss  %xmm3,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
lea    0xd45(%rip),%rsi
mov    %rbx,%rdi
movsd  0x50(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x58(%rsp),%xmm5
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0x10(%rsp),%xmm3
movss  0xc(%rsp),%xmm1
movss  0x90(%rsp),%xmm0
movss  0x14(%rsp),%xmm2
ucomiss %xmm1,%xmm2
ja     139f <write_terrain_quad+0x27f>
ucomiss %xmm1,%xmm3
jbe    1404 <write_terrain_quad+0x2e4>
movss  0xc61(%rip),%xmm0
addss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
lea    0xcd0(%rip),%rsi
mov    %rbx,%rdi
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
movsd  0x28(%rsp),%xmm5
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0x14(%rsp),%xmm2
movss  0xc(%rsp),%xmm1
movss  0x90(%rsp),%xmm0
ucomiss %xmm1,%xmm2
ja     140e <write_terrain_quad+0x2ee>
ucomiss %xmm1,%xmm0
jbe    146f <write_terrain_quad+0x34f>
movss  0x80(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x88(%rsp),%xmm1
xorps  %xmm4,%xmm4
cvtss2sd %xmm1,%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm0,%xmm5
addss  0xbcb(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
lea    0xc3e(%rip),%rsi
mov    %rbx,%rdi
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
lea    0xc52(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c" {\0A\00"
@.str.1 = [63 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) ground1_1 0 0 0 1 1\0A\00"
@.str.2 = [59 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) black 0 0 0 1 1\0A\00"
@.str.3 = [61 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\0A\00"
@.str.4 = [5 x i8] c" }\0A\00"
define i32 @write_terrain_quad(i32* %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8, float %9, float %10, float %11, float %12, float %13) {
%15 = alloca i32
%16 = alloca i32*
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca float
%28 = alloca float
%29 = alloca float
store i32* %0, i32** %16
store float %1, float* %17
store float %2, float* %18
store float %3, float* %19
store float %4, float* %20
store float %5, float* %21
store float %6, float* %22
store float %7, float* %23
store float %8, float* %24
store float %9, float* %25
store float %10, float* %26
store float %11, float* %27
store float %12, float* %28
store float %13, float* %29
%30 = load float, float* %20
%31 = load float, float* %17
%32 = fcmp ole float %30, %31
br i1 %32, label %33, label %46
33: ; preds = %14
%34 = load float, float* %23
%35 = load float, float* %17
%36 = fcmp ole float %34, %35
br i1 %36, label %37, label %46
37: ; preds = %33
%38 = load float, float* %26
%39 = load float, float* %17
%40 = fcmp ole float %38, %39
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load float, float* %29
%43 = load float, float* %17
%44 = fcmp ole float %42, %43
br i1 %44, label %45, label %46
45: ; preds = %41
store i32 1, i32* %15
br label %199
46: ; preds = %41, %37, %33, %14
%47 = load i32*, i32** %16
%48 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%49 = load i32*, i32** %16
%50 = load float, float* %18
%51 = fpext float %50 to double
%52 = load float, float* %19
%53 = fpext float %52 to double
%54 = load float, float* %20
%55 = fpext float %54 to double
%56 = load float, float* %21
%57 = fpext float %56 to double
%58 = load float, float* %22
%59 = fpext float %58 to double
%60 = load float, float* %23
%61 = fpext float %60 to double
%62 = load float, float* %24
%63 = fpext float %62 to double
%64 = load float, float* %25
%65 = fpext float %64 to double
%66 = load float, float* %26
%67 = fpext float %66 to double
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), double %51, double %53, double %55, double %57, double %59, double %61, double %63, double %65, double %67)
%69 = load i32*, i32** %16
%70 = load float, float* %17
%71 = fpext float %70 to double
%72 = load float, float* %17
%73 = fpext float %72 to double
%74 = load float, float* %17
%75 = fpext float %74 to double
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00, double 0.000000e+00, double %71, double 4.096000e+03, double 0.000000e+00, double %73, double 0.000000e+00, double 4.096000e+03, double %75)
%77 = load float, float* %29
%78 = load float, float* %17
%79 = fcmp ogt float %77, %78
br i1 %79, label %84, label %80
80: ; preds = %46
%81 = load float, float* %26
%82 = load float, float* %17
%83 = fcmp ogt float %81, %82
br i1 %83, label %84, label %106
84: ; preds = %80, %46
%85 = load i32*, i32** %16
%86 = load float, float* %27
%87 = fpext float %86 to double
%88 = load float, float* %28
%89 = fpext float %88 to double
%90 = load float, float* %29
%91 = fpext float %90 to double
%92 = load float, float* %24
%93 = fpext float %92 to double
%94 = load float, float* %25
%95 = fpext float %94 to double
%96 = load float, float* %26
%97 = fpext float %96 to double
%98 = load float, float* %24
%99 = fpext float %98 to double
%100 = load float, float* %25
%101 = fpext float %100 to double
%102 = load float, float* %26
%103 = fsub float %102, 1.280000e+02
%104 = fpext float %103 to double
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %87, double %89, double %91, double %93, double %95, double %97, double %99, double %101, double %104)
br label %106
106: ; preds = %84, %80
%107 = load float, float* %26
%108 = load float, float* %17
%109 = fcmp ogt float %107, %108
br i1 %109, label %114, label %110
110: ; preds = %106
%111 = load float, float* %23
%112 = load float, float* %17
%113 = fcmp ogt float %111, %112
br i1 %113, label %114, label %136
114: ; preds = %110, %106
%115 = load i32*, i32** %16
%116 = load float, float* %24
%117 = fpext float %116 to double
%118 = load float, float* %25
%119 = fpext float %118 to double
%120 = load float, float* %26
%121 = fpext float %120 to double
%122 = load float, float* %21
%123 = fpext float %122 to double
%124 = load float, float* %22
%125 = fpext float %124 to double
%126 = load float, float* %23
%127 = fpext float %126 to double
%128 = load float, float* %21
%129 = fpext float %128 to double
%130 = load float, float* %22
%131 = fpext float %130 to double
%132 = load float, float* %23
%133 = fsub float %132, 1.280000e+02
%134 = fpext float %133 to double
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %115, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %117, double %119, double %121, double %123, double %125, double %127, double %129, double %131, double %134)
br label %136
136: ; preds = %114, %110
%137 = load float, float* %23
%138 = load float, float* %17
%139 = fcmp ogt float %137, %138
br i1 %139, label %144, label %140
140: ; preds = %136
%141 = load float, float* %20
%142 = load float, float* %17
%143 = fcmp ogt float %141, %142
br i1 %143, label %144, label %166
144: ; preds = %140, %136
%145 = load i32*, i32** %16
%146 = load float, float* %21
%147 = fpext float %146 to double
%148 = load float, float* %22
%149 = fpext float %148 to double
%150 = load float, float* %23
%151 = fpext float %150 to double
%152 = load float, float* %18
%153 = fpext float %152 to double
%154 = load float, float* %19
%155 = fpext float %154 to double
%156 = load float, float* %20
%157 = fpext float %156 to double
%158 = load float, float* %18
%159 = fpext float %158 to double
%160 = load float, float* %19
%161 = fpext float %160 to double
%162 = load float, float* %20
%163 = fsub float %162, 1.280000e+02
%164 = fpext float %163 to double
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %145, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %147, double %149, double %151, double %153, double %155, double %157, double %159, double %161, double %164)
br label %166
166: ; preds = %144, %140
%167 = load float, float* %20
%168 = load float, float* %17
%169 = fcmp ogt float %167, %168
br i1 %169, label %174, label %170
170: ; preds = %166
%171 = load float, float* %29
%172 = load float, float* %17
%173 = fcmp ogt float %171, %172
br i1 %173, label %174, label %196
174: ; preds = %170, %166
%175 = load i32*, i32** %16
%176 = load float, float* %18
%177 = fpext float %176 to double
%178 = load float, float* %19
%179 = fpext float %178 to double
%180 = load float, float* %20
%181 = fpext float %180 to double
%182 = load float, float* %27
%183 = fpext float %182 to double
%184 = load float, float* %28
%185 = fpext float %184 to double
%186 = load float, float* %29
%187 = fpext float %186 to double
%188 = load float, float* %27
%189 = fpext float %188 to double
%190 = load float, float* %28
%191 = fpext float %190 to double
%192 = load float, float* %29
%193 = fsub float %192, 1.280000e+02
%194 = fpext float %193 to double
%195 = call i32 (i32*, i8*, ...) @fprintf(i32* %175, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %177, double %179, double %181, double %183, double %185, double %187, double %189, double %191, double %194)
br label %196
196: ; preds = %174, %170
%197 = load i32*, i32** %16
%198 = call i32 (i32*, i8*, ...) @fprintf(i32* %197, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %15
br label %199
199: ; preds = %196, %45
%200 = load i32, i32* %15
ret i32 %200
}

LLVM IR (-O2):
@.str = [5 x i8] c" {\0A\00"
@.str.1 = [63 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) ground1_1 0 0 0 1 1\0A\00"
@.str.2 = [59 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) black 0 0 0 1 1\0A\00"
@.str.3 = [61 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\0A\00"
@.str.4 = [5 x i8] c" }\0A\00"
define i32 @write_terrain_quad(i32* nocapture %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8, float %9, float %10, float %11, float %12, float %13) {
%15 = fcmp ugt float %4, %1
%16 = fcmp ugt float %7, %1
%17 = or i1 %15, %16
%18 = fcmp ugt float %10, %1
%19 = or i1 %17, %18
%20 = fcmp ugt float %13, %1
%21 = or i1 %19, %20
br i1 %21, label %22, label %71
22: ; preds = %14
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %0)
%24 = fpext float %2 to double
%25 = fpext float %3 to double
%26 = fpext float %4 to double
%27 = fpext float %5 to double
%28 = fpext float %6 to double
%29 = fpext float %7 to double
%30 = fpext float %8 to double
%31 = fpext float %9 to double
%32 = fpext float %10 to double
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), double %24, double %25, double %26, double %27, double %28, double %29, double %30, double %31, double %32)
%34 = fpext float %1 to double
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00, double 0.000000e+00, double %34, double 4.096000e+03, double 0.000000e+00, double %34, double 0.000000e+00, double 4.096000e+03, double %34)
%36 = fcmp ogt float %13, %1
%37 = fcmp ogt float %10, %1
%38 = or i1 %37, %36
br i1 %38, label %39, label %46
39: ; preds = %22
%40 = fpext float %11 to double
%41 = fpext float %12 to double
%42 = fpext float %13 to double
%43 = fadd float %10, -1.280000e+02
%44 = fpext float %43 to double
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %40, double %41, double %42, double %30, double %31, double %32, double %30, double %31, double %44)
br label %46
46: ; preds = %22, %39
%47 = fcmp ogt float %7, %1
%48 = or i1 %47, %37
br i1 %48, label %49, label %53
49: ; preds = %46
%50 = fadd float %7, -1.280000e+02
%51 = fpext float %50 to double
%52 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %30, double %31, double %32, double %27, double %28, double %29, double %27, double %28, double %51)
br label %53
53: ; preds = %46, %49
%54 = fcmp ogt float %4, %1
%55 = or i1 %54, %47
br i1 %55, label %56, label %60
56: ; preds = %53
%57 = fadd float %4, -1.280000e+02
%58 = fpext float %57 to double
%59 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %27, double %28, double %29, double %24, double %25, double %26, double %24, double %25, double %58)
br label %60
60: ; preds = %53, %56
%61 = or i1 %54, %36
br i1 %61, label %62, label %69
62: ; preds = %60
%63 = fpext float %11 to double
%64 = fpext float %12 to double
%65 = fpext float %13 to double
%66 = fadd float %13, -1.280000e+02
%67 = fpext float %66 to double
%68 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), double %24, double %25, double %26, double %63, double %64, double %65, double %63, double %64, double %67)
br label %69
69: ; preds = %60, %62
%70 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i64 4, i64 1, i32* %0)
br label %71
71: ; preds = %14, %69
%72 = phi i32 [ 0, %69 ], [ 1, %14 ]
ret i32 %72
}