#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, unsigned int,
                         int /*<<< orphan*/);
int /*<<< orphan*/ ftruncate(int /*<<< orphan*/, unsigned int);
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
void main(int argc, char *argv[]) {
  FILE *in = fopen(argv[1], "r+");
  int i;
  unsigned char csum = 0;
  unsigned char buf[32768];
  unsigned char *dptr = buf;
  unsigned int scount;
  if (in == 0) {
    printf("\nФайл не найден\n");
    return;
  }
  for (scount = 0;; scount++) {
    fread(dptr, 1, 256, in);
    if (feof(in))
      break;
    dptr += 256;
  }
  printf("\n Размер файла - %i блоков,", scount);
  scount *= 256;
  printf(" %i байт", scount);
  for (i = 0; i < (scount - 1); i++)
    csum += buf[i];
  csum = 0xff - csum;
  printf("\n Контрольная сумма - %02x\n", csum);
  fseek(in, scount - 1, SEEK_SET);
  fwrite(&csum, 1, 1, in);
  ftruncate(fileno(in), scount);
  fclose(in);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8030,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe4f(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
movb   $0x0,-0x1d(%rbp)
lea    -0x8020(%rbp),%rax
mov    %rax,-0x8028(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11ea <main+0x5a>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1331 <main+0x1a1>
movl   $0x0,-0x802c(%rbp)
mov    -0x8028(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x100,%edx
call   1030 <fread@plt>
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     1226 <main+0x96>
jmp    124e <main+0xbe>
mov    -0x8028(%rbp),%rax
add    $0x100,%rax
mov    %rax,-0x8028(%rbp)
mov    -0x802c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x802c(%rbp)
jmp    11f4 <main+0x64>
mov    -0x802c(%rbp),%esi
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x802c(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x802c(%rbp)
mov    -0x802c(%rbp),%esi
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x802c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    12c3 <main+0x133>
movslq -0x1c(%rbp),%rax
movzbl -0x8020(%rbp,%rax,1),%ecx
ff
movzbl -0x1d(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x1d(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    128c <main+0xfc>
movzbl -0x1d(%rbp),%ecx
mov    $0xff,%eax
sub    %ecx,%eax
mov    %al,-0x1d(%rbp)
movzbl -0x1d(%rbp),%esi
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x802c(%rbp),%esi
sub    $0x1,%esi
mov    0x2ce9(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   10b0 <fwrite@plt>
mov    -0x18(%rbp),%rdi
call   1080 <fileno@plt>
mov    %eax,%edi
mov    -0x802c(%rbp),%esi
call   1060 <ftruncate@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x8030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x8008,%rsp
mov    0x8(%rsi),%rdi
lea    0xe47(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     138e <main+0x1ee>
mov    %rax,%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x100,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
mov    %r14,%rdi
call   1090 <feof@plt>
xor    %r15d,%r15d
test   %rax,%rax
jne    122d <main+0x8d>
lea    0x100(%rsp),%r12
xor    %r15d,%r15d
nopl   (%rax)
add    $0x1,%r15d
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x100,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
mov    %r14,%rdi
call   1090 <feof@plt>
add    $0x100,%r12
test   %rax,%rax
je     1200 <main+0x60>
lea    0xdcf(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
shl    $0x8,%r15d
lea    0xde7(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    -0x1(%r15),%r12d
lea    -0x40(%r15),%eax
shr    $0x5,%eax
and    $0xfffffffc,%eax
pxor   %xmm0,%xmm0
pxor   %xmm1,%xmm1
nopl   0x0(%rax)
paddb  (%rbx),%xmm0
paddb  0x10(%rbx),%xmm1
paddb  0x20(%rbx),%xmm0
paddb  0x30(%rbx),%xmm1
paddb  0x40(%rbx),%xmm0
paddb  0x50(%rbx),%xmm1
paddb  0x60(%rbx),%xmm0
paddb  0x70(%rbx),%xmm1
sub    $0xffffffffffffff80,%rbx
add    $0xfffffffffffffffc,%rax
jne    1270 <main+0xd0>
mov    $0x10,%eax
cs nopw 0x0(%rax,%rax,1)
paddb  -0x10(%rbx,%rax,1),%xmm0
paddb  (%rbx,%rax,1),%xmm1
add    $0x20,%rax
cmp    $0x70,%rax
jne    12b0 <main+0x110>
movq   -0xf(%rsp,%r12,1),%xmm2
movq   -0x17(%rsp,%r12,1),%xmm3
movq   -0x1f(%rsp,%r12,1),%xmm4
paddb  %xmm3,%xmm4
paddb  %xmm2,%xmm4
paddb  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddb  %xmm1,%xmm0
pxor   %xmm1,%xmm1
psadbw %xmm1,%xmm0
punpcklbw %xmm1,%xmm0
punpcklwd %xmm1,%xmm0
punpckldq %xmm1,%xmm0
paddb  %xmm4,%xmm0
psadbw %xmm1,%xmm0
movd   %xmm0,%eax
add    -0x7(%rsp,%r12,1),%al
add    -0x6(%rsp,%r12,1),%al
add    -0x5(%rsp,%r12,1),%al
add    -0x4(%rsp,%r12,1),%al
add    -0x3(%rsp,%r12,1),%al
add    -0x2(%rsp,%r12,1),%al
add    -0x1(%rsp,%r12,1),%al
not    %al
movzbl %al,%ebx
lea    0xcff(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c92(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12d,%esi
call   10b0 <fseek@plt>
movsbl %bl,%edi
mov    %r14,%rsi
call   1080 <fputc@plt>
mov    %r14,%rdi
call   10a0 <fileno@plt>
mov    %eax,%edi
mov    %r15d,%esi
call   1070 <ftruncate@plt>
mov    %r14,%rdi
add    $0x8008,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <fclose@plt>
lea    0xcd4(%rip),%rdi
add    $0x8008,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"r+\00"
@.str.1 = [29 x i8] c"\0A\D0\A4\D0\B0\D0\B9\D0\BB \D0\BD\D0\B5 \D0\BD\D0\B0\D0\B9\D0\B4\D0\B5\D0\BD\0A\00"
@.str.2 = [45 x i8] c"\0A \D0\A0\D0\B0\D0\B7\D0\BC\D0\B5\D1\80 \D1\84\D0\B0\D0\B9\D0\BB\D0\B0 - %i \D0\B1\D0\BB\D0\BE\D0\BA\D0\BE\D0\B2,\00"
@.str.3 = [13 x i8] c" %i \D0\B1\D0\B0\D0\B9\D1\82\00"
@.str.4 = [44 x i8] c"\0A \D0\9A\D0\BE\D0\BD\D1\82\D1\80\D0\BE\D0\BB\D1\8C\D0\BD\D0\B0\D1\8F \D1\81\D1\83\D0\BC\D0\BC\D0\B0 - %02x\0A\00"
@SEEK_SET = global i32 0
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8
%8 = alloca [32768 x i8]
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %14, i32** %5
store i8 0, i8* %7
%15 = getelementptr inbounds [32768 x i8], [32768 x i8]* %8, i64 0, i64 0
store i8* %15, i8** %9
%16 = load i32*, i32** %5
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %81
20: ; preds = %2
store i32 0, i32* %10
br label %21
21: ; preds = %32, %20
%22 = load i8*, i8** %9
%23 = load i32*, i32** %5
%24 = call i32 @fread(i8* %22, i32 1, i32 256, i32* %23)
%25 = load i32*, i32** %5
%26 = call i64 @feof(i32* %25)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %21
br label %35
29: ; preds = %21
%30 = load i8*, i8** %9
%31 = getelementptr inbounds i8, i8* %30, i64 256
store i8* %31, i8** %9
br label %32
32: ; preds = %29
%33 = load i32, i32* %10
%34 = add i32 %33, 1
store i32 %34, i32* %10
br label %21
35: ; preds = %28
%36 = load i32, i32* %10
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %10
%39 = mul i32 %38, 256
store i32 %39, i32* %10
%40 = load i32, i32* %10
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %40)
store i32 0, i32* %6
br label %42
42: ; preds = %57, %35
%43 = load i32, i32* %6
%44 = load i32, i32* %10
%45 = sub i32 %44, 1
%46 = icmp ult i32 %43, %45
br i1 %46, label %47, label %60
47: ; preds = %42
%48 = load i32, i32* %6
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [32768 x i8], [32768 x i8]* %8, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = load i8, i8* %7
%54 = zext i8 %53 to i32
%55 = add nsw i32 %54, %52
%56 = trunc i32 %55 to i8
store i8 %56, i8* %7
br label %57
57: ; preds = %47
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 1
store i32 %59, i32* %6
br label %42
60: ; preds = %42
%61 = load i8, i8* %7
%62 = zext i8 %61 to i32
%63 = sub nsw i32 255, %62
%64 = trunc i32 %63 to i8
store i8 %64, i8* %7
%65 = load i8, i8* %7
%66 = zext i8 %65 to i32
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %66)
%68 = load i32*, i32** %5
%69 = load i32, i32* %10
%70 = sub i32 %69, 1
%71 = load i32, i32* @SEEK_SET
%72 = call i32 @fseek(i32* %68, i32 %70, i32 %71)
%73 = load i32*, i32** %5
%74 = call i32 @fwrite(i8* %7, i32 1, i32 1, i32* %73)
%75 = load i32*, i32** %5
%76 = call i32 @fileno(i32* %75)
%77 = load i32, i32* %10
%78 = call i32 @ftruncate(i32 %76, i32 %77)
%79 = load i32*, i32** %5
%80 = call i32 @fclose(i32* %79)
br label %81
81: ; preds = %60, %18
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"r+\00"
@.str.2 = [45 x i8] c"\0A \D0\A0\D0\B0\D0\B7\D0\BC\D0\B5\D1\80 \D1\84\D0\B0\D0\B9\D0\BB\D0\B0 - %i \D0\B1\D0\BB\D0\BE\D0\BA\D0\BE\D0\B2,\00"
@.str.3 = [13 x i8] c" %i \D0\B1\D0\B0\D0\B9\D1\82\00"
@.str.4 = [44 x i8] c"\0A \D0\9A\D0\BE\D0\BD\D1\82\D1\80\D0\BE\D0\BB\D1\8C\D0\BD\D0\B0\D1\8F \D1\81\D1\83\D0\BC\D0\BC\D0\B0 - %02x\0A\00"
@SEEK_SET = global i32 0
@str = [28 x i8] c"\0A\D0\A4\D0\B0\D0\B9\D0\BB \D0\BD\D0\B5 \D0\BD\D0\B0\D0\B9\D0\B4\D0\B5\D0\BD\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32768 x i8]
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%8 = icmp eq i32* %6, null
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = call i32 @fread(i8* %7, i32 1, i32 256, i32* %6)
%11 = tail call i64 @feof(i32* %6)
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %23
13: ; preds = %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %150
15: ; preds = %9, %15
%16 = phi i32 [ %19, %15 ], [ 0, %9 ]
%17 = phi i8* [ %18, %15 ], [ %7, %9 ]
%18 = getelementptr inbounds i8, i8* %17, i64 256
%19 = add i32 %16, 1
%20 = call i32 @fread(i8* %18, i32 1, i32 256, i32* %6)
%21 = tail call i64 @feof(i32* %6)
%22 = icmp eq i64 %21, 0
br i1 %22, label %15, label %23
23: ; preds = %15, %9
%24 = phi i32 [ 0, %9 ], [ %19, %15 ]
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = shl i32 %24, 8
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = add i32 %26, -1
%29 = zext i32 %28 to i64
%30 = add nsw i64 %29, -31
%31 = add nuw nsw i64 %29, 4294967233
%32 = lshr exact i64 %31, 5
%33 = and i64 %32, 134217724
br label %34
34: ; preds = %34, %23
%35 = phi i64 [ 0, %23 ], [ %74, %34 ]
%36 = phi <16 x i8> [ zeroinitializer, %23 ], [ %72, %34 ]
%37 = phi <16 x i8> [ zeroinitializer, %23 ], [ %73, %34 ]
%38 = phi i64 [ 0, %23 ], [ %75, %34 ]
%39 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %35
%40 = bitcast i8* %39 to <16 x i8>*
%41 = load <16 x i8>, <16 x i8>* %40
%42 = getelementptr inbounds i8, i8* %39, i64 16
%43 = bitcast i8* %42 to <16 x i8>*
%44 = load <16 x i8>, <16 x i8>* %43
%45 = add <16 x i8> %41, %36
%46 = add <16 x i8> %44, %37
%47 = or i64 %35, 32
%48 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %47
%49 = bitcast i8* %48 to <16 x i8>*
%50 = load <16 x i8>, <16 x i8>* %49
%51 = getelementptr inbounds i8, i8* %48, i64 16
%52 = bitcast i8* %51 to <16 x i8>*
%53 = load <16 x i8>, <16 x i8>* %52
%54 = add <16 x i8> %50, %45
%55 = add <16 x i8> %53, %46
%56 = or i64 %35, 64
%57 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %56
%58 = bitcast i8* %57 to <16 x i8>*
%59 = load <16 x i8>, <16 x i8>* %58
%60 = getelementptr inbounds i8, i8* %57, i64 16
%61 = bitcast i8* %60 to <16 x i8>*
%62 = load <16 x i8>, <16 x i8>* %61
%63 = add <16 x i8> %59, %54
%64 = add <16 x i8> %62, %55
%65 = or i64 %35, 96
%66 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %65
%67 = bitcast i8* %66 to <16 x i8>*
%68 = load <16 x i8>, <16 x i8>* %67
%69 = getelementptr inbounds i8, i8* %66, i64 16
%70 = bitcast i8* %69 to <16 x i8>*
%71 = load <16 x i8>, <16 x i8>* %70
%72 = add <16 x i8> %68, %63
%73 = add <16 x i8> %71, %64
%74 = add nuw nsw i64 %35, 128
%75 = add nuw nsw i64 %38, 4
%76 = icmp eq i64 %75, %33
br i1 %76, label %77, label %34
77: ; preds = %34, %77
%78 = phi i64 [ %90, %77 ], [ %74, %34 ]
%79 = phi <16 x i8> [ %88, %77 ], [ %72, %34 ]
%80 = phi <16 x i8> [ %89, %77 ], [ %73, %34 ]
%81 = phi i64 [ %91, %77 ], [ 0, %34 ]
%82 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %78
%83 = bitcast i8* %82 to <16 x i8>*
%84 = load <16 x i8>, <16 x i8>* %83
%85 = getelementptr inbounds i8, i8* %82, i64 16
%86 = bitcast i8* %85 to <16 x i8>*
%87 = load <16 x i8>, <16 x i8>* %86
%88 = add <16 x i8> %84, %79
%89 = add <16 x i8> %87, %80
%90 = add nuw i64 %78, 32
%91 = add i64 %81, 1
%92 = icmp eq i64 %91, 3
br i1 %92, label %93, label %77
93: ; preds = %77
%94 = add nsw i64 %29, -7
%95 = add nsw i64 %29, -15
%96 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %95
%97 = bitcast i8* %96 to <8 x i8>*
%98 = load <8 x i8>, <8 x i8>* %97
%99 = add nsw i64 %29, -23
%100 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %99
%101 = bitcast i8* %100 to <8 x i8>*
%102 = load <8 x i8>, <8 x i8>* %101
%103 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %30
%104 = bitcast i8* %103 to <8 x i8>*
%105 = load <8 x i8>, <8 x i8>* %104
%106 = add <16 x i8> %89, %88
%107 = call i8 @llvm.vector.reduce.add.v16i8(<16 x i8> %106)
%108 = insertelement <8 x i8> <i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, i8 %107, i64 0
%109 = add <8 x i8> %105, %108
%110 = add <8 x i8> %102, %109
%111 = add <8 x i8> %98, %110
%112 = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> %111)
%113 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %94
%114 = load i8, i8* %113
%115 = add i8 %114, %112
%116 = add nsw i64 %29, -6
%117 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %116
%118 = load i8, i8* %117
%119 = add i8 %118, %115
%120 = add nsw i64 %29, -5
%121 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %120
%122 = load i8, i8* %121
%123 = add i8 %122, %119
%124 = add nsw i64 %29, -4
%125 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %124
%126 = load i8, i8* %125
%127 = add i8 %126, %123
%128 = add nsw i64 %29, -3
%129 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %128
%130 = load i8, i8* %129
%131 = add i8 %130, %127
%132 = add nsw i64 %29, -2
%133 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %132
%134 = load i8, i8* %133
%135 = add i8 %134, %131
%136 = add nsw i64 %29, -1
%137 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %136
%138 = load i8, i8* %137
%139 = add i8 %138, %135
%140 = xor i8 %139, -1
%141 = zext i8 %140 to i32
%142 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %141)
%143 = load i32, i32* @SEEK_SET
%144 = tail call i32 @fseek(i32* %6, i32 %28, i32 %143)
%145 = sext i8 %140 to i32
%146 = tail call i32 @fputc(i32 %145, i32* %6)
%147 = tail call i32 @fileno(i32* %6)
%148 = tail call i32 @ftruncate(i32 %147, i32 %26)
%149 = tail call i32 @fclose(i32* %6)
br label %150
150: ; preds = %93, %13
ret void
}