#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 */
typedef int /*<<< orphan*/ tabFloat;

/* Variables and functions */
int /*<<< orphan*/ mihp_adress(float *, int, int);
int /*<<< orphan*/ mihp_endLoop();
int /*<<< orphan*/ mihp_newIteration();
int /*<<< orphan*/ mihp_newLoop(char *, char *, int);
void functionTestLoop(float *tabFloat, size_t size) {
  if (tabFloat == NULL || size == 0)
    return;
  int i;
  mihp_newLoop("functionTestLoop", "main.c", 15);
  for (i = 0; i < size; ++i) {
    tabFloat[i] = 0.0;
    mihp_adress(&tabFloat[i], sizeof(tabFloat[i]), 1);
    mihp_newIteration();
  }
  mihp_endLoop();
  i = 0;
  mihp_newLoop("functionTestLoop", "main.c", 24);
  while (i < size) {
    tabFloat[i] = (float)i;
    mihp_adress(&tabFloat[i], sizeof(tabFloat[i]), 0);
    mihp_adress(&tabFloat[i], sizeof(tabFloat[i]), 1);
    ++i;
    mihp_newIteration();
  }
  mihp_endLoop();
}


x86 assembly (clang, -O0):
<functionTestLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1166 <functionTestLoop+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    116b <functionTestLoop+0x2b>
jmp    1276 <functionTestLoop+0x136>
lea    0xe8e(%rip),%rdi
lea    0xe98(%rip),%rsi
mov    $0xf,%edx
call   1060 <mihp_newLoop@plt>
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    11db <functionTestLoop+0x9b>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <mihp_adress@plt>
mov    $0x0,%al
call   1030 <mihp_newIteration@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118a <functionTestLoop+0x4a>
mov    $0x0,%al
call   1050 <mihp_endLoop@plt>
movl   $0x0,-0x14(%rbp)
lea    0xe10(%rip),%rdi
lea    0xe1a(%rip),%rsi
mov    $0x18,%edx
call   1060 <mihp_newLoop@plt>
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    126f <functionTestLoop+0x12f>
cvtsi2ssl -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1040 <mihp_adress@plt>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <mihp_adress@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <mihp_newIteration@plt>
jmp    1201 <functionTestLoop+0xc1>
mov    $0x0,%al
call   1050 <mihp_endLoop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<functionTestLoop>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1223 <functionTestLoop+0xe3>
mov    %rsi,%r14
test   %rsi,%rsi
je     1223 <functionTestLoop+0xe3>
mov    %rdi,%r15
lea    0xe99(%rip),%rdi
lea    0xea3(%rip),%rsi
mov    $0xf,%edx
call   1060 <mihp_newLoop@plt>
mov    %r14,%r12
mov    %r15,%rbx
xchg   %ax,%ax
movl   $0x0,(%rbx)
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <mihp_adress@plt>
xor    %eax,%eax
call   1030 <mihp_newIteration@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r12
jne    1180 <functionTestLoop+0x40>
xor    %eax,%eax
call   1050 <mihp_endLoop@plt>
lea    0xe49(%rip),%rdi
lea    0xe53(%rip),%rsi
mov    $0x18,%edx
call   1060 <mihp_newLoop@plt>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
movss  %xmm0,(%r15)
mov    %r15,%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1040 <mihp_adress@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <mihp_adress@plt>
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <mihp_newIteration@plt>
add    $0x4,%r15
cmp    %rbx,%r14
jne    11d0 <functionTestLoop+0x90>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <mihp_endLoop@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"functionTestLoop\00"
@.str.1 = [7 x i8] c"main.c\00"
define void @functionTestLoop(float* %0, i64 %1) {
%3 = alloca float*
%4 = alloca i64
%5 = alloca i32
store float* %0, float** %3
store i64 %1, i64* %4
%6 = load float*, float** %3
%7 = icmp eq float* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i64, i64* %4
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8, %2
br label %63
12: ; preds = %8
%13 = call i32 @mihp_newLoop(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 15)
store i32 0, i32* %5
br label %14
14: ; preds = %30, %12
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = load i64, i64* %4
%18 = icmp ult i64 %16, %17
br i1 %18, label %19, label %33
19: ; preds = %14
%20 = load float*, float** %3
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds float, float* %20, i64 %22
store float 0.000000e+00, float* %23
%24 = load float*, float** %3
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds float, float* %24, i64 %26
%28 = call i32 @mihp_adress(float* %27, i32 4, i32 1)
%29 = call i32 (...) @mihp_newIteration()
br label %30
30: ; preds = %19
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %14
33: ; preds = %14
%34 = call i32 (...) @mihp_endLoop()
store i32 0, i32* %5
%35 = call i32 @mihp_newLoop(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 24)
br label %36
36: ; preds = %41, %33
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = load i64, i64* %4
%40 = icmp ult i64 %38, %39
br i1 %40, label %41, label %61
41: ; preds = %36
%42 = load i32, i32* %5
%43 = sitofp i32 %42 to float
%44 = load float*, float** %3
%45 = load i32, i32* %5
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds float, float* %44, i64 %46
store float %43, float* %47
%48 = load float*, float** %3
%49 = load i32, i32* %5
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds float, float* %48, i64 %50
%52 = call i32 @mihp_adress(float* %51, i32 4, i32 0)
%53 = load float*, float** %3
%54 = load i32, i32* %5
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds float, float* %53, i64 %55
%57 = call i32 @mihp_adress(float* %56, i32 4, i32 1)
%58 = load i32, i32* %5
%59 = add nsw i32 %58, 1
store i32 %59, i32* %5
%60 = call i32 (...) @mihp_newIteration()
br label %36
61: ; preds = %36
%62 = call i32 (...) @mihp_endLoop()
br label %63
63: ; preds = %61, %11
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"functionTestLoop\00"
@.str.1 = [7 x i8] c"main.c\00"
define void @functionTestLoop(float* %0, i64 %1) {
%3 = icmp eq float* %0, null
%4 = icmp eq i64 %1, 0
%5 = or i1 %3, %4
br i1 %5, label %30, label %6
6: ; preds = %2
%7 = tail call i32 @mihp_newLoop(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 15)
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = getelementptr inbounds float, float* %0, i64 %9
store float 0.000000e+00, float* %10
%11 = tail call i32 @mihp_adress(float* %10, i32 4, i32 1)
%12 = tail call i32 (...) @mihp_newIteration()
%13 = add nuw i64 %9, 1
%14 = icmp eq i64 %13, %1
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = tail call i32 (...) @mihp_endLoop()
%17 = tail call i32 @mihp_newLoop(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 24)
br label %18
18: ; preds = %15, %18
%19 = phi i64 [ 0, %15 ], [ %25, %18 ]
%20 = trunc i64 %19 to i32
%21 = sitofp i32 %20 to float
%22 = getelementptr inbounds float, float* %0, i64 %19
store float %21, float* %22
%23 = tail call i32 @mihp_adress(float* %22, i32 4, i32 0)
%24 = tail call i32 @mihp_adress(float* %22, i32 4, i32 1)
%25 = add nuw i64 %19, 1
%26 = tail call i32 (...) @mihp_newIteration()
%27 = icmp eq i64 %25, %1
br i1 %27, label %28, label %18
28: ; preds = %18
%29 = tail call i32 (...) @mihp_endLoop()
br label %30
30: ; preds = %2, %28
ret void
}