#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*/ sim_read(int, int);
int /*<<< orphan*/ sim_write(int, int);
int /*<<< orphan*/ test_random_readwrite();
int /*<<< orphan*/ test_read_whole_disk();
int /*<<< orphan*/ test_write_whole_disk();
void run_test_cases(void) {
  test_write_whole_disk();
  test_read_whole_disk();
  sim_write(0, 1);
  sim_read(0, (1 << ((15 - 9) - (12 - 9))));
  test_write_whole_disk();
  test_write_whole_disk();
  test_write_whole_disk();
  sim_write(10, 3);
  sim_write(10, 3);
  sim_write(10, 3);
  sim_read(10, 3);
  test_read_whole_disk();
  test_random_readwrite();
}


x86 assembly (clang, -O0):
<run_test_cases>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_write_whole_disk@plt>
mov    $0x0,%al
call   1070 <test_read_whole_disk@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <sim_write@plt>
xor    %edi,%edi
mov    $0x8,%esi
call   1050 <sim_read@plt>
mov    $0x0,%al
call   1040 <test_write_whole_disk@plt>
mov    $0x0,%al
call   1040 <test_write_whole_disk@plt>
mov    $0x0,%al
call   1040 <test_write_whole_disk@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1060 <sim_write@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1060 <sim_write@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1060 <sim_write@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1050 <sim_read@plt>
mov    $0x0,%al
call   1070 <test_read_whole_disk@plt>
mov    $0x0,%al
call   1030 <test_random_readwrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_test_cases>:
push   %rax
xor    %eax,%eax
call   1040 <test_write_whole_disk@plt>
xor    %eax,%eax
call   1070 <test_read_whole_disk@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <sim_write@plt>
xor    %edi,%edi
mov    $0x8,%esi
call   1050 <sim_read@plt>
xor    %eax,%eax
call   1040 <test_write_whole_disk@plt>
xor    %eax,%eax
call   1040 <test_write_whole_disk@plt>
xor    %eax,%eax
call   1040 <test_write_whole_disk@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1060 <sim_write@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1060 <sim_write@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1060 <sim_write@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1050 <sim_read@plt>
xor    %eax,%eax
call   1070 <test_read_whole_disk@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_random_readwrite@plt>

LLVM IR (-O0):
define void @run_test_cases() {
%1 = call i32 (...) @test_write_whole_disk()
%2 = call i32 (...) @test_read_whole_disk()
%3 = call i32 @sim_write(i32 0, i32 1)
%4 = call i32 @sim_read(i32 0, i32 8)
%5 = call i32 (...) @test_write_whole_disk()
%6 = call i32 (...) @test_write_whole_disk()
%7 = call i32 (...) @test_write_whole_disk()
%8 = call i32 @sim_write(i32 10, i32 3)
%9 = call i32 @sim_write(i32 10, i32 3)
%10 = call i32 @sim_write(i32 10, i32 3)
%11 = call i32 @sim_read(i32 10, i32 3)
%12 = call i32 (...) @test_read_whole_disk()
%13 = call i32 (...) @test_random_readwrite()
ret void
}

LLVM IR (-O2):
define void @run_test_cases() {
%1 = tail call i32 (...) @test_write_whole_disk()
%2 = tail call i32 (...) @test_read_whole_disk()
%3 = tail call i32 @sim_write(i32 0, i32 1)
%4 = tail call i32 @sim_read(i32 0, i32 8)
%5 = tail call i32 (...) @test_write_whole_disk()
%6 = tail call i32 (...) @test_write_whole_disk()
%7 = tail call i32 (...) @test_write_whole_disk()
%8 = tail call i32 @sim_write(i32 10, i32 3)
%9 = tail call i32 @sim_write(i32 10, i32 3)
%10 = tail call i32 @sim_write(i32 10, i32 3)
%11 = tail call i32 @sim_read(i32 10, i32 3)
%12 = tail call i32 (...) @test_read_whole_disk()
%13 = tail call i32 (...) @test_random_readwrite()
ret void
}