// File: zerolfx[P]P-Machine/movd.cpp
// Function: Movd::execute(StackMachine*)
void Movd::execute(StackMachine *stack)
{	cout << "begin " << stack->fStore[stack->fMP + fQ]->getValue() << endl;
	cout << "einde " << stack->fStore[stack->fMP + fQ + 2]->getValue() << endl;
	cout << "totaal " << stack->fStore[stack->fMP + fQ]->getValue() + stack->fStore[stack->fMP + fQ + 2]->getValue() - 1 << endl;
	if(stack->fStore[stack->fStore[stack->fMP + fQ]->getValue() + stack->fStore[stack->fMP + fQ + 2]->getValue()]->getValue() < 0)
	{
		// copying a block from the heapspace to the top of the stack
				
		StackInteger p1;
		StackBoolean p2;
		StackAddress p3;
		StackCharacter p4;
		StackReal p5;
		
		int baseaddress = stack->fStore[stack->fMP + fQ]->getValue() + stack->fStore[stack->fMP + fQ + 2]->getValue() - 1;
		
		for(int i = 1; i <= stack->fStore[stack->fMP + fQ + 1]->getValue(); ++i)
		{
			int effectiveaddress = - baseaddress - i - 1;
			
			if((-effectiveaddress >= 0) || (-effectiveaddress < stack->fNP))
				throw ExecutionError("instruction movd: trying to access a heapaddress that is out of range.");

			if(typeid(p1) == typeid(*stack->fHeap[effectiveaddress]))			
				stack->fStore.push_back(new StackInteger(*(dynamic_cast<StackInteger*>(stack->fHeap[-effectiveaddress]))));
			if(typeid(p2) == typeid(*stack->fHeap[effectiveaddress]))
				stack->fStore.push_back(new StackBoolean(*(dynamic_cast<StackBoolean*>(stack->fHeap[-effectiveaddress]))));
			if(typeid(p3) == typeid(*stack->fHeap[effectiveaddress]))
				stack->fStore.push_back(new StackAddress(*(dynamic_cast<StackAddress*>(stack->fHeap[-effectiveaddress]))));
			if(typeid(p4) == typeid(*stack->fHeap[effectiveaddress]))
				stack->fStore.push_back(new StackCharacter(*(dynamic_cast<StackCharacter*>(stack->fHeap[-effectiveaddress]))));
			if(typeid(p5) == typeid(*stack->fHeap[effectiveaddress]))
				stack->fStore.push_back(new StackReal(*(dynamic_cast<StackReal*>(stack->fHeap[-effectiveaddress]))));
		}
	}
	else
	{
		// copying a block from the stackspace to the top of the stack
				
		StackInteger p1;
		StackBoolean p2;
		StackAddress p3;
		StackCharacter p4;
		StackReal p5;
		
		int baseaddress = stack->fStore[stack->fMP + fQ]->getValue() + stack->fStore[stack->fMP + fQ + 2]->getValue() - 1;
		
		for(int i = 1; i <= stack->fStore[stack->fMP + fQ + 1]->getValue(); ++i)
		{
			int effectiveaddress = baseaddress + i;
			
			if((effectiveaddress < 0) || (effectiveaddress > stack->fSP))
				throw ExecutionError("instruction movd: trying to access a stackaddress that is out of range.");

			if(typeid(p1) == typeid(*stack->fStore[effectiveaddress]))			
				stack->fStore.push_back(new StackInteger(*(dynamic_cast<StackInteger*>(stack->fStore[effectiveaddress]))));
			if(typeid(p2) == typeid(*stack->fStore[effectiveaddress]))
				stack->fStore.push_back(new StackBoolean(*(dynamic_cast<StackBoolean*>(stack->fStore[effectiveaddress]))));
			if(typeid(p3) == typeid(*stack->fStore[effectiveaddress]))
				stack->fStore.push_back(new StackAddress(*(dynamic_cast<StackAddress*>(stack->fStore[effectiveaddress]))));
			if(typeid(p4) == typeid(*stack->fStore[effectiveaddress]))
				stack->fStore.push_back(new StackCharacter(*(dynamic_cast<StackCharacter*>(stack->fStore[effectiveaddress]))));
			if(typeid(p5) == typeid(*stack->fStore[effectiveaddress]))
				stack->fStore.push_back(new StackReal(*(dynamic_cast<StackReal*>(stack->fStore[effectiveaddress]))));
		}
	}
	
	delete stack->fStore[stack->fMP + fQ];
	stack->fStore[stack->fMP + fQ] = new StackAddress(stack->fSP + 1 - stack->fStore[stack->fMP + fQ + 2]->getValue());
	
	// increase the SP with the total size of the array (that has just been place on top of the stack)
	stack->fSP += stack->fStore[stack->fMP + fQ + 1]->getValue();	
	
	// adding cost of this instruction
	stack->fTime.count("movd");

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq 0x3216b(%rip), %rdi     # 0x4afc0
leaq 0x20117(%rip), %rsi     # 0x38f73
callq 0x7250
movq -0x1b8(%rbp), %rcx
movq %rax, -0x1d8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x1d8(%rbp), %rdi
movl %eax, %esi
callq 0x74c0
movq %rax, %rdi
movq 0x320fb(%rip), %rsi     # 0x4afa8
callq 0x72b0
movq 0x32107(%rip), %rdi     # 0x4afc0
leaq 0x200ba(%rip), %rsi     # 0x38f7a
callq 0x7250
movq -0x1b8(%rbp), %rcx
movq %rax, -0x1d0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x1d0(%rbp), %rdi
movl %eax, %esi
callq 0x74c0
movq %rax, %rdi
movq 0x32094(%rip), %rsi     # 0x4afa8
callq 0x72b0
movq 0x320a0(%rip), %rdi     # 0x4afc0
leaq 0x2005a(%rip), %rsi     # 0x38f81
callq 0x7250
movq -0x1b8(%rbp), %rcx
movq %rax, -0x1c0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x1b8(%rbp), %rcx
movl %eax, -0x1c4(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movl -0x1c4(%rbp), %esi
movq -0x1c0(%rbp), %rdi
addl %eax, %esi
subl $0x1, %esi
callq 0x74c0
movq %rax, %rdi
movq 0x31ff1(%rip), %rsi     # 0x4afa8
callq 0x72b0
movq -0x1b8(%rbp), %rcx
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x1b0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x1b8(%rbp), %rcx
movl %eax, -0x1a8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq -0x1b0(%rbp), %rdi
movl %eax, %ecx
movl -0x1a8(%rbp), %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
cmpl $0x0, %eax
jge 0x19847
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl %esi, -0x1dc(%rbp)
callq 0x27340
movl -0x1dc(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0x27d20
jmp 0x1907b
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x26800
jmp 0x19088
leaq -0x60(%rbp), %rdi
movl $0x61, %esi
callq 0x28170
jmp 0x19098
leaq -0x70(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x27840
jmp 0x190a6
movq -0x1b8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movl 0xc0(%rax), %eax
movl 0x8(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x1e0(%rbp)
jmp 0x190df
movq -0x1b8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdi
addq $0x18, %rdi
movl 0xc0(%rcx), %edx
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x2(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x1e4(%rbp)
jmp 0x1911e
movl -0x1e4(%rbp), %ecx
movl -0x1e0(%rbp), %eax
addl %ecx, %eax
subl $0x1, %eax
movl %eax, -0x74(%rbp)
movl $0x1, -0x78(%rbp)
movq -0x1b8(%rbp), %rax
movl -0x78(%rbp), %ecx
movl %ecx, -0x1ec(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rdi
addq $0x18, %rdi
movl 0xc0(%rcx), %edx
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x1(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x1e8(%rbp)
jmp 0x19181
movl -0x1ec(%rbp), %eax
movl -0x1e8(%rbp), %ecx
cmpl %ecx, %eax
jg 0x197e3
xorl %eax, %eax
subl -0x74(%rbp), %eax
subl -0x78(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x7c(%rbp)
xorl %eax, %eax
subl -0x7c(%rbp), %eax
cmpl $0x0, %eax
jge 0x191c2
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xb8(%rcx), %eax
jge 0x192e7
movb $0x1, -0xa2(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x200(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x74f0
movq -0x1f8(%rbp), %rdx
leaq 0x1fd8e(%rip), %rsi     # 0x38f89
leaq -0xa0(%rbp), %rdi
callq 0x8940
jmp 0x19209
movq -0x200(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x283d0
jmp 0x1921e
movq -0x200(%rbp), %rdi
movb $0x0, -0xa2(%rbp)
leaq 0x3084d(%rip), %rsi     # 0x49a80
leaq 0xf1c6(%rip), %rdx      # 0x28400
callq 0x74a0
jmp 0x1a292
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x19839
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x19830
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x19827
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1981e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x19815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x192bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7170
leaq -0xa1(%rbp), %rdi
callq 0x72e0
testb $0x1, -0xa2(%rbp)
jne 0x192d6
jmp 0x192e2
movq -0x200(%rbp), %rdi
callq 0x71c0
jmp 0x19815
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x7c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x208(%rbp)
cmpq $0x0, %rax
jne 0x1930f
callq 0x7300
jmp 0x1930f
movq -0x208(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x317cc(%rip), %rdi     # 0x4aaf0
callq 0x93a0
testb $0x1, %al
jne 0x19332
jmp 0x193e3
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x218(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x210(%rbp)
jmp 0x19354
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x220(%rbp)
cmpq $0x0, %rax
je 0x193a0
movq -0x220(%rbp), %rdi
leaq 0x316a1(%rip), %rsi     # 0x4aa28
leaq 0x31762(%rip), %rdx     # 0x4aaf0
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x228(%rbp)
jmp 0x193ab
xorl %eax, %eax
movq %rax, -0x228(%rbp)
jmp 0x193ab
movq -0x210(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0xd2d0
movq -0x210(%rbp), %rax
movq -0x218(%rbp), %rdi
movq %rax, -0xb0(%rbp)
leaq -0xb0(%rbp), %rsi
callq 0xd2a0
jmp 0x193e1
jmp 0x193e3
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x7c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x230(%rbp)
cmpq $0x0, %rax
jne 0x1940b
callq 0x7300
jmp 0x1940b
movq -0x230(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x31870(%rip), %rdi     # 0x4ac90
callq 0x93a0
testb $0x1, %al
jne 0x1942e
jmp 0x194df
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x240(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x238(%rbp)
jmp 0x19450
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x248(%rbp)
cmpq $0x0, %rax
je 0x1949c
movq -0x248(%rbp), %rdi
leaq 0x315a5(%rip), %rsi     # 0x4aa28
leaq 0x31806(%rip), %rdx     # 0x4ac90
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x250(%rbp)
jmp 0x194a7
xorl %eax, %eax
movq %rax, -0x250(%rbp)
jmp 0x194a7
movq -0x238(%rbp), %rdi
movq -0x250(%rbp), %rsi
callq 0xd370
movq -0x238(%rbp), %rax
movq -0x240(%rbp), %rdi
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rsi
callq 0xd2a0
jmp 0x194dd
jmp 0x194df
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x7c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x258(%rbp)
cmpq $0x0, %rax
jne 0x19507
callq 0x7300
jmp 0x19507
movq -0x258(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x3143c(%rip), %rdi     # 0x4a958
callq 0x93a0
testb $0x1, %al
jne 0x1952a
jmp 0x195db
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x268(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x260(%rbp)
jmp 0x1954c
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x270(%rbp)
cmpq $0x0, %rax
je 0x19598
movq -0x270(%rbp), %rdi
leaq 0x314a9(%rip), %rsi     # 0x4aa28
leaq 0x313d2(%rip), %rdx     # 0x4a958
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x278(%rbp)
jmp 0x195a3
xorl %eax, %eax
movq %rax, -0x278(%rbp)
jmp 0x195a3
movq -0x260(%rbp), %rdi
movq -0x278(%rbp), %rsi
callq 0xd410
movq -0x260(%rbp), %rax
movq -0x268(%rbp), %rdi
movq %rax, -0xc0(%rbp)
leaq -0xc0(%rbp), %rsi
callq 0xd2a0
jmp 0x195d9
jmp 0x195db
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x7c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x280(%rbp)
cmpq $0x0, %rax
jne 0x19603
callq 0x7300
jmp 0x19603
movq -0x280(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x31748(%rip), %rdi     # 0x4ad60
callq 0x93a0
testb $0x1, %al
jne 0x19626
jmp 0x196d7
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x290(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x288(%rbp)
jmp 0x19648
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x298(%rbp)
cmpq $0x0, %rax
je 0x19694
movq -0x298(%rbp), %rdi
leaq 0x313ad(%rip), %rsi     # 0x4aa28
leaq 0x316de(%rip), %rdx     # 0x4ad60
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x2a0(%rbp)
jmp 0x1969f
xorl %eax, %eax
movq %rax, -0x2a0(%rbp)
jmp 0x1969f
movq -0x288(%rbp), %rdi
movq -0x2a0(%rbp), %rsi
callq 0xd3c0
movq -0x288(%rbp), %rax
movq -0x290(%rbp), %rdi
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %rsi
callq 0xd2a0
jmp 0x196d5
jmp 0x196d7
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x7c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2a8(%rbp)
cmpq $0x0, %rax
jne 0x196ff
callq 0x7300
jmp 0x196ff
movq -0x2a8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x314ac(%rip), %rdi     # 0x4abc0
callq 0x93a0
testb $0x1, %al
jne 0x19722
jmp 0x197d3
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x2b8(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x2b0(%rbp)
jmp 0x19744
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2c0(%rbp)
cmpq $0x0, %rax
je 0x19790
movq -0x2c0(%rbp), %rdi
leaq 0x312b1(%rip), %rsi     # 0x4aa28
leaq 0x31442(%rip), %rdx     # 0x4abc0
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x2c8(%rbp)
jmp 0x1979b
xorl %eax, %eax
movq %rax, -0x2c8(%rbp)
jmp 0x1979b
movq -0x2b0(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
callq 0xd320
movq -0x2b0(%rbp), %rax
movq -0x2b8(%rbp), %rdi
movq %rax, -0xd0(%rbp)
leaq -0xd0(%rbp), %rsi
callq 0xd2a0
jmp 0x197d1
jmp 0x197d3
jmp 0x197d5
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x19139
leaq -0x70(%rbp), %rdi
callq 0x27880
leaq -0x60(%rbp), %rdi
callq 0x281b0
leaq -0x50(%rbp), %rdi
callq 0x26840
leaq -0x30(%rbp), %rdi
callq 0x27d70
leaq -0x20(%rbp), %rdi
callq 0x27380
jmp 0x1a07c
leaq -0x70(%rbp), %rdi
callq 0x27880
leaq -0x60(%rbp), %rdi
callq 0x281b0
leaq -0x50(%rbp), %rdi
callq 0x26840
leaq -0x30(%rbp), %rdi
callq 0x27d70
leaq -0x20(%rbp), %rdi
callq 0x27380
jmp 0x1a289
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
movl %esi, -0x2cc(%rbp)
callq 0x27340
movl -0x2cc(%rbp), %esi
leaq -0xf0(%rbp), %rdi
callq 0x27d20
jmp 0x1986f
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
callq 0x26800
jmp 0x1987f
leaq -0x110(%rbp), %rdi
movl $0x61, %esi
callq 0x28170
jmp 0x19892
leaq -0x120(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x27840
jmp 0x198a3
movq -0x1b8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movl 0xc0(%rax), %eax
movl 0x8(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x2d0(%rbp)
jmp 0x198dc
movq -0x1b8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdi
addq $0x18, %rdi
movl 0xc0(%rcx), %edx
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x2(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x2d4(%rbp)
jmp 0x1991b
movl -0x2d4(%rbp), %ecx
movl -0x2d0(%rbp), %eax
addl %ecx, %eax
subl $0x1, %eax
movl %eax, -0x124(%rbp)
movl $0x1, -0x128(%rbp)
movq -0x1b8(%rbp), %rax
movl -0x128(%rbp), %ecx
movl %ecx, -0x2dc(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rdi
addq $0x18, %rdi
movl 0xc0(%rcx), %edx
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x1(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x2d8(%rbp)
jmp 0x19987
movl -0x2dc(%rbp), %eax
movl -0x2d8(%rbp), %ecx
cmpl %ecx, %eax
jg 0x19ffd
movl -0x124(%rbp), %eax
addl -0x128(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x0, -0x12c(%rbp)
jl 0x199cc
movl -0x12c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xb4(%rcx), %eax
jle 0x19af1
movb $0x1, -0x152(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x2f0(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x74f0
movq -0x2e8(%rbp), %rdx
leaq 0x1f5cb(%rip), %rsi     # 0x38fd0
leaq -0x150(%rbp), %rdi
callq 0x8940
jmp 0x19a13
movq -0x2f0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x283d0
jmp 0x19a28
movq -0x2f0(%rbp), %rdi
movb $0x0, -0x152(%rbp)
leaq 0x30043(%rip), %rsi     # 0x49a80
leaq 0xe9bc(%rip), %rdx      # 0x28400
callq 0x74a0
jmp 0x1a292
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a06b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a05f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a053
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a047
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a03b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x19ac9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x7170
leaq -0x151(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x152(%rbp)
jne 0x19ae0
jmp 0x19aec
movq -0x2f0(%rbp), %rdi
callq 0x71c0
jmp 0x1a03b
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2f8(%rbp)
cmpq $0x0, %rax
jne 0x19b1c
callq 0x7300
jmp 0x19b1c
movq -0x2f8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x30fbf(%rip), %rdi     # 0x4aaf0
callq 0x93a0
testb $0x1, %al
jne 0x19b3f
jmp 0x19bef
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x308(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x300(%rbp)
jmp 0x19b61
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x310(%rbp)
cmpq $0x0, %rax
je 0x19bac
movq -0x310(%rbp), %rdi
leaq 0x30e95(%rip), %rsi     # 0x4aa28
leaq 0x30f56(%rip), %rdx     # 0x4aaf0
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x318(%rbp)
jmp 0x19bb7
xorl %eax, %eax
movq %rax, -0x318(%rbp)
jmp 0x19bb7
movq -0x300(%rbp), %rdi
movq -0x318(%rbp), %rsi
callq 0xd2d0
movq -0x300(%rbp), %rax
movq -0x308(%rbp), %rdi
movq %rax, -0x160(%rbp)
leaq -0x160(%rbp), %rsi
callq 0xd2a0
jmp 0x19bed
jmp 0x19bef
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x320(%rbp)
cmpq $0x0, %rax
jne 0x19c1a
callq 0x7300
jmp 0x19c1a
movq -0x320(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x31061(%rip), %rdi     # 0x4ac90
callq 0x93a0
testb $0x1, %al
jne 0x19c3d
jmp 0x19ced
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x330(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x328(%rbp)
jmp 0x19c5f
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x338(%rbp)
cmpq $0x0, %rax
je 0x19caa
movq -0x338(%rbp), %rdi
leaq 0x30d97(%rip), %rsi     # 0x4aa28
leaq 0x30ff8(%rip), %rdx     # 0x4ac90
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x340(%rbp)
jmp 0x19cb5
xorl %eax, %eax
movq %rax, -0x340(%rbp)
jmp 0x19cb5
movq -0x328(%rbp), %rdi
movq -0x340(%rbp), %rsi
callq 0xd370
movq -0x328(%rbp), %rax
movq -0x330(%rbp), %rdi
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %rsi
callq 0xd2a0
jmp 0x19ceb
jmp 0x19ced
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x348(%rbp)
cmpq $0x0, %rax
jne 0x19d18
callq 0x7300
jmp 0x19d18
movq -0x348(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x30c2b(%rip), %rdi     # 0x4a958
callq 0x93a0
testb $0x1, %al
jne 0x19d3b
jmp 0x19deb
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x358(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x350(%rbp)
jmp 0x19d5d
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x360(%rbp)
cmpq $0x0, %rax
je 0x19da8
movq -0x360(%rbp), %rdi
leaq 0x30c99(%rip), %rsi     # 0x4aa28
leaq 0x30bc2(%rip), %rdx     # 0x4a958
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x368(%rbp)
jmp 0x19db3
xorl %eax, %eax
movq %rax, -0x368(%rbp)
jmp 0x19db3
movq -0x350(%rbp), %rdi
movq -0x368(%rbp), %rsi
callq 0xd410
movq -0x350(%rbp), %rax
movq -0x358(%rbp), %rdi
movq %rax, -0x170(%rbp)
leaq -0x170(%rbp), %rsi
callq 0xd2a0
jmp 0x19de9
jmp 0x19deb
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x370(%rbp)
cmpq $0x0, %rax
jne 0x19e16
callq 0x7300
jmp 0x19e16
movq -0x370(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x30f35(%rip), %rdi     # 0x4ad60
callq 0x93a0
testb $0x1, %al
jne 0x19e39
jmp 0x19ee9
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x380(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x378(%rbp)
jmp 0x19e5b
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x388(%rbp)
cmpq $0x0, %rax
je 0x19ea6
movq -0x388(%rbp), %rdi
leaq 0x30b9b(%rip), %rsi     # 0x4aa28
leaq 0x30ecc(%rip), %rdx     # 0x4ad60
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x390(%rbp)
jmp 0x19eb1
xorl %eax, %eax
movq %rax, -0x390(%rbp)
jmp 0x19eb1
movq -0x378(%rbp), %rdi
movq -0x390(%rbp), %rsi
callq 0xd3c0
movq -0x378(%rbp), %rax
movq -0x380(%rbp), %rdi
movq %rax, -0x178(%rbp)
leaq -0x178(%rbp), %rsi
callq 0xd2a0
jmp 0x19ee7
jmp 0x19ee9
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x398(%rbp)
cmpq $0x0, %rax
jne 0x19f14
callq 0x7300
jmp 0x19f14
movq -0x398(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x30c97(%rip), %rdi     # 0x4abc0
callq 0x93a0
testb $0x1, %al
jne 0x19f37
jmp 0x19fe7
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x3a8(%rbp)
movl $0x10, %edi
callq 0x7270
movq %rax, -0x3a0(%rbp)
jmp 0x19f59
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x3b0(%rbp)
cmpq $0x0, %rax
je 0x19fa4
movq -0x3b0(%rbp), %rdi
leaq 0x30a9d(%rip), %rsi     # 0x4aa28
leaq 0x30c2e(%rip), %rdx     # 0x4abc0
xorl %eax, %eax
movl %eax, %ecx
callq 0x7320
movq %rax, -0x3b8(%rbp)
jmp 0x19faf
xorl %eax, %eax
movq %rax, -0x3b8(%rbp)
jmp 0x19faf
movq -0x3a0(%rbp), %rdi
movq -0x3b8(%rbp), %rsi
callq 0xd320
movq -0x3a0(%rbp), %rax
movq -0x3a8(%rbp), %rdi
movq %rax, -0x180(%rbp)
leaq -0x180(%rbp), %rsi
callq 0xd2a0
jmp 0x19fe5
jmp 0x19fe7
jmp 0x19fe9
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x1993c
leaq -0x120(%rbp), %rdi
callq 0x27880
leaq -0x110(%rbp), %rdi
callq 0x281b0
leaq -0x100(%rbp), %rdi
callq 0x26840
leaq -0xf0(%rbp), %rdi
callq 0x27d70
leaq -0xe0(%rbp), %rdi
callq 0x27380
jmp 0x1a07c
leaq -0x120(%rbp), %rdi
callq 0x27880
leaq -0x110(%rbp), %rdi
callq 0x281b0
leaq -0x100(%rbp), %rdi
callq 0x26840
leaq -0xf0(%rbp), %rdi
callq 0x27d70
leaq -0xe0(%rbp), %rdi
callq 0x27380
jmp 0x1a289
movq -0x1b8(%rbp), %rcx
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
addl 0x8(%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x3c0(%rbp)
cmpq $0x0, %rax
je 0x1a0cd
movq -0x3c0(%rbp), %rdi
callq 0x26ca0
movq -0x3c0(%rbp), %rdi
movl $0x8, %esi
callq 0x7280
movl $0x10, %edi
callq 0x7270
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq %rcx, -0x3d0(%rbp)
movq -0x10(%rbp), %rdi
movl 0xb4(%rdi), %ecx
movl 0xc0(%rdi), %edx
incl %ecx
movl %ecx, -0x3c8(%rbp)
addq $0x18, %rdi
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x2(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, -0x3c4(%rbp)
jmp 0x1a12b
movq -0x3d0(%rbp), %rdi
movl -0x3c4(%rbp), %eax
movl -0x3c8(%rbp), %esi
subl %eax, %esi
callq 0x26800
jmp 0x1a147
movq -0x1b8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movl 0xc0(%rax), %eax
movl 0x8(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x8e70
movq -0x3d0(%rbp), %rdx
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movq %rdx, (%rcx)
movq -0x10(%rbp), %rcx
movq %rcx, %rdi
addq $0x18, %rdi
movl 0xc0(%rcx), %edx
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x1(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0xb4(%rax)
movq -0x10(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x3e0(%rbp)
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x74f0
movq -0x3d8(%rbp), %rdx
leaq 0x1ee24(%rip), %rsi     # 0x39018
leaq -0x1a0(%rbp), %rdi
callq 0x8940
jmp 0x1a202
movq -0x3e0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x2c4d0
jmp 0x1a217
leaq -0x1a0(%rbp), %rdi
callq 0x7170
leaq -0x1a1(%rbp), %rdi
callq 0x72e0
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
movq -0x3d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x10, %esi
callq 0x7280
jmp 0x1a289
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a27d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x7170
leaq -0x1a1(%rbp), %rdi
callq 0x72e0
movq -0x38(%rbp), %rdi
callq 0x74e0
nopw %cs:(%rax,%rax)