#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*/ standard_generate(int, int, int *, double *, double *);
int /*<<< orphan*/ standard_operate(int, int, int *, double *, double *);
void standard_test(int nbt, int dim) {
  int wind[nbt];
  double dir[nbt * dim];
  double err[nbt];
  standard_generate(nbt, dim, wind, dir, err);
  standard_operate(nbt, dim, wind, dir, err);
}


x86 assembly (clang, -O0):
<standard_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x40(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %ecx,%eax
lea    0xf(,%rax,8),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rcx
sub    %rsi,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
lea    0xf(,%rax,8),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%r8
sub    %rsi,%r8
mov    %r8,-0x30(%rbp)
mov    %r8,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <standard_generate@plt>
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <standard_operate@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_test>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%r15d
mov    %edi,%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r12
mov    %r12,%rsp
mov    %esi,%ecx
imul   %edi,%ecx
lea    0xf(,%rcx,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r13
sub    %rcx,%r13
mov    %r13,%rsp
mov    %rsp,%rbx
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
call   1030 <standard_generate@plt>
mov    %r15d,%edi
mov    %r14d,%esi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
call   1040 <standard_operate@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @standard_test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %5
%12 = alloca i32, i64 %10
store i64 %10, i64* %6
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
%16 = zext i32 %15 to i64
%17 = alloca double, i64 %16
store i64 %16, i64* %7
%18 = load i32, i32* %3
%19 = zext i32 %18 to i64
%20 = alloca double, i64 %19
store i64 %19, i64* %8
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @standard_generate(i32 %21, i32 %22, i32* %12, double* %17, double* %20)
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = call i32 @standard_operate(i32 %24, i32 %25, i32* %12, double* %17, double* %20)
%27 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
define void @standard_test(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = alloca i32, i64 %3
%5 = mul nsw i32 %1, %0
%6 = zext i32 %5 to i64
%7 = alloca double, i64 %6
%8 = alloca double, i64 %3
%9 = call i32 @standard_generate(i32 %0, i32 %1, i32* %4, double* %7, double* %8)
%10 = call i32 @standard_operate(i32 %0, i32 %1, i32* %4, double* %7, double* %8)
ret void
}