#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 load_standard_tableau_dimensions(int *, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int retrieve_standard_tableau_form(int verbose) {
  int fail, neq, nvr, nbt;
  fail = load_standard_tableau_dimensions(&neq, &nvr, &nbt);
  if (verbose > 0) {
    printf("-> the number of equations : %d\n", neq);
    printf("-> the number of variables : %d\n", nvr);
    printf("-> total number of terms : %d\n", nbt);
  }
  {
    int nbterms[neq];
    int exponents[nvr * nbt];
    double coefficients[2 * nbt];
  }
  return fail;
}


x86 assembly (clang, -O0):
<retrieve_standard_tableau_form>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <load_standard_tableau_dimensions@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1176 <retrieve_standard_tableau_form+0x56>
mov    -0xc(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,%eax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,%eax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<retrieve_standard_tableau_form>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <load_standard_tableau_dimensions@plt>
mov    %eax,%ebx
test   %ebp,%ebp
jle    1172 <retrieve_standard_tableau_form+0x52>
mov    0x14(%rsp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"-> the number of equations : %d\0A\00"
@.str.1 = [33 x i8] c"-> the number of variables : %d\0A\00"
@.str.2 = [31 x i8] c"-> total number of terms : %d\0A\00"
define i32 @retrieve_standard_tableau_form(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32 %0, i32* %2
%11 = call i32 @load_standard_tableau_dimensions(i32* %4, i32* %5, i32* %6)
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %1
%15 = load i32, i32* %4
%16 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %14, %1
%22 = load i32, i32* %4
%23 = zext i32 %22 to i64
%24 = call i8* @llvm.stacksave()
store i8* %24, i8** %7
%25 = alloca i32, i64 %23
store i64 %23, i64* %8
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = mul nsw i32 %26, %27
%29 = zext i32 %28 to i64
%30 = alloca i32, i64 %29
store i64 %29, i64* %9
%31 = load i32, i32* %6
%32 = mul nsw i32 2, %31
%33 = zext i32 %32 to i64
%34 = alloca double, i64 %33
store i64 %33, i64* %10
%35 = load i8*, i8** %7
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [33 x i8] c"-> the number of equations : %d\0A\00"
@.str.1 = [33 x i8] c"-> the number of variables : %d\0A\00"
@.str.2 = [31 x i8] c"-> total number of terms : %d\0A\00"
define i32 @retrieve_standard_tableau_form(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = call i32 @load_standard_tableau_dimensions(i32* %2, i32* %3, i32* %4)
%9 = icmp sgt i32 %0, 0
br i1 %9, label %10, label %17
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %4
%16 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10, %1
ret i32 %8
}