#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 O_CREAT;
int O_RDWR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fill_random(void *, int);
int /*<<< orphan*/ free(void *);
int lseek(scalar_t__, int /*<<< orphan*/, int /*<<< orphan*/);
void *malloc(int);
int /*<<< orphan*/ memcmp(void *, void *, int);
int open(char *, int, int /*<<< orphan*/);
int read(int, void *, int);
int /*<<< orphan*/ unlink(char *);
int write(scalar_t__, void *, int);
int test_vfs_rw(void) {
  int n;
  void *wrbuf = malloc(16384);
  void *rdbuf = malloc(16384);
  fill_random(wrbuf, 16384);
  n = open("/tmp"
           "/file",
           O_RDWR | O_CREAT, 0);
  assert(n == 0 + 3);
  ;
  n = write(0 + 3, wrbuf, 4096);
  assert(n >= 0);
  ;
  n = lseek(0 + 3, 0, SEEK_SET);
  assert(n >= 0);
  ;
  assert(read(3, rdbuf, 5000) == 4096);
  assert(!memcmp(wrbuf, rdbuf, 4096));
  assert(read(3, rdbuf, 5000) == 0);
  n = lseek(0 + 3, 0, SEEK_SET);
  assert(n >= 0);
  ;
  n = write(0 + 3, wrbuf, 8000);
  assert(n >= 0);
  ;
  n = write(0 + 3, wrbuf + 8000, 4000);
  assert(n >= 0);
  ;
  n = lseek(0 + 3, 0, SEEK_SET);
  assert(n >= 0);
  ;
  assert(read(3, rdbuf, 6000) == 6000);
  assert(!memcmp(wrbuf, rdbuf, 6000));
  assert(read(3, rdbuf + 6000, 12000) == 6000);
  assert(!memcmp(wrbuf, rdbuf, 6000));
  n = lseek(0 + 3, 0, SEEK_SET);
  assert(n >= 0);
  ;
  for (int i = 0; i < 2; i++)
    n = write(0 + 3, wrbuf, 16384);
  assert(n >= 0);
  ;
  n = lseek(0 + 3, 0, SEEK_SET);
  assert(n >= 0);
  ;
  for (int i = 0; i < 2; i++) {
    assert(read(3, rdbuf, 16384) == 16384);
    assert(!memcmp(wrbuf, rdbuf, 16384));
  }
  free(wrbuf);
  free(rdbuf);
  close(3);
  unlink("/tmp"
         "/file");
  return 0;
}


