#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*/ _ada_cosupsys(int, int, int *, int, int *, int, double *);
int /*<<< orphan*/ adafinal();
int /*<<< orphan*/ adainit();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
void read_data_system(int n, int m, int monsum, int moncnt[m]) {
  int dimsup = n * monsum;
  int dimcff = 2 * monsum;
  int sup[dimsup];
  double cff[dimcff];
  int i, j, k, indsup, indcff;
  printf("Number of entries in support : %d\n", dimsup);
  printf("Number of coefficients : %d\n", dimcff);
  indsup = 0;
  indcff = 0;
  for (i = 0; i < m; i++) {
    printf("Reading the support and coefficients");
    printf(" of polynomial %d ...\n", i + 1);
    for (j = 0; j < moncnt[i]; j++) {
      printf("  give exponents of monomial %d : ", j + 1);
      for (k = 0; k < n; k++)
        scanf("%d", &sup[indsup++]);
      printf("  give two doubles : ");
      scanf("%lf", &cff[indcff++]);
      scanf("%lf", &cff[indcff++]);
    }
  }
  printf("\nThe support : ");
  for (i = 0; i < dimsup; i++)
    printf(" %d", sup[i]);
  printf("\nThe coefficients :\n");
  for (i = 0; i < dimcff; i++)
    printf("  %.15lf\n", cff[i]);
  printf("Calling Ada ...\n");
  adainit();
  _ada_cosupsys(n, m, moncnt, dimsup, sup, dimcff, cff);
  adafinal();
  printf("... done with the call.\n");
}


