#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*/ readSectorTest(int, int);
int /*<<< orphan*/ writeSectorTest(int, int);
void formatTest(void) {
  writeSectorTest(0, 0x200);
  readSectorTest(0, 0x200);
  writeSectorTest(0x3d07, 0x200);
  readSectorTest(0x3d07, 0x200);
  writeSectorTest(0x08, 0x1800);
  readSectorTest(0x08, 0x1800);
  writeSectorTest(0x14, 0x1800);
  readSectorTest(0x14, 0x1800);
  writeSectorTest(0x20, 0x4000);
  readSectorTest(0x20, 0x4000);
  writeSectorTest(0, 0x1000);
  readSectorTest(0, 0x1000);
  writeSectorTest(0, 0x2000);
  readSectorTest(0, 0x2000);
  writeSectorTest(0, 0x200);
  readSectorTest(0, 0x200);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<formatTest>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x200,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x200,%esi
call   1040 <readSectorTest@plt>
mov    $0x3d07,%edi
mov    $0x200,%esi
call   1030 <writeSectorTest@plt>
mov    $0x3d07,%edi
mov    $0x200,%esi
call   1040 <readSectorTest@plt>
mov    $0x8,%edi
mov    $0x1800,%esi
call   1030 <writeSectorTest@plt>
mov    $0x8,%edi
mov    $0x1800,%esi
call   1040 <readSectorTest@plt>
mov    $0x14,%edi
mov    $0x1800,%esi
call   1030 <writeSectorTest@plt>
mov    $0x14,%edi
mov    $0x1800,%esi
call   1040 <readSectorTest@plt>
mov    $0x20,%edi
mov    $0x4000,%esi
call   1030 <writeSectorTest@plt>
mov    $0x20,%edi
mov    $0x4000,%esi
call   1040 <readSectorTest@plt>
xor    %edi,%edi
mov    $0x1000,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x1000,%esi
call   1040 <readSectorTest@plt>
xor    %edi,%edi
mov    $0x2000,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x2000,%esi
call   1040 <readSectorTest@plt>
xor    %edi,%edi
mov    $0x200,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x200,%esi
call   1040 <readSectorTest@plt>
jmp    11fc <formatTest+0xdc>

x86 assembly (clang, -O2):
<formatTest>:
push   %rax
xor    %edi,%edi
mov    $0x200,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x200,%esi
call   1040 <readSectorTest@plt>
mov    $0x3d07,%edi
mov    $0x200,%esi
call   1030 <writeSectorTest@plt>
mov    $0x3d07,%edi
mov    $0x200,%esi
call   1040 <readSectorTest@plt>
mov    $0x8,%edi
mov    $0x1800,%esi
call   1030 <writeSectorTest@plt>
mov    $0x8,%edi
mov    $0x1800,%esi
call   1040 <readSectorTest@plt>
mov    $0x14,%edi
mov    $0x1800,%esi
call   1030 <writeSectorTest@plt>
mov    $0x14,%edi
mov    $0x1800,%esi
call   1040 <readSectorTest@plt>
mov    $0x20,%edi
mov    $0x4000,%esi
call   1030 <writeSectorTest@plt>
mov    $0x20,%edi
mov    $0x4000,%esi
call   1040 <readSectorTest@plt>
xor    %edi,%edi
mov    $0x1000,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x1000,%esi
call   1040 <readSectorTest@plt>
xor    %edi,%edi
mov    $0x2000,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x2000,%esi
call   1040 <readSectorTest@plt>
xor    %edi,%edi
mov    $0x200,%esi
call   1030 <writeSectorTest@plt>
xor    %edi,%edi
mov    $0x200,%esi
call   1040 <readSectorTest@plt>
nopl   0x0(%rax)
jmp    1200 <formatTest+0xe0>

LLVM IR (-O0):
define void @formatTest() {
%1 = call i32 @writeSectorTest(i32 0, i32 512)
%2 = call i32 @readSectorTest(i32 0, i32 512)
%3 = call i32 @writeSectorTest(i32 15623, i32 512)
%4 = call i32 @readSectorTest(i32 15623, i32 512)
%5 = call i32 @writeSectorTest(i32 8, i32 6144)
%6 = call i32 @readSectorTest(i32 8, i32 6144)
%7 = call i32 @writeSectorTest(i32 20, i32 6144)
%8 = call i32 @readSectorTest(i32 20, i32 6144)
%9 = call i32 @writeSectorTest(i32 32, i32 16384)
%10 = call i32 @readSectorTest(i32 32, i32 16384)
%11 = call i32 @writeSectorTest(i32 0, i32 4096)
%12 = call i32 @readSectorTest(i32 0, i32 4096)
%13 = call i32 @writeSectorTest(i32 0, i32 8192)
%14 = call i32 @readSectorTest(i32 0, i32 8192)
%15 = call i32 @writeSectorTest(i32 0, i32 512)
%16 = call i32 @readSectorTest(i32 0, i32 512)
br label %17
17: ; preds = %0, %17
br label %17
}

LLVM IR (-O2):
define void @formatTest() {
%1 = tail call i32 @writeSectorTest(i32 0, i32 512)
%2 = tail call i32 @readSectorTest(i32 0, i32 512)
%3 = tail call i32 @writeSectorTest(i32 15623, i32 512)
%4 = tail call i32 @readSectorTest(i32 15623, i32 512)
%5 = tail call i32 @writeSectorTest(i32 8, i32 6144)
%6 = tail call i32 @readSectorTest(i32 8, i32 6144)
%7 = tail call i32 @writeSectorTest(i32 20, i32 6144)
%8 = tail call i32 @readSectorTest(i32 20, i32 6144)
%9 = tail call i32 @writeSectorTest(i32 32, i32 16384)
%10 = tail call i32 @readSectorTest(i32 32, i32 16384)
%11 = tail call i32 @writeSectorTest(i32 0, i32 4096)
%12 = tail call i32 @readSectorTest(i32 0, i32 4096)
%13 = tail call i32 @writeSectorTest(i32 0, i32 8192)
%14 = tail call i32 @readSectorTest(i32 0, i32 8192)
%15 = tail call i32 @writeSectorTest(i32 0, i32 512)
%16 = tail call i32 @readSectorTest(i32 0, i32 512)
br label %17
17: ; preds = %0, %17
br label %17
}