#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 i;
  {
    hash(1);
    hash(0);
  };
  {
    hash(1);
    hash(1);
  };
  {
    hash(1);
    hash(2);
  };
  {
    hash(1);
    hash(3);
  };
  {
    hash(1);
    hash(4);
  };
  {
    hash(1);
    hash(5);
  };
  {
    hash(1);
    hash(6);
  };
  {
    hash(1);
    hash(7);
  };
  {
    hash(1);
    hash(8);
  };
  {
    hash(1);
    hash(9);
  };
  {
    hash(1);
    hash(10);
  };
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%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    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x7,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x8,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x9,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0xa,%edi
call   1030 <hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%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    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x4,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x5,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x6,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x7,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x8,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x9,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <hash@plt>

LLVM IR (-O0):
define void @test(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @hash(i32 1)
%5 = call i32 @hash(i32 0)
%6 = call i32 @hash(i32 1)
%7 = call i32 @hash(i32 1)
%8 = call i32 @hash(i32 1)
%9 = call i32 @hash(i32 2)
%10 = call i32 @hash(i32 1)
%11 = call i32 @hash(i32 3)
%12 = call i32 @hash(i32 1)
%13 = call i32 @hash(i32 4)
%14 = call i32 @hash(i32 1)
%15 = call i32 @hash(i32 5)
%16 = call i32 @hash(i32 1)
%17 = call i32 @hash(i32 6)
%18 = call i32 @hash(i32 1)
%19 = call i32 @hash(i32 7)
%20 = call i32 @hash(i32 1)
%21 = call i32 @hash(i32 8)
%22 = call i32 @hash(i32 1)
%23 = call i32 @hash(i32 9)
%24 = call i32 @hash(i32 1)
%25 = call i32 @hash(i32 10)
ret void
}

LLVM IR (-O2):
define void @test(i32 %0) {
%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 1)
%6 = tail call i32 @hash(i32 1)
%7 = tail call i32 @hash(i32 2)
%8 = tail call i32 @hash(i32 1)
%9 = tail call i32 @hash(i32 3)
%10 = tail call i32 @hash(i32 1)
%11 = tail call i32 @hash(i32 4)
%12 = tail call i32 @hash(i32 1)
%13 = tail call i32 @hash(i32 5)
%14 = tail call i32 @hash(i32 1)
%15 = tail call i32 @hash(i32 6)
%16 = tail call i32 @hash(i32 1)
%17 = tail call i32 @hash(i32 7)
%18 = tail call i32 @hash(i32 1)
%19 = tail call i32 @hash(i32 8)
%20 = tail call i32 @hash(i32 1)
%21 = tail call i32 @hash(i32 9)
%22 = tail call i32 @hash(i32 1)
%23 = tail call i32 @hash(i32 10)
ret void
}