#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 LZSSExtract(unsigned char *, int, int);
int /*<<< orphan*/ MAP_PRIVATE;
int O_CREAT;
int /*<<< orphan*/ O_RDONLY;
int O_RDWR;
int O_TRUNC;
int /*<<< orphan*/ PROT_READ;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ S_IRWXU;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
unsigned char *mmap(int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                    int /*<<< orphan*/, int, int /*<<< orphan*/);
int open(char *, int, ...);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char *argv[]) {
  int infd, outfd;
  unsigned char *InputBuffer;
  int InputBufferSize;
  if (argc != 3) {
    printf("usage: %s <input file> <output file>\n", argv[0]);
    return 1;
  }
  infd = open(argv[1], O_RDONLY);
  if (infd < 0) {
    fprintf(stderr, "Error: Failed to open %s: %s\n", argv[1], strerror(errno));
    return 1;
  }
  InputBufferSize = lseek(infd, 0, SEEK_END);
  if (InputBufferSize < 0) {
    fprintf(stderr, "Error: Failed to lseek \"%s\": %s\n", argv[1],
            strerror(errno));
    return 1;
  }
  InputBuffer = mmap(NULL, InputBufferSize, PROT_READ, MAP_PRIVATE, infd, 0);
  if (InputBuffer < 0) {
    fprintf(stderr, "Error: Failed to mmap %s: %s\n", argv[1], strerror(errno));
    return 1;
  }
  if (InputBufferSize < 0x52) {
    fprintf(stderr, "Error: \"%s\" is too small tp be a BCPVPD file.\n",
            argv[1]);
    return 1;
  }
  if (strncmp((char *)InputBuffer, "BCPVPD", 7)) {
    fprintf(stderr, "Error: unable to find BCPVPD header in \"%s\".\n",
            argv[1]);
    return 1;
  }
  outfd = open(argv[2], O_RDWR | O_TRUNC | O_CREAT, S_IRWXU);
  if (outfd == -1) {
    fprintf(stderr, "Error: Failed to open \"%s\": %s\n", argv[2],
            strerror(errno));
    return 1;
  }
  return LZSSExtract(InputBuffer + 0x52, InputBufferSize - 0x52, outfd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11bf <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe52(%rip),%rdi
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1080 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    122e <main+0xae>
mov    0x2dbd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rdx
mov    %rax,%rcx
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
mov    -0x14(%rbp),%edi
mov    0x2d88(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1298 <main+0x118>
mov    0x2d53(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%rdx
mov    %rax,%rcx
lea    0xdbf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
mov    -0x24(%rbp),%esi
mov    0x2d46(%rip),%rax
mov    (%rax),%edx
mov    0x2ced(%rip),%rax
mov    (%rax),%ecx
mov    -0x14(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1316 <main+0x196>
mov    0x2cd5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x50(%rbp)
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x54(%rbp),%edi
mov    -0x50(%rbp),%rdx
mov    %rax,%rcx
lea    0xd62(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
cmpl   $0x52,-0x24(%rbp)
jge    134b <main+0x1cb>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd4b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
mov    -0x20(%rbp),%rdi
lea    0xd5c(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1395 <main+0x215>
mov    0x2c37(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd37(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0x2c24(%rip),%rax
mov    (%rax),%esi
mov    0x2c43(%rip),%rax
or     (%rax),%esi
mov    0x2c42(%rip),%rax
or     (%rax),%esi
mov    0x2c11(%rip),%rax
mov    (%rax),%edx
mov    $0x0,%al
call   1080 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    141f <main+0x29f>
mov    0x2bcc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x60(%rbp)
mov    0x2bac(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x64(%rbp),%edi
mov    -0x60(%rbp),%rdx
mov    %rax,%rcx
lea    0xcdb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2b8>
mov    -0x20(%rbp),%rdi
add    $0x52,%rdi
mov    -0x24(%rbp),%esi
sub    $0x52,%esi
mov    -0x18(%rbp),%edx
call   10a0 <LZSSExtract@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    120b <main+0x8b>
mov    0x8(%rbx),%rdi
mov    0x2e1e(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1080 <open@plt>
test   %eax,%eax
js     121f <main+0x9f>
mov    %eax,%ebp
mov    0x2e10(%rip),%rax
mov    (%rax),%edx
mov    %ebp,%edi
xor    %esi,%esi
call   1060 <lseek@plt>
test   %eax,%eax
js     1243 <main+0xc3>
mov    %eax,%r15d
mov    0x2e1b(%rip),%rax
mov    (%rax),%edx
mov    0x2dc2(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    %r15d,%esi
mov    %ebp,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
cmp    $0x51,%r15d
ja     1276 <main+0xf6>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xe5f(%rip),%rsi
jmp    12a6 <main+0x126>
mov    (%rbx),%rsi
lea    0xdeb(%rip),%rdi
call   1050 <printf@plt>
jmp    12ad <main+0x12d>
mov    0x2d82(%rip),%rax
mov    (%rax),%ebp
mov    0x8(%rbx),%rbx
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xde5(%rip),%rsi
jmp    1265 <main+0xe5>
mov    0x2d5e(%rip),%rax
mov    (%rax),%ebp
mov    0x8(%rbx),%rbx
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xddf(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    12ad <main+0x12d>
mov    %rax,%r14
lea    0xe14(%rip),%rsi
mov    %rax,%rdi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12bd <main+0x13d>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xdf5(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%rbx),%rdi
mov    0x2d00(%rip),%rax
mov    0x2d21(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2d1e(%rip),%rax
or     (%rax),%esi
mov    0x2ced(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
call   1080 <open@plt>
cmp    $0xffffffff,%eax
je     1310 <main+0x190>
add    $0x52,%r14
add    $0xffffffae,%r15d
mov    %r14,%rdi
mov    %r15d,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <LZSSExtract@plt>
mov    0x2c91(%rip),%rax
mov    (%rax),%ebp
mov    0x10(%rbx),%rbx
mov    0x2c7c(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xd97(%rip),%rsi
jmp    1265 <main+0xe5>

LLVM IR (-O0):
@.str = [38 x i8] c"usage: %s <input file> <output file>\0A\00"
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str.1 = [30 x i8] c"Error: Failed to open %s: %s\0A\00"
@errno = global i32 0
@SEEK_END = global i32 0
@.str.2 = [33 x i8] c"Error: Failed to lseek \22%s\22: %s\0A\00"
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
@.str.3 = [30 x i8] c"Error: Failed to mmap %s: %s\0A\00"
@.str.4 = [47 x i8] c"Error: \22%s\22 is too small tp be a BCPVPD file.\0A\00"
@.str.5 = [7 x i8] c"BCPVPD\00"
@.str.6 = [46 x i8] c"Error: unable to find BCPVPD header in \22%s\22.\0A\00"
@O_RDWR = global i32 0
@O_TRUNC = global i32 0
@O_CREAT = global i32 0
@S_IRWXU = global i32 0
@.str.7 = [32 x i8] c"Error: Failed to open \22%s\22: %s\0A\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 i8*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 3
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 1, i32* %3
br label %110
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = load i32, i32* @O_RDONLY
%22 = call i32 (i8*, i32, ...) @open(i8* %20, i32 %21)
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %33
25: ; preds = %17
%26 = load i32, i32* @stderr
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = load i32, i32* @errno
%31 = call i8* @strerror(i32 %30)
%32 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %29, i8* %31)
store i32 1, i32* %3
br label %110
33: ; preds = %17
%34 = load i32, i32* %6
%35 = load i32, i32* @SEEK_END
%36 = call i32 @lseek(i32 %34, i32 0, i32 %35)
store i32 %36, i32* %9
%37 = load i32, i32* %9
%38 = icmp slt i32 %37, 0
br i1 %38, label %39, label %47
39: ; preds = %33
%40 = load i32, i32* @stderr
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = load i32, i32* @errno
%45 = call i8* @strerror(i32 %44)
%46 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %43, i8* %45)
store i32 1, i32* %3
br label %110
47: ; preds = %33
%48 = load i32, i32* %9
%49 = load i32, i32* @PROT_READ
%50 = load i32, i32* @MAP_PRIVATE
%51 = load i32, i32* %6
%52 = call i8* @mmap(i32* null, i32 %48, i32 %49, i32 %50, i32 %51, i32 0)
store i8* %52, i8** %8
%53 = load i8*, i8** %8
%54 = icmp ult i8* %53, null
br i1 %54, label %55, label %63
55: ; preds = %47
%56 = load i32, i32* @stderr
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 1
%59 = load i8*, i8** %58
%60 = load i32, i32* @errno
%61 = call i8* @strerror(i32 %60)
%62 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %59, i8* %61)
store i32 1, i32* %3
br label %110
63: ; preds = %47
%64 = load i32, i32* %9
%65 = icmp slt i32 %64, 82
br i1 %65, label %66, label %72
66: ; preds = %63
%67 = load i32, i32* @stderr
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 1
%70 = load i8*, i8** %69
%71 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), i8* %70)
store i32 1, i32* %3
br label %110
72: ; preds = %63
%73 = load i8*, i8** %8
%74 = call i64 @strncmp(i8* %73, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 7)
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %82
76: ; preds = %72
%77 = load i32, i32* @stderr
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 1
%80 = load i8*, i8** %79
%81 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i8* %80)
store i32 1, i32* %3
br label %110
82: ; preds = %72
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 2
%85 = load i8*, i8** %84
%86 = load i32, i32* @O_RDWR
%87 = load i32, i32* @O_TRUNC
%88 = or i32 %86, %87
%89 = load i32, i32* @O_CREAT
%90 = or i32 %88, %89
%91 = load i32, i32* @S_IRWXU
%92 = call i32 (i8*, i32, ...) @open(i8* %85, i32 %90, i32 %91)
store i32 %92, i32* %7
%93 = load i32, i32* %7
%94 = icmp eq i32 %93, -1
br i1 %94, label %95, label %103
95: ; preds = %82
%96 = load i32, i32* @stderr
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 2
%99 = load i8*, i8** %98
%100 = load i32, i32* @errno
%101 = call i8* @strerror(i32 %100)
%102 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8* %99, i8* %101)
store i32 1, i32* %3
br label %110
103: ; preds = %82
%104 = load i8*, i8** %8
%105 = getelementptr inbounds i8, i8* %104, i64 82
%106 = load i32, i32* %9
%107 = sub nsw i32 %106, 82
%108 = load i32, i32* %7
%109 = call i32 @LZSSExtract(i8* %105, i32 %107, i32 %108)
store i32 %109, i32* %3
br label %110
110: ; preds = %103, %95, %76, %66, %55, %39, %25, %12
%111 = load i32, i32* %3
ret i32 %111
}

LLVM IR (-O2):
@.str = [38 x i8] c"usage: %s <input file> <output file>\0A\00"
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str.1 = [30 x i8] c"Error: Failed to open %s: %s\0A\00"
@errno = global i32 0
@SEEK_END = global i32 0
@.str.2 = [33 x i8] c"Error: Failed to lseek \22%s\22: %s\0A\00"
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
@.str.4 = [47 x i8] c"Error: \22%s\22 is too small tp be a BCPVPD file.\0A\00"
@.str.5 = [7 x i8] c"BCPVPD\00"
@.str.6 = [46 x i8] c"Error: unable to find BCPVPD header in \22%s\22.\0A\00"
@O_RDWR = global i32 0
@O_TRUNC = global i32 0
@O_CREAT = global i32 0
@S_IRWXU = global i32 0
@.str.7 = [32 x i8] c"Error: Failed to open \22%s\22: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %66
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = load i32, i32* @O_RDONLY
%11 = tail call i32 (i8*, i32, ...) @open(i8* %9, i32 %10)
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %7
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %8
%16 = load i32, i32* @errno
%17 = tail call i8* @strerror(i32 %16)
%18 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %15, i8* %17)
br label %66
19: ; preds = %7
%20 = load i32, i32* @SEEK_END
%21 = tail call i32 @lseek(i32 %11, i32 0, i32 %20)
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %29
23: ; preds = %19
%24 = load i32, i32* @stderr
%25 = load i8*, i8** %8
%26 = load i32, i32* @errno
%27 = tail call i8* @strerror(i32 %26)
%28 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %25, i8* %27)
br label %66
29: ; preds = %19
%30 = load i32, i32* @PROT_READ
%31 = load i32, i32* @MAP_PRIVATE
%32 = tail call i8* @mmap(i32* null, i32 %21, i32 %30, i32 %31, i32 %11, i32 0)
%33 = icmp ult i32 %21, 82
br i1 %33, label %34, label %38
34: ; preds = %29
%35 = load i32, i32* @stderr
%36 = load i8*, i8** %8
%37 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), i8* %36)
br label %66
38: ; preds = %29
%39 = tail call i64 @strncmp(i8* %32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 7)
%40 = icmp eq i64 %39, 0
br i1 %40, label %45, label %41
41: ; preds = %38
%42 = load i32, i32* @stderr
%43 = load i8*, i8** %8
%44 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i8* %43)
br label %66
45: ; preds = %38
%46 = getelementptr inbounds i8*, i8** %1, i64 2
%47 = load i8*, i8** %46
%48 = load i32, i32* @O_RDWR
%49 = load i32, i32* @O_TRUNC
%50 = or i32 %49, %48
%51 = load i32, i32* @O_CREAT
%52 = or i32 %50, %51
%53 = load i32, i32* @S_IRWXU
%54 = tail call i32 (i8*, i32, ...) @open(i8* %47, i32 %52, i32 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %62
56: ; preds = %45
%57 = load i32, i32* @stderr
%58 = load i8*, i8** %46
%59 = load i32, i32* @errno
%60 = tail call i8* @strerror(i32 %59)
%61 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8* %58, i8* %60)
br label %66
62: ; preds = %45
%63 = getelementptr inbounds i8, i8* %32, i64 82
%64 = add nsw i32 %21, -82
%65 = tail call i32 @LZSSExtract(i8* %63, i32 %64, i32 %54)
br label %66
66: ; preds = %62, %56, %41, %34, %23, %13, %4
%67 = phi i32 [ 1, %4 ], [ 1, %13 ], [ 1, %23 ], [ 1, %34 ], [ 1, %41 ], [ 1, %56 ], [ %65, %62 ]
ret i32 %67
}