x86 assembly (clang, -O0):
<read_data_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    %eax,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1316 <read_data_system+0x1c6>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
add    $0x1,%esi
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x18(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1303 <read_data_system+0x1b3>
mov    -0x40(%rbp),%esi
add    $0x1,%esi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    129b <read_data_system+0x14b>
mov    -0x60(%rbp),%rsi
mov    -0x48(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x48(%rbp)
cltq
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    125b <read_data_system+0x10b>
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rsi
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c(%rbp)
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x58(%rbp),%rsi
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c(%rbp)
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    122c <read_data_system+0xdc>
jmp    1308 <read_data_system+0x1b8>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f7 <read_data_system+0xa7>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    135e <read_data_system+0x20e>
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    132b <read_data_system+0x1db>
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13a8 <read_data_system+0x258>
mov    -0x58(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd4f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1373 <read_data_system+0x223>
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <adainit@plt>
mov    -0x60(%rbp),%r8
mov    -0x58(%rbp),%rax
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r9d
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1040 <_ada_cosupsys@plt>
add    $0x10,%rsp
mov    $0x0,%al
call   1050 <adafinal@plt>
lea    0xd08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_data_system>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rcx,-0x50(%rbp)
mov    %esi,%r14d
mov    %edx,%esi
mov    %edi,-0x2c(%rbp)
imul   %edi,%esi
mov    %rdx,-0x70(%rbp)
lea    (%rdx,%rdx,1),%ebx
lea    0xf(,%rsi,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rsp,%r15
lea    0x0(,%rbx,8),%rax
sub    %rax,%r15
mov    %r15,%rsp
lea    0xe48(%rip),%rdi
mov    %rsi,-0x78(%rbp)
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe59(%rip),%rdi
mov    %rbx,-0x60(%rbp)
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14d,-0x30(%rbp)
test   %r14d,%r14d
mov    %r15,-0x48(%rbp)
jle    133e <read_data_system+0x1de>
mov    -0x30(%rbp),%eax
mov    %rax,-0x80(%rbp)
mov    -0x2c(%rbp),%r12d
neg    %r12d
lea    0xecd(%rip),%r14
xor    %eax,%eax
xor    %ebx,%ebx
movl   $0x0,-0x34(%rbp)
jmp    1222 <read_data_system+0xc2>
nopw   0x0(%rax,%rax,1)
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rbx
cmp    -0x80(%rbp),%rax
je     133e <read_data_system+0x1de>
mov    %rax,%r13
lea    0xe14(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%r13),%rsi
lea    0xe27(%rip),%rdi
mov    %rsi,-0x68(%rbp)
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x50(%rbp),%rax
mov    %r13,-0x88(%rbp)
cmpl   $0x0,(%rax,%r13,4)
jle    1330 <read_data_system+0x1d0>
movslq %ebx,%rbx
mov    %rbx,-0x58(%rbp)
xor    %ebx,%ebx
jmp    12d0 <read_data_system+0x170>
nopw   0x0(%rax,%rax,1)
mov    -0x48(%rbp),%r14
lea    0xe24(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x58(%rbp),%r15
lea    (%r14,%r15,8),%rsi
lea    0xe24(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    (%r14,%r15,8),%rsi
add    $0x8,%rsi
add    $0x2,%r15
mov    %r15,-0x58(%rbp)
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    -0x50(%rbp),%rax
mov    -0x88(%rbp),%rcx
cmp    (%rax,%rcx,4),%ebx
lea    0xe00(%rip),%r14
jge    1210 <read_data_system+0xb0>
add    $0x1,%ebx
lea    0xda2(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    1270 <read_data_system+0x110>
movslq -0x34(%rbp),%rax
mov    -0x40(%rbp),%r13
lea    0x0(%r13,%rax,4),%r13
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
add    $0x4,%r13
add    $0xffffffff,%r15d
cmp    %r15d,%r12d
jne    1300 <read_data_system+0x1a0>
sub    %r15d,-0x34(%rbp)
jmp    1270 <read_data_system+0x110>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x68(%rbp),%rax
cmp    -0x80(%rbp),%rax
jne    1222 <read_data_system+0xc2>
lea    0xd74(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x78(%rbp),%r13
test   %r13d,%r13d
mov    -0x40(%rbp),%r15
jle    1387 <read_data_system+0x227>
lea    0xd69(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1370 <read_data_system+0x210>
lea    0xd49(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x70(%rbp)
mov    -0x48(%rbp),%r12
jle    13d9 <read_data_system+0x279>
mov    -0x60(%rbp),%rax
cmp    $0x2,%eax
mov    $0x1,%r15d
cmovge %eax,%r15d
xor    %ebx,%ebx
lea    0xd16(%rip),%r14
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rbx,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    13c0 <read_data_system+0x260>
lea    0xd0b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <adainit@plt>
sub    $0x8,%rsp
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x50(%rbp),%rdx
mov    %r13d,%ecx
mov    -0x40(%rbp),%r8
mov    -0x60(%rbp),%r9
push   %r12
call   1050 <_ada_cosupsys@plt>
add    $0x10,%rsp
xor    %eax,%eax
call   1060 <adafinal@plt>
lea    0xcdd(%rip),%rdi
call   1030 <puts@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Number of entries in support : %d\0A\00"
@.str.1 = [29 x i8] c"Number of coefficients : %d\0A\00"
@.str.2 = [37 x i8] c"Reading the support and coefficients\00"
@.str.3 = [23 x i8] c" of polynomial %d ...\0A\00"
@.str.4 = [35 x i8] c" give exponents of monomial %d : \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [22 x i8] c" give two doubles : \00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.8 = [16 x i8] c"\0AThe support : \00"
@.str.9 = [4 x i8] c" %d\00"
@.str.10 = [21 x i8] c"\0AThe coefficients :\0A\00"
@.str.11 = [10 x i8] c" %.15lf\0A\00"
@.str.12 = [17 x i8] c"Calling Ada ...\0A\00"
@.str.13 = [25 x i8] c"... done with the call.\0A\00"
define void @read_data_system(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%19 = load i32, i32* %6
%20 = zext i32 %19 to i64
%21 = load i32, i32* %5
%22 = load i32, i32* %7
%23 = mul nsw i32 %21, %22
store i32 %23, i32* %9
%24 = load i32, i32* %7
%25 = mul nsw i32 2, %24
store i32 %25, i32* %10
%26 = load i32, i32* %9
%27 = zext i32 %26 to i64
%28 = call i8* @llvm.stacksave()
store i8* %28, i8** %11
%29 = alloca i32, i64 %27
store i64 %27, i64* %12
%30 = load i32, i32* %10
%31 = zext i32 %30 to i64
%32 = alloca double, i64 %31
store i64 %31, i64* %13
%33 = load i32, i32* %9
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %10
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %35)
store i32 0, i32* %17
store i32 0, i32* %18
store i32 0, i32* %14
br label %37
37: ; preds = %87, %4
%38 = load i32, i32* %14
%39 = load i32, i32* %6
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %90
41: ; preds = %37
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%43 = load i32, i32* %14
%44 = add nsw i32 %43, 1
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %44)
store i32 0, i32* %15
br label %46
46: ; preds = %83, %41
%47 = load i32, i32* %15
%48 = load i32*, i32** %8
%49 = load i32, i32* %14
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %48, i64 %50
%52 = load i32, i32* %51
%53 = icmp slt i32 %47, %52
br i1 %53, label %54, label %86
54: ; preds = %46
%55 = load i32, i32* %15
%56 = add nsw i32 %55, 1
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %56)
store i32 0, i32* %16
br label %58
58: ; preds = %68, %54
%59 = load i32, i32* %16
%60 = load i32, i32* %5
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %71
62: ; preds = %58
%63 = load i32, i32* %17
%64 = add nsw i32 %63, 1
store i32 %64, i32* %17
%65 = sext i32 %63 to i64
%66 = getelementptr inbounds i32, i32* %29, i64 %65
%67 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %66)
br label %68
68: ; preds = %62
%69 = load i32, i32* %16
%70 = add nsw i32 %69, 1
store i32 %70, i32* %16
br label %58
71: ; preds = %58
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%73 = load i32, i32* %18
%74 = add nsw i32 %73, 1
store i32 %74, i32* %18
%75 = sext i32 %73 to i64
%76 = getelementptr inbounds double, double* %32, i64 %75
%77 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %76)
%78 = load i32, i32* %18
%79 = add nsw i32 %78, 1
store i32 %79, i32* %18
%80 = sext i32 %78 to i64
%81 = getelementptr inbounds double, double* %32, i64 %80
%82 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %81)
br label %83
83: ; preds = %71
%84 = load i32, i32* %15
%85 = add nsw i32 %84, 1
store i32 %85, i32* %15
br label %46
86: ; preds = %46
br label %87
87: ; preds = %86
%88 = load i32, i32* %14
%89 = add nsw i32 %88, 1
store i32 %89, i32* %14
br label %37
90: ; preds = %37
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %14
br label %92
92: ; preds = %102, %90
%93 = load i32, i32* %14
%94 = load i32, i32* %9
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %105
96: ; preds = %92
%97 = load i32, i32* %14
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i32, i32* %29, i64 %98
%100 = load i32, i32* %99
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %96
%103 = load i32, i32* %14
%104 = add nsw i32 %103, 1
store i32 %104, i32* %14
br label %92
105: ; preds = %92
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %14
br label %107
107: ; preds = %117, %105
%108 = load i32, i32* %14
%109 = load i32, i32* %10
%110 = icmp slt i32 %108, %109
br i1 %110, label %111, label %120
111: ; preds = %107
%112 = load i32, i32* %14
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %32, i64 %113
%115 = load double, double* %114
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), double %115)
br label %117
117: ; preds = %111
%118 = load i32, i32* %14
%119 = add nsw i32 %118, 1
store i32 %119, i32* %14
br label %107
120: ; preds = %107
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%122 = call i32 (...) @adainit()
%123 = load i32, i32* %5
%124 = load i32, i32* %6
%125 = load i32*, i32** %8
%126 = load i32, i32* %9
%127 = load i32, i32* %10
%128 = call i32 @_ada_cosupsys(i32 %123, i32 %124, i32* %125, i32 %126, i32* %29, i32 %127, double* %32)
%129 = call i32 (...) @adafinal()
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0))
%131 = load i8*, i8** %11
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Number of entries in support : %d\0A\00"
@.str.1 = [29 x i8] c"Number of coefficients : %d\0A\00"
@.str.2 = [37 x i8] c"Reading the support and coefficients\00"
@.str.3 = [23 x i8] c" of polynomial %d ...\0A\00"
@.str.4 = [35 x i8] c" give exponents of monomial %d : \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [22 x i8] c" give two doubles : \00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.8 = [16 x i8] c"\0AThe support : \00"
@.str.9 = [4 x i8] c" %d\00"
@.str.11 = [10 x i8] c" %.15lf\0A\00"
@str = [20 x i8] c"\0AThe coefficients :\00"
@str.14 = [16 x i8] c"Calling Ada ...\00"
@str.15 = [24 x i8] c"... done with the call.\00"
define void @read_data_system(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = mul nsw i32 %2, %0
%6 = shl i32 %2, 1
%7 = zext i32 %5 to i64
%8 = alloca i32, i64 %7
%9 = zext i32 %6 to i64
%10 = alloca double, i64 %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%13 = icmp sgt i32 %1, 0
br i1 %13, label %14, label %65
14: ; preds = %4
%15 = icmp sgt i32 %0, 0
%16 = zext i32 %1 to i64
br label %23
17: ; preds = %54
%18 = trunc i64 %60 to i32
br label %19
19: ; preds = %17, %23
%20 = phi i32 [ %26, %23 ], [ %55, %17 ]
%21 = phi i32 [ %25, %23 ], [ %18, %17 ]
%22 = icmp eq i64 %28, %16
br i1 %22, label %65, label %23
23: ; preds = %14, %19
%24 = phi i64 [ 0, %14 ], [ %28, %19 ]
%25 = phi i32 [ 0, %14 ], [ %21, %19 ]
%26 = phi i32 [ 0, %14 ], [ %20, %19 ]
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%28 = add nuw nsw i64 %24, 1
%29 = trunc i64 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds i32, i32* %3, i64 %24
%32 = load i32, i32* %31
%33 = icmp sgt i32 %32, 0
br i1 %33, label %34, label %19
34: ; preds = %23
%35 = sext i32 %25 to i64
br label %36
36: ; preds = %34, %54
%37 = phi i64 [ %35, %34 ], [ %60, %54 ]
%38 = phi i32 [ %26, %34 ], [ %55, %54 ]
%39 = phi i32 [ 0, %34 ], [ %40, %54 ]
%40 = add nuw nsw i32 %39, 1
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %40)
br i1 %15, label %42, label %54
42: ; preds = %36
%43 = sext i32 %38 to i64
br label %44
44: ; preds = %42, %44
%45 = phi i64 [ %43, %42 ], [ %47, %44 ]
%46 = phi i32 [ 0, %42 ], [ %50, %44 ]
%47 = add nsw i64 %45, 1
%48 = getelementptr inbounds i32, i32* %8, i64 %45
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %48)
%50 = add nuw nsw i32 %46, 1
%51 = icmp eq i32 %50, %0
br i1 %51, label %52, label %44
52: ; preds = %44
%53 = trunc i64 %47 to i32
br label %54
54: ; preds = %52, %36
%55 = phi i32 [ %38, %36 ], [ %53, %52 ]
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%57 = add nsw i64 %37, 1
%58 = getelementptr inbounds double, double* %10, i64 %37
%59 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %58)
%60 = add nsw i64 %37, 2
%61 = getelementptr inbounds double, double* %10, i64 %57
%62 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %61)
%63 = load i32, i32* %31
%64 = icmp slt i32 %40, %63
br i1 %64, label %36, label %17
65: ; preds = %19, %4
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp sgt i32 %5, 0
br i1 %67, label %68, label %75
68: ; preds = %65, %68
%69 = phi i64 [ %73, %68 ], [ 0, %65 ]
%70 = getelementptr inbounds i32, i32* %8, i64 %69
%71 = load i32, i32* %70
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %71)
%73 = add nuw nsw i64 %69, 1
%74 = icmp eq i64 %73, %7
br i1 %74, label %75, label %68
75: ; preds = %68, %65
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%77 = icmp sgt i32 %2, 0
br i1 %77, label %78, label %88
78: ; preds = %75
%79 = call i32 @llvm.smax.i32(i32 %6, i32 1)
%80 = zext i32 %79 to i64
br label %81
81: ; preds = %78, %81
%82 = phi i64 [ 0, %78 ], [ %86, %81 ]
%83 = getelementptr inbounds double, double* %10, i64 %82
%84 = load double, double* %83
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), double %84)
%86 = add nuw nsw i64 %82, 1
%87 = icmp eq i64 %86, %80
br i1 %87, label %88, label %81
88: ; preds = %81, %75
%89 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.14, i64 0, i64 0))
%90 = call i32 (...) @adainit()
%91 = call i32 @_ada_cosupsys(i32 %0, i32 %1, i32* %3, i32 %5, i32* %8, i32 %6, double* %10)
%92 = call i32 (...) @adafinal()
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.15, i64 0, i64 0))
ret void
}