#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*/ ask_options_for_series(int *, int *, int *, int *);
int copy_quaddobl_start_solutions_to_container();
int copy_quaddobl_start_system_to_container();
int /*<<< orphan*/ printf(char *);
int quaddobl_Newton_series(int, int, int, int);
int /*<<< orphan*/ quaddobl_query_pool();
int read_quaddobl_start_system();
void quaddobl_series_test(void) {
  int fail, idx, maxdeg, nbr, verbose;
  printf("\nNewton power series method in quad double precision ...\n");
  fail = read_quaddobl_start_system();
  fail = copy_quaddobl_start_system_to_container();
  fail = copy_quaddobl_start_solutions_to_container();
  ask_options_for_series(&idx, &maxdeg, &nbr, &verbose);
  fail = quaddobl_Newton_series(idx, maxdeg, nbr, verbose);
  printf("\nDone with Newton's method.");
  quaddobl_query_pool();
}


x86 assembly (clang, -O0):
<quaddobl_series_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <read_quaddobl_start_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <copy_quaddobl_start_system_to_container@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
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1030 <ask_options_for_series@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1070 <quaddobl_Newton_series@plt>
mov    %eax,-0x4(%rbp)
lea    0xe68(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <quaddobl_query_pool@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_series_test>:
sub    $0x18,%rsp
lea    0xe91(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1040 <read_quaddobl_start_system@plt>
xor    %eax,%eax
call   1070 <copy_quaddobl_start_system_to_container@plt>
xor    %eax,%eax
call   1090 <copy_quaddobl_start_solutions_to_container@plt>
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <ask_options_for_series@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1080 <quaddobl_Newton_series@plt>
lea    0xe26(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <quaddobl_query_pool@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [58 x i8] c"\0ANewton power series method in quad double precision ...\0A\00"
@.str.1 = [28 x i8] c"\0ADone with Newton's method.\00"
define void @quaddobl_series_test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @read_quaddobl_start_system()
store i32 %7, i32* %1
%8 = call i32 (...) @copy_quaddobl_start_system_to_container()
store i32 %8, i32* %1
%9 = call i32 (...) @copy_quaddobl_start_solutions_to_container()
store i32 %9, i32* %1
%10 = call i32 @ask_options_for_series(i32* %2, i32* %3, i32* %4, i32* %5)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @quaddobl_Newton_series(i32 %11, i32 %12, i32 %13, i32 %14)
store i32 %15, i32* %1
%16 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (...) @quaddobl_query_pool()
ret void
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"\0ADone with Newton's method.\00"
@str = [57 x i8] c"\0ANewton power series method in quad double precision ...\00"
define void @quaddobl_series_test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 (...) @read_quaddobl_start_system()
%11 = tail call i32 (...) @copy_quaddobl_start_system_to_container()
%12 = tail call i32 (...) @copy_quaddobl_start_solutions_to_container()
%13 = call i32 @ask_options_for_series(i32* %1, i32* %2, i32* %3, i32* %4)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = call i32 @quaddobl_Newton_series(i32 %14, i32 %15, i32 %16, i32 %17)
%19 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 (...) @quaddobl_query_pool()
ret void
}