#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_triangle(FILE *f, float flr, float quark, float ax, float ay,
                           float az, float bx, float by, float bz, float cx,
                           float cy, float cz) {
  if (az <= flr && bz <= flr && cz <= flr)
    return 1;
  fprintf(f, " {\n");
  if (bz > flr || cz > 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 || cz > flr)
    fprintf(f, "  ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\n",
            ax, ay, az, cx, cy, cz, cx, cy, cz - 128);
  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 (quark) {
    bx = (bx - ax) * 128.0f / quark + ax;
    by = (by - ay) * 128.0f / quark + ay;
    bz = (bz - az) * 128.0f / quark + az;
    cx = (cx - ax) * 128.0f / quark + ax;
    cy = (cy - ay) * 128.0f / quark + ay;
    cz = (cz - az) * 128.0f / quark + az;
    fprintf(
        f,
        "  ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) ground1_1 0 0 0 1 1 //TX1\n",
        ax, ay, az, bx, by, bz, cx, cy, cz);
  } else
    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, " }\n");
  return 0;
}


x86 assembly (clang, -O0):
<write_terrain_triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
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  -0x24(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     119b <write_terrain_triangle+0x8b>
movss  -0x30(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     119b <write_terrain_triangle+0x8b>
movss  0x20(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     119b <write_terrain_triangle+0x8b>
movl   $0x1,-0x4(%rbp)
jmp    15ab <write_terrain_triangle+0x49b>
mov    -0x10(%rbp),%rdi
lea    0xe6a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movss  -0x30(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     11cb <write_terrain_triangle+0xbb>
movss  0x20(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1244 <write_terrain_triangle+0x134>
mov    -0x10(%rbp),%rdi
movss  0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x20(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x28(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x2c(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x30(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x28(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  -0x2c(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  -0x30(%rbp),%xmm8
movss  0xdda(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xddd(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  -0x30(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     1262 <write_terrain_triangle+0x152>
movss  -0x24(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    12db <write_terrain_triangle+0x1cb>
mov    -0x10(%rbp),%rdi
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x30(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x1c(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x20(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x24(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x1c(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  -0x20(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  -0x24(%rbp),%xmm8
movss  0xd43(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xd46(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  -0x24(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
ja     12f9 <write_terrain_triangle+0x1e9>
movss  0x20(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1372 <write_terrain_triangle+0x262>
mov    -0x10(%rbp),%rdi
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x10(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x18(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  0x20(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  0x10(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  0x18(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  0x20(%rbp),%xmm8
movss  0xcac(%rip),%xmm9
subss  %xmm9,%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xcaf(%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    0xcb7(%rip),%rsi
xorps  %xmm6,%xmm6
movsd  0xc64(%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  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    13d9 <write_terrain_triangle+0x2c9>
jp     13d9 <write_terrain_triangle+0x2c9>
jmp    1527 <write_terrain_triangle+0x417>
movss  -0x28(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
movss  0xc15(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x2c(%rbp),%xmm0
subss  -0x20(%rbp),%xmm0
movss  0xbf0(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x30(%rbp),%xmm0
subss  -0x24(%rbp),%xmm0
movss  0xbcb(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0x10(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
movss  0xba6(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,0x10(%rbp)
movss  0x18(%rbp),%xmm0
subss  -0x20(%rbp),%xmm0
movss  0xb81(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,0x18(%rbp)
movss  0x20(%rbp),%xmm0
subss  -0x24(%rbp),%xmm0
movss  0xb5c(%rip),%xmm1
mulss  %xmm1,%xmm0
divss  -0x18(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  %xmm0,0x20(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x28(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x2c(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x30(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  0x10(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  0x18(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  0x20(%rbp),%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xb75(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
jmp    1592 <write_terrain_triangle+0x482>
mov    -0x10(%rbp),%rdi
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x24(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x28(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x2c(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x30(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  0x10(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  0x18(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  0x20(%rbp),%xmm8
cvtss2sd %xmm8,%xmm8
lea    0xb49(%rip),%rsi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xb6f(%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_triangle>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
ucomiss %xmm4,%xmm0
jb     1148 <write_terrain_triangle+0x28>
ucomiss %xmm7,%xmm0
jb     1148 <write_terrain_triangle+0x28>
mov    $0x1,%eax
ucomiss 0xa0(%rsp),%xmm0
jae    14ac <write_terrain_triangle+0x38c>
movaps %xmm6,0x40(%rsp)
movaps %xmm1,0x70(%rsp)
movaps %xmm2,0x20(%rsp)
movaps %xmm3,0x30(%rsp)
movaps %xmm4,0x10(%rsp)
movaps %xmm5,0x50(%rsp)
lea    0xeb3(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
movaps %xmm7,0x60(%rsp)
movss  %xmm0,0xc(%rsp)
call   1040 <fwrite@plt>
movss  0xc(%rsp),%xmm0
movaps 0x60(%rsp),%xmm9
movss  0xa0(%rsp),%xmm7
ucomiss %xmm0,%xmm9
ja     11aa <write_terrain_triangle+0x8a>
ucomiss %xmm0,%xmm7
jbe    1227 <write_terrain_triangle+0x107>
movss  0x90(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x98(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm7,%xmm2
movaps 0x50(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movaps 0x40(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm9,%xmm5
movss  0xe13(%rip),%xmm6
addss  %xmm9,%xmm6
cvtss2sd %xmm6,%xmm6
movsd  %xmm6,(%rsp)
lea    0xe22(%rip),%rsi
mov    %rbx,%rdi
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0xc(%rsp),%xmm0
movaps 0x60(%rsp),%xmm9
movss  0xa0(%rsp),%xmm7
movaps 0x10(%rsp),%xmm8
ucomiss %xmm0,%xmm8
ja     1248 <write_terrain_triangle+0x128>
ucomiss %xmm0,%xmm9
ja     1248 <write_terrain_triangle+0x128>
ucomiss %xmm0,%xmm8
jbe    12c4 <write_terrain_triangle+0x1a4>
jmp    12c9 <write_terrain_triangle+0x1a9>
movaps 0x50(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x40(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm9,%xmm2
movaps 0x20(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movaps 0x30(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm8,%xmm5
movss  0xd7c(%rip),%xmm6
addss  %xmm8,%xmm6
cvtss2sd %xmm6,%xmm6
movsd  %xmm6,(%rsp)
lea    0xd8b(%rip),%rsi
mov    %rbx,%rdi
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0xc(%rsp),%xmm0
movaps 0x10(%rsp),%xmm8
movss  0xa0(%rsp),%xmm7
ucomiss %xmm0,%xmm8
ja     12c9 <write_terrain_triangle+0x1a9>
ucomiss %xmm0,%xmm7
jbe    1337 <write_terrain_triangle+0x217>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x30(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movaps 0x10(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x90(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x98(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm7,%xmm5
movss  0xcf3(%rip),%xmm6
addss  %xmm7,%xmm6
cvtss2sd %xmm6,%xmm6
movsd  %xmm6,(%rsp)
lea    0xd03(%rip),%rsi
mov    %rbx,%rdi
movaps %xmm3,%xmm6
movaps %xmm4,%xmm7
mov    $0x8,%al
call   1030 <fprintf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  %xmm2,(%rsp)
lea    0xd16(%rip),%rsi
movsd  0xcb6(%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>
xorps  %xmm0,%xmm0
movaps 0x70(%rsp),%xmm5
ucomiss %xmm0,%xmm5
movaps 0x60(%rsp),%xmm0
movss  0x90(%rsp),%xmm1
unpcklps %xmm1,%xmm0
movaps 0x50(%rsp),%xmm6
unpcklps 0x40(%rsp),%xmm6
movlhps %xmm0,%xmm6
jne    139b <write_terrain_triangle+0x27b>
jnp    1418 <write_terrain_triangle+0x2f8>
movaps 0x10(%rsp),%xmm2
movaps %xmm2,%xmm0
movaps 0x20(%rsp),%xmm4
unpcklps %xmm4,%xmm0
movaps %xmm4,%xmm1
movaps 0x30(%rsp),%xmm3
unpcklps %xmm3,%xmm1
movlhps %xmm0,%xmm1
subps  %xmm1,%xmm6
mulps  0xc4d(%rip),%xmm6
movaps %xmm5,%xmm0
shufps $0x0,%xmm5,%xmm0
divps  %xmm0,%xmm6
addps  %xmm1,%xmm6
movss  0x98(%rsp),%xmm7
subss  %xmm3,%xmm7
movss  0xc1f(%rip),%xmm0
mulss  %xmm0,%xmm7
divss  %xmm5,%xmm7
addss  %xmm3,%xmm7
movss  0xa0(%rsp),%xmm8
subss  %xmm2,%xmm8
mulss  %xmm0,%xmm8
divss  %xmm5,%xmm8
addss  %xmm2,%xmm8
lea    0xc84(%rip),%rsi
jmp    1441 <write_terrain_triangle+0x321>
lea    0xcbf(%rip),%rsi
movss  0xa0(%rsp),%xmm8
movaps 0x10(%rsp),%xmm2
movaps 0x30(%rsp),%xmm3
movaps 0x20(%rsp),%xmm4
movss  0x98(%rsp),%xmm7
xorps  %xmm0,%xmm0
cvtss2sd %xmm4,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
cvtss2sd %xmm2,%xmm2
xorps  %xmm3,%xmm3
cvtss2sd %xmm6,%xmm3
movaps %xmm6,%xmm4
shufps $0x55,%xmm6,%xmm4
cvtss2sd %xmm4,%xmm4
movaps %xmm6,%xmm5
unpckhpd %xmm6,%xmm5
cvtss2sd %xmm5,%xmm5
shufps $0xff,%xmm6,%xmm6
cvtss2sd %xmm6,%xmm6
cvtss2sd %xmm7,%xmm7
cvtss2sd %xmm8,%xmm8
movsd  %xmm8,(%rsp)
mov    %rbx,%rdi
mov    $0x8,%al
call   1030 <fprintf@plt>
lea    0xc84(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" {\0A\00"
@.str.1 = [60 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) rock1_2 0 0 0 1 1\0A\00"
@.str.2 = [58 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) black 0 0 0 1 1\0A\00"
@.str.3 = [68 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) ground1_1 0 0 0 1 1 //TX1\0A\00"
@.str.4 = [62 x i8] c" ( %f %f %f ) ( %f %f %f ) ( %f %f %f ) ground1_1 0 0 0 1 1\0A\00"
@.str.5 = [4 x i8] c" }\0A\00"
define i32 @write_terrain_triangle(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) {
%13 = fcmp ugt float %5, %1
%14 = fcmp ugt float %8, %1
%15 = or i1 %13, %14
%16 = fcmp ugt float %11, %1
%17 = or i1 %15, %16
br i1 %17, label %18, label %105
18: ; preds = %12
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3, i64 1, i32* %0)
%20 = fcmp ogt float %8, %1
%21 = fcmp ogt float %11, %1
%22 = or i1 %20, %21
br i1 %22, label %23, label %33
23: ; preds = %18
%24 = fpext float %9 to double
%25 = fpext float %10 to double
%26 = fpext float %11 to double
%27 = fpext float %6 to double
%28 = fpext float %7 to double
%29 = fpext float %8 to double
%30 = fadd float %8, -1.280000e+02
%31 = fpext float %30 to double
%32 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), double %24, double %25, double %26, double %27, double %28, double %29, double %27, double %28, double %31)
br label %33
33: ; preds = %18, %23
%34 = fcmp ogt float %5, %1
%35 = or i1 %34, %20
br i1 %35, label %36, label %46
36: ; preds = %33
%37 = fpext float %6 to double
%38 = fpext float %7 to double
%39 = fpext float %8 to double
%40 = fpext float %3 to double
%41 = fpext float %4 to double
%42 = fpext float %5 to double
%43 = fadd float %5, -1.280000e+02
%44 = fpext float %43 to double
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), double %37, double %38, double %39, double %40, double %41, double %42, double %40, double %41, double %44)
br label %46
46: ; preds = %33, %36
%47 = or i1 %34, %21
br i1 %47, label %48, label %58
48: ; preds = %46
%49 = fpext float %3 to double
%50 = fpext float %4 to double
%51 = fpext float %5 to double
%52 = fpext float %9 to double
%53 = fpext float %10 to double
%54 = fpext float %11 to double
%55 = fadd float %11, -1.280000e+02
%56 = fpext float %55 to double
%57 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), double %49, double %50, double %51, double %52, double %53, double %54, double %52, double %53, double %56)
br label %58
58: ; preds = %46, %48
%59 = fpext float %1 to double
%60 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00, double 0.000000e+00, double %59, double 4.096000e+03, double 0.000000e+00, double %59, double 0.000000e+00, double 4.096000e+03, double %59)
%61 = fcmp une float %2, 0.000000e+00
%62 = insertelement <4 x float> poison, float %6, i64 0
%63 = insertelement <4 x float> %62, float %7, i64 1
%64 = insertelement <4 x float> %63, float %8, i64 2
%65 = insertelement <4 x float> %64, float %9, i64 3
br i1 %61, label %66, label %85
66: ; preds = %58
%67 = insertelement <4 x float> poison, float %3, i64 0
%68 = insertelement <4 x float> %67, float %4, i64 1
%69 = insertelement <4 x float> %68, float %5, i64 2
%70 = insertelement <4 x float> %69, float %3, i64 3
%71 = fsub <4 x float> %65, %70
%72 = fmul <4 x float> %71, <float 1.280000e+02, float 1.280000e+02, float 1.280000e+02, float 1.280000e+02>
%73 = insertelement <4 x float> poison, float %2, i64 0
%74 = shufflevector <4 x float> %73, <4 x float> poison, <4 x i32> zeroinitializer
%75 = fdiv <4 x float> %72, %74
%76 = fadd <4 x float> %75, %70
%77 = fsub float %10, %4
%78 = fmul float %77, 1.280000e+02
%79 = fdiv float %78, %2
%80 = fadd float %79, %4
%81 = fsub float %11, %5
%82 = fmul float %81, 1.280000e+02
%83 = fdiv float %82, %2
%84 = fadd float %83, %5
br label %85
85: ; preds = %58, %66
%86 = phi float [ %80, %66 ], [ %10, %58 ]
%87 = phi float [ %84, %66 ], [ %11, %58 ]
%88 = phi i8* [ getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), %66 ], [ getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0), %58 ]
%89 = phi <4 x float> [ %76, %66 ], [ %65, %58 ]
%90 = fpext float %3 to double
%91 = fpext float %4 to double
%92 = fpext float %5 to double
%93 = extractelement <4 x float> %89, i64 0
%94 = fpext float %93 to double
%95 = extractelement <4 x float> %89, i64 1
%96 = fpext float %95 to double
%97 = extractelement <4 x float> %89, i64 2
%98 = fpext float %97 to double
%99 = extractelement <4 x float> %89, i64 3
%100 = fpext float %99 to double
%101 = fpext float %86 to double
%102 = fpext float %87 to double
%103 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* %88, double %90, double %91, double %92, double %94, double %96, double %98, double %100, double %101, double %102)
%104 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %105
105: ; preds = %12, %85
%106 = phi i32 [ 0, %85 ], [ 1, %12 ]
ret i32 %106
}