x86 assembly (clang, -O0):
<test_vfs_rw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x4000,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4000,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4000,%esi
call   1050 <fill_random@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%esi
mov    0x2e06(%rip),%rax
or     (%rax),%esi
lea    0xe05(%rip),%rdi
xor    %edx,%edx
call   10d0 <open@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rsi
mov    $0x3,%edi
mov    $0x1000,%edx
call   1060 <write@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x18(%rbp),%rsi
mov    $0x3,%edi
mov    $0x1388,%edx
call   1090 <read@plt>
cmp    $0x1000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1000,%edx
call   10a0 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x18(%rbp),%rsi
mov    $0x3,%edi
mov    $0x1388,%edx
call   1090 <read@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    0x2cf7(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rsi
mov    $0x3,%edi
mov    $0x1f40,%edx
call   1060 <write@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rsi
add    $0x1f40,%rsi
mov    $0x3,%edi
mov    $0xfa0,%edx
call   1060 <write@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    0x2c79(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x18(%rbp),%rsi
mov    $0x3,%edi
mov    $0x1770,%edx
call   1090 <read@plt>
cmp    $0x1770,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1770,%edx
call   10a0 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x18(%rbp),%rsi
add    $0x1770,%rsi
mov    $0x3,%edi
mov    $0x2ee0,%edx
call   1090 <read@plt>
cmp    $0x1770,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1770,%edx
call   10a0 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    0x2bb7(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1470 <test_vfs_rw+0x2c0>
mov    -0x10(%rbp),%rsi
mov    $0x3,%edi
mov    $0x4000,%edx
call   1060 <write@plt>
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1442 <test_vfs_rw+0x292>
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    0x2b48(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    1512 <test_vfs_rw+0x362>
mov    -0x18(%rbp),%rsi
mov    $0x3,%edi
mov    $0x4000,%edx
call   1090 <read@plt>
cmp    $0x4000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x4000,%edx
call   10a0 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    14b1 <test_vfs_rw+0x301>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    $0x3,%edi
call   1080 <close@plt>
lea    0xacb(%rip),%rdi
call   1040 <unlink@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vfs_rw>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    $0x4000,%edi
call   10c0 <malloc@plt>
mov    %rax,%r14
mov    $0x4000,%edi
call   10c0 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x4000,%esi
call   1050 <fill_random@plt>
mov    0x2dfa(%rip),%rax
mov    0x2e0b(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xe08(%rip),%r15
mov    %r15,%rdi
xor    %edx,%edx
call   10d0 <open@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x1000,%edx
call   1060 <write@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    0x2d9b(%rip),%r12
mov    (%r12),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0x1388,%edx
call   1090 <read@plt>
xor    %edi,%edi
cmp    $0x1000,%eax
sete   %dil
call   10b0 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   10a0 <memcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0x1388,%edx
call   1090 <read@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
mov    (%r12),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x1f40,%edx
call   1060 <write@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
lea    0x1f40(%r14),%rsi
mov    $0x3,%edi
mov    $0xfa0,%edx
call   1060 <write@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    (%r12),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0x1770,%edx
call   1090 <read@plt>
xor    %edi,%edi
cmp    $0x1770,%eax
sete   %dil
call   10b0 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1770,%edx
call   10a0 <memcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
lea    0x1770(%rbx),%rsi
mov    $0x3,%edi
mov    $0x2ee0,%edx
call   1090 <read@plt>
xor    %edi,%edi
cmp    $0x1770,%eax
sete   %dil
call   10b0 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1770,%edx
call   10a0 <memcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
mov    (%r12),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x4000,%edx
call   1060 <write@plt>
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x4000,%edx
call   1060 <write@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    (%r12),%edx
mov    $0x3,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0x4000,%edx
call   1090 <read@plt>
xor    %edi,%edi
cmp    $0x4000,%eax
sete   %dil
call   10b0 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x4000,%edx
call   10a0 <memcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0x4000,%edx
call   1090 <read@plt>
xor    %edi,%edi
cmp    $0x4000,%eax
sete   %dil
call   10b0 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x4000,%edx
call   10a0 <memcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   10b0 <assert@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x3,%edi
call   1080 <close@plt>
mov    %r15,%rdi
call   1040 <unlink@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/tmp/file\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@SEEK_SET = global i32 0
define i32 @test_vfs_rw() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = call i8* @malloc(i32 16384)
store i8* %6, i8** %2
%7 = call i8* @malloc(i32 16384)
store i8* %7, i8** %3
%8 = load i8*, i8** %2
%9 = call i32 @fill_random(i8* %8, i32 16384)
%10 = load i32, i32* @O_RDWR
%11 = load i32, i32* @O_CREAT
%12 = or i32 %10, %11
%13 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %12, i32 0)
store i32 %13, i32* %1
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 3
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i8*, i8** %2
%19 = call i32 @write(i64 3, i8* %18, i32 4096)
store i32 %19, i32* %1
%20 = load i32, i32* %1
%21 = icmp sge i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i32, i32* @SEEK_SET
%25 = call i32 @lseek(i64 3, i32 0, i32 %24)
store i32 %25, i32* %1
%26 = load i32, i32* %1
%27 = icmp sge i32 %26, 0
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load i8*, i8** %3
%31 = call i32 @read(i32 3, i8* %30, i32 5000)
%32 = icmp eq i32 %31, 4096
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i8*, i8** %2
%36 = load i8*, i8** %3
%37 = call i32 @memcmp(i8* %35, i8* %36, i32 4096)
%38 = icmp ne i32 %37, 0
%39 = xor i1 %38, true
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = load i8*, i8** %3
%43 = call i32 @read(i32 3, i8* %42, i32 5000)
%44 = icmp eq i32 %43, 0
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = load i32, i32* @SEEK_SET
%48 = call i32 @lseek(i64 3, i32 0, i32 %47)
store i32 %48, i32* %1
%49 = load i32, i32* %1
%50 = icmp sge i32 %49, 0
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = load i8*, i8** %2
%54 = call i32 @write(i64 3, i8* %53, i32 8000)
store i32 %54, i32* %1
%55 = load i32, i32* %1
%56 = icmp sge i32 %55, 0
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = load i8*, i8** %2
%60 = getelementptr i8, i8* %59, i64 8000
%61 = call i32 @write(i64 3, i8* %60, i32 4000)
store i32 %61, i32* %1
%62 = load i32, i32* %1
%63 = icmp sge i32 %62, 0
%64 = zext i1 %63 to i32
%65 = call i32 @assert(i32 %64)
%66 = load i32, i32* @SEEK_SET
%67 = call i32 @lseek(i64 3, i32 0, i32 %66)
store i32 %67, i32* %1
%68 = load i32, i32* %1
%69 = icmp sge i32 %68, 0
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = load i8*, i8** %3
%73 = call i32 @read(i32 3, i8* %72, i32 6000)
%74 = icmp eq i32 %73, 6000
%75 = zext i1 %74 to i32
%76 = call i32 @assert(i32 %75)
%77 = load i8*, i8** %2
%78 = load i8*, i8** %3
%79 = call i32 @memcmp(i8* %77, i8* %78, i32 6000)
%80 = icmp ne i32 %79, 0
%81 = xor i1 %80, true
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82)
%84 = load i8*, i8** %3
%85 = getelementptr i8, i8* %84, i64 6000
%86 = call i32 @read(i32 3, i8* %85, i32 12000)
%87 = icmp eq i32 %86, 6000
%88 = zext i1 %87 to i32
%89 = call i32 @assert(i32 %88)
%90 = load i8*, i8** %2
%91 = load i8*, i8** %3
%92 = call i32 @memcmp(i8* %90, i8* %91, i32 6000)
%93 = icmp ne i32 %92, 0
%94 = xor i1 %93, true
%95 = zext i1 %94 to i32
%96 = call i32 @assert(i32 %95)
%97 = load i32, i32* @SEEK_SET
%98 = call i32 @lseek(i64 3, i32 0, i32 %97)
store i32 %98, i32* %1
%99 = load i32, i32* %1
%100 = icmp sge i32 %99, 0
%101 = zext i1 %100 to i32
%102 = call i32 @assert(i32 %101)
store i32 0, i32* %4
br label %103
103: ; preds = %109, %0
%104 = load i32, i32* %4
%105 = icmp slt i32 %104, 2
br i1 %105, label %106, label %112
106: ; preds = %103
%107 = load i8*, i8** %2
%108 = call i32 @write(i64 3, i8* %107, i32 16384)
store i32 %108, i32* %1
br label %109
109: ; preds = %106
%110 = load i32, i32* %4
%111 = add nsw i32 %110, 1
store i32 %111, i32* %4
br label %103
112: ; preds = %103
%113 = load i32, i32* %1
%114 = icmp sge i32 %113, 0
%115 = zext i1 %114 to i32
%116 = call i32 @assert(i32 %115)
%117 = load i32, i32* @SEEK_SET
%118 = call i32 @lseek(i64 3, i32 0, i32 %117)
store i32 %118, i32* %1
%119 = load i32, i32* %1
%120 = icmp sge i32 %119, 0
%121 = zext i1 %120 to i32
%122 = call i32 @assert(i32 %121)
store i32 0, i32* %5
br label %123
123: ; preds = %139, %112
%124 = load i32, i32* %5
%125 = icmp slt i32 %124, 2
br i1 %125, label %126, label %142
126: ; preds = %123
%127 = load i8*, i8** %3
%128 = call i32 @read(i32 3, i8* %127, i32 16384)
%129 = icmp eq i32 %128, 16384
%130 = zext i1 %129 to i32
%131 = call i32 @assert(i32 %130)
%132 = load i8*, i8** %2
%133 = load i8*, i8** %3
%134 = call i32 @memcmp(i8* %132, i8* %133, i32 16384)
%135 = icmp ne i32 %134, 0
%136 = xor i1 %135, true
%137 = zext i1 %136 to i32
%138 = call i32 @assert(i32 %137)
br label %139
139: ; preds = %126
%140 = load i32, i32* %5
%141 = add nsw i32 %140, 1
store i32 %141, i32* %5
br label %123
142: ; preds = %123
%143 = load i8*, i8** %2
%144 = call i32 @free(i8* %143)
%145 = load i8*, i8** %3
%146 = call i32 @free(i8* %145)
%147 = call i32 @close(i32 3)
%148 = call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/tmp/file\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@SEEK_SET = global i32 0
define i32 @test_vfs_rw() {
%1 = tail call dereferenceable_or_null(16384) i8* @malloc(i32 16384)
%2 = tail call dereferenceable_or_null(16384) i8* @malloc(i32 16384)
%3 = tail call i32 @fill_random(i8* %1, i32 16384)
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_CREAT
%6 = or i32 %5, %4
%7 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6, i32 0)
%8 = icmp eq i32 %7, 3
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @write(i64 3, i8* %1, i32 4096)
%12 = xor i32 %11, -1
%13 = lshr i32 %12, 31
%14 = tail call i32 @assert(i32 %13)
%15 = load i32, i32* @SEEK_SET
%16 = tail call i32 @lseek(i64 3, i32 0, i32 %15)
%17 = xor i32 %16, -1
%18 = lshr i32 %17, 31
%19 = tail call i32 @assert(i32 %18)
%20 = tail call i32 @read(i32 3, i8* %2, i32 5000)
%21 = icmp eq i32 %20, 4096
%22 = zext i1 %21 to i32
%23 = tail call i32 @assert(i32 %22)
%24 = tail call i32 @memcmp(i8* %1, i8* %2, i32 4096)
%25 = icmp eq i32 %24, 0
%26 = zext i1 %25 to i32
%27 = tail call i32 @assert(i32 %26)
%28 = tail call i32 @read(i32 3, i8* %2, i32 5000)
%29 = icmp eq i32 %28, 0
%30 = zext i1 %29 to i32
%31 = tail call i32 @assert(i32 %30)
%32 = load i32, i32* @SEEK_SET
%33 = tail call i32 @lseek(i64 3, i32 0, i32 %32)
%34 = xor i32 %33, -1
%35 = lshr i32 %34, 31
%36 = tail call i32 @assert(i32 %35)
%37 = tail call i32 @write(i64 3, i8* %1, i32 8000)
%38 = xor i32 %37, -1
%39 = lshr i32 %38, 31
%40 = tail call i32 @assert(i32 %39)
%41 = getelementptr i8, i8* %1, i64 8000
%42 = tail call i32 @write(i64 3, i8* %41, i32 4000)
%43 = xor i32 %42, -1
%44 = lshr i32 %43, 31
%45 = tail call i32 @assert(i32 %44)
%46 = load i32, i32* @SEEK_SET
%47 = tail call i32 @lseek(i64 3, i32 0, i32 %46)
%48 = xor i32 %47, -1
%49 = lshr i32 %48, 31
%50 = tail call i32 @assert(i32 %49)
%51 = tail call i32 @read(i32 3, i8* %2, i32 6000)
%52 = icmp eq i32 %51, 6000
%53 = zext i1 %52 to i32
%54 = tail call i32 @assert(i32 %53)
%55 = tail call i32 @memcmp(i8* %1, i8* %2, i32 6000)
%56 = icmp eq i32 %55, 0
%57 = zext i1 %56 to i32
%58 = tail call i32 @assert(i32 %57)
%59 = getelementptr i8, i8* %2, i64 6000
%60 = tail call i32 @read(i32 3, i8* %59, i32 12000)
%61 = icmp eq i32 %60, 6000
%62 = zext i1 %61 to i32
%63 = tail call i32 @assert(i32 %62)
%64 = tail call i32 @memcmp(i8* %1, i8* %2, i32 6000)
%65 = icmp eq i32 %64, 0
%66 = zext i1 %65 to i32
%67 = tail call i32 @assert(i32 %66)
%68 = load i32, i32* @SEEK_SET
%69 = tail call i32 @lseek(i64 3, i32 0, i32 %68)
%70 = xor i32 %69, -1
%71 = lshr i32 %70, 31
%72 = tail call i32 @assert(i32 %71)
%73 = tail call i32 @write(i64 3, i8* %1, i32 16384)
%74 = tail call i32 @write(i64 3, i8* %1, i32 16384)
%75 = xor i32 %74, -1
%76 = lshr i32 %75, 31
%77 = tail call i32 @assert(i32 %76)
%78 = load i32, i32* @SEEK_SET
%79 = tail call i32 @lseek(i64 3, i32 0, i32 %78)
%80 = xor i32 %79, -1
%81 = lshr i32 %80, 31
%82 = tail call i32 @assert(i32 %81)
%83 = tail call i32 @read(i32 3, i8* %2, i32 16384)
%84 = icmp eq i32 %83, 16384
%85 = zext i1 %84 to i32
%86 = tail call i32 @assert(i32 %85)
%87 = tail call i32 @memcmp(i8* %1, i8* %2, i32 16384)
%88 = icmp eq i32 %87, 0
%89 = zext i1 %88 to i32
%90 = tail call i32 @assert(i32 %89)
%91 = tail call i32 @read(i32 3, i8* %2, i32 16384)
%92 = icmp eq i32 %91, 16384
%93 = zext i1 %92 to i32
%94 = tail call i32 @assert(i32 %93)
%95 = tail call i32 @memcmp(i8* %1, i8* %2, i32 16384)
%96 = icmp eq i32 %95, 0
%97 = zext i1 %96 to i32
%98 = tail call i32 @assert(i32 %97)
%99 = tail call i32 @free(i8* %1)
%100 = tail call i32 @free(i8* %2)
%101 = tail call i32 @close(i32 3)
%102 = tail call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}