#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 ade_manypaths_qd(int, double, double);
int copy_quaddobl_start_solutions_to_container();
int /*<<< orphan*/ printf(char *, ...);
int read_quaddobl_start_system();
int read_quaddobl_target_system();
int solcon_number_of_quaddobl_solutions(int *);
int solcon_write_quaddobl_solutions();
void test_manypaths(void) {
  int fail, len;
  printf("\nTracking many solution paths ...\n");
  fail = read_quaddobl_target_system();
  fail = read_quaddobl_start_system();
  fail = copy_quaddobl_start_solutions_to_container();
  fail = solcon_number_of_quaddobl_solutions(&len);
  printf("The solution container has size %d.\n", len);
  fail = ade_manypaths_qd(1, 1.0, 0.0);
  printf("The solutions after Newton's method :\n");
  fail = solcon_write_quaddobl_solutions();
}


x86 assembly (clang, -O0):
<test_manypaths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1050 <read_quaddobl_target_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <read_quaddobl_start_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <copy_quaddobl_start_solutions_to_container@plt>
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1060 <solcon_number_of_quaddobl_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
movsd  0xe32(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1090 <ade_manypaths_qd@plt>
mov    %eax,-0x4(%rbp)
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1040 <solcon_write_quaddobl_solutions@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_manypaths>:
push   %rax
lea    0xea5(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1060 <read_quaddobl_target_system@plt>
xor    %eax,%eax
call   1030 <read_quaddobl_start_system@plt>
xor    %eax,%eax
call   1090 <copy_quaddobl_start_solutions_to_container@plt>
lea    0x4(%rsp),%rdi
call   1070 <solcon_number_of_quaddobl_solutions@plt>
mov    0x4(%rsp),%esi
lea    0xe51(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
movsd  0xe3a(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x1,%edi
call   10a0 <ade_manypaths_qd@plt>
lea    0xe75(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1040 <solcon_write_quaddobl_solutions@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [35 x i8] c"\0ATracking many solution paths ...\0A\00"
@.str.1 = [37 x i8] c"The solution container has size %d.\0A\00"
@.str.2 = [39 x i8] c"The solutions after Newton's method :\0A\00"
define void @test_manypaths() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @read_quaddobl_target_system()
store i32 %4, i32* %1
%5 = call i32 (...) @read_quaddobl_start_system()
store i32 %5, i32* %1
%6 = call i32 (...) @copy_quaddobl_start_solutions_to_container()
store i32 %6, i32* %1
%7 = call i32 @solcon_number_of_quaddobl_solutions(i32* %2)
store i32 %7, i32* %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @ade_manypaths_qd(i32 1, double 1.000000e+00, double 0.000000e+00)
store i32 %10, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (...) @solcon_write_quaddobl_solutions()
store i32 %12, i32* %1
ret void
}

LLVM IR (-O2):
@.str.1 = [37 x i8] c"The solution container has size %d.\0A\00"
@str = [34 x i8] c"\0ATracking many solution paths ...\00"
@str.3 = [38 x i8] c"The solutions after Newton's method :\00"
define void @test_manypaths() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @read_quaddobl_target_system()
%5 = tail call i32 (...) @read_quaddobl_start_system()
%6 = tail call i32 (...) @copy_quaddobl_start_solutions_to_container()
%7 = call i32 @solcon_number_of_quaddobl_solutions(i32* %1)
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @ade_manypaths_qd(i32 1, double 1.000000e+00, double 0.000000e+00)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.3, i64 0, i64 0))
%12 = call i32 (...) @solcon_write_quaddobl_solutions()
ret void
}