#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*/ check(double *, double *);
int /*<<< orphan*/ init(double *, double *, double *, double *, int, int);
int /*<<< orphan*/ star(double *, double *, double *, int, int *);
int /*<<< orphan*/ star_ref(double *, double *, double *, int, int *);
int main() {
  double a[100], a_ref[100], b[100], c[100 + 32];
  int ioff = 32;
  init(a, a_ref, b, c, 100, ioff);
  star(a, b, c, 100, &ioff);
  star_ref(a_ref, b, c, 100, &ioff);
  check(a, a_ref);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xda0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x20,-0xd94(%rbp)
lea    -0x330(%rbp),%rdi
lea    -0x650(%rbp),%rsi
lea    -0x970(%rbp),%rdx
lea    -0xd90(%rbp),%rcx
mov    -0xd94(%rbp),%r9d
mov    $0x64,%r8d
call   1040 <init@plt>
lea    -0x330(%rbp),%rdi
lea    -0x970(%rbp),%rsi
lea    -0xd90(%rbp),%rdx
mov    $0x64,%ecx
lea    -0xd94(%rbp),%r8
call   1030 <star@plt>
lea    -0x650(%rbp),%rdi
lea    -0x970(%rbp),%rsi
lea    -0xd90(%rbp),%rdx
mov    $0x64,%ecx
lea    -0xd94(%rbp),%r8
call   1050 <star_ref@plt>
lea    -0x330(%rbp),%rdi
lea    -0x650(%rbp),%rsi
call   1060 <check@plt>
xor    %eax,%eax
add    $0xda0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd90,%rsp
movl   $0x20,0xc(%rsp)
lea    0x650(%rsp),%r15
lea    0x330(%rsp),%r14
lea    0x10(%rsp),%rbx
lea    0x970(%rsp),%r12
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
mov    $0x64,%r8d
mov    $0x20,%r9d
call   1040 <init@plt>
lea    0xc(%rsp),%r13
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0x64,%ecx
mov    %r13,%r8
call   1030 <star@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0x64,%ecx
mov    %r13,%r8
call   1050 <star_ref@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1060 <check@plt>
xor    %eax,%eax
add    $0xd90,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x double]
%3 = alloca [100 x double]
%4 = alloca [100 x double]
%5 = alloca [132 x double]
%6 = alloca i32
store i32 0, i32* %1
store i32 32, i32* %6
%7 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%8 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 0
%9 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%10 = getelementptr inbounds [132 x double], [132 x double]* %5, i64 0, i64 0
%11 = load i32, i32* %6
%12 = call i32 @init(double* %7, double* %8, double* %9, double* %10, i32 100, i32 %11)
%13 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%14 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%15 = getelementptr inbounds [132 x double], [132 x double]* %5, i64 0, i64 0
%16 = call i32 @star(double* %13, double* %14, double* %15, i32 100, i32* %6)
%17 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 0
%18 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%19 = getelementptr inbounds [132 x double], [132 x double]* %5, i64 0, i64 0
%20 = call i32 @star_ref(double* %17, double* %18, double* %19, i32 100, i32* %6)
%21 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%22 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 0
%23 = call i32 @check(double* %21, double* %22)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x double]
%2 = alloca [100 x double]
%3 = alloca [100 x double]
%4 = alloca [132 x double]
%5 = alloca i32
%6 = bitcast [100 x double]* %1 to i8*
%7 = bitcast [100 x double]* %2 to i8*
%8 = bitcast [100 x double]* %3 to i8*
%9 = bitcast [132 x double]* %4 to i8*
%10 = bitcast i32* %5 to i8*
store i32 32, i32* %5
%11 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 0
%12 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%13 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 0
%14 = getelementptr inbounds [132 x double], [132 x double]* %4, i64 0, i64 0
%15 = call i32 @init(double* %11, double* %12, double* %13, double* %14, i32 100, i32 32)
%16 = call i32 @star(double* %11, double* %13, double* %14, i32 100, i32* %5)
%17 = call i32 @star_ref(double* %12, double* %13, double* %14, i32 100, i32* %5)
%18 = call i32 @check(double* %11, double* %12)
ret i32 0
}