#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 /*<<< orphan*/ O_RDONLY;
int O_WRONLY;
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
long long lseek64(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(unsigned char *, char, int);
int open(char *, int, ...);
int /*<<< orphan*/ printf(char *, long long);
int read(int, unsigned char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int write(int, unsigned char *, int);
int main(int argc, char **argv) {
  unsigned char buf[512];
  long long int position = 0;
  long long int ret;
  int fd1 = open("/dev/sdb4", O_RDONLY);
  if (fd1 < 0) {
    fprintf(stderr, "line %d:%m\n", 21);
    exit(10);
  };
  position = (long long)0;
  ret = lseek64(fd1, (long long)0 * 512, SEEK_SET);
  if (ret != (long long)0 * 512) {
    fprintf(stderr, "line %d:%m\n", 25);
    exit(15);
  };
  int fd2 = open("sdc4_b.img", O_WRONLY | O_CREAT, 0644);
  if (fd2 < 0) {
    fprintf(stderr, "line %d:%m\n", 29);
    exit(11);
  };
  ret = lseek64(fd2, (long long)0 * 512, SEEK_SET);
  if (ret != (long long)0 * 512) {
    fprintf(stderr, "line %d:%m\n", 32);
    exit(16);
  };
  do {
    if (read(fd1, buf, 512) != 512) {
      fprintf(stderr, "!");
      fflush(stderr);
      printf("BAD BLOCK POS: %lld\n", position);
      fflush(stdout);
      memset(buf, '\0', 512);
      ret = lseek64(fd1, 512, SEEK_CUR);
      if (ret != position * 512 + 512) {
        fprintf(stderr, "line %d:%m expect %lld got %lld\n", 43, position * 512,
                ret);
        exit(17);
      };
    }
    if (write(fd2, buf, 512) != 512) {
      fprintf(stderr, "write error %m on position %lld\n", position);
      exit(13);
    }
    if (position % (1024 * 1024 * 1024 / 512) == 0) {
      fprintf(stderr, "%lld ", position >> 21);
      fflush(stderr);
    }
    position++;
  } while (position < (long long)475540065 * 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x218(%rbp)
mov    0x2e1d(%rip),%rax
mov    (%rax),%esi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1090 <open@plt>
mov    %eax,-0x224(%rbp)
cmpl   $0x0,-0x224(%rbp)
jge    1204 <main+0x74>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
lea    0xe1c(%rip),%rsi
mov    $0x15,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xa,%edi
call   10a0 <exit@plt>
movq   $0x0,-0x218(%rbp)
mov    -0x224(%rbp),%edi
mov    0x2da4(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10b0 <lseek64@plt>
mov    %rax,-0x220(%rbp)
cmpq   $0x0,-0x220(%rbp)
je     1260 <main+0xd0>
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
lea    0xdc0(%rip),%rsi
mov    $0x19,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xf,%edi
call   10a0 <exit@plt>
mov    0x2d41(%rip),%rax
mov    (%rax),%esi
mov    0x2d88(%rip),%rax
or     (%rax),%esi
lea    0xd9d(%rip),%rdi
mov    $0x1a4,%edx
mov    $0x0,%al
call   1090 <open@plt>
mov    %eax,-0x228(%rbp)
cmpl   $0x0,-0x228(%rbp)
jge    12be <main+0x12e>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
lea    0xd62(%rip),%rsi
mov    $0x1d,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xb,%edi
call   10a0 <exit@plt>
mov    -0x228(%rbp),%edi
mov    0x2cf5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10b0 <lseek64@plt>
mov    %rax,-0x220(%rbp)
cmpq   $0x0,-0x220(%rbp)
je     130f <main+0x17f>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
lea    0xd11(%rip),%rsi
mov    $0x20,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x10,%edi
call   10a0 <exit@plt>
jmp    1314 <main+0x184>
mov    -0x224(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    $0x200,%edx
call   1060 <read@plt>
cmp    $0x200,%eax
je     140e <main+0x27e>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xcdb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2c74(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    -0x218(%rbp),%rsi
lea    0xcba(%rip),%rdi
call   1040 <printf@plt>
mov    0x2c43(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    -0x224(%rbp),%edi
mov    0x2c44(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   10b0 <lseek64@plt>
mov    %rax,-0x220(%rbp)
mov    -0x220(%rbp),%rax
mov    -0x218(%rbp),%rcx
shl    $0x9,%rcx
add    $0x200,%rcx
cmp    %rcx,%rax
je     1409 <main+0x279>
mov    0x2bf0(%rip),%rax
mov    (%rax),%edi
mov    -0x218(%rbp),%rcx
shl    $0x9,%rcx
mov    -0x220(%rbp),%r8
lea    0xc45(%rip),%rsi
mov    $0x2b,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x11,%edi
call   10a0 <exit@plt>
jmp    140e <main+0x27e>
mov    -0x228(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    $0x200,%edx
call   1030 <write@plt>
cmp    $0x200,%eax
je     1458 <main+0x2c8>
mov    0x2b91(%rip),%rax
mov    (%rax),%edi
mov    -0x218(%rbp),%rdx
lea    0xc12(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xd,%edi
call   10a0 <exit@plt>
mov    -0x218(%rbp),%rax
mov    $0x200000,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    14a3 <main+0x313>
mov    0x2b4e(%rip),%rax
mov    (%rax),%edi
mov    -0x218(%rbp),%rdx
sar    $0x15,%rdx
lea    0xbec(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2b2c(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    -0x218(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x218(%rbp)
cmpq   $0x38b054c2,-0x218(%rbp)
c2 54 b0 38
jl     1314 <main+0x184>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x208,%rsp
mov    0x2e30(%rip),%rax
mov    (%rax),%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1090 <open@plt>
test   %eax,%eax
js     137c <main+0x1ec>
mov    %eax,%r15d
mov    0x2df6(%rip),%rbx
mov    (%rbx),%edx
mov    %eax,%edi
xor    %esi,%esi
call   10b0 <lseek64@plt>
test   %rax,%rax
jne    13a2 <main+0x212>
mov    0x2dc3(%rip),%rax
mov    0x2e0c(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xe1f(%rip),%rdi
mov    $0x1a4,%edx
xor    %eax,%eax
call   1090 <open@plt>
test   %eax,%eax
js     13c8 <main+0x238>
mov    %eax,%r14d
mov    (%rbx),%edx
mov    %eax,%edi
xor    %esi,%esi
call   10b0 <lseek64@plt>
test   %rax,%rax
jne    13ee <main+0x25e>
mov    %rsp,%r12
mov    0x2d9c(%rip),%r13
xor    %ebp,%ebp
xor    %ebx,%ebx
jmp    1258 <main+0xc8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbx
add    $0x200,%rbp
cmp    $0x38b054c2,%rbx
je     1322 <main+0x192>
mov    %r15d,%edi
mov    %r12,%rsi
mov    $0x200,%edx
call   1060 <read@plt>
cmp    $0x200,%eax
je     12d8 <main+0x148>
mov    0x0(%r13),%edi
lea    0xda7(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%r13),%edi
call   1080 <fflush@plt>
lea    0xd92(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    0x2d18(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    0x2d23(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
mov    $0x200,%esi
call   10b0 <lseek64@plt>
lea    0x200(%rbp),%rcx
cmp    %rax,%rcx
jne    1355 <main+0x1c5>
mov    %r14d,%edi
mov    %r12,%rsi
mov    $0x200,%edx
call   1030 <write@plt>
cmp    $0x200,%eax
jne    1336 <main+0x1a6>
test   $0x1fffff,%ebx
jne    1240 <main+0xb0>
mov    0x0(%r13),%edi
mov    %rbx,%rdx
shr    $0x15,%rdx
lea    0xd6d(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%r13),%edi
call   1080 <fflush@plt>
jmp    1240 <main+0xb0>
xor    %eax,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x0(%r13),%edi
lea    0xd18(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xd,%edi
call   10a0 <exit@plt>
mov    0x0(%r13),%edi
lea    0xcd8(%rip),%rsi
mov    $0x2b,%edx
mov    %rbp,%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x11,%edi
call   10a0 <exit@plt>
mov    0x2c45(%rip),%rax
mov    (%rax),%edi
lea    0xc7e(%rip),%rsi
mov    $0x15,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xa,%edi
call   10a0 <exit@plt>
mov    0x2c1f(%rip),%rax
mov    (%rax),%edi
lea    0xc58(%rip),%rsi
mov    $0x19,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xf,%edi
call   10a0 <exit@plt>
mov    0x2bf9(%rip),%rax
mov    (%rax),%edi
lea    0xc32(%rip),%rsi
mov    $0x1d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xb,%edi
call   10a0 <exit@plt>
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
lea    0xc0c(%rip),%rsi
mov    $0x20,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x10,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/sdb4\00"
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str.1 = [12 x i8] c"line %d:%m\0A\00"
@SEEK_SET = global i32 0
@.str.2 = [11 x i8] c"sdc4_b.img\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@.str.3 = [2 x i8] c"!\00"
@.str.4 = [21 x i8] c"BAD BLOCK POS: %lld\0A\00"
@stdout = global i32 0
@SEEK_CUR = global i32 0
@.str.5 = [33 x i8] c"line %d:%m expect %lld got %lld\0A\00"
@.str.6 = [33 x i8] c"write error %m on position %lld\0A\00"
@.str.7 = [6 x i8] c"%lld \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i8]
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %7
%11 = load i32, i32* @O_RDONLY
%12 = call i32 (i8*, i32, ...) @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %11)
store i32 %12, i32* %9
%13 = load i32, i32* %9
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 21)
%18 = call i32 @exit(i32 10)
unreachable
19: ; preds = %2
store i64 0, i64* %7
%20 = load i32, i32* %9
%21 = load i32, i32* @SEEK_SET
%22 = call i64 @lseek64(i32 %20, i32 0, i32 %21)
store i64 %22, i64* %8
%23 = load i64, i64* %8
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %19
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 25)
%28 = call i32 @exit(i32 15)
unreachable
29: ; preds = %19
%30 = load i32, i32* @O_WRONLY
%31 = load i32, i32* @O_CREAT
%32 = or i32 %30, %31
%33 = call i32 (i8*, i32, ...) @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %32, i32 420)
store i32 %33, i32* %10
%34 = load i32, i32* %10
%35 = icmp slt i32 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %29
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 29)
%39 = call i32 @exit(i32 11)
unreachable
40: ; preds = %29
%41 = load i32, i32* %10
%42 = load i32, i32* @SEEK_SET
%43 = call i64 @lseek64(i32 %41, i32 0, i32 %42)
store i64 %43, i64* %8
%44 = load i64, i64* %8
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %50
46: ; preds = %40
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 32)
%49 = call i32 @exit(i32 16)
unreachable
50: ; preds = %40
br label %51
51: ; preds = %107, %50
%52 = load i32, i32* %9
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%54 = call i32 @read(i32 %52, i8* %53, i32 512)
%55 = icmp ne i32 %54, 512
br i1 %55, label %56, label %83
56: ; preds = %51
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%59 = load i32, i32* @stderr
%60 = call i32 @fflush(i32 %59)
%61 = load i64, i64* %7
%62 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 %61)
%63 = load i32, i32* @stdout
%64 = call i32 @fflush(i32 %63)
%65 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%66 = call i32 @memset(i8* %65, i8 signext 0, i32 512)
%67 = load i32, i32* %9
%68 = load i32, i32* @SEEK_CUR
%69 = call i64 @lseek64(i32 %67, i32 512, i32 %68)
store i64 %69, i64* %8
%70 = load i64, i64* %8
%71 = load i64, i64* %7
%72 = mul nsw i64 %71, 512
%73 = add nsw i64 %72, 512
%74 = icmp ne i64 %70, %73
br i1 %74, label %75, label %82
75: ; preds = %56
%76 = load i32, i32* @stderr
%77 = load i64, i64* %7
%78 = mul nsw i64 %77, 512
%79 = load i64, i64* %8
%80 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 43, i64 %78, i64 %79)
%81 = call i32 @exit(i32 17)
unreachable
82: ; preds = %56
br label %83
83: ; preds = %82, %51
%84 = load i32, i32* %10
%85 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%86 = call i32 @write(i32 %84, i8* %85, i32 512)
%87 = icmp ne i32 %86, 512
br i1 %87, label %88, label %93
88: ; preds = %83
%89 = load i32, i32* @stderr
%90 = load i64, i64* %7
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i64 %90)
%92 = call i32 @exit(i32 13)
unreachable
93: ; preds = %83
%94 = load i64, i64* %7
%95 = srem i64 %94, 2097152
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %104
97: ; preds = %93
%98 = load i32, i32* @stderr
%99 = load i64, i64* %7
%100 = ashr i64 %99, 21
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i64 %100)
%102 = load i32, i32* @stderr
%103 = call i32 @fflush(i32 %102)
br label %104
104: ; preds = %97, %93
%105 = load i64, i64* %7
%106 = add nsw i64 %105, 1
store i64 %106, i64* %7
br label %107
107: ; preds = %104
%108 = load i64, i64* %7
%109 = icmp slt i64 %108, 951080130
br i1 %109, label %51, label %110
110: ; preds = %107
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/sdb4\00"
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str.1 = [12 x i8] c"line %d:%m\0A\00"
@SEEK_SET = global i32 0
@.str.2 = [11 x i8] c"sdc4_b.img\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@.str.3 = [2 x i8] c"!\00"
@.str.4 = [21 x i8] c"BAD BLOCK POS: %lld\0A\00"
@stdout = global i32 0
@SEEK_CUR = global i32 0
@.str.5 = [33 x i8] c"line %d:%m expect %lld got %lld\0A\00"
@.str.6 = [33 x i8] c"write error %m on position %lld\0A\00"
@.str.7 = [6 x i8] c"%lld \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @O_RDONLY
%6 = tail call i32 (i8*, i32, ...) @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 21)
%11 = tail call i32 @exit(i32 10)
unreachable
12: ; preds = %2
%13 = load i32, i32* @SEEK_SET
%14 = tail call i64 @lseek64(i32 %6, i32 0, i32 %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %12
%17 = load i32, i32* @stderr
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 25)
%19 = tail call i32 @exit(i32 15)
unreachable
20: ; preds = %12
%21 = load i32, i32* @O_WRONLY
%22 = load i32, i32* @O_CREAT
%23 = or i32 %22, %21
%24 = tail call i32 (i8*, i32, ...) @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 420)
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %20
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 29)
%29 = tail call i32 @exit(i32 11)
unreachable
30: ; preds = %20
%31 = load i32, i32* @SEEK_SET
%32 = tail call i64 @lseek64(i32 %24, i32 0, i32 %31)
%33 = icmp eq i64 %32, 0
br i1 %33, label %38, label %34
34: ; preds = %30
%35 = load i32, i32* @stderr
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 32)
%37 = tail call i32 @exit(i32 16)
unreachable
38: ; preds = %30, %76
%39 = phi i64 [ %77, %76 ], [ 0, %30 ]
%40 = call i32 @read(i32 %6, i8* %4, i32 512)
%41 = icmp eq i32 %40, 512
br i1 %41, label %60, label %42
42: ; preds = %38
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%45 = load i32, i32* @stderr
%46 = call i32 @fflush(i32 %45)
%47 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 %39)
%48 = load i32, i32* @stdout
%49 = call i32 @fflush(i32 %48)
%50 = call i32 @memset(i8* %4, i8 signext 0, i32 512)
%51 = load i32, i32* @SEEK_CUR
%52 = call i64 @lseek64(i32 %6, i32 512, i32 %51)
%53 = shl nuw nsw i64 %39, 9
%54 = add nuw nsw i64 %53, 512
%55 = icmp eq i64 %52, %54
br i1 %55, label %60, label %56
56: ; preds = %42
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 43, i64 %53, i64 %52)
%59 = call i32 @exit(i32 17)
unreachable
60: ; preds = %42, %38
%61 = call i32 @write(i32 %24, i8* %4, i32 512)
%62 = icmp eq i32 %61, 512
br i1 %62, label %67, label %63
63: ; preds = %60
%64 = load i32, i32* @stderr
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i64 %39)
%66 = call i32 @exit(i32 13)
unreachable
67: ; preds = %60
%68 = and i64 %39, 2097151
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %76
70: ; preds = %67
%71 = load i32, i32* @stderr
%72 = lshr i64 %39, 21
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i64 %72)
%74 = load i32, i32* @stderr
%75 = call i32 @fflush(i32 %74)
br label %76
76: ; preds = %70, %67
%77 = add nuw nsw i64 %39, 1
%78 = icmp eq i64 %77, 951080130
br i1 %78, label %79, label %38
79: ; preds = %76
ret i32 0
}