#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 solcon_dimension_of_standard_solutions(int *);
int solcon_number_of_standard_solutions(int *);
int solcon_read_standard_solutions();
int solcon_write_standard_solutions();
int standard_Newton_Laurent_step();
int syscon_number_of_standard_Laurentials(int *);
int syscon_read_standard_Laurent_system();
void test_standard_Newton_Laurent_step(void) {
  int fail, dim, len;
  printf("\nRunning Newton step with standard arithmetic ...\n");
  fail = syscon_read_standard_Laurent_system();
  fail = syscon_number_of_standard_Laurentials(&dim);
  printf("The system container has %d Laurent polynomials.\n", dim);
  fail = solcon_read_standard_solutions();
  fail = solcon_number_of_standard_solutions(&len);
  printf("The solution container has size %d.\n", len);
  fail = solcon_dimension_of_standard_solutions(&dim);
  printf("The solutions in the container have dimension %d.\n", dim);
  fail = standard_Newton_Laurent_step();
  printf("The solutions after the Newton step :\n");
  fail = solcon_write_standard_solutions();
}


x86 assembly (clang, -O0):
<test_standard_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   1080 <syscon_read_standard_Laurent_system@plt>
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1070 <syscon_number_of_standard_Laurentials@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   10a0 <solcon_read_standard_solutions@plt>
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <solcon_number_of_standard_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1090 <solcon_dimension_of_standard_solutions@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <standard_Newton_Laurent_step@plt>
mov    %eax,-0x4(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <solcon_write_standard_solutions@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_standard_Newton_Laurent_step>:
push   %rbx
sub    $0x10,%rsp
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1090 <syscon_read_standard_Laurent_system@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <syscon_number_of_standard_Laurentials@plt>
mov    0x8(%rsp),%esi
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   10b0 <solcon_read_standard_solutions@plt>
lea    0xc(%rsp),%rdi
call   1060 <solcon_number_of_standard_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_standard_solutions@plt>
mov    0x8(%rsp),%esi
lea    0xe5a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <standard_Newton_Laurent_step@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <solcon_write_standard_solutions@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"\0ARunning Newton step with standard 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_standard_Newton_Laurent_step() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @syscon_read_standard_Laurent_system()
store i32 %5, i32* %1
%6 = call i32 @syscon_number_of_standard_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_standard_solutions()
store i32 %9, i32* %1
%10 = call i32 @solcon_number_of_standard_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_standard_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 (...) @standard_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_standard_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 = [50 x i8] c"\0ARunning Newton step with standard arithmetic ...\00"
@str.5 = [38 x i8] c"The solutions after the Newton step :\00"
define void @test_standard_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 ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @syscon_read_standard_Laurent_system()
%7 = call i32 @syscon_number_of_standard_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_standard_solutions()
%11 = call i32 @solcon_number_of_standard_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_standard_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 (...) @standard_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_standard_solutions()
ret void
}