#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 _ada_use_solcon(int, int *, int *, double *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ test_dobldobl_solution_strings(int, int);
void test_dobldobl_solution_container(void) {
  int k, len, n, fail;
  double *c;
  printf("Testing container for double double solutions ...\n\n");
  fail = _ada_use_solcon(40, &k, &k, c);
  printf("The solution list :\n");
  fail = _ada_use_solcon(41, &k, &k, c);
  fail = _ada_use_solcon(42, &k, &len, c);
  printf("Number of solutions : %d\n", len);
  fail = _ada_use_solcon(43, &k, &n, c);
  printf("Dimension of vectors : %d\n", n);
  test_dobldobl_solution_strings(len, n);
}


x86 assembly (clang, -O0):
<test_dobldobl_solution_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rcx
mov    $0x28,%edi
lea    -0x4(%rbp),%rdx
mov    %rdx,%rsi
call   1040 <_ada_use_solcon@plt>
mov    %eax,-0x10(%rbp)
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rcx
mov    $0x29,%edi
lea    -0x4(%rbp),%rdx
mov    %rdx,%rsi
call   1040 <_ada_use_solcon@plt>
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x2a,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <_ada_use_solcon@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rcx
mov    $0x2b,%edi
lea    -0x4(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <_ada_use_solcon@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <test_dobldobl_solution_strings@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dobldobl_solution_container>:
push   %rbx
sub    $0x10,%rsp
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rbx
mov    $0x28,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1050 <_ada_use_solcon@plt>
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x29,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1050 <_ada_use_solcon@plt>
lea    0x8(%rsp),%rdx
mov    $0x2a,%edi
mov    %rbx,%rsi
call   1050 <_ada_use_solcon@plt>
mov    0x8(%rsp),%esi
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rdx
mov    $0x2b,%edi
mov    %rbx,%rsi
call   1050 <_ada_use_solcon@plt>
mov    0x4(%rsp),%esi
lea    0xe57(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
call   1060 <test_dobldobl_solution_strings@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Testing container for double double solutions ...\0A\0A\00"
@.str.1 = [21 x i8] c"The solution list :\0A\00"
@.str.2 = [26 x i8] c"Number of solutions : %d\0A\00"
@.str.3 = [27 x i8] c"Dimension of vectors : %d\0A\00"
define void @test_dobldobl_solution_container() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%7 = load double*, double** %5
%8 = call i32 @_ada_use_solcon(i32 40, i32* %1, i32* %1, double* %7)
store i32 %8, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%10 = load double*, double** %5
%11 = call i32 @_ada_use_solcon(i32 41, i32* %1, i32* %1, double* %10)
store i32 %11, i32* %4
%12 = load double*, double** %5
%13 = call i32 @_ada_use_solcon(i32 42, i32* %1, i32* %2, double* %12)
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load double*, double** %5
%17 = call i32 @_ada_use_solcon(i32 43, i32* %1, i32* %3, double* %16)
store i32 %17, i32* %4
%18 = load i32, i32* %3
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = call i32 @test_dobldobl_solution_strings(i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
@.str.2 = [26 x i8] c"Number of solutions : %d\0A\00"
@.str.3 = [27 x i8] c"Dimension of vectors : %d\0A\00"
@str = [51 x i8] c"Testing container for double double solutions ...\0A\00"
@str.4 = [20 x i8] c"The solution list :\00"
define void @test_dobldobl_solution_container() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%8 = call i32 @_ada_use_solcon(i32 40, i32* %1, i32* %1, double* undef)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0))
%10 = call i32 @_ada_use_solcon(i32 41, i32* %1, i32* %1, double* undef)
%11 = call i32 @_ada_use_solcon(i32 42, i32* %1, i32* %2, double* undef)
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = call i32 @_ada_use_solcon(i32 43, i32* %1, i32* %3, double* undef)
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = call i32 @test_dobldobl_solution_strings(i32 %17, i32 %18)
ret void
}