// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
callq 0x154d4
cmpl $0x0, (%rax)
je 0x17d61
callq 0x154d4
cmpl $0x2, (%rax)
jne 0x17dae
callq 0x154a8
movq %rax, %rbx
xorps %xmm0, %xmm0
leaq -0x90(%rbp), %r14
andq $0x0, 0x10(%r14)
movaps %xmm0, (%r14)
movl 0x10(%rax), %r12d
incl %r12d
leaq -0x70(%rbp), %r15
callq 0x154d4
cmpl $0x3, (%rax)
je 0x17e5c
callq 0x154d4
cmpl $0x4e, (%rax)
je 0x181f9
callq 0x1a3b7
movq %rax, -0x70(%rbp)
movl 0xc(%rax), %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x1aab0
callq 0x154d4
cmpl $0x2b, (%rax)
jne 0x17cde
callq 0x154a8
movl 0x10(%rax), %r12d
incl %r12d
jmp 0x17c92
callq 0x154d4
cmpl $0x3, (%rax)
je 0x17c92
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movq %rbx, %r13
movl 0x10(%rbx), %r15d
callq 0x154d4
movl 0x10(%rax), %r12d
movl 0x10(%r13), %ebx
callq 0x154d4
movl 0x10(%rax), %esi
movl %ebx, %edi
callq 0x15504
incl %r15d
incl %r12d
leaq 0x128ad(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x9467(%rip), %rax      # 0x211a1
movq %rax, 0x18(%r14)
movl %r15d, 0x20(%r14)
movl %r12d, 0x24(%r14)
leaq 0x128ab(%rip), %rsi     # 0x2a5f8
movq 0x13284(%rip), %rdx     # 0x2afd8
movq %r14, %rdi
callq 0x4310
jmp 0x18855
callq 0x154a8
movq %rax, %rbx
callq 0x1a3b7
movq %rax, %r15
callq 0x154d4
cmpl $0x1, (%rax)
jne 0x18517
callq 0x154a8
movq %rax, %r12
pushq $0x20
popq %rdi
callq 0x41f0
movq %rax, %r14
movl 0x10(%rbx), %edx
incl %edx
movl 0x10(%r12), %ecx
incl %ecx
movq %rax, %rdi
movq %r15, %rsi
callq 0x82c8
jmp 0x181e4
callq 0x154d4
cmpl $0x49, (%rax)
jne 0x17f41
callq 0x154a8
movq %rax, %rbx
callq 0x154d4
movl (%rax), %edi
callq 0x5a0b
testb %al, %al
je 0x1856e
callq 0x154a8
movq %rax, %r13
movl (%rax), %edi
callq 0x72b8
movl %eax, %r12d
callq 0x154d4
cmpl $0x2, (%rax)
jne 0x185b2
callq 0x154a8
movq %rax, %r14
callq 0x1a3b7
movq %rax, %r15
movl 0x10(%rax), %edi
callq 0x71a4
testb %al, %al
je 0x185ff
callq 0x154d4
cmpl $0x3, (%rax)
jne 0x186ab
callq 0x154a8
movq %rax, %r13
pushq $0x30
popq %rdi
callq 0x41f0
movq %rax, %r14
movl 0x10(%rbx), %r9d
movl 0x10(%r13), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movl %r12d, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x7f80
jmp 0x181e4
movq %rbx, -0x50(%rbp)
callq 0x154a8
movq %rax, -0x48(%rbp)
leaq -0x90(%rbp), %r14
movq 0x8(%r14), %rbx
subq (%r14), %rbx
sarq $0x3, %rbx
movl %ebx, %eax
movq %rax, -0x38(%rbp)
leaq (,%rax,8), %rdi
callq 0x4250
movq %rax, -0x40(%rbp)
movq %r14, %rdi
callq 0x15420
movl %eax, %r13d
movl %ebx, %ebx
xorl %r12d, %r12d
pushq $0x28
popq %r14
cmpq %r12, %rbx
je 0x17edc
movq %r14, %rdi
callq 0x41f0
movq %rax, %r15
movq -0x90(%rbp), %rax
movq (%rax,%r12,8), %rsi
movl 0x8(%rsi), %ecx
movq %r15, %rdi
movl %r13d, %edx
callq 0x7d18
movq -0x40(%rbp), %rax
movq %r15, (%rax,%r12,8)
incq %r12
jmp 0x17ea6
pushq $0x30
popq %rdi
callq 0x41f0
movq %rax, %r14
pushq $0x28
popq %rdi
callq 0x41f0
movq %rax, %r15
pushq $0x6
popq %rsi
pushq $-0x1
popq %rcx
movq %rax, %rdi
movq -0x38(%rbp), %rdx
callq 0x8252
movq -0x50(%rbp), %rax
movl 0x10(%rax), %r9d
incl %r9d
movq -0x48(%rbp), %rax
movl 0x10(%rax), %eax
incl %eax
movl %eax, (%rsp)
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %r13d, %esi
movq %r15, %rcx
movq -0x40(%rbp), %r8
callq 0x7f80
leaq -0x90(%rbp), %rdi
callq 0x1b144
jmp 0x181e4
callq 0x154d4
movl (%rax), %ebx
callq 0x154a8
movq %rax, %r14
cmpl $0x3b, %ebx
jne 0x18046
movq %r14, -0x38(%rbp)
movq 0x18(%r14), %rsi
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x40a0
movq 0x13300(%rip), %r14     # 0x2b278
leaq -0x120(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4290
leaq -0x120(%rbp), %rsi
movq %r14, %rdi
callq 0x14422
movl %eax, %r14d
leaq -0x120(%rbp), %rdi
callq 0x40e0
testb %r14b, %r14b
je 0x1870d
movq 0x132bf(%rip), %r14     # 0x2b278
leaq -0x100(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4290
leaq -0x100(%rbp), %rsi
movq %r14, %rdi
callq 0x14476
movl %eax, %r14d
leaq -0x100(%rbp), %rdi
callq 0x40e0
callq 0x154d4
cmpl $0x0, (%rax)
je 0x1807b
pushq $0x40
popq %rdi
callq 0x41f0
movq %rax, %r14
leaq -0xc0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4290
movq 0x1325b(%rip), %rdx     # 0x2b278
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
incl %ecx
leaq -0xc0(%rbp), %rsi
movq %r14, %rdi
callq 0x806e
leaq -0xc0(%rbp), %rdi
callq 0x40e0
jmp 0x181d8
movl (%r14), %edi
callq 0x72b8
movl %eax, %r15d
movq 0x8(%r14), %r12
pushq $0x28
popq %rdi
callq 0x41f0
movq %r14, %rcx
movq %rax, %r14
movl 0x10(%rcx), %ecx
incl %ecx
movq %rax, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x8252
jmp 0x181e4
callq 0x154a8
movq %rax, %rbx
cmpl $0xd, %r14d
jne 0x1877e
movq 0x131e4(%rip), %r14     # 0x2b278
leaq -0xe0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4290
movq %rbx, -0x98(%rbp)
leaq -0xe0(%rbp), %rsi
movq %r14, %rdi
callq 0x14476
movq %rdx, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x40e0
movl (%rbx), %r13d
movq 0x8(%rbx), %rax
movq %rax, -0x50(%rbp)
movq %rbx, -0xa0(%rbp)
movq 0x10(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq (,%r13,8), %rdi
callq 0x4250
movq %rax, -0x40(%rbp)
leal -0x1(%r13), %r12d
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x18186
callq 0x154d4
cmpl $0x4e, (%rax)
je 0x1825a
callq 0x1a3b7
movq %rax, %r15
movq -0x40(%rbp), %rax
movq %r15, (%rax,%rbx,8)
movq -0x50(%rbp), %rax
movl (%rax,%rbx,4), %esi
movl %esi, %eax
xorl $0xc, %eax
movl 0x10(%r15), %edi
movl %edi, %ecx
xorl $0xc, %ecx
orl %eax, %ecx
jne 0x18156
movl 0x14(%r15), %edi
movq -0x48(%rbp), %rax
movl (%rax,%rbx,4), %esi
callq 0x13ec3
testb %al, %al
jne 0x18163
jmp 0x1843d
callq 0x13ec3
testb %al, %al
je 0x182e3
cmpq %r12, %rbx
jae 0x1817e
callq 0x154d4
cmpl $0x2b, (%rax)
jne 0x18278
callq 0x154a8
movq %rax, %r14
incq %rbx
jmp 0x180fd
callq 0x154d4
cmpl $0x1, (%rax)
jne 0x187ef
callq 0x154a8
movq %rax, %r15
pushq $0x48
popq %rdi
callq 0x41f0
movq %rax, %r14
movq 0x130ca(%rip), %r8      # 0x2b278
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r9d
incl %r9d
movl 0x10(%r15), %eax
incl %eax
movl %eax, (%rsp)
movq %r14, %rdi
movl %r13d, %esi
movq -0x40(%rbp), %rdx
movq -0xa0(%rbp), %rcx
callq 0x81dc
leaq -0x90(%rbp), %rdi
callq 0x40e0
movq %r14, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movl 0x10(%rbx), %ebx
leal -0x1(%r12), %esi
movl %ebx, %edi
callq 0x15504
incl %ebx
leaq 0x123b4(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x8f6e(%rip), %rax      # 0x211a1
movq %rax, 0x18(%r14)
movl %ebx, 0x20(%r14)
movl %r12d, 0x24(%r14)
leaq 0x123b2(%rip), %rsi     # 0x2a5f8
movq 0x12d8b(%rip), %rdx     # 0x2afd8
movq %r14, %rdi
callq 0x4310
jmp 0x18855
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r13d
testq %rbx, %rbx
jne 0x183bd
addq $0x10, -0x98(%rbp)
jmp 0x183d2
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r12d
movl 0xc(%r15), %ebx
movl %r12d, %edi
movl %ebx, %esi
callq 0x15504
incl %ebx
incl %r12d
leaq 0x1232b(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x9043(%rip), %rax      # 0x212ff
movq %rax, 0x18(%r14)
movl %r12d, 0x20(%r14)
movl %ebx, 0x24(%r14)
leaq 0x12329(%rip), %rsi     # 0x2a5f8
movq 0x12d02(%rip), %rdx     # 0x2afd8
movq %r14, %rdi
callq 0x4310
jmp 0x18855
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r13d
movl 0xc(%r15), %r14d
leaq 0x8fd8(%rip), %rsi      # 0x212ce
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x40a0
movl 0x10(%r15), %edi
callq 0x730e
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x4360
leaq 0x8fd2(%rip), %rsi      # 0x212f1
leaq -0x70(%rbp), %rdi
callq 0x4360
movq -0x50(%rbp), %rax
movl (%rax,%rbx,4), %edi
callq 0x730e
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x4360
leaq 0x8dff(%rip), %rsi      # 0x21146
leaq -0x70(%rbp), %rdi
callq 0x4360
pushq $0x38
popq %rdi
callq 0x4110
movq %rax, %r15
movl %r13d, %edi
movl %r14d, %esi
callq 0x15504
movq %rax, %r12
movq -0x70(%rbp), %rdi
callq 0x152e4
incl %r13d
leaq 0x12294(%rip), %rcx     # 0x2a610
addq $0x10, %rcx
movq %rcx, (%r15)
movw $0x100, 0x8(%r15)       # imm = 0x100
movq %r12, 0x10(%r15)
andq $0x0, 0x18(%r15)
incl %r14d
movq %rax, 0x20(%r15)
movl %r13d, 0x28(%r15)
movl %r14d, 0x2c(%r15)
leaq 0x1228f(%rip), %rsi     # 0x2a638
movq 0x12c28(%rip), %rdx     # 0x2afd8
movq %r15, %rdi
callq 0x4310
jmp 0x18855
decl %ebx
movq -0x40(%rbp), %rax
movq (%rax,%rbx,8), %rax
addq $0xc, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl (%rax), %r15d
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movl %r13d, %edi
movl %r15d, %esi
callq 0x15504
incl %r13d
incl %r15d
leaq 0x121d1(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x8e87(%rip), %rax      # 0x2129d
movq %rax, 0x18(%r14)
movl %r13d, 0x20(%r14)
movl %r15d, 0x24(%r14)
leaq 0x121cf(%rip), %rsi     # 0x2a5f8
movq 0x12ba8(%rip), %rdx     # 0x2afd8
movq %r14, %rdi
callq 0x4310
jmp 0x18855
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r13d
movl 0xc(%r15), %r14d
leaq 0x8e7e(%rip), %rsi      # 0x212ce
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x40a0
movl 0x14(%r15), %edi
callq 0x730e
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x4360
leaq 0x8e72(%rip), %rsi      # 0x212eb
leaq -0x70(%rbp), %rdi
callq 0x4360
movq -0x48(%rbp), %rax
movl (%rax,%rbx,4), %edi
callq 0x730e
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x4360
leaq 0x8bf9(%rip), %rsi      # 0x2109a
leaq -0x70(%rbp), %rdi
callq 0x4360
pushq $0x38
popq %rdi
callq 0x4110
movq %rax, %r15
movl %r13d, %edi
movl %r14d, %esi
callq 0x15504
movq %rax, %r12
movq -0x70(%rbp), %rdi
callq 0x152e4
incl %r13d
leaq 0x1213a(%rip), %rcx     # 0x2a610
addq $0x10, %rcx
movq %rcx, (%r15)
movw $0x100, 0x8(%r15)       # imm = 0x100
movq %r12, 0x10(%r15)
andq $0x0, 0x18(%r15)
incl %r14d
movq %rax, 0x20(%r15)
movl %r13d, 0x28(%r15)
movl %r14d, 0x2c(%r15)
leaq 0x12135(%rip), %rsi     # 0x2a638
movq 0x12ace(%rip), %rdx     # 0x2afd8
movq %r15, %rdi
callq 0x4310
jmp 0x18855
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movl 0x10(%rbx), %ebx
movq 0x12d44(%rip), %rdi     # 0x2b270
movq %rbx, %rsi
callq 0x6f18
incl %ebx
movq (%rax), %rax
leaq 0x12090(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
leaq 0x441e(%rip), %rax      # 0x1c970
movq %rax, 0x10(%r14)
leaq 0x8c16(%rip), %rax      # 0x21173
movq %rax, 0x18(%r14)
movl %ebx, 0x20(%r14)
movl %ebx, 0x24(%r14)
jmp 0x186f7
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movl 0x10(%rbx), %ebx
movl %ebx, %edi
movl %ebx, %esi
callq 0x15504
incl %ebx
leaq 0x12042(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x8c2d(%rip), %rax      # 0x211d2
movq %rax, 0x18(%r14)
movl %ebx, 0x20(%r14)
jmp 0x186f3
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movl 0x10(%rbx), %r15d
movl 0x10(%r13), %ebx
movl %r15d, %edi
movl %ebx, %esi
callq 0x15504
incl %ebx
incl %r15d
leaq 0x11ff5(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x8c17(%rip), %rax      # 0x21209
movq %rax, 0x18(%r14)
movl %r15d, 0x20(%r14)
jmp 0x186f3
leaq 0x8c2f(%rip), %rsi      # 0x21235
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x40a0
movl 0x10(%r15), %edi
callq 0x730e
leaq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x4360
pushq $0x38
popq %rdi
callq 0x4110
movq %rax, %r12
movl 0x10(%r14), %ebx
movl 0xc(%r15), %r14d
movl %ebx, %edi
movl %r14d, %esi
callq 0x15504
movq %rax, %r15
movq -0x90(%rbp), %rdi
callq 0x152e4
incl %ebx
leaq 0x11fad(%rip), %rcx     # 0x2a610
addq $0x10, %rcx
movq %rcx, (%r12)
movw $0x100, 0x8(%r12)       # imm = 0x100
movq %r15, 0x10(%r12)
andq $0x0, 0x18(%r12)
incl %r14d
movq %rax, 0x20(%r12)
movl %ebx, 0x28(%r12)
movl %r14d, 0x2c(%r12)
leaq 0x11fa1(%rip), %rsi     # 0x2a638
movq 0x1293a(%rip), %rdx     # 0x2afd8
movq %r12, %rdi
callq 0x4310
jmp 0x18855
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r14
movl 0x10(%rbx), %r12d
movl 0xc(%r15), %ebx
movl %r12d, %edi
movl %ebx, %esi
callq 0x15504
incl %ebx
incl %r12d
leaq 0x11efc(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq 0x8b86(%rip), %rax      # 0x21271
movq %rax, 0x18(%r14)
movl %r12d, 0x20(%r14)
movl %ebx, 0x24(%r14)
leaq 0x11efa(%rip), %rsi     # 0x2a5f8
movq 0x128d3(%rip), %rdx     # 0x2afd8
movq %r14, %rdi
callq 0x4310
pushq $0x38
popq %rdi
callq 0x4110
movq %rax, %r14
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r15d
movq 0x18(%rax), %rsi
leaq -0x140(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x40a0
movq -0x38(%rbp), %rax
movl 0x10(%rax), %edi
movb $0x1, %r12b
movl %edi, %esi
callq 0x15504
incl %r15d
leaq -0x140(%rbp), %rdx
movq %r14, %rdi
movl %r15d, %esi
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x1aad4
xorl %r12d, %r12d
leaq 0x11f0e(%rip), %rsi     # 0x2a678
leaq -0x131f5(%rip), %rdx    # 0x557c
movq %r14, %rdi
callq 0x4310
jmp 0x18855
pushq $0x38
popq %rdi
callq 0x4110
movq %rax, %r15
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r12d
movl 0x10(%rbx), %ebx
movl %r12d, %edi
movl %ebx, %esi
callq 0x15504
leaq 0x11e6b(%rip), %rcx     # 0x2a610
addq $0x10, %rcx
movq %rcx, (%r15)
andw $0x0, 0x8(%r15)
incl %ebx
movq %rax, 0x10(%r15)
leaq 0x8b01(%rip), %rax      # 0x212c0
movq %rax, 0x18(%r15)
andq $0x0, 0x20(%r15)
incl %r12d
movl %r12d, 0x28(%r15)
movl %ebx, 0x2c(%r15)
movl %r14d, 0x30(%r15)
leaq 0x11e5a(%rip), %rsi     # 0x2a638
movq 0x127f3(%rip), %rdx     # 0x2afd8
movq %r15, %rdi
callq 0x4310
jmp 0x18855
pushq $0x28
popq %rdi
callq 0x4110
movq %rax, %r15
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r12d
movl 0x10(%r14), %ebx
movl %r12d, %edi
movl %ebx, %esi
callq 0x15504
incl %ebx
incl %r12d
leaq 0x11db4(%rip), %rcx     # 0x2a5d0
addq $0x10, %rcx
movq %rcx, (%r15)
movq %rax, 0x8(%r15)
andq $0x0, 0x10(%r15)
leaq 0x8afa(%rip), %rax      # 0x2132d
movq %rax, 0x18(%r15)
movl %r12d, 0x20(%r15)
movl %ebx, 0x24(%r15)
leaq 0x11db2(%rip), %rsi     # 0x2a5f8
movq 0x1278b(%rip), %rdx     # 0x2afd8
movq %r15, %rdi
callq 0x4310
jmp 0x18857
movq %rax, %rbx
movq %r15, %rdi
callq 0x4180
jmp 0x18936
jmp 0x18869
movq %rax, %rbx
movq %r15, %rdi
jmp 0x18971
movq %rax, %rbx
movq %r12, %rdi
jmp 0x18971
jmp 0x188d2
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
jmp 0x1893a
jmp 0x18982
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x40e0
testb %r12b, %r12b
jne 0x1896e
jmp 0x18985
jmp 0x1896b
jmp 0x18982
jmp 0x18982
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x40e0
jmp 0x188d5
movq %rax, %rbx
movq %r14, %rdi
callq 0x41d0
jmp 0x18985
jmp 0x18982
jmp 0x18982
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
jmp 0x1893a
jmp 0x18982
jmp 0x18921
jmp 0x18915
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0x1893a
jmp 0x18921
jmp 0x18982
jmp 0x18921
jmp 0x1895c
movq %rax, %rbx
jmp 0x189c6
jmp 0x18982
jmp 0x1895c
movq %rax, %rbx
movq %r14, %rdi
callq 0x4180
jmp 0x189c6
jmp 0x18933
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x40e0
jmp 0x18985
jmp 0x18982
jmp 0x18982
jmp 0x18982
jmp 0x1896b
movq %rax, %rbx
movq %r15, %rdi
callq 0x41d0
jmp 0x1897d
jmp 0x189b7
jmp 0x189b7
jmp 0x189b7
movq %rax, %rbx
movq %r14, %rdi
callq 0x41d0
jmp 0x189c6
jmp 0x18982
movq %rax, %rbx
movq %r14, %rdi
callq 0x4180
jmp 0x18985
jmp 0x189b7
movq %rax, %rbx
movq %r14, %rdi
jmp 0x189ae
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x40e0
jmp 0x189c6
jmp 0x18997
jmp 0x189b7
movq %rax, %rbx
movq %r14, %rdi
callq 0x4180
jmp 0x189ba
jmp 0x189b7
jmp 0x189b7
movq %rax, %rbx
movq %r15, %rdi
callq 0x41d0
jmp 0x189ba
jmp 0x189b7
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x1b144
movq %rbx, %rdi
callq 0x4340