#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 copy_quaddobl_start_solutions_to_container();
int copy_quaddobl_target_system_to_container();
int /*<<< orphan*/ padcon_define_partition(int, int, int *);
int padcon_prompt_for_multi_homogenization(int);
int /*<<< orphan*/ padcon_quaddobl_multi_projective_transformation(int, int,
                                                                   int *);
int /*<<< orphan*/ padcon_quaddobl_projective_transformation();
int padcon_quaddobl_track(int, char *, int /*<<< orphan*/, int, int, int,
                          int *);
int /*<<< orphan*/ printf(char *, ...);
int read_quaddobl_start_system();
int read_quaddobl_target_system();
int solcon_number_of_quaddobl_solutions(int *);
int solcon_quaddobl_multi_affinization(int, int, int *);
int solcon_quaddobl_one_affinization();
int solcon_write_quaddobl_solutions();
int solcon_write_solution_banner_to_defined_output_file();
int syscon_number_of_symbols(int *);
int syscon_quaddobl_multi_affinization(int);
int syscon_quaddobl_one_affinization();
int syscon_write_quaddobl_system();
void quaddobl_track(int nbc, char *name, int verbose) {
  int fail, length, mhom, dim;
  fail = read_quaddobl_target_system();
  fail = read_quaddobl_start_system();
  fail = copy_quaddobl_start_solutions_to_container();
  fail = solcon_number_of_quaddobl_solutions(&length);
  printf("Read %d start solutions.\n", length);
  fail = syscon_number_of_symbols(&dim);
  mhom = padcon_prompt_for_multi_homogenization(dim);
  if (mhom > 1) {
    int idz[dim];
    padcon_define_partition(mhom, dim, idz);
    padcon_quaddobl_multi_projective_transformation(dim, mhom, idz);
    if (nbc > 0)
      printf("\nSee the output file %s ...\n", name);
    fail = padcon_quaddobl_track(nbc, name, 0, verbose, mhom, dim, idz);
    fail = solcon_quaddobl_multi_affinization(dim, mhom, idz);
    fail = copy_quaddobl_target_system_to_container();
    fail = syscon_quaddobl_multi_affinization(mhom);
  } else {
    if (mhom == 1)
      padcon_quaddobl_projective_transformation();
    if (nbc > 0)
      printf("\nSee the output file %s ...\n", name);
    fail = padcon_quaddobl_track(nbc, name, 0, verbose, mhom, 0, &fail);
    if (mhom == 1) {
      fail = solcon_quaddobl_one_affinization();
      fail = copy_quaddobl_target_system_to_container();
      fail = syscon_quaddobl_one_affinization();
    }
  }
  fail = syscon_write_quaddobl_system();
  if (nbc != 0)
    fail = solcon_write_solution_banner_to_defined_output_file();
  fail = solcon_write_quaddobl_solutions();
}


