#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*/ cc_five_parm_optimization_with_early_distortion_removal();
int /*<<< orphan*/ cc_five_parm_optimization_with_late_distortion_removal();
int /*<<< orphan*/ cc_full_optimization();
int /*<<< orphan*/ cc_nic_optimization();
int /*<<< orphan*/ cc_three_parm_optimization();
int coplanar_calibration_with_full_optimization() {
  if (!cc_three_parm_optimization())
    return 0;
  if (!cc_five_parm_optimization_with_late_distortion_removal())
    return 0;
  if (!cc_five_parm_optimization_with_early_distortion_removal())
    return 0;
  if (!cc_nic_optimization())
    return 0;
  if (!cc_full_optimization())
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<coplanar_calibration_with_full_optimization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <cc_three_parm_optimization@plt>
cmp    $0x0,%eax
jne    1174 <coplanar_calibration_with_full_optimization+0x24>
movl   $0x0,-0x4(%rbp)
jmp    11eb <coplanar_calibration_with_full_optimization+0x9b>
mov    $0x0,%al
call   1040 <cc_five_parm_optimization_with_late_distortion_removal@plt>
cmp    $0x0,%eax
jne    1190 <coplanar_calibration_with_full_optimization+0x40>
movl   $0x0,-0x4(%rbp)
jmp    11eb <coplanar_calibration_with_full_optimization+0x9b>
mov    $0x0,%al
call   1050 <cc_five_parm_optimization_with_early_distortion_removal@plt>
cmp    $0x0,%eax
jne    11ac <coplanar_calibration_with_full_optimization+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    11eb <coplanar_calibration_with_full_optimization+0x9b>
mov    $0x0,%al
call   1030 <cc_nic_optimization@plt>
cmp    $0x0,%eax
jne    11c8 <coplanar_calibration_with_full_optimization+0x78>
movl   $0x0,-0x4(%rbp)
jmp    11eb <coplanar_calibration_with_full_optimization+0x9b>
mov    $0x0,%al
call   1060 <cc_full_optimization@plt>
cmp    $0x0,%eax
jne    11e4 <coplanar_calibration_with_full_optimization+0x94>
movl   $0x0,-0x4(%rbp)
jmp    11eb <coplanar_calibration_with_full_optimization+0x9b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coplanar_calibration_with_full_optimization>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <cc_three_parm_optimization@plt>
test   %eax,%eax
je     1193 <coplanar_calibration_with_full_optimization+0x43>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <cc_five_parm_optimization_with_late_distortion_removal@plt>
test   %eax,%eax
je     1193 <coplanar_calibration_with_full_optimization+0x43>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <cc_five_parm_optimization_with_early_distortion_removal@plt>
test   %eax,%eax
je     1193 <coplanar_calibration_with_full_optimization+0x43>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <cc_nic_optimization@plt>
test   %eax,%eax
je     1193 <coplanar_calibration_with_full_optimization+0x43>
xor    %eax,%eax
call   1060 <cc_full_optimization@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @coplanar_calibration_with_full_optimization() {
%1 = alloca i32
%2 = call i32 (...) @cc_three_parm_optimization()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 0, i32* %1
br label %22
5: ; preds = %0
%6 = call i32 (...) @cc_five_parm_optimization_with_late_distortion_removal()
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %5
store i32 0, i32* %1
br label %22
9: ; preds = %5
%10 = call i32 (...) @cc_five_parm_optimization_with_early_distortion_removal()
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
store i32 0, i32* %1
br label %22
13: ; preds = %9
%14 = call i32 (...) @cc_nic_optimization()
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %13
store i32 0, i32* %1
br label %22
17: ; preds = %13
%18 = call i32 (...) @cc_full_optimization()
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %17
store i32 0, i32* %1
br label %22
21: ; preds = %17
store i32 1, i32* %1
br label %22
22: ; preds = %21, %20, %16, %12, %8, %4
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
define i32 @coplanar_calibration_with_full_optimization() {
%1 = tail call i32 (...) @cc_three_parm_optimization()
%2 = icmp eq i32 %1, 0
br i1 %2, label %16, label %3
3: ; preds = %0
%4 = tail call i32 (...) @cc_five_parm_optimization_with_late_distortion_removal()
%5 = icmp eq i32 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3
%7 = tail call i32 (...) @cc_five_parm_optimization_with_early_distortion_removal()
%8 = icmp eq i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %6
%10 = tail call i32 (...) @cc_nic_optimization()
%11 = icmp eq i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = tail call i32 (...) @cc_full_optimization()
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %12, %9, %6, %3, %0
%17 = phi i32 [ 0, %0 ], [ 0, %3 ], [ 0, %6 ], [ 0, %9 ], [ %15, %12 ]
ret i32 %17
}