#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 dobldobl_Newton_Laurent_step();
int /*<<< orphan*/ printf(char *, ...);
int solcon_dimension_of_dobldobl_solutions(int *);
int solcon_number_of_dobldobl_solutions(int *);
int solcon_read_dobldobl_solutions();
int solcon_write_dobldobl_solutions();
int syscon_number_of_dobldobl_Laurentials(int *);
int syscon_read_dobldobl_Laurent_system();
void test_dobldobl_Newton_Laurent_step(void) {
  int fail, dim, len;
  printf("\nRunning Newton step with double double arithmetic ...\n");
  fail = syscon_read_dobldobl_Laurent_system();
  fail = syscon_number_of_dobldobl_Laurentials(&dim);
  printf("The system container has %d Laurent polynomials.\n", dim);
  fail = solcon_read_dobldobl_solutions();
  fail = solcon_number_of_dobldobl_solutions(&len);
  printf("The solution container has size %d.\n", len);
  fail = solcon_dimension_of_dobldobl_solutions(&dim);
  printf("The solutions in the container have dimension %d.\n", dim);
  fail = dobldobl_Newton_Laurent_step();
  printf("The solutions after the Newton step :\n");
  fail = solcon_write_dobldobl_solutions();
}


x86 assembly (clang, -O0):
<test_dobldobl_Newton_Laurent_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <syscon_read_dobldobl_Laurent_system@plt>
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   10a0 <syscon_number_of_dobldobl_Laurentials@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <solcon_read_dobldobl_solutions@plt>
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1070 <solcon_number_of_dobldobl_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1090 <solcon_dimension_of_dobldobl_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1080 <dobldobl_Newton_Laurent_step@plt>
mov    %eax,-0x4(%rbp)
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <solcon_write_dobldobl_solutions@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dobldobl_Newton_Laurent_step>:
push   %rbx
sub    $0x10,%rsp
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <syscon_read_dobldobl_Laurent_system@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   10b0 <syscon_number_of_dobldobl_Laurentials@plt>
mov    0x8(%rsp),%esi
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <solcon_read_dobldobl_solutions@plt>
lea    0xc(%rsp),%rdi
call   1080 <solcon_number_of_dobldobl_solutions@plt>
mov    0xc(%rsp),%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   10a0 <solcon_dimension_of_dobldobl_solutions@plt>
mov    0x8(%rsp),%esi
lea    0xe5a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <dobldobl_Newton_Laurent_step@plt>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <solcon_write_dobldobl_solutions@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0ARunning Newton step with double double arithmetic ...\0A\00"
@.str.1 = [50 x i8] c"The system container has %d Laurent polynomials.\0A\00"
@.str.2 = [37 x i8] c"The solution container has size %d.\0A\00"
@.str.3 = [51 x i8] c"The solutions in the container have dimension %d.\0A\00"
@.str.4 = [39 x i8] c"The solutions after the Newton step :\0A\00"
define void @test_dobldobl_Newton_Laurent_step() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @syscon_read_dobldobl_Laurent_system()
store i32 %5, i32* %1
%6 = call i32 @syscon_number_of_dobldobl_Laurentials(i32* %2)
store i32 %6, i32* %1
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @solcon_read_dobldobl_solutions()
store i32 %9, i32* %1
%10 = call i32 @solcon_number_of_dobldobl_solutions(i32* %3)
store i32 %10, i32* %1
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = call i32 @solcon_dimension_of_dobldobl_solutions(i32* %2)
store i32 %13, i32* %1
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = call i32 (...) @dobldobl_Newton_Laurent_step()
store i32 %16, i32* %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (...) @solcon_write_dobldobl_solutions()
store i32 %18, i32* %1
ret void
}

LLVM IR (-O2):
@.str.1 = [50 x i8] c"The system container has %d Laurent polynomials.\0A\00"
@.str.2 = [37 x i8] c"The solution container has size %d.\0A\00"
@.str.3 = [51 x i8] c"The solutions in the container have dimension %d.\0A\00"
@str = [55 x i8] c"\0ARunning Newton step with double double arithmetic ...\00"
@str.5 = [38 x i8] c"The solutions after the Newton step :\00"
define void @test_dobldobl_Newton_Laurent_step() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @syscon_read_dobldobl_Laurent_system()
%7 = call i32 @syscon_number_of_dobldobl_Laurentials(i32* %1)
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @solcon_read_dobldobl_solutions()
%11 = call i32 @solcon_number_of_dobldobl_solutions(i32* %2)
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = call i32 @solcon_dimension_of_dobldobl_solutions(i32* %1)
%15 = load i32, i32* %1
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @dobldobl_Newton_Laurent_step()
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.5, i64 0, i64 0))
%19 = call i32 (...) @solcon_write_dobldobl_solutions()
ret void
}