#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 */
float atof(char *);
int /*<<< orphan*/ printf(char *, ...);
float sqrt(float);
int main(int argc, char **argv) {
  float x1, y1, z1, x2, y2, z2 = 0;
  float center_x, center_y, center_z, axis_x, axis_y, axis_z;
  float vector_length;
  if (argc < 7) {
    printf("animassist - utility to calculate axis and center values for "
           "SimGear model animation\n\n");
    printf("Usage: animassist x1 y1 z1 x2 y2 z2\n\n");
    printf("Defining two vectors in SimGear coords (x1,y1,z1)  and "
           "(x2,y2,z2)\n\n");
    printf("Conversion from model to SimGear:\n");
    printf("SimGear Coord         AC3D Coordinate\n");
    printf("     X                   =              X\n");
    printf("     Y                   =              Z * -1\n");
    printf("     Z                   =              Y\n\n");
    printf("Note: no normalization done, so please make the 2nd vector the "
           "furthest out\n");
  } else {
    x1 = atof(argv[1]);
    y1 = atof(argv[2]);
    z1 = atof(argv[3]);
    x2 = atof(argv[4]);
    y2 = atof(argv[5]);
    z2 = atof(argv[6]);
    center_x = (x1 + x2) / 2;
    center_y = (y1 + y2) / 2;
    center_z = (z1 + z2) / 2;
    vector_length = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) +
                         (z2 - z1) * (z2 - z1));
    axis_x = (x2 - x1) / vector_length;
    axis_y = (y2 - y1) / vector_length;
    axis_z = (z2 - z1) / vector_length;
    printf("Flightgear Model XML for:\n");
    printf("Axis from (%f,%f,%f) to (%f,%f,%f)\n", x1, y1, z1, x2, y2, z2);
    printf("Assuming units in meters!\n\n");
    printf("<center>\n");
    printf(" <x-m>%f</x-m>\n", center_x);
    printf(" <y-m>%f</y-m>\n", center_y);
    printf(" <z-m>%f</z-m>\n", center_z);
    printf("</center>\n\n");
    printf("<axis>\n");
    printf(" <x>%f</x>\n", axis_x);
    printf(" <y>%f</y>\n", axis_y);
    printf(" <z>%f</z>\n", axis_z);
    printf("</axis>\n\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
cmpl   $0x7,-0x8(%rbp)
jge    11db <main+0xab>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfc7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1450 <main+0x320>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  0xda7(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  0xd8c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0x28(%rbp),%xmm0
movss  0xd71(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
movss  -0x20(%rbp),%xmm2
subss  -0x14(%rbp),%xmm2
movss  -0x24(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
movss  -0x24(%rbp),%xmm3
subss  -0x18(%rbp),%xmm3
mulss  %xmm3,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
movss  -0x28(%rbp),%xmm2
subss  -0x1c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrt@plt>
movss  %xmm0,-0x44(%rbp)
movss  -0x20(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
divss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x24(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
divss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x28(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
divss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x20(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x24(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x28(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
lea    0xe85(%rip),%rdi
mov    $0x6,%al
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe95(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe74(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x40(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe69(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
cmp    $0x6,%edi
jg     11b6 <main+0x76>
lea    0xf84(%rip),%rdi
call   1030 <puts@plt>
lea    0xfce(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
lea    0x101e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1034(%rip),%rdi
call   1030 <puts@plt>
lea    0x104e(%rip),%rdi
call   1030 <puts@plt>
lea    0x106c(%rip),%rdi
call   1030 <puts@plt>
lea    0x108f(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ae(%rip),%rdi
jmp    1403 <main+0x2c3>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x1c(%rsp)
mov    0x10(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x18(%rsp)
mov    0x18(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x14(%rsp)
mov    0x20(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0x10(%rsp)
mov    0x28(%rbx),%rdi
call   1040 <atof@plt>
movss  %xmm0,0xc(%rsp)
mov    0x30(%rbx),%rdi
call   1040 <atof@plt>
movss  0x1c(%rsp),%xmm3
movaps %xmm3,%xmm1
movss  0x10(%rsp),%xmm6
addss  %xmm6,%xmm1
movss  0xdd8(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  %xmm1,0x24(%rsp)
movss  0x18(%rsp),%xmm5
movaps %xmm5,%xmm1
movss  0xc(%rsp),%xmm7
addss  %xmm7,%xmm1
mulss  %xmm2,%xmm1
movss  %xmm1,0x28(%rsp)
movss  0x14(%rsp),%xmm4
movaps %xmm4,%xmm1
addss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
movss  %xmm1,0x2c(%rsp)
movaps %xmm6,%xmm1
subss  %xmm3,%xmm1
movaps %xmm7,%xmm2
subss  %xmm5,%xmm2
movss  %xmm2,0x8(%rsp)
mulss  %xmm2,%xmm2
movss  %xmm1,(%rsp)
mulss  %xmm1,%xmm1
addss  %xmm2,%xmm1
movss  %xmm0,0x20(%rsp)
movaps %xmm4,%xmm2
subss  %xmm4,%xmm0
movss  %xmm0,0x4(%rsp)
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     12b4 <main+0x174>
sqrtss %xmm0,%xmm0
jmp    12b9 <main+0x179>
call   1060 <sqrt@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movss  0x8(%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
lea    0xd8e(%rip),%rdi
call   1030 <puts@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x18(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x14(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x10(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0xc(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  0x20(%rsp),%xmm5
cvtss2sd %xmm5,%xmm5
lea    0xcce(%rip),%rdi
mov    $0x6,%al
call   1050 <printf@plt>
lea    0xd52(%rip),%rdi
call   1030 <puts@plt>
lea    0xd61(%rip),%rdi
call   1030 <puts@plt>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcc2(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcba(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x2c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcb2(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xd16(%rip),%rdi
call   1030 <puts@plt>
lea    0xd15(%rip),%rdi
call   1030 <puts@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc93(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc87(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc7b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xcc9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [87 x i8] c"animassist - utility to calculate axis and center values for SimGear model animation\0A\0A\00"
@.str.1 = [38 x i8] c"Usage: animassist x1 y1 z1 x2 y2 z2\0A\0A\00"
@.str.2 = [68 x i8] c"Defining two vectors in SimGear coords (x1,y1,z1) and (x2,y2,z2)\0A\0A\00"
@.str.3 = [35 x i8] c"Conversion from model to SimGear:\0A\00"
@.str.4 = [39 x i8] c"SimGear Coord AC3D Coordinate\0A\00"
@.str.5 = [43 x i8] c" X = X\0A\00"
@.str.6 = [48 x i8] c" Y = Z * -1\0A\00"
@.str.7 = [44 x i8] c" Z = Y\0A\0A\00"
@.str.8 = [77 x i8] c"Note: no normalization done, so please make the 2nd vector the furthest out\0A\00"
@.str.9 = [27 x i8] c"Flightgear Model XML for:\0A\00"
@.str.10 = [36 x i8] c"Axis from (%f,%f,%f) to (%f,%f,%f)\0A\00"
@.str.11 = [28 x i8] c"Assuming units in meters!\0A\0A\00"
@.str.12 = [10 x i8] c"<center>\0A\00"
@.str.13 = [16 x i8] c" <x-m>%f</x-m>\0A\00"
@.str.14 = [16 x i8] c" <y-m>%f</y-m>\0A\00"
@.str.15 = [16 x i8] c" <z-m>%f</z-m>\0A\00"
@.str.16 = [12 x i8] c"</center>\0A\0A\00"
@.str.17 = [8 x i8] c"<axis>\0A\00"
@.str.18 = [12 x i8] c" <x>%f</x>\0A\00"
@.str.19 = [12 x i8] c" <y>%f</y>\0A\00"
@.str.20 = [12 x i8] c" <z>%f</z>\0A\00"
@.str.21 = [10 x i8] c"</axis>\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %11
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 7
br i1 %20, label %21, label %31
21: ; preds = %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
br label %142
31: ; preds = %2
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call float @atof(i8* %34)
store float %35, float* %6
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 2
%38 = load i8*, i8** %37
%39 = call float @atof(i8* %38)
store float %39, float* %7
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 3
%42 = load i8*, i8** %41
%43 = call float @atof(i8* %42)
store float %43, float* %8
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 4
%46 = load i8*, i8** %45
%47 = call float @atof(i8* %46)
store float %47, float* %9
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 5
%50 = load i8*, i8** %49
%51 = call float @atof(i8* %50)
store float %51, float* %10
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 6
%54 = load i8*, i8** %53
%55 = call float @atof(i8* %54)
store float %55, float* %11
%56 = load float, float* %6
%57 = load float, float* %9
%58 = fadd float %56, %57
%59 = fdiv float %58, 2.000000e+00
store float %59, float* %12
%60 = load float, float* %7
%61 = load float, float* %10
%62 = fadd float %60, %61
%63 = fdiv float %62, 2.000000e+00
store float %63, float* %13
%64 = load float, float* %8
%65 = load float, float* %11
%66 = fadd float %64, %65
%67 = fdiv float %66, 2.000000e+00
store float %67, float* %14
%68 = load float, float* %9
%69 = load float, float* %6
%70 = fsub float %68, %69
%71 = load float, float* %9
%72 = load float, float* %6
%73 = fsub float %71, %72
%74 = load float, float* %10
%75 = load float, float* %7
%76 = fsub float %74, %75
%77 = load float, float* %10
%78 = load float, float* %7
%79 = fsub float %77, %78
%80 = fmul float %76, %79
%81 = call float @llvm.fmuladd.f32(float %70, float %73, float %80)
%82 = load float, float* %11
%83 = load float, float* %8
%84 = fsub float %82, %83
%85 = load float, float* %11
%86 = load float, float* %8
%87 = fsub float %85, %86
%88 = call float @llvm.fmuladd.f32(float %84, float %87, float %81)
%89 = call float @sqrt(float %88)
store float %89, float* %18
%90 = load float, float* %9
%91 = load float, float* %6
%92 = fsub float %90, %91
%93 = load float, float* %18
%94 = fdiv float %92, %93
store float %94, float* %15
%95 = load float, float* %10
%96 = load float, float* %7
%97 = fsub float %95, %96
%98 = load float, float* %18
%99 = fdiv float %97, %98
store float %99, float* %16
%100 = load float, float* %11
%101 = load float, float* %8
%102 = fsub float %100, %101
%103 = load float, float* %18
%104 = fdiv float %102, %103
store float %104, float* %17
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
%106 = load float, float* %6
%107 = fpext float %106 to double
%108 = load float, float* %7
%109 = fpext float %108 to double
%110 = load float, float* %8
%111 = fpext float %110 to double
%112 = load float, float* %9
%113 = fpext float %112 to double
%114 = load float, float* %10
%115 = fpext float %114 to double
%116 = load float, float* %11
%117 = fpext float %116 to double
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), double %107, double %109, double %111, double %113, double %115, double %117)
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%121 = load float, float* %12
%122 = fpext float %121 to double
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), double %122)
%124 = load float, float* %13
%125 = fpext float %124 to double
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), double %125)
%127 = load float, float* %14
%128 = fpext float %127 to double
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), double %128)
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%132 = load float, float* %15
%133 = fpext float %132 to double
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), double %133)
%135 = load float, float* %16
%136 = fpext float %135 to double
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), double %136)
%138 = load float, float* %17
%139 = fpext float %138 to double
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), double %139)
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.21, i64 0, i64 0))
br label %142
142: ; preds = %31, %21
ret i32 0
}

LLVM IR (-O2):
@.str.10 = [36 x i8] c"Axis from (%f,%f,%f) to (%f,%f,%f)\0A\00"
@.str.13 = [16 x i8] c" <x-m>%f</x-m>\0A\00"
@.str.14 = [16 x i8] c" <y-m>%f</y-m>\0A\00"
@.str.15 = [16 x i8] c" <z-m>%f</z-m>\0A\00"
@.str.18 = [12 x i8] c" <x>%f</x>\0A\00"
@.str.19 = [12 x i8] c" <y>%f</y>\0A\00"
@.str.20 = [12 x i8] c" <z>%f</z>\0A\00"
@str = [26 x i8] c"Flightgear Model XML for:\00"
@str.22 = [27 x i8] c"Assuming units in meters!\0A\00"
@str.23 = [9 x i8] c"<center>\00"
@str.24 = [11 x i8] c"</center>\0A\00"
@str.25 = [7 x i8] c"<axis>\00"
@str.26 = [9 x i8] c"</axis>\0A\00"
@str.27 = [86 x i8] c"animassist - utility to calculate axis and center values for SimGear model animation\0A\00"
@str.28 = [37 x i8] c"Usage: animassist x1 y1 z1 x2 y2 z2\0A\00"
@str.29 = [67 x i8] c"Defining two vectors in SimGear coords (x1,y1,z1) and (x2,y2,z2)\0A\00"
@str.30 = [34 x i8] c"Conversion from model to SimGear:\00"
@str.31 = [38 x i8] c"SimGear Coord AC3D Coordinate\00"
@str.32 = [42 x i8] c" X = X\00"
@str.33 = [47 x i8] c" Y = Z * -1\00"
@str.34 = [43 x i8] c" Z = Y\0A\00"
@str.35 = [76 x i8] c"Note: no normalization done, so please make the 2nd vector the furthest out\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 7
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.27, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.28, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.29, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.30, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.31, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.32, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.33, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.34, i64 0, i64 0))
br label %72
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call float @atof(i8* %15)
%17 = getelementptr inbounds i8*, i8** %1, i64 2
%18 = load i8*, i8** %17
%19 = tail call float @atof(i8* %18)
%20 = getelementptr inbounds i8*, i8** %1, i64 3
%21 = load i8*, i8** %20
%22 = tail call float @atof(i8* %21)
%23 = getelementptr inbounds i8*, i8** %1, i64 4
%24 = load i8*, i8** %23
%25 = tail call float @atof(i8* %24)
%26 = getelementptr inbounds i8*, i8** %1, i64 5
%27 = load i8*, i8** %26
%28 = tail call float @atof(i8* %27)
%29 = getelementptr inbounds i8*, i8** %1, i64 6
%30 = load i8*, i8** %29
%31 = tail call float @atof(i8* %30)
%32 = fadd float %16, %25
%33 = fmul float %32, 5.000000e-01
%34 = fadd float %19, %28
%35 = fmul float %34, 5.000000e-01
%36 = fadd float %22, %31
%37 = fmul float %36, 5.000000e-01
%38 = fsub float %25, %16
%39 = fsub float %28, %19
%40 = fmul float %39, %39
%41 = tail call float @llvm.fmuladd.f32(float %38, float %38, float %40)
%42 = fsub float %31, %22
%43 = tail call float @llvm.fmuladd.f32(float %42, float %42, float %41)
%44 = tail call float @sqrt(float %43)
%45 = fdiv float %38, %44
%46 = fdiv float %39, %44
%47 = fdiv float %42, %44
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%49 = fpext float %16 to double
%50 = fpext float %19 to double
%51 = fpext float %22 to double
%52 = fpext float %25 to double
%53 = fpext float %28 to double
%54 = fpext float %31 to double
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), double %49, double %50, double %51, double %52, double %53, double %54)
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.22, i64 0, i64 0))
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.23, i64 0, i64 0))
%58 = fpext float %33 to double
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), double %58)
%60 = fpext float %35 to double
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), double %60)
%62 = fpext float %37 to double
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), double %62)
%64 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.24, i64 0, i64 0))
%65 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.25, i64 0, i64 0))
%66 = fpext float %45 to double
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), double %66)
%68 = fpext float %46 to double
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), double %68)
%70 = fpext float %47 to double
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), double %70)
br label %72
72: ; preds = %13, %4
%73 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0), %13 ], [ getelementptr inbounds ([76 x i8], [76 x i8]* @str.35, i64 0, i64 0), %4 ]
%74 = tail call i32 @puts(i8* dereferenceable(1) %73)
ret i32 0
}