#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 */
struct shash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ begin_iterate_when_rehash();
int /*<<< orphan*/ erase_iterate(struct shash *, int);
int /*<<< orphan*/ erase_not_exists(struct shash *);
int /*<<< orphan*/ find_not_exists(struct shash *);
int /*<<< orphan*/ find_range(struct shash *, int);
int /*<<< orphan*/ insert_range(struct shash *, int);
int /*<<< orphan*/ shash_free(struct shash *);
struct shash *shash_new();
int main(int argc, char **argv) {
  struct shash *shash = shash_new();
  insert_range(shash, 102400);
  find_range(shash, 102400);
  erase_iterate(shash, 102400);
  erase_not_exists(shash);
  find_not_exists(shash);
  shash_free(shash);
  begin_iterate_when_rehash();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   10a0 <shash_new@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x19000,%esi
call   1030 <insert_range@plt>
mov    -0x18(%rbp),%rdi
mov    $0x19000,%esi
call   1050 <find_range@plt>
mov    -0x18(%rbp),%rdi
mov    $0x19000,%esi
call   1090 <erase_iterate@plt>
mov    -0x18(%rbp),%rdi
call   1060 <erase_not_exists@plt>
mov    -0x18(%rbp),%rdi
call   1070 <find_not_exists@plt>
mov    -0x18(%rbp),%rdi
call   1080 <shash_free@plt>
mov    $0x0,%al
call   1040 <begin_iterate_when_rehash@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   10a0 <shash_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x19000,%esi
call   1030 <insert_range@plt>
mov    %rbx,%rdi
mov    $0x19000,%esi
call   1050 <find_range@plt>
mov    %rbx,%rdi
mov    $0x19000,%esi
call   1090 <erase_iterate@plt>
mov    %rbx,%rdi
call   1060 <erase_not_exists@plt>
mov    %rbx,%rdi
call   1070 <find_not_exists@plt>
mov    %rbx,%rdi
call   1080 <shash_free@plt>
xor    %eax,%eax
call   1040 <begin_iterate_when_rehash@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.shash = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.shash*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call %struct.shash* (...) @shash_new()
store %struct.shash* %7, %struct.shash** %6
%8 = load %struct.shash*, %struct.shash** %6
%9 = call i32 @insert_range(%struct.shash* %8, i32 102400)
%10 = load %struct.shash*, %struct.shash** %6
%11 = call i32 @find_range(%struct.shash* %10, i32 102400)
%12 = load %struct.shash*, %struct.shash** %6
%13 = call i32 @erase_iterate(%struct.shash* %12, i32 102400)
%14 = load %struct.shash*, %struct.shash** %6
%15 = call i32 @erase_not_exists(%struct.shash* %14)
%16 = load %struct.shash*, %struct.shash** %6
%17 = call i32 @find_not_exists(%struct.shash* %16)
%18 = load %struct.shash*, %struct.shash** %6
%19 = call i32 @shash_free(%struct.shash* %18)
%20 = call i32 (...) @begin_iterate_when_rehash()
ret i32 0
}

LLVM IR (-O2):
%struct.shash = type { i32 }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.shash* (...) @shash_new()
%4 = tail call i32 @insert_range(%struct.shash* %3, i32 102400)
%5 = tail call i32 @find_range(%struct.shash* %3, i32 102400)
%6 = tail call i32 @erase_iterate(%struct.shash* %3, i32 102400)
%7 = tail call i32 @erase_not_exists(%struct.shash* %3)
%8 = tail call i32 @find_not_exists(%struct.shash* %3)
%9 = tail call i32 @shash_free(%struct.shash* %3)
%10 = tail call i32 (...) @begin_iterate_when_rehash()
ret i32 0
}