// File: ipatix[P]wav2agb/wav2agb.cpp
// Function: main
int main(int argc, char *argv[]) {
    try {
        if (argc == 1)
            usage();

        for (int i = 1; i < argc; i++) {
            std::string st(argv[i]);
            if (st == "-s" || st == "--symbol") {
                if (++i >= argc)
                    die("-s: missing symbol name\n");
                arg_sym = argv[i];
                fix_str(arg_sym);
            } else if (st == "-c" || st == "--compress") {
                arg_compress = cmp_type::dpcm;
            } else if (st == "-l" || st == "--lookahead") {
                if (++i >= argc)
                    die("-l: missing parameter");
                set_dpcm_lookahead(std::stoul(argv[i], nullptr, 10));
            } else if (st == "--version") {
                version();
            } else if (st == "--loop-start") {
                if (++i >= argc)
                    die("--loop-start: missing parameter");
                uint32_t start = static_cast<uint32_t>(std::stoul(argv[i], nullptr, 10));
                set_wav_loop_start(start);
            } else if (st == "--loop-end") {
                if (++i >= argc)
                    die("--loop-end: missing parameter");
                uint32_t end = static_cast<uint32_t>(std::stoul(argv[i], nullptr, 10));
                set_wav_loop_end(end);
            } else if (st == "--tune") {
                if (++i >= argc)
                    die("--tune: missing parameter");
                double tune = std::stod(argv[i], nullptr);
                set_wav_tune(tune);
            } else if (st == "--key") {
                if (++i >= argc)
                    die("--key: missing parameter");
                int key = std::stoi(argv[i], nullptr, 10);
                if (key < 0) key = 0;
                if (key > 127) key = 127;
                set_wav_key(static_cast<uint8_t>(key));
            } else if (st == "--rate") {
                if (++i >= argc)
                    die("--rate: missing parameter");
                uint32_t rate = static_cast<uint32_t>(std::stoul(argv[i], nullptr, 10));
                set_wav_rate(rate);
            } else {
                if (st == "--") {
                    if (++i >= argc)
                        die("--: missing file name\n");
                }
                if (!arg_input_file_read) {
                    arg_input_file = argv[i];
                    if (arg_input_file.size() < 1)
                        die("empty input file name\n");
                    arg_input_file_read = true;
                } else if (!arg_output_file_read) {
                    arg_output_file = argv[i];
                    if (arg_output_file.size() < 1)
                        die("empty output file name\n");
                    arg_output_file_read = true;
                } else {
                    die("Too many files specified\n");
                }
            }
        }

        // check arguments
        if (!arg_input_file_read) {
            die("No input file specified\n");
        }

        if (!arg_output_file_read) {
            // create output file name if none is provided
            arg_output_file = filename_without_ext(arg_input_file) + ".s";
            arg_output_file_read = true;
        }

        if (arg_sym.size() == 0) {
            arg_sym = filename_without_dir(filename_without_ext(arg_output_file));
            fix_str(arg_sym);
        }

        convert(arg_input_file, arg_output_file, arg_sym, arg_compress);
        return 0;
    } catch (const std::exception& e) {
        fprintf(stderr, "std lib error:\n%s\n", e.what());
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x4fa9
callq 0x5b30
jmp 0x4f96
jmp 0x4fa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x5a8b
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x5940
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x34f0
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x6020
jmp 0x4ff8
leaq -0x41(%rbp), %rdi
callq 0x32e0
leaq 0x71d5(%rip), %rsi      # 0xc1dd
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1d9(%rbp)
jmp 0x5019
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x5049
jmp 0x5025
leaq 0x71b4(%rip), %rsi      # 0xc1e0
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1da(%rbp)
jmp 0x503d
movb -0x1da(%rbp), %al
testb $0x1, %al
jne 0x5049
jmp 0x50c1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x5094
leaq 0x718b(%rip), %rdi      # 0xc1e9
xorl %eax, %eax
callq 0x5c80
jmp 0x5067
jmp 0x5094
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x32e0
jmp 0x5a8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x5932
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc289(%rip), %rdi      # 0x11330
callq 0x33a0
jmp 0x50ae
leaq 0xc27b(%rip), %rdi      # 0x11330
callq 0x5d30
jmp 0x50bc
jmp 0x591b
leaq 0x713a(%rip), %rsi      # 0xc202
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1db(%rbp)
jmp 0x50d9
movb -0x1db(%rbp), %al
testb $0x1, %al
jne 0x5109
jmp 0x50e5
leaq 0x7119(%rip), %rsi      # 0xc205
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1dc(%rbp)
jmp 0x50fd
movb -0x1dc(%rbp), %al
testb $0x1, %al
jne 0x5109
jmp 0x5118
movl $0x1, 0xc27d(%rip)      # 0x11390
jmp 0x5919
leaq 0x70f1(%rip), %rsi      # 0xc210
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1dd(%rbp)
jmp 0x5130
movb -0x1dd(%rbp), %al
testb $0x1, %al
jne 0x5163
jmp 0x513c
leaq 0x70d0(%rip), %rsi      # 0xc213
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1de(%rbp)
jmp 0x5154
movb -0x1de(%rbp), %al
testb $0x1, %al
jne 0x5163
jmp 0x5230
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x5183
leaq 0x70a7(%rip), %rdi      # 0xc21f
xorl %eax, %eax
callq 0x5c80
jmp 0x5181
jmp 0x5183
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x34f0
movq -0x1f0(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x6020
jmp 0x51bf
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
movl $0xa, %edx
callq 0x6100
movq %rax, -0x1f8(%rbp)
jmp 0x51da
movq -0x1f8(%rbp), %rdi
callq 0x3800
jmp 0x51e8
leaq -0x68(%rbp), %rdi
callq 0x3578
leaq -0x69(%rbp), %rdi
callq 0x32e0
jmp 0x5917
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x5222
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3578
leaq -0x69(%rbp), %rdi
callq 0x32e0
jmp 0x5932
leaq 0x6ffe(%rip), %rsi      # 0xc235
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1f9(%rbp)
jmp 0x5248
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x5254
jmp 0x5260
callq 0x5e20
jmp 0x525b
jmp 0x5915
leaq 0x6fd8(%rip), %rsi      # 0xc23f
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x1fa(%rbp)
jmp 0x5278
movb -0x1fa(%rbp), %al
testb $0x1, %al
jne 0x5287
jmp 0x537b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x52a7
leaq 0x6fb0(%rip), %rdi      # 0xc24c
xorl %eax, %eax
callq 0x5c80
jmp 0x52a5
jmp 0x52a7
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x210(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x34f0
movq -0x210(%rbp), %rsi
movq -0x208(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0x6020
jmp 0x52e9
xorl %eax, %eax
movl %eax, %esi
leaq -0x90(%rbp), %rdi
movl $0xa, %edx
callq 0x6100
movq %rax, -0x218(%rbp)
jmp 0x5307
movq -0x218(%rbp), %rax
movl %eax, -0x21c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3578
leaq -0x91(%rbp), %rdi
callq 0x32e0
movl -0x21c(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %edi
callq 0x3840
jmp 0x533f
jmp 0x5913
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x536a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3578
leaq -0x91(%rbp), %rdi
callq 0x32e0
jmp 0x5932
leaq 0x6eea(%rip), %rsi      # 0xc26c
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x21d(%rbp)
jmp 0x5393
movb -0x21d(%rbp), %al
testb $0x1, %al
jne 0x53a2
jmp 0x549c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x53c2
leaq 0x6ec0(%rip), %rdi      # 0xc277
xorl %eax, %eax
callq 0x5c80
jmp 0x53c0
jmp 0x53c2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x230(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x34f0
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x6020
jmp 0x5404
xorl %eax, %eax
movl %eax, %esi
leaq -0xb8(%rbp), %rdi
movl $0xa, %edx
callq 0x6100
movq %rax, -0x238(%rbp)
jmp 0x5422
movq -0x238(%rbp), %rax
movl %eax, -0x23c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x3578
leaq -0xb9(%rbp), %rdi
callq 0x32e0
movl -0x23c(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %edi
callq 0x3860
jmp 0x5460
jmp 0x5911
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x548b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x3578
leaq -0xb9(%rbp), %rdi
callq 0x32e0
jmp 0x5932
leaq 0x6df2(%rip), %rsi      # 0xc295
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x23d(%rbp)
jmp 0x54b4
movb -0x23d(%rbp), %al
testb $0x1, %al
jne 0x54c3
jmp 0x55b2
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x54e3
leaq 0x6dc4(%rip), %rdi      # 0xc29c
xorl %eax, %eax
callq 0x5c80
jmp 0x54e1
jmp 0x54e3
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x250(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x34f0
movq -0x250(%rbp), %rsi
movq -0x248(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0x6020
jmp 0x5525
xorl %eax, %eax
movl %eax, %esi
leaq -0xe8(%rbp), %rdi
callq 0x6140
movsd %xmm0, -0x258(%rbp)
jmp 0x553f
leaq -0xe8(%rbp), %rdi
callq 0x3578
leaq -0xe9(%rbp), %rdi
callq 0x32e0
movsd -0x258(%rbp), %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0xc8(%rbp), %xmm0
callq 0x3880
jmp 0x5576
jmp 0x590f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x55a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x3578
leaq -0xe9(%rbp), %rdi
callq 0x32e0
jmp 0x5932
leaq 0x6cfd(%rip), %rsi      # 0xc2b6
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x259(%rbp)
jmp 0x55ca
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x55d9
jmp 0x56ee
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x55f9
leaq 0x6cce(%rip), %rdi      # 0xc2bc
xorl %eax, %eax
callq 0x5c80
jmp 0x55f7
jmp 0x55f9
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x270(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x34f0
movq -0x270(%rbp), %rsi
movq -0x268(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x6020
jmp 0x563b
xorl %eax, %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
movl $0xa, %edx
callq 0x6180
movl %eax, -0x274(%rbp)
jmp 0x5658
leaq -0x110(%rbp), %rdi
callq 0x3578
leaq -0x111(%rbp), %rdi
callq 0x32e0
movl -0x274(%rbp), %eax
movl %eax, -0xf0(%rbp)
cmpl $0x0, -0xf0(%rbp)
jge 0x56c8
movl $0x0, -0xf0(%rbp)
jmp 0x56c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x56b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3578
leaq -0x111(%rbp), %rdi
callq 0x32e0
jmp 0x5932
cmpl $0x7f, -0xf0(%rbp)
jle 0x56db
movl $0x7f, -0xf0(%rbp)
movzbl -0xf0(%rbp), %edi
callq 0x38a0
jmp 0x56e9
jmp 0x590d
leaq 0x6be0(%rip), %rsi      # 0xc2d5
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x275(%rbp)
jmp 0x5706
movb -0x275(%rbp), %al
testb $0x1, %al
jne 0x5715
jmp 0x580f
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x5735
leaq 0x6bb2(%rip), %rdi      # 0xc2dc
xorl %eax, %eax
callq 0x5c80
jmp 0x5733
jmp 0x5735
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x288(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x34f0
movq -0x288(%rbp), %rsi
movq -0x280(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x6020
jmp 0x5777
xorl %eax, %eax
movl %eax, %esi
leaq -0x138(%rbp), %rdi
movl $0xa, %edx
callq 0x6100
movq %rax, -0x290(%rbp)
jmp 0x5795
movq -0x290(%rbp), %rax
movl %eax, -0x294(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x3578
leaq -0x139(%rbp), %rdi
callq 0x32e0
movl -0x294(%rbp), %eax
movl %eax, -0x118(%rbp)
movl -0x118(%rbp), %edi
callq 0x38c0
jmp 0x57d3
jmp 0x590b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x57fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x3578
leaq -0x139(%rbp), %rdi
callq 0x32e0
jmp 0x5932
leaq 0x6ae0(%rip), %rsi      # 0xc2f6
leaq -0x40(%rbp), %rdi
callq 0x60d0
movb %al, -0x295(%rbp)
jmp 0x5827
movb -0x295(%rbp), %al
testb $0x1, %al
jne 0x5833
jmp 0x5855
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl -0x8(%rbp), %eax
jl 0x5853
leaq 0x6ab1(%rip), %rdi      # 0xc2f9
xorl %eax, %eax
callq 0x5c80
jmp 0x5851
jmp 0x5853
jmp 0x5855
testb $0x1, 0xbb38(%rip)      # 0x11394
jne 0x58a5
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbadf(%rip), %rdi      # 0x11350
callq 0x33a0
jmp 0x5878
leaq 0xbad1(%rip), %rdi      # 0x11350
callq 0x31f0
cmpq $0x1, %rax
jae 0x589c
leaq 0x6a7f(%rip), %rdi      # 0xc310
xorl %eax, %eax
callq 0x5c80
jmp 0x589a
jmp 0x589c
movb $0x1, 0xbaf1(%rip)      # 0x11394
jmp 0x5909
testb $0x1, 0xbae9(%rip)      # 0x11395
jne 0x58f5
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbaaf(%rip), %rdi      # 0x11370
callq 0x33a0
jmp 0x58c8
leaq 0xbaa1(%rip), %rdi      # 0x11370
callq 0x31f0
cmpq $0x1, %rax
jae 0x58ec
leaq 0x6a46(%rip), %rdi      # 0xc327
xorl %eax, %eax
callq 0x5c80
jmp 0x58ea
jmp 0x58ec
movb $0x1, 0xbaa2(%rip)      # 0x11395
jmp 0x5907
leaq 0x6a43(%rip), %rdi      # 0xc33f
xorl %eax, %eax
callq 0x5c80
jmp 0x5905
jmp 0x5907
jmp 0x5909
jmp 0x590b
jmp 0x590d
jmp 0x590f
jmp 0x5911
jmp 0x5913
jmp 0x5915
jmp 0x5917
jmp 0x5919
jmp 0x591b
leaq -0x40(%rbp), %rdi
callq 0x3578
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4fb0
leaq -0x40(%rbp), %rdi
callq 0x3578
jmp 0x5a8b
testb $0x1, 0xba4d(%rip)      # 0x11394
jne 0x595b
leaq 0x6a09(%rip), %rdi      # 0xc359
xorl %eax, %eax
callq 0x5c80
jmp 0x5959
jmp 0x595b
testb $0x1, 0xba33(%rip)      # 0x11395
jne 0x59ea
leaq 0xb9e1(%rip), %rsi      # 0x11350
leaq -0x180(%rbp), %rdi
callq 0x5e40
jmp 0x597d
leaq 0x69ee(%rip), %rdx      # 0xc372
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x61c0
jmp 0x5999
leaq 0xb9d0(%rip), %rdi      # 0x11370
leaq -0x160(%rbp), %rsi
callq 0x3350
leaq -0x160(%rbp), %rdi
callq 0x3578
leaq -0x180(%rbp), %rdi
callq 0x3578
movb $0x1, 0xb9ca(%rip)      # 0x11395
jmp 0x59ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3578
jmp 0x5a8b
leaq 0xb93f(%rip), %rdi      # 0x11330
callq 0x31f0
cmpq $0x0, %rax
jne 0x5aef
leaq 0xb969(%rip), %rsi      # 0x11370
leaq -0x1c0(%rbp), %rdi
callq 0x5e40
jmp 0x5a15
leaq -0x1a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x5f50
jmp 0x5a2a
leaq 0xb8ff(%rip), %rdi      # 0x11330
movq %rdi, -0x2a0(%rbp)
leaq -0x1a0(%rbp), %rsi
movq %rsi, -0x2a8(%rbp)
callq 0x3350
movq -0x2a8(%rbp), %rdi
callq 0x3578
leaq -0x1c0(%rbp), %rdi
callq 0x3578
movq -0x2a0(%rbp), %rdi
callq 0x5d30
jmp 0x5a71
jmp 0x5aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x3578
movl -0x1c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x5b24
movq -0x18(%rbp), %rdi
callq 0x3120
movq %rax, -0x1c8(%rbp)
movq 0xb51e(%rip), %rax      # 0x10fd0
movq (%rax), %rax
movq %rax, -0x2b0(%rbp)
movq -0x1c8(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x2b0(%rbp), %rdi
movq %rax, %rdx
leaq 0x689b(%rip), %rsi      # 0xc375
movb $0x0, %al
callq 0x33d0
callq 0x3470
movl $0x1, -0x4(%rbp)
jmp 0x5b18
movl 0xb89b(%rip), %ecx      # 0x11390
leaq 0xb854(%rip), %rdi      # 0x11350
leaq 0xb86d(%rip), %rsi      # 0x11370
leaq 0xb826(%rip), %rdx      # 0x11330
callq 0x38e0
jmp 0x5b11
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x34e0
nopl (%rax)