#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 autotune_continuation_parameters(int /*<<< orphan*/, int);
int define_output_file();
int determine_output_during_continuation();
int /*<<< orphan*/ printf(char *);
int read_dobldobl_start_system();
int read_dobldobl_target_system();
int /*<<< orphan*/ scanf(char *, int *);
int solve_by_dobldobl_homotopy_continuation(int);
int tune_continuation_parameters();
int write_dobldobl_start_solutions();
int write_dobldobl_start_system();
int write_dobldobl_target_solutions();
int write_dobldobl_target_system();
int run_dobldobl_continuation(void) {
  int fail, nbtasks;
  printf("\nCalling the double double path trackers in PHCpack...\n");
  fail = read_dobldobl_target_system();
  fail = read_dobldobl_start_system();
  fail = define_output_file();
  fail = write_dobldobl_target_system();
  fail = write_dobldobl_start_system();
  fail = write_dobldobl_start_solutions();
  printf("\n");
  fail = autotune_continuation_parameters(0, 14);
  fail = tune_continuation_parameters();
  printf("\n");
  fail = determine_output_during_continuation();
  printf("\nGive the number of tasks (0 for no multitasking ) : ");
  scanf("%d", &nbtasks);
  printf("\nSee the output file for results ...\n");
  fail = solve_by_dobldobl_homotopy_continuation(nbtasks);
  fail = write_dobldobl_target_solutions();
  return fail;
}


x86 assembly (clang, -O0):
<run_dobldobl_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe21(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1060 <read_dobldobl_target_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10f0 <read_dobldobl_start_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1090 <define_output_file@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <write_dobldobl_target_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <write_dobldobl_start_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10c0 <write_dobldobl_start_solutions@plt>
mov    %eax,-0x4(%rbp)
lea    0xe6e(%rip),%rdi
call   1080 <printf@plt>
xor    %edi,%edi
mov    $0xe,%esi
call   1040 <autotune_continuation_parameters@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <tune_continuation_parameters@plt>
mov    %eax,-0x4(%rbp)
lea    0xe49(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   10b0 <determine_output_during_continuation@plt>
mov    %eax,-0x4(%rbp)
lea    0xdd6(%rip),%rdi
call   1080 <printf@plt>
lea    0xe00(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10d0 <scanf@plt>
lea    0xdf3(%rip),%rdi
call   1080 <printf@plt>
mov    -0x8(%rbp),%edi
call   10e0 <solve_by_dobldobl_homotopy_continuation@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10a0 <write_dobldobl_target_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_dobldobl_continuation>:
push   %rax
lea    0xe41(%rip),%rdi
call   1070 <puts@plt>
xor    %eax,%eax
call   1080 <read_dobldobl_target_system@plt>
xor    %eax,%eax
call   1110 <read_dobldobl_start_system@plt>
xor    %eax,%eax
call   10b0 <define_output_file@plt>
xor    %eax,%eax
call   1090 <write_dobldobl_target_system@plt>
xor    %eax,%eax
call   1060 <write_dobldobl_start_system@plt>
xor    %eax,%eax
call   10e0 <write_dobldobl_start_solutions@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
mov    $0xe,%esi
call   1050 <autotune_continuation_parameters@plt>
xor    %eax,%eax
call   1040 <tune_continuation_parameters@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   10d0 <determine_output_during_continuation@plt>
lea    0xda4(%rip),%rdi
call   10a0 <printf@plt>
lea    0xdce(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10f0 <scanf@plt>
lea    0xdf7(%rip),%rdi
call   1070 <puts@plt>
mov    0x4(%rsp),%edi
call   1100 <solve_by_dobldobl_homotopy_continuation@plt>
xor    %eax,%eax
call   10c0 <write_dobldobl_target_solutions@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0ACalling the double double path trackers in PHCpack...\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [54 x i8] c"\0AGive the number of tasks (0 for no multitasking ) : \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [38 x i8] c"\0ASee the output file for results ...\0A\00"
define i32 @run_dobldobl_continuation() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @read_dobldobl_target_system()
store i32 %4, i32* %1
%5 = call i32 (...) @read_dobldobl_start_system()
store i32 %5, i32* %1
%6 = call i32 (...) @define_output_file()
store i32 %6, i32* %1
%7 = call i32 (...) @write_dobldobl_target_system()
store i32 %7, i32* %1
%8 = call i32 (...) @write_dobldobl_start_system()
store i32 %8, i32* %1
%9 = call i32 (...) @write_dobldobl_start_solutions()
store i32 %9, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @autotune_continuation_parameters(i32 0, i32 14)
store i32 %11, i32* %1
%12 = call i32 (...) @tune_continuation_parameters()
store i32 %12, i32* %1
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (...) @determine_output_during_continuation()
store i32 %14, i32* %1
%15 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%17 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%18 = load i32, i32* %2
%19 = call i32 @solve_by_dobldobl_homotopy_continuation(i32 %18)
store i32 %19, i32* %1
%20 = call i32 (...) @write_dobldobl_target_solutions()
store i32 %20, i32* %1
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str.2 = [54 x i8] c"\0AGive the number of tasks (0 for no multitasking ) : \00"
@.str.3 = [3 x i8] c"%d\00"
@str = [55 x i8] c"\0ACalling the double double path trackers in PHCpack...\00"
@str.5 = [37 x i8] c"\0ASee the output file for results ...\00"
define i32 @run_dobldobl_continuation() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @read_dobldobl_target_system()
%5 = tail call i32 (...) @read_dobldobl_start_system()
%6 = tail call i32 (...) @define_output_file()
%7 = tail call i32 (...) @write_dobldobl_target_system()
%8 = tail call i32 (...) @write_dobldobl_start_system()
%9 = tail call i32 (...) @write_dobldobl_start_solutions()
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @autotune_continuation_parameters(i32 0, i32 14)
%12 = tail call i32 (...) @tune_continuation_parameters()
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 (...) @determine_output_during_continuation()
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
%18 = load i32, i32* %1
%19 = call i32 @solve_by_dobldobl_homotopy_continuation(i32 %18)
%20 = call i32 (...) @write_dobldobl_target_solutions()
ret i32 %20
}