#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*/ crossprod_st(double *, double const *, double const *, int);
void epipole(double *ec, const double *F) {
  int i;
  crossprod_st(ec, F, F + 6, 1);
  for (i = 0; i < 3; i++)
    if ((ec[i] > 1.9984e-15) || (ec[i] < -1.9984e-15))
      return;
  crossprod_st(ec, F + 3, F + 6, 1);
}


x86 assembly (clang, -O0):
<epipole>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
add    $0x30,%rdx
mov    $0x1,%ecx
call   1030 <crossprod_st@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    119d <epipole+0x8d>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xea0(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1185 <epipole+0x75>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xe8e(%rip),%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    118a <epipole+0x7a>
jmp    11bb <epipole+0xab>
jmp    118f <epipole+0x7f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <epipole+0x31>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x18,%rsi
mov    -0x10(%rbp),%rdx
add    $0x30,%rdx
mov    $0x1,%ecx
call   1030 <crossprod_st@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epipole>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0x30(%rsi),%r14
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <crossprod_st@plt>
movsd  (%rbx),%xmm1
ucomisd 0xec8(%rip),%xmm1
ja     118e <epipole+0x7e>
movsd  0xec6(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     118e <epipole+0x7e>
movsd  0x8(%rbx),%xmm1
ucomisd 0xeab(%rip),%xmm1
ja     118e <epipole+0x7e>
ucomisd %xmm1,%xmm0
ja     118e <epipole+0x7e>
movsd  0x10(%rbx),%xmm1
ucomisd 0xe96(%rip),%xmm1
ja     118e <epipole+0x7e>
ucomisd %xmm1,%xmm0
ja     118e <epipole+0x7e>
add    $0x18,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <crossprod_st@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @epipole(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double*, double** %4
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 6
%10 = call i32 @crossprod_st(double* %6, double* %7, double* %9, i32 1)
store i32 0, i32* %5
br label %11
11: ; preds = %30, %2
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %33
14: ; preds = %11
%15 = load double*, double** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
%19 = load double, double* %18
%20 = fcmp ogt double %19, 1.998400e-15
br i1 %20, label %28, label %21
21: ; preds = %14
%22 = load double*, double** %3
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double, double* %25
%27 = fcmp olt double %26, -1.998400e-15
br i1 %27, label %28, label %29
28: ; preds = %21, %14
br label %40
29: ; preds = %21
br label %30
30: ; preds = %29
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %11
33: ; preds = %11
%34 = load double*, double** %3
%35 = load double*, double** %4
%36 = getelementptr inbounds double, double* %35, i64 3
%37 = load double*, double** %4
%38 = getelementptr inbounds double, double* %37, i64 6
%39 = call i32 @crossprod_st(double* %34, double* %36, double* %38, i32 1)
br label %40
40: ; preds = %33, %28
ret void
}

LLVM IR (-O2):
define void @epipole(double* %0, double* %1) {
%3 = getelementptr inbounds double, double* %1, i64 6
%4 = tail call i32 @crossprod_st(double* %0, double* %1, double* %3, i32 1)
%5 = load double, double* %0
%6 = fcmp ogt double %5, 1.998400e-15
%7 = fcmp olt double %5, -1.998400e-15
%8 = or i1 %6, %7
br i1 %8, label %24, label %9
9: ; preds = %2
%10 = getelementptr inbounds double, double* %0, i64 1
%11 = load double, double* %10
%12 = fcmp ogt double %11, 1.998400e-15
%13 = fcmp olt double %11, -1.998400e-15
%14 = or i1 %12, %13
br i1 %14, label %24, label %15
15: ; preds = %9
%16 = getelementptr inbounds double, double* %0, i64 2
%17 = load double, double* %16
%18 = fcmp ogt double %17, 1.998400e-15
%19 = fcmp olt double %17, -1.998400e-15
%20 = or i1 %18, %19
br i1 %20, label %24, label %21
21: ; preds = %15
%22 = getelementptr inbounds double, double* %1, i64 3
%23 = tail call i32 @crossprod_st(double* %0, double* %22, double* %3, i32 1)
br label %24
24: ; preds = %2, %9, %15, %21
ret void
}