// File: /workspace/github_c_makefile_star2_O1/heltilda[P]cicada/cmpile.c
// Function: tokenize
ccInt tokenize(compiler_type *compiler, char *charPtr, ccInt scriptType)
{
    linkedlist nextTokenStack;
    ccInt prevTokenType = 0, theTokenType = 0, tokenErrPosition = 1, prevErrPosition, rtrn;
    ccInt nextRightArgType = scriptType, lastRightArgType = scriptType, loopSkippedToken, expectedArgType;
    ccFloat theNum;
    char *tokenCharStartPtr = charPtr, *scriptStartPtr = charPtr;
    ccBool expectLHarg = ccFalse, ifFloat;
    tokenSpecType *theTokenSpec = NULL;
    
    typedef struct {
        char *name;
        ccInt tokenID;
        ccInt prevScriptToken;    } tokenStackElementType;
    
    resizeLinkedList(&(compiler->scriptTokens), 0, ccFalse);
    
    while (lettertype(charPtr) == unprintable)  charPtr++;
    
    rtrn = newLinkedList(&nextTokenStack, 0, sizeof(tokenStackElementType), 1., ccFalse);
    if (rtrn != passed)  return rtrn;
    
    while (*charPtr != 0)  {
        
        ccInt constDataSize = 0, *constData = NULL, otherTokenType = 0, varID = 0;
        ccBool isNumber = ccFalse;
        
        prevTokenType = theTokenType;
        prevErrPosition = tokenErrPosition;
        
        theTokenType = 0;
        
            // read to the end of the longest token that matches our starting point
            // theTokenType > 0 means it's a known operator; theTokenType < 0 means that it's a user-defined variable
            // if the token wasn't found, then theTokenType == 0
        
        while ((lettertype(charPtr) == a_space) || (lettertype(charPtr) == unprintable))  charPtr++;
        if (*charPtr == 0)  break;
        
        tokenCharStartPtr = charPtr;
        tokenErrPosition = (ccInt) (tokenCharStartPtr-scriptStartPtr+1);
        
        
            // if it's a numeric constant, read it and store the number
        
        if ( ((*charPtr >= '0') && (*charPtr <= '9')) || (*charPtr == '-') || (*charPtr == '.')) {
            
            rtrn = readNum(&charPtr, &theNum, &ifFloat);
            if ((rtrn == passed) || (rtrn == overflow_err) || (rtrn == underflow_err))  {
                if (rtrn != passed)  {  compilerWarning = rtrn;  errPosition = tokenErrPosition;  }
                
                isNumber = ccTrue;
                
                if (expectLHarg)  charPtr = tokenCharStartPtr;
                else  {
                    if ((!ifFloat) && (compiler->specialTokens[0] == -1))  ifFloat = ccTrue;
                    
                    if ((!ifFloat) && (compiler->specialTokens[0] > -1))  {
                        theTokenType = compiler->specialTokens[0];
                        constDataSize = 1;
                        constData = (ccInt *) malloc(constDataSize*sizeof(ccInt));
                        if (constData == NULL)  errOut(out_of_memory_err)
                        *constData = (ccInt) theNum;          }
                    
                    else if ((ifFloat) && (compiler->specialTokens[1] > -1))  {
                        theTokenType = compiler->specialTokens[1];
                        constDataSize = (ccInt) ceil(1.*sizeof(ccFloat)/sizeof(ccInt));
                        constData = (ccInt *) malloc(constDataSize*sizeof(ccInt));
                        if (constData == NULL)  errOut(out_of_memory_err)
                        *((ccFloat *) constData) = theNum;
        }   }  }    }
        
        
            // if we're reading a macro-command and it's an argument, store the arg-command and argument number
        
        else if ((*charPtr >= *arg1) && (*charPtr <= *arg9))  {
            
            theTokenType = 3;
            
            constData = (ccInt *) malloc(sizeof(ccInt));
            if (constData == NULL)  errOut(out_of_memory_err)
            *((ccInt *) constData) = (*charPtr) - (*arg1) + 1;
            constDataSize = 1;
            
            charPtr++;          }
        
        
            // otherwise we assume it's an operator and use the token tables to find out which one it is
        
        if (theTokenType == 0)  {
            
            linkedlist *theList = compiler->tokens + ((ccInt) *charPtr);
            ccInt tokenListElement, ifFound;
            tokenStringType *theTokenString = NULL;
            ccBool followingToken = ccFalse;
            
            ifFound = findToken(compiler, theList, &charPtr, &tokenListElement, ccFalse, ccTrue);
            if (ifFound)  {
                
                ccInt loopNextToken, nextTokenID = 0;
                
                theTokenString = (tokenStringType *) element(theList, tokenListElement);
                if ((theTokenString->tokenID_LHarg == 0) && (theTokenString->tokenID_noLHarg == 0))  followingToken = ccTrue;
                varID = theTokenString->varID;
                
                
                    // it might be a 'next' token we are expecting ('in' after 'for' for example)...
                    
                    // if we skipped an optional argument or two, mark their nextScriptToken fields as 0
                
                for (loopNextToken = nextTokenStack.elementNum; loopNextToken >= 1; loopNextToken--)  {
                    if ( (theTokenString->name == tokenStackElement(loopNextToken)->name) && ((nextTokenID == 0)
                                    || (tokenSpec(tokenStackElement(loopNextToken)->tokenID)->isOptional == ccFalse)) )  {
                        nextTokenID = loopNextToken;
                        for (loopSkippedToken = loopNextToken+1; loopSkippedToken <= nextTokenStack.elementNum; loopSkippedToken++)  {
                            ccInt pST = tokenStackElement(loopSkippedToken)->prevScriptToken;
                            if (pST > 0)  scriptToken(pST)->nextScriptToken = 0;
                    }   }
                    if (tokenSpec(tokenStackElement(loopNextToken)->tokenID)->isOptional == ccFalse)  break;         }
                
                if (nextTokenID != 0)  {
                    theTokenType = tokenStackElement(nextTokenID)->tokenID;
                    deleteElements(&nextTokenStack, nextTokenID, nextTokenStack.elementNum);      }
                
                
                    // otherwise, it's probably a stored token with or without a left-hand argument
                
                else if (!expectLHarg)  {
                    theTokenType = theTokenString->tokenID_noLHarg;   }
                else  {
                    theTokenType = theTokenString->tokenID_LHarg;   }
                
                if (theTokenType > 0)  theTokenSpec = tokenSpec(theTokenType);
                
                
                    // if we expect a token without, and only have a token with, a left argument,
                    // then try to fix this problem with a nothing-adapter
                    
                    // case 1:  we hit the end of a block and expect an argument (such as '(a +)' or '{x =}')
                
                if ((!expectLHarg) && (nextTokenID != 0) && (theTokenSpec->leftArgType <= (*typeXarg-*type0arg)))  {
                    
                    expectedArgType = theTokenSpec->leftArgType;
                    if (prevTokenType > 0)  {
                    if (tokenSpec(prevTokenType)->precedence > theTokenSpec->precedence)  {
                        expectedArgType = tokenSpec(prevTokenType)->rightArgType;
                    }}
                    
                    if (expectedArgType != constDataArgType)  {
                    if (compiler->adapters[10][expectedArgType] != 0)  {
                        rtrn = addScriptToken(compiler, compiler->adapters[10][expectedArgType], tokenErrPosition, NULL, 0);
                        if (rtrn != passed)  errOut(rtrn)
                }}  }
                
                    // case 2:  we aren't expecting a left-hand argument and we only have an operator that takes one (e.g. '+2')
                
                else if ((!expectLHarg) && (theTokenType == 0) && (!followingToken))  {
                    
                    otherTokenType = theTokenString->tokenID_LHarg;
                    expectedArgType = tokenSpec(otherTokenType)->leftArgType;
                    if (prevTokenType > 0)  {
                    if (tokenSpec(prevTokenType)->precedence > tokenSpec(otherTokenType)->precedence)  {
                        expectedArgType = tokenSpec(prevTokenType)->rightArgType;
                    }}
                    
                    if (expectedArgType != constDataArgType)  {
                    if (compiler->adapters[10][expectedArgType] != 0)  {
                        rtrn = addScriptToken(compiler, compiler->adapters[10][expectedArgType], tokenErrPosition, NULL, 0);
                        if (rtrn != passed)  errOut(rtrn)
                        theTokenType = otherTokenType;
                        theTokenSpec = tokenSpec(theTokenType);
                        expectLHarg = !expectLHarg;
            }   }   }}
            
            
            if (theTokenType > 0)  {
            if (theTokenSpec->nextToken != 0)  {
                rtrn = addElements(&nextTokenStack, 1, ccFalse);
                if (rtrn != passed)  errOut(rtrn)
                tokenStackElement(nextTokenStack.elementNum)->name = tokenSpec(theTokenSpec->nextToken)->name;
                tokenStackElement(nextTokenStack.elementNum)->tokenID = theTokenSpec->nextToken;
                if (theTokenSpec->tobeRemoved)  {
                    tokenStackElement(nextTokenStack.elementNum)->prevScriptToken = 0;  }
                else  {
                    tokenStackElement(nextTokenStack.elementNum)->prevScriptToken = compiler->scriptTokens.elementNum+1;
            }}  }
            
            
                // alternatively, add a new variable name if it's a word that we haven't seen before
            
            else  {
                
                if ((!ifFound) && (lettertype(tokenCharStartPtr) == a_letter) && (compiler->specialTokens[2] > -1))  {
                    
                    compiler->numVariables++;
                    varID = compiler->numVariables;
                    
                    charPtr = tokenCharStartPtr;
                    rtrn = addTokenSpec(compiler, &charPtr, NULL, compiler->specialTokens[2], ccTrue, expectLHarg, ccFalse, 0, varID);
                    if (rtrn != passed)  errOut(rtrn)
                    
                    theTokenType = compiler->specialTokens[2];
                    theTokenSpec = tokenSpec(theTokenType);             }
                
                
                    // if it's none of the above throw some sort of error
                
                else  {
                    if (isNumber)  errOut(no_left_arg_allowed_err)
                    else if (!ifFound)  errOut(unknown_command_err)
                    else if (followingToken)  errOut(unexpected_token_err)
                    
                    if ((prevTokenType > 0) && (otherTokenType != 0))  {
                    if (tokenSpec(prevTokenType)->precedence > tokenSpec(otherTokenType)->precedence)  {
                        tokenErrPosition = prevErrPosition;
                        if (expectLHarg)  errOut(no_right_arg_allowed_err)
                        else  errOut(right_arg_expected_err);           }}
                    
                    if (expectLHarg)  errOut(no_left_arg_allowed_err)
                    else  errOut(left_arg_expected_err);
        }   }   }
        
        else  theTokenSpec = tokenSpec(theTokenType);
        
        if (nextRightArgType != (*commentarg - *type0arg))  lastRightArgType = nextRightArgType;
        nextRightArgType = theTokenSpec->rightArgType;
        
        
            // if it's a variable, make room for the variable ID
        
        if (varID > 0)  {
            constDataSize = 1;
            constData = (ccInt *) malloc(constDataSize*sizeof(ccInt));
            if (constData == NULL)  errOut(out_of_memory_err)
            *((ccInt *) constData) = varID;         }
        
        
            // if it's a string constant, read in the string
        
        else if ((nextRightArgType == (ccInt) (*chararg - *type0arg)) || (nextRightArgType == (ccInt) (*stringarg - *type0arg)))  {
            
            char *closingStr = tokenSpec(theTokenSpec->nextToken)->name;
            
            rtrn = readTextString(&charPtr, closingStr, &constData, &constDataSize, nextRightArgType == (ccInt) (*chararg - *type0arg));
            if (rtrn != passed)  errOut(rtrn)        }
        
        
            // store the token if it's a known symbol, or a known variable name ending at the last allowable name character,
            // and expand constants as separate tokens (as they appear as arguments in the bytecode string)
        
        if (!theTokenSpec->tobeRemoved)  {
            rtrn = addScriptToken(compiler, theTokenType, tokenErrPosition, NULL, 0);
            if (rtrn != passed)  errOut(rtrn)
            if (constData != NULL)  {
                rtrn = addScriptToken(compiler, 1, tokenErrPosition, constData, constDataSize);
                if (rtrn != passed)  errOut(rtrn)
        }   }
        
        
            // deal with the right-hand argument of the token, if it has one;
            // if it's a comment argument, skip over it
        
        if (nextRightArgType == (ccInt) (*commentarg - *type0arg))  {
            
            char *holdCharPtr;
            tokenSpecType *LHtokenSpec = theTokenSpec;
            
            
                // if this comment is contributing to the bytecode (i.e. via its flanking arguments),
                // represent the comment literal with a blank token
            
            if (!theTokenSpec->tobeRemoved)  {
                rtrn = addScriptToken(compiler, 1, tokenErrPosition, NULL, 0);
                if (rtrn != passed)  errOut(rtrn)       }
            
            theTokenType = theTokenSpec->nextToken;
            theTokenSpec = tokenSpec(theTokenType);
            
            holdCharPtr = charPtr;
            if (theTokenType >= 0)  charPtr = strstr(charPtr, theTokenSpec->name);
            if (charPtr == NULL)  {
                charPtr = holdCharPtr;
                while (*charPtr != 0)  charPtr++;   }
            
            
                // we don't expect a left-hand argument if this comment has flanking arguments (think 'type0arg | ... \n type0arg')
            
            else if ((LHtokenSpec->leftArgType != -1) || (theTokenSpec->rightArgType != -1))  {
                expectLHarg = ccFalse;
        }   }
        
        
            // move on to the next token; don't update expectLHarg if we're passing over a comment
        
        else if (theTokenSpec->leftArgType != (ccInt) (*commentarg - *type0arg))  {
            if ((nextRightArgType == -1) || (nextRightArgType == constDataArgType))  expectLHarg = ccTrue;
            else  expectLHarg = ccFalse;        }
        
        else  nextRightArgType = lastRightArgType;                  // in case this is the last thing we read
    }
    
    lastScriptChar = (ccInt) (charPtr-scriptStartPtr+1);
    
    
        // we should not be missing an argument at the end of the code block
    
    for (loopSkippedToken = nextTokenStack.elementNum; loopSkippedToken >= 1; loopSkippedToken--)  {
    if (tokenSpec(tokenStackElement(loopSkippedToken)->tokenID)->isOptional == ccTrue)  {
        ccInt pST = tokenStackElement(loopSkippedToken)->prevScriptToken;
        if (pST > 0)  scriptToken(pST)->nextScriptToken = 0;
        deleteElement(&nextTokenStack, loopSkippedToken);
    }}
    
    if ((!expectLHarg) || (nextTokenStack.elementNum > 0))  {
        
        if (compiler->scriptTokens.elementNum == 0)  rtrn = arg_expected_err;
        else if (!expectLHarg)  rtrn = right_arg_expected_err;
        else  rtrn = token_expected_err;
        
        
            // if the last operator was a comment, look back at what the previous operator wanted
        
        if (nextRightArgType != *commentarg - *type0arg)  expectedArgType = nextRightArgType;
        else  expectedArgType = tokenSpec(prevTokenType)->rightArgType;
        
        if (expectedArgType != constDataArgType)  {
        if (compiler->adapters[10][expectedArgType] != 0)  {
            rtrn = addScriptToken(compiler, compiler->adapters[10][expectedArgType], tokenErrPosition, NULL, 0);   }}
        
        if (rtrn != passed)  {
            if (rtrn == token_expected_err)  {
                tokenErrPosition = lastScriptChar;
                expectedTokenName = tokenStackElement(nextTokenStack.elementNum)->name;        }
            errOut(rtrn)
    }   }
    
    deleteLinkedList(&nextTokenStack);
    
    return passed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edx, %r15d
movq %rsi, %r12
movq %rsi, 0x20(%rsp)
movq %rdi, 0x40(%rsp)
leaq 0x1440(%rdi), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8b7e
leaq -0x1(%r12), %rax
leaq 0x178e6(%rip), %r14     # 0x22180
movzbl 0x1(%rax), %ecx
incq %rax
cmpl $0x0, (%r14,%rcx,4)
je 0xa89a
movq %rax, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
movsd 0x1074e(%rip), %xmm0    # 0x1b008
xorl %esi, %esi
movl $0x10, %edx
xorl %ecx, %ecx
callq 0x83e1
testl %eax, %eax
jne 0xb5bf
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
movq %rbx, 0x88(%rsp)
movq %r15, 0x50(%rsp)
je 0xb484
movq 0x40(%rsp), %rax
addq $0x1200, %rax           # imm = 0x1200
movq %rax, 0x30(%rsp)
movq %r12, 0xb8(%rsp)
negl %r12d
movq %r12, 0xc0(%rsp)
movl $0x1, 0x4(%rsp)
xorl %ebx, %ebx
movl %r15d, 0x7c(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, (%rsp)
movl %ebx, 0x1c(%rsp)
movl $0x0, 0x4c(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x20(%rsp), %r15
movq 0xc0(%rsp), %rax
leal (%rax,%r15), %ebp
movzbl (%r15), %r13d
incq %r15
incl %ebp
cmpl $0x2, (%r14,%r13,4)
jb 0xa956
leaq -0x1(%r15), %rbx
movq %rbx, 0x20(%rsp)
testl %r13d, %r13d
je 0xa9de
leal -0x30(%r13), %eax
cmpb $0xa, %al
setae %al
leal -0x2d(%r13), %ecx
cmpb $0x2, %cl
setae %cl
testb %cl, %al
movq %rbx, 0xa8(%rsp)
jne 0xa9ea
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xf(%rsp), %rdx
callq 0xa70e
cmpl $0x7, %eax
setne %cl
testb $0x7, %al
setne %dl
testb %dl, %cl
jne 0xaa2c
testl %eax, %eax
je 0xa9c9
movl %eax, 0x1a8e9(%rip)     # 0x252ac
movl %ebp, 0x1a8df(%rip)     # 0x252a8
cmpb $0x0, (%rsp)
je 0xaae9
movq %rbx, 0x20(%rsp)
xorl %ecx, %ecx
xorl %ebx, %ebx
jmp 0xaa30
xorl %ebx, %ebx
movl $0x5, %eax
jmp 0xb41d
leal -0x11(%r13), %eax
xorl %ebx, %ebx
movb $0x1, %cl
cmpb $0x8, %al
ja 0xaa30
movl $0x4, %edi
callq 0x81d0
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0xab57
addl $-0x10, %r13d
movl %r13d, (%rax)
movl $0x1, 0x4c(%rsp)
movq %r15, 0x20(%rsp)
movl $0x3, %ebx
jmp 0xaa2e
xorl %ebx, %ebx
movb $0x1, %cl
testl %ebx, %ebx
je 0xaa4b
movq 0x30(%rsp), %rdi
movl %ebx, %esi
callq 0x911c
movq %rax, %r15
xorl %r13d, %r13d
jmp 0xb198
movl %ecx, 0xa0(%rsp)
movq 0x20(%rsp), %rax
movsbq (%rax), %rbx
shlq $0x5, %rbx
movq 0x40(%rsp), %rdi
addq %rdi, %rbx
movq %rbx, %rsi
leaq 0x20(%rsp), %rdx
leaq 0xa4(%rsp), %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xb6af
testl %eax, %eax
je 0xaac5
movl %eax, 0x9c(%rsp)
movl 0xa4(%rsp), %esi
movq %rbx, %rdi
callq 0x911c
movq %rax, %r15
xorl %r13d, %r13d
cmpl $0x0, 0x8(%rax)
je 0xab76
movb $0x1, 0x38(%rsp)
movq $0x0, 0x90(%rsp)
jmp 0xab8b
movq $0x0, 0x38(%rsp)
movq 0x10(%rsp), %r15
xorl %r13d, %r13d
movq $0x0, 0x90(%rsp)
xorl %ebx, %ebx
jmp 0xaef6
cmpb $0x0, 0xf(%rsp)
jne 0xab03
movq 0x40(%rsp), %rax
cmpl $-0x1, 0x1248(%rax)
jne 0xab03
movb $0x1, 0xf(%rsp)
movb 0xf(%rsp), %al
testb %al, %al
je 0xac92
movq 0x40(%rsp), %rax
movl 0x124c(%rax), %ebx
testl %ebx, %ebx
js 0xa9d8
movl $0x2, 0x4c(%rsp)
movl $0x8, %edi
callq 0x81d0
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0xae9f
movsd 0xb0(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0xacd3
movl %ebp, 0x1a74b(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl $0x3, %ebx
movl $0x1, %eax
jmp 0xb319
cmpl $0x0, 0xc(%r15)
setne 0x38(%rsp)
sete %al
movq %rax, 0x90(%rsp)
leaq 0x58(%rsp), %rdi
movl 0x10(%r15), %eax
movq %rax, 0x28(%rsp)
movl 0x58(%rsp), %ebx
testl %ebx, %ebx
jle 0xac62
xorl %r13d, %r13d
movq (%r15), %r12
movl %ebx, %esi
callq 0x911c
cmpq (%rax), %r12
je 0xabeb
leaq 0x58(%rsp), %rdi
movl %ebx, %esi
callq 0x911c
movl 0x8(%rax), %esi
movq 0x30(%rsp), %rdi
callq 0x911c
cmpb $0x0, 0x8(%rax)
je 0xac5d
leal -0x1(%rbx), %eax
cmpl $0x1, %ebx
movl %eax, %ebx
leaq 0x58(%rsp), %rdi
jg 0xaba8
jmp 0xac62
testl %r13d, %r13d
movq 0x88(%rsp), %r12
leaq 0x58(%rsp), %rdi
je 0xac1c
movl %ebx, %esi
callq 0x911c
movl 0x8(%rax), %esi
movq 0x30(%rsp), %rdi
callq 0x911c
cmpb $0x0, 0x8(%rax)
leaq 0x58(%rsp), %rdi
jne 0xabbc
movl %ebx, %r13d
cmpl 0x58(%rsp), %ebx
jge 0xabbc
movl %ebx, %r13d
incl %r13d
movl %r13d, %esi
callq 0x911c
movl 0xc(%rax), %esi
testl %esi, %esi
jle 0xac49
movq %r12, %rdi
callq 0x911c
movl $0x0, 0x14(%rax)
cmpl 0x58(%rsp), %r13d
leaq 0x58(%rsp), %rdi
jl 0xac28
movl %ebx, %r13d
jmp 0xabbc
leaq 0x58(%rsp), %rdi
testl %r13d, %r13d
je 0xac86
movl %r13d, %esi
movq %rdi, %r12
callq 0x911c
movl 0x8(%rax), %ebx
movl 0x58(%rsp), %edx
movq %r12, %rdi
movl %r13d, %esi
callq 0x868b
jmp 0xacde
cmpb $0x0, (%rsp)
je 0xacda
movl 0x8(%r15), %ebx
jmp 0xacde
movq 0x40(%rsp), %rcx
movl 0x1248(%rcx), %ebx
testl %ebx, %ebx
js 0xaec0
movl $0x1, 0x4c(%rsp)
movl $0x4, %edi
callq 0x81d0
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0xae9f
cvttsd2si 0xb0(%rsp), %ecx
movl %ecx, (%rax)
xorl %ecx, %ecx
jmp 0xaa30
movl 0xc(%r15), %ebx
movq 0x10(%rsp), %rax
testl %ebx, %ebx
jle 0xacf3
movq 0x30(%rsp), %rdi
movl %ebx, %esi
callq 0x911c
cmpb $0x0, (%rsp)
jne 0xad63
testl %r13d, %r13d
je 0xad63
movl 0x10(%rax), %r13d
cmpl $0xa, %r13d
jg 0xad63
cmpl $0x0, 0x1c(%rsp)
jle 0xad41
movq 0x30(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq %rax, %r15
callq 0x911c
movl 0xc(%rax), %eax
cmpl 0xc(%r15), %eax
movq %r15, %rax
jle 0xad41
movq 0x30(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x911c
movl 0x14(%rax), %r13d
movq %r15, %rax
movl $0x0, (%rsp)
movb $0x1, %r12b
cmpl $0x64, %r13d
jne 0xae3c
movq $0x0, 0x38(%rsp)
jmp 0xaee2
movq %rax, 0x10(%rsp)
testl %ebx, %ebx
sete %al
movb $0x1, %r12b
cmpb $0x0, (%rsp)
jne 0xaed4
andb %al, 0x38(%rsp)
je 0xaed4
movl 0x8(%r15), %r12d
movq 0x30(%rsp), %r13
movq %r13, %rdi
movl %r12d, %esi
callq 0x911c
movl 0x10(%rax), %r15d
cmpl $0x0, 0x1c(%rsp)
movq %r12, 0x38(%rsp)
jle 0xade7
movq %r13, %rdi
movl 0x1c(%rsp), %esi
callq 0x911c
movl 0xc(%rax), %eax
movl %eax, 0x98(%rsp)
movq %r13, %rdi
movl %r12d, %esi
callq 0x911c
movl 0x98(%rsp), %ecx
cmpl 0xc(%rax), %ecx
jle 0xade7
movq 0x30(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x911c
movl 0x14(%rax), %r15d
cmpl $0x64, %r15d
movq 0x28(%rsp), %r13
movb $0x1, %r12b
je 0xae98
movslq %r15d, %rax
movq 0x40(%rsp), %rdi
movl 0x140c(%rdi,%rax,4), %esi
testl %esi, %esi
je 0xae98
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb98d
testl %eax, %eax
je 0xb0d4
movl %eax, %r15d
movl %ebp, 0x1a47b(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
xorl %r12d, %r12d
jmp 0xae93
movq %rax, 0x10(%rsp)
movslq %r13d, %rax
movq 0x40(%rsp), %rdi
movl 0x140c(%rdi,%rax,4), %esi
testl %esi, %esi
je 0xaecd
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb98d
testl %eax, %eax
movq 0x28(%rsp), %r13
je 0xb431
movl %eax, %r15d
movl %ebp, 0x1a432(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl $0x0, (%rsp)
xorl %r12d, %r12d
movq $0x0, 0x38(%rsp)
movl %r15d, 0x8(%rsp)
movq 0x10(%rsp), %rax
jmp 0xaee7
movl %ebp, 0x1a403(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl $0x1, %eax
movl $0x0, (%rsp)
jmp 0xb319
testb %al, %al
jne 0xab0f
jmp 0xa9d8
movl $0x0, (%rsp)
movq $0x0, 0x38(%rsp)
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %r13
testb %r12b, %r12b
je 0xaf4a
movq %rax, %r15
movl 0x9c(%rsp), %eax
testl %ebx, %ebx
leaq 0x58(%rsp), %rdi
jle 0xaf54
movb $0x1, %cl
cmpl $0x0, 0x28(%r15)
je 0xb18b
movq %r13, 0x28(%rsp)
movl $0x1, %esi
xorl %edx, %edx
movq %rdi, %r12
callq 0x8b6a
testl %eax, %eax
je 0xb039
movl %eax, %r13d
movl %ebp, 0x1a377(%rip)     # 0x252a8
movq %r12, %rdi
callq 0x847e
xorl %ecx, %ecx
movl %r13d, 0x8(%rsp)
movq 0x28(%rsp), %r13
jmp 0xb18b
xorl %ecx, %ecx
movq %rax, %r15
jmp 0xb18b
testl %eax, %eax
jne 0xafef
movl %eax, %edx
movq 0xa8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x3, (%r14,%rax,4)
movl %edx, %eax
jne 0xafef
movq 0x40(%rsp), %rax
movl 0x1250(%rax), %ecx
movl %edx, %eax
testl %ecx, %ecx
js 0xafef
movq 0x40(%rsp), %r12
movl 0x1438(%r12), %eax
incl %eax
movl %eax, 0x1438(%r12)
movq 0xa8(%rsp), %rdx
movq %rdx, 0x20(%rsp)
subq $0x8, %rsp
movsbl 0x8(%rsp), %r9d
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
movl $0x1, %r8d
movq %rax, 0x30(%rsp)
pushq %rax
xorl %eax, %eax
pushq %rax
pushq %rax
callq 0xa480
addq $0x20, %rsp
testl %eax, %eax
je 0xb446
movl %eax, %r13d
movl %ebp, 0x1a2c3(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
jmp 0xaf34
cmpb $0x0, 0xa0(%rsp)
je 0xb024
testl %eax, %eax
je 0xb08e
cmpb $0x0, 0x90(%rsp)
je 0xb0f8
movl %ebp, 0x1a293(%rip)     # 0x252a8
callq 0x847e
movl $0xa, 0x8(%rsp)
jmp 0xb0a1
movl %ebp, 0x1a27e(%rip)     # 0x252a8
callq 0x847e
movl $0xf, 0x8(%rsp)
jmp 0xb0a1
movl 0x28(%r15), %esi
movq 0x30(%rsp), %rdi
callq 0x911c
movq %r12, %r13
movq (%rax), %r12
movl 0x58(%rsp), %esi
movq %r13, %rdi
callq 0x911c
movq %r12, (%rax)
movl 0x28(%r15), %r12d
movl 0x58(%rsp), %esi
movq %r13, %rdi
callq 0x911c
movl %r12d, 0x8(%rax)
cmpb $0x0, 0x9(%r15)
je 0xb0a8
movl 0x58(%rsp), %esi
leaq 0x58(%rsp), %rdi
callq 0x911c
movl $0x0, 0xc(%rax)
jmp 0xb0c8
movl %ebp, 0x1a214(%rip)     # 0x252a8
callq 0x847e
movl $0x9, 0x8(%rsp)
xorl %ecx, %ecx
jmp 0xb18b
movq 0x88(%rsp), %rax
movl (%rax), %r12d
incl %r12d
movl 0x58(%rsp), %esi
leaq 0x58(%rsp), %rdi
callq 0x911c
movl %r12d, 0xc(%rax)
movq 0x28(%rsp), %r13
movb $0x1, %cl
jmp 0xb18b
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rbx
movl %ebx, %esi
callq 0x911c
movq %rax, %rcx
movb $0x1, %al
movl %eax, (%rsp)
movq %rcx, %rax
movb $0x1, %r12b
jmp 0xaee7
cmpl $0x0, 0x1c(%rsp)
jle 0xb161
cmpl $0x0, 0x38(%rsp)
je 0xb161
movq %r13, 0x28(%rsp)
movq 0x30(%rsp), %r13
movq %r13, %rdi
movl 0x1c(%rsp), %esi
callq 0x911c
movl 0xc(%rax), %r12d
movq %r13, %rdi
movq 0x28(%rsp), %r13
movq 0x38(%rsp), %rsi
callq 0x911c
cmpl 0xc(%rax), %r12d
leaq 0x58(%rsp), %rdi
jle 0xb161
xorl %r12d, %r12d
cmpb $0x0, (%rsp)
setne %r12b
movl 0x4(%rsp), %ebp
movl %ebp, 0x1a156(%rip)     # 0x252a8
callq 0x847e
leal 0xe(,%r12,2), %eax
jmp 0xb17f
xorl %r12d, %r12d
cmpb $0x0, (%rsp)
setne %r12b
movl %ebp, 0x1a136(%rip)     # 0x252a8
callq 0x847e
leal 0xd(,%r12,2), %eax
movl %eax, 0x8(%rsp)
movl %r12d, %eax
xorl %ecx, %ecx
movl %eax, (%rsp)
movl $0x1, %eax
testb %cl, %cl
je 0xb35e
movq 0x50(%rsp), %rax
cmpl $0xd, %eax
movl 0x7c(%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, 0x7c(%rsp)
movl 0x14(%r15), %ecx
testl %r13d, %r13d
movq %rcx, 0x50(%rsp)
jle 0xb1e1
movl $0x1, 0x4c(%rsp)
movl $0x4, %edi
callq 0x81d0
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0xb2ff
movl %r13d, (%rax)
jmp 0xb248
leal -0xb(%rcx), %eax
cmpl $0x1, %eax
ja 0xb248
xorl %r13d, %r13d
cmpl $0xb, %ecx
sete %r13b
movl 0x28(%r15), %esi
movq 0x30(%rsp), %rdi
callq 0x911c
movq (%rax), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rdx
leaq 0x4c(%rsp), %rcx
movl %r13d, %r8d
callq 0xba42
movl %eax, %r13d
testl %eax, %eax
je 0xb23a
movl %ebp, 0x1a07d(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl %r13d, 0x8(%rsp)
movl $0x1, %eax
testl %r13d, %r13d
jne 0xb35e
cmpb $0x0, 0x9(%r15)
je 0xb2cc
cmpl $0xd, 0x50(%rsp)
jne 0xb32a
cmpb $0x0, 0x9(%r15)
je 0xb39c
movl 0x28(%r15), %ebx
movq 0x30(%rsp), %rdi
movl %ebx, %esi
callq 0x911c
movq 0x20(%rsp), %r13
testl %ebx, %ebx
js 0xb294
movq (%rax), %rsi
movq %r13, %rdi
movq %rax, %r12
callq 0x80a0
movq %rax, 0x20(%rsp)
movq %r12, %rax
cmpq $0x0, 0x20(%rsp)
movq %rax, 0x10(%rsp)
je 0xb3ec
cmpl $-0x1, 0x10(%r15)
jne 0xb2b6
cmpl $-0x1, 0x14(%rax)
je 0xb3ff
movl $0xd, %eax
movq %rax, 0x50(%rsp)
movl $0x0, (%rsp)
jmp 0xb417
movq 0x40(%rsp), %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb98d
testl %eax, %eax
je 0xb368
movl %eax, %r13d
movl %ebp, 0x19fb8(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
jmp 0xb3d7
movl %ebp, 0x19fa3(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl $0x1, %eax
movq %r15, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
movl $0x1, 0x8(%rsp)
jmp 0xb41d
xorl %eax, %eax
cmpl $0xd, 0x10(%r15)
jne 0xb346
movq %r15, 0x10(%rsp)
movl 0x7c(%rsp), %ecx
movq %rcx, 0x50(%rsp)
jmp 0xb419
movb $0x1, %cl
movl %ecx, (%rsp)
movq 0x50(%rsp), %rcx
cmpl $-0x1, %ecx
je 0xb35e
cmpl $0x64, %ecx
jne 0xb40b
movq %r15, 0x10(%rsp)
jmp 0xb419
movq 0x80(%rsp), %rcx
testq %rcx, %rcx
je 0xb24f
movl 0x4c(%rsp), %r8d
movq 0x40(%rsp), %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0xb98d
testl %eax, %eax
jne 0xb2e7
jmp 0xb24f
movq 0x40(%rsp), %rdi
movl $0x1, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb98d
testl %eax, %eax
je 0xb265
movl %eax, %r13d
movl %ebp, 0x19ee5(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl $0xd, %eax
movq %rax, 0x50(%rsp)
movl $0x1, %eax
movq %r15, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
movl %r13d, 0x8(%rsp)
jmp 0xb41d
decq %r13
cmpb $0x0, 0x1(%r13)
leaq 0x1(%r13), %r13
jne 0xb3ef
movq %r13, 0x20(%rsp)
movl $0xd, %eax
movq %rax, 0x50(%rsp)
jmp 0xb417
movl $0x0, (%rsp)
movq %r15, 0x10(%rsp)
xorl %eax, %eax
movl %ebp, 0x4(%rsp)
testl %eax, %eax
jne 0xb464
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
jne 0xa92d
jmp 0xb46d
movq $0x0, 0x38(%rsp)
movl $0x0, (%rsp)
jmp 0xae98
movl 0x1250(%r12), %ebx
movq 0x30(%rsp), %rdi
movl %ebx, %esi
callq 0x911c
movq %rax, %r15
movb $0x1, %cl
jmp 0xaf40
cmpl $0x5, %eax
jne 0xb5bb
movl 0x1c(%rsp), %r13d
cmpb $0x0, (%rsp)
sete %bpl
movq 0xb8(%rsp), %r12
jmp 0xb492
xorl %r13d, %r13d
movl $0x1, 0x4(%rsp)
movb $0x1, %bpl
movl 0x20(%rsp), %eax
subl %r12d, %eax
incl %eax
movl %eax, 0x19e17(%rip)     # 0x252b8
movl 0x58(%rsp), %ebx
testl %ebx, %ebx
movq 0x40(%rsp), %r14
jle 0xb50e
leaq 0x1200(%r14), %r15
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
callq 0x911c
movl 0x8(%rax), %esi
movq %r15, %rdi
callq 0x911c
cmpb $0x1, 0x8(%rax)
jne 0xb504
movq %r12, %rdi
movl %ebx, %esi
callq 0x911c
movl 0xc(%rax), %esi
testl %esi, %esi
jle 0xb4fa
movq 0x88(%rsp), %rdi
callq 0x911c
movl $0x0, 0x14(%rax)
movq %r12, %rdi
movl %ebx, %esi
callq 0x8b77
leal -0x1(%rbx), %eax
cmpl $0x1, %ebx
movl %eax, %ebx
jg 0xb4ba
cmpl $0x0, 0x58(%rsp)
setg %al
orb %bpl, %al
xorl %ebx, %ebx
cmpb $0x1, %al
jne 0xb5ad
movq 0x88(%rsp), %rax
cmpl $0x0, (%rax)
movzbl %bpl, %eax
leal 0xb(%rax,%rax,2), %eax
movl $0xc, %ebx
cmovnel %eax, %ebx
movq 0x50(%rsp), %rax
cmpl $0xd, %eax
jne 0xb55a
leaq 0x1200(%r14), %rdi
movl %r13d, %esi
callq 0x911c
movl 0x14(%rax), %eax
cmpl $0x64, %eax
movl 0x4(%rsp), %ebp
je 0xb582
cltq
movl 0x140c(%r14,%rax,4), %esi
testl %esi, %esi
je 0xb582
movq %r14, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb98d
movl %eax, %ebx
testl %ebx, %ebx
je 0xb5ad
cmpl $0xb, %ebx
jne 0xb5a7
movl 0x19d27(%rip), %ebp     # 0x252b8
leaq 0x58(%rsp), %rdi
movl (%rdi), %esi
callq 0x911c
movq (%rax), %rax
movq %rax, 0x19d09(%rip)     # 0x252b0
movl %ebp, 0x19cfb(%rip)     # 0x252a8
leaq 0x58(%rsp), %rdi
callq 0x847e
movl %ebx, %eax
jmp 0xb5bf
movl 0x8(%rsp), %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq