#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*/ BLKGETSIZE;
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ ioctl(int, int /*<<< orphan*/, unsigned long *);
long long lseek64(int, unsigned long long, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int write(int, char *, int);
int main(int argc, char *argv[]) {
  int fd, i;
  unsigned long size;
  unsigned long long offset;
  char super[4096];
  if (argc != 2) {
    fprintf(stderr, "Usage: swap_super device\n");
    exit(1);
  }
  fd = open(argv[1], O_RDWR);
  if (fd < 0) {
    perror(argv[1]);
    exit(1);
  }
  if (ioctl(fd, BLKGETSIZE, &size)) {
    perror("BLKGETSIZE");
    exit(1);
  }
  offset = ((size & ~(((64 * 1024) / 512) - 1)) - ((64 * 1024) / 512)) * 512LL;
  if (lseek64(fd, offset, 0) < 0LL) {
    perror("lseek64");
    exit(1);
  }
  if (read(fd, super, 4096) != 4096) {
    perror("read");
    exit(1);
  }
  for (i = 0; i < 4096; i += 4) {
    char t = super[i];
    super[i] = super[i + 3];
    super[i + 3] = t;
    t = super[i + 1];
    super[i + 1] = super[i + 2];
    super[i + 2] = t;
  }
  for (i = 0; i < 4; i++) {
    char t = super[32 * 4 + 7 * 4 + i];
    super[32 * 4 + 7 * 4 + i] = super[32 * 4 + 8 * 4 + i];
    super[32 * 4 + 8 * 4 + i] = t;
    t = super[32 * 4 + 9 * 4 + i];
    super[32 * 4 + 9 * 4 + i] = super[32 * 4 + 10 * 4 + i];
    super[32 * 4 + 10 * 4 + i] = t;
  }
  if (lseek64(fd, offset, 0) < 0LL) {
    perror("lseek64");
    exit(1);
  }
  if (write(fd, super, 4096) != 4096) {
    perror("write");
    exit(1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1040,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11c2 <main+0x42>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
lea    0xe4d(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2e17(%rip),%rax
mov    (%rax),%esi
call   1070 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    11fc <main+0x7c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2dca(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1040 <ioctl@plt>
cmp    $0x0,%rax
je     1231 <main+0xb1>
lea    0xdf8(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x20(%rbp),%rax
and    $0xffffffffffffff80,%rax
sub    $0x80,%rax
shl    $0x9,%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x28(%rbp),%rsi
xor    %edx,%edx
call   10a0 <lseek64@plt>
cmp    $0x0,%rax
jge    1275 <main+0xf5>
lea    0xdbf(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x14(%rbp),%edi
lea    -0x1030(%rbp),%rsi
mov    $0x1000,%edx
call   1050 <read@plt>
cmp    $0x1000,%eax
je     12aa <main+0x12a>
lea    0xd92(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x1000,-0x18(%rbp)
jge    1354 <main+0x1d4>
movslq -0x18(%rbp),%rax
mov    -0x1030(%rbp,%rax,1),%al
mov    %al,-0x1031(%rbp)
mov    -0x18(%rbp),%eax
add    $0x3,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x1031(%rbp),%cl
mov    -0x18(%rbp),%eax
add    $0x3,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%al
mov    %al,-0x1031(%rbp)
mov    -0x18(%rbp),%eax
add    $0x2,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%cl
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x1031(%rbp),%cl
mov    -0x18(%rbp),%eax
add    $0x2,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x18(%rbp)
jmp    12b1 <main+0x131>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    1413 <main+0x293>
mov    -0x18(%rbp),%eax
add    $0x9c,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%al
mov    %al,-0x1032(%rbp)
mov    -0x18(%rbp),%eax
add    $0xa0,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%cl
mov    -0x18(%rbp),%eax
add    $0x9c,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x1032(%rbp),%cl
mov    -0x18(%rbp),%eax
add    $0xa0,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0xa4,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%al
mov    %al,-0x1032(%rbp)
mov    -0x18(%rbp),%eax
add    $0xa8,%eax
cltq
mov    -0x1030(%rbp,%rax,1),%cl
mov    -0x18(%rbp),%eax
add    $0xa4,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x1032(%rbp),%cl
mov    -0x18(%rbp),%eax
add    $0xa8,%eax
cltq
mov    %cl,-0x1030(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    135b <main+0x1db>
mov    -0x14(%rbp),%edi
mov    -0x28(%rbp),%rsi
xor    %edx,%edx
call   10a0 <lseek64@plt>
cmp    $0x0,%rax
jge    1441 <main+0x2c1>
lea    0xbf3(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x14(%rbp),%edi
lea    -0x1030(%rbp),%rsi
mov    $0x1000,%edx
call   1030 <write@plt>
cmp    $0x1000,%eax
je     1476 <main+0x2f6>
lea    0xbcb(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1010,%rsp
cmp    $0x2,%edi
jne    11af <main+0x2f>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
mov    0x2e4a(%rip),%rax
mov    (%rax),%esi
call   1070 <open@plt>
test   %eax,%eax
jns    11ce <main+0x4e>
mov    0x8(%rbx),%rdi
jmp    1222 <main+0xa2>
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
lea    0xe41(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    %eax,%ebp
mov    0x2df9(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %ebp,%edi
call   1040 <ioctl@plt>
test   %rax,%rax
jne    121b <main+0x9b>
mov    0x8(%rsp),%r14
shl    $0x9,%r14
add    $0xffffffffffff0000,%r14
and    $0xffffffffffff0000,%r14
mov    %ebp,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   10a0 <lseek64@plt>
test   %rax,%rax
jns    1231 <main+0xb1>
lea    0xe0c(%rip),%rdi
jmp    1222 <main+0xa2>
lea    0xdf8(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0x10(%rsp),%rsi
mov    %ebp,%edi
mov    $0x1000,%edx
call   1050 <read@plt>
cmp    $0x1000,%eax
jne    12bf <main+0x13f>
mov    $0xfffffffffffffffc,%rax
movzbl 0x14(%rsp,%rax,1),%ecx
movzbl 0x17(%rsp,%rax,1),%edx
mov    %dl,0x14(%rsp,%rax,1)
mov    %cl,0x17(%rsp,%rax,1)
rolw   $0x8,0x15(%rsp,%rax,1)
add    $0x4,%rax
cmp    $0xffc,%rax
jb     1250 <main+0xd0>
movdqu 0xac(%rsp),%xmm0
pshufd $0xb1,%xmm0,%xmm0
movdqu %xmm0,0xac(%rsp)
mov    %ebp,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   10a0 <lseek64@plt>
test   %rax,%rax
js     1212 <main+0x92>
lea    0x10(%rsp),%rsi
mov    %ebp,%edi
mov    $0x1000,%edx
call   1030 <write@plt>
cmp    $0x1000,%eax
jne    12cb <main+0x14b>
xor    %edi,%edi
call   1090 <exit@plt>
lea    0xd67(%rip),%rdi
jmp    1222 <main+0xa2>
lea    0xd60(%rip),%rdi
jmp    1222 <main+0xa2>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: swap_super device\0A\00"
@O_RDWR = global i32 0
@BLKGETSIZE = global i32 0
@.str.1 = [11 x i8] c"BLKGETSIZE\00"
@.str.2 = [8 x i8] c"lseek64\00"
@.str.3 = [5 x i8] c"read\00"
@.str.4 = [6 x i8] c"write\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
%10 = alloca [4096 x i8]
%11 = alloca i8
%12 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = load i32, i32* @O_RDWR
%24 = call i32 @open(i8* %22, i32 %23)
store i32 %24, i32* %6
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %33
27: ; preds = %19
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 @perror(i8* %30)
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %19
%34 = load i32, i32* %6
%35 = load i32, i32* @BLKGETSIZE
%36 = call i64 @ioctl(i32 %34, i32 %35, i64* %8)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %33
%39 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %33
%42 = load i64, i64* %8
%43 = and i64 %42, -128
%44 = sub i64 %43, 128
%45 = mul i64 %44, 512
store i64 %45, i64* %9
%46 = load i32, i32* %6
%47 = load i64, i64* %9
%48 = call i64 @lseek64(i32 %46, i64 %47, i32 0)
%49 = icmp slt i64 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %41
%51 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %41
%54 = load i32, i32* %6
%55 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%56 = call i32 @read(i32 %54, i8* %55, i32 4096)
%57 = icmp ne i32 %56, 4096
br i1 %57, label %58, label %61
58: ; preds = %53
%59 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%60 = call i32 @exit(i32 1)
unreachable
61: ; preds = %53
store i32 0, i32* %7
br label %62
62: ; preds = %102, %61
%63 = load i32, i32* %7
%64 = icmp slt i32 %63, 4096
br i1 %64, label %65, label %105
65: ; preds = %62
%66 = load i32, i32* %7
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %67
%69 = load i8, i8* %68
store i8 %69, i8* %11
%70 = load i32, i32* %7
%71 = add nsw i32 %70, 3
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = load i32, i32* %7
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %76
store i8 %74, i8* %77
%78 = load i8, i8* %11
%79 = load i32, i32* %7
%80 = add nsw i32 %79, 3
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %81
store i8 %78, i8* %82
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %85
%87 = load i8, i8* %86
store i8 %87, i8* %11
%88 = load i32, i32* %7
%89 = add nsw i32 %88, 2
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %90
%92 = load i8, i8* %91
%93 = load i32, i32* %7
%94 = add nsw i32 %93, 1
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %95
store i8 %92, i8* %96
%97 = load i8, i8* %11
%98 = load i32, i32* %7
%99 = add nsw i32 %98, 2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %100
store i8 %97, i8* %101
br label %102
102: ; preds = %65
%103 = load i32, i32* %7
%104 = add nsw i32 %103, 4
store i32 %104, i32* %7
br label %62
105: ; preds = %62
store i32 0, i32* %7
br label %106
106: ; preds = %148, %105
%107 = load i32, i32* %7
%108 = icmp slt i32 %107, 4
br i1 %108, label %109, label %151
109: ; preds = %106
%110 = load i32, i32* %7
%111 = add nsw i32 156, %110
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %112
%114 = load i8, i8* %113
store i8 %114, i8* %12
%115 = load i32, i32* %7
%116 = add nsw i32 160, %115
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %117
%119 = load i8, i8* %118
%120 = load i32, i32* %7
%121 = add nsw i32 156, %120
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %122
store i8 %119, i8* %123
%124 = load i8, i8* %12
%125 = load i32, i32* %7
%126 = add nsw i32 160, %125
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %127
store i8 %124, i8* %128
%129 = load i32, i32* %7
%130 = add nsw i32 164, %129
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %131
%133 = load i8, i8* %132
store i8 %133, i8* %12
%134 = load i32, i32* %7
%135 = add nsw i32 168, %134
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %136
%138 = load i8, i8* %137
%139 = load i32, i32* %7
%140 = add nsw i32 164, %139
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %141
store i8 %138, i8* %142
%143 = load i8, i8* %12
%144 = load i32, i32* %7
%145 = add nsw i32 168, %144
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 %146
store i8 %143, i8* %147
br label %148
148: ; preds = %109
%149 = load i32, i32* %7
%150 = add nsw i32 %149, 1
store i32 %150, i32* %7
br label %106
151: ; preds = %106
%152 = load i32, i32* %6
%153 = load i64, i64* %9
%154 = call i64 @lseek64(i32 %152, i64 %153, i32 0)
%155 = icmp slt i64 %154, 0
br i1 %155, label %156, label %159
156: ; preds = %151
%157 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%158 = call i32 @exit(i32 1)
unreachable
159: ; preds = %151
%160 = load i32, i32* %6
%161 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%162 = call i32 @write(i32 %160, i8* %161, i32 4096)
%163 = icmp ne i32 %162, 4096
br i1 %163, label %164, label %167
164: ; preds = %159
%165 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%166 = call i32 @exit(i32 1)
unreachable
167: ; preds = %159
%168 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: swap_super device\0A\00"
@O_RDWR = global i32 0
@BLKGETSIZE = global i32 0
@.str.1 = [11 x i8] c"BLKGETSIZE\00"
@.str.2 = [8 x i8] c"lseek64\00"
@.str.3 = [5 x i8] c"read\00"
@.str.4 = [6 x i8] c"write\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = alloca [4096 x i8]
%5 = bitcast i64* %3 to i8*
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%7 = icmp eq i32 %0, 2
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = load i32, i32* @O_RDWR
%16 = tail call i32 @open(i8* %14, i32 %15)
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %12
%19 = load i8*, i8** %13
%20 = tail call i32 @perror(i8* %19)
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %12
%23 = load i32, i32* @BLKGETSIZE
%24 = call i64 @ioctl(i32 %16, i32 %23, i64* %3)
%25 = icmp eq i64 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %22
%30 = load i64, i64* %3
%31 = shl i64 %30, 9
%32 = add i64 %31, -65536
%33 = and i64 %32, -65536
%34 = call i64 @lseek64(i32 %16, i64 %33, i32 0)
%35 = icmp slt i64 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %29
%37 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%38 = call i32 @exit(i32 1)
unreachable
39: ; preds = %29
%40 = call i32 @read(i32 %16, i8* %6, i32 4096)
%41 = icmp eq i32 %40, 4096
br i1 %41, label %45, label %42
42: ; preds = %39
%43 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %39, %45
%46 = phi i64 [ %58, %45 ], [ 0, %39 ]
%47 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = or i64 %46, 3
%50 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 %49
%51 = load i8, i8* %50
store i8 %51, i8* %47
store i8 %48, i8* %50
%52 = or i64 %46, 1
%53 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = or i64 %46, 2
%56 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 %55
%57 = load i8, i8* %56
store i8 %57, i8* %53
store i8 %54, i8* %56
%58 = add nuw nsw i64 %46, 4
%59 = icmp ult i64 %46, 4092
br i1 %59, label %45, label %60
60: ; preds = %45
%61 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 156
%62 = bitcast i8* %61 to <16 x i8>*
%63 = load <16 x i8>, <16 x i8>* %62
%64 = shufflevector <16 x i8> %63, <16 x i8> poison, <16 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15, i32 8, i32 9, i32 10, i32 11>
%65 = bitcast i8* %61 to <16 x i8>*
store <16 x i8> %64, <16 x i8>* %65
%66 = call i64 @lseek64(i32 %16, i64 %33, i32 0)
%67 = icmp slt i64 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %60
%69 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%70 = call i32 @exit(i32 1)
unreachable
71: ; preds = %60
%72 = call i32 @write(i32 %16, i8* %6, i32 4096)
%73 = icmp eq i32 %72, 4096
br i1 %73, label %77, label %74
74: ; preds = %71
%75 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%76 = call i32 @exit(i32 1)
unreachable
77: ; preds = %71
%78 = call i32 @exit(i32 0)
unreachable
}