#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*/ invertOrdem(float *, int /*<<< orphan*/, int);
int main() {
  float arr[100];
  int i;
  for (i = 0; i < 100; i++)
    arr[i] = i + 1;
  invertOrdem(arr, 0, 99);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x64,-0x1a4(%rbp)
jge    116a <main+0x5a>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
movslq -0x1a4(%rbp),%rax
movss  %xmm0,-0x1a0(%rbp,%rax,4)
ff ff
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    112c <main+0x1c>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x63,%edx
call   1030 <invertOrdem@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x198,%rsp
movaps 0xee2(%rip),%xmm0
movaps 0xeeb(%rip),%xmm3
mov    $0xc,%eax
pcmpeqd %xmm2,%xmm2
movdqa 0xee9(%rip),%xmm8
movdqa 0xef1(%rip),%xmm4
movdqa 0xef9(%rip),%xmm5
movdqa 0xf01(%rip),%xmm6
nop
movaps %xmm3,%xmm1
shufps $0x88,%xmm0,%xmm1
movaps %xmm1,%xmm7
psubd  %xmm2,%xmm7
cvtdq2ps %xmm7,%xmm7
movaps %xmm7,-0x30(%rsp,%rax,4)
cmp    $0x6c,%rax
je     11a4 <main+0x94>
movaps %xmm1,%xmm7
paddd  %xmm8,%xmm7
cvtdq2ps %xmm7,%xmm7
movaps %xmm7,-0x20(%rsp,%rax,4)
movaps %xmm1,%xmm7
paddd  %xmm4,%xmm7
cvtdq2ps %xmm7,%xmm7
movaps %xmm7,-0x10(%rsp,%rax,4)
paddd  %xmm5,%xmm1
cvtdq2ps %xmm1,%xmm1
movaps %xmm1,(%rsp,%rax,4)
paddq  %xmm6,%xmm3
paddq  %xmm6,%xmm0
add    $0x10,%rax
jmp    1150 <main+0x40>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x63,%edx
call   1030 <invertOrdem@plt>
xor    %eax,%eax
add    $0x198,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x float]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = sitofp i32 %9 to float
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 %12
store float %10, float* %13
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 0
%19 = call i32 @invertOrdem(float* %18, i32 0, i32 99)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x float]
%2 = bitcast [100 x float]* %1 to i8*
br label %3
3: ; preds = %13, %0
%4 = phi i64 [ 0, %0 ], [ %31, %13 ]
%5 = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %0 ], [ %32, %13 ]
%6 = trunc <4 x i64> %5 to <4 x i32>
%7 = add <4 x i32> %6, <i32 1, i32 1, i32 1, i32 1>
%8 = sitofp <4 x i32> %7 to <4 x float>
%9 = getelementptr inbounds [100 x float], [100 x float]* %1, i64 0, i64 %4
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> %8, <4 x float>* %10
%11 = or i64 %4, 4
%12 = icmp eq i64 %11, 100
br i1 %12, label %33, label %13
13: ; preds = %3
%14 = trunc <4 x i64> %5 to <4 x i32>
%15 = add <4 x i32> %14, <i32 5, i32 5, i32 5, i32 5>
%16 = sitofp <4 x i32> %15 to <4 x float>
%17 = getelementptr inbounds [100 x float], [100 x float]* %1, i64 0, i64 %11
%18 = bitcast float* %17 to <4 x float>*
store <4 x float> %16, <4 x float>* %18
%19 = or i64 %4, 8
%20 = trunc <4 x i64> %5 to <4 x i32>
%21 = add <4 x i32> %20, <i32 9, i32 9, i32 9, i32 9>
%22 = sitofp <4 x i32> %21 to <4 x float>
%23 = getelementptr inbounds [100 x float], [100 x float]* %1, i64 0, i64 %19
%24 = bitcast float* %23 to <4 x float>*
store <4 x float> %22, <4 x float>* %24
%25 = or i64 %4, 12
%26 = trunc <4 x i64> %5 to <4 x i32>
%27 = add <4 x i32> %26, <i32 13, i32 13, i32 13, i32 13>
%28 = sitofp <4 x i32> %27 to <4 x float>
%29 = getelementptr inbounds [100 x float], [100 x float]* %1, i64 0, i64 %25
%30 = bitcast float* %29 to <4 x float>*
store <4 x float> %28, <4 x float>* %30
%31 = add nuw nsw i64 %4, 16
%32 = add <4 x i64> %5, <i64 16, i64 16, i64 16, i64 16>
br label %3
33: ; preds = %3
%34 = getelementptr inbounds [100 x float], [100 x float]* %1, i64 0, i64 0
%35 = call i32 @invertOrdem(float* %34, i32 0, i32 99)
ret i32 0
}