#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 method();
int main() {
  int cntr;
  int array[32];
  for (cntr = 0; cntr < 32; cntr++) {
    array[cntr] = method();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1155 <main+0x45>
mov    $0x0,%al
call   1030 <method@plt>
mov    %eax,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
call   1030 <method@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @method()
%2 = tail call i32 (...) @method()
%3 = tail call i32 (...) @method()
%4 = tail call i32 (...) @method()
%5 = tail call i32 (...) @method()
%6 = tail call i32 (...) @method()
%7 = tail call i32 (...) @method()
%8 = tail call i32 (...) @method()
%9 = tail call i32 (...) @method()
%10 = tail call i32 (...) @method()
%11 = tail call i32 (...) @method()
%12 = tail call i32 (...) @method()
%13 = tail call i32 (...) @method()
%14 = tail call i32 (...) @method()
%15 = tail call i32 (...) @method()
%16 = tail call i32 (...) @method()
%17 = tail call i32 (...) @method()
%18 = tail call i32 (...) @method()
%19 = tail call i32 (...) @method()
%20 = tail call i32 (...) @method()
%21 = tail call i32 (...) @method()
%22 = tail call i32 (...) @method()
%23 = tail call i32 (...) @method()
%24 = tail call i32 (...) @method()
%25 = tail call i32 (...) @method()
%26 = tail call i32 (...) @method()
%27 = tail call i32 (...) @method()
%28 = tail call i32 (...) @method()
%29 = tail call i32 (...) @method()
%30 = tail call i32 (...) @method()
%31 = tail call i32 (...) @method()
%32 = tail call i32 (...) @method()
ret i32 0
}