#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*/ adafinal();
int /*<<< orphan*/ adainit();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sweep_define_parameters_numerically(int, int, int, int *);
int sweep_get_indices_numerically(int *);
int sweep_get_number_of_equations(int *);
int sweep_get_number_of_parameters(int *);
int sweep_get_number_of_variables(int *);
int main(int argc, char *argv[]) {
  int fail, nbequ, nbvar, nbpar, nbr;
  adainit();
  printf("Give the number of equations : ");
  scanf("%d", &nbequ);
  printf("Give the number of variables : ");
  scanf("%d", &nbvar);
  printf("Give the number of parameters : ");
  scanf("%d", &nbpar);
  {
    int pars[nbpar], k;
    for (k = 0; k < nbpar; k++) {
      printf("Give the index of parameter %d : ", k);
      scanf("%d", &pars[k]);
    }
    sweep_define_parameters_numerically(nbequ, nbvar, nbpar, pars);
  }
  fail = sweep_get_number_of_equations(&nbr);
  printf("The number of equations : %d.\n", nbr);
  fail = sweep_get_number_of_variables(&nbr);
  printf("The number of variables : %d.\n", nbr);
  fail = sweep_get_number_of_parameters(&nbr);
  printf("The number of parameters : %d.\n", nbr);
  {
    int idxpars[nbpar], k;
    fail = sweep_get_indices_numerically(idxpars);
    printf("THe indices of the parameters :");
    for (k = 0; k < nbpar; k++)
      printf(" %d", idxpars[k]);
    printf("\n");
  }
  adafinal();
  return fail;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %al,-0x69(%rbp)
call   10a0 <adainit@plt>
mov    -0x69(%rbp),%al
lea    0xe43(%rip),%rdi
call   1060 <printf@plt>
lea    0xf39(%rip),%rdi
mov    %rdi,-0x68(%rbp)
lea    -0x18(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x69(%rbp),%al
lea    0xe40(%rip),%rdi
call   1060 <printf@plt>
mov    -0x68(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x69(%rbp),%al
lea    0xe44(%rip),%rdi
call   1060 <printf@plt>
mov    -0x68(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x20(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1282 <main+0xf2>
mov    -0x3c(%rbp),%esi
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x60(%rbp),%rsi
movslq -0x3c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe93(%rip),%rdi
call   1090 <scanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    123c <main+0xac>
mov    -0x60(%rbp),%rcx
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1050 <sweep_define_parameters_numerically@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
lea    -0x24(%rbp),%rdi
mov    %rdi,-0x88(%rbp)
call   1040 <sweep_get_number_of_equations@plt>
mov    %eax,-0x14(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdcb(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x79(%rbp)
call   1060 <printf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <sweep_get_number_of_variables@plt>
mov    %eax,%ecx
mov    -0x79(%rbp),%al
mov    %ecx,-0x14(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdc2(%rip),%rdi
call   1060 <printf@plt>
mov    -0x88(%rbp),%rdi
call   10b0 <sweep_get_number_of_parameters@plt>
mov    %eax,%ecx
mov    -0x79(%rbp),%al
mov    %ecx,-0x14(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdbe(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x78(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x50(%rbp)
call   1080 <sweep_get_indices_numerically@plt>
mov    %eax,-0x14(%rbp)
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    137f <main+0x1ef>
mov    -0x78(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    134c <main+0x1bc>
lea    0xd39(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    $0x0,%al
call   1070 <adafinal@plt>
mov    -0x14(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   10b0 <adainit@plt>
lea    0xe41(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf35(%rip),%rbx
lea    -0x38(%rbp),%rsi
mov    %rbx,%rdi
call   10a0 <scanf@plt>
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    -0x34(%rbp),%rsi
mov    %rbx,%rdi
call   10a0 <scanf@plt>
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    -0x2c(%rbp),%rsi
mov    %rbx,%rdi
call   10a0 <scanf@plt>
mov    %rsp,%rbx
mov    -0x2c(%rbp),%eax
mov    %rsp,%r14
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    -0x2c(%rbp),%edx
test   %edx,%edx
jle    127c <main+0xdc>
mov    %rbx,-0x40(%rbp)
lea    0xe27(%rip),%r15
lea    0xec1(%rip),%r12
mov    %r14,%r13
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10a0 <scanf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rdx
add    $0x4,%r13
cmp    %rdx,%rbx
jl     1250 <main+0xb0>
mov    -0x40(%rbp),%rbx
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    %r14,%rcx
call   1060 <sweep_define_parameters_numerically@plt>
mov    %rbx,%rsp
lea    -0x30(%rbp),%rbx
mov    %rbx,%rdi
call   1050 <sweep_get_number_of_equations@plt>
mov    -0x30(%rbp),%esi
lea    0xde0(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1030 <sweep_get_number_of_variables@plt>
mov    -0x30(%rbp),%esi
lea    0xde6(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   10c0 <sweep_get_number_of_parameters@plt>
mov    -0x30(%rbp),%esi
lea    0xdec(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rsp,%r12
mov    -0x2c(%rbp),%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    %r13,%rdi
call   1090 <sweep_get_indices_numerically@plt>
mov    %eax,%r14d
lea    0xdd8(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    133c <main+0x19c>
lea    0xde4(%rip),%r15
xor    %ebx,%ebx
nop
mov    0x0(%r13,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
cmp    %rax,%rbx
jl     1320 <main+0x180>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r12,%rsp
xor    %eax,%eax
call   1080 <adafinal@plt>
mov    %r14d,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Give the number of equations : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"Give the number of variables : \00"
@.str.3 = [33 x i8] c"Give the number of parameters : \00"
@.str.4 = [34 x i8] c"Give the index of parameter %d : \00"
@.str.5 = [31 x i8] c"The number of equations : %d.\0A\00"
@.str.6 = [31 x i8] c"The number of variables : %d.\0A\00"
@.str.7 = [32 x i8] c"The number of parameters : %d.\0A\00"
@.str.8 = [32 x i8] c"THe indices of the parameters :\00"
@.str.9 = [4 x i8] c" %d\00"
@.str.10 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = call i32 (...) @adainit()
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%24 = load i32, i32* %9
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %11
%27 = alloca i32, i64 %25
store i64 %25, i64* %12
store i32 0, i32* %13
br label %28
28: ; preds = %39, %2
%29 = load i32, i32* %13
%30 = load i32, i32* %9
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %42
32: ; preds = %28
%33 = load i32, i32* %13
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %13
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i32, i32* %27, i64 %36
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %37)
br label %39
39: ; preds = %32
%40 = load i32, i32* %13
%41 = add nsw i32 %40, 1
store i32 %41, i32* %13
br label %28
42: ; preds = %28
%43 = load i32, i32* %7
%44 = load i32, i32* %8
%45 = load i32, i32* %9
%46 = call i32 @sweep_define_parameters_numerically(i32 %43, i32 %44, i32 %45, i32* %27)
%47 = load i8*, i8** %11
%48 = call i32 @sweep_get_number_of_equations(i32* %10)
store i32 %48, i32* %6
%49 = load i32, i32* %10
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %49)
%51 = call i32 @sweep_get_number_of_variables(i32* %10)
store i32 %51, i32* %6
%52 = load i32, i32* %10
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %52)
%54 = call i32 @sweep_get_number_of_parameters(i32* %10)
store i32 %54, i32* %6
%55 = load i32, i32* %10
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %9
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %14
%60 = alloca i32, i64 %58
store i64 %58, i64* %15
%61 = call i32 @sweep_get_indices_numerically(i32* %60)
store i32 %61, i32* %6
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %16
br label %63
63: ; preds = %73, %42
%64 = load i32, i32* %16
%65 = load i32, i32* %9
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %76
67: ; preds = %63
%68 = load i32, i32* %16
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i32, i32* %60, i64 %69
%71 = load i32, i32* %70
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %71)
br label %73
73: ; preds = %67
%74 = load i32, i32* %16
%75 = add nsw i32 %74, 1
store i32 %75, i32* %16
br label %63
76: ; preds = %63
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%78 = load i8*, i8** %14
%79 = call i32 (...) @adafinal()
%80 = load i32, i32* %6
ret i32 %80
}

LLVM IR (-O2):
@.str = [32 x i8] c"Give the number of equations : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"Give the number of variables : \00"
@.str.3 = [33 x i8] c"Give the number of parameters : \00"
@.str.4 = [34 x i8] c"Give the index of parameter %d : \00"
@.str.5 = [31 x i8] c"The number of equations : %d.\0A\00"
@.str.6 = [31 x i8] c"The number of variables : %d.\0A\00"
@.str.7 = [32 x i8] c"The number of parameters : %d.\0A\00"
@.str.8 = [32 x i8] c"THe indices of the parameters :\00"
@.str.9 = [4 x i8] c" %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = tail call i32 (...) @adainit()
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%18 = load i32, i32* %5
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
%21 = alloca i32, i64 %19
%22 = load i32, i32* %5
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %34
24: ; preds = %2, %24
%25 = phi i64 [ %30, %24 ], [ 0, %2 ]
%26 = trunc i64 %25 to i32
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds i32, i32* %21, i64 %25
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %28)
%30 = add nuw nsw i64 %25, 1
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = icmp slt i64 %30, %32
br i1 %33, label %24, label %34
34: ; preds = %24, %2
%35 = phi i32 [ %22, %2 ], [ %31, %24 ]
%36 = load i32, i32* %3
%37 = load i32, i32* %4
%38 = call i32 @sweep_define_parameters_numerically(i32 %36, i32 %37, i32 %35, i32* %21)
%39 = call i32 @sweep_get_number_of_equations(i32* %6)
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %40)
%42 = call i32 @sweep_get_number_of_variables(i32* %6)
%43 = load i32, i32* %6
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %43)
%45 = call i32 @sweep_get_number_of_parameters(i32* %6)
%46 = load i32, i32* %6
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %5
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
%51 = alloca i32, i64 %49
%52 = call i32 @sweep_get_indices_numerically(i32* %51)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%54 = load i32, i32* %5
%55 = icmp sgt i32 %54, 0
br i1 %55, label %56, label %65
56: ; preds = %34, %56
%57 = phi i64 [ %61, %56 ], [ 0, %34 ]
%58 = getelementptr inbounds i32, i32* %51, i64 %57
%59 = load i32, i32* %58
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %59)
%61 = add nuw nsw i64 %57, 1
%62 = load i32, i32* %5
%63 = sext i32 %62 to i64
%64 = icmp slt i64 %61, %63
br i1 %64, label %56, label %65
65: ; preds = %56, %34
%66 = call i32 @putchar(i32 10)
%67 = call i32 (...) @adafinal()
ret i32 %52
}