#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_c2phc(int, int *, int *, double *, int);
int solve_dobldobl_Laurent_system(int *root_count, int silent, int *nrcs,
                                  char *rocos, int nbtasks, int vrb) {
  int fail, i;
  int a[2];
  int b[1024];
  double *c;
  b[0] = silent;
  b[1] = nbtasks;
  fail = _ada_use_c2phc(701, a, b, c, vrb);
  *root_count = a[0];
  if (silent == 0) {
    *nrcs = a[1];
    for (i = 0; i < (*nrcs); i++)
      rocos[i] = (char)b[i];
    rocos[*nrcs] = '\0';
  }
  return fail;
}


x86 assembly (clang, -O0):
<solve_dobldobl_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1050,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1040(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x103c(%rbp)
lea    -0x38(%rbp),%rsi
lea    -0x1040(%rbp),%rdx
mov    -0x1048(%rbp),%rcx
mov    -0x28(%rbp),%r8d
mov    $0x2bd,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0xc(%rbp)
jne    11ce <solve_dobldobl_Laurent_system+0xbe>
mov    -0x34(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    11bf <solve_dobldobl_Laurent_system+0xaf>
movslq -0x30(%rbp),%rax
mov    -0x1040(%rbp,%rax,4),%eax
mov    %al,%dl
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    118a <solve_dobldobl_Laurent_system+0x7a>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
add    $0x1050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_dobldobl_Laurent_system>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1018,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r15
mov    %esi,0x10(%rsp)
mov    %r8d,0x14(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x2bd,%edi
mov    %r9d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    0x8(%rsp),%ecx
mov    %ecx,(%r15)
test   %ebp,%ebp
jne    117d <solve_dobldobl_Laurent_system+0x6d>
mov    0xc(%rsp),%ecx
mov    %ecx,(%rbx)
test   %ecx,%ecx
jle    1175 <solve_dobldobl_Laurent_system+0x65>
xor    %edx,%edx
nop
movzbl 0x10(%rsp,%rdx,4),%ecx
mov    %cl,(%r14,%rdx,1)
add    $0x1,%rdx
movslq (%rbx),%rcx
cmp    %rcx,%rdx
jl     1160 <solve_dobldobl_Laurent_system+0x50>
movslq %ecx,%rcx
movb   $0x0,(%r14,%rcx,1)
add    $0x1018,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @solve_dobldobl_Laurent_system(i32* %0, i32 %1, i32* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [2 x i32]
%16 = alloca [1024 x i32]
%17 = alloca double*
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%18 = load i32, i32* %8
%19 = getelementptr inbounds [1024 x i32], [1024 x i32]* %16, i64 0, i64 0
store i32 %18, i32* %19
%20 = load i32, i32* %11
%21 = getelementptr inbounds [1024 x i32], [1024 x i32]* %16, i64 0, i64 1
store i32 %20, i32* %21
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %15, i64 0, i64 0
%23 = getelementptr inbounds [1024 x i32], [1024 x i32]* %16, i64 0, i64 0
%24 = load double*, double** %17
%25 = load i32, i32* %12
%26 = call i32 @_ada_use_c2phc(i32 701, i32* %22, i32* %23, double* %24, i32 %25)
store i32 %26, i32* %13
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %15, i64 0, i64 0
%28 = load i32, i32* %27
%29 = load i32*, i32** %7
store i32 %28, i32* %29
%30 = load i32, i32* %8
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %60
32: ; preds = %6
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %15, i64 0, i64 1
%34 = load i32, i32* %33
%35 = load i32*, i32** %9
store i32 %34, i32* %35
store i32 0, i32* %14
br label %36
36: ; preds = %51, %32
%37 = load i32, i32* %14
%38 = load i32*, i32** %9
%39 = load i32, i32* %38
%40 = icmp slt i32 %37, %39
br i1 %40, label %41, label %54
41: ; preds = %36
%42 = load i32, i32* %14
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [1024 x i32], [1024 x i32]* %16, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %10
%48 = load i32, i32* %14
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %47, i64 %49
store i8 %46, i8* %50
br label %51
51: ; preds = %41
%52 = load i32, i32* %14
%53 = add nsw i32 %52, 1
store i32 %53, i32* %14
br label %36
54: ; preds = %36
%55 = load i8*, i8** %10
%56 = load i32*, i32** %9
%57 = load i32, i32* %56
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %55, i64 %58
store i8 0, i8* %59
br label %60
60: ; preds = %54, %6
%61 = load i32, i32* %13
ret i32 %61
}

LLVM IR (-O2):
define i32 @solve_dobldobl_Laurent_system(i32* nocapture writeonly %0, i32 %1, i32* nocapture %2, i8* nocapture writeonly %3, i32 %4, i32 %5) {
%7 = alloca [2 x i32]
%8 = alloca [1024 x i32]
%9 = bitcast [2 x i32]* %7 to i8*
%10 = bitcast [1024 x i32]* %8 to i8*
%11 = getelementptr inbounds [1024 x i32], [1024 x i32]* %8, i64 0, i64 0
store i32 %1, i32* %11
%12 = getelementptr inbounds [1024 x i32], [1024 x i32]* %8, i64 0, i64 1
store i32 %4, i32* %12
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%14 = call i32 @_ada_use_c2phc(i32 701, i32* %13, i32* %11, double* undef, i32 %5)
%15 = load i32, i32* %13
store i32 %15, i32* %0
%16 = icmp eq i32 %1, 0
br i1 %16, label %17, label %35
17: ; preds = %6
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%19 = load i32, i32* %18
store i32 %19, i32* %2
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %31
21: ; preds = %17, %21
%22 = phi i64 [ %27, %21 ], [ 0, %17 ]
%23 = getelementptr inbounds [1024 x i32], [1024 x i32]* %8, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = trunc i32 %24 to i8
%26 = getelementptr inbounds i8, i8* %3, i64 %22
store i8 %25, i8* %26
%27 = add nuw nsw i64 %22, 1
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = icmp slt i64 %27, %29
br i1 %30, label %21, label %31
31: ; preds = %21, %17
%32 = phi i32 [ %19, %17 ], [ %28, %21 ]
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %3, i64 %33
store i8 0, i8* %34
br label %35
35: ; preds = %31, %6
ret i32 %14
}