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


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     153d <test+0x42d>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cmp    $0x0,%eax
jge    1167 <test+0x57>
mov    -0x4(%rbp),%ecx
add    $0x4,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x2,%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x38(%rbp)
jmp    1178 <test+0x68>
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
cmp    %ecx,%eax
jg     1538 <test+0x428>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jge    11b5 <test+0xa5>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
jmp    11cc <test+0xbc>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
add    $0x2,%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    122e <test+0x11e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jge    120c <test+0xfc>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x40(%rbp)
jmp    1223 <test+0x113>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
add    $0x2,%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    1237 <test+0x127>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0x4(%rbp),%eax
cmp    $0x0,%eax
jge    127e <test+0x16e>
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
add    -0x4(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x4,%eax
sub    $0x1,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
jmp    1292 <test+0x182>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12f8 <test+0x1e8>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0x4(%rbp),%eax
cmp    $0x0,%eax
jge    12d9 <test+0x1c9>
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
add    -0x4(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x4,%eax
sub    $0x1,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x50(%rbp)
jmp    12ed <test+0x1dd>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    12fe <test+0x1ee>
mov    -0x8(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%eax
mov    -0x54(%rbp),%ecx
cmp    %ecx,%eax
jg     1525 <test+0x415>
mov    -0x8(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jge    134d <test+0x23d>
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x5c(%rbp)
jmp    136a <test+0x25a>
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
add    $0x2,%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x5c(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x5c(%rbp),%ecx
cmp    %ecx,%eax
jl     1437 <test+0x327>
movl   $0x1,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jg     1432 <test+0x322>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
shl    $0x1,%edi
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%edi
call   1030 <hash@plt>
imul   $0xfffffffe,-0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
add    %eax,%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
shl    $0x1,%edi
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%edi
call   1030 <hash@plt>
imul   $0xfffffffe,-0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
add    %eax,%edi
sub    $0x1,%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    137f <test+0x26f>
jmp    1437 <test+0x327>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
sub    -0x4(%rbp),%ecx
cmp    %ecx,%eax
jne    1512 <test+0x402>
movl   $0x1,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jg     150d <test+0x3fd>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14fa <test+0x3ea>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
imul   $0x3,-0x4(%rbp),%ecx
add    %ecx,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14f5 <test+0x3e5>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <hash@plt>
mov    -0x10(%rbp),%edi
call   1030 <hash@plt>
jmp    14fa <test+0x3ea>
jmp    14ff <test+0x3ef>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1455 <test+0x345>
jmp    1512 <test+0x402>
jmp    1517 <test+0x407>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    123d <test+0x12d>
jmp    152a <test+0x41a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <test+0x1c>
jmp    153d <test+0x42d>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,0x48(%rsp)
cmp    $0x2,%edi
jl     14c8 <test+0x3b8>
mov    0x48(%rsp),%rax
lea    0x4(%rax),%ecx
shr    %ecx
mov    %ecx,0x58(%rsp)
lea    (%rax,%rax,2),%ecx
mov    %rcx,0x78(%rsp)
lea    -0x1(%rax),%ecx
mov    %ecx,0x28(%rsp)
mov    %eax,%ecx
neg    %ecx
mov    %ecx,0x54(%rsp)
add    $0x2,%eax
mov    %eax,0x24(%rsp)
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
movl   $0x2,0x20(%rsp)
movl   $0xfffffffe,0x1c(%rsp)
ff
movl   $0xfffffffd,0x18(%rsp)
ff
jmp    11ab <test+0x9b>
nop
mov    0x10(%rsp),%rcx
lea    0x1(%rcx),%eax
addl   $0x2,0x20(%rsp)
addl   $0x2,0x24(%rsp)
addl   $0xfffffffe,0x1c(%rsp)
addl   $0xfffffffe,0x18(%rsp)
cmp    0x58(%rsp),%ecx
mov    %rax,0x10(%rsp)
je     14c8 <test+0x3b8>
mov    0x10(%rsp),%rbp
lea    0x2(%rbp),%eax
shr    %eax
lea    -0x1(%rbp),%edi
cmp    %ebp,%eax
cmovae %eax,%edi
mov    0x48(%rsp),%r8
lea    (%r8,%rbp,2),%edx
mov    %edx,%ecx
shr    $0x2,%ecx
cmp    %ebp,%ecx
cmovae %ebp,%ecx
mov    $0x3,%eax
sub    %edx,%eax
mov    $0x6,%ebx
sub    %edx,%ebx
test   %eax,%eax
cmovns %eax,%ebx
lea    0x0(%rbp,%rbp,1),%eax
sar    $0x2,%ebx
neg    %ebx
sub    %r8d,%eax
lea    0x3(%rax),%esi
test   %eax,%eax
cmovns %eax,%esi
mov    %esi,0x30(%rsp)
cmp    %ebp,%ebx
cmovge %ebp,%ebx
lea    (%r8,%rbp,2),%esi
add    $0x3,%esi
test   %edx,%edx
cmovns %edx,%esi
mov    %esi,0x2c(%rsp)
cmovns %ecx,%ebx
mov    %rdi,0x38(%rsp)
mov    %ebx,0x64(%rsp)
cmp    %ebx,%edi
jg     1180 <test+0x70>
sarl   $0x2,0x30(%rsp)
mov    0x78(%rsp),%rcx
mov    0x10(%rsp),%rdx
lea    (%rcx,%rdx,2),%ecx
mov    %ecx,0x60(%rsp)
sarl   $0x2,0x2c(%rsp)
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    %ecx,0x5c(%rsp)
mov    %edx,%ebp
mov    0x38(%rsp),%rcx
sub    %ecx,%ebp
mov    0x20(%rsp),%r12d
sub    %ecx,%r12d
sub    %ecx,%r12d
lea    0x0(,%rcx,4),%eax
mov    0x28(%rsp),%r15d
mov    %rax,0x40(%rsp)
sub    %eax,%r15d
mov    0x18(%rsp),%eax
mov    %eax,%ebx
mov    0x1c(%rsp),%eax
mov    %eax,%edx
mov    0x24(%rsp),%esi
mov    0x54(%rsp),%eax
mov    %eax,%edi
jmp    12be <test+0x1ae>
nopl   0x0(%rax)
mov    0x38(%rsp),%rcx
lea    0x1(%rcx),%eax
add    $0xffffffff,%ebp
add    $0xfffffffe,%r12d
add    $0xfffffffc,%r15d
add    $0x4,%edi
add    $0xfffffffc,%esi
add    $0x4,%edx
add    $0x4,%ebx
cmp    0x64(%rsp),%ecx
mov    %rax,0x38(%rsp)
jge    1180 <test+0x70>
mov    0x40(%rsp),%rax
add    %edi,%eax
cmp    $0xfffffffe,%eax
jg     12e0 <test+0x1d0>
mov    %r15d,%eax
shr    $0x1f,%eax
add    %r15d,%eax
sar    %eax
neg    %eax
jmp    12ec <test+0x1dc>
nopl   0x0(%rax)
mov    0x40(%rsp),%rax
add    %edi,%eax
add    $0x2,%eax
shr    %eax
cmp    %eax,0x10(%rsp)
mov    %rdx,0x70(%rsp)
mov    %esi,0x34(%rsp)
mov    %rdi,0x68(%rsp)
jl     13f4 <test+0x2e4>
mov    0x40(%rsp),%rax
lea    (%rax,%rdx,1),%r14d
add    %ebx,%eax
mov    %eax,0xc(%rsp)
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    0x38(%rsp),%r13
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    0xc(%rsp),%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    0xc(%rsp),%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    0x68(%rsp),%rdi
mov    0x34(%rsp),%esi
mov    0x70(%rsp),%rdx
cmp    %esi,0x40(%rsp)
jne    1290 <test+0x180>
mov    0x48(%rsp),%rax
and    $0x1,%eax
jne    1290 <test+0x180>
mov    0x60(%rsp),%eax
and    $0x3,%eax
jne    1290 <test+0x180>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %rbx,0x80(%rsp)
mov    %r12d,%ebx
mov    0x30(%rsp),%r12d
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %r15d,0xc(%rsp)
mov    0x2c(%rsp),%r15d
mov    %r15d,%edi
call   1030 <hash@plt>
mov    0x5c(%rsp),%r14d
mov    %r14d,%edi
call   1030 <hash@plt>
mov    0x28(%rsp),%r13d
mov    %r13d,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
mov    %ebx,%r12d
mov    0x80(%rsp),%rbx
call   1030 <hash@plt>
mov    %r15d,%edi
mov    0xc(%rsp),%r15d
call   1030 <hash@plt>
mov    %r14d,%edi
call   1030 <hash@plt>
mov    %r13d,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    0x68(%rsp),%rdi
mov    0x34(%rsp),%esi
mov    0x70(%rsp),%rdx
jmp    1290 <test+0x180>
add    $0x88,%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
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %2
%14 = load i32, i32* %2
%15 = icmp sge i32 %14, 2
br i1 %15, label %16, label %282
16: ; preds = %1
store i32 1, i32* %3
br label %17
17: ; preds = %278, %16
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 4
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %17
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 4
%25 = sub nsw i32 0, %24
%26 = add nsw i32 %25, 2
%27 = sub nsw i32 %26, 1
%28 = sdiv i32 %27, 2
%29 = sub nsw i32 0, %28
br label %34
30: ; preds = %17
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 4
%33 = sdiv i32 %32, 2
br label %34
34: ; preds = %30, %22
%35 = phi i32 [ %29, %22 ], [ %33, %30 ]
%36 = icmp sle i32 %18, %35
br i1 %36, label %37, label %281
37: ; preds = %34
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %37
%42 = load i32, i32* %3
%43 = add nsw i32 %42, 1
%44 = sub nsw i32 0, %43
%45 = sdiv i32 %44, 2
%46 = sub nsw i32 0, %45
br label %53
47: ; preds = %37
%48 = load i32, i32* %3
%49 = add nsw i32 %48, 1
%50 = add nsw i32 %49, 2
%51 = sub nsw i32 %50, 1
%52 = sdiv i32 %51, 2
br label %53
53: ; preds = %47, %41
%54 = phi i32 [ %46, %41 ], [ %52, %47 ]
%55 = load i32, i32* %3
%56 = sub nsw i32 %55, 1
%57 = icmp sgt i32 %54, %56
br i1 %57, label %58, label %76
58: ; preds = %53
%59 = load i32, i32* %3
%60 = add nsw i32 %59, 1
%61 = icmp slt i32 %60, 0
br i1 %61, label %62, label %68
62: ; preds = %58
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 1
%65 = sub nsw i32 0, %64
%66 = sdiv i32 %65, 2
%67 = sub nsw i32 0, %66
br label %74
68: ; preds = %58
%69 = load i32, i32* %3
%70 = add nsw i32 %69, 1
%71 = add nsw i32 %70, 2
%72 = sub nsw i32 %71, 1
%73 = sdiv i32 %72, 2
br label %74
74: ; preds = %68, %62
%75 = phi i32 [ %67, %62 ], [ %73, %68 ]
br label %79
76: ; preds = %53
%77 = load i32, i32* %3
%78 = sub nsw i32 %77, 1
br label %79
79: ; preds = %76, %74
%80 = phi i32 [ %75, %74 ], [ %78, %76 ]
store i32 %80, i32* %4
br label %81
81: ; preds = %274, %79
%82 = load i32, i32* %4
%83 = load i32, i32* %3
%84 = mul nsw i32 2, %83
%85 = load i32, i32* %2
%86 = add nsw i32 %84, %85
%87 = icmp slt i32 %86, 0
br i1 %87, label %88, label %98
88: ; preds = %81
%89 = load i32, i32* %3
%90 = mul nsw i32 2, %89
%91 = load i32, i32* %2
%92 = add nsw i32 %90, %91
%93 = sub nsw i32 0, %92
%94 = add nsw i32 %93, 4
%95 = sub nsw i32 %94, 1
%96 = sdiv i32 %95, 4
%97 = sub nsw i32 0, %96
br label %104
98: ; preds = %81
%99 = load i32, i32* %3
%100 = mul nsw i32 2, %99
%101 = load i32, i32* %2
%102 = add nsw i32 %100, %101
%103 = sdiv i32 %102, 4
br label %104
104: ; preds = %98, %88
%105 = phi i32 [ %97, %88 ], [ %103, %98 ]
%106 = load i32, i32* %3
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %132
108: ; preds = %104
%109 = load i32, i32* %3
%110 = mul nsw i32 2, %109
%111 = load i32, i32* %2
%112 = add nsw i32 %110, %111
%113 = icmp slt i32 %112, 0
br i1 %113, label %114, label %124
114: ; preds = %108
%115 = load i32, i32* %3
%116 = mul nsw i32 2, %115
%117 = load i32, i32* %2
%118 = add nsw i32 %116, %117
%119 = sub nsw i32 0, %118
%120 = add nsw i32 %119, 4
%121 = sub nsw i32 %120, 1
%122 = sdiv i32 %121, 4
%123 = sub nsw i32 0, %122
br label %130
124: ; preds = %108
%125 = load i32, i32* %3
%126 = mul nsw i32 2, %125
%127 = load i32, i32* %2
%128 = add nsw i32 %126, %127
%129 = sdiv i32 %128, 4
br label %130
130: ; preds = %124, %114
%131 = phi i32 [ %123, %114 ], [ %129, %124 ]
br label %134
132: ; preds = %104
%133 = load i32, i32* %3
br label %134
134: ; preds = %132, %130
%135 = phi i32 [ %131, %130 ], [ %133, %132 ]
%136 = icmp sle i32 %82, %135
br i1 %136, label %137, label %277
137: ; preds = %134
%138 = load i32, i32* %3
%139 = load i32, i32* %4
%140 = mul nsw i32 4, %139
%141 = load i32, i32* %2
%142 = sub nsw i32 %140, %141
%143 = add nsw i32 %142, 1
%144 = icmp slt i32 %143, 0
br i1 %144, label %145, label %154
145: ; preds = %137
%146 = load i32, i32* %4
%147 = mul nsw i32 4, %146
%148 = load i32, i32* %2
%149 = sub nsw i32 %147, %148
%150 = add nsw i32 %149, 1
%151 = sub nsw i32 0, %150
%152 = sdiv i32 %151, 2
%153 = sub nsw i32 0, %152
br label %163
154: ; preds = %137
%155 = load i32, i32* %4
%156 = mul nsw i32 4, %155
%157 = load i32, i32* %2
%158 = sub nsw i32 %156, %157
%159 = add nsw i32 %158, 1
%160 = add nsw i32 %159, 2
%161 = sub nsw i32 %160, 1
%162 = sdiv i32 %161, 2
br label %163
163: ; preds = %154, %145
%164 = phi i32 [ %153, %145 ], [ %162, %154 ]
%165 = icmp sge i32 %138, %164
br i1 %165, label %166, label %218
166: ; preds = %163
store i32 1, i32* %5
br label %167
167: ; preds = %214, %166
%168 = load i32, i32* %5
%169 = icmp sle i32 %168, 2
br i1 %169, label %170, label %217
170: ; preds = %167
%171 = call i32 @hash(i32 1)
%172 = load i32, i32* %3
%173 = load i32, i32* %4
%174 = sub nsw i32 %172, %173
%175 = call i32 @hash(i32 %174)
%176 = load i32, i32* %4
%177 = call i32 @hash(i32 %176)
%178 = load i32, i32* %3
%179 = mul nsw i32 2, %178
%180 = load i32, i32* %4
%181 = mul nsw i32 2, %180
%182 = sub nsw i32 %179, %181
%183 = call i32 @hash(i32 %182)
%184 = load i32, i32* %3
%185 = mul nsw i32 -2, %184
%186 = load i32, i32* %4
%187 = mul nsw i32 4, %186
%188 = add nsw i32 %185, %187
%189 = call i32 @hash(i32 %188)
%190 = load i32, i32* %5
%191 = call i32 @hash(i32 %190)
%192 = call i32 @hash(i32 2)
%193 = load i32, i32* %3
%194 = load i32, i32* %4
%195 = sub nsw i32 %193, %194
%196 = call i32 @hash(i32 %195)
%197 = load i32, i32* %4
%198 = call i32 @hash(i32 %197)
%199 = load i32, i32* %3
%200 = mul nsw i32 2, %199
%201 = load i32, i32* %4
%202 = mul nsw i32 2, %201
%203 = sub nsw i32 %200, %202
%204 = call i32 @hash(i32 %203)
%205 = load i32, i32* %3
%206 = mul nsw i32 -2, %205
%207 = load i32, i32* %4
%208 = mul nsw i32 4, %207
%209 = add nsw i32 %206, %208
%210 = sub nsw i32 %209, 1
%211 = call i32 @hash(i32 %210)
%212 = load i32, i32* %5
%213 = call i32 @hash(i32 %212)
br label %214
214: ; preds = %170
%215 = load i32, i32* %5
%216 = add nsw i32 %215, 1
store i32 %216, i32* %5
br label %167
217: ; preds = %167
br label %218
218: ; preds = %217, %163
%219 = load i32, i32* %3
%220 = mul nsw i32 2, %219
%221 = load i32, i32* %4
%222 = mul nsw i32 4, %221
%223 = load i32, i32* %2
%224 = sub nsw i32 %222, %223
%225 = icmp eq i32 %220, %224
br i1 %225, label %226, label %273
226: ; preds = %218
store i32 1, i32* %5
br label %227
227: ; preds = %269, %226
%228 = load i32, i32* %5
%229 = icmp sle i32 %228, 2
br i1 %229, label %230, label %272
230: ; preds = %227
%231 = load i32, i32* %2
%232 = srem i32 %231, 2
%233 = icmp eq i32 %232, 0
br i1 %233, label %234, label %268
234: ; preds = %230
%235 = load i32, i32* %3
%236 = mul nsw i32 2, %235
%237 = load i32, i32* %2
%238 = mul nsw i32 3, %237
%239 = add nsw i32 %236, %238
%240 = srem i32 %239, 4
%241 = icmp eq i32 %240, 0
br i1 %241, label %242, label %267
242: ; preds = %234
%243 = call i32 @hash(i32 2)
%244 = load i32, i32* %3
%245 = mul nsw i32 2, %244
%246 = load i32, i32* %2
%247 = sub nsw i32 %245, %246
%248 = sdiv i32 %247, 4
%249 = call i32 @hash(i32 %248)
%250 = load i32, i32* %3
%251 = mul nsw i32 2, %250
%252 = load i32, i32* %2
%253 = add nsw i32 %251, %252
%254 = sdiv i32 %253, 4
%255 = call i32 @hash(i32 %254)
%256 = load i32, i32* %3
%257 = mul nsw i32 2, %256
%258 = load i32, i32* %2
%259 = sub nsw i32 %257, %258
%260 = sdiv i32 %259, 2
%261 = call i32 @hash(i32 %260)
%262 = load i32, i32* %2
%263 = sub nsw i32 %262, 1
%264 = call i32 @hash(i32 %263)
%265 = load i32, i32* %5
%266 = call i32 @hash(i32 %265)
br label %267
267: ; preds = %242, %234
br label %268
268: ; preds = %267, %230
br label %269
269: ; preds = %268
%270 = load i32, i32* %5
%271 = add nsw i32 %270, 1
store i32 %271, i32* %5
br label %227
272: ; preds = %227
br label %273
273: ; preds = %272, %218
br label %274
274: ; preds = %273
%275 = load i32, i32* %4
%276 = add nsw i32 %275, 1
store i32 %276, i32* %4
br label %81
277: ; preds = %134
br label %278
278: ; preds = %277
%279 = load i32, i32* %3
%280 = add nsw i32 %279, 1
store i32 %280, i32* %3
br label %17
281: ; preds = %34
br label %282
282: ; preds = %281, %1
ret void
}

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