x86 assembly (clang, -O0):
<quaddobl_track>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1080 <read_quaddobl_target_system@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <read_quaddobl_start_system@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10f0 <copy_quaddobl_start_solutions_to_container@plt>
mov    %eax,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
call   1090 <solcon_number_of_quaddobl_solutions@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x24(%rbp),%rdi
call   10d0 <syscon_number_of_symbols@plt>
mov    %eax,-0x18(%rbp)
mov    -0x24(%rbp),%edi
call   1050 <padcon_prompt_for_multi_homogenization@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
jle    135a <quaddobl_track+0x12a>
mov    -0x24(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x40(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1130 <padcon_define_partition@plt>
mov    -0x40(%rbp),%rdx
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1110 <padcon_quaddobl_multi_projective_transformation@plt>
cmpl   $0x0,-0x4(%rbp)
jle    12fb <quaddobl_track+0xcb>
mov    -0x10(%rbp),%rsi
lea    0xd26(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
xor    %edx,%edx
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1120 <padcon_quaddobl_track@plt>
mov    -0x40(%rbp),%rdx
add    $0x10,%rsp
mov    %eax,-0x18(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1100 <solcon_quaddobl_multi_affinization@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10c0 <copy_quaddobl_target_system_to_container@plt>
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%edi
call   1140 <syscon_quaddobl_multi_affinization@plt>
mov    %eax,-0x18(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
jmp    13e0 <quaddobl_track+0x1b0>
cmpl   $0x1,-0x20(%rbp)
jne    136b <quaddobl_track+0x13b>
mov    $0x0,%al
call   1030 <padcon_quaddobl_projective_transformation@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1387 <quaddobl_track+0x157>
mov    -0x10(%rbp),%rsi
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8d
xor    %r9d,%r9d
lea    -0x18(%rbp),%rax
sub    $0x10,%rsp
mov    %r9d,%edx
mov    %rax,(%rsp)
call   1120 <padcon_quaddobl_track@plt>
add    $0x10,%rsp
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x20(%rbp)
jne    13db <quaddobl_track+0x1ab>
mov    $0x0,%al
call   10b0 <solcon_quaddobl_one_affinization@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10c0 <copy_quaddobl_target_system_to_container@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1150 <syscon_quaddobl_one_affinization@plt>
mov    %eax,-0x18(%rbp)
jmp    13e0 <quaddobl_track+0x1b0>
mov    $0x0,%al
call   10e0 <syscon_write_quaddobl_system@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     13fe <quaddobl_track+0x1ce>
mov    $0x0,%al
call   1070 <solcon_write_solution_banner_to_defined_output_file@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <solcon_write_quaddobl_solutions@plt>
mov    %eax,-0x18(%rbp)
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_track>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r14d
mov    %rsi,%r15
mov    %edi,%r12d
xor    %eax,%eax
call   1080 <read_quaddobl_target_system@plt>
xor    %eax,%eax
call   1040 <read_quaddobl_start_system@plt>
xor    %eax,%eax
call   10f0 <copy_quaddobl_start_solutions_to_container@plt>
lea    -0x34(%rbp),%rdi
call   1090 <solcon_number_of_quaddobl_solutions@plt>
mov    -0x34(%rbp),%esi
lea    0xd8e(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
lea    -0x30(%rbp),%rdi
call   10d0 <syscon_number_of_symbols@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%edi
call   1050 <padcon_prompt_for_multi_homogenization@plt>
mov    %eax,%r13d
cmp    $0x2,%eax
jl     132d <quaddobl_track+0xfd>
mov    %rsp,-0x40(%rbp)
mov    -0x30(%rbp),%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    -0x30(%rbp),%esi
mov    %r13d,%edi
mov    %rbx,%rdx
call   1130 <padcon_define_partition@plt>
mov    -0x30(%rbp),%edi
mov    %r13d,%esi
mov    %rbx,%rdx
call   1110 <padcon_quaddobl_multi_projective_transformation@plt>
test   %r12d,%r12d
jle    12e7 <quaddobl_track+0xb7>
lea    0xd3d(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    -0x30(%rbp),%r9d
sub    $0x8,%rsp
mov    %r12d,%edi
mov    %r15,%rsi
xor    %edx,%edx
mov    %r14d,%ecx
mov    %r13d,%r8d
push   %rbx
call   1120 <padcon_quaddobl_track@plt>
add    $0x10,%rsp
mov    -0x30(%rbp),%edi
mov    %r13d,%esi
mov    %rbx,%rdx
call   1100 <solcon_quaddobl_multi_affinization@plt>
xor    %eax,%eax
call   10c0 <copy_quaddobl_target_system_to_container@plt>
mov    %r13d,%edi
call   1140 <syscon_quaddobl_multi_affinization@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x40(%rbp),%rsp
jmp    139a <quaddobl_track+0x16a>
cmp    $0x1,%r13d
jne    133a <quaddobl_track+0x10a>
xor    %eax,%eax
call   1030 <padcon_quaddobl_projective_transformation@plt>
test   %r12d,%r12d
jle    1350 <quaddobl_track+0x120>
lea    0xcd4(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
sub    $0x8,%rsp
lea    -0x2c(%rbp),%rax
mov    %r12d,%edi
mov    %r15,%rsi
xor    %edx,%edx
mov    %r14d,%ecx
mov    %r13d,%r8d
xor    %r9d,%r9d
push   %rax
call   1120 <padcon_quaddobl_track@plt>
add    $0x10,%rsp
mov    %eax,-0x2c(%rbp)
cmp    $0x1,%r13d
jne    139a <quaddobl_track+0x16a>
xor    %eax,%eax
call   10b0 <solcon_quaddobl_one_affinization@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
call   10c0 <copy_quaddobl_target_system_to_container@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
call   1150 <syscon_quaddobl_one_affinization@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
call   10e0 <syscon_write_quaddobl_system@plt>
mov    %eax,-0x2c(%rbp)
test   %r12d,%r12d
je     13b3 <quaddobl_track+0x183>
xor    %eax,%eax
call   1070 <solcon_write_solution_banner_to_defined_output_file@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
call   1060 <solcon_write_quaddobl_solutions@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Read %d start solutions.\0A\00"
@.str.1 = [29 x i8] c"\0ASee the output file %s ...\0A\00"
define void @quaddobl_track(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%13 = call i32 (...) @read_quaddobl_target_system()
store i32 %13, i32* %7
%14 = call i32 (...) @read_quaddobl_start_system()
store i32 %14, i32* %7
%15 = call i32 (...) @copy_quaddobl_start_solutions_to_container()
store i32 %15, i32* %7
%16 = call i32 @solcon_number_of_quaddobl_solutions(i32* %8)
store i32 %16, i32* %7
%17 = load i32, i32* %8
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = call i32 @syscon_number_of_symbols(i32* %10)
store i32 %19, i32* %7
%20 = load i32, i32* %10
%21 = call i32 @padcon_prompt_for_multi_homogenization(i32 %20)
store i32 %21, i32* %9
%22 = load i32, i32* %9
%23 = icmp sgt i32 %22, 1
br i1 %23, label %24, label %54
24: ; preds = %3
%25 = load i32, i32* %10
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %11
%28 = alloca i32, i64 %26
store i64 %26, i64* %12
%29 = load i32, i32* %9
%30 = load i32, i32* %10
%31 = call i32 @padcon_define_partition(i32 %29, i32 %30, i32* %28)
%32 = load i32, i32* %10
%33 = load i32, i32* %9
%34 = call i32 @padcon_quaddobl_multi_projective_transformation(i32 %32, i32 %33, i32* %28)
%35 = load i32, i32* %4
%36 = icmp sgt i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %24
%38 = load i8*, i8** %5
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %38)
br label %40
40: ; preds = %37, %24
%41 = load i32, i32* %4
%42 = load i8*, i8** %5
%43 = load i32, i32* %6
%44 = load i32, i32* %9
%45 = load i32, i32* %10
%46 = call i32 @padcon_quaddobl_track(i32 %41, i8* %42, i32 0, i32 %43, i32 %44, i32 %45, i32* %28)
store i32 %46, i32* %7
%47 = load i32, i32* %10
%48 = load i32, i32* %9
%49 = call i32 @solcon_quaddobl_multi_affinization(i32 %47, i32 %48, i32* %28)
store i32 %49, i32* %7
%50 = call i32 (...) @copy_quaddobl_target_system_to_container()
store i32 %50, i32* %7
%51 = load i32, i32* %9
%52 = call i32 @syscon_quaddobl_multi_affinization(i32 %51)
store i32 %52, i32* %7
%53 = load i8*, i8** %11
br label %78
54: ; preds = %3
%55 = load i32, i32* %9
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = call i32 (...) @padcon_quaddobl_projective_transformation()
br label %59
59: ; preds = %57, %54
%60 = load i32, i32* %4
%61 = icmp sgt i32 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = load i8*, i8** %5
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %63)
br label %65
65: ; preds = %62, %59
%66 = load i32, i32* %4
%67 = load i8*, i8** %5
%68 = load i32, i32* %6
%69 = load i32, i32* %9
%70 = call i32 @padcon_quaddobl_track(i32 %66, i8* %67, i32 0, i32 %68, i32 %69, i32 0, i32* %7)
store i32 %70, i32* %7
%71 = load i32, i32* %9
%72 = icmp eq i32 %71, 1
br i1 %72, label %73, label %77
73: ; preds = %65
%74 = call i32 (...) @solcon_quaddobl_one_affinization()
store i32 %74, i32* %7
%75 = call i32 (...) @copy_quaddobl_target_system_to_container()
store i32 %75, i32* %7
%76 = call i32 (...) @syscon_quaddobl_one_affinization()
store i32 %76, i32* %7
br label %77
77: ; preds = %73, %65
br label %78
78: ; preds = %77, %40
%79 = call i32 (...) @syscon_write_quaddobl_system()
store i32 %79, i32* %7
%80 = load i32, i32* %4
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %78
%83 = call i32 (...) @solcon_write_solution_banner_to_defined_output_file()
store i32 %83, i32* %7
br label %84
84: ; preds = %82, %78
%85 = call i32 (...) @solcon_write_quaddobl_solutions()
store i32 %85, i32* %7
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Read %d start solutions.\0A\00"
@.str.1 = [29 x i8] c"\0ASee the output file %s ...\0A\00"
define void @quaddobl_track(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = bitcast i32* %6 to i8*
%10 = tail call i32 (...) @read_quaddobl_target_system()
%11 = tail call i32 (...) @read_quaddobl_start_system()
%12 = tail call i32 (...) @copy_quaddobl_start_solutions_to_container()
%13 = call i32 @solcon_number_of_quaddobl_solutions(i32* %5)
%14 = load i32, i32* %5
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = call i32 @syscon_number_of_symbols(i32* %6)
store i32 %16, i32* %4
%17 = load i32, i32* %6
%18 = call i32 @padcon_prompt_for_multi_homogenization(i32 %17)
%19 = icmp sgt i32 %18, 1
br i1 %19, label %20, label %39
20: ; preds = %3
%21 = load i32, i32* %6
%22 = zext i32 %21 to i64
%23 = call i8* @llvm.stacksave()
%24 = alloca i32, i64 %22
%25 = load i32, i32* %6
%26 = call i32 @padcon_define_partition(i32 %18, i32 %25, i32* %24)
%27 = load i32, i32* %6
%28 = call i32 @padcon_quaddobl_multi_projective_transformation(i32 %27, i32 %18, i32* %24)
%29 = icmp sgt i32 %0, 0
br i1 %29, label %30, label %32
30: ; preds = %20
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %32
32: ; preds = %30, %20
%33 = load i32, i32* %6
%34 = call i32 @padcon_quaddobl_track(i32 %0, i8* %1, i32 0, i32 %2, i32 %18, i32 %33, i32* %24)
%35 = load i32, i32* %6
%36 = call i32 @solcon_quaddobl_multi_affinization(i32 %35, i32 %18, i32* %24)
%37 = call i32 (...) @copy_quaddobl_target_system_to_container()
%38 = call i32 @syscon_quaddobl_multi_affinization(i32 %18)
store i32 %38, i32* %4
br label %53
39: ; preds = %3
%40 = icmp eq i32 %18, 1
br i1 %40, label %41, label %43
41: ; preds = %39
%42 = call i32 (...) @padcon_quaddobl_projective_transformation()
br label %43
43: ; preds = %41, %39
%44 = icmp sgt i32 %0, 0
br i1 %44, label %45, label %47
45: ; preds = %43
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %47
47: ; preds = %45, %43
%48 = call i32 @padcon_quaddobl_track(i32 %0, i8* %1, i32 0, i32 %2, i32 %18, i32 0, i32* %4)
store i32 %48, i32* %4
br i1 %40, label %49, label %53
49: ; preds = %47
%50 = call i32 (...) @solcon_quaddobl_one_affinization()
store i32 %50, i32* %4
%51 = call i32 (...) @copy_quaddobl_target_system_to_container()
store i32 %51, i32* %4
%52 = call i32 (...) @syscon_quaddobl_one_affinization()
store i32 %52, i32* %4
br label %53
53: ; preds = %47, %49, %32
%54 = call i32 (...) @syscon_write_quaddobl_system()
store i32 %54, i32* %4
%55 = icmp eq i32 %0, 0
br i1 %55, label %58, label %56
56: ; preds = %53
%57 = call i32 (...) @solcon_write_solution_banner_to_defined_output_file()
store i32 %57, i32* %4
br label %58
58: ; preds = %56, %53
%59 = call i32 (...) @solcon_write_quaddobl_solutions()
ret void
}