// File: /workspace/github_c_makefile_star2_O0/kyz[P]amostools/./amoslib.c
// Function: AMOS_print_source
int AMOS_print_source(uint8_t *src, size_t len, FILE *out,
                      struct AMOS_token *table[AMOS_TOKEN_TABLE_SIZE])
{
    uint32_t token, linelen=0, inpos, i, compiled_len = 0;
    uint8_t *line, *endline, add_space, start_of_line, label_at_eol = 0;
    int err = 0;

    /* while we have remaining input bytes */
    for (inpos = 0; inpos < len;) {
        /* skip compiled procedures */
        if (compiled_len) {
            fprintf(out, "   ' COMPILED PROCEDURE -- can't convert this to AMOS code\n");
            inpos += compiled_len + 8 - linelen;
            if (inpos > len) break;
            compiled_len = 0;
        }

        line = &src[inpos];
        linelen = line[0] * 2;
        inpos += linelen;

        /* stop if line claims to be zero length (bad data) */
        if (linelen == 0) {
            err |= 1;
            break;
        }

        /* if the line is said to be longer than we actually have bytes for,
         * mark this as an error, but continue with the bytes we have. */
        if (inpos > len) {
            err |= 1;
            linelen = len - (inpos - linelen);
        }

        //printf("LINE: ");for(i=0;i<linelen;i+=2)printf("%02X%02X ",line[i],line[i+1]);puts("");

        /* start the line with the given indent level */
        if ((i = line[1]) > 1) {
            while (i-- > 1) putc(' ', out);
        }
        add_space = 0;

        /* decode this line */
        endline = &line[linelen];
        line += 2;
        start_of_line = 1;

        while ((line < endline) && (token = amos_deek(line))) {
            line += 2;
            label_at_eol = 0;

            if (token <= 0x0018) {
                /* Tokens 0x0000 to 0x0018 are "variable" tokens. These represent
                 * variable, label and procedure names:
                 * - 0x0006 = TkVar, variable reference e.g. "X" in "Print X".
                 * - 0x000C = TkLab, label, e.g. "X:" or "190" (at the start of a line)
                 * - 0x0012 = TkPro, procedure reference, e.g. "X" in "X[42]"
                 * - 0x0018 = TkLGo, label reference, e.g. "X" in "Goto X"
                 *
                 * All these tokens have the following format:
                 * - 2 bytes: unknown purpose
                 * - 1 byte:  length of ASCII string for variable/label name
                 * - 1 byte:  flags. For TkVar, TkPro and TkLGo:
                 *            - flags & 0x01 = this is a floating point ref (eg "X#")
                 *            - flags & 0x02 = this is a string ref (eg "X$")
                 * - n bytes: ASCII string, with the above-given string length,
                 *            rounded to a multiple of two, null terminated.
                 */
                if (add_space) putc(' ', out);
                for (i = 0; i < line[2]; i++) {
                    uint8_t c = line[4+i];
                    if (!c) break;
                    if (c >= 'a' && c <= 'z') c -= ('a'-'A'); /* to uppercase */
                    putc(c, out);
                }
                if (token == 0x000C) {
                    /* if not a "line number" label, the label needs a colon */
                    if (!(line[4] >= '0' && line[4] <= '9')) putc(':', out);
                    add_space = 1;
                    label_at_eol = 1;
                }
                else {
                    if (line[3] & 0x01) putc('#', out);
                    else if (line[3] & 0x02) putc('$', out);
                    add_space = 0;
                }
                /* advance to the next token */
                line += ((line[2] & 1) ? 5 : 4) + line[2];
            }
            else if (token < 0x004E || token == 0x2B6A) {
                /* Tokens 0x0019 to 0x004D (and 0x2B6A) are "constant" tokens.
                 * They represent literal numbers and strings:
                 *
                 * - 0x001E = TkBin, a binary integer, e.g. %100101
                 * - 0x0026 = TkCh1, a string with double quotes, e.g. "hello"
                 * - 0x002E = TkCh2, a string with single quotes, e.g. 'hello'
                 * - 0x0036 = TkHex, a hexidecimal integer, e.g. $80FAA010
                 * - 0x003E = TkEnt, a decimal integer, e.g. 1234567890
                 * - 0x0046 = TkFl,  a floating-point number, e.g 3.142
                 * - 0x2B6A = TkDFl, a double-precision float, e.g. 3.1415926543
                 *
                 * TkBin, TkHex, TkEnt, TkFl have this format:
                 * - 4 bytes: the value
                 *
                 * TkDFl has this format:
                 * - 8 bytes: the value
                 *
                 * TkCh1 and TkCh2 have this format:
                 * - 2 bytes: the length of the string
                 * - n bytes: the string, for the above number of bytes rounded up
                 *            to a multiple of two bytes and padded with nulls.
                 */
                if (add_space) { putc(' ', out); add_space = 0; }
                switch (token) {
                case 0x001E: /* TkBin */
                    print_binary(out, amos_leek(line)); line += 4;
                    break;
                case 0x0026: /* TkCh1 */
                    line += print_string(out, line, '\"');
                    break;
                case 0x002E: /* TkCh2 */
                    line += print_string(out, line, '\'');
                    break;
                case 0x0036: /* TkHex */
                    fprintf(out, "$%X", amos_leek(line)); line += 4;
                    break;
                case 0x003E: /* TkEnt */
                    fprintf(out, "%d", (int) amos_leek(line)); line += 4;
                    break;
                case 0x0046: /* TkFl */
                    print_float(out, amos_leek(line)); line += 4;
                    break;
                case 0x2B6A:
                    print_double(out, amos_leek(line), amos_leek(line+4)); line += 8;
                    break;
                default:
                    fprintf(out, "Illegal_Constant_%04X", token);
                    err |= 2;
                }
            }
            else {
                char *tok = NULL;
                int key;
                /* all other tokens: 0x004E to 0xFFFF
                 *
                 * other than the extension tokens, these are actual instructions,
                 * functions or system variables which reside in AMOS's token table.
                 * The offset given leads to the handlers for these instructions,
                 * as well as their name and what would be correct parameters.
                 *
                 * AMOS allows "extensions" to the language. They have a token table
                 * just like AMOS, each extension has its own table.
                 *
                 * The extension token is token 0x004E and has this format:
                 * - 1 byte:  extension number [1-25]
                 * - 1 byte:  unused
                 * - 2 bytes: offset into extension's token table
                 *
                 * Other than this, some tokens in the core language have a special
                 * format. They are:
                 *
                 * TkRem1 (0x064A) and TkRem2 (0x0652):
                 * - 1 byte:  unused
                 * - 1 byte:  length of the remark
                 * - n bytes: the remark -- ASCII text, null terminated,
                 *            padded to a multiple of two bytes.
                 *
                 * TkFor (0x023C), TkRpt (0x0250), TkWhl (0x0268), TkDo (0x027E),
                 * TkIf (0x02BE), TkElse (0x02D0), TkData (0x0404) and AMOS Pro's
                 * TkElsI (0x25A4)
                 * - 2 bytes: unknown purpose
                 *
                 * TkExIf (0x0290), TkExit (0x029E) and TkOn (0x0316):
                 * - 4 bytes: unknown purpose
                 *
                 * TkProc (0x0376)
                 * - 4 bytes: number of bytes to corresponding ENDPROC line
                 *            (start of line + 8 + above = start of ENDPROC line)
                 *            (start of line + 8 + 6 + above = line _after_ ENDPROC)
                 * - 2 bytes: part of seed for encryption
                 * - 1 byte: flags:
                 *   - flags & 0x80 -- procedure is folded
                 *   - flags & 0x40 -- procedure is locked and should not be unfolded
                 *   - flags & 0x20 -- procedure is currently encrypted
                 *   - flags & 0x10 -- procedure contains compiled code, not tokens
                 * - 1 byte: part of seed for encryption
                 *
                 * TkEqu (0x2A40), TkLVO (0x2A4A), TkStru (0x2A54), TkStruS (0x2A64)
                 * - 4 bytes: value of the equate
                 * - 1 byte: type of the equate (0-7)
                 * - 1 byte: unknown purpose
                 */
                if (token == 0x004E) {
                    key = line[0] << 16 | amos_deek(&line[2]);
                    line += 4;
                }
                else {
                    key = token; /* slot 0 */
                }

                /* lookup token */
                int tidx = (key >> 1) % AMOS_TOKEN_TABLE_SIZE;
                for (struct AMOS_token *e = table[tidx]; e; e = e->next) {
                    if (e->key == key) {
                        tok = e->text;
                        break;
                    }
                }

                if (tok) {
                    char type = *tok++;
                    char is_paren = (token == 0x0074);
                    char is_func = (type == 'O' || type == '0' || type == '1' ||
                                    type == '2' || type == 'V');
                    if (!is_func && !start_of_line) add_space = 1;
                    if (!is_paren && add_space && *tok != ' ') putc(' ', out);
                    fprintf(out, "%s", tok);
                    add_space = (type == 'I');
                }
                else {
                    /* unknown token */
                    fprintf(out, " Extension_%d_%04X", key >> 16, key & 0xFFFF);
                    add_space = 1;
                    err |= 4;
                }


                /* special tokens in the core language with extra data after them */
                switch (token) {
                case 0x064A: /* TkRem1 */
                case 0x0652: /* TkRem2 */
                    fprintf(out, "%s", &line[2]);
                    i = line[1]; line += 2 + i; if (i & 1) line++;
                    break;

                case 0x023C: /* TkFor */
                case 0x0250: /* TkRpt */
                case 0x0268: /* TkWhl */
                case 0x027E: /* TkDo */
                case 0x02BE: /* TkIf */
                case 0x02D0: /* TkElse */
                case 0x0404: /* TkData */
                case 0x25A4: /* TkElsI */
                    line += 2;
                    break;

                case 0x0290: /* TkExIf */
                case 0x029E: /* TkExit */
                case 0x0316: /* TkOn */
                    line += 4;
                    break;

                case 0x0376: /* TkProc */
                    if (line[6] & 0x20) AMOS_decrypt_procedure(line-4, len - (inpos-linelen));
                    if (line[6] & 0x10) compiled_len = amos_leek(&line[0]);
                    line += 8;
                    break;

                case 0x2A40: /* Equ */
                case 0x2A4A: /* Lvo */
                case 0x2A54: /* Struc */
                case 0x2A64: /* Struct */
                    line += 6;
                    break;
                }
            }
            start_of_line = 0;
        }
        if (add_space && !label_at_eol) putc(' ', out);
        putc('\n', out);
    }
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movb $0x0, -0x4b(%rbp)
movl $0x0, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpq -0x10(%rbp), %rax
jae 0x1ddb
cmpl $0x0, -0x34(%rbp)
je 0x1504
movq -0x18(%rbp), %rdi
leaq 0x2b31(%rip), %rsi      # 0x400a
movb $0x0, %al
callq 0x1150
movl -0x34(%rbp), %eax
addl $0x8, %eax
subl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpq -0x10(%rbp), %rax
jbe 0x14fd
jmp 0x1ddb
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
shll %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x153b
movl -0x50(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1ddb
movl -0x2c(%rbp), %eax
cmpq -0x10(%rbp), %rax
jbe 0x155f
movl -0x50(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x28(%rbp), %ecx
movl %ecx, %ecx
subq %rcx, %rax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x1, %eax
jbe 0x1593
jmp 0x1571
movl -0x30(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x30(%rbp)
cmpl $0x1, %eax
jbe 0x1591
movq -0x18(%rbp), %rsi
movl $0x20, %edi
callq 0x1130
jmp 0x1571
jmp 0x1593
movb $0x0, -0x49(%rbp)
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movb $0x1, -0x4a(%rbp)
movq -0x40(%rbp), %rcx
xorl %eax, %eax
cmpq -0x48(%rbp), %rcx
movb %al, -0x74(%rbp)
jae 0x15e4
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x40(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x74(%rbp)
movb -0x74(%rbp), %al
testb $0x1, %al
jne 0x15f0
jmp 0x1dab
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movb $0x0, -0x4b(%rbp)
cmpl $0x18, -0x24(%rbp)
ja 0x1736
cmpb $0x0, -0x49(%rbp)
je 0x161e
movq -0x18(%rbp), %rsi
movl $0x20, %edi
callq 0x1130
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x40(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jae 0x1682
movq -0x40(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x4, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x51(%rbp)
cmpb $0x0, -0x51(%rbp)
jne 0x164e
jmp 0x1682
movzbl -0x51(%rbp), %eax
cmpl $0x61, %eax
jl 0x166a
movzbl -0x51(%rbp), %eax
cmpl $0x7a, %eax
jg 0x166a
movzbl -0x51(%rbp), %eax
subl $0x20, %eax
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x1130
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1625
cmpl $0xc, -0x24(%rbp)
jne 0x16ba
movq -0x40(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x30, %eax
jl 0x16a2
movq -0x40(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x39, %eax
jle 0x16b0
movq -0x18(%rbp), %rsi
movl $0x3a, %edi
callq 0x1130
movb $0x1, -0x49(%rbp)
movb $0x1, -0x4b(%rbp)
jmp 0x16fe
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x16da
movq -0x18(%rbp), %rsi
movl $0x23, %edi
callq 0x1130
jmp 0x16fa
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x16f8
movq -0x18(%rbp), %rsi
movl $0x24, %edi
callq 0x1130
jmp 0x16fa
movb $0x0, -0x49(%rbp)
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %edx
andl $0x1, %edx
movl $0x4, %ecx
movl $0x5, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
addl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x1da2
cmpl $0x4e, -0x24(%rbp)
jb 0x1749
cmpl $0x2b6a, -0x24(%rbp)    # imm = 0x2B6A
jne 0x19de
cmpb $0x0, -0x49(%rbp)
je 0x1761
movq -0x18(%rbp), %rsi
movl $0x20, %edi
callq 0x1130
movb $0x0, -0x49(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x78(%rbp)
subl $0x1e, %eax
je 0x17c7
jmp 0x176e
movl -0x78(%rbp), %eax
subl $0x26, %eax
je 0x180f
jmp 0x177c
movl -0x78(%rbp), %eax
subl $0x2e, %eax
je 0x1836
jmp 0x178a
movl -0x78(%rbp), %eax
subl $0x36, %eax
je 0x185d
jmp 0x1798
movl -0x78(%rbp), %eax
subl $0x3e, %eax
je 0x18ae
jmp 0x17a6
movl -0x78(%rbp), %eax
subl $0x46, %eax
je 0x18ff
jmp 0x17b4
movl -0x78(%rbp), %eax
subl $0x2b6a, %eax           # imm = 0x2B6A
je 0x1947
jmp 0x19bb
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movzbl (%rax), %esi
shll $0x18, %esi
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
orl %eax, %esi
callq 0x1df0
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0x22, %edx
callq 0x1e80
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0x27, %edx
callq 0x1e80
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movzbl (%rax), %edx
shll $0x18, %edx
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %edx
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %edx
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
orl %eax, %edx
leaq 0x27b0(%rip), %rsi      # 0x4046
movb $0x0, %al
callq 0x1150
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movzbl (%rax), %edx
shll $0x18, %edx
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %edx
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %edx
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
orl %eax, %edx
leaq 0x2763(%rip), %rsi      # 0x404a
movb $0x0, %al
callq 0x1150
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movzbl (%rax), %esi
shll $0x18, %esi
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
orl %eax, %esi
callq 0x1f10
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movzbl (%rax), %esi
shll $0x18, %esi
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
orl %eax, %esi
movq -0x40(%rbp), %rax
movzbl 0x4(%rax), %edx
shll $0x18, %edx
movq -0x40(%rbp), %rax
movzbl 0x5(%rax), %eax
shll $0x10, %eax
orl %eax, %edx
movq -0x40(%rbp), %rax
movzbl 0x6(%rax), %eax
shll $0x8, %eax
orl %eax, %edx
movq -0x40(%rbp), %rax
movzbl 0x7(%rax), %eax
orl %eax, %edx
callq 0x2000
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
jmp 0x19d9
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x2684(%rip), %rsi      # 0x404d
movb $0x0, %al
callq 0x1150
movl -0x50(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x50(%rbp)
jmp 0x1da0
movq $0x0, -0x60(%rbp)
cmpl $0x4e, -0x24(%rbp)
jne 0x1a1e
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
shll $0x10, %eax
movq -0x40(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
movq -0x40(%rbp), %rdx
movzbl 0x3(%rdx), %edx
orl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x64(%rbp)
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a24
movl -0x24(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
sarl %eax
movl $0x2069, %ecx           # imm = 0x2069
cltd
idivl %ecx
movl %edx, -0x68(%rbp)
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x1a74
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x64(%rbp), %eax
jne 0x1a65
movq -0x70(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x60(%rbp)
jmp 0x1a74
jmp 0x1a67
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x1a44
cmpq $0x0, -0x60(%rbp)
je 0x1b55
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb (%rax), %al
movb %al, -0x71(%rbp)
cmpl $0x74, -0x24(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x72(%rbp)
movsbl -0x71(%rbp), %ecx
movb $0x1, %al
cmpl $0x4f, %ecx
movb %al, -0x79(%rbp)
je 0x1ae7
movsbl -0x71(%rbp), %ecx
movb $0x1, %al
cmpl $0x30, %ecx
movb %al, -0x79(%rbp)
je 0x1ae7
movsbl -0x71(%rbp), %ecx
movb $0x1, %al
cmpl $0x31, %ecx
movb %al, -0x79(%rbp)
je 0x1ae7
movsbl -0x71(%rbp), %ecx
movb $0x1, %al
cmpl $0x32, %ecx
movb %al, -0x79(%rbp)
je 0x1ae7
movsbl -0x71(%rbp), %eax
cmpl $0x56, %eax
sete %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x73(%rbp)
cmpb $0x0, -0x73(%rbp)
jne 0x1b02
cmpb $0x0, -0x4a(%rbp)
jne 0x1b02
movb $0x1, -0x49(%rbp)
cmpb $0x0, -0x72(%rbp)
jne 0x1b2b
movzbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0x1b2b
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x1b2b
movq -0x18(%rbp), %rsi
movl $0x20, %edi
callq 0x1130
movq -0x18(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x283b(%rip), %rsi      # 0x4375
movb $0x0, %al
callq 0x1150
movsbl -0x71(%rbp), %eax
cmpl $0x49, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x49(%rbp)
jmp 0x1b83
movq -0x18(%rbp), %rdi
movl -0x64(%rbp), %edx
sarl $0x10, %edx
movl -0x64(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
leaq 0x24f4(%rip), %rsi      # 0x4063
movb $0x0, %al
callq 0x1150
movb $0x1, -0x49(%rbp)
movl -0x50(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x50(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x80(%rbp)
subl $0x23c, %eax            # imm = 0x23C
je 0x1cf5
jmp 0x1b96
movl -0x80(%rbp), %eax
subl $0x250, %eax            # imm = 0x250
je 0x1cf5
jmp 0x1ba6
movl -0x80(%rbp), %eax
subl $0x268, %eax            # imm = 0x268
je 0x1cf5
jmp 0x1bb6
movl -0x80(%rbp), %eax
subl $0x27e, %eax            # imm = 0x27E
je 0x1cf5
jmp 0x1bc6
movl -0x80(%rbp), %eax
subl $0x290, %eax            # imm = 0x290
je 0x1d06
jmp 0x1bd6
movl -0x80(%rbp), %eax
subl $0x29e, %eax            # imm = 0x29E
je 0x1d06
jmp 0x1be6
movl -0x80(%rbp), %eax
subl $0x2be, %eax            # imm = 0x2BE
je 0x1cf5
jmp 0x1bf6
movl -0x80(%rbp), %eax
subl $0x2d0, %eax            # imm = 0x2D0
je 0x1cf5
jmp 0x1c06
movl -0x80(%rbp), %eax
subl $0x316, %eax            # imm = 0x316
je 0x1d06
jmp 0x1c16
movl -0x80(%rbp), %eax
subl $0x376, %eax            # imm = 0x376
je 0x1d17
jmp 0x1c26
movl -0x80(%rbp), %eax
subl $0x404, %eax            # imm = 0x404
je 0x1cf5
jmp 0x1c36
movl -0x80(%rbp), %eax
subl $0x64a, %eax            # imm = 0x64A
je 0x1ca1
jmp 0x1c42
movl -0x80(%rbp), %eax
subl $0x652, %eax            # imm = 0x652
je 0x1ca1
jmp 0x1c4e
movl -0x80(%rbp), %eax
subl $0x25a4, %eax           # imm = 0x25A4
je 0x1cf5
jmp 0x1c5e
movl -0x80(%rbp), %eax
subl $0x2a40, %eax           # imm = 0x2A40
je 0x1d92
jmp 0x1c6e
movl -0x80(%rbp), %eax
subl $0x2a4a, %eax           # imm = 0x2A4A
je 0x1d92
jmp 0x1c7e
movl -0x80(%rbp), %eax
subl $0x2a54, %eax           # imm = 0x2A54
je 0x1d92
jmp 0x1c8e
movl -0x80(%rbp), %eax
subl $0x2a64, %eax           # imm = 0x2A64
je 0x1d92
jmp 0x1d9e
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rdx
addq $0x2, %rdx
leaq 0x26c1(%rip), %rsi      # 0x4375
movb $0x0, %al
callq 0x1150
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
addl $0x2, %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x30(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1cf0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d9e
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d9e
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d9e
movq -0x40(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1d43
movq -0x40(%rbp), %rdi
addq $-0x4, %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %eax
subl -0x28(%rbp), %eax
movl %eax, %eax
subq %rax, %rsi
callq 0x2150
movq -0x40(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1d84
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
movq -0x40(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x40(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x40(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d9e
movq -0x40(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x40(%rbp)
jmp 0x1da0
jmp 0x1da2
movb $0x0, -0x4a(%rbp)
jmp 0x15b5
movzbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0x1dc8
cmpb $0x0, -0x4b(%rbp)
jne 0x1dc8
movq -0x18(%rbp), %rsi
movl $0x20, %edi
callq 0x1130
movq -0x18(%rbp), %rsi
movl $0xa, %edi
callq 0x1130
jmp 0x14bb
movl -0x50(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)