#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 /*<<< orphan*/ printf(char *);
int run_dobldobl_Laurent_continuation();
int run_dobldobl_continuation();
int run_multprec_continuation();
int run_quaddobl_Laurent_continuation();
int run_quaddobl_continuation();
int run_standard_Laurent_continuation();
int run_standard_continuation();
int /*<<< orphan*/ scanf(char *, ...);
int main(int argc, char *argv[]) {
  int fail, choice;
  char ch;
  adainit();
  printf("\nMENU for running increment-and-fix continuation :\n");
  printf("  1. run in standard double arithmetic;\n");
  printf("  2. run in double double arithmetic;\n");
  printf("  3. run in quad double arithmetic.\n");
  printf("  4. run in multiprecision arithmetic;\n");
  printf("  5. solve a Laurent system in standard double precision;\n");
  printf("  6. solve a Laurent system in double double precision;\n");
  printf("  7. solve a Laurent system in quad double precision.\n");
  printf("Type 1, 2, 3, 4, 5, 6, or 7 to select a run : ");
  scanf("%d", &choice);
  scanf("%c", &ch);
  if (choice == 1)
    fail = run_standard_continuation();
  else if (choice == 2)
    fail = run_dobldobl_continuation();
  else if (choice == 3)
    fail = run_quaddobl_continuation();
  else if (choice == 4)
    fail = run_multprec_continuation();
  else if (choice == 5)
    fail = run_standard_Laurent_continuation();
  else if (choice == 6)
    fail = run_dobldobl_Laurent_continuation();
  else if (choice == 7)
    fail = run_quaddobl_Laurent_continuation();
  else
    printf("Invalid choice, please try again.\n");
  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   10b0 <adainit@plt>
lea    0xe2c(%rip),%rdi
call   1060 <printf@plt>
lea    0xe54(%rip),%rdi
call   1060 <printf@plt>
lea    0xe71(%rip),%rdi
call   1060 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1060 <printf@plt>
lea    0xea5(%rip),%rdi
call   1060 <printf@plt>
lea    0xec1(%rip),%rdi
call   1060 <printf@plt>
lea    0xef0(%rip),%rdi
call   1060 <printf@plt>
lea    0xf1d(%rip),%rdi
call   1060 <printf@plt>
lea    0xf48(%rip),%rdi
call   1060 <printf@plt>
lea    0xf6b(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
lea    0xf5c(%rip),%rdi
lea    -0x19(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
cmpl   $0x1,-0x18(%rbp)
jne    1276 <main+0xc6>
mov    $0x0,%al
call   1040 <run_standard_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    1336 <main+0x186>
cmpl   $0x2,-0x18(%rbp)
jne    128f <main+0xdf>
mov    $0x0,%al
call   1030 <run_dobldobl_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    1331 <main+0x181>
cmpl   $0x3,-0x18(%rbp)
jne    12a8 <main+0xf8>
mov    $0x0,%al
call   1080 <run_quaddobl_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    132c <main+0x17c>
cmpl   $0x4,-0x18(%rbp)
jne    12c1 <main+0x111>
mov    $0x0,%al
call   10d0 <run_multprec_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    1327 <main+0x177>
cmpl   $0x5,-0x18(%rbp)
jne    12da <main+0x12a>
mov    $0x0,%al
call   1050 <run_standard_Laurent_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    1322 <main+0x172>
cmpl   $0x6,-0x18(%rbp)
jne    12f3 <main+0x143>
mov    $0x0,%al
call   1090 <run_dobldobl_Laurent_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    131d <main+0x16d>
cmpl   $0x7,-0x18(%rbp)
jne    130c <main+0x15c>
mov    $0x0,%al
call   10c0 <run_quaddobl_Laurent_continuation@plt>
mov    %eax,-0x14(%rbp)
jmp    1318 <main+0x168>
lea    0xe9e(%rip),%rdi
call   1060 <printf@plt>
jmp    131d <main+0x16d>
jmp    1322 <main+0x172>
jmp    1327 <main+0x177>
jmp    132c <main+0x17c>
jmp    1331 <main+0x181>
jmp    1336 <main+0x186>
mov    $0x0,%al
call   1070 <adafinal@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10c0 <adainit@plt>
lea    0xe82(%rip),%rdi
call   1040 <puts@plt>
lea    0xea9(%rip),%rdi
call   1040 <puts@plt>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf12(%rip),%rdi
call   1040 <puts@plt>
lea    0xf40(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6c(%rip),%rdi
call   1040 <puts@plt>
lea    0xded(%rip),%rdi
call   1070 <printf@plt>
lea    0xe10(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
lea    0xe00(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   10b0 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x6,%eax
ja     127f <main+0xbf>
lea    0xd93(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1050 <run_standard_continuation@plt>
jmp    12c1 <main+0x101>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
jmp    12c1 <main+0x101>
xor    %eax,%eax
call   1030 <run_dobldobl_continuation@plt>
jmp    12c1 <main+0x101>
xor    %eax,%eax
call   1090 <run_quaddobl_continuation@plt>
jmp    12c1 <main+0x101>
xor    %eax,%eax
call   10e0 <run_multprec_continuation@plt>
jmp    12c1 <main+0x101>
xor    %eax,%eax
call   1060 <run_standard_Laurent_continuation@plt>
jmp    12c1 <main+0x101>
xor    %eax,%eax
call   10a0 <run_dobldobl_Laurent_continuation@plt>
jmp    12c1 <main+0x101>
xor    %eax,%eax
call   10d0 <run_quaddobl_Laurent_continuation@plt>
xor    %eax,%eax
call   1080 <adafinal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\0AMENU for running increment-and-fix continuation :\0A\00"
@.str.1 = [41 x i8] c" 1. run in standard double arithmetic;\0A\00"
@.str.2 = [39 x i8] c" 2. run in double double arithmetic;\0A\00"
@.str.3 = [37 x i8] c" 3. run in quad double arithmetic.\0A\00"
@.str.4 = [40 x i8] c" 4. run in multiprecision arithmetic;\0A\00"
@.str.5 = [59 x i8] c" 5. solve a Laurent system in standard double precision;\0A\00"
@.str.6 = [57 x i8] c" 6. solve a Laurent system in double double precision;\0A\00"
@.str.7 = [55 x i8] c" 7. solve a Laurent system in quad double precision.\0A\00"
@.str.8 = [47 x i8] c"Type 1, 2, 3, 4, 5, 6, or 7 to select a run : \00"
@.str.9 = [3 x i8] c"%d\00"
@.str.10 = [3 x i8] c"%c\00"
@.str.11 = [35 x i8] c"Invalid choice, please try again.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @adainit()
%10 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %7)
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %8)
%21 = load i32, i32* %7
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @run_standard_continuation()
store i32 %24, i32* %6
br label %63
25: ; preds = %2
%26 = load i32, i32* %7
%27 = icmp eq i32 %26, 2
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (...) @run_dobldobl_continuation()
store i32 %29, i32* %6
br label %62
30: ; preds = %25
%31 = load i32, i32* %7
%32 = icmp eq i32 %31, 3
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 (...) @run_quaddobl_continuation()
store i32 %34, i32* %6
br label %61
35: ; preds = %30
%36 = load i32, i32* %7
%37 = icmp eq i32 %36, 4
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (...) @run_multprec_continuation()
store i32 %39, i32* %6
br label %60
40: ; preds = %35
%41 = load i32, i32* %7
%42 = icmp eq i32 %41, 5
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (...) @run_standard_Laurent_continuation()
store i32 %44, i32* %6
br label %59
45: ; preds = %40
%46 = load i32, i32* %7
%47 = icmp eq i32 %46, 6
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 (...) @run_dobldobl_Laurent_continuation()
store i32 %49, i32* %6
br label %58
50: ; preds = %45
%51 = load i32, i32* %7
%52 = icmp eq i32 %51, 7
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 (...) @run_quaddobl_Laurent_continuation()
store i32 %54, i32* %6
br label %57
55: ; preds = %50
%56 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %57
57: ; preds = %55, %53
br label %58
58: ; preds = %57, %48
br label %59
59: ; preds = %58, %43
br label %60
60: ; preds = %59, %38
br label %61
61: ; preds = %60, %33
br label %62
62: ; preds = %61, %28
br label %63
63: ; preds = %62, %23
%64 = call i32 (...) @adafinal()
ret i32 0
}

LLVM IR (-O2):
@.str.8 = [47 x i8] c"Type 1, 2, 3, 4, 5, 6, or 7 to select a run : \00"
@.str.9 = [3 x i8] c"%d\00"
@.str.10 = [3 x i8] c"%c\00"
@str = [51 x i8] c"\0AMENU for running increment-and-fix continuation :\00"
@str.12 = [40 x i8] c" 1. run in standard double arithmetic;\00"
@str.13 = [38 x i8] c" 2. run in double double arithmetic;\00"
@str.14 = [36 x i8] c" 3. run in quad double arithmetic.\00"
@str.15 = [39 x i8] c" 4. run in multiprecision arithmetic;\00"
@str.16 = [58 x i8] c" 5. solve a Laurent system in standard double precision;\00"
@str.17 = [56 x i8] c" 6. solve a Laurent system in double double precision;\00"
@str.18 = [54 x i8] c" 7. solve a Laurent system in quad double precision.\00"
@str.19 = [34 x i8] c"Invalid choice, please try again.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i8
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 (...) @adainit()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.13, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.14, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.15, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.16, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.17, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.18, i64 0, i64 0))
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %3)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %4)
%18 = load i32, i32* %3
switch i32 %18, label %33 [
i32 1, label %19
i32 2, label %21
i32 3, label %23
i32 4, label %25
i32 5, label %27
i32 6, label %29
i32 7, label %31
]
19: ; preds = %2
%20 = call i32 (...) @run_standard_continuation()
br label %35
21: ; preds = %2
%22 = call i32 (...) @run_dobldobl_continuation()
br label %35
23: ; preds = %2
%24 = call i32 (...) @run_quaddobl_continuation()
br label %35
25: ; preds = %2
%26 = call i32 (...) @run_multprec_continuation()
br label %35
27: ; preds = %2
%28 = call i32 (...) @run_standard_Laurent_continuation()
br label %35
29: ; preds = %2
%30 = call i32 (...) @run_dobldobl_Laurent_continuation()
br label %35
31: ; preds = %2
%32 = call i32 (...) @run_quaddobl_Laurent_continuation()
br label %35
33: ; preds = %2
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.19, i64 0, i64 0))
br label %35
35: ; preds = %21, %25, %29, %33, %31, %27, %23, %19
%36 = call i32 (...) @adafinal()
ret i32 0
}