#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*/ adafinal();
int /*<<< orphan*/ adainit();
int call_dobldobl_path_tracker(int);
int call_initialize_dobldobl_homotopy(int *);
int call_initialize_multprec_homotopy(int *);
int call_initialize_quaddobl_homotopy(int *);
int call_initialize_standard_homotopy(int *);
int call_initialize_varbprec_homotopy(int *);
int call_multprec_path_tracker(int);
int call_quaddobl_path_tracker(int);
int call_standard_path_tracker(int);
int call_varbprec_path_tracker();
int clear_dobldobl_tracker();
int clear_multprec_tracker();
int clear_quaddobl_tracker();
int clear_standard_tracker();
int clear_varbprec_tracker();
int prompt_for_precision();
int main(int argc, char *argv[]) {
  int fail, nbsol;
  adainit();
  int level = prompt_for_precision();
  if (level == 0) {
    fail = call_initialize_standard_homotopy(&nbsol);
    fail = call_standard_path_tracker(nbsol);
    fail = clear_standard_tracker();
  } else if (level == 1) {
    fail = call_initialize_dobldobl_homotopy(&nbsol);
    fail = call_dobldobl_path_tracker(nbsol);
    fail = clear_dobldobl_tracker();
  } else if (level == 2) {
    fail = call_initialize_quaddobl_homotopy(&nbsol);
    fail = call_quaddobl_path_tracker(nbsol);
    fail = clear_quaddobl_tracker();
  } else if (level == 3) {
    fail = call_initialize_multprec_homotopy(&nbsol);
    fail = call_multprec_path_tracker(nbsol);
    fail = clear_multprec_tracker();
  } else {
    fail = call_initialize_varbprec_homotopy(&nbsol);
    fail = call_varbprec_path_tracker();
    fail = clear_varbprec_tracker();
  }
  adafinal();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1110 <adainit@plt>
mov    $0x0,%al
call   10b0 <prompt_for_precision@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1277 <main+0x57>
lea    -0x18(%rbp),%rdi
call   1070 <call_initialize_standard_homotopy@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <call_standard_path_tracker@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10f0 <clear_standard_tracker@plt>
mov    %eax,-0x14(%rbp)
jmp    1336 <main+0x116>
cmpl   $0x1,-0x1c(%rbp)
jne    12a7 <main+0x87>
lea    -0x18(%rbp),%rdi
call   1080 <call_initialize_dobldobl_homotopy@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
call   1130 <call_dobldobl_path_tracker@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10a0 <clear_dobldobl_tracker@plt>
mov    %eax,-0x14(%rbp)
jmp    1331 <main+0x111>
cmpl   $0x2,-0x1c(%rbp)
jne    12d7 <main+0xb7>
lea    -0x18(%rbp),%rdi
call   10d0 <call_initialize_quaddobl_homotopy@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
call   1140 <call_quaddobl_path_tracker@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1090 <clear_quaddobl_tracker@plt>
mov    %eax,-0x14(%rbp)
jmp    132c <main+0x10c>
cmpl   $0x3,-0x1c(%rbp)
jne    1307 <main+0xe7>
lea    -0x18(%rbp),%rdi
call   1100 <call_initialize_multprec_homotopy@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
call   1050 <call_multprec_path_tracker@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1120 <clear_multprec_tracker@plt>
mov    %eax,-0x14(%rbp)
jmp    1327 <main+0x107>
lea    -0x18(%rbp),%rdi
call   1060 <call_initialize_varbprec_homotopy@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <call_varbprec_path_tracker@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10e0 <clear_varbprec_tracker@plt>
mov    %eax,-0x14(%rbp)
jmp    132c <main+0x10c>
jmp    1331 <main+0x111>
jmp    1336 <main+0x116>
mov    $0x0,%al
call   10c0 <adafinal@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1110 <adainit@plt>
xor    %eax,%eax
call   10b0 <prompt_for_precision@plt>
cmp    $0x3,%eax
ja     1262 <main+0x42>
mov    %eax,%eax
lea    0xdc3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x4(%rsp),%rdi
call   1070 <call_initialize_standard_homotopy@plt>
mov    0x4(%rsp),%edi
call   1030 <call_standard_path_tracker@plt>
xor    %eax,%eax
call   10f0 <clear_standard_tracker@plt>
jmp    12ce <main+0xae>
lea    0x4(%rsp),%rdi
call   1060 <call_initialize_varbprec_homotopy@plt>
xor    %eax,%eax
call   1040 <call_varbprec_path_tracker@plt>
xor    %eax,%eax
call   10e0 <clear_varbprec_tracker@plt>
jmp    12ce <main+0xae>
lea    0x4(%rsp),%rdi
call   1080 <call_initialize_dobldobl_homotopy@plt>
mov    0x4(%rsp),%edi
call   1130 <call_dobldobl_path_tracker@plt>
xor    %eax,%eax
call   10a0 <clear_dobldobl_tracker@plt>
jmp    12ce <main+0xae>
lea    0x4(%rsp),%rdi
call   10d0 <call_initialize_quaddobl_homotopy@plt>
mov    0x4(%rsp),%edi
call   1140 <call_quaddobl_path_tracker@plt>
xor    %eax,%eax
call   1090 <clear_quaddobl_tracker@plt>
jmp    12ce <main+0xae>
lea    0x4(%rsp),%rdi
call   1100 <call_initialize_multprec_homotopy@plt>
mov    0x4(%rsp),%edi
call   1050 <call_multprec_path_tracker@plt>
xor    %eax,%eax
call   1120 <clear_multprec_tracker@plt>
xor    %eax,%eax
call   10c0 <adafinal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @adainit()
%10 = call i32 (...) @prompt_for_precision()
store i32 %10, i32* %8
%11 = load i32, i32* %8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = call i32 @call_initialize_standard_homotopy(i32* %7)
store i32 %14, i32* %6
%15 = load i32, i32* %7
%16 = call i32 @call_standard_path_tracker(i32 %15)
store i32 %16, i32* %6
%17 = call i32 (...) @clear_standard_tracker()
store i32 %17, i32* %6
br label %49
18: ; preds = %2
%19 = load i32, i32* %8
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = call i32 @call_initialize_dobldobl_homotopy(i32* %7)
store i32 %22, i32* %6
%23 = load i32, i32* %7
%24 = call i32 @call_dobldobl_path_tracker(i32 %23)
store i32 %24, i32* %6
%25 = call i32 (...) @clear_dobldobl_tracker()
store i32 %25, i32* %6
br label %48
26: ; preds = %18
%27 = load i32, i32* %8
%28 = icmp eq i32 %27, 2
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = call i32 @call_initialize_quaddobl_homotopy(i32* %7)
store i32 %30, i32* %6
%31 = load i32, i32* %7
%32 = call i32 @call_quaddobl_path_tracker(i32 %31)
store i32 %32, i32* %6
%33 = call i32 (...) @clear_quaddobl_tracker()
store i32 %33, i32* %6
br label %47
34: ; preds = %26
%35 = load i32, i32* %8
%36 = icmp eq i32 %35, 3
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = call i32 @call_initialize_multprec_homotopy(i32* %7)
store i32 %38, i32* %6
%39 = load i32, i32* %7
%40 = call i32 @call_multprec_path_tracker(i32 %39)
store i32 %40, i32* %6
%41 = call i32 (...) @clear_multprec_tracker()
store i32 %41, i32* %6
br label %46
42: ; preds = %34
%43 = call i32 @call_initialize_varbprec_homotopy(i32* %7)
store i32 %43, i32* %6
%44 = call i32 (...) @call_varbprec_path_tracker()
store i32 %44, i32* %6
%45 = call i32 (...) @clear_varbprec_tracker()
store i32 %45, i32* %6
br label %46
46: ; preds = %42, %37
br label %47
47: ; preds = %46, %29
br label %48
48: ; preds = %47, %21
br label %49
49: ; preds = %48, %13
%50 = call i32 (...) @adafinal()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (...) @adainit()
%6 = tail call i32 (...) @prompt_for_precision()
switch i32 %6, label %27 [
i32 0, label %7
i32 1, label %12
i32 2, label %17
i32 3, label %22
]
7: ; preds = %2
%8 = call i32 @call_initialize_standard_homotopy(i32* %3)
%9 = load i32, i32* %3
%10 = call i32 @call_standard_path_tracker(i32 %9)
%11 = call i32 (...) @clear_standard_tracker()
br label %31
12: ; preds = %2
%13 = call i32 @call_initialize_dobldobl_homotopy(i32* %3)
%14 = load i32, i32* %3
%15 = call i32 @call_dobldobl_path_tracker(i32 %14)
%16 = call i32 (...) @clear_dobldobl_tracker()
br label %31
17: ; preds = %2
%18 = call i32 @call_initialize_quaddobl_homotopy(i32* %3)
%19 = load i32, i32* %3
%20 = call i32 @call_quaddobl_path_tracker(i32 %19)
%21 = call i32 (...) @clear_quaddobl_tracker()
br label %31
22: ; preds = %2
%23 = call i32 @call_initialize_multprec_homotopy(i32* %3)
%24 = load i32, i32* %3
%25 = call i32 @call_multprec_path_tracker(i32 %24)
%26 = call i32 (...) @clear_multprec_tracker()
br label %31
27: ; preds = %2
%28 = call i32 @call_initialize_varbprec_homotopy(i32* %3)
%29 = call i32 (...) @call_varbprec_path_tracker()
%30 = call i32 (...) @clear_varbprec_tracker()
br label %31
31: ; preds = %12, %22, %27, %17, %7
%32 = call i32 (...) @adafinal()
ret i32 0
}