#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 M) {
  int c1, c2, c3;
  int i, j, k;
  if (M >= 2) {
    for (c2 = 1; c2 <= M - 1; c2++) {
      {
        hash(1);
        hash(c2);
      };
      for (c3 = c2 + 1; c3 <= M; c3++) {
        {
          hash(4);
          hash(c2);
          hash(c3);
        };
      }
    }
    {
      hash(1);
      hash(M);
    };
  }
  if (M == 1) {
    {
      hash(1);
      hash(1);
    };
  }
  if (M >= 2) {
    {
      hash(3);
      hash(1);
    };
  }
  if (M >= 3) {
    {
      hash(6);
      hash(1);
      hash(2);
    };
    for (c2 = 3; c2 <= M; c2++) {
      {
        hash(6);
        hash(1);
        hash(c2);
      };
      for (i = 2; i <= c2 - 1; i++) {
        {
          hash(5);
          hash(i);
          hash(c2);
          hash(1);
        };
      }
    }
  }
  if (M == 2) {
    {
      hash(6);
      hash(1);
      hash(2);
    };
  }
  for (c1 = 3; c1 <= 3 * M - 7; c1++) {
    if ((c1 + 2) % 3 == 0) {
      i = (c1 + 2) / 3;
      {
        hash(3);
        hash((c1 + 2) / 3);
      };
    }
    if (c1 % 3 == 0) {
      c2 = (c1 + 3) / 3;
      i = (c1 + 3) / 3;
      {
        hash(2);
        hash((c1 + 3) / 3);
        hash(c1 / 3);
      };
    }
    c2 = (((c1 + 6) < 0) ? -((-(c1 + 6) + (3) - 1) / (3)) : (c1 + 6) / (3));
    if ((c1 + 1) % 3 == 0) {
      i = (c1 + 1) / 3;
      {
        hash(6);
        hash((c1 + 1) / 3);
        hash(c2);
      };
    }
    if (c1 % 3 == 0) {
      {
        hash(2);
        hash(c2);
        hash(c1 / 3);
      };
    }
    for (c2 = (((c1 + 7) < 0) ? -((-(c1 + 7)) / (3))
                              : ((c1 + 7) + (3) - 1) / (3));
         c2 <= M; c2++) {
      if ((c1 + 1) % 3 == 0) {
        i = (c1 + 1) / 3;
        {
          hash(6);
          hash((c1 + 1) / 3);
          hash(c2);
        };
      }
      if (c1 % 3 == 0) {
        {
          hash(2);
          hash(c2);
          hash(c1 / 3);
        };
      }
      if ((c1 + 1) % 3 == 0) {
        c3 = (c1 + 1) / 3;
        for (i = (((c1 + 4) < 0) ? -((-(c1 + 4)) / (3))
                                 : ((c1 + 4) + (3) - 1) / (3));
             i <= c2 - 1; i++) {
          k = (c1 + 1) / 3;
          {
            hash(5);
            hash(i);
            hash(c2);
            hash((c1 + 1) / 3);
          };
        }
      }
    }
  }
  for (c1 = ((3 * M - 6) > (3) ? (3 * M - 6) : (3)); c1 <= 3 * M - 4; c1++) {
    if ((c1 + 2) % 3 == 0) {
      i = (c1 + 2) / 3;
      {
        hash(3);
        hash((c1 + 2) / 3);
      };
    }
    if (c1 % 3 == 0) {
      c2 = (c1 + 3) / 3;
      i = (c1 + 3) / 3;
      {
        hash(2);
        hash((c1 + 3) / 3);
        hash(c1 / 3);
      };
    }
    for (c2 = (((c1 + 4) < 0) ? -((-(c1 + 4)) / (3))
                              : ((c1 + 4) + (3) - 1) / (3));
         c2 <= M; c2++) {
      if ((c1 + 1) % 3 == 0) {
        i = (c1 + 1) / 3;
        {
          hash(6);
          hash((c1 + 1) / 3);
          hash(c2);
        };
      }
      if (c1 % 3 == 0) {
        {
          hash(2);
          hash(c2);
          hash(c1 / 3);
        };
      }
    }
  }
  if (M >= 2) {
    c1 = 3 * M - 3;
    j = M - 1;
    {
      hash(2);
      hash(M);
      hash(M - 1);
    };
  }
  if (M >= 1) {
    c1 = 3 * M - 2;
    {
      hash(3);
      hash(M);
    };
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     11b1 <test+0xa1>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     119f <test+0x8f>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     118c <test+0x7c>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1158 <test+0x48>
jmp    1191 <test+0x81>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <test+0x1c>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
cmpl   $0x1,-0x4(%rbp)
jne    11cf <test+0xbf>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
cmpl   $0x2,-0x4(%rbp)
jl     11ed <test+0xdd>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
cmpl   $0x3,-0x4(%rbp)
jl     12a6 <test+0x196>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     12a1 <test+0x191>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     128e <test+0x17e>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    -0x14(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    124b <test+0x13b>
jmp    1293 <test+0x183>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    121c <test+0x10c>
jmp    12a6 <test+0x196>
cmpl   $0x2,-0x4(%rbp)
jne    12ce <test+0x1be>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
sub    $0x7,%ecx
cmp    %ecx,%eax
jg     1645 <test+0x535>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    132e <test+0x21e>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x3,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1395 <test+0x285>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x6,%eax
cmp    $0x0,%eax
jge    13ca <test+0x2ba>
mov    -0x8(%rbp),%ecx
add    $0x6,%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    13db <test+0x2cb>
mov    -0x8(%rbp),%eax
add    $0x6,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1430 <test+0x320>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x6,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1468 <test+0x358>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x7,%eax
cmp    $0x0,%eax
jge    1497 <test+0x387>
mov    -0x8(%rbp),%ecx
add    $0x7,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    14ae <test+0x39e>
mov    -0x8(%rbp),%eax
add    $0x7,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1632 <test+0x522>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    150f <test+0x3ff>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x6,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1547 <test+0x437>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    161f <test+0x50f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
cmp    $0x0,%eax
jge    159e <test+0x48e>
mov    -0x8(%rbp),%ecx
add    $0x4,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
jmp    15b5 <test+0x4a5>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     161a <test+0x50a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    $0x5,%edi
call   1030 <hash@plt>
mov    -0x14(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    15bb <test+0x4ab>
jmp    161f <test+0x50f>
jmp    1624 <test+0x514>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    14b4 <test+0x3a4>
jmp    1637 <test+0x527>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12d5 <test+0x1c5>
imul   $0x3,-0x4(%rbp),%eax
sub    $0x6,%eax
cmp    $0x3,%eax
jle    1664 <test+0x554>
imul   $0x3,-0x4(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x2c(%rbp)
jmp    1671 <test+0x561>
mov    $0x3,%eax
mov    %eax,-0x2c(%rbp)
jmp    1671 <test+0x561>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jg     183c <test+0x72c>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    16d0 <test+0x5c0>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x3,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1737 <test+0x627>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
cmp    $0x0,%eax
jge    1766 <test+0x656>
mov    -0x8(%rbp),%ecx
add    $0x4,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
jmp    177d <test+0x66d>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
add    $0x3,%eax
sub    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1829 <test+0x719>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    17de <test+0x6ce>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    $0x6,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1816 <test+0x706>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
jmp    181b <test+0x70b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1783 <test+0x673>
jmp    182e <test+0x71e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1677 <test+0x567>
cmpl   $0x2,-0x4(%rbp)
jl     1876 <test+0x766>
imul   $0x3,-0x4(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <hash@plt>
cmpl   $0x1,-0x4(%rbp)
jl     189c <test+0x78c>
imul   $0x3,-0x4(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edi,%r12d
cmp    $0x2,%edi
jl     11a2 <test+0x92>
mov    %r12d,%r14d
neg    %r14d
mov    $0x1,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15d,%ebx
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r15d,%edi
call   1030 <hash@plt>
lea    0x1(%rbx),%r15d
mov    %r15d,%ebp
nopl   0x0(%rax)
mov    $0x4,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
lea    (%r14,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1160 <test+0x50>
cmp    %r12d,%r15d
jne    1140 <test+0x30>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
cmp    $0x1,%r12d
jne    11bc <test+0xac>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
cmp    $0x2,%r12d
mov    %r12,(%rsp)
jl     1294 <test+0x184>
mov    $0x3,%r14d
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x6,%ebp
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
cmp    $0x2,%r12d
je     14a1 <test+0x391>
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    $0x2,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x5,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x2,%eax
jne    1250 <test+0x140>
lea    0x1(%r14),%eax
add    $0xffffffff,%ebx
cmp    %r12d,%r14d
mov    %eax,%r14d
jne    1220 <test+0x110>
lea    (%r12,%r12,2),%ebp
cmp    $0xa,%ebp
jl     14a1 <test+0x391>
mov    %rbp,0x10(%rsp)
lea    -0x6(%rbp),%eax
mov    %eax,0x1c(%rsp)
mov    $0x3,%ebx
mov    $0xaaaaaaab,%r15d
jmp    12d5 <test+0x1c5>
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rbx
cmp    0x1c(%rsp),%ebx
mov    $0xaaaaaaab,%r15d
je     149c <test+0x38c>
lea    0x2(%rbx),%ebp
imul   $0xaaaaaaab,%ebp,%eax
cmp    $0x55555555,%eax
ja     12fe <test+0x1ee>
imul   %r15,%rbp
shr    $0x21,%rbp
mov    $0x3,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %ebx,%r12d
mov    %r12,%rax
imul   %r15,%rax
shr    $0x21,%rax
mov    %rax,0x8(%rsp)
lea    (%rax,%rax,2),%eax
mov    %ebx,%r14d
sub    %eax,%r14d
jne    1348 <test+0x238>
lea    0x3(%rbx),%ebp
mov    $0x2,%edi
call   1030 <hash@plt>
imul   %r15,%rbp
shr    $0x21,%rbp
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %r12,%rdi
imul   %r15,%rdi
shr    $0x21,%rdi
call   1030 <hash@plt>
mov    %r12,%rbp
lea    0x6(%rbx),%r12d
imul   %r15,%r12
shr    $0x21,%r12
lea    0x1(%rbx),%ecx
mov    %rcx,%r13
imul   %r15,%r13
shr    $0x21,%r13
lea    0x0(%r13,%r13,2),%eax
mov    %rcx,0x20(%rsp)
mov    %ecx,%r15d
sub    %eax,%r15d
je     1440 <test+0x330>
test   %r14d,%r14d
je     1471 <test+0x361>
add    $0x9,%ebx
mov    $0xaaaaaaab,%eax
imul   %rax,%rbx
shr    $0x21,%rbx
cmp    (%rsp),%ebx
jle    13ae <test+0x29e>
jmp    12c0 <test+0x1b0>
xchg   %ax,%ax
lea    0x1(%rbx),%eax
cmp    (%rsp),%ebx
mov    %eax,%ebx
jge    12c0 <test+0x1b0>
test   %r15d,%r15d
je     13c0 <test+0x2b0>
test   %r14d,%r14d
je     13de <test+0x2ce>
test   %r15d,%r15d
je     13fe <test+0x2ee>
jmp    13a0 <test+0x290>
nop
mov    $0x6,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
test   %r14d,%r14d
jne    13b8 <test+0x2a8>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    0x8(%rsp),%rdi
call   1030 <hash@plt>
test   %r15d,%r15d
jne    13a0 <test+0x290>
cmp    %ebx,%r12d
jae    13a0 <test+0x290>
mov    %r12d,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x5,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
add    $0x1,%ebp
cmp    %ebx,%ebp
jb     1410 <test+0x300>
jmp    13a0 <test+0x290>
nopl   0x0(%rax)
mov    $0x6,%edi
call   1030 <hash@plt>
mov    0x20(%rsp),%edi
mov    $0xaaaaaaab,%eax
imul   %rax,%rdi
shr    $0x21,%rdi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
test   %r14d,%r14d
jne    1384 <test+0x274>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0xaaaaaaab,%eax
imul   %rax,%rbp
shr    $0x21,%rbp
mov    %ebp,%edi
call   1030 <hash@plt>
jmp    1384 <test+0x274>
mov    0x10(%rsp),%rbp
cmp    $0xa,%ebp
mov    $0x9,%ebx
cmovge %ebp,%ebx
lea    -0x2(%rbx),%eax
cmp    %ebp,%eax
jle    14de <test+0x3ce>
mov    (%rsp),%rbx
cmp    $0x2,%ebx
jl     1658 <test+0x548>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
lea    -0x1(%rbx),%edi
call   1030 <hash@plt>
jmp    165d <test+0x54d>
add    $0xfffffffa,%ebx
add    $0xfffffffd,%ebp
mov    (%rsp),%rax
lea    0x1(%rax),%r12d
mov    %rbp,0x10(%rsp)
jmp    150e <test+0x3fe>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%rsp),%rbp
mov    0x8(%rsp),%rbx
cmp    %ebp,%ebx
je     14b3 <test+0x3a3>
lea    0x2(%rbx),%eax
imul   $0xaaaaaaab,%eax,%ecx
add    $0x2aaaaaaa,%ecx
cmp    $0x55555554,%ecx
ja     154c <test+0x43c>
cltq
imul   $0x55555556,%rax,%rbp
mov    %rbp,%rax
shr    $0x3f,%rax
shr    $0x20,%rbp
add    %eax,%ebp
mov    $0x3,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %ebx,%ebp
mov    %rbp,%r15
mov    $0xaaaaaaab,%eax
imul   %rax,%r15
shr    $0x21,%r15
lea    (%r15,%r15,2),%eax
mov    %ebx,%r13d
sub    %eax,%r13d
jne    15a8 <test+0x498>
lea    0x3(%rbx),%r14d
mov    $0x2,%edi
call   1030 <hash@plt>
movslq %r14d,%rax
imul   $0x55555556,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
shr    $0x20,%rdi
add    %eax,%edi
call   1030 <hash@plt>
mov    $0xaaaaaaab,%eax
imul   %rax,%rbp
shr    $0x21,%rbp
mov    %ebp,%edi
call   1030 <hash@plt>
lea    0x6(%rbx),%eax
cltq
imul   $0x55555556,%rax,%rbp
mov    %rbp,%rax
shr    $0x3f,%rax
shr    $0x20,%rbp
add    %eax,%ebp
add    $0x1,%ebx
mov    %rbx,0x8(%rsp)
cmp    (%rsp),%ebp
jg     1500 <test+0x3f0>
movslq 0x8(%rsp),%r14
imul   $0x55555556,%r14,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
shr    $0x20,%rbx
add    %eax,%ebx
lea    (%rbx,%rbx,2),%eax
sub    %eax,%r14d
jmp    160c <test+0x4fc>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebp
cmp    %ebp,%r12d
je     1500 <test+0x3f0>
test   %r14d,%r14d
je     1620 <test+0x510>
test   %r13d,%r13d
jne    1600 <test+0x4f0>
jmp    163d <test+0x52d>
nopl   0x0(%rax,%rax,1)
mov    $0x6,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
test   %r13d,%r13d
jne    1600 <test+0x4f0>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %r15d,%edi
call   1030 <hash@plt>
jmp    1600 <test+0x4f0>
cmp    $0x1,%ebx
jne    167c <test+0x56c>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <hash@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @test(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %2
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 2
br i1 %10, label %11, label %44
11: ; preds = %1
store i32 1, i32* %4
br label %12
12: ; preds = %37, %11
%13 = load i32, i32* %4
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 1
%16 = icmp sle i32 %13, %15
br i1 %16, label %17, label %40
17: ; preds = %12
%18 = call i32 @hash(i32 1)
%19 = load i32, i32* %4
%20 = call i32 @hash(i32 %19)
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %23
23: ; preds = %33, %17
%24 = load i32, i32* %5
%25 = load i32, i32* %2
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %36
27: ; preds = %23
%28 = call i32 @hash(i32 4)
%29 = load i32, i32* %4
%30 = call i32 @hash(i32 %29)
%31 = load i32, i32* %5
%32 = call i32 @hash(i32 %31)
br label %33
33: ; preds = %27
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %23
36: ; preds = %23
br label %37
37: ; preds = %36
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %12
40: ; preds = %12
%41 = call i32 @hash(i32 1)
%42 = load i32, i32* %2
%43 = call i32 @hash(i32 %42)
br label %44
44: ; preds = %40, %1
%45 = load i32, i32* %2
%46 = icmp eq i32 %45, 1
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = call i32 @hash(i32 1)
%49 = call i32 @hash(i32 1)
br label %50
50: ; preds = %47, %44
%51 = load i32, i32* %2
%52 = icmp sge i32 %51, 2
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = call i32 @hash(i32 3)
%55 = call i32 @hash(i32 1)
br label %56
56: ; preds = %53, %50
%57 = load i32, i32* %2
%58 = icmp sge i32 %57, 3
br i1 %58, label %59, label %92
59: ; preds = %56
%60 = call i32 @hash(i32 6)
%61 = call i32 @hash(i32 1)
%62 = call i32 @hash(i32 2)
store i32 3, i32* %4
br label %63
63: ; preds = %88, %59
%64 = load i32, i32* %4
%65 = load i32, i32* %2
%66 = icmp sle i32 %64, %65
br i1 %66, label %67, label %91
67: ; preds = %63
%68 = call i32 @hash(i32 6)
%69 = call i32 @hash(i32 1)
%70 = load i32, i32* %4
%71 = call i32 @hash(i32 %70)
store i32 2, i32* %6
br label %72
72: ; preds = %84, %67
%73 = load i32, i32* %6
%74 = load i32, i32* %4
%75 = sub nsw i32 %74, 1
%76 = icmp sle i32 %73, %75
br i1 %76, label %77, label %87
77: ; preds = %72
%78 = call i32 @hash(i32 5)
%79 = load i32, i32* %6
%80 = call i32 @hash(i32 %79)
%81 = load i32, i32* %4
%82 = call i32 @hash(i32 %81)
%83 = call i32 @hash(i32 1)
br label %84
84: ; preds = %77
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 1
store i32 %86, i32* %6
br label %72
87: ; preds = %72
br label %88
88: ; preds = %87
%89 = load i32, i32* %4
%90 = add nsw i32 %89, 1
store i32 %90, i32* %4
br label %63
91: ; preds = %63
br label %92
92: ; preds = %91, %56
%93 = load i32, i32* %2
%94 = icmp eq i32 %93, 2
br i1 %94, label %95, label %99
95: ; preds = %92
%96 = call i32 @hash(i32 6)
%97 = call i32 @hash(i32 1)
%98 = call i32 @hash(i32 2)
br label %99
99: ; preds = %95, %92
store i32 3, i32* %3
br label %100
100: ; preds = %285, %99
%101 = load i32, i32* %3
%102 = load i32, i32* %2
%103 = mul nsw i32 3, %102
%104 = sub nsw i32 %103, 7
%105 = icmp sle i32 %101, %104
br i1 %105, label %106, label %288
106: ; preds = %100
%107 = load i32, i32* %3
%108 = add nsw i32 %107, 2
%109 = srem i32 %108, 3
%110 = icmp eq i32 %109, 0
br i1 %110, label %111, label %120
111: ; preds = %106
%112 = load i32, i32* %3
%113 = add nsw i32 %112, 2
%114 = sdiv i32 %113, 3
store i32 %114, i32* %6
%115 = call i32 @hash(i32 3)
%116 = load i32, i32* %3
%117 = add nsw i32 %116, 2
%118 = sdiv i32 %117, 3
%119 = call i32 @hash(i32 %118)
br label %120
120: ; preds = %111, %106
%121 = load i32, i32* %3
%122 = srem i32 %121, 3
%123 = icmp eq i32 %122, 0
br i1 %123, label %124, label %139
124: ; preds = %120
%125 = load i32, i32* %3
%126 = add nsw i32 %125, 3
%127 = sdiv i32 %126, 3
store i32 %127, i32* %4
%128 = load i32, i32* %3
%129 = add nsw i32 %128, 3
%130 = sdiv i32 %129, 3
store i32 %130, i32* %6
%131 = call i32 @hash(i32 2)
%132 = load i32, i32* %3
%133 = add nsw i32 %132, 3
%134 = sdiv i32 %133, 3
%135 = call i32 @hash(i32 %134)
%136 = load i32, i32* %3
%137 = sdiv i32 %136, 3
%138 = call i32 @hash(i32 %137)
br label %139
139: ; preds = %124, %120
%140 = load i32, i32* %3
%141 = add nsw i32 %140, 6
%142 = icmp slt i32 %141, 0
br i1 %142, label %143, label %151
143: ; preds = %139
%144 = load i32, i32* %3
%145 = add nsw i32 %144, 6
%146 = sub nsw i32 0, %145
%147 = add nsw i32 %146, 3
%148 = sub nsw i32 %147, 1
%149 = sdiv i32 %148, 3
%150 = sub nsw i32 0, %149
br label %155
151: ; preds = %139
%152 = load i32, i32* %3
%153 = add nsw i32 %152, 6
%154 = sdiv i32 %153, 3
br label %155
155: ; preds = %151, %143
%156 = phi i32 [ %150, %143 ], [ %154, %151 ]
store i32 %156, i32* %4
%157 = load i32, i32* %3
%158 = add nsw i32 %157, 1
%159 = srem i32 %158, 3
%160 = icmp eq i32 %159, 0
br i1 %160, label %161, label %172
161: ; preds = %155
%162 = load i32, i32* %3
%163 = add nsw i32 %162, 1
%164 = sdiv i32 %163, 3
store i32 %164, i32* %6
%165 = call i32 @hash(i32 6)
%166 = load i32, i32* %3
%167 = add nsw i32 %166, 1
%168 = sdiv i32 %167, 3
%169 = call i32 @hash(i32 %168)
%170 = load i32, i32* %4
%171 = call i32 @hash(i32 %170)
br label %172
172: ; preds = %161, %155
%173 = load i32, i32* %3
%174 = srem i32 %173, 3
%175 = icmp eq i32 %174, 0
br i1 %175, label %176, label %183
176: ; preds = %172
%177 = call i32 @hash(i32 2)
%178 = load i32, i32* %4
%179 = call i32 @hash(i32 %178)
%180 = load i32, i32* %3
%181 = sdiv i32 %180, 3
%182 = call i32 @hash(i32 %181)
br label %183
183: ; preds = %176, %172
%184 = load i32, i32* %3
%185 = add nsw i32 %184, 7
%186 = icmp slt i32 %185, 0
br i1 %186, label %187, label %193
187: ; preds = %183
%188 = load i32, i32* %3
%189 = add nsw i32 %188, 7
%190 = sub nsw i32 0, %189
%191 = sdiv i32 %190, 3
%192 = sub nsw i32 0, %191
br label %199
193: ; preds = %183
%194 = load i32, i32* %3
%195 = add nsw i32 %194, 7
%196 = add nsw i32 %195, 3
%197 = sub nsw i32 %196, 1
%198 = sdiv i32 %197, 3
br label %199
199: ; preds = %193, %187
%200 = phi i32 [ %192, %187 ], [ %198, %193 ]
store i32 %200, i32* %4
br label %201
201: ; preds = %281, %199
%202 = load i32, i32* %4
%203 = load i32, i32* %2
%204 = icmp sle i32 %202, %203
br i1 %204, label %205, label %284
205: ; preds = %201
%206 = load i32, i32* %3
%207 = add nsw i32 %206, 1
%208 = srem i32 %207, 3
%209 = icmp eq i32 %208, 0
br i1 %209, label %210, label %221
210: ; preds = %205
%211 = load i32, i32* %3
%212 = add nsw i32 %211, 1
%213 = sdiv i32 %212, 3
store i32 %213, i32* %6
%214 = call i32 @hash(i32 6)
%215 = load i32, i32* %3
%216 = add nsw i32 %215, 1
%217 = sdiv i32 %216, 3
%218 = call i32 @hash(i32 %217)
%219 = load i32, i32* %4
%220 = call i32 @hash(i32 %219)
br label %221
221: ; preds = %210, %205
%222 = load i32, i32* %3
%223 = srem i32 %222, 3
%224 = icmp eq i32 %223, 0
br i1 %224, label %225, label %232
225: ; preds = %221
%226 = call i32 @hash(i32 2)
%227 = load i32, i32* %4
%228 = call i32 @hash(i32 %227)
%229 = load i32, i32* %3
%230 = sdiv i32 %229, 3
%231 = call i32 @hash(i32 %230)
br label %232
232: ; preds = %225, %221
%233 = load i32, i32* %3
%234 = add nsw i32 %233, 1
%235 = srem i32 %234, 3
%236 = icmp eq i32 %235, 0
br i1 %236, label %237, label %280
237: ; preds = %232
%238 = load i32, i32* %3
%239 = add nsw i32 %238, 1
%240 = sdiv i32 %239, 3
store i32 %240, i32* %5
%241 = load i32, i32* %3
%242 = add nsw i32 %241, 4
%243 = icmp slt i32 %242, 0
br i1 %243, label %244, label %250
244: ; preds = %237
%245 = load i32, i32* %3
%246 = add nsw i32 %245, 4
%247 = sub nsw i32 0, %246
%248 = sdiv i32 %247, 3
%249 = sub nsw i32 0, %248
br label %256
250: ; preds = %237
%251 = load i32, i32* %3
%252 = add nsw i32 %251, 4
%253 = add nsw i32 %252, 3
%254 = sub nsw i32 %253, 1
%255 = sdiv i32 %254, 3
br label %256
256: ; preds = %250, %244
%257 = phi i32 [ %249, %244 ], [ %255, %250 ]
store i32 %257, i32* %6
br label %258
258: ; preds = %276, %256
%259 = load i32, i32* %6
%260 = load i32, i32* %4
%261 = sub nsw i32 %260, 1
%262 = icmp sle i32 %259, %261
br i1 %262, label %263, label %279
263: ; preds = %258
%264 = load i32, i32* %3
%265 = add nsw i32 %264, 1
%266 = sdiv i32 %265, 3
store i32 %266, i32* %8
%267 = call i32 @hash(i32 5)
%268 = load i32, i32* %6
%269 = call i32 @hash(i32 %268)
%270 = load i32, i32* %4
%271 = call i32 @hash(i32 %270)
%272 = load i32, i32* %3
%273 = add nsw i32 %272, 1
%274 = sdiv i32 %273, 3
%275 = call i32 @hash(i32 %274)
br label %276
276: ; preds = %263
%277 = load i32, i32* %6
%278 = add nsw i32 %277, 1
store i32 %278, i32* %6
br label %258
279: ; preds = %258
br label %280
280: ; preds = %279, %232
br label %281
281: ; preds = %280
%282 = load i32, i32* %4
%283 = add nsw i32 %282, 1
store i32 %283, i32* %4
br label %201
284: ; preds = %201
br label %285
285: ; preds = %284
%286 = load i32, i32* %3
%287 = add nsw i32 %286, 1
store i32 %287, i32* %3
br label %100
288: ; preds = %100
%289 = load i32, i32* %2
%290 = mul nsw i32 3, %289
%291 = sub nsw i32 %290, 6
%292 = icmp sgt i32 %291, 3
br i1 %292, label %293, label %297
293: ; preds = %288
%294 = load i32, i32* %2
%295 = mul nsw i32 3, %294
%296 = sub nsw i32 %295, 6
br label %298
297: ; preds = %288
br label %298
298: ; preds = %297, %293
%299 = phi i32 [ %296, %293 ], [ 3, %297 ]
store i32 %299, i32* %3
br label %300
300: ; preds = %393, %298
%301 = load i32, i32* %3
%302 = load i32, i32* %2
%303 = mul nsw i32 3, %302
%304 = sub nsw i32 %303, 4
%305 = icmp sle i32 %301, %304
br i1 %305, label %306, label %396
306: ; preds = %300
%307 = load i32, i32* %3
%308 = add nsw i32 %307, 2
%309 = srem i32 %308, 3
%310 = icmp eq i32 %309, 0
br i1 %310, label %311, label %320
311: ; preds = %306
%312 = load i32, i32* %3
%313 = add nsw i32 %312, 2
%314 = sdiv i32 %313, 3
store i32 %314, i32* %6
%315 = call i32 @hash(i32 3)
%316 = load i32, i32* %3
%317 = add nsw i32 %316, 2
%318 = sdiv i32 %317, 3
%319 = call i32 @hash(i32 %318)
br label %320
320: ; preds = %311, %306
%321 = load i32, i32* %3
%322 = srem i32 %321, 3
%323 = icmp eq i32 %322, 0
br i1 %323, label %324, label %339
324: ; preds = %320
%325 = load i32, i32* %3
%326 = add nsw i32 %325, 3
%327 = sdiv i32 %326, 3
store i32 %327, i32* %4
%328 = load i32, i32* %3
%329 = add nsw i32 %328, 3
%330 = sdiv i32 %329, 3
store i32 %330, i32* %6
%331 = call i32 @hash(i32 2)
%332 = load i32, i32* %3
%333 = add nsw i32 %332, 3
%334 = sdiv i32 %333, 3
%335 = call i32 @hash(i32 %334)
%336 = load i32, i32* %3
%337 = sdiv i32 %336, 3
%338 = call i32 @hash(i32 %337)
br label %339
339: ; preds = %324, %320
%340 = load i32, i32* %3
%341 = add nsw i32 %340, 4
%342 = icmp slt i32 %341, 0
br i1 %342, label %343, label %349
343: ; preds = %339
%344 = load i32, i32* %3
%345 = add nsw i32 %344, 4
%346 = sub nsw i32 0, %345
%347 = sdiv i32 %346, 3
%348 = sub nsw i32 0, %347
br label %355
349: ; preds = %339
%350 = load i32, i32* %3
%351 = add nsw i32 %350, 4
%352 = add nsw i32 %351, 3
%353 = sub nsw i32 %352, 1
%354 = sdiv i32 %353, 3
br label %355
355: ; preds = %349, %343
%356 = phi i32 [ %348, %343 ], [ %354, %349 ]
store i32 %356, i32* %4
br label %357
357: ; preds = %389, %355
%358 = load i32, i32* %4
%359 = load i32, i32* %2
%360 = icmp sle i32 %358, %359
br i1 %360, label %361, label %392
361: ; preds = %357
%362 = load i32, i32* %3
%363 = add nsw i32 %362, 1
%364 = srem i32 %363, 3
%365 = icmp eq i32 %364, 0
br i1 %365, label %366, label %377
366: ; preds = %361
%367 = load i32, i32* %3
%368 = add nsw i32 %367, 1
%369 = sdiv i32 %368, 3
store i32 %369, i32* %6
%370 = call i32 @hash(i32 6)
%371 = load i32, i32* %3
%372 = add nsw i32 %371, 1
%373 = sdiv i32 %372, 3
%374 = call i32 @hash(i32 %373)
%375 = load i32, i32* %4
%376 = call i32 @hash(i32 %375)
br label %377
377: ; preds = %366, %361
%378 = load i32, i32* %3
%379 = srem i32 %378, 3
%380 = icmp eq i32 %379, 0
br i1 %380, label %381, label %388
381: ; preds = %377
%382 = call i32 @hash(i32 2)
%383 = load i32, i32* %4
%384 = call i32 @hash(i32 %383)
%385 = load i32, i32* %3
%386 = sdiv i32 %385, 3
%387 = call i32 @hash(i32 %386)
br label %388
388: ; preds = %381, %377
br label %389
389: ; preds = %388
%390 = load i32, i32* %4
%391 = add nsw i32 %390, 1
store i32 %391, i32* %4
br label %357
392: ; preds = %357
br label %393
393: ; preds = %392
%394 = load i32, i32* %3
%395 = add nsw i32 %394, 1
store i32 %395, i32* %3
br label %300
396: ; preds = %300
%397 = load i32, i32* %2
%398 = icmp sge i32 %397, 2
br i1 %398, label %399, label %411
399: ; preds = %396
%400 = load i32, i32* %2
%401 = mul nsw i32 3, %400
%402 = sub nsw i32 %401, 3
store i32 %402, i32* %3
%403 = load i32, i32* %2
%404 = sub nsw i32 %403, 1
store i32 %404, i32* %7
%405 = call i32 @hash(i32 2)
%406 = load i32, i32* %2
%407 = call i32 @hash(i32 %406)
%408 = load i32, i32* %2
%409 = sub nsw i32 %408, 1
%410 = call i32 @hash(i32 %409)
br label %411
411: ; preds = %399, %396
%412 = load i32, i32* %2
%413 = icmp sge i32 %412, 1
br i1 %413, label %414, label %421
414: ; preds = %411
%415 = load i32, i32* %2
%416 = mul nsw i32 3, %415
%417 = sub nsw i32 %416, 2
store i32 %417, i32* %3
%418 = call i32 @hash(i32 3)
%419 = load i32, i32* %2
%420 = call i32 @hash(i32 %419)
br label %421
421: ; preds = %414, %411
ret void
}

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