#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 /*<<< orphan*/ printf(char *, ...);
int quaddobl_Newton_Laurent_step();
int solcon_dimension_of_quaddobl_solutions(int *);
int solcon_number_of_quaddobl_solutions(int *);
int solcon_read_quaddobl_solutions();
int solcon_write_quaddobl_solutions();
int syscon_number_of_quaddobl_Laurentials(int *);
int syscon_read_quaddobl_Laurent_system();
void test_quaddobl_Newton_Laurent_step(void) {
  int fail, dim, len;
  printf("\nRunning Newton step with quad double arithmetic ...\n");
  fail = syscon_read_quaddobl_Laurent_system();
  fail = syscon_number_of_quaddobl_Laurentials(&dim);
  printf("The system container has %d Laurent polynomials.\n", dim);
  fail = solcon_read_quaddobl_solutions();
  fail = solcon_number_of_quaddobl_solutions(&len);
  printf("The solution container has size %d.\n", len);
  fail = solcon_dimension_of_quaddobl_solutions(&dim);
  printf("The solutions in the container have dimension %d.\n", dim);
  fail = quaddobl_Newton_Laurent_step();
  printf("The solutions after the Newton step :\n");
  fail = solcon_write_quaddobl_solutions();
}


x86 assembly (clang, -O0):
<test_quaddobl_Newton_Laurent_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   10a0 <syscon_read_quaddobl_Laurent_system@plt>
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <syscon_number_of_quaddobl_Laurentials@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <solcon_read_quaddobl_solutions@plt>
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <solcon_number_of_quaddobl_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1080 <solcon_dimension_of_quaddobl_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1070 <quaddobl_Newton_Laurent_step@plt>
mov    %eax,-0x4(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <solcon_write_quaddobl_solutions@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_quaddobl_Newton_Laurent_step>:
push   %rbx
sub    $0x10,%rsp
lea    0xeee(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10b0 <syscon_read_quaddobl_Laurent_system@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <syscon_number_of_quaddobl_Laurentials@plt>
mov    0x8(%rsp),%esi
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10a0 <solcon_read_quaddobl_solutions@plt>
lea    0xc(%rsp),%rdi
call   1060 <solcon_number_of_quaddobl_solutions@plt>
mov    0xc(%rsp),%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1090 <solcon_dimension_of_quaddobl_solutions@plt>
mov    0x8(%rsp),%esi
lea    0xe5a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1080 <quaddobl_Newton_Laurent_step@plt>
lea    0xead(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <solcon_write_quaddobl_solutions@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"\0ARunning Newton step with quad 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_quaddobl_Newton_Laurent_step() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @syscon_read_quaddobl_Laurent_system()
store i32 %5, i32* %1
%6 = call i32 @syscon_number_of_quaddobl_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_quaddobl_solutions()
store i32 %9, i32* %1
%10 = call i32 @solcon_number_of_quaddobl_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_quaddobl_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 (...) @quaddobl_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_quaddobl_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 = [53 x i8] c"\0ARunning Newton step with quad double arithmetic ...\00"
@str.5 = [38 x i8] c"The solutions after the Newton step :\00"
define void @test_quaddobl_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 ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @syscon_read_quaddobl_Laurent_system()
%7 = call i32 @syscon_number_of_quaddobl_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_quaddobl_solutions()
%11 = call i32 @solcon_number_of_quaddobl_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_quaddobl_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 (...) @quaddobl_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_quaddobl_solutions()
ret void
}