#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*/ distance_posdir_point(double *, double *, double *,
                                         double *);
int /*<<< orphan*/ matrix_solve(int, double *, double *, double *);
int /*<<< orphan*/ polynomial_solve_degree_4(double *, double *);
scalar_t__ posdir_outside_of_sphere(double *, double *, double *, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ printm(char *, int, double *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ vector3_cross(double *, double *, double *);
int main(int argc, char *argv[]) {
  double A[] = {1, 1, 1, 0, 2, 5, 2, 5, -1}, B[] = {6, -4, 27}, X[3] = {0};
  double poly[] = {1080, -126, -123, 6, 3};
  double a[] = {1, 2, 3}, b[] = {3, 2, 1}, abcross[3] = {0};
  double x[4] = {0};
  matrix_solve(3, A, B, X);
  vector3_cross(a, b, abcross);
  if (!polynomial_solve_degree_4(poly, x))
    printf("No results for the polynomial.\n");
  printm("A", 9, A);
  printm("B", 3, B);
  printm("X", 3, X);
  printm("a x b", 3, abcross);
  printm("x", 4, x);
  puts("=======================================");
  double position[] = {1, 1, 0}, direction[] = {1, 0, 0}, point[] = {0, 3.5, 0};
  double distance = 0;
  printm("position", 3, position);
  printm("direction", 3, direction);
  printm("point", 3, point);
  if (!distance_posdir_point(position, direction, point, &distance))
    printf("Distance %f\n", distance);
  if (posdir_outside_of_sphere(position, direction, point, 2.5))
    puts("The point is outside.");
  else
    puts("The point is inside.");
  point[1] += 0.000001;
  puts("point[1] += 0.000001");
  if (!distance_posdir_point(position, direction, point, &distance))
    printf("Distance %f\n", distance);
  if (posdir_outside_of_sphere(position, direction, point, 2.5))
    puts("The point is outside.");
  else
    puts("The point is inside.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe7c(%rip),%rsi
mov    $0x48,%edx
call   1090 <memcpy@plt>
mov    0xebb(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1080 <memset@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1080 <memset@plt>
movsd  0xe03(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xdeb(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xdd3(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xdbb(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xda3(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    0xe44(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0xe3e(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0xe38(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xe3a(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0xe34(%rip),%rax
mov    %rax,-0x108(%rbp)
mov    0xe2e(%rip),%rax
mov    %rax,-0x100(%rbp)
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1080 <memset@plt>
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1080 <memset@plt>
lea    -0x60(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
mov    $0x3,%edi
call   10a0 <matrix_solve@plt>
lea    -0xf0(%rbp),%rdi
lea    -0x110(%rbp),%rsi
lea    -0x130(%rbp),%rdx
call   1040 <vector3_cross@plt>
lea    -0xd0(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   10b0 <polynomial_solve_degree_4@plt>
cmp    $0x0,%eax
jne    133c <main+0x19c>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x60(%rbp),%rdx
lea    0xe21(%rip),%rdi
mov    $0x9,%esi
call   1030 <printm@plt>
lea    -0x80(%rbp),%rdx
lea    0xe0e(%rip),%rdi
mov    $0x3,%esi
call   1030 <printm@plt>
lea    -0xa0(%rbp),%rdx
lea    0xdf8(%rip),%rdi
mov    $0x3,%esi
call   1030 <printm@plt>
lea    -0x130(%rbp),%rdx
lea    0xde2(%rip),%rdi
mov    $0x3,%esi
call   1030 <printm@plt>
lea    -0x150(%rbp),%rdx
lea    0xdd0(%rip),%rdi
mov    $0x4,%esi
call   1030 <printm@plt>
lea    0xdc1(%rip),%rdi
call   1060 <puts@plt>
mov    0xd2f(%rip),%rax
mov    %rax,-0x170(%rbp)
mov    0xd29(%rip),%rax
mov    %rax,-0x168(%rbp)
mov    0xd23(%rip),%rax
mov    %rax,-0x160(%rbp)
mov    0xd25(%rip),%rax
mov    %rax,-0x190(%rbp)
mov    0xd1f(%rip),%rax
mov    %rax,-0x188(%rbp)
mov    0xd19(%rip),%rax
mov    %rax,-0x180(%rbp)
mov    0xd1b(%rip),%rax
mov    %rax,-0x1b0(%rbp)
mov    0xd15(%rip),%rax
mov    %rax,-0x1a8(%rbp)
mov    0xd0f(%rip),%rax
mov    %rax,-0x1a0(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
lea    -0x170(%rbp),%rdx
lea    0xd4d(%rip),%rdi
mov    $0x3,%esi
call   1030 <printm@plt>
lea    -0x190(%rbp),%rdx
lea    0xd3e(%rip),%rdi
mov    $0x3,%esi
call   1030 <printm@plt>
lea    -0x1b0(%rbp),%rdx
lea    0xd30(%rip),%rdi
mov    $0x3,%esi
call   1030 <printm@plt>
lea    -0x170(%rbp),%rdi
lea    -0x190(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
lea    -0x1b8(%rbp),%rcx
call   1050 <distance_posdir_point@plt>
cmp    $0x0,%eax
jne    14cb <main+0x32b>
movsd  -0x1b8(%rbp),%xmm0
ff
lea    0xcf3(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    -0x170(%rbp),%rdi
lea    -0x190(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
movsd  0xb40(%rip),%xmm0
call   10c0 <posdir_outside_of_sphere@plt>
cmp    $0x0,%rax
je     1508 <main+0x368>
lea    0xcc6(%rip),%rdi
call   1060 <puts@plt>
jmp    1514 <main+0x374>
lea    0xccb(%rip),%rdi
call   1060 <puts@plt>
movsd  0xb14(%rip),%xmm0
addsd  -0x1a8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a8(%rbp)
ff
lea    0xcbc(%rip),%rdi
call   1060 <puts@plt>
lea    -0x170(%rbp),%rdi
lea    -0x190(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
lea    -0x1b8(%rbp),%rcx
call   1050 <distance_posdir_point@plt>
cmp    $0x0,%eax
jne    1578 <main+0x3d8>
movsd  -0x1b8(%rbp),%xmm0
ff
lea    0xc46(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    -0x170(%rbp),%rdi
lea    -0x190(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
movsd  0xa93(%rip),%xmm0
call   10c0 <posdir_outside_of_sphere@plt>
cmp    $0x0,%rax
je     15b5 <main+0x415>
lea    0xc19(%rip),%rdi
call   1060 <puts@plt>
jmp    15c1 <main+0x421>
lea    0xc1e(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1b0,%rsp
mov    0xed9(%rip),%rax
mov    %rax,0x1a0(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xe7c(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xe5d(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
mov    0xeae(%rip),%rax
mov    %rax,0xc0(%rsp)
movaps 0xe8f(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x90(%rsp)
movq   $0x0,0xa0(%rsp)
movaps 0xde9(%rip),%xmm1
movaps %xmm1,0x130(%rsp)
movaps 0xdea(%rip),%xmm1
movaps %xmm1,0x140(%rsp)
movabs $0x4008000000000000,%rax
mov    %rax,0x150(%rsp)
mov    0xe69(%rip),%rax
mov    %rax,0x120(%rsp)
movaps 0xe4a(%rip),%xmm1
movaps %xmm1,0x110(%rsp)
mov    0xe6b(%rip),%rax
mov    %rax,0x100(%rsp)
movaps 0xe4c(%rip),%xmm1
movaps %xmm1,0xf0(%rsp)
movaps %xmm0,0x70(%rsp)
movq   $0x0,0x80(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
lea    0x160(%rsp),%rsi
lea    0xb0(%rsp),%rdx
lea    0x90(%rsp),%rcx
mov    $0x3,%edi
call   1080 <matrix_solve@plt>
lea    0x110(%rsp),%rdi
lea    0xf0(%rsp),%rsi
lea    0x70(%rsp),%rdx
call   1040 <vector3_cross@plt>
lea    0x130(%rsp),%rdi
lea    0xd0(%rsp),%rsi
call   1090 <polynomial_solve_degree_4@plt>
test   %eax,%eax
jne    12fe <main+0x17e>
lea    0xedb(%rip),%rdi
call   1060 <puts@plt>
lea    0xe33(%rip),%rdi
lea    0x160(%rsp),%rdx
mov    $0x9,%esi
call   1030 <printm@plt>
lea    0xe1c(%rip),%rdi
lea    0xb0(%rsp),%rdx
mov    $0x3,%esi
call   1030 <printm@plt>
lea    0xe05(%rip),%rdi
lea    0x90(%rsp),%rdx
mov    $0x3,%esi
call   1030 <printm@plt>
lea    0xdee(%rip),%rdi
lea    0x70(%rsp),%rdx
mov    $0x3,%esi
call   1030 <printm@plt>
lea    0xdde(%rip),%rdi
lea    0xd0(%rsp),%rdx
mov    $0x4,%esi
call   1030 <printm@plt>
lea    0xdc7(%rip),%rdi
call   1060 <puts@plt>
mov    0xd65(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0xd49(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
mov    0xd6d(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xd51(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xd75(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xd59(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xd92(%rip),%rdi
lea    0x50(%rsp),%r14
mov    $0x3,%esi
mov    %r14,%rdx
call   1030 <printm@plt>
lea    0xd82(%rip),%rdi
lea    0x30(%rsp),%r15
mov    $0x3,%esi
mov    %r15,%rdx
call   1030 <printm@plt>
lea    0xd73(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    $0x3,%esi
mov    %rbx,%rdx
call   1030 <printm@plt>
lea    0x8(%rsp),%rcx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1050 <distance_posdir_point@plt>
test   %eax,%eax
jne    144b <main+0x2cb>
movsd  0x8(%rsp),%xmm0
lea    0xd43(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0x50(%rsp),%r14
lea    0x30(%rsp),%r15
lea    0x10(%rsp),%r12
movsd  0xbbe(%rip),%xmm0
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   10a0 <posdir_outside_of_sphere@plt>
test   %rax,%rax
lea    0xd30(%rip),%r13
lea    0xd13(%rip),%rbx
mov    %rbx,%rdi
cmove  %r13,%rdi
call   1060 <puts@plt>
movsd  0x18(%rsp),%xmm0
addsd  0xb8d(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0xd17(%rip),%rdi
call   1060 <puts@plt>
lea    0x8(%rsp),%rcx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1050 <distance_posdir_point@plt>
test   %eax,%eax
jne    14d8 <main+0x358>
movsd  0x8(%rsp),%xmm0
lea    0xcb6(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0x50(%rsp),%rdi
lea    0x30(%rsp),%rsi
lea    0x10(%rsp),%rdx
movsd  0xb31(%rip),%xmm0
call   10a0 <posdir_outside_of_sphere@plt>
test   %rax,%rax
cmove  %r13,%rbx
mov    %rbx,%rdi
call   1060 <puts@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.A = [9 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00, double 2.000000e+00, double 5.000000e+00, double 2.000000e+00, double 5.000000e+00, double -1.000000e+00]
@__const.main.B = [3 x double] [double 6.000000e+00, double -4.000000e+00, double 2.700000e+01]
@__const.main.a = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@__const.main.b = [3 x double] [double 3.000000e+00, double 2.000000e+00, double 1.000000e+00]
@.str = [32 x i8] c"No results for the polynomial.\0A\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"X\00"
@.str.4 = [6 x i8] c"a x b\00"
@.str.5 = [2 x i8] c"x\00"
@.str.6 = [40 x i8] c"=======================================\00"
@__const.main.position = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 0.000000e+00]
@__const.main.direction = [3 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00]
@__const.main.point = [3 x double] [double 0.000000e+00, double 3.500000e+00, double 0.000000e+00]
@.str.7 = [9 x i8] c"position\00"
@.str.8 = [10 x i8] c"direction\00"
@.str.9 = [6 x i8] c"point\00"
@.str.10 = [13 x i8] c"Distance %f\0A\00"
@.str.11 = [22 x i8] c"The point is outside.\00"
@.str.12 = [21 x i8] c"The point is inside.\00"
@.str.13 = [21 x i8] c"point[1] += 0.000001\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x double]
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca [5 x double]
%10 = alloca [3 x double]
%11 = alloca [3 x double]
%12 = alloca [3 x double]
%13 = alloca [4 x double]
%14 = alloca [3 x double]
%15 = alloca [3 x double]
%16 = alloca [3 x double]
%17 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = bitcast [9 x double]* %6 to i8*
%19 = bitcast [3 x double]* %7 to i8*
%20 = bitcast [3 x double]* %8 to i8*
%21 = bitcast [5 x double]* %9 to i8*
%22 = bitcast i8* %21 to [5 x double]*
%23 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 0
store double 1.080000e+03, double* %23
%24 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 1
store double -1.260000e+02, double* %24
%25 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 2
store double -1.230000e+02, double* %25
%26 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 3
store double 6.000000e+00, double* %26
%27 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 4
store double 3.000000e+00, double* %27
%28 = bitcast [3 x double]* %10 to i8*
%29 = bitcast [3 x double]* %11 to i8*
%30 = bitcast [3 x double]* %12 to i8*
%31 = bitcast [4 x double]* %13 to i8*
%32 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%33 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%34 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%35 = call i32 @matrix_solve(i32 3, double* %32, double* %33, double* %34)
%36 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%37 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%38 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%39 = call i32 @vector3_cross(double* %36, double* %37, double* %38)
%40 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 0
%41 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%42 = call i32 @polynomial_solve_degree_4(double* %40, double* %41)
%43 = icmp ne i32 %42, 0
br i1 %43, label %46, label %44
44: ; preds = %2
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %46
46: ; preds = %44, %2
%47 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%48 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 9, double* %47)
%49 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%50 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 3, double* %49)
%51 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%52 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 3, double* %51)
%53 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%54 = call i32 @printm(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 3, double* %53)
%55 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%56 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 4, double* %55)
%57 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%58 = bitcast [3 x double]* %14 to i8*
%59 = bitcast [3 x double]* %15 to i8*
%60 = bitcast [3 x double]* %16 to i8*
store double 0.000000e+00, double* %17
%61 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%62 = call i32 @printm(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 3, double* %61)
%63 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%64 = call i32 @printm(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 3, double* %63)
%65 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%66 = call i32 @printm(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 3, double* %65)
%67 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%68 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%69 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%70 = call i32 @distance_posdir_point(double* %67, double* %68, double* %69, double* %17)
%71 = icmp ne i32 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %46
%73 = load double, double* %17
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), double %73)
br label %75
75: ; preds = %72, %46
%76 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%77 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%78 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%79 = call i64 @posdir_outside_of_sphere(double* %76, double* %77, double* %78, double 2.500000e+00)
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %75
%82 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
br label %85
83: ; preds = %75
%84 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %85
85: ; preds = %83, %81
%86 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 1
%87 = load double, double* %86
%88 = fadd double %87, 0x3EB0C6F7A0B5ED8D
store double %88, double* %86
%89 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%90 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%91 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%92 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%93 = call i32 @distance_posdir_point(double* %90, double* %91, double* %92, double* %17)
%94 = icmp ne i32 %93, 0
br i1 %94, label %98, label %95
95: ; preds = %85
%96 = load double, double* %17
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), double %96)
br label %98
98: ; preds = %95, %85
%99 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%100 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%101 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%102 = call i64 @posdir_outside_of_sphere(double* %99, double* %100, double* %101, double 2.500000e+00)
%103 = icmp ne i64 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %98
%105 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
br label %108
106: ; preds = %98
%107 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %108
108: ; preds = %106, %104
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [9 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00, double 2.000000e+00, double 5.000000e+00, double 2.000000e+00, double 5.000000e+00, double -1.000000e+00]
@__const.main.B = [3 x double] [double 6.000000e+00, double -4.000000e+00, double 2.700000e+01]
@__const.main.a = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@__const.main.b = [3 x double] [double 3.000000e+00, double 2.000000e+00, double 1.000000e+00]
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"X\00"
@.str.4 = [6 x i8] c"a x b\00"
@.str.5 = [2 x i8] c"x\00"
@.str.6 = [40 x i8] c"=======================================\00"
@__const.main.position = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 0.000000e+00]
@__const.main.direction = [3 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00]
@__const.main.point = [3 x double] [double 0.000000e+00, double 3.500000e+00, double 0.000000e+00]
@.str.7 = [9 x i8] c"position\00"
@.str.8 = [10 x i8] c"direction\00"
@.str.9 = [6 x i8] c"point\00"
@.str.10 = [13 x i8] c"Distance %f\0A\00"
@.str.11 = [22 x i8] c"The point is outside.\00"
@.str.12 = [21 x i8] c"The point is inside.\00"
@.str.13 = [21 x i8] c"point[1] += 0.000001\00"
@str = [31 x i8] c"No results for the polynomial.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x double]
%4 = alloca [3 x double]
%5 = alloca [3 x double]
%6 = alloca [5 x double]
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca [4 x double]
%11 = alloca [3 x double]
%12 = alloca [3 x double]
%13 = alloca [3 x double]
%14 = alloca double
%15 = bitcast [9 x double]* %3 to i8*
%16 = bitcast [3 x double]* %4 to i8*
%17 = bitcast [3 x double]* %5 to i8*
%18 = bitcast [5 x double]* %6 to i8*
%19 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 0
%20 = bitcast [5 x double]* %6 to <2 x double>*
store <2 x double> <double 1.080000e+03, double -1.260000e+02>, <2 x double>* %20
%21 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 2
%22 = bitcast double* %21 to <2 x double>*
store <2 x double> <double -1.230000e+02, double 6.000000e+00>, <2 x double>* %22
%23 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 4
store double 3.000000e+00, double* %23
%24 = bitcast [3 x double]* %7 to i8*
%25 = bitcast [3 x double]* %8 to i8*
%26 = bitcast [3 x double]* %9 to i8*
%27 = bitcast [4 x double]* %10 to i8*
%28 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 0
%29 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%30 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%31 = call i32 @matrix_solve(i32 3, double* %28, double* %29, double* %30)
%32 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%33 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%34 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%35 = call i32 @vector3_cross(double* %32, double* %33, double* %34)
%36 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%37 = call i32 @polynomial_solve_degree_4(double* %19, double* %36)
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %2
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
br label %41
41: ; preds = %39, %2
%42 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 9, double* %28)
%43 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 3, double* %29)
%44 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 3, double* %30)
%45 = call i32 @printm(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 3, double* %34)
%46 = call i32 @printm(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 4, double* %36)
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%48 = bitcast [3 x double]* %11 to i8*
%49 = bitcast [3 x double]* %12 to i8*
%50 = bitcast [3 x double]* %13 to i8*
%51 = bitcast double* %14 to i8*
store double 0.000000e+00, double* %14
%52 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%53 = call i32 @printm(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 3, double* %52)
%54 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%55 = call i32 @printm(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 3, double* %54)
%56 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%57 = call i32 @printm(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 3, double* %56)
%58 = call i32 @distance_posdir_point(double* %52, double* %54, double* %56, double* %14)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %41
%61 = load double, double* %14
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), double %61)
br label %63
63: ; preds = %60, %41
%64 = call i64 @posdir_outside_of_sphere(double* %52, double* %54, double* %56, double 2.500000e+00)
%65 = icmp eq i64 %64, 0
%66 = select i1 %65, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0)
%67 = call i32 @puts(i8* dereferenceable(1) %66)
%68 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 1
%69 = load double, double* %68
%70 = fadd double %69, 0x3EB0C6F7A0B5ED8D
store double %70, double* %68
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%72 = call i32 @distance_posdir_point(double* %52, double* %54, double* %56, double* %14)
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %63
%75 = load double, double* %14
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), double %75)
br label %77
77: ; preds = %74, %63
%78 = call i64 @posdir_outside_of_sphere(double* %52, double* %54, double* %56, double 2.500000e+00)
%79 = icmp eq i64 %78, 0
%80 = select i1 %79, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0)
%81 = call i32 @puts(i8* dereferenceable(1) %80)
ret i32 0
}