#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 i0, i1;
  for (i0 = 0; i0 <= 5; i0++) {
    for (i1 = (((4 * i0) < 0) ? -((-(4 * i0)) / (5))
                              : ((4 * i0) + (5) - 1) / (5));
         i1 <= (((6 * i0 + 20) < 0) ? -((-(6 * i0 + 20) + (5) - 1) / (5))
                                    : (6 * i0 + 20) / (5));
         i1++) {
      if (2 * i0 == i1) {
        {
          hash(1);
          hash(i0);
          hash(i1);
        };
      }
      if (i1 == 4) {
        {
          hash(2);
          hash(i0);
          hash(i1);
        };
      }
    }
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jg     1245 <test+0x135>
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cmp    $0x0,%eax
jge    1158 <test+0x48>
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    116f <test+0x5f>
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    $0x5,%eax
sub    $0x1,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0x6,-0x4(%rbp),%eax
add    $0x14,%eax
cmp    $0x0,%eax
jge    11b2 <test+0xa2>
imul   $0x6,-0x4(%rbp),%ecx
add    $0x14,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x5,%eax
sub    $0x1,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    11c4 <test+0xb4>
imul   $0x6,-0x4(%rbp),%eax
add    $0x14,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jg     1232 <test+0x122>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    11fb <test+0xeb>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
cmpl   $0x4,-0x8(%rbp)
jne    121f <test+0x10f>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
jmp    1224 <test+0x114>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1175 <test+0x65>
jmp    1237 <test+0x127>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test+0xf>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x4,%r14d
xor    %r13d,%r13d
xor    %ebx,%ebx
jmp    1144 <test+0x34>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
add    $0x4,%r14d
add    $0xfffffffe,%r13d
cmp    $0x6,%ebx
je     11ec <test+0xdc>
lea    0x0(,%rbx,4),%eax
add    $0x4,%al
movzbl %al,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
lea    (%rbx,%rbx,2),%ecx
lea    (%rcx,%rcx,1),%ebp
add    $0x14,%ebp
mov    $0xcccccccd,%ecx
imul   %rcx,%rbp
shr    $0x22,%rbp
cmp    %eax,%ebp
jb     1130 <test+0x20>
mov    %r14d,%r12d
mov    $0xcccccccd,%eax
imul   %rax,%r12
shr    $0x22,%r12
add    $0xffffffff,%r12d
lea    (%rbx,%rbx,1),%r15d
jmp    1199 <test+0x89>
nopl   (%rax)
add    $0x1,%r12d
cmp    %ebp,%r12d
jae    1130 <test+0x20>
lea    (%r12,%r13,1),%eax
cmp    $0xffffffff,%eax
je     11b0 <test+0xa0>
cmp    $0x3,%r12d
jne    1190 <test+0x80>
jmp    11cf <test+0xbf>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %r15d,%edi
call   1030 <hash@plt>
cmp    $0x3,%r12d
jne    1190 <test+0x80>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
jmp    1190 <test+0x80>
add    $0x8,%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
store i32 0, i32* %1
br label %3
3: ; preds = %72, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 5
br i1 %5, label %6, label %75
6: ; preds = %3
%7 = load i32, i32* %1
%8 = mul nsw i32 4, %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32, i32* %1
%12 = mul nsw i32 4, %11
%13 = sub nsw i32 0, %12
%14 = sdiv i32 %13, 5
%15 = sub nsw i32 0, %14
br label %22
16: ; preds = %6
%17 = load i32, i32* %1
%18 = mul nsw i32 4, %17
%19 = add nsw i32 %18, 5
%20 = sub nsw i32 %19, 1
%21 = sdiv i32 %20, 5
br label %22
22: ; preds = %16, %10
%23 = phi i32 [ %15, %10 ], [ %21, %16 ]
store i32 %23, i32* %2
br label %24
24: ; preds = %68, %22
%25 = load i32, i32* %2
%26 = load i32, i32* %1
%27 = mul nsw i32 6, %26
%28 = add nsw i32 %27, 20
%29 = icmp slt i32 %28, 0
br i1 %29, label %30, label %39
30: ; preds = %24
%31 = load i32, i32* %1
%32 = mul nsw i32 6, %31
%33 = add nsw i32 %32, 20
%34 = sub nsw i32 0, %33
%35 = add nsw i32 %34, 5
%36 = sub nsw i32 %35, 1
%37 = sdiv i32 %36, 5
%38 = sub nsw i32 0, %37
br label %44
39: ; preds = %24
%40 = load i32, i32* %1
%41 = mul nsw i32 6, %40
%42 = add nsw i32 %41, 20
%43 = sdiv i32 %42, 5
br label %44
44: ; preds = %39, %30
%45 = phi i32 [ %38, %30 ], [ %43, %39 ]
%46 = icmp sle i32 %25, %45
br i1 %46, label %47, label %71
47: ; preds = %44
%48 = load i32, i32* %1
%49 = mul nsw i32 2, %48
%50 = load i32, i32* %2
%51 = icmp eq i32 %49, %50
br i1 %51, label %52, label %58
52: ; preds = %47
%53 = call i32 @hash(i32 1)
%54 = load i32, i32* %1
%55 = call i32 @hash(i32 %54)
%56 = load i32, i32* %2
%57 = call i32 @hash(i32 %56)
br label %58
58: ; preds = %52, %47
%59 = load i32, i32* %2
%60 = icmp eq i32 %59, 4
br i1 %60, label %61, label %67
61: ; preds = %58
%62 = call i32 @hash(i32 2)
%63 = load i32, i32* %1
%64 = call i32 @hash(i32 %63)
%65 = load i32, i32* %2
%66 = call i32 @hash(i32 %65)
br label %67
67: ; preds = %61, %58
br label %68
68: ; preds = %67
%69 = load i32, i32* %2
%70 = add nsw i32 %69, 1
store i32 %70, i32* %2
br label %24
71: ; preds = %44
br label %72
72: ; preds = %71
%73 = load i32, i32* %1
%74 = add nsw i32 %73, 1
store i32 %74, i32* %1
br label %3
75: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @test() {
br label %1
1: ; preds = %0, %30
%2 = phi i32 [ 0, %0 ], [ %31, %30 ]
%3 = trunc i32 %2 to i8
%4 = shl i8 %3, 2
%5 = add i8 %4, 4
%6 = udiv i8 %5, 5
%7 = zext i8 %6 to i32
%8 = mul nuw nsw i32 %2, 6
%9 = add nuw nsw i32 %8, 20
%10 = udiv i32 %9, 5
%11 = icmp ult i32 %10, %7
br i1 %11, label %30, label %12
12: ; preds = %1
%13 = shl nuw nsw i32 %2, 1
br label %14
14: ; preds = %12, %27
%15 = phi i32 [ %7, %12 ], [ %28, %27 ]
%16 = icmp eq i32 %13, %15
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = tail call i32 @hash(i32 1)
%19 = tail call i32 @hash(i32 %2)
%20 = tail call i32 @hash(i32 %13)
br label %21
21: ; preds = %17, %14
%22 = icmp eq i32 %15, 4
br i1 %22, label %23, label %27
23: ; preds = %21
%24 = tail call i32 @hash(i32 2)
%25 = tail call i32 @hash(i32 %2)
%26 = tail call i32 @hash(i32 4)
br label %27
27: ; preds = %21, %23
%28 = add nuw nsw i32 %15, 1
%29 = icmp ult i32 %15, %10
br i1 %29, label %14, label %30
30: ; preds = %27, %1
%31 = add nuw nsw i32 %2, 1
%32 = icmp eq i32 %31, 6
br i1 %32, label %33, label %1
33: ; preds = %30
ret void
}