#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 n) {
  int i, j;
  for (i = 0; i <= 14; i++) {
    for (j = 0; j <= n - 15; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
    }
  }
  for (i = 15; i <= n; i++) {
    for (j = 0; j <= 9; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
    }
    for (j = 10; j <= n - 15; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
      {
        hash(2);
        hash(i);
        hash(j);
      };
    }
    for (j = n - 14; j <= n; j++) {
      {
        hash(2);
        hash(i);
        hash(j);
      };
    }
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xe,-0x8(%rbp)
jg     117f <test+0x6f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0xf,%ecx
cmp    %ecx,%eax
jg     116c <test+0x5c>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <test+0x23>
jmp    1171 <test+0x61>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <test+0x12>
movl   $0xf,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1275 <test+0x165>
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     11cb <test+0xbb>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1199 <test+0x89>
movl   $0xa,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0xf,%ecx
cmp    %ecx,%eax
jg     1225 <test+0x115>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d2 <test+0xc2>
mov    -0x4(%rbp),%eax
sub    $0xe,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1262 <test+0x152>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%edi
call   1030 <hash@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    122e <test+0x11e>
jmp    1267 <test+0x157>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1186 <test+0x76>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edi,%r14d
lea    -0xe(%r14),%r15d
xor    %ebx,%ebx
jmp    113c <test+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
cmp    $0xf,%ebx
je     1322 <test+0x212>
cmp    $0xf,%r14d
jl     1130 <test+0x20>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
add    $0x1,%ebp
cmp    %ebp,%r15d
jne    1150 <test+0x40>
add    $0x1,%ebx
cmp    $0xf,%ebx
jne    113c <test+0x2c>
cmp    $0xf,%r14d
jl     1322 <test+0x212>
lea    -0xf(%r14),%r15d
mov    $0xf,%r12d
nopl   0x0(%rax)
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x7,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x8,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    $0x9,%edi
call   1030 <hash@plt>
cmp    $0x19,%r14d
jb     12ed <test+0x1dd>
mov    $0x18,%ebx
lea    -0xe(%rbx),%ebp
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
add    $0x1,%ebx
cmp    %ebx,%r14d
jne    12b0 <test+0x1a0>
mov    %r15d,%ebp
add    $0x1,%ebp
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %r12d,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
cmp    %r14d,%ebp
jl     12f0 <test+0x1e0>
lea    0x1(%r12),%eax
cmp    %r14d,%r12d
mov    %eax,%r12d
jne    1190 <test+0x80>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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