#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*/ changeByte(char *, int, char);
int /*<<< orphan*/ checkFileSize(char *, char *, int);
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ createZeroFile(char *, int);
int /*<<< orphan*/ syncAndCheckMd4(char *, char *, char *, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void testBasic() {
  cleanup();
  createZeroFile("testSource.bin", 4000);
  changeByte("testSource.bin", 5, 'r');
  syncAndCheckMd4("sync single block", "testSource.bin", "testDest.bin", 0, 0);
  checkFileSize("sync single block size", "testSource.bin", 4000);
}


x86 assembly (clang, -O0):
<testBasic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <cleanup@plt>
lea    0xe9e(%rip),%rdi
mov    $0xfa0,%esi
call   1050 <createZeroFile@plt>
lea    0xe8d(%rip),%rdi
mov    $0x5,%esi
mov    $0x72,%edx
call   1040 <changeByte@plt>
lea    0xe86(%rip),%rdi
lea    0xe70(%rip),%rsi
lea    0xe8a(%rip),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1060 <syncAndCheckMd4@plt>
lea    0xe85(%rip),%rdi
lea    0xe50(%rip),%rsi
mov    $0xfa0,%edx
call   1030 <checkFileSize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBasic>:
push   %rbx
xor    %eax,%eax
call   1070 <cleanup@plt>
lea    0xea1(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfa0,%esi
call   1050 <createZeroFile@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x72,%edx
call   1040 <changeByte@plt>
lea    0xe8a(%rip),%rdi
lea    0xe95(%rip),%rdx
mov    %rbx,%rsi
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1060 <syncAndCheckMd4@plt>
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
mov    $0xfa0,%edx
pop    %rbx
jmp    1030 <checkFileSize@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"testSource.bin\00"
@.str.1 = [18 x i8] c"sync single block\00"
@.str.2 = [13 x i8] c"testDest.bin\00"
@.str.3 = [23 x i8] c"sync single block size\00"
define void @testBasic() {
%1 = call i32 (...) @cleanup()
%2 = call i32 @createZeroFile(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4000)
%3 = call i32 @changeByte(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, i8 signext 114)
%4 = call i32 @syncAndCheckMd4(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%5 = call i32 @checkFileSize(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4000)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"testSource.bin\00"
@.str.1 = [18 x i8] c"sync single block\00"
@.str.2 = [13 x i8] c"testDest.bin\00"
@.str.3 = [23 x i8] c"sync single block size\00"
define void @testBasic() {
%1 = tail call i32 (...) @cleanup()
%2 = tail call i32 @createZeroFile(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4000)
%3 = tail call i32 @changeByte(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, i8 signext 114)
%4 = tail call i32 @syncAndCheckMd4(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%5 = tail call i32 @checkFileSize(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4000)
ret void
}