// File: /workspace/github_c_makefile_star2_O2/heltilda[P]cicada/cmpile.c
// Function: newCompiler
compiler_type *newCompiler(commandTokenType *commandTokens, ccInt numCommands, ccInt *OoOdirections, ccInt numOoOs, ccInt *rtrn)
{
    compiler_type *compiler = (compiler_type *) malloc(sizeof(compiler_type));
    ccInt loopList, loopCmd, loopTokenString, loopOoO, loopArgCmd, loopArgType, loopRtrnType, loopToken = 3;
    ccInt jumpTo[9], jumpMarkers[9], loopJump, loopStartingChar;
    char *oneChar;
    ccFloat theNum;
    ccBool ifFloat;
    
    *rtrn = passed;
    
    if (compiler == NULL)  {  *rtrn = out_of_memory_err;  errPosition = 0;  return compiler;  }
    
    compiler->tokenSpecs.memory = NULL;         // zero our pointers first so we know what we've allocated
    compiler->allCodeWords.memory = NULL;       // (in case we have to bail out before we've finished building arrays)
    compiler->scriptTokens.memory = NULL;
    compiler->bytecode.memory = NULL;
    compiler->opCharNum.memory = NULL;
    compiler->varNames.memory = NULL;
    compiler->numVariables = compiler->anonymousMemberNum = 0;
    
    for (loopArgType = 0; loopArgType < 11; loopArgType++)  {
    for (loopRtrnType = 0; loopRtrnType < 11; loopRtrnType++)  {
        compiler->adapters[loopArgType][loopRtrnType] = 0;
    }}
    
    for (loopTokenString = 0; loopTokenString < 128; loopTokenString++)  {
        compiler->tokens[loopTokenString].memory = NULL;        }
    
    
        // construct the jump tables from the language tokens
    
    compiler->OoOdirections = (ccInt *) malloc((numOoOs+2)*sizeof(ccInt));
    if ((newLinkedList(&(compiler->tokenSpecs), 3, sizeof(tokenSpecType), 1., ccTrue) != passed)
                || (newLinkedList(&(compiler->allCodeWords), 0, sizeof(ccInt), 1., ccFalse) != passed)
                || (compiler->OoOdirections == NULL)
                || (newLinkedList(&(compiler->scriptTokens), 0, sizeof(scriptTokenType), 1., ccFalse) != passed)
                || (newLinkedList(&(compiler->bytecode), 0, sizeof(ccInt), 0, ccFalse) != passed)
                || (newLinkedList(&(compiler->opCharNum), 0, sizeof(ccInt), 0, ccFalse) != passed)
                || (newLinkedList(&(compiler->varNames), 0, sizeof(varNameType), 0, ccFalse) != passed))
        errOut(out_of_memory_err, 0)
    
    for (loopStartingChar = 0; loopStartingChar < 128; loopStartingChar++)  {
        compiler->numLanguageOps[loopStartingChar] = 0;             }
    
    
        // read in miscellaneous information about the language; initialize memory
    
    if ((numCommands < 0) || (numOoOs < 0))  errOut(out_of_range_err, 0)
    
    for (loopOoO = 0; loopOoO < numOoOs; loopOoO++)  {
        compiler->OoOdirections[loopOoO] = OoOdirections[loopOoO];
        if ((OoOdirections[loopOoO] != l_to_r) && (OoOdirections[loopOoO] != r_to_l)) {
            errOut(out_of_range_err, -loopOoO-1)
    }   }
    compiler->OoOdirections[numOoOs] = l_to_r;
    compiler->OoOdirections[numOoOs+1] = l_to_r;
    
    compiler->specialTokens[0] = compiler->specialTokens[1] = compiler->specialTokens[2] = -1;
    
    for (loopList = 0; loopList < 128; loopList++)  {
    if (newLinkedList(compiler->tokens + loopList, 0, sizeof(tokenStringType), 1., ccFalse) != passed)  {
        errOut(out_of_memory_err, 0)
    }}
    
    
        // we start with a null token for comments, constant data and macro args, and the typeXadapter placeholder token
    
        // constant data:  we add an explicit token for this, so that, for example, strings won't feel that there's a
        // missing argument between the two quotation 'operators'
    
    tokenSpec(1)->leftArgType = tokenSpec(1)->rightArgType = -1;
    tokenSpec(1)->precedence = numOoOs+2;
    tokenSpec(1)->firstCodeWord = 1;
    
    
        // typeX adapter
    
    tokenSpec(2)->leftArgType = tokenSpec(2)->rightArgType = -1;
    tokenSpec(2)->precedence = numOoOs+2;
    tokenSpec(2)->firstCodeWord = 1;
    tokenSpec(2)->rtrnTypes[10] = ccTrue;
    compiler->adapters[10][10] = 2;
    
    
        // macro argument -- the idea here is that the code writes the compiler command to load an argument (0, 1, arg #)
        // into the result of the macro 'bytecode'
    
    tokenSpec(3)->leftArgType = -1;
    tokenSpec(3)->rightArgType = constDataArgType;
    tokenSpec(3)->precedence = numOoOs+1;
    tokenSpec(3)->firstCodeWord = 1;
    tokenSpec(3)->numCodeWords = 6;
    for (loopRtrnType = 0; loopRtrnType < 10; loopRtrnType++)
        tokenSpec(3)->rtrnTypes[loopRtrnType] = ccTrue;
    if (addElements(&(compiler->allCodeWords), 6, ccTrue) != passed)  errOut(out_of_memory_err, 1)
    *LL_int(&(compiler->allCodeWords), compiler->allCodeWords.elementNum-3) = 1;
    *LL_int(&(compiler->allCodeWords), compiler->allCodeWords.elementNum-1) = 1;
    *LL_int(&(compiler->allCodeWords), compiler->allCodeWords.elementNum) = 1;
    
    
        // read in each token along with its bytecode expansion
    
    for (loopCmd = 0; loopCmd < numCommands; loopCmd++)  {
        
        char *tokenChar = (char *) commandTokens[loopCmd].cmdString;
        ccInt firstToken = loopToken+1, LHarg = -1, RHarg = -1, firstRtrnType = -1, numJumps = 0, aOrtrn, numArgs = 0;
        ccBool expectLHarg = ccFalse, optionalLHarg;
        ccBool tobeRemoved = ( (*commandTokens[loopCmd].rtrnTypeString == *removedexpression)
                            || (*commandTokens[loopCmd].translation == *removedexpression) );
        
        
            // first we read the text description of an operation (usually a string interspersed with
            // 'typeNarg's, but may be something like 'int_constant', in which case we just mark the token number)
            
            // case 1:  it's a pre-defined object:  a constant, user-defined variable or argument adapter
        
        if ((*tokenChar >= *type0arg_adapter) && (*tokenChar <= *variable_name))  {
            
            loopToken++;
            if (addElements(&(compiler->tokenSpecs), 1, ccTrue) != passed)  errOut(out_of_memory_err, loopCmd+1)
            
            if (*tokenChar >= *int_constant)  {
                compiler->specialTokens[(ccInt) ((*tokenChar)-(*int_constant))] = loopToken;
                nextChar(&tokenChar);        }
            
            numArgs = 1;
            tokenSpec(loopToken)->leftArgType = -1;
            if (*tokenChar <= *noarg_adapter)  tokenSpec(loopToken)->rightArgType = -1;
            else  tokenSpec(loopToken)->rightArgType = constDataArgType;
            tokenSpec(loopToken)->precedence = numOoOs+1;        }
        
        
            // case 2:  it's an ordinary series of tokens and arguments -- read those until we run out
        
        else  {
            
                // first read in the left-hand argument type, if there is one
            
            if ((*tokenChar >= *type0arg) && (*tokenChar <= *type9arg))  {
                LHarg = ((ccInt) *tokenChar) - ((ccInt) *type0arg);
                if (LHarg == (ccInt) (*chararg - *type0arg))  errOut(char_read_err, loopCmd+1)
                if (LHarg == (ccInt) (*stringarg - *type0arg))  errOut(string_read_err, loopCmd+1)
                numArgs = 1;
                expectLHarg = ccTrue;
                do  {  tokenChar++;  }
                while ((lettertype(tokenChar) == unprintable) || (lettertype(tokenChar) == a_space));  }
            
            
                // removable expressions (comments) can happen irrespective of whether there is a left-hand argument
            
            if (tobeRemoved)  optionalLHarg = ccTrue;
            else  optionalLHarg = ccFalse;
            
            
                // now read in each token/argument type
            
            while (*tokenChar != 0)  {
                
                ccBool isOptional = (*tokenChar == *optionalargs);
                
                while ((lettertype(tokenChar) == a_space) || (lettertype(tokenChar) == unprintable))  tokenChar++;
                if (*tokenChar == 0)  break;
                
                loopToken++;
                if (addElements(&(compiler->tokenSpecs), 1, ccTrue) != passed)  errOut(out_of_memory_err, loopCmd+1)
                
                aOrtrn = addTokenSpec(compiler, &tokenChar, &(tokenSpec(loopToken)->name), loopToken, ccFalse,
                                        expectLHarg, optionalLHarg, loopToken-firstToken, 0);
                if (aOrtrn != passed)  errOut(aOrtrn, loopCmd+1)
                
                
                    // if there's a right-hand argument (or an argument in between tokens), mark its type
                
                if ((*tokenChar >= *type0arg) && (*tokenChar <= *commentarg))  {
                    RHarg = ((ccInt) *tokenChar) - ((ccInt) *type0arg);
                    numArgs++;
                    tokenChar++;        }
                else  RHarg = -1;
                
                
                    // store the token information and move on
                
                tokenSpec(loopToken)->isOptional = isOptional;
                tokenSpec(loopToken)->tobeRemoved = tobeRemoved;
                tokenSpec(loopToken)->leftArgType = LHarg;
                tokenSpec(loopToken)->rightArgType = RHarg;
                if (loopToken != firstToken)  {
                    tokenSpec(loopToken)->prevToken = loopToken-1;
                    tokenSpec(loopToken-1)->nextToken = loopToken;   }
                
                LHarg = RHarg;
            }
            
            
                // now store info about the command as a whole -- we use the first token for storing this information
                // first store the precedence level of the command
            
            if ((tokenSpec(firstToken)->leftArgType == -1) && (tokenSpec(loopToken)->rightArgType == -1))  {
                tokenSpec(firstToken)->precedence = numOoOs+2;        }
            else  {
                tokenSpec(firstToken)->precedence = commandTokens[loopCmd].precedence;
                
                if ((commandTokens[loopCmd].precedence < 1) || (commandTokens[loopCmd].precedence > numOoOs))  {
                    errOut(out_of_range_err, loopCmd+1)
        }   }   }
        
        
            // a character or string has to be flanked by opening and closing tokens
        
        if (RHarg == (ccInt) (*chararg - *type0arg))  errOut(char_read_err, loopCmd+1)
        if (RHarg == (ccInt) (*stringarg - *type0arg))  errOut(string_read_err, loopCmd+1)
        
        
            // read in the return types of the command
        
        oneChar = (char *) commandTokens[loopCmd].rtrnTypeString;
        
        if (*oneChar == *argXtype)  {
            tokenSpec(firstToken)->rtrnTypes[10] = ccTrue;       }
        else  {
        while (*oneChar != 0)  {
            if ((*oneChar >= '0') && (*oneChar <= '9'))  {
                tokenSpec(firstToken)->rtrnTypes[(*oneChar)-'0'] = ccTrue;
                if (firstRtrnType == -1)  firstRtrnType = (*oneChar)-'0';
                if ((*tokenChar >= *type0arg_adapter) && (*tokenChar <= *noarg_adapter))  {
                    compiler->adapters[(*tokenChar)-(*type0arg_adapter)][(*oneChar)-'0'] = firstToken;
            }   }
            
            oneChar++;
        }}
        
        
            // parse the string that stores the command's bytecode
        
        tokenSpec(firstToken)->firstCodeWord = compiler->allCodeWords.elementNum+1;
        
        
        for (loopJump = 0; loopJump < 9; loopJump++)  {  jumpMarkers[loopJump] = jumpTo[loopJump] = 0;  }
        
        
            // case #1:  the string is raw bytecode (i.e. it has an 'inbytecode' character at the beginning)
        
        oneChar = (char *) commandTokens[loopCmd].translation;
        if (*oneChar == *inbytecode)  {
            oneChar++;
            while (*oneChar != 0)  {
                while ( (*oneChar == ' ') || (*oneChar == '\t') ||
                        ((lettertype(oneChar) == unprintable) && (*oneChar != anonymousmember[1])) )  {
                    oneChar++;      }
                
                if (*oneChar != 0)  {
                    
                    ccInt intNum = 0, wordsToAdd = 1, wordPosition, wordType = -1;          // an ordinary command word
                    char *holdNumPos = NULL;
                    
                    if (*oneChar == anonymousmember[1])  {
                        oneChar++;
                        wordType = 4;
                        wordsToAdd = 2;         }
                    
                    else  {
                        if ((*oneChar == 'A') || (*oneChar == 'a'))  wordType = 1;        // an argument
                        else if ((*oneChar == 'P') || (*oneChar == 'p'))  wordType = 2;   // a code position marker
                        else if ((*oneChar == 'J') || (*oneChar == 'j'))  wordType = 3;   // a jump offset
                        
                        if (wordType != -1)  {
                            oneChar++;
                            wordsToAdd = 3;     }
                        
                        holdNumPos = oneChar;
                        if (readNum(&oneChar, &theNum, &ifFloat) != passed)
                            errOut(read_number_err, loopCmd+1)
                        else if ((ifFloat) || ((wordType != -1) && ((theNum < 1) || (theNum > 9))))
                            errOut(out_of_range_err, loopCmd+1)
                        intNum = (ccInt) theNum;
                        
                        if ((wordType == 1) && (intNum > numArgs))
                            errOut(out_of_range_err, loopCmd+1)       }
                    
                    if ((wordType == -1) && (intNum == 0))  {  wordType = 0;  wordsToAdd = 2;  }
                    if (wordType == 2)  {
                        numJumps++;
                        jumpMarkers[intNum-1] = 1;
                        if (numJumps > 9)  {
                            errOut(out_of_range_err, loopCmd+1)
                    }   }
                    
                    if (wordType == 3)  jumpTo[intNum-1] = 1;
                    
                    wordPosition = compiler->allCodeWords.elementNum+1;
                    if (addElements(&(compiler->allCodeWords), wordsToAdd, ccFalse) != passed)  errOut(out_of_memory_err, loopCmd+1)
                    
                    if (wordType == -1)  {
                        *LL_int(&(compiler->allCodeWords), wordPosition) = intNum;
                        if (intNum == 0)  *LL_int(&(compiler->allCodeWords), wordPosition+1) = 0;      }
                    else  {
                        *LL_int(&(compiler->allCodeWords), wordPosition) = 0;
                        *LL_int(&(compiler->allCodeWords), wordPosition+1) = wordType;
                        if (wordsToAdd == 3)  {
                            *LL_int(&(compiler->allCodeWords), wordPosition+2) = intNum;
        }   }  }   }   }
        
        
            // case #2:  the string is a macro command -- compile it using the commands we've already encountered
        
        else if (!tobeRemoved)  {
            tokenSpec(firstToken)->numCodeWords = 0;        // temporary patch, to ensure we can compile the macro string
            
            for (loopArgCmd = *arg1; loopArgCmd <= *arg9; loopArgCmd++)  lettertypeArray[loopArgCmd] = a_symbol;  
            *rtrn = tokenize(compiler, oneChar, firstRtrnType);
            for (loopArgCmd = *arg1; loopArgCmd <= *arg9; loopArgCmd++)  lettertypeArray[loopArgCmd] = unprintable;  
            
            if (*rtrn == passed)  *rtrn = reorderTokens(compiler, firstRtrnType, ccFalse);
            if (*rtrn == passed)  *rtrn = addElements(&(compiler->allCodeWords), compiler->bytecode.elementNum, ccFalse);
            if (*rtrn != passed)  errOut(*rtrn, loopCmd+1)
            
            copyElements(&(compiler->bytecode), 1,
                    &(compiler->allCodeWords), tokenSpec(firstToken)->firstCodeWord, compiler->bytecode.elementNum);
        }
        
        for (loopJump = 0; loopJump < 9; loopJump++)  {
        if ((jumpMarkers[loopJump] == 0) && (jumpTo[loopJump] != 0))  {
            errOut(out_of_range_err, loopCmd+1)
        }}
        
        tokenSpec(firstToken)->numCodeWords = compiler->allCodeWords.elementNum - tokenSpec(firstToken)->firstCodeWord + 1;
    }
    
    
        // defragment all the linked lists to make the parsing faster, and count number of operators
    
    if ((defragmentLinkedList(&(compiler->allCodeWords)) != passed)
                || (defragmentLinkedList(&(compiler->tokenSpecs)) != passed))  errOut(out_of_memory_err, 0)
    
    for (loopList = 0; loopList < 128; loopList++)  {
    if (defragmentLinkedList(compiler->tokens + loopList) != passed)  {
        errOut(out_of_memory_err, 0)
    }}
    
    return compiler;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %rbx
movl %ecx, %r13d
movq %rdx, %r12
movl %esi, %r15d
movq %rdi, %rbp
movl $0x14c0, %edi           # imm = 0x14C0
callq 0x81d0
andl $0x0, (%rbx)
testq %rax, %rax
je 0x945a
movq %rax, %r14
andq $0x0, 0x1208(%rax)
andq $0x0, 0x1228(%rax)
andq $0x0, 0x1448(%rax)
andq $0x0, 0x1468(%rax)
andq $0x0, 0x1488(%rax)
andq $0x0, 0x14a8(%rax)
andq $0x0, 0x1438(%rax)
leaq 0x1254(%rax), %rcx
xorl %eax, %eax
movq %rcx, 0x88(%rsp)
cmpq $0xb, %rax
je 0x93b2
xorl %edx, %edx
cmpq $0xb, %rdx
je 0x93a9
andl $0x0, (%rcx,%rdx,4)
incq %rdx
jmp 0x939a
incq %rax
addq $0x2c, %rcx
jmp 0x9392
movq %rbp, 0x90(%rsp)
movq %r15, 0x68(%rsp)
leaq 0x1200(%r14), %rax
movq %rax, 0x8(%rsp)
leaq 0x1440(%r14), %r15
leaq 0x1480(%r14), %rbp
pushq $0x8
popq %rax
cmpq $0x1008, %rax           # imm = 0x1008
je 0x93ef
andq $0x0, (%r14,%rax)
addq $0x20, %rax
jmp 0x93dc
movq %r13, 0x70(%rsp)
movslq %r13d, %rax
leaq 0x8(,%rax,4), %rdi
callq 0x81d0
movq %rax, 0x1240(%r14)
pushq $0x3
popq %rsi
pushq $0x38
popq %rdx
movsd 0xfbef(%rip), %xmm0     # 0x19008
pushq $0x1
popq %r13
movq 0x8(%rsp), %rdi
movl %r13d, %ecx
callq 0x83d5
testl %eax, %eax
jne 0x9452
leaq 0x1220(%r14), %rdi
pushq $0x4
popq %rdx
movsd 0xfbc8(%rip), %xmm0     # 0x19008
movq %rdi, 0x28(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x83d5
testl %eax, %eax
je 0x947f
movq %r14, %rdi
callq 0x9fbe
movl $0x1, (%rbx)
andl $0x0, 0x1ae41(%rip)     # 0x242a8
xorl %r14d, %r14d
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x1240(%r14)
je 0x9452
pushq $0x38
popq %rdx
movsd 0xfb74(%rip), %xmm0     # 0x19008
movq %r15, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x83d5
testl %eax, %eax
jne 0x9452
leaq 0x1460(%r14), %r15
pushq $0x4
popq %rdx
xorpd %xmm0, %xmm0
movq %r15, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x83d5
testl %eax, %eax
jne 0x9452
pushq $0x4
popq %rdx
xorpd %xmm0, %xmm0
movq %rbp, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x83d5
testl %eax, %eax
jne 0x9452
leaq 0x14a0(%r14), %rdi
pushq $0x10
popq %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x83d5
testl %eax, %eax
jne 0x9452
movq 0x70(%rsp), %rax
leal 0x2(%rax), %esi
movl $0x400, %eax            # imm = 0x400
movq 0x68(%rsp), %rdx
cmpq $0x480, %rax            # imm = 0x480
je 0x9520
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x950e
movq 0x70(%rsp), %rcx
movl %ecx, %eax
orl %edx, %eax
js 0x9564
movq %r15, 0x80(%rsp)
xorl %r15d, %r15d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
cmpq %r15, %rax
je 0x9577
movl (%r12,%r15,4), %ecx
movq 0x1240(%r14), %rdx
movl %ecx, (%rdx,%r15,4)
decl %ecx
cmpl $0x2, %ecx
jae 0x95e2
incq %r15
jmp 0x9540
movq %r14, %rdi
callq 0x9fbe
movl $0x2, (%rbx)
jmp 0x9460
movl %esi, 0x58(%rsp)
movq 0x1240(%r14), %rax
movq 0x70(%rsp), %rdx
movl %edx, %ecx
movabsq $0x100000001, %rsi      # imm = 0x100000001
movq %rsi, (%rax,%rcx,4)
orl $-0x1, 0x1250(%r14)
orq $-0x1, 0x1248(%r14)
leal 0x1(%rdx), %eax
movl %eax, 0x5c(%rsp)
xorl %edi, %edi
pushq $0x18
popq %rbp
leaq 0x20(%rdi), %r15
cmpq $0x1020, %r15           # imm = 0x1020
je 0x95ff
addq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movsd 0xfa39(%rip), %xmm0     # 0x19008
xorl %ecx, %ecx
callq 0x83d5
movq %r15, %rdi
testl %eax, %eax
je 0x95b3
jmp 0x9452
movq %r14, %rdi
callq 0x9fbe
movl $0x2, (%rbx)
notl %r15d
movl %r15d, 0x1acae(%rip)    # 0x242a8
jmp 0x9467
movq 0x8(%rsp), %r12
movq %r12, %rdi
movl %r13d, %esi
callq 0x9088
orl $-0x1, 0x14(%rax)
movq %r12, %rdi
movl %r13d, %esi
callq 0x9088
orl $-0x1, 0x10(%rax)
movq %r12, %rdi
movl %r13d, %esi
callq 0x9088
movl 0x58(%rsp), %ebp
movl %ebp, 0xc(%rax)
movq %r12, %rdi
movl %r13d, %esi
callq 0x9088
movl %r13d, 0x2c(%rax)
pushq $0x2
popq %r15
movq %r12, %rdi
movl %r15d, %esi
callq 0x9088
orl $-0x1, 0x14(%rax)
movq %r12, %rdi
movl %r15d, %esi
callq 0x9088
orl $-0x1, 0x10(%rax)
movq %r12, %rdi
movl %r15d, %esi
callq 0x9088
movl %ebp, 0xc(%rax)
movq %r12, %rdi
movl %r15d, %esi
callq 0x9088
movl %r13d, 0x2c(%rax)
movq %r12, %rdi
movl %r15d, %esi
callq 0x9088
movb $0x1, 0x22(%rax)
movl $0x2, 0x1434(%r14)
pushq $0x3
popq %rbp
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
orl $-0x1, 0x10(%rax)
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
movl $0x64, 0x14(%rax)
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
movl 0x5c(%rsp), %ecx
movl %ecx, 0xc(%rax)
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
movl %r13d, 0x2c(%rax)
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
movl $0x6, 0x30(%rax)
pushq $-0xa
popq %r15
testq %r15, %r15
je 0x970c
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
movb $0x1, 0x22(%rax,%r15)
incq %r15
jmp 0x96f2
pushq $0x6
popq %rsi
pushq $0x1
popq %r12
movq 0x28(%rsp), %r15
movq %r15, %rdi
movl %r12d, %edx
callq 0x8b0f
testl %eax, %eax
je 0x973e
movq %r14, %rdi
callq 0x9fbe
movl %r12d, (%rbx)
movl %r12d, 0x1ab6f(%rip)    # 0x242a8
jmp 0x9467
movl (%r15), %esi
addl $-0x3, %esi
movq %r15, %rdi
callq 0x9088
movl %r12d, (%rax)
movl (%r15), %esi
decl %esi
movq %r15, %rdi
callq 0x9088
movl %r12d, (%rax)
movl (%r15), %esi
movq %r15, %rdi
callq 0x9088
xorl %edx, %edx
movq 0x68(%rsp), %rcx
testl %ecx, %ecx
cmovlel %edx, %ecx
movl %r12d, (%rax)
xorl %eax, %eax
movl %ebp, %edx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x68(%rsp)
cmpq %rcx, %rax
je 0x9f49
movq %rax, 0x78(%rsp)
shlq $0x5, %rax
movq 0x90(%rsp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, 0x60(%rsp)
movq (%rcx,%rax), %rbp
movq %rbp, 0x30(%rsp)
movq 0x10(%rcx,%rax), %rax
movb $0x1, 0x10(%rsp)
cmpb $0x1b, (%rax)
je 0x97d3
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rax
cmpb $0x1b, (%rax)
sete 0x10(%rsp)
movq 0x18(%rsp), %rax
incl %eax
movl %eax, 0x4(%rsp)
movb (%rbp), %al
leal 0x10(%rax), %ecx
cmpb $0xd, %cl
ja 0x988a
movq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x8b0f
testl %eax, %eax
jne 0x9f18
movsbq (%rbp), %rax
cmpq $-0x5, %rax
jl 0x982a
movl 0x4(%rsp), %ecx
movl %ecx, 0x125c(%r14,%rax,4)
leaq 0x30(%rsp), %rdi
callq 0xa083
movq 0x30(%rsp), %rbp
movq 0x8(%rsp), %r12
movq %r12, %rdi
movl 0x4(%rsp), %r13d
movl %r13d, %esi
callq 0x9088
orl $-0x1, 0x10(%rax)
xorl %r15d, %r15d
cmpb $-0x5, (%rbp)
setl %r15b
movq %r12, %rdi
movl %r13d, %esi
callq 0x9088
negl %r15d
orl $0x64, %r15d
movl %r15d, 0x14(%rax)
movq %r12, %rdi
movl %r13d, %esi
callq 0x9088
movl 0x5c(%rsp), %ecx
movl %ecx, 0xc(%rax)
pushq $0x1
popq %rax
movl %eax, 0x24(%rsp)
movl %r13d, %eax
movq %rax, 0x48(%rsp)
jmp 0x9ab0
leal -0x10(%rax), %ecx
movl $0x0, 0x24(%rsp)
cmpb $0x9, %cl
ja 0x98c9
leaq 0x178df(%rip), %rdx     # 0x21180
movzbl 0x1(%rbp), %eax
incq %rbp
cmpl $0x2, (%rdx,%rax,4)
jb 0x98a1
movzbl %cl, %ecx
movl %ecx, 0x40(%rsp)
movq %rbp, 0x30(%rsp)
movb $0x1, %cl
movl %ecx, 0x54(%rsp)
pushq $0x1
popq %rcx
movl %ecx, 0x24(%rsp)
jmp 0x98d8
pushq $-0x1
popq %rcx
movl %ecx, 0x40(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x18(%rsp), %rdx
pushq $-0x1
popq %rsi
movq %rdx, 0x48(%rsp)
testb %al, %al
leaq 0x17892(%rip), %rdx     # 0x21180
je 0x9a3b
decq %rbp
movzbl 0x1(%rbp), %ecx
incq %rbp
cmpl $0x2, (%rdx,%rcx,4)
jb 0x98f7
cmpb $0x1e, %al
sete %r13b
movq %rbp, 0x30(%rsp)
testb %cl, %cl
je 0x9a3b
movq 0x8(%rsp), %r15
movq %r15, %rdi
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x8b0f
testl %eax, %eax
jne 0x9f18
movq 0x48(%rsp), %rbp
leal 0x1(%rbp), %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movl %ebp, %r10d
subl 0x18(%rsp), %r10d
subq $0x8, %rsp
movzbl 0x18(%rsp), %r11d
movzbl 0x5c(%rsp), %r9d
movq %r14, %rdi
leaq 0x38(%rsp), %rsi
movq %rax, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
pushq $0x0
pushq %r10
pushq %r11
callq 0xa0a9
addq $0x20, %rsp
testl %eax, %eax
jne 0x9f2b
movq 0x30(%rsp), %rbp
movb (%rbp), %al
addb $-0x10, %al
cmpb $0xd, %al
ja 0x99a8
movzbl %al, %eax
movl %eax, 0x44(%rsp)
incl 0x24(%rsp)
incq %rbp
movq %rbp, 0x30(%rsp)
jmp 0x99af
pushq $-0x1
popq %rax
movl %eax, 0x44(%rsp)
movq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movb %r13b, 0x8(%rax)
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movb 0x10(%rsp), %cl
movb %cl, 0x9(%rax)
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movl 0x40(%rsp), %ecx
movl %ecx, 0x10(%rax)
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movl 0x44(%rsp), %esi
movl %esi, 0x14(%rax)
movq 0x48(%rsp), %r13
cmpl 0x18(%rsp), %r13d
je 0x9a2c
movq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movl %r13d, 0x24(%rax)
movq %r15, %rdi
movl %r13d, %esi
callq 0x9088
movl 0x44(%rsp), %esi
movl %r12d, 0x28(%rax)
movb (%rbp), %al
movl %r12d, %edx
movl %esi, 0x40(%rsp)
jmp 0x98e0
movl %esi, %r13d
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
cmpl $-0x1, 0x10(%rax)
jne 0x9a6b
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x9088
cmpl $-0x1, 0x14(%rax)
je 0x9eeb
movq 0x60(%rsp), %r15
movl 0x8(%r15), %r12d
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
movl %r12d, 0xc(%rax)
movl 0x8(%r15), %eax
testl %eax, %eax
jle 0x9f05
cmpl 0x70(%rsp), %eax
jg 0x9f05
cmpl $0xc, %r13d
je 0x9f9e
cmpl $0xb, %r13d
je 0x9f9e
movq 0x60(%rsp), %rax
movq 0x10(%rax), %r15
movq %r15, 0x38(%rsp)
movb (%r15), %al
cmpb $-0x2, %al
jne 0x9d4f
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
movb $0x1, 0x22(%rax)
pushq $-0x1
popq %r12
movq 0x28(%rsp), %rax
movl (%rax), %ebp
incl %ebp
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
movl %ebp, 0x2c(%rax)
xorl %eax, %eax
cmpq $0x9, %rax
je 0x9b16
andl $0x0, 0xd0(%rsp,%rax,4)
andl $0x0, 0xa0(%rsp,%rax,4)
incq %rax
jmp 0x9afb
movq 0x60(%rsp), %rax
movq 0x18(%rax), %r13
movq %r13, 0x38(%rsp)
cmpb $0x1c, (%r13)
jne 0x9db9
incq %r13
movq %r13, 0x38(%rsp)
movl $0x0, 0x10(%rsp)
leaq 0x1763a(%rip), %rdx     # 0x21180
movb (%r13), %cl
testb %cl, %cl
je 0x9e7f
incq %r13
cmpb $0x9, %cl
je 0x9b6d
movzbl %cl, %eax
cmpl $0x20, %eax
je 0x9b6d
cmpb $0x1a, %cl
je 0x9b73
cmpl $0x0, (%rdx,%rax,4)
jne 0x9b73
movb (%r13), %cl
jmp 0x9b52
leaq -0x1(%r13), %rcx
movq %rcx, 0x38(%rsp)
movb $0x1, %r15b
leal -0x41(%rax), %ecx
cmpl $0x2f, %ecx
ja 0x9bbe
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0x9be8
movabsq $0x20000000200, %rdx    # imm = 0x20000000200
btq %rcx, %rdx
jb 0x9be1
movabsq $0x800000008000, %rdx   # imm = 0x800000008000
btq %rcx, %rdx
jae 0x9bbe
xorl %r15d, %r15d
pushq $0x2
jmp 0x9bea
testl %eax, %eax
je 0x9d31
cmpl $0x1a, %eax
jne 0x9d42
movq %r13, 0x38(%rsp)
xorl %ecx, %ecx
pushq $0x2
popq %rsi
pushq $0x4
popq %rbp
jmp 0x9c6b
xorl %r15d, %r15d
pushq $0x3
jmp 0x9bea
pushq $0x1
popq %rbp
movq %r13, 0x38(%rsp)
movl %r15d, %r13d
xorl %r15d, %r15d
pushq $0x3
popq %r12
leaq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x17(%rsp), %rdx
callq 0xa2e3
testl %eax, %eax
jne 0x9f39
cmpb $0x0, 0x17(%rsp)
jne 0x9f05
movsd 0x98(%rsp), %xmm0
testb %r15b, %r15b
jne 0x9c52
movsd 0xf3ce(%rip), %xmm1     # 0x19008
ucomisd %xmm0, %xmm1
ja 0x9f05
ucomisd 0xf3c4(%rip), %xmm0     # 0x19010
ja 0x9f05
cvttsd2si %xmm0, %ecx
testb %r13b, %r13b
movl %r12d, %esi
je 0x9c6b
pushq $0x1
popq %rbp
cmpl %ecx, 0x24(%rsp)
jl 0x9f05
movl %ebp, %eax
notl %eax
orl %ecx, %eax
pushq $0x2
popq %rax
cmovel %eax, %esi
movl $0x0, %eax
cmovel %eax, %ebp
movslq %ecx, %rax
cmpl $0x3, %ebp
movl %ecx, 0x18(%rsp)
je 0x9cb0
cmpl $0x2, %ebp
jne 0x9cbb
movl $0x1, 0x9c(%rsp,%rax,4)
movl 0x10(%rsp), %eax
cmpl $0x9, %eax
jge 0x9f05
incl %eax
movl %eax, 0x10(%rsp)
jmp 0x9cbb
movl $0x1, 0xcc(%rsp,%rax,4)
movq 0x28(%rsp), %r12
movl (%r12), %r15d
movq %r12, %rdi
movl %esi, %r13d
xorl %edx, %edx
callq 0x8b0f
testl %eax, %eax
jne 0x9f18
leal 0x1(%r15), %esi
movq %r12, %rdi
callq 0x9088
cmpl $-0x1, %ebp
je 0x9d06
andl $0x0, (%rax)
leal 0x2(%r15), %esi
movq %r12, %rdi
callq 0x9088
movl %ebp, (%rax)
pushq $0x3
popq %rax
cmpl $0x3, %r13d
je 0x9d1b
jmp 0x9d31
movl 0x18(%rsp), %ecx
movl %ecx, (%rax)
testl %ecx, %ecx
jne 0x9d31
movl $0x0, 0x18(%rsp)
pushq $0x2
popq %rax
addl %eax, %r15d
movq 0x28(%rsp), %rdi
movl %r15d, %esi
callq 0x9088
movl 0x18(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x17448(%rip), %rdx     # 0x21180
movq 0x38(%rsp), %r13
jmp 0x9b46
xorl %r13d, %r13d
pushq $-0x1
popq %rbp
pushq $0x1
jmp 0x9bf8
pushq $-0x1
popq %r12
movq 0x88(%rsp), %r13
testb %al, %al
je 0x9adf
addb $-0x30, %al
cmpb $0x9, %al
ja 0x9db0
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
movsbq (%r15), %rcx
movb $0x1, -0x18(%rcx,%rax)
cmpl $-0x1, %r12d
jne 0x9d8e
movsbl (%r15), %r12d
addl $-0x30, %r12d
movb (%rbp), %al
addb $0x10, %al
cmpb $0xa, %al
ja 0x9db0
movzbl %al, %eax
movsbq (%r15), %rcx
imulq $0x2c, %rax, %rax
addq %r13, %rax
movl 0x4(%rsp), %edx
movl %edx, -0xc0(%rax,%rcx,4)
movb 0x1(%r15), %al
incq %r15
jmp 0x9d5b
cmpb $0x0, 0x10(%rsp)
leaq 0x173bb(%rip), %r15     # 0x21180
jne 0x9e7f
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
andl $0x0, 0x30(%rax)
xorl %eax, %eax
cmpq $0x9, %rax
je 0x9df3
movl $0x5, 0x44(%r15,%rax,4)
incq %rax
jmp 0x9ddf
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0xa417
movl %eax, (%rbx)
xorl %eax, %eax
cmpq $0x9, %rax
je 0x9e16
andl $0x0, 0x44(%r15,%rax,4)
incq %rax
jmp 0x9e05
cmpl $0x0, (%rbx)
jne 0x9f94
movq %r14, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0xaec3
movl %eax, (%rbx)
testl %eax, %eax
jne 0x9f94
movq 0x80(%rsp), %rax
movl (%rax), %esi
movq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x8b0f
movl %eax, (%rbx)
testl %eax, %eax
jne 0x9f94
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
movl 0x2c(%rax), %ecx
movq 0x80(%rsp), %rdi
movl (%rdi), %r8d
pushq $0x1
popq %rsi
movq 0x28(%rsp), %rdx
callq 0x87c7
xorl %eax, %eax
cmpq $0x9, %rax
je 0x9ea0
cmpl $0x0, 0xa0(%rsp,%rax,4)
jne 0x9e9b
cmpl $0x0, 0xd0(%rsp,%rax,4)
jne 0x9f05
incq %rax
jmp 0x9e81
movq 0x28(%rsp), %rax
movl (%rax), %ebp
movq 0x8(%rsp), %r15
movq %r15, %rdi
movl 0x4(%rsp), %r12d
movl %r12d, %esi
callq 0x9088
subl 0x2c(%rax), %ebp
incl %ebp
movq %r15, %rdi
movl %r12d, %esi
callq 0x9088
movl %ebp, 0x30(%rax)
movq 0x78(%rsp), %rax
incq %rax
movq 0x48(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x68(%rsp), %rcx
jmp 0x9787
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x9088
movl 0x58(%rsp), %ecx
movl %ecx, 0xc(%rax)
jmp 0x9a9c
movq %r14, %rdi
callq 0x9fbe
movl $0x2, (%rbx)
jmp 0x9fac
movq %r14, %rdi
callq 0x9fbe
movl $0x1, (%rbx)
jmp 0x9fac
movl %eax, %ebp
movq %r14, %rdi
callq 0x9fbe
movl %ebp, (%rbx)
jmp 0x9fac
movq %r14, %rdi
callq 0x9fbe
movl $0x6, (%rbx)
jmp 0x9fac
movq 0x28(%rsp), %rdi
callq 0x8b50
testl %eax, %eax
jne 0x9452
movq 0x8(%rsp), %rdi
callq 0x8b50
testl %eax, %eax
jne 0x9452
xorl %edi, %edi
leaq 0x20(%rdi), %r15
cmpq $0x1020, %r15           # imm = 0x1020
je 0x946a
addq %r14, %rdi
callq 0x8b50
movq %r15, %rdi
testl %eax, %eax
je 0x9f6f
jmp 0x9452
movq %r14, %rdi
callq 0x9fbe
jmp 0x9fac
movq %r14, %rdi
callq 0x9fbe
movl $0x5, (%rbx)
movq 0x78(%rsp), %rax
incl %eax
movl %eax, 0x1a2ef(%rip)     # 0x242a8
jmp 0x9467