#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*/ hash(int);
void test() {
  int c1;
  int i;
  for (c1 = 0; c1 <= 10; c1++) {
    {
      hash(2);
      hash(c1);
    };
    {
      hash(1);
      hash(c1);
    };
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jg     115b <test+0x4b>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x2,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x7,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x7,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x8,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x8,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x9,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x9,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0xa,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <hash@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 10
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = call i32 @hash(i32 2)
%8 = load i32, i32* %1
%9 = call i32 @hash(i32 %8)
%10 = call i32 @hash(i32 1)
%11 = load i32, i32* %1
%12 = call i32 @hash(i32 %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @hash(i32 2)
%2 = tail call i32 @hash(i32 0)
%3 = tail call i32 @hash(i32 1)
%4 = tail call i32 @hash(i32 0)
%5 = tail call i32 @hash(i32 2)
%6 = tail call i32 @hash(i32 1)
%7 = tail call i32 @hash(i32 1)
%8 = tail call i32 @hash(i32 1)
%9 = tail call i32 @hash(i32 2)
%10 = tail call i32 @hash(i32 2)
%11 = tail call i32 @hash(i32 1)
%12 = tail call i32 @hash(i32 2)
%13 = tail call i32 @hash(i32 2)
%14 = tail call i32 @hash(i32 3)
%15 = tail call i32 @hash(i32 1)
%16 = tail call i32 @hash(i32 3)
%17 = tail call i32 @hash(i32 2)
%18 = tail call i32 @hash(i32 4)
%19 = tail call i32 @hash(i32 1)
%20 = tail call i32 @hash(i32 4)
%21 = tail call i32 @hash(i32 2)
%22 = tail call i32 @hash(i32 5)
%23 = tail call i32 @hash(i32 1)
%24 = tail call i32 @hash(i32 5)
%25 = tail call i32 @hash(i32 2)
%26 = tail call i32 @hash(i32 6)
%27 = tail call i32 @hash(i32 1)
%28 = tail call i32 @hash(i32 6)
%29 = tail call i32 @hash(i32 2)
%30 = tail call i32 @hash(i32 7)
%31 = tail call i32 @hash(i32 1)
%32 = tail call i32 @hash(i32 7)
%33 = tail call i32 @hash(i32 2)
%34 = tail call i32 @hash(i32 8)
%35 = tail call i32 @hash(i32 1)
%36 = tail call i32 @hash(i32 8)
%37 = tail call i32 @hash(i32 2)
%38 = tail call i32 @hash(i32 9)
%39 = tail call i32 @hash(i32 1)
%40 = tail call i32 @hash(i32 9)
%41 = tail call i32 @hash(i32 2)
%42 = tail call i32 @hash(i32 10)
%43 = tail call i32 @hash(i32 1)
%44 = tail call i32 @hash(i32 10)
ret void
}