// File: CMU-SAFARI[P]optimal-seed-solver/optimalSolverLN.cc
// Function: OptimalSolverLN::loadL0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void OptimalSolverLN::loadL0(string& DNA) {
	bool edge_left;
	bool edge_right;
	int lvPosCount = readLength + 1 - minLength;

	if (!L0Loaded) {
		assert(DNA.length() == static_cast<unsigned int>(readLength) );

		reset();

		//Calculate the first level

#ifdef DEBUG
		cout << "*L0*: " << endl << "*subl 0*: ";
#endif
		for (int i = 0; i < lvPosCount; i++) {
			string seed = DNA.substr(i, minLength);
			tree.query(seed);
			level0[0][i].start = i;
			level0[0][i].end = i + minLength - 1;
			level0[0][i].frequency = tree.frequency();
			level0[0][i].isleaf = tree.isLeaf();

#ifdef DEBUG
			cout << level0[0][i].start << "-" << level0[0][i].end << ":" << level0[0][i].frequency << " ";
#endif
		}
#ifdef DEBUG
		cout << endl;
#endif

		for (int i = 1; i < lvPosCount; i++) {
#ifdef DEBUG
			cout << "*subl" << i << "*: ";
#endif
			for (int j = 0; j < lvPosCount - i; j++) {
				edge_left = level0[i-1][j].start == static_cast<unsigned int>(j);
				edge_right = level0[i-1][j+1].end == static_cast<unsigned int>(j + i + minLength - 1);

				// If left edge but not right, copy left seed
				if (edge_left && !edge_right) {
					level0[i][j].isleaf = level0[i-1][j].isleaf;
					level0[i][j].frequency = level0[i-1][j].frequency;
					level0[i][j].start = level0[i-1][j].start;
					level0[i][j].end = level0[i-1][j].end;
				}
				// If right edge but not left, copy right seed
				else if (!edge_left && edge_right) {
					level0[i][j].isleaf = level0[i-1][j+1].isleaf;
					level0[i][j].frequency = level0[i-1][j+1].frequency;
					level0[i][j].start = level0[i-1][j+1].start;
					level0[i][j].end = level0[i-1][j+1].end;
				}
				// If both are edging, then we have to test potentially three cases
				else if (edge_left && edge_right) {
					// If left is not leaf, always merge
					if (!level0[i-1][j].isleaf) {
						string seed = DNA.substr(j, minLength + i);

						//TODO: Optimize query
						tree.query(seed);
						level0[i][j].isleaf = tree.isLeaf();
						level0[i][j].frequency = tree.frequency();
						level0[i][j].start = j;
						level0[i][j].end = j + minLength + i - 1;
					}
					// Check left seed vs right seed if not merging.
					else {
						// Prioritize left position over right position
						if (level0[i-1][j].frequency <= level0[i-1][j+1].frequency) {
							level0[i][j].isleaf = level0[i-1][j].isleaf;
							level0[i][j].frequency = level0[i-1][j].frequency;
							level0[i][j].start = level0[i-1][j].start;
							level0[i][j].end = level0[i-1][j].end;
						}
						else {
							level0[i][j].isleaf = level0[i-1][j+1].isleaf;
							level0[i][j].frequency = level0[i-1][j+1].frequency;
							level0[i][j].start = level0[i-1][j+1].start;
							level0[i][j].end = level0[i-1][j+1].end;
						}
					}

				}
				// None is edging. The left and right seed should be equal.
				else {
					assert(level0[i-1][j].start == level0[i-1][j+1].start);
					assert(level0[i-1][j].end == level0[i-1][j+1].end);
					assert(level0[i-1][j].frequency == level0[i-1][j+1].frequency);
					assert(level0[i-1][j].isleaf == level0[i-1][j+1].isleaf);
					level0[i][j].start = level0[i-1][j].start;
					level0[i][j].end = level0[i-1][j].end;
					level0[i][j].frequency = level0[i-1][j].frequency;
					level0[i][j].isleaf = level0[i-1][j].isleaf;
				}

#ifdef DEBUG
				cout << level0[i][j].start << "-" << level0[i][j].end << ":" << level0[i][j].frequency << "|" << level0[i][j].isleaf << " ";
#endif
			}
#ifdef DEBUG
			cout << endl;
#endif
		}
	}
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x170(%rsp)
movq %rsi, 0x168(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0xb8(%rsp)
movl 0x360(%rax), %ecx
addl $0x1, %ecx
subl 0x368(%rax), %ecx
movl %ecx, 0x160(%rsp)
testb $0x1, (%rax)
jne 0x8117
movq 0x168(%rsp), %rdi
callq 0x34e0
movq 0xb8(%rsp), %rcx
movl 0x360(%rcx), %ecx
cmpq %rcx, %rax
jne 0x6ec8
jmp 0x6ee7
leaq 0x1428f(%rip), %rdi     # 0x1b15e
leaq 0x14233(%rip), %rsi     # 0x1b109
movl $0xca, %edx
leaq 0x142b2(%rip), %rcx     # 0x1b194
callq 0x31e0
movq 0xb8(%rsp), %rdi
callq 0x6c60
movl $0x0, 0x15c(%rsp)
movl 0x15c(%rsp), %eax
cmpl 0x160(%rsp), %eax
jge 0x714b
movq 0xb8(%rsp), %rax
movq 0x168(%rsp), %rsi
movslq 0x15c(%rsp), %rdx
movslq 0x368(%rax), %rcx
leaq 0x138(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x3310
movq 0xb8(%rsp), %rax
movq 0xa8(%rsp), %rsi
addq $0x8, %rax
movq %rax, 0xb0(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x3150
jmp 0x6f72
movq 0xb0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
movl $0x1, %edx
callq 0x10fb0
jmp 0x6f8e
leaq 0x118(%rsp), %rdi
callq 0x31c0
movq 0xb8(%rsp), %rdi
movl 0x15c(%rsp), %eax
movl %eax, 0x8c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movq %rdi, 0x90(%rsp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, 0x98(%rsp)
callq 0xa600
movl 0x8c(%rsp), %r8d
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq %rax, %rcx
movq 0xb8(%rsp), %rax
movq (%rcx), %rcx
movslq 0x15c(%rsp), %rdx
leaq (%rdx,%rdx,4), %rdx
movl %r8d, (%rcx,%rdx,8)
movl 0x15c(%rsp), %edx
movl 0x368(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movl %eax, 0xa0(%rsp)
callq 0xa600
movl 0xa0(%rsp), %edx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x15c(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
movl %edx, 0x4(%rax,%rcx,8)
addq $0x8, %rdi
callq 0x11210
movl %eax, 0xa4(%rsp)
jmp 0x705c
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
xorl %eax, %eax
movl %eax, %esi
callq 0xa600
movl 0xa4(%rsp), %edx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x15c(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
movl %edx, 0xc(%rax,%rcx,8)
addq $0x8, %rdi
callq 0x11260
movb %al, 0x8b(%rsp)
jmp 0x70a8
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
xorl %eax, %eax
movl %eax, %esi
callq 0xa600
movb 0x8b(%rsp), %cl
movq (%rax), %rax
movslq 0x15c(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
leaq 0x138(%rsp), %rdi
callq 0x31c0
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x6eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x7139
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x31c0
leaq 0x138(%rsp), %rdi
callq 0x31c0
jmp 0x811f
movl $0x1, 0x108(%rsp)
movl 0x108(%rsp), %eax
cmpl 0x160(%rsp), %eax
jge 0x8115
movl $0x0, 0x104(%rsp)
movl 0x104(%rsp), %eax
movl 0x160(%rsp), %ecx
subl 0x108(%rsp), %ecx
cmpl %ecx, %eax
jge 0x80fd
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl 0x104(%rsp), %eax
sete %al
andb $0x1, %al
movb %al, 0x167(%rsp)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdx
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl 0x104(%rsp), %ecx
addl 0x108(%rsp), %ecx
addl 0x368(%rdx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, 0x166(%rsp)
testb $0x1, 0x167(%rsp)
je 0x742c
testb $0x1, 0x166(%rsp)
jne 0x742c
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x8(%rax), %al
movb %al, 0x7b(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movb 0x7b(%rsp), %cl
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0x7c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x7c(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x80(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x80(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x84(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x84(%rsp), %ecx
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x80e5
testb $0x1, 0x167(%rsp)
jne 0x761e
testb $0x1, 0x166(%rsp)
je 0x761e
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x8(%rax), %al
movb %al, 0x6b(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movb 0x6b(%rsp), %cl
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0x6c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x6c(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x70(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x70(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x74(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x74(%rsp), %ecx
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x80e3
testb $0x1, 0x167(%rsp)
je 0x7c9d
testb $0x1, 0x166(%rsp)
je 0x7c9d
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
testb $0x1, 0x8(%rax)
jne 0x7881
movq 0xb8(%rsp), %rax
movq 0x168(%rsp), %rsi
movslq 0x104(%rsp), %rdx
movl 0x368(%rax), %eax
movl 0x108(%rsp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xe0(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x3310
movq 0xb8(%rsp), %rax
movq 0x58(%rsp), %rsi
addq $0x8, %rax
movq %rax, 0x60(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x3150
jmp 0x76d8
movq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x1, %edx
callq 0x10fb0
jmp 0x76f1
leaq 0xc0(%rsp), %rdi
callq 0x31c0
movq 0xb8(%rsp), %rdi
addq $0x8, %rdi
callq 0x11260
movb %al, 0x57(%rsp)
jmp 0x7715
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movb 0x57(%rsp), %dl
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
andb $0x1, %dl
movb %dl, 0x8(%rax,%rcx,8)
addq $0x8, %rdi
callq 0x11210
movl %eax, 0x50(%rsp)
jmp 0x7762
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x50(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl 0x104(%rsp), %eax
movl %eax, 0x48(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x48(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl 0x104(%rsp), %eax
addl 0x368(%rdi), %eax
addl 0x108(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x4c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x4c(%rsp), %ecx
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
leaq 0xe0(%rsp), %rdi
callq 0x31c0
jmp 0x7c98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x786f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x31c0
leaq 0xe0(%rsp), %rdi
callq 0x31c0
jmp 0x811f
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0x44(%rsp)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq %rax, %rcx
movl 0x44(%rsp), %eax
movq (%rcx), %rcx
movl 0x104(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
ja 0x7ac5
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x8(%rax), %al
movb %al, 0x37(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movb 0x37(%rsp), %cl
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0x38(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x38(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x3c(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x40(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x40(%rsp), %ecx
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x7c96
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x8(%rax), %al
movb %al, 0x27(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movb 0x27(%rsp), %cl
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0x28(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x28(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x2c(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movl 0x104(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x30(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x30(%rsp), %ecx
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x7c98
jmp 0x80e1
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x20(%rsp)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq %rax, %rcx
movl 0x20(%rsp), %eax
movq (%rcx), %rcx
movl 0x104(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x7d1b
jmp 0x7d3a
leaq 0x13499(%rip), %rdi     # 0x1b1bb
leaq 0x133e0(%rip), %rsi     # 0x1b109
movl $0x11a, %edx            # imm = 0x11A
leaq 0x1345f(%rip), %rcx     # 0x1b194
callq 0x31e0
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x1c(%rsp)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq %rax, %rcx
movl 0x1c(%rsp), %eax
movq (%rcx), %rcx
movl 0x104(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x7dba
jmp 0x7dd9
leaq 0x13429(%rip), %rdi     # 0x1b1ea
leaq 0x13341(%rip), %rsi     # 0x1b109
movl $0x11b, %edx            # imm = 0x11B
leaq 0x133c0(%rip), %rcx     # 0x1b194
callq 0x31e0
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0x18(%rsp)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq %rax, %rcx
movl 0x18(%rsp), %eax
movq (%rcx), %rcx
movl 0x104(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x7e59
jmp 0x7e78
leaq 0x133b5(%rip), %rdi     # 0x1b215
leaq 0x132a2(%rip), %rsi     # 0x1b109
movl $0x11c, %edx            # imm = 0x11C
leaq 0x13321(%rip), %rcx     # 0x1b194
callq 0x31e0
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x14(%rsp)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq %rax, %rcx
movl 0x14(%rsp), %eax
movq (%rcx), %rcx
movl 0x104(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movb 0x8(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x7f05
jmp 0x7f24
leaq 0x13340(%rip), %rdi     # 0x1b24c
leaq 0x131f6(%rip), %rsi     # 0x1b109
movl $0x11d, %edx            # imm = 0x11D
leaq 0x13275(%rip), %rcx     # 0x1b194
callq 0x31e0
movq 0xb8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x4(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x8(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0x8(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, 0xc(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movl 0xc(%rsp), %ecx
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
addq $0x398, %rdi            # imm = 0x398
movl 0x108(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa600
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movslq 0x104(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x8(%rax), %al
movb %al, 0x13(%rsp)
addq $0x398, %rdi            # imm = 0x398
movslq 0x108(%rsp), %rsi
callq 0xa600
movb 0x13(%rsp), %cl
movq (%rax), %rax
movslq 0x104(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x80e3
jmp 0x80e5
jmp 0x80e7
movl 0x104(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x104(%rsp)
jmp 0x7175
jmp 0x80ff
movl 0x108(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x108(%rsp)
jmp 0x7156
jmp 0x8117
addq $0x178, %rsp            # imm = 0x178
retq
movq 0x110(%rsp), %rdi
callq 0x35d0
nopl (%rax)