#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_multprec_start_system(int);
int read_multprec_target_system(int);
int /*<<< orphan*/ scanf(char *, ...);
int solve_by_multprec_homotopy_continuation(int);
int tune_continuation_parameters();
int write_multprec_start_solutions();
int write_multprec_start_system();
int write_multprec_target_system();
int run_multprec_continuation(void) {
  int fail, deci;
  char ch;
  printf("\nCalling the multiprecision path trackers in PHCpack...\n");
  printf("-> give the number of decimal places : ");
  scanf("%d", &deci);
  scanf("%c", &ch);
  fail = read_multprec_target_system(deci);
  fail = read_multprec_start_system(deci);
  fail = define_output_file();
  fail = write_multprec_target_system();
  fail = write_multprec_start_system();
  fail = write_multprec_start_solutions();
  printf("\n");
  fail = autotune_continuation_parameters(0, deci);
  fail = tune_continuation_parameters();
  printf("\n");
  fail = determine_output_during_continuation();
  fail = solve_by_multprec_homotopy_continuation(deci);
  return fail;
}


x86 assembly (clang, -O0):
<run_multprec_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe31(%rip),%rdi
call   1070 <printf@plt>
lea    0xe5e(%rip),%rdi
call   1070 <printf@plt>
lea    0xe7a(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    0xe6b(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   10d0 <scanf@plt>
mov    -0x8(%rbp),%edi
call   10c0 <read_multprec_target_system@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   10e0 <read_multprec_start_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <define_output_file@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10b0 <write_multprec_target_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <write_multprec_start_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10a0 <write_multprec_start_solutions@plt>
mov    %eax,-0x4(%rbp)
lea    0xdee(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%esi
xor    %edi,%edi
call   1060 <autotune_continuation_parameters@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <tune_continuation_parameters@plt>
mov    %eax,-0x4(%rbp)
lea    0xdcb(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   1090 <determine_output_during_continuation@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <solve_by_multprec_homotopy_continuation@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_multprec_continuation>:
push   %rax
lea    0xe46(%rip),%rdi
call   1080 <puts@plt>
lea    0xe0c(%rip),%rdi
call   1090 <printf@plt>
lea    0xe28(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
lea    0xe1a(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    (%rsp),%edi
call   10e0 <read_multprec_target_system@plt>
mov    (%rsp),%edi
call   1100 <read_multprec_start_system@plt>
xor    %eax,%eax
call   10a0 <define_output_file@plt>
xor    %eax,%eax
call   10d0 <write_multprec_target_system@plt>
xor    %eax,%eax
call   1040 <write_multprec_start_system@plt>
xor    %eax,%eax
call   10c0 <write_multprec_start_solutions@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
mov    (%rsp),%esi
xor    %edi,%edi
call   1070 <autotune_continuation_parameters@plt>
xor    %eax,%eax
call   1060 <tune_continuation_parameters@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
xor    %eax,%eax
call   10b0 <determine_output_during_continuation@plt>
mov    (%rsp),%edi
call   1030 <solve_by_multprec_homotopy_continuation@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"\0ACalling the multiprecision path trackers in PHCpack...\0A\00"
@.str.1 = [40 x i8] c"-> give the number of decimal places : \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @run_multprec_continuation() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%8 = load i32, i32* %2
%9 = call i32 @read_multprec_target_system(i32 %8)
store i32 %9, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @read_multprec_start_system(i32 %10)
store i32 %11, i32* %1
%12 = call i32 (...) @define_output_file()
store i32 %12, i32* %1
%13 = call i32 (...) @write_multprec_target_system()
store i32 %13, i32* %1
%14 = call i32 (...) @write_multprec_start_system()
store i32 %14, i32* %1
%15 = call i32 (...) @write_multprec_start_solutions()
store i32 %15, i32* %1
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%17 = load i32, i32* %2
%18 = call i32 @autotune_continuation_parameters(i32 0, i32 %17)
store i32 %18, i32* %1
%19 = call i32 (...) @tune_continuation_parameters()
store i32 %19, i32* %1
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 (...) @determine_output_during_continuation()
store i32 %21, i32* %1
%22 = load i32, i32* %2
%23 = call i32 @solve_by_multprec_homotopy_continuation(i32 %22)
store i32 %23, i32* %1
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str.1 = [40 x i8] c"-> give the number of decimal places : \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%c\00"
@str = [56 x i8] c"\0ACalling the multiprecision path trackers in PHCpack...\00"
define i32 @run_multprec_continuation() {
%1 = alloca i32
%2 = alloca i8
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%8 = load i32, i32* %1
%9 = call i32 @read_multprec_target_system(i32 %8)
%10 = load i32, i32* %1
%11 = call i32 @read_multprec_start_system(i32 %10)
%12 = call i32 (...) @define_output_file()
%13 = call i32 (...) @write_multprec_target_system()
%14 = call i32 (...) @write_multprec_start_system()
%15 = call i32 (...) @write_multprec_start_solutions()
%16 = call i32 @putchar(i32 10)
%17 = load i32, i32* %1
%18 = call i32 @autotune_continuation_parameters(i32 0, i32 %17)
%19 = call i32 (...) @tune_continuation_parameters()
%20 = call i32 @putchar(i32 10)
%21 = call i32 (...) @determine_output_during_continuation()
%22 = load i32, i32* %1
%23 = call i32 @solve_by_multprec_homotopy_continuation(i32 %22)
ret i32 %23
}