#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*/ epe_compute_Tx_Ty_Tz();
int /*<<< orphan*/ epe_optimize();
int /*<<< orphan*/ ncepe_compute_R(double *);
int /*<<< orphan*/ ncepe_compute_Tx_and_Ty(double *);
int /*<<< orphan*/ ncepe_compute_U(double *);
int noncoplanar_extrinsic_parameter_estimation() {
  double U[7];
  if (!ncepe_compute_U(U))
    return 0;
  ncepe_compute_Tx_and_Ty(U);
  ncepe_compute_R(U);
  if (!epe_compute_Tx_Ty_Tz())
    return 0;
  if (!epe_optimize())
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<noncoplanar_extrinsic_parameter_estimation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
call   1040 <ncepe_compute_U@plt>
cmp    $0x0,%eax
jne    1176 <noncoplanar_extrinsic_parameter_estimation+0x26>
movl   $0x0,-0x4(%rbp)
jmp    11c7 <noncoplanar_extrinsic_parameter_estimation+0x77>
lea    -0x40(%rbp),%rdi
call   1070 <ncepe_compute_Tx_and_Ty@plt>
lea    -0x40(%rbp),%rdi
call   1060 <ncepe_compute_R@plt>
mov    $0x0,%al
call   1030 <epe_compute_Tx_Ty_Tz@plt>
cmp    $0x0,%eax
jne    11a4 <noncoplanar_extrinsic_parameter_estimation+0x54>
movl   $0x0,-0x4(%rbp)
jmp    11c7 <noncoplanar_extrinsic_parameter_estimation+0x77>
mov    $0x0,%al
call   1050 <epe_optimize@plt>
cmp    $0x0,%eax
jne    11c0 <noncoplanar_extrinsic_parameter_estimation+0x70>
movl   $0x0,-0x4(%rbp)
jmp    11c7 <noncoplanar_extrinsic_parameter_estimation+0x77>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noncoplanar_extrinsic_parameter_estimation>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rdi
call   1040 <ncepe_compute_U@plt>
test   %eax,%eax
je     1191 <noncoplanar_extrinsic_parameter_estimation+0x41>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <ncepe_compute_Tx_and_Ty@plt>
mov    %rbx,%rdi
call   1060 <ncepe_compute_R@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <epe_compute_Tx_Ty_Tz@plt>
test   %eax,%eax
je     1193 <noncoplanar_extrinsic_parameter_estimation+0x43>
xor    %eax,%eax
call   1050 <epe_optimize@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
jmp    1193 <noncoplanar_extrinsic_parameter_estimation+0x43>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @noncoplanar_extrinsic_parameter_estimation() {
%1 = alloca i32
%2 = alloca [7 x double]
%3 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 0
%4 = call i32 @ncepe_compute_U(double* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %0
store i32 0, i32* %1
br label %20
7: ; preds = %0
%8 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 0
%9 = call i32 @ncepe_compute_Tx_and_Ty(double* %8)
%10 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 0
%11 = call i32 @ncepe_compute_R(double* %10)
%12 = call i32 (...) @epe_compute_Tx_Ty_Tz()
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %7
store i32 0, i32* %1
br label %20
15: ; preds = %7
%16 = call i32 (...) @epe_optimize()
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %15
store i32 0, i32* %1
br label %20
19: ; preds = %15
store i32 1, i32* %1
br label %20
20: ; preds = %19, %18, %14, %6
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @noncoplanar_extrinsic_parameter_estimation() {
%1 = alloca [7 x double]
%2 = bitcast [7 x double]* %1 to i8*
%3 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 0
%4 = call i32 @ncepe_compute_U(double* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %0
%7 = call i32 @ncepe_compute_Tx_and_Ty(double* %3)
%8 = call i32 @ncepe_compute_R(double* %3)
%9 = call i32 (...) @epe_compute_Tx_Ty_Tz()
%10 = icmp eq i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %6
%12 = call i32 (...) @epe_optimize()
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %11, %6, %0
%16 = phi i32 [ 0, %0 ], [ 0, %6 ], [ %14, %11 ]
ret i32 %16
}