// File: cristian-bicheru[P]arith/./arith.h
// Function: arith::UncompressFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
CodecStatusCode UncompressFile(const std::string& InFile, const std::string& OutFile) {
        std::vector<unsigned char> CompressedBuffer;

        if (buffer::LoadFile(&InFile, CompressedBuffer)) {
            buffer::CodecByteStream UncompressedBuffer(0);
            try {
                arith::UncompressBuffer(UncompressedBuffer, CompressedBuffer);
            } catch (std::exception& e) {
                std::cerr << e.what() << std::endl;
                return BadCompressionStream;
            }

            if (buffer::SaveFile(UncompressedBuffer.GetBuffer(), &OutFile)) {
                return Success;
            } else {
                std::cerr << "File Write Error." << std::endl;
                return FileWriteError;
            }
        } else {
            std::cerr << "File Read Error." << std::endl;
            return FileReadError;
        }
    }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
leaq 0x88(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x5790
movq 0x30(%rsp), %rsi
movq 0xa8(%rsp), %rdi
callq 0x26a0
movb %al, 0x3b(%rsp)
jmp 0x3c51
movb 0x3b(%rsp), %al
testb $0x1, %al
jne 0x3c5e
jmp 0x3dfa
xorl %eax, %eax
movl %eax, %esi
leaq 0x48(%rsp), %rdi
callq 0x57a0
jmp 0x3c6e
leaq 0x48(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x39c0
jmp 0x3c82
jmp 0x3d5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x3e56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3dee
movq 0x80(%rsp), %rdi
callq 0x20b0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x1e2ff(%rip), %rdi     # 0x21fe8
callq 0x21a0
movq %rax, 0x28(%rsp)
jmp 0x3cf5
movq 0x28(%rsp), %rdi
movq 0x1e29f(%rip), %rsi     # 0x21fa0
callq 0x21d0
jmp 0x3d08
movl $0x3, 0xb4(%rsp)
movl $0x1, 0x3c(%rsp)
callq 0x22d0
jmp 0x3d3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x22d0
jmp 0x3d55
jmp 0x3de2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x3dee
jmp 0x3dee
leaq 0x48(%rsp), %rdi
callq 0x55f0
movq %rax, 0x20(%rsp)
jmp 0x3d6b
movq 0x20(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x2850
movb %al, 0x1f(%rsp)
jmp 0x3d83
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x3d8d
jmp 0x3da2
movl $0x0, 0xb4(%rsp)
movl $0x1, 0x3c(%rsp)
jmp 0x3de2
movq 0x1e23f(%rip), %rdi     # 0x21fe8
leaq 0x1431c(%rip), %rsi     # 0x180cc
callq 0x21a0
movq %rax, 0x10(%rsp)
jmp 0x3dbc
movq 0x10(%rsp), %rdi
movq 0x1e1d8(%rip), %rsi     # 0x21fa0
callq 0x21d0
jmp 0x3dcf
movl $0x2, 0xb4(%rsp)
movl $0x1, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5830
jmp 0x3e3a
leaq 0x48(%rsp), %rdi
callq 0x5830
jmp 0x3e56
movq 0x1e1e7(%rip), %rdi     # 0x21fe8
leaq 0x142d6(%rip), %rsi     # 0x180de
callq 0x21a0
movq %rax, 0x8(%rsp)
jmp 0x3e14
movq 0x8(%rsp), %rdi
movq 0x1e180(%rip), %rsi     # 0x21fa0
callq 0x21d0
jmp 0x3e27
movl $0x1, 0xb4(%rsp)
movl $0x1, 0x3c(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x5050
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
leaq 0x88(%rsp), %rdi
callq 0x5050
movq 0x80(%rsp), %rdi
callq 0x2310
movq %rax, %rdi
callq 0x5840
nopl (%rax,%rax)