#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*/ EXIT_FAILURE;
scalar_t__ copy_hunk(int /*<<< orphan*/ *, int /*<<< orphan*/ *, unsigned long,
                     unsigned long);
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *,
                         char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int getline(char **, size_t *, int /*<<< orphan*/ *);
scalar_t__ read_atatline(char *, unsigned long *, unsigned long *,
                         unsigned long *, unsigned long *);
char *strchr(char *, char);
int /*<<< orphan*/ strcspn(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strspn(char *, char *);
unsigned long adjust_offsets_and_copy(long *offset, FILE *in, FILE *out) {
  char *line = NULL;
  size_t linelen = 0;
  unsigned long orig_offset, orig_lines, new_offset, new_lines;
  unsigned long count = 0;
  char *trailing;
  if (getline(&line, &linelen, in) == -1)
    goto out;
  count++;
  if (!strncmp(line, "--- ", 4)) {
    fputs(line, out);
    if (getline(&line, &linelen, in) == -1)
      goto out;
    count++;
    fputs(line, out);
    if (getline(&line, &linelen, in) == -1)
      goto out;
    count++;
    *offset = 0;
  }
  if (read_atatline(line, &orig_offset, &orig_lines, &new_offset, &new_lines)) {
    line[strlen(line) - 1] = '\0';
    error(EXIT_FAILURE, 0, "Line not understood: %s", line);
  }
  trailing = strchr(line, '+');
  trailing += strcspn(trailing, " \n");
  if (*trailing == ' ')
    trailing++;
  trailing += strspn(trailing, "@");
  fprintf(out, "@@ -%lu", orig_offset);
  if (orig_lines != 1)
    fprintf(out, ",%lu", orig_lines);
  fprintf(out, " +%lu", new_offset + *offset);
  if (new_lines != 1)
    fprintf(out, ",%lu", new_lines);
  fprintf(out, " @@%s", trailing);
  free(line);
  count += copy_hunk(in, out, orig_lines, new_lines);
out:
  return count;
}


x86 assembly (clang, -O0):
<adjust_offsets_and_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x50(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
jne    120b <adjust_offsets_and_copy+0x4b>
jmp    142e <adjust_offsets_and_copy+0x26e>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xdde(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    12b0 <adjust_offsets_and_copy+0xf0>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <fputs@plt>
mov    -0x10(%rbp),%rdx
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
jne    1261 <adjust_offsets_and_copy+0xa1>
jmp    142e <adjust_offsets_and_copy+0x26e>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <fputs@plt>
mov    -0x10(%rbp),%rdx
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
jne    1299 <adjust_offsets_and_copy+0xd9>
jmp    142e <adjust_offsets_and_copy+0x26e>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x40(%rbp),%rcx
lea    -0x48(%rbp),%r8
call   10c0 <read_atatline@plt>
cmp    $0x0,%rax
je     130f <adjust_offsets_and_copy+0x14f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    0x2ce5(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rcx
xor    %esi,%esi
lea    0xcfb(%rip),%rdx
call   10d0 <error@plt>
mov    -0x20(%rbp),%rdi
mov    $0x2b,%esi
call   1060 <strchr@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
lea    0xcf1(%rip),%rsi
call   10a0 <strcspn@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    135d <adjust_offsets_and_copy+0x19d>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
lea    0xcb8(%rip),%rsi
call   1090 <strspn@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xc96(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
cmpq   $0x1,-0x38(%rbp)
je     13b4 <adjust_offsets_and_copy+0x1f4>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xc7d(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x8(%rbp),%rax
add    (%rax),%rdx
lea    0xc65(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
cmpq   $0x1,-0x48(%rbp)
je     13f2 <adjust_offsets_and_copy+0x232>
mov    -0x18(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0xc3f(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x58(%rbp),%rdx
lea    0xc34(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x48(%rbp),%rcx
call   1080 <copy_hunk@plt>
add    -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust_offsets_and_copy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %r14,%rdx
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
je     1362 <adjust_offsets_and_copy+0x1a2>
mov    0x8(%rsp),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
mov    $0x1,%ebp
test   %eax,%eax
je     1373 <adjust_offsets_and_copy+0x1b3>
mov    0x8(%rsp),%rdi
lea    0x30(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x28(%rsp),%rcx
lea    0x18(%rsp),%r8
call   10c0 <read_atatline@plt>
test   %rax,%rax
je     127a <adjust_offsets_and_copy+0xba>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rsp),%rcx
lea    0xd92(%rip),%rdx
xor    %esi,%esi
call   10d0 <error@plt>
mov    0x8(%rsp),%rdi
mov    $0x2b,%esi
call   1060 <strchr@plt>
mov    %rax,%rbx
lea    0xd8a(%rip),%rsi
mov    %rax,%rdi
call   10a0 <strcspn@plt>
cltq
xor    %r13d,%r13d
cmpb   $0x20,(%rbx,%rax,1)
sete   %r13b
add    %rbx,%r13
add    %rax,%r13
lea    0xd6b(%rip),%rsi
mov    %r13,%rdi
call   1090 <strspn@plt>
movslq %eax,%rbx
mov    0x30(%rsp),%rdx
lea    0xd56(%rip),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x20(%rsp),%rdx
cmp    $0x1,%rdx
je     12f2 <adjust_offsets_and_copy+0x132>
lea    0xd42(%rip),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   10b0 <fprintf@plt>
add    %rbx,%r13
mov    (%r15),%rdx
add    0x28(%rsp),%rdx
lea    0xd2b(%rip),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x18(%rsp),%rdx
cmp    $0x1,%rdx
je     132a <adjust_offsets_and_copy+0x16a>
lea    0xd0a(%rip),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   10b0 <fprintf@plt>
lea    0xd04(%rip),%rsi
mov    %r12,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %r14,%rdi
mov    %r12,%rsi
call   1080 <copy_hunk@plt>
add    %rbp,%rax
jmp    1364 <adjust_offsets_and_copy+0x1a4>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x8(%rsp),%rdi
mov    %r12,%rsi
call   1070 <fputs@plt>
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %r14,%rdx
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
je     13cc <adjust_offsets_and_copy+0x20c>
mov    0x8(%rsp),%rdi
mov    %r12,%rsi
call   1070 <fputs@plt>
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %r14,%rdx
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
je     13d3 <adjust_offsets_and_copy+0x213>
movq   $0x0,(%r15)
mov    $0x3,%ebp
jmp    1227 <adjust_offsets_and_copy+0x67>
mov    $0x1,%eax
jmp    1364 <adjust_offsets_and_copy+0x1a4>
mov    $0x2,%eax
jmp    1364 <adjust_offsets_and_copy+0x1a4>

LLVM IR (-O0):
@.str = [5 x i8] c"--- \00"
@EXIT_FAILURE = global i32 0
@.str.1 = [24 x i8] c"Line not understood: %s\00"
@.str.2 = [3 x i8] c" \0A\00"
@.str.3 = [2 x i8] c"@\00"
@.str.4 = [8 x i8] c"@@ -%lu\00"
@.str.5 = [5 x i8] c",%lu\00"
@.str.6 = [6 x i8] c" +%lu\00"
@.str.7 = [6 x i8] c" @@%s\00"
define i64 @adjust_offsets_and_copy(i64* %0, i32* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i8*
store i64* %0, i64** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
store i8* null, i8** %7
store i64 0, i64* %8
store i64 0, i64* %13
%15 = load i32*, i32** %5
%16 = call i32 @getline(i8** %7, i64* %8, i32* %15)
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %19
18: ; preds = %3
br label %117
19: ; preds = %3
%20 = load i64, i64* %13
%21 = add i64 %20, 1
store i64 %21, i64* %13
%22 = load i8*, i8** %7
%23 = call i32 @strncmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%24 = icmp ne i32 %23, 0
br i1 %24, label %47, label %25
25: ; preds = %19
%26 = load i8*, i8** %7
%27 = load i32*, i32** %6
%28 = call i32 @fputs(i8* %26, i32* %27)
%29 = load i32*, i32** %5
%30 = call i32 @getline(i8** %7, i64* %8, i32* %29)
%31 = icmp eq i32 %30, -1
br i1 %31, label %32, label %33
32: ; preds = %25
br label %117
33: ; preds = %25
%34 = load i64, i64* %13
%35 = add i64 %34, 1
store i64 %35, i64* %13
%36 = load i8*, i8** %7
%37 = load i32*, i32** %6
%38 = call i32 @fputs(i8* %36, i32* %37)
%39 = load i32*, i32** %5
%40 = call i32 @getline(i8** %7, i64* %8, i32* %39)
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %43
42: ; preds = %33
br label %117
43: ; preds = %33
%44 = load i64, i64* %13
%45 = add i64 %44, 1
store i64 %45, i64* %13
%46 = load i64*, i64** %4
store i64 0, i64* %46
br label %47
47: ; preds = %43, %19
%48 = load i8*, i8** %7
%49 = call i64 @read_atatline(i8* %48, i64* %9, i64* %10, i64* %11, i64* %12)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %61
51: ; preds = %47
%52 = load i8*, i8** %7
%53 = load i8*, i8** %7
%54 = call i32 @strlen(i8* %53)
%55 = sub nsw i32 %54, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %52, i64 %56
store i8 0, i8* %57
%58 = load i32, i32* @EXIT_FAILURE
%59 = load i8*, i8** %7
%60 = call i32 @error(i32 %58, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %59)
br label %61
61: ; preds = %51, %47
%62 = load i8*, i8** %7
%63 = call i8* @strchr(i8* %62, i8 signext 43)
store i8* %63, i8** %14
%64 = load i8*, i8** %14
%65 = call i32 @strcspn(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%66 = load i8*, i8** %14
%67 = sext i32 %65 to i64
%68 = getelementptr inbounds i8, i8* %66, i64 %67
store i8* %68, i8** %14
%69 = load i8*, i8** %14
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp eq i32 %71, 32
br i1 %72, label %73, label %76
73: ; preds = %61
%74 = load i8*, i8** %14
%75 = getelementptr inbounds i8, i8* %74, i32 1
store i8* %75, i8** %14
br label %76
76: ; preds = %73, %61
%77 = load i8*, i8** %14
%78 = call i32 @strspn(i8* %77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%79 = load i8*, i8** %14
%80 = sext i32 %78 to i64
%81 = getelementptr inbounds i8, i8* %79, i64 %80
store i8* %81, i8** %14
%82 = load i32*, i32** %6
%83 = load i64, i64* %9
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %82, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 %83)
%85 = load i64, i64* %10
%86 = icmp ne i64 %85, 1
br i1 %86, label %87, label %91
87: ; preds = %76
%88 = load i32*, i32** %6
%89 = load i64, i64* %10
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %89)
br label %91
91: ; preds = %87, %76
%92 = load i32*, i32** %6
%93 = load i64, i64* %11
%94 = load i64*, i64** %4
%95 = load i64, i64* %94
%96 = add i64 %93, %95
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i64 %96)
%98 = load i64, i64* %12
%99 = icmp ne i64 %98, 1
br i1 %99, label %100, label %104
100: ; preds = %91
%101 = load i32*, i32** %6
%102 = load i64, i64* %12
%103 = call i32 (i32*, i8*, ...) @fprintf(i32* %101, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %102)
br label %104
104: ; preds = %100, %91
%105 = load i32*, i32** %6
%106 = load i8*, i8** %14
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %106)
%108 = load i8*, i8** %7
%109 = call i32 @free(i8* %108)
%110 = load i32*, i32** %5
%111 = load i32*, i32** %6
%112 = load i64, i64* %10
%113 = load i64, i64* %12
%114 = call i64 @copy_hunk(i32* %110, i32* %111, i64 %112, i64 %113)
%115 = load i64, i64* %13
%116 = add i64 %115, %114
store i64 %116, i64* %13
br label %117
117: ; preds = %104, %42, %32, %18
%118 = load i64, i64* %13
ret i64 %118
}

LLVM IR (-O2):
@.str = [5 x i8] c"--- \00"
@EXIT_FAILURE = global i32 0
@.str.1 = [24 x i8] c"Line not understood: %s\00"
@.str.2 = [3 x i8] c" \0A\00"
@.str.3 = [2 x i8] c"@\00"
@.str.4 = [8 x i8] c"@@ -%lu\00"
@.str.5 = [5 x i8] c",%lu\00"
@.str.6 = [6 x i8] c" +%lu\00"
@.str.7 = [6 x i8] c" @@%s\00"
define i64 @adjust_offsets_and_copy(i64* nocapture %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%11 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%12 = bitcast i64* %6 to i8*
%13 = bitcast i64* %7 to i8*
%14 = bitcast i64* %8 to i8*
%15 = bitcast i64* %9 to i8*
%16 = call i32 @getline(i8** %4, i64* %5, i32* %1)
%17 = icmp eq i32 %16, -1
br i1 %17, label %83, label %18
18: ; preds = %3
%19 = load i8*, i8** %4
%20 = call i32 @strncmp(i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %33
22: ; preds = %18
%23 = load i8*, i8** %4
%24 = call i32 @fputs(i8* %23, i32* %2)
%25 = call i32 @getline(i8** %4, i64* %5, i32* %1)
%26 = icmp eq i32 %25, -1
br i1 %26, label %83, label %27
27: ; preds = %22
%28 = load i8*, i8** %4
%29 = call i32 @fputs(i8* %28, i32* %2)
%30 = call i32 @getline(i8** %4, i64* %5, i32* %1)
%31 = icmp eq i32 %30, -1
br i1 %31, label %83, label %32
32: ; preds = %27
store i64 0, i64* %0
br label %33
33: ; preds = %32, %18
%34 = phi i64 [ 1, %18 ], [ 3, %32 ]
%35 = load i8*, i8** %4
%36 = call i64 @read_atatline(i8* %35, i64* %6, i64* %7, i64* %8, i64* %9)
%37 = icmp eq i64 %36, 0
br i1 %37, label %47, label %38
38: ; preds = %33
%39 = load i8*, i8** %4
%40 = call i32 @strlen(i8* %39)
%41 = add nsw i32 %40, -1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %39, i64 %42
store i8 0, i8* %43
%44 = load i32, i32* @EXIT_FAILURE
%45 = load i8*, i8** %4
%46 = call i32 @error(i32 %44, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %45)
br label %47
47: ; preds = %38, %33
%48 = load i8*, i8** %4
%49 = call i8* @strchr(i8* dereferenceable(1) %48, i8 signext 43)
%50 = call i32 @strcspn(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = load i8, i8* %52
%54 = icmp eq i8 %53, 32
%55 = zext i1 %54 to i64
%56 = getelementptr i8, i8* %52, i64 %55
%57 = call i32 @strspn(i8* %56, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %56, i64 %58
%60 = load i64, i64* %6
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 %60)
%62 = load i64, i64* %7
%63 = icmp eq i64 %62, 1
br i1 %63, label %66, label %64
64: ; preds = %47
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %62)
br label %66
66: ; preds = %64, %47
%67 = load i64, i64* %8
%68 = load i64, i64* %0
%69 = add i64 %68, %67
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i64 %69)
%71 = load i64, i64* %9
%72 = icmp eq i64 %71, 1
br i1 %72, label %75, label %73
73: ; preds = %66
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %71)
br label %75
75: ; preds = %73, %66
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %59)
%77 = load i8*, i8** %4
%78 = call i32 @free(i8* %77)
%79 = load i64, i64* %7
%80 = load i64, i64* %9
%81 = call i64 @copy_hunk(i32* %1, i32* %2, i64 %79, i64 %80)
%82 = add i64 %81, %34
br label %83
83: ; preds = %27, %22, %3, %75
%84 = phi i64 [ 0, %3 ], [ %82, %75 ], [ 1, %22 ], [ 2, %27 ]
ret i64 %84
}