#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 i, j;
  for (i = 0; i <= 3; i++) {
    {
      hash(1);
      hash(i);
      hash(i);
    };
    {
      hash(2);
      hash(i);
      hash(i);
    };
    for (j = i + 1; j <= 4; j++) {
      {
        hash(2);
        hash(i);
        hash(j);
      };
    }
    {
      hash(2);
      hash(i);
      hash(5);
    };
    {
      hash(3);
      hash(i);
      hash(5);
    };
  }
  {
    hash(1);
    hash(4);
    hash(4);
  };
  {
    hash(2);
    hash(4);
    hash(4);
  };
  {
    hash(2);
    hash(4);
    hash(5);
  };
  {
    hash(3);
    hash(4);
    hash(5);
  };
  {
    hash(1);
    hash(5);
    hash(5);
  };
  {
    hash(2);
    hash(5);
    hash(5);
  };
  {
    hash(3);
    hash(5);
    hash(5);
  };
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jg     11de <test+0xce>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     1198 <test+0x88>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <test+0x56>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test+0xf>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x4,%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    $0x5,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x5,%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    $0x5,%edi
call   1030 <hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    $0x1,%ebx
mov    $0x1,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
cs nopw 0x0(%rax,%rax,1)
mov    $0x2,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
add    $0x1,%ebx
cmp    $0x5,%ebx
jne    1150 <test+0x40>
mov    $0x2,%ebx
mov    $0x2,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x5,%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    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
nopw   0x0(%rax,%rax,1)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
add    $0x1,%ebx
cmp    $0x5,%ebx
jne    11f0 <test+0xe0>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x3,%ebx
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%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    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
add    $0x1,%ebx
cmp    $0x5,%ebx
jne    1290 <test+0x180>
mov    $0x2,%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    $0x2,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x1,%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    $0x3,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x4,%ebx
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
add    $0x1,%ebx
cmp    $0x5,%ebx
jne    1330 <test+0x220>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x4,%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    $0x5,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x5,%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    $0x5,%edi
pop    %rbx
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 = %40, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 3
br i1 %5, label %6, label %43
6: ; preds = %3
%7 = call i32 @hash(i32 1)
%8 = load i32, i32* %1
%9 = call i32 @hash(i32 %8)
%10 = load i32, i32* %1
%11 = call i32 @hash(i32 %10)
%12 = call i32 @hash(i32 2)
%13 = load i32, i32* %1
%14 = call i32 @hash(i32 %13)
%15 = load i32, i32* %1
%16 = call i32 @hash(i32 %15)
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %19
19: ; preds = %28, %6
%20 = load i32, i32* %2
%21 = icmp sle i32 %20, 4
br i1 %21, label %22, label %31
22: ; preds = %19
%23 = call i32 @hash(i32 2)
%24 = load i32, i32* %1
%25 = call i32 @hash(i32 %24)
%26 = load i32, i32* %2
%27 = call i32 @hash(i32 %26)
br label %28
28: ; preds = %22
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %19
31: ; preds = %19
%32 = call i32 @hash(i32 2)
%33 = load i32, i32* %1
%34 = call i32 @hash(i32 %33)
%35 = call i32 @hash(i32 5)
%36 = call i32 @hash(i32 3)
%37 = load i32, i32* %1
%38 = call i32 @hash(i32 %37)
%39 = call i32 @hash(i32 5)
br label %40
40: ; preds = %31
%41 = load i32, i32* %1
%42 = add nsw i32 %41, 1
store i32 %42, i32* %1
br label %3
43: ; preds = %3
%44 = call i32 @hash(i32 1)
%45 = call i32 @hash(i32 4)
%46 = call i32 @hash(i32 4)
%47 = call i32 @hash(i32 2)
%48 = call i32 @hash(i32 4)
%49 = call i32 @hash(i32 4)
%50 = call i32 @hash(i32 2)
%51 = call i32 @hash(i32 4)
%52 = call i32 @hash(i32 5)
%53 = call i32 @hash(i32 3)
%54 = call i32 @hash(i32 4)
%55 = call i32 @hash(i32 5)
%56 = call i32 @hash(i32 1)
%57 = call i32 @hash(i32 5)
%58 = call i32 @hash(i32 5)
%59 = call i32 @hash(i32 2)
%60 = call i32 @hash(i32 5)
%61 = call i32 @hash(i32 5)
%62 = call i32 @hash(i32 3)
%63 = call i32 @hash(i32 5)
%64 = call i32 @hash(i32 5)
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 0)
%4 = tail call i32 @hash(i32 2)
%5 = tail call i32 @hash(i32 0)
%6 = tail call i32 @hash(i32 0)
br label %7
7: ; preds = %0, %7
%8 = phi i32 [ %12, %7 ], [ 1, %0 ]
%9 = tail call i32 @hash(i32 2)
%10 = tail call i32 @hash(i32 0)
%11 = tail call i32 @hash(i32 %8)
%12 = add nuw nsw i32 %8, 1
%13 = icmp eq i32 %12, 5
br i1 %13, label %14, label %7
14: ; preds = %7
%15 = tail call i32 @hash(i32 2)
%16 = tail call i32 @hash(i32 0)
%17 = tail call i32 @hash(i32 5)
%18 = tail call i32 @hash(i32 3)
%19 = tail call i32 @hash(i32 0)
%20 = tail call i32 @hash(i32 5)
%21 = tail call i32 @hash(i32 1)
%22 = tail call i32 @hash(i32 1)
%23 = tail call i32 @hash(i32 1)
%24 = tail call i32 @hash(i32 2)
%25 = tail call i32 @hash(i32 1)
%26 = tail call i32 @hash(i32 1)
br label %27
27: ; preds = %27, %14
%28 = phi i32 [ %32, %27 ], [ 2, %14 ]
%29 = tail call i32 @hash(i32 2)
%30 = tail call i32 @hash(i32 1)
%31 = tail call i32 @hash(i32 %28)
%32 = add nuw nsw i32 %28, 1
%33 = icmp eq i32 %32, 5
br i1 %33, label %34, label %27
34: ; preds = %27
%35 = tail call i32 @hash(i32 2)
%36 = tail call i32 @hash(i32 1)
%37 = tail call i32 @hash(i32 5)
%38 = tail call i32 @hash(i32 3)
%39 = tail call i32 @hash(i32 1)
%40 = tail call i32 @hash(i32 5)
%41 = tail call i32 @hash(i32 1)
%42 = tail call i32 @hash(i32 2)
%43 = tail call i32 @hash(i32 2)
%44 = tail call i32 @hash(i32 2)
%45 = tail call i32 @hash(i32 2)
%46 = tail call i32 @hash(i32 2)
br label %47
47: ; preds = %47, %34
%48 = phi i32 [ %52, %47 ], [ 3, %34 ]
%49 = tail call i32 @hash(i32 2)
%50 = tail call i32 @hash(i32 2)
%51 = tail call i32 @hash(i32 %48)
%52 = add nuw nsw i32 %48, 1
%53 = icmp eq i32 %52, 5
br i1 %53, label %54, label %47
54: ; preds = %47
%55 = tail call i32 @hash(i32 2)
%56 = tail call i32 @hash(i32 2)
%57 = tail call i32 @hash(i32 5)
%58 = tail call i32 @hash(i32 3)
%59 = tail call i32 @hash(i32 2)
%60 = tail call i32 @hash(i32 5)
%61 = tail call i32 @hash(i32 1)
%62 = tail call i32 @hash(i32 3)
%63 = tail call i32 @hash(i32 3)
%64 = tail call i32 @hash(i32 2)
%65 = tail call i32 @hash(i32 3)
%66 = tail call i32 @hash(i32 3)
br label %67
67: ; preds = %67, %54
%68 = phi i32 [ %72, %67 ], [ 4, %54 ]
%69 = tail call i32 @hash(i32 2)
%70 = tail call i32 @hash(i32 3)
%71 = tail call i32 @hash(i32 %68)
%72 = add nuw nsw i32 %68, 1
%73 = icmp eq i32 %72, 5
br i1 %73, label %74, label %67
74: ; preds = %67
%75 = tail call i32 @hash(i32 2)
%76 = tail call i32 @hash(i32 3)
%77 = tail call i32 @hash(i32 5)
%78 = tail call i32 @hash(i32 3)
%79 = tail call i32 @hash(i32 3)
%80 = tail call i32 @hash(i32 5)
%81 = tail call i32 @hash(i32 1)
%82 = tail call i32 @hash(i32 4)
%83 = tail call i32 @hash(i32 4)
%84 = tail call i32 @hash(i32 2)
%85 = tail call i32 @hash(i32 4)
%86 = tail call i32 @hash(i32 4)
%87 = tail call i32 @hash(i32 2)
%88 = tail call i32 @hash(i32 4)
%89 = tail call i32 @hash(i32 5)
%90 = tail call i32 @hash(i32 3)
%91 = tail call i32 @hash(i32 4)
%92 = tail call i32 @hash(i32 5)
%93 = tail call i32 @hash(i32 1)
%94 = tail call i32 @hash(i32 5)
%95 = tail call i32 @hash(i32 5)
%96 = tail call i32 @hash(i32 2)
%97 = tail call i32 @hash(i32 5)
%98 = tail call i32 @hash(i32 5)
%99 = tail call i32 @hash(i32 3)
%100 = tail call i32 @hash(i32 5)
%101 = tail call i32 @hash(i32 5)
ret void
}