#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_addfloat(float *, float *);
int /*<<< orphan*/ check_addint(int *, int *);
int /*<<< orphan*/ init(int *, float *, int);
int /*<<< orphan*/ myaddfloat(float *, float *, int);
int /*<<< orphan*/ myaddfloat_ref(float *, float *, int);
int /*<<< orphan*/ myaddint(int *, int *, int);
int /*<<< orphan*/ myaddint_ref(int *, int *, int);
int main() {
  int i;
  int a[100], a_ref[100], b[100];
  float x[100], x_ref[100], y[100];
  init(a, x, 100);
  init(b, y, 100);
  myaddint(a, b, 100);
  myaddfloat(x, y, 100);
  init(a_ref, x_ref, 100);
  init(b, y, 100);
  myaddint_ref(a_ref, b, 100);
  myaddfloat_ref(x_ref, y, 100);
  check_addint(a, a_ref);
  check_addfloat(x, x_ref);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x970,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
lea    -0x650(%rbp),%rsi
mov    $0x64,%edx
call   1040 <init@plt>
lea    -0x4c0(%rbp),%rdi
lea    -0x970(%rbp),%rsi
mov    $0x64,%edx
call   1040 <init@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x4c0(%rbp),%rsi
mov    $0x64,%edx
call   1050 <myaddint@plt>
lea    -0x650(%rbp),%rdi
lea    -0x970(%rbp),%rsi
mov    $0x64,%edx
call   1060 <myaddfloat@plt>
lea    -0x330(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
mov    $0x64,%edx
call   1040 <init@plt>
lea    -0x4c0(%rbp),%rdi
lea    -0x970(%rbp),%rsi
mov    $0x64,%edx
call   1040 <init@plt>
lea    -0x330(%rbp),%rdi
lea    -0x4c0(%rbp),%rsi
mov    $0x64,%edx
call   1090 <myaddint_ref@plt>
lea    -0x7e0(%rbp),%rdi
lea    -0x970(%rbp),%rsi
mov    $0x64,%edx
call   1070 <myaddfloat_ref@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x330(%rbp),%rsi
call   1030 <check_addint@plt>
lea    -0x650(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1080 <check_addfloat@plt>
xor    %eax,%eax
add    $0x970,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x968,%rsp
lea    0x7d0(%rsp),%r15
lea    0x320(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x64,%edx
call   1040 <init@plt>
lea    0x4b0(%rsp),%rbx
mov    %rsp,%r12
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x64,%edx
call   1040 <init@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1050 <myaddint@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    $0x64,%edx
call   1060 <myaddfloat@plt>
lea    0x640(%rsp),%rbp
lea    0x190(%rsp),%r13
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x64,%edx
call   1040 <init@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x64,%edx
call   1040 <init@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1090 <myaddint_ref@plt>
mov    %r13,%rdi
mov    %r12,%rsi
mov    $0x64,%edx
call   1070 <myaddfloat_ref@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1030 <check_addint@plt>
mov    %r14,%rdi
mov    %r13,%rsi
call   1080 <check_addfloat@plt>
xor    %eax,%eax
add    $0x968,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
%4 = alloca [100 x i32]
%5 = alloca [100 x i32]
%6 = alloca [100 x float]
%7 = alloca [100 x float]
%8 = alloca [100 x float]
store i32 0, i32* %1
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%10 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%11 = call i32 @init(i32* %9, float* %10, i32 100)
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%13 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 0
%14 = call i32 @init(i32* %12, float* %13, i32 100)
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%17 = call i32 @myaddint(i32* %15, i32* %16, i32 100)
%18 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%19 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 0
%20 = call i32 @myaddfloat(float* %18, float* %19, i32 100)
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%22 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%23 = call i32 @init(i32* %21, float* %22, i32 100)
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%25 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 0
%26 = call i32 @init(i32* %24, float* %25, i32 100)
%27 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%29 = call i32 @myaddint_ref(i32* %27, i32* %28, i32 100)
%30 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%31 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 0
%32 = call i32 @myaddfloat_ref(float* %30, float* %31, i32 100)
%33 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%34 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%35 = call i32 @check_addint(i32* %33, i32* %34)
%36 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%37 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%38 = call i32 @check_addfloat(float* %36, float* %37)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca [100 x i32]
%3 = alloca [100 x i32]
%4 = alloca [100 x float]
%5 = alloca [100 x float]
%6 = alloca [100 x float]
%7 = bitcast [100 x i32]* %1 to i8*
%8 = bitcast [100 x i32]* %2 to i8*
%9 = bitcast [100 x i32]* %3 to i8*
%10 = bitcast [100 x float]* %4 to i8*
%11 = bitcast [100 x float]* %5 to i8*
%12 = bitcast [100 x float]* %6 to i8*
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%14 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 0
%15 = call i32 @init(i32* %13, float* %14, i32 100)
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%17 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%18 = call i32 @init(i32* %16, float* %17, i32 100)
%19 = call i32 @myaddint(i32* %13, i32* %16, i32 100)
%20 = call i32 @myaddfloat(float* %14, float* %17, i32 100)
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%22 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 0
%23 = call i32 @init(i32* %21, float* %22, i32 100)
%24 = call i32 @init(i32* %16, float* %17, i32 100)
%25 = call i32 @myaddint_ref(i32* %21, i32* %16, i32 100)
%26 = call i32 @myaddfloat_ref(float* %22, float* %17, i32 100)
%27 = call i32 @check_addint(i32* %13, i32* %21)
%28 = call i32 @check_addfloat(float* %14, float* %22)
ret i32 0
}