#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*/ free(float *);
int /*<<< orphan*/ functionAddTab(float *, float *, float *, int);
float *malloc(int);
int main(int argc, char **argv) {
  int size = 5;
  float *tabResult = malloc(sizeof(float) * size);
  float *tabA = malloc(sizeof(float) * size);
  float *tabB = malloc(sizeof(float) * size);
  functionAddTab(tabResult, tabA, tabB, size);
  free(tabResult);
  free(tabA);
  free(tabB);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <functionAddTab@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    $0x5,%ecx
call   1040 <functionAddTab@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = mul i64 4, %11
%13 = trunc i64 %12 to i32
%14 = call float* @malloc(i32 %13)
store float* %14, float** %7
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = mul i64 4, %16
%18 = trunc i64 %17 to i32
%19 = call float* @malloc(i32 %18)
store float* %19, float** %8
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = mul i64 4, %21
%23 = trunc i64 %22 to i32
%24 = call float* @malloc(i32 %23)
store float* %24, float** %9
%25 = load float*, float** %7
%26 = load float*, float** %8
%27 = load float*, float** %9
%28 = load i32, i32* %6
%29 = call i32 @functionAddTab(float* %25, float* %26, float* %27, i32 %28)
%30 = load float*, float** %7
%31 = call i32 @free(float* %30)
%32 = load float*, float** %8
%33 = call i32 @free(float* %32)
%34 = load float*, float** %9
%35 = call i32 @free(float* %34)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float* @malloc(i32 20)
%4 = tail call float* @malloc(i32 20)
%5 = tail call float* @malloc(i32 20)
%6 = tail call i32 @functionAddTab(float* %3, float* %4, float* %5, i32 5)
%7 = tail call i32 @free(float* %3)
%8 = tail call i32 @free(float* %4)
%9 = tail call i32 @free(float* %5)
ret i32 0
}