// File: zerolfx[P]P-Machine/les.cpp
// Function: Les::execute(StackMachine*)
void Les::execute(StackMachine *stack) 
{
	// check if the stack contains at least two entries
	if(stack->fSP < 1)
		throw ExecutionError("instruction les: requires 2 stackelements to be present.");

	switch(fType)
	{
		case integer:
		{
			StackInteger p1;

			// check if the two uppermost stackentries are of type integer
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction les: SP does not point to element of type integer.");
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP - 1])))
				throw ExecutionError("instruction les: SP - 1 does not point to element of type integer.");

			break;
		}	
		case real:
		{
			StackReal p1;
			// check if the two uppermost stackentries are of type real
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction les: SP does not point to element of type real.");
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP - 1])))
				throw ExecutionError("instruction les: SP - 1 does not point to element of type real.");
			break;
		}
		case boolean:
		{
			StackBoolean p1;
			// check if the two uppermost stackentries are of type real
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction les: SP does not point to element of type boolean.");
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP - 1])))
				throw ExecutionError("instruction les: SP - 1 does not point to element of type boolean.");
			break;
		}
		case character:
		{
			StackCharacter p1;
			// check if the two uppermost stackentries are of type real
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction les: SP does not point to element of type character.");
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP - 1])))
				throw ExecutionError("instruction les: SP - 1 does not point to element of type character.");
			break;
		}
		case address:
		{
			StackAddress p1;
			// check if the two uppermost stackentries are of type real
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction les: SP does not point to element of type address.");
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP - 1])))
				throw ExecutionError("instruction les: SP - 1 does not point to element of type address.");
			break;
		}

	}
		
	// compare
	StackBoolean *result;
	if(*(stack->fStore[stack->fSP - 1]) < *(stack->fStore[stack->fSP]))
		result = new StackBoolean(true);
	else
		result = new StackBoolean(false);
		
	// remove operands
	delete stack->fStore[stack->fSP];
	stack->fStore[stack->fSP] = 0;
	delete stack->fStore[stack->fSP - 1];
	stack->fStore[stack->fSP - 1] = 0;
	stack->fStore.pop_back();
	stack->fStore.pop_back();
	--stack->fSP;

	// put result on top of stack
	stack->fStore.push_back(result);
	
	// adding cost of this instruction
	stack->fTime.count("les");

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0xb4(%rax)
jge 0x16d67
movb $0x1, -0x45(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x278(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x74f0
movq -0x270(%rbp), %rdx
leaq 0x21f4f(%rip), %rsi     # 0x38c31
leaq -0x30(%rbp), %rdi
callq 0x8940
jmp 0x16ced
movq -0x278(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x283d0
jmp 0x16cff
movq -0x278(%rbp), %rdi
movb $0x0, -0x45(%rbp)
leaq 0x32d6f(%rip), %rsi     # 0x49a80
leaq 0x116e8(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16d45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x7170
leaq -0x31(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x45(%rbp)
jne 0x16d56
jmp 0x16d62
movq -0x278(%rbp), %rdi
callq 0x71c0
jmp 0x17cdb
movq -0x268(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x280(%rbp)
subq $0x4, %rax
ja 0x17a1c
movq -0x280(%rbp), %rax
leaq 0x21e88(%rip), %rcx     # 0x38c18
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x27340
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x288(%rbp)
cmpq $0x0, %rax
jne 0x16dd3
callq 0x7300
jmp 0x16dd3
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x33d08(%rip), %rdi     # 0x4aaf0
callq 0x9370
testb $0x1, %al
jne 0x16df6
jmp 0x16ebf
movb $0x1, -0x7a(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x298(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x74f0
movq -0x290(%rbp), %rdx
leaq 0x21e41(%rip), %rsi     # 0x38c6a
leaq -0x78(%rbp), %rdi
callq 0x8940
jmp 0x16e34
movq -0x298(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x283d0
jmp 0x16e46
movq -0x298(%rbp), %rdi
movb $0x0, -0x7a(%rbp)
leaq 0x32c28(%rip), %rsi     # 0x49a80
leaq 0x115a1(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16ff1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16e9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7170
leaq -0x79(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x7a(%rbp)
jne 0x16eae
jmp 0x16eba
movq -0x298(%rbp), %rdi
callq 0x71c0
jmp 0x16ff1
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2a0(%rbp)
cmpq $0x0, %rax
jne 0x16ef3
callq 0x7300
jmp 0x16ef3
movq -0x2a0(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x33be8(%rip), %rdi     # 0x4aaf0
callq 0x9370
testb $0x1, %al
jne 0x16f16
jmp 0x16fe3
movb $0x1, -0xa2(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x2b0(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x74f0
movq -0x2a8(%rbp), %rdx
leaq 0x21d5a(%rip), %rsi     # 0x38ca9
leaq -0xa0(%rbp), %rdi
callq 0x8940
jmp 0x16f5d
movq -0x2b0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x283d0
jmp 0x16f72
movq -0x2b0(%rbp), %rdi
movb $0x0, -0xa2(%rbp)
leaq 0x32af9(%rip), %rsi     # 0x49a80
leaq 0x11472(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16fbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7170
leaq -0xa1(%rbp), %rdi
callq 0x72e0
testb $0x1, -0xa2(%rbp)
jne 0x16fd5
jmp 0x16fe1
movq -0x2b0(%rbp), %rdi
callq 0x71c0
jmp 0x16ff1
leaq -0x58(%rbp), %rdi
callq 0x27380
jmp 0x17a1c
leaq -0x58(%rbp), %rdi
callq 0x27380
jmp 0x17cdb
leaq -0xb8(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x27840
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2b8(%rbp)
cmpq $0x0, %rax
jne 0x1703d
callq 0x7300
jmp 0x1703d
movq -0x2b8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x33b6e(%rip), %rdi     # 0x4abc0
callq 0x9370
testb $0x1, %al
jne 0x17060
jmp 0x17141
movb $0x1, -0xda(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x2c8(%rbp)
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x74f0
movq -0x2c0(%rbp), %rdx
leaq 0x21c53(%rip), %rsi     # 0x38cec
leaq -0xd8(%rbp), %rdi
callq 0x8940
jmp 0x170a7
movq -0x2c8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x283d0
jmp 0x170bc
movq -0x2c8(%rbp), %rdi
movb $0x0, -0xda(%rbp)
leaq 0x329af(%rip), %rsi     # 0x49a80
leaq 0x11328(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17276
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17119
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x7170
leaq -0xd9(%rbp), %rdi
callq 0x72e0
testb $0x1, -0xda(%rbp)
jne 0x17130
jmp 0x1713c
movq -0x2c8(%rbp), %rdi
callq 0x71c0
jmp 0x17276
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2d0(%rbp)
cmpq $0x0, %rax
jne 0x17175
callq 0x7300
jmp 0x17175
movq -0x2d0(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x33a36(%rip), %rdi     # 0x4abc0
callq 0x9370
testb $0x1, %al
jne 0x17198
jmp 0x17265
movb $0x1, -0x102(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x2e0(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x74f0
movq -0x2d8(%rbp), %rdx
leaq 0x21b57(%rip), %rsi     # 0x38d28
leaq -0x100(%rbp), %rdi
callq 0x8940
jmp 0x171df
movq -0x2e0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x283d0
jmp 0x171f4
movq -0x2e0(%rbp), %rdi
movb $0x0, -0x102(%rbp)
leaq 0x32877(%rip), %rsi     # 0x49a80
leaq 0x111f0(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17240
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x7170
leaq -0x101(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x102(%rbp)
jne 0x17257
jmp 0x17263
movq -0x2e0(%rbp), %rdi
callq 0x71c0
jmp 0x17276
leaq -0xb8(%rbp), %rdi
callq 0x27880
jmp 0x17a1c
leaq -0xb8(%rbp), %rdi
callq 0x27880
jmp 0x17cdb
leaq -0x118(%rbp), %rdi
xorl %esi, %esi
callq 0x27d20
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x2e8(%rbp)
cmpq $0x0, %rax
jne 0x172c4
callq 0x7300
jmp 0x172c4
movq -0x2e8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x339b7(%rip), %rdi     # 0x4ac90
callq 0x9370
testb $0x1, %al
jne 0x172e7
jmp 0x173c8
movb $0x1, -0x13a(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x2f8(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x74f0
movq -0x2f0(%rbp), %rdx
leaq 0x21a48(%rip), %rsi     # 0x38d68
leaq -0x138(%rbp), %rdi
callq 0x8940
jmp 0x1732e
movq -0x2f8(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x283d0
jmp 0x17343
movq -0x2f8(%rbp), %rdi
movb $0x0, -0x13a(%rbp)
leaq 0x32728(%rip), %rsi     # 0x49a80
leaq 0x110a1(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x174fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x173a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x7170
leaq -0x139(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x13a(%rbp)
jne 0x173b7
jmp 0x173c3
movq -0x2f8(%rbp), %rdi
callq 0x71c0
jmp 0x174fd
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x300(%rbp)
cmpq $0x0, %rax
jne 0x173fc
callq 0x7300
jmp 0x173fc
movq -0x300(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x3387f(%rip), %rdi     # 0x4ac90
callq 0x9370
testb $0x1, %al
jne 0x1741f
jmp 0x174ec
movb $0x1, -0x162(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x310(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x74f0
movq -0x308(%rbp), %rdx
leaq 0x2194f(%rip), %rsi     # 0x38da7
leaq -0x160(%rbp), %rdi
callq 0x8940
jmp 0x17466
movq -0x310(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x283d0
jmp 0x1747b
movq -0x310(%rbp), %rdi
movb $0x0, -0x162(%rbp)
leaq 0x325f0(%rip), %rsi     # 0x49a80
leaq 0x10f69(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x174c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x7170
leaq -0x161(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x162(%rbp)
jne 0x174de
jmp 0x174ea
movq -0x310(%rbp), %rdi
callq 0x71c0
jmp 0x174fd
leaq -0x118(%rbp), %rdi
callq 0x27d70
jmp 0x17a1c
leaq -0x118(%rbp), %rdi
callq 0x27d70
jmp 0x17cdb
leaq -0x178(%rbp), %rdi
movl $0x61, %esi
callq 0x28170
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x318(%rbp)
cmpq $0x0, %rax
jne 0x1754e
callq 0x7300
jmp 0x1754e
movq -0x318(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x337fd(%rip), %rdi     # 0x4ad60
callq 0x9370
testb $0x1, %al
jne 0x17571
jmp 0x17652
movb $0x1, -0x19a(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x328(%rbp)
leaq -0x199(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x74f0
movq -0x320(%rbp), %rdx
leaq 0x21840(%rip), %rsi     # 0x38dea
leaq -0x198(%rbp), %rdi
callq 0x8940
jmp 0x175b8
movq -0x328(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x283d0
jmp 0x175cd
movq -0x328(%rbp), %rdi
movb $0x0, -0x19a(%rbp)
leaq 0x3249e(%rip), %rsi     # 0x49a80
leaq 0x10e17(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17787
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1762a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x7170
leaq -0x199(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x19a(%rbp)
jne 0x17641
jmp 0x1764d
movq -0x328(%rbp), %rdi
callq 0x71c0
jmp 0x17787
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x330(%rbp)
cmpq $0x0, %rax
jne 0x17686
callq 0x7300
jmp 0x17686
movq -0x330(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x336c5(%rip), %rdi     # 0x4ad60
callq 0x9370
testb $0x1, %al
jne 0x176a9
jmp 0x17776
movb $0x1, -0x1c2(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x340(%rbp)
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x74f0
movq -0x338(%rbp), %rdx
leaq 0x21749(%rip), %rsi     # 0x38e2b
leaq -0x1c0(%rbp), %rdi
callq 0x8940
jmp 0x176f0
movq -0x340(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x283d0
jmp 0x17705
movq -0x340(%rbp), %rdi
movb $0x0, -0x1c2(%rbp)
leaq 0x32366(%rip), %rsi     # 0x49a80
leaq 0x10cdf(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17751
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x7170
leaq -0x1c1(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x1c2(%rbp)
jne 0x17768
jmp 0x17774
movq -0x340(%rbp), %rdi
callq 0x71c0
jmp 0x17787
leaq -0x178(%rbp), %rdi
callq 0x281b0
jmp 0x17a1c
leaq -0x178(%rbp), %rdi
callq 0x281b0
jmp 0x17cdb
leaq -0x1d8(%rbp), %rdi
xorl %esi, %esi
callq 0x26800
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x348(%rbp)
cmpq $0x0, %rax
jne 0x177d5
callq 0x7300
jmp 0x177d5
movq -0x348(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x3316e(%rip), %rdi     # 0x4a958
callq 0x9370
testb $0x1, %al
jne 0x177f8
jmp 0x178d9
movb $0x1, -0x1fa(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x358(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x74f0
movq -0x350(%rbp), %rdx
leaq 0x2163f(%rip), %rsi     # 0x38e70
leaq -0x1f8(%rbp), %rdi
callq 0x8940
jmp 0x1783f
movq -0x358(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x283d0
jmp 0x17854
movq -0x358(%rbp), %rdi
movb $0x0, -0x1fa(%rbp)
leaq 0x32217(%rip), %rsi     # 0x49a80
leaq 0x10b90(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17a0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x178b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x7170
leaq -0x1f9(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x1fa(%rbp)
jne 0x178c8
jmp 0x178d4
movq -0x358(%rbp), %rdi
callq 0x71c0
jmp 0x17a0b
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x360(%rbp)
cmpq $0x0, %rax
jne 0x1790d
callq 0x7300
jmp 0x1790d
movq -0x360(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq 0x33036(%rip), %rdi     # 0x4a958
callq 0x9370
testb $0x1, %al
jne 0x17930
jmp 0x179fd
movb $0x1, -0x222(%rbp)
movl $0x20, %edi
callq 0x7110
movq %rax, -0x370(%rbp)
leaq -0x221(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x74f0
movq -0x368(%rbp), %rdx
leaq 0x21546(%rip), %rsi     # 0x38eaf
leaq -0x220(%rbp), %rdi
callq 0x8940
jmp 0x17977
movq -0x370(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x283d0
jmp 0x1798c
movq -0x370(%rbp), %rdi
movb $0x0, -0x222(%rbp)
leaq 0x320df(%rip), %rsi     # 0x49a80
leaq 0x10a58(%rip), %rdx     # 0x28400
callq 0x74a0
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x179d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x7170
leaq -0x221(%rbp), %rdi
callq 0x72e0
testb $0x1, -0x222(%rbp)
jne 0x179ef
jmp 0x179fb
movq -0x370(%rbp), %rdi
callq 0x71c0
jmp 0x17a0b
leaq -0x1d8(%rbp), %rdi
callq 0x26840
jmp 0x17a1c
leaq -0x1d8(%rbp), %rdi
callq 0x26840
jmp 0x17cdb
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x378(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq -0x378(%rbp), %rdi
movq (%rax), %rsi
callq 0x272a0
testb $0x1, %al
jne 0x17a70
jmp 0x17ac5
movl $0x10, %edi
callq 0x7270
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x380(%rbp)
movl $0x1, %esi
callq 0x27d20
jmp 0x17a93
movq -0x380(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x17b17
movq -0x380(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x10, %esi
callq 0x7280
jmp 0x17cdb
movl $0x10, %edi
callq 0x7270
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x388(%rbp)
xorl %esi, %esi
callq 0x27d20
jmp 0x17ae5
movq -0x388(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x17b17
movq -0x388(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x10, %esi
callq 0x7280
jmp 0x17cdb
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x390(%rbp)
cmpq $0x0, %rax
je 0x17b5c
movq -0x390(%rbp), %rdi
callq 0x26ca0
movq -0x390(%rbp), %rdi
movl $0x8, %esi
callq 0x7280
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movslq 0xb4(%rax), %rsi
callq 0x8e70
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x8e70
movq (%rax), %rax
movq %rax, -0x398(%rbp)
cmpq $0x0, %rax
je 0x17bc5
movq -0x398(%rbp), %rdi
callq 0x26ca0
movq -0x398(%rbp), %rdi
movl $0x8, %esi
callq 0x7280
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movl 0xb4(%rax), %eax
decl %eax
movslq %eax, %rsi
callq 0x8e70
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x8e90
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x8e90
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %ecx
decl %ecx
movl %ecx, 0xb4(%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x230(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x238(%rbp), %rsi
callq 0xd2a0
movq -0x10(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x3a8(%rbp)
leaq -0x259(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x74f0
movq -0x3a0(%rbp), %rdx
leaq 0x2128d(%rip), %rsi     # 0x38ef2
leaq -0x258(%rbp), %rdi
callq 0x8940
jmp 0x17c73
movq -0x3a8(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x2c4d0
jmp 0x17c88
leaq -0x258(%rbp), %rdi
callq 0x7170
leaq -0x259(%rbp), %rdi
callq 0x72e0
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17ccf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x7170
leaq -0x259(%rbp), %rdi
callq 0x72e0
movq -0x40(%rbp), %rdi
callq 0x74e0
nopw %cs:(%rax,%rax)