#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_EXCL;
int O_RDWR;
size_t blockDeviceSizeFromFD(int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int open(char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ seekTest(int, size_t, size_t, int);
int /*<<< orphan*/ shouldbe(int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int index = 1;
  for (size_t i = index; i < argc; i++) {
    int fd = open(argv[i], O_RDWR | O_EXCL);
    if (fd >= 0) {
      size_t bdsize = blockDeviceSizeFromFD(fd);
      if (bdsize == 0) {
        fprintf(stderr, "*error* a zero byte device????\n");
        exit(-1);
      }
      fprintf(stderr, "*info* opened '%s', size %zd bytes (%.2lf GiB)\n",
              argv[i], bdsize, ((bdsize) / 1024.0 / 1024 / 1024));
      shouldbe(seekTest(fd, 0, bdsize, 65536), 0);
      shouldbe(seekTest(fd, 65536, bdsize, 65536), 0);
      shouldbe(seekTest(fd, bdsize - 65536, bdsize, 65536), 0);
      shouldbe(seekTest(fd, bdsize - 512, bdsize, 512), 0);
      shouldbe(seekTest(fd, bdsize - 1, bdsize, 1), 0);
      shouldbe(seekTest(fd, bdsize, bdsize, 0), 0);
      shouldbe(seekTest(fd, bdsize + 1, bdsize, 0), 1);
      shouldbe(seekTest(fd, bdsize, bdsize, 1), 1);
      shouldbe(seekTest(fd, bdsize, bdsize, 4096), 1);
      shouldbe(seekTest(fd, bdsize, bdsize, 65536), 1);
      shouldbe(seekTest(fd, bdsize, bdsize, 1 << 20), 1);
      shouldbe(seekTest(fd, bdsize, bdsize, 1 << 28), 1);
      shouldbe(seekTest(fd, 0, bdsize, 0), 0);
      shouldbe(seekTest(fd, 0, bdsize, bdsize + 1), 1);
      shouldbe(seekTest(fd, 0, bdsize, 1 << 20), 0);
      close(fd);
    } else {
      perror("open");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    14a9 <main+0x329>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2e1f(%rip),%rax
mov    (%rax),%esi
mov    0x2dfe(%rip),%rax
or     (%rax),%esi
call   1080 <open@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1487 <main+0x307>
mov    -0x24(%rbp),%edi
call   1050 <blockDeviceSizeFromFD@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    121e <main+0x9e>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
lea    0xe23(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x30(%rbp),%rcx
movq   %rcx,%xmm0
movaps 0xdcd(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xdd1(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd9a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd8e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd82(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdc7(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rdx
mov    $0x10000,%esi
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
sub    $0x10000,%rsi
mov    -0x30(%rbp),%rdx
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
sub    $0x200,%rsi
mov    -0x30(%rbp),%rdx
mov    $0x200,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x30(%rbp),%rdx
mov    $0x1,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
xor    %ecx,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
add    $0x1,%rsi
mov    -0x30(%rbp),%rdx
xor    %ecx,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x1,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x1000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x100000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x10000000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rdx
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %eax,%ecx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x100000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    -0x24(%rbp),%edi
call   1060 <close@plt>
jmp    1493 <main+0x313>
lea    0xbf2(%rip),%rdi
call   1090 <perror@plt>
jmp    1498 <main+0x318>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11a5 <main+0x25>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jb     13fc <main+0x27c>
mov    %rsi,%r12
movslq %edi,%r15
mov    $0x1,%r14d
mov    (%r12,%r14,8),%rdi
mov    0x2e25(%rip),%rax
mov    (%rax),%esi
mov    0x2e34(%rip),%rax
or     (%rax),%esi
call   1080 <open@plt>
test   %eax,%eax
js     13ee <main+0x26e>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <blockDeviceSizeFromFD@plt>
mov    %rax,%rbx
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
test   %rbx,%rbx
je     140d <main+0x28d>
mov    (%r12,%r14,8),%rdx
movq   %rbx,%xmm1
punpckldq 0xe0e(%rip),%xmm1
subpd  0xe16(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe12(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xe27(%rip),%rsi
mov    %rbx,%rcx
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    $0x10000,%esi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
lea    -0x10000(%rbx),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
lea    -0x200(%rbx),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    $0x200,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
lea    -0x1(%rbx),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    %rbx,%r13
add    $0x1,%r13
mov    %ebp,%edi
mov    %r13,%rsi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    $0x1000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    $0x10000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    $0x100000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    $0x10000000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %r13d,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    $0x100000,%ecx
call   1040 <seekTest@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <shouldbe@plt>
mov    %ebp,%edi
call   1060 <close@plt>
add    $0x1,%r14
cmp    %r14,%r15
jne    11a0 <main+0x20>
jmp    13fc <main+0x27c>
lea    0xc83(%rip),%rdi
call   1090 <perror@plt>
jmp    13df <main+0x25f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc14(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_EXCL = global i32 0
@stderr = global i32 0
@.str = [32 x i8] c"*error* a zero byte device????\0A\00"
@.str.1 = [48 x i8] c"*info* opened '%s', size %zd bytes (%.2lf GiB)\0A\00"
@.str.2 = [5 x i8] c"open\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
store i64 %11, i64* %7
br label %12
12: ; preds = %132, %2
%13 = load i64, i64* %7
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = icmp ult i64 %13, %15
br i1 %16, label %17, label %135
17: ; preds = %12
%18 = load i8**, i8*** %5
%19 = load i64, i64* %7
%20 = getelementptr inbounds i8*, i8** %18, i64 %19
%21 = load i8*, i8** %20
%22 = load i32, i32* @O_RDWR
%23 = load i32, i32* @O_EXCL
%24 = or i32 %22, %23
%25 = call i32 @open(i8* %21, i32 %24)
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = icmp sge i32 %26, 0
br i1 %27, label %28, label %129
28: ; preds = %17
%29 = load i32, i32* %8
%30 = call i64 @blockDeviceSizeFromFD(i32 %29)
store i64 %30, i64* %9
%31 = load i64, i64* %9
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %28
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%36 = call i32 @exit(i32 -1)
unreachable
37: ; preds = %28
%38 = load i32, i32* @stderr
%39 = load i8**, i8*** %5
%40 = load i64, i64* %7
%41 = getelementptr inbounds i8*, i8** %39, i64 %40
%42 = load i8*, i8** %41
%43 = load i64, i64* %9
%44 = load i64, i64* %9
%45 = uitofp i64 %44 to double
%46 = fdiv double %45, 1.024000e+03
%47 = fdiv double %46, 1.024000e+03
%48 = fdiv double %47, 1.024000e+03
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* %42, i64 %43, double %48)
%50 = load i32, i32* %8
%51 = load i64, i64* %9
%52 = call i32 @seekTest(i32 %50, i64 0, i64 %51, i32 65536)
%53 = call i32 @shouldbe(i32 %52, i32 0)
%54 = load i32, i32* %8
%55 = load i64, i64* %9
%56 = call i32 @seekTest(i32 %54, i64 65536, i64 %55, i32 65536)
%57 = call i32 @shouldbe(i32 %56, i32 0)
%58 = load i32, i32* %8
%59 = load i64, i64* %9
%60 = sub i64 %59, 65536
%61 = load i64, i64* %9
%62 = call i32 @seekTest(i32 %58, i64 %60, i64 %61, i32 65536)
%63 = call i32 @shouldbe(i32 %62, i32 0)
%64 = load i32, i32* %8
%65 = load i64, i64* %9
%66 = sub i64 %65, 512
%67 = load i64, i64* %9
%68 = call i32 @seekTest(i32 %64, i64 %66, i64 %67, i32 512)
%69 = call i32 @shouldbe(i32 %68, i32 0)
%70 = load i32, i32* %8
%71 = load i64, i64* %9
%72 = sub i64 %71, 1
%73 = load i64, i64* %9
%74 = call i32 @seekTest(i32 %70, i64 %72, i64 %73, i32 1)
%75 = call i32 @shouldbe(i32 %74, i32 0)
%76 = load i32, i32* %8
%77 = load i64, i64* %9
%78 = load i64, i64* %9
%79 = call i32 @seekTest(i32 %76, i64 %77, i64 %78, i32 0)
%80 = call i32 @shouldbe(i32 %79, i32 0)
%81 = load i32, i32* %8
%82 = load i64, i64* %9
%83 = add i64 %82, 1
%84 = load i64, i64* %9
%85 = call i32 @seekTest(i32 %81, i64 %83, i64 %84, i32 0)
%86 = call i32 @shouldbe(i32 %85, i32 1)
%87 = load i32, i32* %8
%88 = load i64, i64* %9
%89 = load i64, i64* %9
%90 = call i32 @seekTest(i32 %87, i64 %88, i64 %89, i32 1)
%91 = call i32 @shouldbe(i32 %90, i32 1)
%92 = load i32, i32* %8
%93 = load i64, i64* %9
%94 = load i64, i64* %9
%95 = call i32 @seekTest(i32 %92, i64 %93, i64 %94, i32 4096)
%96 = call i32 @shouldbe(i32 %95, i32 1)
%97 = load i32, i32* %8
%98 = load i64, i64* %9
%99 = load i64, i64* %9
%100 = call i32 @seekTest(i32 %97, i64 %98, i64 %99, i32 65536)
%101 = call i32 @shouldbe(i32 %100, i32 1)
%102 = load i32, i32* %8
%103 = load i64, i64* %9
%104 = load i64, i64* %9
%105 = call i32 @seekTest(i32 %102, i64 %103, i64 %104, i32 1048576)
%106 = call i32 @shouldbe(i32 %105, i32 1)
%107 = load i32, i32* %8
%108 = load i64, i64* %9
%109 = load i64, i64* %9
%110 = call i32 @seekTest(i32 %107, i64 %108, i64 %109, i32 268435456)
%111 = call i32 @shouldbe(i32 %110, i32 1)
%112 = load i32, i32* %8
%113 = load i64, i64* %9
%114 = call i32 @seekTest(i32 %112, i64 0, i64 %113, i32 0)
%115 = call i32 @shouldbe(i32 %114, i32 0)
%116 = load i32, i32* %8
%117 = load i64, i64* %9
%118 = load i64, i64* %9
%119 = add i64 %118, 1
%120 = trunc i64 %119 to i32
%121 = call i32 @seekTest(i32 %116, i64 0, i64 %117, i32 %120)
%122 = call i32 @shouldbe(i32 %121, i32 1)
%123 = load i32, i32* %8
%124 = load i64, i64* %9
%125 = call i32 @seekTest(i32 %123, i64 0, i64 %124, i32 1048576)
%126 = call i32 @shouldbe(i32 %125, i32 0)
%127 = load i32, i32* %8
%128 = call i32 @close(i32 %127)
br label %131
129: ; preds = %17
%130 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %131
131: ; preds = %129, %37
br label %132
132: ; preds = %131
%133 = load i64, i64* %7
%134 = add i64 %133, 1
store i64 %134, i64* %7
br label %12
135: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_EXCL = global i32 0
@stderr = global i32 0
@.str = [32 x i8] c"*error* a zero byte device????\0A\00"
@.str.1 = [48 x i8] c"*info* opened '%s', size %zd bytes (%.2lf GiB)\0A\00"
@.str.2 = [5 x i8] c"open\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = sext i32 %0 to i64
%4 = icmp ugt i32 %0, 1
br i1 %4, label %6, label %5
5: ; preds = %67, %2
ret i32 0
6: ; preds = %2, %67
%7 = phi i64 [ %68, %67 ], [ 1, %2 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = load i32, i32* @O_RDWR
%11 = load i32, i32* @O_EXCL
%12 = or i32 %11, %10
%13 = tail call i32 @open(i8* %9, i32 %12)
%14 = icmp sgt i32 %13, -1
br i1 %14, label %15, label %65
15: ; preds = %6
%16 = tail call i64 @blockDeviceSizeFromFD(i32 %13)
%17 = icmp eq i64 %16, 0
%18 = load i32, i32* @stderr
br i1 %17, label %19, label %22
19: ; preds = %15
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%21 = tail call i32 @exit(i32 -1)
unreachable
22: ; preds = %15
%23 = load i8*, i8** %8
%24 = uitofp i64 %16 to double
%25 = fmul double %24, 0x3F50000000000000
%26 = fmul double %25, 0x3F50000000000000
%27 = fmul double %26, 0x3F50000000000000
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* %23, i64 %16, double %27)
%29 = tail call i32 @seekTest(i32 %13, i64 0, i64 %16, i32 65536)
%30 = tail call i32 @shouldbe(i32 %29, i32 0)
%31 = tail call i32 @seekTest(i32 %13, i64 65536, i64 %16, i32 65536)
%32 = tail call i32 @shouldbe(i32 %31, i32 0)
%33 = add i64 %16, -65536
%34 = tail call i32 @seekTest(i32 %13, i64 %33, i64 %16, i32 65536)
%35 = tail call i32 @shouldbe(i32 %34, i32 0)
%36 = add i64 %16, -512
%37 = tail call i32 @seekTest(i32 %13, i64 %36, i64 %16, i32 512)
%38 = tail call i32 @shouldbe(i32 %37, i32 0)
%39 = add i64 %16, -1
%40 = tail call i32 @seekTest(i32 %13, i64 %39, i64 %16, i32 1)
%41 = tail call i32 @shouldbe(i32 %40, i32 0)
%42 = tail call i32 @seekTest(i32 %13, i64 %16, i64 %16, i32 0)
%43 = tail call i32 @shouldbe(i32 %42, i32 0)
%44 = add i64 %16, 1
%45 = tail call i32 @seekTest(i32 %13, i64 %44, i64 %16, i32 0)
%46 = tail call i32 @shouldbe(i32 %45, i32 1)
%47 = tail call i32 @seekTest(i32 %13, i64 %16, i64 %16, i32 1)
%48 = tail call i32 @shouldbe(i32 %47, i32 1)
%49 = tail call i32 @seekTest(i32 %13, i64 %16, i64 %16, i32 4096)
%50 = tail call i32 @shouldbe(i32 %49, i32 1)
%51 = tail call i32 @seekTest(i32 %13, i64 %16, i64 %16, i32 65536)
%52 = tail call i32 @shouldbe(i32 %51, i32 1)
%53 = tail call i32 @seekTest(i32 %13, i64 %16, i64 %16, i32 1048576)
%54 = tail call i32 @shouldbe(i32 %53, i32 1)
%55 = tail call i32 @seekTest(i32 %13, i64 %16, i64 %16, i32 268435456)
%56 = tail call i32 @shouldbe(i32 %55, i32 1)
%57 = tail call i32 @seekTest(i32 %13, i64 0, i64 %16, i32 0)
%58 = tail call i32 @shouldbe(i32 %57, i32 0)
%59 = trunc i64 %44 to i32
%60 = tail call i32 @seekTest(i32 %13, i64 0, i64 %16, i32 %59)
%61 = tail call i32 @shouldbe(i32 %60, i32 1)
%62 = tail call i32 @seekTest(i32 %13, i64 0, i64 %16, i32 1048576)
%63 = tail call i32 @shouldbe(i32 %62, i32 0)
%64 = tail call i32 @close(i32 %13)
br label %67
65: ; preds = %6
%66 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %67
67: ; preds = %65, %22
%68 = add nuw i64 %7, 1
%69 = icmp eq i64 %68, %3
br i1 %69, label %5, label %6
}