#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, div36, div37, div38;
  {
    hash(2);
    hash(1);
    hash(0);
    hash(1);
    hash(0);
  };
  {
    hash(4);
    hash(1);
    hash(0);
    hash(1);
    hash(0);
  };
  {
    hash(3);
    hash(2);
    hash(0);
    hash(1);
    hash(1);
  };
  {
    hash(4);
    hash(2);
    hash(0);
    hash(1);
    hash(1);
  };
  for (i = 3; i <= 10; i++) {
    if ((i + 2) % 3 <= 1) {
      div36 = (((i - 1) < 0) ? -((-(i - 1) + (3) - 1) / (3)) : (i - 1) / (3));
      if ((i + 1) % 3 <= 1) {
        div37 = (((i + 1) < 0) ? -((-(i + 1) + (3) - 1) / (3)) : (i + 1) / (3));
        if ((i + 1) % 3 == 0) {
          {
            hash(3);
            hash(i);
            hash(div36);
            hash(div37);
            hash((i + 1) / 3);
          };
          {
            hash(4);
            hash(i);
            hash(div36);
            hash(div37);
            hash((i + 1) / 3);
          };
        }
      }
      if ((i + 2) % 3 == 0) {
        div38 = (((i + 1) < 0) ? -((-(i + 1) + (3) - 1) / (3)) : (i + 1) / (3));
        {
          hash(2);
          hash(i);
          hash(div36);
          hash((i + 2) / 3);
          hash(div38);
        };
        {
          hash(4);
          hash(i);
          hash(div36);
          hash((i + 2) / 3);
          hash(div38);
        };
      }
    }
    if (i % 3 == 0) {
      div37 = (((i + 2) < 0) ? -((-(i + 2) + (3) - 1) / (3)) : (i + 2) / (3));
      div38 = (((i + 1) < 0) ? -((-(i + 1) + (3) - 1) / (3)) : (i + 1) / (3));
      {
        hash(1);
        hash(i);
        hash(i / 3);
        hash(div37);
        hash(div38);
      };
      {
        hash(4);
        hash(i);
        hash(i / 3);
        hash(div37);
        hash(div38);
      };
    }
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%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    $0x4,%edi
call   1030 <hash@plt>
mov    $0x1,%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    $0x3,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%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>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
movl   $0x3,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jg     152c <test+0x41c>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jg     1405 <test+0x2f5>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jge    122b <test+0x11b>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    123c <test+0x12c>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jg     132f <test+0x21f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jge    128e <test+0x17e>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    129f <test+0x18f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    132a <test+0x21a>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
jmp    132f <test+0x21f>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1400 <test+0x2f0>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jge    137b <test+0x26b>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    138c <test+0x27c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
jmp    1405 <test+0x2f5>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1519 <test+0x409>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    $0x0,%eax
jge    144e <test+0x33e>
mov    -0x4(%rbp),%ecx
add    $0x2,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
jmp    145f <test+0x34f>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jge    149a <test+0x38a>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    14ab <test+0x39b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
jmp    151e <test+0x40e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11d5 <test+0xc5>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
xor    %r15d,%r15d
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x1,%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    $0x3,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%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>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%bpl
mov    $0x5,%bl
mov    $0x3,%sil
jmp    1209 <test+0xf9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%bpl
add    $0x1,%r15d
add    $0x1,%bl
add    $0x1,%sil
cmp    $0x8,%r15d
je     149a <test+0x38a>
movzbl %bl,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
lea    (%rax,%rax,2),%eax
mov    $0x5,%cl
sub    %al,%cl
movzbl %cl,%r14d
lea    0x3(%r15),%r13d
movzbl %sil,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
lea    (%rax,%rax,2),%r12d
add    $0xfd,%r12b
lea    0x5(%r15),%edi
add    %r15d,%r14d
cmp    $0x1,%r14b
ja     1293 <test+0x183>
movzbl %bpl,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
lea    (%rax,%rax,2),%eax
mov    $0x4,%cl
sub    %al,%cl
movzbl %cl,%eax
lea    0x2(%r15),%ecx
movsbl %cl,%ecx
imul   $0x56,%ecx,%ecx
movzwl %cx,%ecx
mov    %ecx,%edx
shr    $0xf,%edx
shr    $0x8,%ecx
add    %dl,%cl
movsbl %cl,%ecx
lea    0x4(%r15),%edx
add    %r15d,%eax
cmp    $0x1,%al
ja     128a <test+0x17a>
test   %al,%al
je     134b <test+0x23b>
test   %r14b,%r14b
je     13ed <test+0x2dd>
cmp    %r15b,%r12b
jne    11f0 <test+0xe0>
movzbl %dil,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
movzbl %r13b,%ecx
mov    %bpl,0x4(%rsp)
imul   $0xab,%ecx,%ebp
shr    $0x9,%ebp
movzbl %al,%eax
mov    %eax,0xc(%rsp)
lea    0x4(%r15),%eax
movzbl %al,%eax
imul   $0xab,%eax,%r14d
shr    $0x9,%r14d
mov    $0x1,%edi
mov    %bl,0x3(%rsp)
mov    %sil,0x2(%rsp)
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
movzbl %bpl,%r12d
movzbl 0x4(%rsp),%ebp
mov    %r12d,%edi
call   1030 <hash@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
movzbl 0x2(%rsp),%esi
movzbl 0x3(%rsp),%ebx
jmp    11f0 <test+0xe0>
movzbl %dl,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
mov    %eax,0x10(%rsp)
mov    %r13d,0x8(%rsp)
mov    %edi,0x4(%rsp)
mov    $0x3,%edi
mov    %bl,0x3(%rsp)
mov    %sil,0x2(%rsp)
mov    %ecx,%r13d
mov    %edx,0x14(%rsp)
call   1030 <hash@plt>
mov    0x8(%rsp),%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    0x10(%rsp),%ebx
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    0x8(%rsp),%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    0x14(%rsp),%edx
mov    %r13d,%ecx
mov    0x4(%rsp),%edi
movzbl 0x2(%rsp),%esi
mov    0x8(%rsp),%r13d
movzbl 0x3(%rsp),%ebx
test   %r14b,%r14b
jne    1293 <test+0x183>
movzbl %dl,%eax
imul   $0xab,%eax,%eax
shr    $0x9,%eax
movzbl %al,%eax
mov    %eax,0x8(%rsp)
mov    %r13d,%r14d
mov    %edi,0x4(%rsp)
mov    $0x2,%edi
mov    %bl,0x3(%rsp)
mov    %sil,0x2(%rsp)
mov    %ecx,%ebx
mov    %ecx,0xc(%rsp)
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
movzbl 0x4(%rsp),%eax
imul   $0xab,%eax,%ebx
shr    $0x9,%ebx
mov    %ebx,%edi
call   1030 <hash@plt>
mov    0x8(%rsp),%r13d
mov    %r13d,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    0xc(%rsp),%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    0x4(%rsp),%edi
movzbl 0x2(%rsp),%esi
mov    %r14d,%r13d
movzbl 0x3(%rsp),%ebx
cmp    %r15b,%r12b
jne    11f0 <test+0xe0>
jmp    129c <test+0x18c>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @hash(i32 2)
%6 = call i32 @hash(i32 1)
%7 = call i32 @hash(i32 0)
%8 = call i32 @hash(i32 1)
%9 = call i32 @hash(i32 0)
%10 = call i32 @hash(i32 4)
%11 = call i32 @hash(i32 1)
%12 = call i32 @hash(i32 0)
%13 = call i32 @hash(i32 1)
%14 = call i32 @hash(i32 0)
%15 = call i32 @hash(i32 3)
%16 = call i32 @hash(i32 2)
%17 = call i32 @hash(i32 0)
%18 = call i32 @hash(i32 1)
%19 = call i32 @hash(i32 1)
%20 = call i32 @hash(i32 4)
%21 = call i32 @hash(i32 2)
%22 = call i32 @hash(i32 0)
%23 = call i32 @hash(i32 1)
%24 = call i32 @hash(i32 1)
store i32 3, i32* %1
br label %25
25: ; preds = %207, %0
%26 = load i32, i32* %1
%27 = icmp sle i32 %26, 10
br i1 %27, label %28, label %210
28: ; preds = %25
%29 = load i32, i32* %1
%30 = add nsw i32 %29, 2
%31 = srem i32 %30, 3
%32 = icmp sle i32 %31, 1
br i1 %32, label %33, label %147
33: ; preds = %28
%34 = load i32, i32* %1
%35 = sub nsw i32 %34, 1
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %45
37: ; preds = %33
%38 = load i32, i32* %1
%39 = sub nsw i32 %38, 1
%40 = sub nsw i32 0, %39
%41 = add nsw i32 %40, 3
%42 = sub nsw i32 %41, 1
%43 = sdiv i32 %42, 3
%44 = sub nsw i32 0, %43
br label %49
45: ; preds = %33
%46 = load i32, i32* %1
%47 = sub nsw i32 %46, 1
%48 = sdiv i32 %47, 3
br label %49
49: ; preds = %45, %37
%50 = phi i32 [ %44, %37 ], [ %48, %45 ]
store i32 %50, i32* %2
%51 = load i32, i32* %1
%52 = add nsw i32 %51, 1
%53 = srem i32 %52, 3
%54 = icmp sle i32 %53, 1
br i1 %54, label %55, label %101
55: ; preds = %49
%56 = load i32, i32* %1
%57 = add nsw i32 %56, 1
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %67
59: ; preds = %55
%60 = load i32, i32* %1
%61 = add nsw i32 %60, 1
%62 = sub nsw i32 0, %61
%63 = add nsw i32 %62, 3
%64 = sub nsw i32 %63, 1
%65 = sdiv i32 %64, 3
%66 = sub nsw i32 0, %65
br label %71
67: ; preds = %55
%68 = load i32, i32* %1
%69 = add nsw i32 %68, 1
%70 = sdiv i32 %69, 3
br label %71
71: ; preds = %67, %59
%72 = phi i32 [ %66, %59 ], [ %70, %67 ]
store i32 %72, i32* %3
%73 = load i32, i32* %1
%74 = add nsw i32 %73, 1
%75 = srem i32 %74, 3
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %100
77: ; preds = %71
%78 = call i32 @hash(i32 3)
%79 = load i32, i32* %1
%80 = call i32 @hash(i32 %79)
%81 = load i32, i32* %2
%82 = call i32 @hash(i32 %81)
%83 = load i32, i32* %3
%84 = call i32 @hash(i32 %83)
%85 = load i32, i32* %1
%86 = add nsw i32 %85, 1
%87 = sdiv i32 %86, 3
%88 = call i32 @hash(i32 %87)
%89 = call i32 @hash(i32 4)
%90 = load i32, i32* %1
%91 = call i32 @hash(i32 %90)
%92 = load i32, i32* %2
%93 = call i32 @hash(i32 %92)
%94 = load i32, i32* %3
%95 = call i32 @hash(i32 %94)
%96 = load i32, i32* %1
%97 = add nsw i32 %96, 1
%98 = sdiv i32 %97, 3
%99 = call i32 @hash(i32 %98)
br label %100
100: ; preds = %77, %71
br label %101
101: ; preds = %100, %49
%102 = load i32, i32* %1
%103 = add nsw i32 %102, 2
%104 = srem i32 %103, 3
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %146
106: ; preds = %101
%107 = load i32, i32* %1
%108 = add nsw i32 %107, 1
%109 = icmp slt i32 %108, 0
br i1 %109, label %110, label %118
110: ; preds = %106
%111 = load i32, i32* %1
%112 = add nsw i32 %111, 1
%113 = sub nsw i32 0, %112
%114 = add nsw i32 %113, 3
%115 = sub nsw i32 %114, 1
%116 = sdiv i32 %115, 3
%117 = sub nsw i32 0, %116
br label %122
118: ; preds = %106
%119 = load i32, i32* %1
%120 = add nsw i32 %119, 1
%121 = sdiv i32 %120, 3
br label %122
122: ; preds = %118, %110
%123 = phi i32 [ %117, %110 ], [ %121, %118 ]
store i32 %123, i32* %4
%124 = call i32 @hash(i32 2)
%125 = load i32, i32* %1
%126 = call i32 @hash(i32 %125)
%127 = load i32, i32* %2
%128 = call i32 @hash(i32 %127)
%129 = load i32, i32* %1
%130 = add nsw i32 %129, 2
%131 = sdiv i32 %130, 3
%132 = call i32 @hash(i32 %131)
%133 = load i32, i32* %4
%134 = call i32 @hash(i32 %133)
%135 = call i32 @hash(i32 4)
%136 = load i32, i32* %1
%137 = call i32 @hash(i32 %136)
%138 = load i32, i32* %2
%139 = call i32 @hash(i32 %138)
%140 = load i32, i32* %1
%141 = add nsw i32 %140, 2
%142 = sdiv i32 %141, 3
%143 = call i32 @hash(i32 %142)
%144 = load i32, i32* %4
%145 = call i32 @hash(i32 %144)
br label %146
146: ; preds = %122, %101
br label %147
147: ; preds = %146, %28
%148 = load i32, i32* %1
%149 = srem i32 %148, 3
%150 = icmp eq i32 %149, 0
br i1 %150, label %151, label %206
151: ; preds = %147
%152 = load i32, i32* %1
%153 = add nsw i32 %152, 2
%154 = icmp slt i32 %153, 0
br i1 %154, label %155, label %163
155: ; preds = %151
%156 = load i32, i32* %1
%157 = add nsw i32 %156, 2
%158 = sub nsw i32 0, %157
%159 = add nsw i32 %158, 3
%160 = sub nsw i32 %159, 1
%161 = sdiv i32 %160, 3
%162 = sub nsw i32 0, %161
br label %167
163: ; preds = %151
%164 = load i32, i32* %1
%165 = add nsw i32 %164, 2
%166 = sdiv i32 %165, 3
br label %167
167: ; preds = %163, %155
%168 = phi i32 [ %162, %155 ], [ %166, %163 ]
store i32 %168, i32* %3
%169 = load i32, i32* %1
%170 = add nsw i32 %169, 1
%171 = icmp slt i32 %170, 0
br i1 %171, label %172, label %180
172: ; preds = %167
%173 = load i32, i32* %1
%174 = add nsw i32 %173, 1
%175 = sub nsw i32 0, %174
%176 = add nsw i32 %175, 3
%177 = sub nsw i32 %176, 1
%178 = sdiv i32 %177, 3
%179 = sub nsw i32 0, %178
br label %184
180: ; preds = %167
%181 = load i32, i32* %1
%182 = add nsw i32 %181, 1
%183 = sdiv i32 %182, 3
br label %184
184: ; preds = %180, %172
%185 = phi i32 [ %179, %172 ], [ %183, %180 ]
store i32 %185, i32* %4
%186 = call i32 @hash(i32 1)
%187 = load i32, i32* %1
%188 = call i32 @hash(i32 %187)
%189 = load i32, i32* %1
%190 = sdiv i32 %189, 3
%191 = call i32 @hash(i32 %190)
%192 = load i32, i32* %3
%193 = call i32 @hash(i32 %192)
%194 = load i32, i32* %4
%195 = call i32 @hash(i32 %194)
%196 = call i32 @hash(i32 4)
%197 = load i32, i32* %1
%198 = call i32 @hash(i32 %197)
%199 = load i32, i32* %1
%200 = sdiv i32 %199, 3
%201 = call i32 @hash(i32 %200)
%202 = load i32, i32* %3
%203 = call i32 @hash(i32 %202)
%204 = load i32, i32* %4
%205 = call i32 @hash(i32 %204)
br label %206
206: ; preds = %184, %147
br label %207
207: ; preds = %206
%208 = load i32, i32* %1
%209 = add nsw i32 %208, 1
store i32 %209, i32* %1
br label %25
210: ; preds = %25
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @hash(i32 2)
%2 = tail call i32 @hash(i32 1)
%3 = tail call i32 @hash(i32 0)
%4 = tail call i32 @hash(i32 1)
%5 = tail call i32 @hash(i32 0)
%6 = tail call i32 @hash(i32 4)
%7 = tail call i32 @hash(i32 1)
%8 = tail call i32 @hash(i32 0)
%9 = tail call i32 @hash(i32 1)
%10 = tail call i32 @hash(i32 0)
%11 = tail call i32 @hash(i32 3)
%12 = tail call i32 @hash(i32 2)
%13 = tail call i32 @hash(i32 0)
%14 = tail call i32 @hash(i32 1)
%15 = tail call i32 @hash(i32 1)
%16 = tail call i32 @hash(i32 4)
%17 = tail call i32 @hash(i32 2)
%18 = tail call i32 @hash(i32 0)
%19 = tail call i32 @hash(i32 1)
%20 = tail call i32 @hash(i32 1)
br label %21
21: ; preds = %0, %89
%22 = phi i32 [ 3, %0 ], [ %90, %89 ]
%23 = trunc i32 %22 to i8
%24 = add i8 %23, 2
%25 = urem i8 %24, 3
%26 = udiv i8 %24, 3
%27 = icmp ult i8 %25, 2
%28 = trunc i32 %22 to i8
br i1 %27, label %29, label %69
29: ; preds = %21
%30 = add i8 %28, -1
%31 = sdiv i8 %30, 3
%32 = sext i8 %31 to i32
%33 = trunc i32 %22 to i8
%34 = add i8 %33, 1
%35 = urem i8 %34, 3
%36 = udiv i8 %34, 3
%37 = icmp ult i8 %35, 2
br i1 %37, label %38, label %53
38: ; preds = %29
%39 = udiv i8 %34, 3
%40 = zext i8 %39 to i32
%41 = icmp eq i8 %35, 0
br i1 %41, label %42, label %53
42: ; preds = %38
%43 = tail call i32 @hash(i32 3)
%44 = tail call i32 @hash(i32 %22)
%45 = tail call i32 @hash(i32 %32)
%46 = tail call i32 @hash(i32 %40)
%47 = tail call i32 @hash(i32 %40)
%48 = tail call i32 @hash(i32 4)
%49 = tail call i32 @hash(i32 %22)
%50 = tail call i32 @hash(i32 %32)
%51 = tail call i32 @hash(i32 %40)
%52 = tail call i32 @hash(i32 %40)
br label %53
53: ; preds = %38, %42, %29
%54 = icmp eq i8 %25, 0
br i1 %54, label %55, label %69
55: ; preds = %53
%56 = zext i8 %36 to i32
%57 = tail call i32 @hash(i32 2)
%58 = tail call i32 @hash(i32 %22)
%59 = tail call i32 @hash(i32 %32)
%60 = udiv i8 %24, 3
%61 = zext i8 %60 to i32
%62 = tail call i32 @hash(i32 %61)
%63 = tail call i32 @hash(i32 %56)
%64 = tail call i32 @hash(i32 4)
%65 = tail call i32 @hash(i32 %22)
%66 = tail call i32 @hash(i32 %32)
%67 = tail call i32 @hash(i32 %61)
%68 = tail call i32 @hash(i32 %56)
br label %69
69: ; preds = %21, %53, %55
%70 = urem i8 %28, 3
%71 = udiv i8 %28, 3
%72 = icmp eq i8 %70, 0
br i1 %72, label %73, label %89
73: ; preds = %69
%74 = zext i8 %26 to i32
%75 = add i8 %28, 1
%76 = udiv i8 %75, 3
%77 = zext i8 %76 to i32
%78 = tail call i32 @hash(i32 1)
%79 = tail call i32 @hash(i32 %22)
%80 = zext i8 %71 to i32
%81 = tail call i32 @hash(i32 %80)
%82 = tail call i32 @hash(i32 %74)
%83 = tail call i32 @hash(i32 %77)
%84 = tail call i32 @hash(i32 4)
%85 = tail call i32 @hash(i32 %22)
%86 = tail call i32 @hash(i32 %80)
%87 = tail call i32 @hash(i32 %74)
%88 = tail call i32 @hash(i32 %77)
br label %89
89: ; preds = %69, %73
%90 = add nuw nsw i32 %22, 1
%91 = icmp eq i32 %90, 11
br i1 %91, label %92, label %21
92: ; preds = %89
ret void
}