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


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jg     1179 <test+0x69>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jg     1166 <test+0x56>
mov    $0x1,%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    1134 <test+0x24>
jmp    116b <test+0x5b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test+0xf>
movl   $0x3,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     11b4 <test+0xa4>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%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    1180 <test+0x70>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x5,%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    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%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    $0x4,%edi
call   1030 <hash@plt>
movl   $0x5,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jg     1285 <test+0x175>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%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    1251 <test+0x141>
movl   $0x6,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jg     130e <test+0x1fe>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
add    $0x9,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jg     12fb <test+0x1eb>
mov    $0x1,%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    12c9 <test+0x1b9>
jmp    1300 <test+0x1f0>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    128c <test+0x17c>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x8,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
br label %3
3: ; preds = %23, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 3
br i1 %5, label %6, label %26
6: ; preds = %3
%7 = load i32, i32* %1
%8 = sub nsw i32 0, %7
%9 = add nsw i32 %8, 6
store i32 %9, i32* %2
br label %10
10: ; preds = %19, %6
%11 = load i32, i32* %2
%12 = icmp sle i32 %11, 6
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = call i32 @hash(i32 1)
%15 = load i32, i32* %1
%16 = call i32 @hash(i32 %15)
%17 = load i32, i32* %2
%18 = call i32 @hash(i32 %17)
br label %19
19: ; preds = %13
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %10
22: ; preds = %10
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %3
26: ; preds = %3
store i32 3, i32* %2
br label %27
27: ; preds = %35, %26
%28 = load i32, i32* %2
%29 = icmp sle i32 %28, 4
br i1 %29, label %30, label %38
30: ; preds = %27
%31 = call i32 @hash(i32 1)
%32 = call i32 @hash(i32 4)
%33 = load i32, i32* %2
%34 = call i32 @hash(i32 %33)
br label %35
35: ; preds = %30
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
br label %27
38: ; preds = %27
%39 = call i32 @hash(i32 1)
%40 = call i32 @hash(i32 4)
%41 = call i32 @hash(i32 5)
%42 = call i32 @hash(i32 2)
%43 = call i32 @hash(i32 4)
%44 = call i32 @hash(i32 5)
%45 = call i32 @hash(i32 1)
%46 = call i32 @hash(i32 4)
%47 = call i32 @hash(i32 6)
%48 = call i32 @hash(i32 1)
%49 = call i32 @hash(i32 5)
%50 = call i32 @hash(i32 4)
%51 = call i32 @hash(i32 2)
%52 = call i32 @hash(i32 5)
%53 = call i32 @hash(i32 4)
store i32 5, i32* %2
br label %54
54: ; preds = %62, %38
%55 = load i32, i32* %2
%56 = icmp sle i32 %55, 6
br i1 %56, label %57, label %65
57: ; preds = %54
%58 = call i32 @hash(i32 1)
%59 = call i32 @hash(i32 5)
%60 = load i32, i32* %2
%61 = call i32 @hash(i32 %60)
br label %62
62: ; preds = %57
%63 = load i32, i32* %2
%64 = add nsw i32 %63, 1
store i32 %64, i32* %2
br label %54
65: ; preds = %54
store i32 6, i32* %1
br label %66
66: ; preds = %95, %65
%67 = load i32, i32* %1
%68 = icmp sle i32 %67, 7
br i1 %68, label %69, label %98
69: ; preds = %66
%70 = load i32, i32* %1
%71 = sub nsw i32 0, %70
%72 = add nsw i32 %71, 9
store i32 %72, i32* %2
%73 = call i32 @hash(i32 2)
%74 = load i32, i32* %1
%75 = call i32 @hash(i32 %74)
%76 = load i32, i32* %1
%77 = sub nsw i32 0, %76
%78 = add nsw i32 %77, 9
%79 = call i32 @hash(i32 %78)
%80 = load i32, i32* %1
%81 = sub nsw i32 %80, 1
store i32 %81, i32* %2
br label %82
82: ; preds = %91, %69
%83 = load i32, i32* %2
%84 = icmp sle i32 %83, 6
br i1 %84, label %85, label %94
85: ; preds = %82
%86 = call i32 @hash(i32 1)
%87 = load i32, i32* %1
%88 = call i32 @hash(i32 %87)
%89 = load i32, i32* %2
%90 = call i32 @hash(i32 %89)
br label %91
91: ; preds = %85
%92 = load i32, i32* %2
%93 = add nsw i32 %92, 1
store i32 %93, i32* %2
br label %82
94: ; preds = %82
br label %95
95: ; preds = %94
%96 = load i32, i32* %1
%97 = add nsw i32 %96, 1
store i32 %97, i32* %1
br label %66
98: ; preds = %66
%99 = call i32 @hash(i32 2)
%100 = call i32 @hash(i32 8)
%101 = call i32 @hash(i32 1)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @hash(i32 1)
%2 = tail call i32 @hash(i32 2)
%3 = tail call i32 @hash(i32 4)
%4 = tail call i32 @hash(i32 1)
%5 = tail call i32 @hash(i32 2)
%6 = tail call i32 @hash(i32 5)
%7 = tail call i32 @hash(i32 1)
%8 = tail call i32 @hash(i32 2)
%9 = tail call i32 @hash(i32 6)
%10 = tail call i32 @hash(i32 1)
%11 = tail call i32 @hash(i32 3)
%12 = tail call i32 @hash(i32 3)
%13 = tail call i32 @hash(i32 1)
%14 = tail call i32 @hash(i32 3)
%15 = tail call i32 @hash(i32 4)
%16 = tail call i32 @hash(i32 1)
%17 = tail call i32 @hash(i32 3)
%18 = tail call i32 @hash(i32 5)
%19 = tail call i32 @hash(i32 1)
%20 = tail call i32 @hash(i32 3)
%21 = tail call i32 @hash(i32 6)
%22 = tail call i32 @hash(i32 1)
%23 = tail call i32 @hash(i32 4)
%24 = tail call i32 @hash(i32 3)
%25 = tail call i32 @hash(i32 1)
%26 = tail call i32 @hash(i32 4)
%27 = tail call i32 @hash(i32 4)
%28 = tail call i32 @hash(i32 1)
%29 = tail call i32 @hash(i32 4)
%30 = tail call i32 @hash(i32 5)
%31 = tail call i32 @hash(i32 2)
%32 = tail call i32 @hash(i32 4)
%33 = tail call i32 @hash(i32 5)
%34 = tail call i32 @hash(i32 1)
%35 = tail call i32 @hash(i32 4)
%36 = tail call i32 @hash(i32 6)
%37 = tail call i32 @hash(i32 1)
%38 = tail call i32 @hash(i32 5)
%39 = tail call i32 @hash(i32 4)
%40 = tail call i32 @hash(i32 2)
%41 = tail call i32 @hash(i32 5)
%42 = tail call i32 @hash(i32 4)
%43 = tail call i32 @hash(i32 1)
%44 = tail call i32 @hash(i32 5)
%45 = tail call i32 @hash(i32 5)
%46 = tail call i32 @hash(i32 1)
%47 = tail call i32 @hash(i32 5)
%48 = tail call i32 @hash(i32 6)
%49 = tail call i32 @hash(i32 2)
%50 = tail call i32 @hash(i32 6)
%51 = tail call i32 @hash(i32 3)
%52 = tail call i32 @hash(i32 1)
%53 = tail call i32 @hash(i32 6)
%54 = tail call i32 @hash(i32 5)
%55 = tail call i32 @hash(i32 1)
%56 = tail call i32 @hash(i32 6)
%57 = tail call i32 @hash(i32 6)
%58 = tail call i32 @hash(i32 2)
%59 = tail call i32 @hash(i32 7)
%60 = tail call i32 @hash(i32 2)
%61 = tail call i32 @hash(i32 1)
%62 = tail call i32 @hash(i32 7)
%63 = tail call i32 @hash(i32 6)
%64 = tail call i32 @hash(i32 2)
%65 = tail call i32 @hash(i32 8)
%66 = tail call i32 @hash(i32 1)
ret void
}