#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++) {
    if (c1 == 0) {
      {
        hash(1);
        hash(0);
      };
    }
    if (c1 >= 2) {
      {
        hash(2);
        hash(c1);
      };
    }
    {
      hash(3);
      hash(c1);
    };
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jg     1180 <test+0x70>
cmpl   $0x0,-0x4(%rbp)
jne    1144 <test+0x34>
mov    $0x1,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
cmpl   $0x2,-0x4(%rbp)
jl     1160 <test+0x50>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    $0x3,%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    $0x1,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x3,%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    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x3,%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    $0x3,%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    $0x3,%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    $0x3,%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    $0x3,%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    $0x3,%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    $0x3,%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    $0x3,%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 = %23, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 10
br i1 %5, label %6, label %26
6: ; preds = %3
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = call i32 @hash(i32 1)
%11 = call i32 @hash(i32 0)
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %1
%14 = icmp sge i32 %13, 2
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = call i32 @hash(i32 2)
%17 = load i32, i32* %1
%18 = call i32 @hash(i32 %17)
br label %19
19: ; preds = %15, %12
%20 = call i32 @hash(i32 3)
%21 = load i32, i32* %1
%22 = call i32 @hash(i32 %21)
br label %23
23: ; preds = %19
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %3
26: ; preds = %3
ret void
}

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