// File: AshOlogn[P]ash-language-interpreter/src/parser.cpp
// Function: evalLiteralGroup()
AbstractExpressionNode* evalLiteralGroup() {

  AbstractExpressionNode* next;
 
  //if grouped expression
  if(peek()->type == LEFT_PAREN) {

    Token* startGroupToken = consume(); //consume left parenthesis
    Token* endGroupToken;
    
    next = evalExpression();

		//throw error if ')' is not found
    if(peek()->type != RIGHT_PAREN) {
      throw ParseSyntaxError(startGroupToken->line+1, codeLines->at(startGroupToken->line), "(", "The parenthesized expression is missing a ')'");
    } else {
      endGroupToken = consume(); //consume right parenthesis
    }

    return new GroupedExpressionNode(next, startGroupToken->line+1, endGroupToken->line+1);

	} else if(peek()->type == LEFT_BRACKET) {

		//initialized array
		Token* leftBracketToken = consume();

		//insert the initial values into a list
		vector<AbstractExpressionNode*> initValues;

		//keep track of last line for error-handling purposes
		uint32_t currEndLine = leftBracketToken->line+1;

		while(peek()->type != RIGHT_BRACKET) {

			//if code ends without a closing ']', throw an error
			if(peek()->type == END) {
				throw ParseSyntaxError(leftBracketToken->line+1, currEndLine, getCodeLineBlock(leftBracketToken->line, currEndLine-1), "Expected ']' to terminate array initializer list");
			}

			//add element to the array and update end line
			AbstractExpressionNode* arrayElement = evalExpression();
			currEndLine = arrayElement->endLine;
			initValues.push_back(arrayElement);

			if(peek()->type == COMMA) {
				//consume , token and update end line
				Token* commaToken = consume(); 
				currEndLine = commaToken->line+1;
			} else if(peek()->type == RIGHT_BRACKET) {
				//do nothing, deal with it outside the while loop
			} else {
				//throw error if initializer list is not terminated
				throw ParseSyntaxError(leftBracketToken->line+1, peek()->line+1, getCodeLineBlock(leftBracketToken->line, peek()->line), 
																	"Expected ']' to terminate array initializer list");
			}
		}

		Token* rightBracketToken = consume(); //consume ']'

		uint32_t length = (uint32_t) initValues.size();
		AbstractExpressionNode** values = (AbstractExpressionNode**) malloc(sizeof(AbstractExpressionNode*) * length);

		//determine overall type of initialized array
		ParseDataType arrayType = arrayListType(&initValues);

		//copy references out of list into array, casting to overall type
		for(uint32_t i = 0; i < length; i++) {
			values[i] = new CastNode(initValues[i], arrayType, initValues[i]->startLine);
		}

		//convert fixed length into a LiteralNode
		ParseData len;
		len.type = UINT32_T;
		len.value.integer = length;

		return new ArrayNode(arrayType, true, new LiteralNode(len, -1), values, leftBracketToken->line+1, rightBracketToken->line+1);

	} else if(peek()->type == NEW) {

		//array or object instantiation
		Token* newToken = consume();

		if(!isTypeTokenType(peek()->type)) {
			throw ParseSyntaxError(newToken->line+1, getCodeLineBlock(newToken->line, newToken->line), "Expected type specifier as part of array instantiation");
		}

		ParseDataType type = ARRAY_T;
		Token* subtypeToken = consume();
		ParseDataType subtype = typeTokenConversion(subtypeToken->type);

		if(peek()->type != LEFT_BRACKET) {
			throw ParseSyntaxError(newToken->line+1, subtypeToken->line+1, getCodeLineBlock(newToken->line, subtypeToken->line), "Expected '[' as part of array instantiation");
		}

		Token* leftBracketToken = consume();
		AbstractExpressionNode* length = evalExpression();

		//make sure length expression is an integer
		if(!isIntParseDataType(length->evalType)) {

			string message = "Expected integer/char type for array length specifier, not ";
			message.append(toStringParseDataType(length->evalType));

			throw StaticTypeError(leftBracketToken->line+1, length->endLine+1, getCodeLineBlock(leftBracketToken->line, length->endLine), 
														copyString(message.c_str()));
		}


		if(peek()->type != RIGHT_BRACKET) {
			throw ParseSyntaxError(newToken->line+1, length->endLine+1, getCodeLineBlock(newToken->line, length->endLine), "Expected ']' as part of array instantiation");
		}

		Token* rightBracketToken = consume();

		//now return ArrayNode with appropriate information
		return new ArrayNode(subtype, false, length, NULL, newToken->line, rightBracketToken->line);

  } else if(peek()->type == VARIABLE) {

		Token* variable = consume();

		//make sure variable is already declared
		string variableName((char*) variable->lexeme);
		if(!symbolTable->isDeclared(variableName)) {
			throw StaticVariableScopeError(variable->line+1, variable->lexeme, getCodeLineBlock(variable->line, variable->line), false);
		}

		//get variable type
		ParseDataType varType = symbolTable->get(variableName).type;

		if(peek()->type == LEFT_PAREN) {

			//function call case
			Token* leftParenToken = consume(); //consume (

			//make sure this variable is of function type
			if(varType != FUN_T) {
				throw StaticTypeError(variable->line+1, leftParenToken->line+1, getCodeLineBlock(variable->line, leftParenToken->line), "function call", varType);
			}
			
			//get function information
			Function* function = (Function*) (symbolTable->get(variableName).value.allocated);

			uint32_t numArgs = function->numArgs;
			ParseDataType* argTypes = function->argTypes;
			ParseDataType* argSubTypes = function->argSubTypes;

			//read in arguments
			AbstractExpressionNode** arguments = (AbstractExpressionNode**) malloc(sizeof(AbstractExpressionNode*) * numArgs);
			Token* lastCommaToken;

			for(uint32_t i = 0; i < numArgs; i++) {

				//if next item is not an argument, throw error
				if(peek()->type == END) {
					uint32_t startLine = variable->line+1;
					uint32_t endLine = (i > 0) ? arguments[i-1]->endLine+1 : leftParenToken->line+1;
					throw ParseSyntaxError(startLine, endLine, getCodeLineBlock(startLine-1, endLine-1), "Too few arguments provided to this function call");
				}

				//get next argument
				arguments[i] = evalExpression();

				//make sure argument is of the right type
				if(argTypes[i] == ARRAY_T && arguments[i]->evalType == ARRAY_T) {

					//both args are arrays, so check member types
					if(!typecheckImplicitCastExpression(arguments[i]->subType, argSubTypes[i])) {
						
						uint32_t startLine = variable->line+1;
						uint32_t endLine = arguments[i]->endLine+1;

						string message = "Cannot implicitly convert a ";
						message.append(toStringParseDataType(arguments[i]->subType));
						message.append(" array argument to ");
						message.append(toStringParseDataType(argSubTypes[i]));
						message.append(" array type");

						throw StaticTypeError(startLine, endLine, getCodeLineBlock(startLine-1, endLine-1), copyString(message.c_str()));
					}

				} else {

					//regular type check
					if(!typecheckImplicitCastExpression(arguments[i]->evalType, argTypes[i])) {

						uint32_t startLine = variable->line+1;
						uint32_t endLine = arguments[i]->endLine+1;

						string message = "Cannot implicitly convert a ";
						message.append(toStringParseDataType(arguments[i]->evalType));
						message.append(" argument to ");
						message.append(toStringParseDataType(argTypes[i]));
						message.append(" type");

						throw StaticTypeError(startLine, endLine, getCodeLineBlock(startLine-1, endLine-1), copyString(message.c_str()));
					}
				}

				if(i < numArgs-1) {
					if(peek()->type != COMMA) {
						throw ParseSyntaxError(variable->line+1, arguments[i]->endLine+1, getCodeLineBlock(variable->line, arguments[i]->endLine),
																	"Expected comma to separate function arguments");
					}
					lastCommaToken = consume(); //consume ,
				}
			}

			if(peek()->type != RIGHT_PAREN) {
				throw ParseSyntaxError(variable->line+1, lastCommaToken->line+1, getCodeLineBlock(variable->line, lastCommaToken->line),
															"Expected ')' to terminate argument list");
			}
			Token* rightParenToken = consume(); //consume )

			//now return FunctionExpressionNode
			return new FunctionExpressionNode(numArgs, arguments, function, symbolTable, variable->line+1, rightParenToken->line+1);

		} else {

			//simple value substitution case
			return new VariableNode(variableName, symbolTable, variable->line+1);
		}
  
  } else {

    Token* literal = consume();
    ParseData p = {typeTokenConversion(literal->type), literal->value};
    return new LiteralNode(p, literal->line+1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x630, %rsp            # imm = 0x630
callq 0x2fe60
cmpl $0x0, (%rax)
jne 0x3518f
callq 0x2fe10
movq %rax, -0x18(%rbp)
callq 0x369a0
movq %rax, -0x10(%rbp)
callq 0x2fe60
cmpl $0x1, (%rax)
je 0x35125
movl $0x28, %edi
callq 0x4130
movq %rax, -0x308(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movl %esi, %eax
incl %eax
movl %eax, -0x2fc(%rbp)
movq 0x1f354(%rip), %rdi     # 0x54408
callq 0xa7c0
movq %rax, -0x2f8(%rbp)
jmp 0x350c2
movl -0x2fc(%rbp), %esi
movq -0x308(%rbp), %rdi
movq -0x2f8(%rbp), %rax
movq (%rax), %rdx
leaq 0xaab4(%rip), %rcx      # 0x3fb94
leaq 0xf720(%rip), %r8       # 0x44807
callq 0x3a420
jmp 0x350ee
movq -0x308(%rbp), %rdi
leaq 0x1e5ac(%rip), %rsi     # 0x536a8
leaq -0x2e193(%rip), %rdx    # 0x6f70
callq 0x43f0
movq -0x308(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x3698e
callq 0x2fe10
movq %rax, -0x20(%rbp)
movl $0x20, %edi
callq 0x4260
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x310(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
incl %edx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
incl %ecx
callq 0xe3c0
jmp 0x35162
movq -0x310(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x36981
movq -0x310(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4240
jmp 0x3698e
callq 0x2fe60
cmpl $0x2, (%rax)
jne 0x3565f
callq 0x2fe10
movq %rax, -0x38(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3a490
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
callq 0x2fe60
movq %rax, -0x318(%rbp)
jmp 0x351ca
movq -0x318(%rbp), %rax
cmpl $0x3, (%rax)
je 0x35422
callq 0x2fe60
movq %rax, -0x320(%rbp)
jmp 0x351e8
movq -0x320(%rbp), %rax
cmpl $0x4e, (%rax)
jne 0x352a8
movl $0x28, %edi
callq 0x4130
movq %rax, -0x338(%rbp)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x330(%rbp)
movl -0x54(%rbp), %esi
movl %esi, -0x32c(%rbp)
decl %esi
callq 0x2feb0
movq %rax, -0x328(%rbp)
jmp 0x35233
movq -0x328(%rbp), %rcx
movl -0x32c(%rbp), %edx
movl -0x330(%rbp), %esi
movq -0x338(%rbp), %rdi
leaq 0xf5e1(%rip), %r8       # 0x44835
callq 0x3a230
jmp 0x3525b
movq -0x338(%rbp), %rdi
leaq 0x1e43f(%rip), %rsi     # 0x536a8
leaq -0x2e300(%rip), %rdx    # 0x6f70
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x35651
movq -0x338(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x35651
callq 0x369a0
movq %rax, -0x340(%rbp)
jmp 0x352b6
movq -0x340(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x54(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3a4b0
jmp 0x352da
callq 0x2fe60
movq %rax, -0x348(%rbp)
jmp 0x352e8
movq -0x348(%rbp), %rax
cmpl $0x2b, (%rax)
jne 0x3531f
callq 0x2fe10
movq %rax, -0x350(%rbp)
jmp 0x35302
movq -0x350(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x3541d
callq 0x2fe60
movq %rax, -0x358(%rbp)
jmp 0x3532d
movq -0x358(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x3533e
jmp 0x3541b
movl $0x28, %edi
callq 0x4130
movq %rax, -0x370(%rbp)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
incl %eax
movl %eax, -0x364(%rbp)
callq 0x2fe60
movq %rax, -0x360(%rbp)
jmp 0x3536c
movq -0x360(%rbp), %rax
movl 0x10(%rax), %eax
incl %eax
movl %eax, -0x380(%rbp)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x37c(%rbp)
callq 0x2fe60
movq %rax, -0x378(%rbp)
jmp 0x35399
movl -0x37c(%rbp), %edi
movq -0x378(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x2feb0
movq %rax, -0x388(%rbp)
jmp 0x353b7
movq -0x388(%rbp), %rcx
movl -0x380(%rbp), %edx
movl -0x364(%rbp), %esi
movq -0x370(%rbp), %rdi
leaq 0xf45d(%rip), %r8       # 0x44835
callq 0x3a230
jmp 0x353df
movq -0x370(%rbp), %rdi
leaq 0x1e2bb(%rip), %rsi     # 0x536a8
leaq -0x2e484(%rip), %rdx    # 0x6f70
callq 0x43f0
jmp 0x36997
movq -0x370(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x35651
jmp 0x3541d
jmp 0x351bc
callq 0x2fe10
movq %rax, -0x390(%rbp)
jmp 0x35430
movq -0x390(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x3a520
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x4310
movq -0x3a0(%rbp), %rdi
movq %rax, -0x80(%rbp)
callq 0x2fd20
movl %eax, -0x394(%rbp)
jmp 0x35474
movl -0x394(%rbp), %eax
movl %eax, -0x84(%rbp)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x74(%rbp), %eax
jae 0x35555
movl $0x28, %edi
callq 0x4260
movq %rax, -0x3a8(%rbp)
jmp 0x354ac
movl -0x88(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x3a540
movq -0x3c0(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x3b8(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x3ac(%rbp)
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x3a540
movq -0x3a8(%rbp), %rdi
movq -0x3b8(%rbp), %rsi
movl -0x3ac(%rbp), %edx
movq (%rax), %rax
movl 0x8(%rax), %ecx
callq 0xd6b0
jmp 0x3550f
movq -0x3a8(%rbp), %rdx
movq -0x80(%rbp), %rax
movl -0x88(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x3548a
movq -0x3a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4240
jmp 0x35651
movl $0x6, -0x98(%rbp)
movl -0x74(%rbp), %eax
movq %rax, -0x90(%rbp)
movl $0x30, %edi
callq 0x4260
movq %rax, -0x3c8(%rbp)
jmp 0x3557c
movl -0x84(%rbp), %eax
movl %eax, -0x3d4(%rbp)
movl $0x28, %edi
callq 0x4260
movq %rax, -0x3d0(%rbp)
jmp 0x3559b
movq -0x3d0(%rbp), %rdi
movups -0x98(%rbp), %xmm0
movaps %xmm0, -0xb0(%rbp)
movl -0xb0(%rbp), %esi
movq -0xa8(%rbp), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0xe260
jmp 0x355c9
movq -0x3d0(%rbp), %rcx
movl -0x3d4(%rbp), %esi
movq -0x3c8(%rbp), %rdi
movq -0x80(%rbp), %r8
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r9d
incl %r9d
movq -0x70(%rbp), %rax
movl 0x10(%rax), %edx
incl %edx
movq %rsp, %rax
movl %edx, (%rax)
movl $0x1, %edx
callq 0xdc40
jmp 0x35606
movq -0x3c8(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3a560
jmp 0x36981
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x35645
movq -0x3d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4240
movq -0x3c8(%rbp), %rdi
callq 0x4240
leaq -0x50(%rbp), %rdi
callq 0x3a560
jmp 0x3698e
callq 0x2fe60
cmpl $0x49, (%rax)
jne 0x35ac6
callq 0x2fe10
movq %rax, -0xb8(%rbp)
callq 0x2fe60
movl (%rax), %edi
callq 0x7f00
testb $0x1, %al
jne 0x3571b
movl $0x28, %edi
callq 0x4130
movq %rax, -0x3f0(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x3e4(%rbp)
movl %esi, %edi
callq 0x2feb0
movq %rax, -0x3e0(%rbp)
jmp 0x356c2
movq -0x3e0(%rbp), %rdx
movl -0x3e4(%rbp), %esi
movq -0x3f0(%rbp), %rdi
leaq 0xf189(%rip), %rcx      # 0x44866
callq 0x3a5c0
jmp 0x356e4
movq -0x3f0(%rbp), %rdi
leaq 0x1dfb6(%rip), %rsi     # 0x536a8
leaq -0x2e789(%rip), %rdx    # 0x6f70
callq 0x43f0
movq -0x3f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x3698e
movl $0xc, -0xbc(%rbp)
callq 0x2fe10
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movl (%rax), %edi
callq 0xb5e0
movl %eax, -0xcc(%rbp)
callq 0x2fe60
cmpl $0x2, (%rax)
je 0x357f9
movl $0x28, %edi
callq 0x4130
movq %rax, -0x408(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x400(%rbp)
movq -0xc8(%rbp), %rax
movl 0x10(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x3fc(%rbp)
callq 0x2feb0
movq %rax, -0x3f8(%rbp)
jmp 0x3579a
movq -0x3f8(%rbp), %rcx
movl -0x3fc(%rbp), %edx
movl -0x400(%rbp), %esi
movq -0x408(%rbp), %rdi
leaq 0xf0e2(%rip), %r8       # 0x4489d
callq 0x3a230
jmp 0x357c2
movq -0x408(%rbp), %rdi
leaq 0x1ded8(%rip), %rsi     # 0x536a8
leaq -0x2e867(%rip), %rdx    # 0x6f70
callq 0x43f0
movq -0x408(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x3698e
callq 0x2fe10
movq %rax, -0xd8(%rbp)
callq 0x369a0
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movl 0x10(%rax), %edi
callq 0xb240
testb $0x1, %al
jne 0x3598f
leaq -0x101(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x4430
movq -0x410(%rbp), %rdx
leaq 0xf080(%rip), %rsi      # 0x448c9
leaq -0x100(%rbp), %rdi
callq 0x4350
jmp 0x35857
leaq -0x101(%rbp), %rdi
callq 0x4290
movq -0xe0(%rbp), %rax
movl 0x10(%rax), %edi
callq 0xb8a0
movq %rax, -0x418(%rbp)
jmp 0x3587b
movq -0x418(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x4460
jmp 0x35890
movl $0x38, %edi
callq 0x4130
movq %rax, -0x430(%rbp)
movq -0xd8(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x428(%rbp)
movq -0xe0(%rbp), %rax
movl 0xc(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x424(%rbp)
callq 0x2feb0
movq %rax, -0x420(%rbp)
jmp 0x358d7
leaq -0x100(%rbp), %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0x438(%rbp)
jmp 0x358f4
movq -0x438(%rbp), %r8
movq -0x420(%rbp), %rcx
movl -0x424(%rbp), %edx
movl -0x428(%rbp), %esi
movq -0x430(%rbp), %rdi
callq 0x3a620
jmp 0x3591c
movq -0x430(%rbp), %rdi
leaq 0x1ddbe(%rip), %rsi     # 0x536e8
leaq -0x2e971(%rip), %rdx    # 0x6fc0
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x101(%rbp), %rdi
callq 0x4290
jmp 0x3698e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3597e
movq -0x430(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
leaq -0x100(%rbp), %rdi
callq 0x4170
jmp 0x3698e
callq 0x2fe60
cmpl $0x3, (%rax)
je 0x35a43
movl $0x28, %edi
callq 0x4130
movq %rax, -0x450(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x448(%rbp)
movq -0xe0(%rbp), %rax
movl 0xc(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x444(%rbp)
callq 0x2feb0
movq %rax, -0x440(%rbp)
jmp 0x359e4
movq -0x440(%rbp), %rcx
movl -0x444(%rbp), %edx
movl -0x448(%rbp), %esi
movq -0x450(%rbp), %rdi
leaq 0xef00(%rip), %r8       # 0x44905
callq 0x3a230
jmp 0x35a0c
movq -0x450(%rbp), %rdi
leaq 0x1dc8e(%rip), %rsi     # 0x536a8
leaq -0x2eab1(%rip), %rdx    # 0x6f70
callq 0x43f0
movq -0x450(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x3698e
callq 0x2fe10
movq %rax, -0x110(%rbp)
movl $0x30, %edi
callq 0x4260
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x458(%rbp)
movl -0xcc(%rbp), %esi
movq -0xe0(%rbp), %rcx
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %r9d
movq -0x110(%rbp), %rax
movl 0x10(%rax), %edx
movq %rsp, %rax
movl %edx, (%rax)
xorl %edx, %edx
movl %edx, %r8d
callq 0xdc40
jmp 0x35a99
movq -0x458(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x36981
movq -0x458(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4240
jmp 0x3698e
callq 0x2fe60
cmpl $0x3b, (%rax)
jne 0x368e3
callq 0x2fe10
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x468(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x4430
movq -0x468(%rbp), %rsi
movq -0x460(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x4350
jmp 0x35b21
leaq -0x139(%rbp), %rdi
callq 0x4290
movq 0x1e8dc(%rip), %rax     # 0x54410
movq %rax, -0x470(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x40f0
jmp 0x35b50
movq -0x470(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x2bf50
movb %al, -0x471(%rbp)
jmp 0x35b6b
movb -0x471(%rbp), %al
xorb $-0x1, %al
movb %al, -0x472(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x4170
movb -0x472(%rbp), %al
testb $0x1, %al
jne 0x35b94
jmp 0x35cf6
movb $0x1, -0x182(%rbp)
movl $0x38, %edi
callq 0x4130
movq %rax, -0x498(%rbp)
movq -0x118(%rbp), %rax
movl 0x10(%rax), %ecx
incl %ecx
movl %ecx, -0x48c(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x488(%rbp)
leaq -0x181(%rbp), %rdi
movq %rdi, -0x480(%rbp)
callq 0x4430
movq -0x488(%rbp), %rsi
movq -0x480(%rbp), %rdx
leaq -0x180(%rbp), %rdi
callq 0x4350
jmp 0x35bf8
movq -0x118(%rbp), %rax
movl 0x10(%rax), %esi
movl %esi, %edi
callq 0x2feb0
movq %rax, -0x4a0(%rbp)
jmp 0x35c12
movq -0x4a0(%rbp), %rcx
movl -0x48c(%rbp), %esi
movq -0x498(%rbp), %rdi
leaq -0x180(%rbp), %rdx
xorl %r8d, %r8d
callq 0x3a690
jmp 0x35c37
movq -0x498(%rbp), %rdi
movb $0x0, -0x182(%rbp)
leaq 0x1dadc(%rip), %rsi     # 0x53728
leaq -0x2ec43(%rip), %rdx    # 0x7010
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x139(%rbp), %rdi
callq 0x4290
jmp 0x3698e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x368d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x4170
jmp 0x368d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x35cce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x4170
leaq -0x181(%rbp), %rdi
callq 0x4290
testb $0x1, -0x182(%rbp)
jne 0x35ce5
jmp 0x35cf1
movq -0x498(%rbp), %rdi
callq 0x41d0
jmp 0x368d2
movq 0x1e713(%rip), %rax     # 0x54410
movq %rax, -0x4a8(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x40f0
jmp 0x35d19
movq -0x4a8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x2c020
movq %rdx, -0x4b8(%rbp)
movl %eax, -0x4ac(%rbp)
jmp 0x35d3b
movq -0x4b8(%rbp), %rax
movl -0x4ac(%rbp), %ecx
movl %ecx, -0x198(%rbp)
movq %rax, -0x190(%rbp)
movl -0x198(%rbp), %eax
movl %eax, -0x4c4(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x4170
movl -0x4c4(%rbp), %eax
movl %eax, -0x188(%rbp)
callq 0x2fe60
movq %rax, -0x4c0(%rbp)
jmp 0x35d87
movq -0x4c0(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x36801
callq 0x2fe10
movq %rax, -0x4d0(%rbp)
jmp 0x35da5
movq -0x4d0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
cmpl $0xd, -0x188(%rbp)
je 0x35e8f
movl $0x38, %edi
callq 0x4130
movq %rax, -0x4e8(%rbp)
movq -0x118(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x4e0(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x10(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x4dc(%rbp)
callq 0x2feb0
movq %rax, -0x4d8(%rbp)
jmp 0x35e07
movq -0x4d8(%rbp), %rcx
movl -0x4dc(%rbp), %edx
movl -0x4e0(%rbp), %esi
movq -0x4e8(%rbp), %rdi
movl -0x188(%rbp), %r9d
leaq 0xeb25(%rip), %r8       # 0x44954
callq 0x3a720
jmp 0x35e36
movq -0x4e8(%rbp), %rdi
leaq 0x1d8a4(%rip), %rsi     # 0x536e8
leaq -0x2ee8b(%rip), %rdx    # 0x6fc0
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x4170
jmp 0x368d2
movq -0x4e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x368d2
movq 0x1e57a(%rip), %rax     # 0x54410
movq %rax, -0x4f0(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x40f0
jmp 0x35eb2
movq -0x4f0(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x2c020
movq %rdx, -0x500(%rbp)
movl %eax, -0x4f4(%rbp)
jmp 0x35ed4
movq -0x500(%rbp), %rax
movl -0x4f4(%rbp), %ecx
movl %ecx, -0x1d8(%rbp)
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x508(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x4170
movq -0x508(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1fc(%rbp)
movq -0x1c8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x208(%rbp)
movq -0x1c8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x210(%rbp)
movl -0x1fc(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x4310
movq %rax, -0x218(%rbp)
movl $0x0, -0x224(%rbp)
movl -0x224(%rbp), %eax
cmpl -0x1fc(%rbp), %eax
jae 0x36687
callq 0x2fe60
movq %rax, -0x510(%rbp)
jmp 0x35f8b
movq -0x510(%rbp), %rax
cmpl $0x4e, (%rax)
jne 0x360b6
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x228(%rbp)
cmpl $0x0, -0x224(%rbp)
jbe 0x35fdb
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
movl %eax, -0x514(%rbp)
jmp 0x35fee
movq -0x1c0(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x514(%rbp)
movl -0x514(%rbp), %eax
movl %eax, -0x22c(%rbp)
movl $0x28, %edi
callq 0x4130
movq %rax, -0x530(%rbp)
movl -0x228(%rbp), %edi
movl %edi, -0x528(%rbp)
movl -0x22c(%rbp), %esi
movl %esi, -0x524(%rbp)
decl %edi
decl %esi
callq 0x2feb0
movq %rax, -0x520(%rbp)
jmp 0x36035
movq -0x520(%rbp), %rcx
movl -0x524(%rbp), %edx
movl -0x528(%rbp), %esi
movq -0x530(%rbp), %rdi
leaq 0xe8db(%rip), %r8       # 0x44931
callq 0x3a230
jmp 0x3605d
movq -0x530(%rbp), %rdi
leaq 0x1d63d(%rip), %rsi     # 0x536a8
leaq -0x2f102(%rip), %rdx    # 0x6f70
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x4170
jmp 0x368d2
movq -0x530(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x368d2
callq 0x369a0
movq %rax, -0x538(%rbp)
jmp 0x360c4
movq -0x538(%rbp), %rdx
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x208(%rbp), %rax
movl -0x224(%rbp), %ecx
cmpl $0xc, (%rax,%rcx,4)
jne 0x3633e
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0xc, 0x10(%rax)
jne 0x3633e
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %edi
movq -0x210(%rbp), %rax
movl (%rax,%rcx,4), %esi
callq 0x2b450
movb %al, -0x539(%rbp)
jmp 0x36139
movb -0x539(%rbp), %al
testb $0x1, %al
jne 0x36339
jmp 0x36149
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
incl %eax
movl %eax, -0x230(%rbp)
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
incl %eax
movl %eax, -0x234(%rbp)
leaq -0x259(%rbp), %rdi
movq %rdi, -0x548(%rbp)
callq 0x4430
movq -0x548(%rbp), %rdx
leaq 0xe7ca(%rip), %rsi      # 0x44962
leaq -0x258(%rbp), %rdi
callq 0x4350
jmp 0x361a6
leaq -0x259(%rbp), %rdi
callq 0x4290
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %edi
callq 0xb8a0
movq %rax, -0x550(%rbp)
jmp 0x361d4
movq -0x550(%rbp), %rsi
leaq -0x258(%rbp), %rdi
callq 0x4460
jmp 0x361e9
leaq 0xe78f(%rip), %rsi      # 0x4497f
leaq -0x258(%rbp), %rdi
callq 0x4460
jmp 0x361fe
movq -0x210(%rbp), %rax
movl -0x224(%rbp), %ecx
movl (%rax,%rcx,4), %edi
callq 0xb8a0
movq %rax, -0x558(%rbp)
jmp 0x3621c
movq -0x558(%rbp), %rsi
leaq -0x258(%rbp), %rdi
callq 0x4460
jmp 0x36231
leaq 0xe4f6(%rip), %rsi      # 0x4472e
leaq -0x258(%rbp), %rdi
callq 0x4460
jmp 0x36246
movl $0x38, %edi
callq 0x4130
movq %rax, -0x570(%rbp)
movl -0x230(%rbp), %edi
movl %edi, -0x568(%rbp)
movl -0x234(%rbp), %esi
movl %esi, -0x564(%rbp)
decl %edi
decl %esi
callq 0x2feb0
movq %rax, -0x560(%rbp)
jmp 0x36281
leaq -0x258(%rbp), %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0x578(%rbp)
jmp 0x3629e
movq -0x578(%rbp), %r8
movq -0x560(%rbp), %rcx
movl -0x564(%rbp), %edx
movl -0x568(%rbp), %esi
movq -0x570(%rbp), %rdi
callq 0x3a620
jmp 0x362c6
movq -0x570(%rbp), %rdi
leaq 0x1d414(%rip), %rsi     # 0x536e8
leaq -0x2f31b(%rip), %rdx    # 0x6fc0
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x259(%rbp), %rdi
callq 0x4290
jmp 0x368d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x36328
movq -0x570(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
leaq -0x258(%rbp), %rdi
callq 0x4170
jmp 0x368d2
jmp 0x3656b
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %edi
movq -0x208(%rbp), %rax
movl (%rax,%rcx,4), %esi
callq 0x2b450
movb %al, -0x579(%rbp)
jmp 0x36369
movb -0x579(%rbp), %al
testb $0x1, %al
jne 0x36569
jmp 0x36379
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
incl %eax
movl %eax, -0x260(%rbp)
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
incl %eax
movl %eax, -0x264(%rbp)
leaq -0x289(%rbp), %rdi
movq %rdi, -0x588(%rbp)
callq 0x4430
movq -0x588(%rbp), %rdx
leaq 0xe59a(%rip), %rsi      # 0x44962
leaq -0x288(%rbp), %rdi
callq 0x4350
jmp 0x363d6
leaq -0x289(%rbp), %rdi
callq 0x4290
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %edi
callq 0xb8a0
movq %rax, -0x590(%rbp)
jmp 0x36404
movq -0x590(%rbp), %rsi
leaq -0x288(%rbp), %rdi
callq 0x4460
jmp 0x36419
leaq 0xe565(%rip), %rsi      # 0x44985
leaq -0x288(%rbp), %rdi
callq 0x4460
jmp 0x3642e
movq -0x208(%rbp), %rax
movl -0x224(%rbp), %ecx
movl (%rax,%rcx,4), %edi
callq 0xb8a0
movq %rax, -0x598(%rbp)
jmp 0x3644c
movq -0x598(%rbp), %rsi
leaq -0x288(%rbp), %rdi
callq 0x4460
jmp 0x36461
leaq 0xe372(%rip), %rsi      # 0x447da
leaq -0x288(%rbp), %rdi
callq 0x4460
jmp 0x36476
movl $0x38, %edi
callq 0x4130
movq %rax, -0x5b0(%rbp)
movl -0x260(%rbp), %edi
movl %edi, -0x5a8(%rbp)
movl -0x264(%rbp), %esi
movl %esi, -0x5a4(%rbp)
decl %edi
decl %esi
callq 0x2feb0
movq %rax, -0x5a0(%rbp)
jmp 0x364b1
leaq -0x288(%rbp), %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0x5b8(%rbp)
jmp 0x364ce
movq -0x5b8(%rbp), %r8
movq -0x5a0(%rbp), %rcx
movl -0x5a4(%rbp), %edx
movl -0x5a8(%rbp), %esi
movq -0x5b0(%rbp), %rdi
callq 0x3a620
jmp 0x364f6
movq -0x5b0(%rbp), %rdi
leaq 0x1d1e4(%rip), %rsi     # 0x536e8
leaq -0x2f54b(%rip), %rdx    # 0x6fc0
callq 0x43f0
jmp 0x36997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x289(%rbp), %rdi
callq 0x4290
jmp 0x368d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x36558
movq -0x5b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
leaq -0x288(%rbp), %rdi
callq 0x4170
jmp 0x368d2
jmp 0x3656b
movl -0x224(%rbp), %eax
movl -0x1fc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x36671
callq 0x2fe60
movq %rax, -0x5c0(%rbp)
jmp 0x36590
movq -0x5c0(%rbp), %rax
cmpl $0x2b, (%rax)
je 0x36655
movl $0x28, %edi
callq 0x4130
movq %rax, -0x5d8(%rbp)
movq -0x118(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x5d0(%rbp)
movq -0x218(%rbp), %rax
movl -0x224(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x5cc(%rbp)
callq 0x2feb0
movq %rax, -0x5c8(%rbp)
jmp 0x365f1
movq -0x5c8(%rbp), %rcx
movl -0x5cc(%rbp), %edx
movl -0x5d0(%rbp), %esi
movq -0x5d8(%rbp), %rdi
leaq 0xe381(%rip), %r8       # 0x44993
callq 0x3a230
jmp 0x36619
movq -0x5d8(%rbp), %rdi
leaq 0x1d081(%rip), %rsi     # 0x536a8
leaq -0x2f6be(%rip), %rdx    # 0x6f70
callq 0x43f0
jmp 0x36997
movq -0x5d8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x368d2
callq 0x2fe10
movq %rax, -0x5e0(%rbp)
jmp 0x36663
movq -0x5e0(%rbp), %rax
movq %rax, -0x220(%rbp)
jmp 0x36673
movl -0x224(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x224(%rbp)
jmp 0x35f6b
callq 0x2fe60
movq %rax, -0x5e8(%rbp)
jmp 0x36695
movq -0x5e8(%rbp), %rax
cmpl $0x1, (%rax)
je 0x36750
movl $0x28, %edi
callq 0x4130
movq %rax, -0x600(%rbp)
movq -0x118(%rbp), %rax
movl 0x10(%rax), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x5f8(%rbp)
movq -0x220(%rbp), %rax
movl 0x10(%rax), %esi
movl %esi, %eax
incl %eax
movl %eax, -0x5f4(%rbp)
callq 0x2feb0
movq %rax, -0x5f0(%rbp)
jmp 0x366ec
movq -0x5f0(%rbp), %rcx
movl -0x5f4(%rbp), %edx
movl -0x5f8(%rbp), %esi
movq -0x600(%rbp), %rdi
leaq 0xe2b4(%rip), %r8       # 0x449c1
callq 0x3a230
jmp 0x36714
movq -0x600(%rbp), %rdi
leaq 0x1cf86(%rip), %rsi     # 0x536a8
leaq -0x2f7b9(%rip), %rdx    # 0x6f70
callq 0x43f0
jmp 0x36997
movq -0x600(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x41d0
jmp 0x368d2
callq 0x2fe10
movq %rax, -0x608(%rbp)
jmp 0x3675e
movq -0x608(%rbp), %rax
movq %rax, -0x298(%rbp)
movl $0x48, %edi
callq 0x4260
movq %rax, -0x610(%rbp)
jmp 0x3677f
movq -0x610(%rbp), %rdi
movl -0x1fc(%rbp), %esi
movq -0x218(%rbp), %rdx
movq -0x1c8(%rbp), %rcx
movq 0x1dc6f(%rip), %r8      # 0x54410
movq -0x118(%rbp), %rax
movl 0x10(%rax), %r9d
incl %r9d
movq -0x298(%rbp), %rax
movl 0x10(%rax), %r10d
incl %r10d
movq %rsp, %rax
movl %r10d, (%rax)
callq 0xe130
jmp 0x367ca
movq -0x610(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x29c(%rbp)
jmp 0x368c1
movq -0x610(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4240
jmp 0x368d2
movl $0x40, %edi
callq 0x4260
movq %rax, -0x618(%rbp)
jmp 0x36814
movb $0x1, -0x2c1(%rbp)
leaq -0x2c0(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x40f0
jmp 0x36830
movq -0x618(%rbp), %rdi
movq 0x1dbd2(%rip), %rdx     # 0x54410
movq -0x118(%rbp), %rax
movl 0x10(%rax), %ecx
incl %ecx
leaq -0x2c0(%rbp), %rsi
callq 0xde40
jmp 0x36858
movq -0x618(%rbp), %rax
movb $0x0, -0x2c1(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x4170
movl $0x1, -0x29c(%rbp)
jmp 0x368c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x368a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x4170
testb $0x1, -0x2c1(%rbp)
jne 0x368b3
jmp 0x368bf
movq -0x618(%rbp), %rdi
callq 0x4240
jmp 0x368d2
leaq -0x138(%rbp), %rdi
callq 0x4170
jmp 0x36981
leaq -0x138(%rbp), %rdi
callq 0x4170
jmp 0x3698e
callq 0x2fe10
movq %rax, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rax
movl (%rax), %edi
callq 0xb5e0
movl %eax, -0x2e0(%rbp)
movq -0x2d0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x2d8(%rbp)
movl $0x28, %edi
callq 0x4260
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x620(%rbp)
movups -0x2e0(%rbp), %xmm0
movaps %xmm0, -0x2f0(%rbp)
movq -0x2d0(%rbp), %rax
movl 0x10(%rax), %ecx
incl %ecx
movl -0x2f0(%rbp), %esi
movq -0x2e8(%rbp), %rdx
callq 0xe260
jmp 0x3695a
movq -0x620(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x36981
movq -0x620(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4240
jmp 0x3698e
movq -0x8(%rbp), %rax
addq $0x630, %rsp            # imm = 0x630
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x4420
nopw (%rax,%rax)