// File: suhasjains[P]AMR-Solver/src/ghost.cpp
// Function: amrsolver::exchange_multilevel_ghost_val(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void exchange_multilevel_ghost_val(int level, std::string name) {

	//relative locations wrt siblings
	int *loc_x, *loc_y, *loc_z;
	loc_x = new int;
	loc_y = new int;
	loc_z = new int;

	myOctree::create_lists_of_multilevel_nodes();

	if(multilevel_nodes[level].empty()) {
		std::cerr << "Error!: No blocks to exchange ghost values in multilevel " << level << std::endl; 
		exit(1);
	}

	for (std::list<Octree*>::iterator it = multilevel_nodes[level].begin(), end = multilevel_nodes[level].end(); it != end; ++it) {	

  		//get location relative to siblings
          	(*it)->get_relative_location(loc_x,loc_y,loc_z);

		for(int l = 0; l<scalar_fields.size() ; l++) {
			
			Field *f = (*it)->get_block_data()->scalarfields[l];

                        if( f->name == name ) {

				//traverse through all cells
				for (int i=0; i<f->Nx; i++) {
					for (int j=0; j<f->Ny; j++) {
						for (int k=0; k<f->Nz; k++) {
			
							//traverse through directions
							for (int m=0; m<3; m++) {
                        					for (int n=0; n<2; n++) {

									if((*it)->bc[m][n] == NONE && (*it)->neighbour[m][n] != NULL) {
										
										//exchange with neighbours
										if((*it)->neighbour[m][n]->get_level() == level) {
								
											if(n==RIGHT && m==XDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::EAST_GHOST) {
												f->val[i][j][k] = \
							 					(*it)->neighbour[m][n]->get_block_data()->scalarfields[l]->val[i-nx_block][j][k]; 
											}
											if(n==LEFT && m==XDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::WEST_GHOST) {
												f->val[i][j][k] = \
							 					(*it)->neighbour[m][n]->get_block_data()->scalarfields[l]->val[i+nx_block][j][k]; 
											}
											if(n==RIGHT && m==YDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::NORTH_GHOST) {
												f->val[i][j][k] = \
							 					(*it)->neighbour[m][n]->get_block_data()->scalarfields[l]->val[i][j-ny_block][k]; 
											}
											if(n==LEFT && m==YDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::SOUTH_GHOST) {
												f->val[i][j][k] = \
							 					(*it)->neighbour[m][n]->get_block_data()->scalarfields[l]->val[i][j+ny_block][k]; 
											}
											if(n==RIGHT && m==ZDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::TOP_GHOST) {
												f->val[i][j][k] = \
							 					(*it)->neighbour[m][n]->get_block_data()->scalarfields[l]->val[i][j][k-nz_block]; 
											}
											if(n==LEFT && m==ZDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::BOTTOM_GHOST) {
												f->val[i][j][k] = \
							 					(*it)->neighbour[m][n]->get_block_data()->scalarfields[l]->val[i][j][k+nz_block]; 
											}
										}

										//exchange with neighbour's child
										else {

											if(n==RIGHT && m==XDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::EAST_GHOST) {
												f->val[i][j][k] = restrict_at((*it)->neighbour[m][n], l, i-nx_block, j, k);
											}
											if(n==LEFT && m==XDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::WEST_GHOST) {
												f->val[i][j][k] = restrict_at((*it)->neighbour[m][n], l, i+nx_block, j, k);
											}
											if(n==RIGHT && m==YDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::NORTH_GHOST) {
												f->val[i][j][k] = restrict_at((*it)->neighbour[m][n], l, i, j-ny_block, k);
											}
											if(n==LEFT && m==YDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::SOUTH_GHOST) {
												f->val[i][j][k] = restrict_at((*it)->neighbour[m][n], l, i, j+ny_block, k);
											}
											if(n==RIGHT && m==ZDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::TOP_GHOST) {
												f->val[i][j][k] = restrict_at((*it)->neighbour[m][n], l, i, j, k-nz_block);
											}
											if(n==LEFT && m==ZDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::BOTTOM_GHOST) {
												f->val[i][j][k] = restrict_at((*it)->neighbour[m][n], l, i, j, k+nz_block);
											}

										}
									}

									//exchange with neighbour's parent
									else if((*it)->bc[m][n] == NONE && (*it)->neighbour[m][n] == NULL) {
										
										if(n==RIGHT && m==XDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::EAST_GHOST) {
											prolongate_for_multilevel_ghost_exchange_at((*it),(*it)->get_parent()->neighbour[m][n], l, \
												       i, j, k, i-nx_block, j, k, 0, *loc_y, *loc_z);
										}
										if(n==LEFT && m==XDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::WEST_GHOST) {
											prolongate_for_multilevel_ghost_exchange_at((*it),(*it)->get_parent()->neighbour[m][n], l, \
												       i, j, k, i+nx_block, j, k, 1, *loc_y, *loc_z);
										}
										if(n==RIGHT && m==YDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::NORTH_GHOST) {
											prolongate_for_multilevel_ghost_exchange_at((*it),(*it)->get_parent()->neighbour[m][n], l, \
												       i, j, k, i, j-ny_block, k, *loc_x, 0, *loc_z);
										}
										if(n==LEFT && m==YDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::SOUTH_GHOST) {
											prolongate_for_multilevel_ghost_exchange_at((*it),(*it)->get_parent()->neighbour[m][n], l, \
												       i, j, k, i, j+ny_block, k, *loc_x, 1, *loc_z);
										}
										if(n==RIGHT && m==ZDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::TOP_GHOST) {
											prolongate_for_multilevel_ghost_exchange_at((*it),(*it)->get_parent()->neighbour[m][n], l, \
												       i, j, k, i, j, k-nz_block, *loc_x, *loc_y, 0);
										}
										if(n==LEFT && m==ZDIR && (*it)->get_block_data()->flag[i][j][k]==myOctree::BOTTOM_GHOST) {
											prolongate_for_multilevel_ghost_exchange_at((*it),(*it)->get_parent()->neighbour[m][n], l, \
												       i, j, k, i, j, k+nz_block, *loc_x, *loc_y, 1);
										}
									}
								}	
							}
						}
                                   	}
                          	}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, -0x80(%rbp)
movl %edi, -0x1c(%rbp)
movq %rsi, -0x28(%rbp)
movl $0x4, %edi
callq 0x3250
movq %rax, -0x30(%rbp)
movl $0x4, %edi
callq 0x3250
movq %rax, -0x38(%rbp)
movl $0x4, %edi
callq 0x3250
movq %rax, -0x40(%rbp)
callq 0x4b20
movslq -0x1c(%rbp), %rax
leaq 0x14ffb(%rip), %rdi     # 0x264c0
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x12570
testb $0x1, %al
jne 0x114d7
jmp 0x1150e
movq 0x14b12(%rip), %rdi     # 0x25ff0
leaq 0xfd20(%rip), %rsi      # 0x21205
callq 0x3240
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x3400
movq %rax, %rdi
movq 0x14ac1(%rip), %rsi     # 0x25fc0
callq 0x3270
movl $0x1, %edi
callq 0x32e0
movslq -0x1c(%rbp), %rax
leaq 0x14fa7(%rip), %rdi     # 0x264c0
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x4490
movq %rax, -0x48(%rbp)
movslq -0x1c(%rbp), %rax
leaq 0x14f8c(%rip), %rdi     # 0x264c0
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x44c0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x44f0
testb $0x1, %al
jne 0x1155a
jmp 0x12555
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x6f80
movl $0x0, -0x54(%rbp)
movslq -0x54(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x15128(%rip), %rdi     # 0x266b8
callq 0x5b00
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x12545
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq -0x80(%rbp), %rsi
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
addq $0x18, %rdi
callq 0xd110
testb $0x1, %al
jne 0x115e3
jmp 0x12535
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12533
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x12523
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x12513
movl $0x0, -0x70(%rbp)
cmpl $0x3, -0x70(%rbp)
jge 0x12503
movl $0x0, -0x74(%rbp)
cmpl $0x2, -0x74(%rbp)
jge 0x124f3
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x38, %rax
movslq -0x70(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x11f4b
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x11f4b
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6ec0
cmpl -0x1c(%rbp), %eax
jne 0x11b64
cmpl $0x0, -0x74(%rbp)
jne 0x11790
cmpl $0x0, -0x70(%rbp)
jne 0x11790
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x11790
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movl -0x64(%rbp), %ecx
leaq 0x14b17(%rip), %rdx     # 0x2626c
subl (%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, -0x74(%rbp)
jne 0x11853
cmpl $0x0, -0x70(%rbp)
jne 0x11853
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x11853
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movl -0x64(%rbp), %ecx
leaq 0x14a54(%rip), %rdx     # 0x2626c
addl (%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x0, -0x74(%rbp)
jne 0x11916
cmpl $0x1, -0x70(%rbp)
jne 0x11916
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0x11916
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x68(%rbp), %ecx
leaq 0x1498d(%rip), %rdx     # 0x26270
subl (%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, -0x74(%rbp)
jne 0x119d9
cmpl $0x1, -0x70(%rbp)
jne 0x119d9
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jne 0x119d9
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x68(%rbp), %ecx
leaq 0x148ca(%rip), %rdx     # 0x26270
addl (%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x0, -0x74(%rbp)
jne 0x11a9c
cmpl $0x2, -0x70(%rbp)
jne 0x11a9c
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x5, (%rax,%rcx,4)
jne 0x11a9c
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x6c(%rbp), %ecx
leaq 0x14803(%rip), %rdx     # 0x26274
subl (%rdx), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, -0x74(%rbp)
jne 0x11b5f
cmpl $0x2, -0x70(%rbp)
jne 0x11b5f
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,4)
jne 0x11b5f
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x6c(%rbp), %ecx
leaq 0x14740(%rip), %rdx     # 0x26274
addl (%rdx), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x11f46
cmpl $0x0, -0x74(%rbp)
jne 0x11c09
cmpl $0x0, -0x70(%rbp)
jne 0x11c09
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x11c09
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
movl -0x64(%rbp), %edx
leaq 0x14692(%rip), %rax     # 0x2626c
subl (%rax), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
callq 0x1f050
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, -0x74(%rbp)
jne 0x11cae
cmpl $0x0, -0x70(%rbp)
jne 0x11cae
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x11cae
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
movl -0x64(%rbp), %edx
leaq 0x145ed(%rip), %rax     # 0x2626c
addl (%rax), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
callq 0x1f050
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x0, -0x74(%rbp)
jne 0x11d53
cmpl $0x1, -0x70(%rbp)
jne 0x11d53
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0x11d53
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
movl -0x64(%rbp), %edx
movl -0x68(%rbp), %ecx
leaq 0x14549(%rip), %rax     # 0x26270
subl (%rax), %ecx
movl -0x6c(%rbp), %r8d
callq 0x1f050
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, -0x74(%rbp)
jne 0x11df8
cmpl $0x1, -0x70(%rbp)
jne 0x11df8
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jne 0x11df8
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
movl -0x64(%rbp), %edx
movl -0x68(%rbp), %ecx
leaq 0x144a4(%rip), %rax     # 0x26270
addl (%rax), %ecx
movl -0x6c(%rbp), %r8d
callq 0x1f050
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x0, -0x74(%rbp)
jne 0x11e9e
cmpl $0x2, -0x70(%rbp)
jne 0x11e9e
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x5, (%rax,%rcx,4)
jne 0x11e9e
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
movl -0x64(%rbp), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
leaq 0x143ff(%rip), %rax     # 0x26274
subl (%rax), %r8d
callq 0x1f050
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, -0x74(%rbp)
jne 0x11f44
cmpl $0x2, -0x70(%rbp)
jne 0x11f44
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,4)
jne 0x11f44
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x54(%rbp), %esi
movl -0x64(%rbp), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
leaq 0x14359(%rip), %rax     # 0x26274
addl (%rax), %r8d
callq 0x1f050
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x11f46
jmp 0x124e3
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x38, %rax
movslq -0x70(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x124e1
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x124e1
cmpl $0x0, -0x74(%rbp)
jne 0x12080
cmpl $0x0, -0x70(%rbp)
jne 0x12080
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x12080
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
movq %rax, -0x90(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6f60
movq -0x90(%rbp), %rdi
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x54(%rbp), %edx
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %r8d
movl -0x6c(%rbp), %r9d
movl -0x64(%rbp), %r14d
leaq 0x14229(%rip), %rax     # 0x2626c
subl (%rax), %r14d
movl -0x68(%rbp), %ebx
movl -0x6c(%rbp), %r11d
movq -0x38(%rbp), %rax
movl (%rax), %r10d
movq -0x40(%rbp), %rax
movl (%rax), %eax
xorl %r15d, %r15d
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0x11020
cmpl $0x1, -0x74(%rbp)
jne 0x1215f
cmpl $0x0, -0x70(%rbp)
jne 0x1215f
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x1215f
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
movq %rax, -0x98(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6f60
movq -0x98(%rbp), %rdi
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x54(%rbp), %edx
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %r8d
movl -0x6c(%rbp), %r9d
movl -0x64(%rbp), %r14d
leaq 0x14147(%rip), %rax     # 0x2626c
addl (%rax), %r14d
movl -0x68(%rbp), %ebx
movl -0x6c(%rbp), %r11d
movq -0x38(%rbp), %rax
movl (%rax), %r10d
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0x11020
cmpl $0x0, -0x74(%rbp)
jne 0x12240
cmpl $0x1, -0x70(%rbp)
jne 0x12240
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0x12240
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6f60
movq -0xa0(%rbp), %rdi
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x54(%rbp), %edx
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %r8d
movl -0x6c(%rbp), %r9d
movl -0x64(%rbp), %r14d
movl -0x68(%rbp), %ebx
leaq 0x14069(%rip), %rax     # 0x26270
subl (%rax), %ebx
movl -0x6c(%rbp), %r11d
movq -0x30(%rbp), %rax
movl (%rax), %r10d
movq -0x40(%rbp), %rax
movl (%rax), %eax
xorl %r15d, %r15d
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0x11020
cmpl $0x1, -0x74(%rbp)
jne 0x1231e
cmpl $0x1, -0x70(%rbp)
jne 0x1231e
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,4)
jne 0x1231e
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6f60
movq -0xa8(%rbp), %rdi
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x54(%rbp), %edx
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %r8d
movl -0x6c(%rbp), %r9d
movl -0x64(%rbp), %r14d
movl -0x68(%rbp), %ebx
leaq 0x13f88(%rip), %rax     # 0x26270
addl (%rax), %ebx
movl -0x6c(%rbp), %r11d
movq -0x30(%rbp), %rax
movl (%rax), %r10d
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl $0x1, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0x11020
cmpl $0x0, -0x74(%rbp)
jne 0x12400
cmpl $0x2, -0x70(%rbp)
jne 0x12400
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x5, (%rax,%rcx,4)
jne 0x12400
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6f60
movq -0xb0(%rbp), %rdi
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x54(%rbp), %edx
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %r8d
movl -0x6c(%rbp), %r9d
movl -0x64(%rbp), %r14d
movl -0x68(%rbp), %ebx
movl -0x6c(%rbp), %r11d
leaq 0x13eaa(%rip), %rax     # 0x26274
subl (%rax), %r11d
movq -0x30(%rbp), %rax
movl (%rax), %r10d
movq -0x38(%rbp), %rax
movl (%rax), %eax
xorl %r15d, %r15d
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
callq 0x11020
cmpl $0x1, -0x74(%rbp)
jne 0x124df
cmpl $0x2, -0x70(%rbp)
jne 0x124df
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x64(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x6c(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,4)
jne 0x124df
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6f60
movq -0xb8(%rbp), %rdi
addq $0x8, %rax
movslq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x54(%rbp), %edx
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %r8d
movl -0x6c(%rbp), %r9d
movl -0x64(%rbp), %r14d
movl -0x68(%rbp), %ebx
movl -0x6c(%rbp), %r11d
leaq 0x13dc8(%rip), %rax     # 0x26274
addl (%rax), %r11d
movq -0x30(%rbp), %rax
movl (%rax), %r10d
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movl $0x1, 0x28(%rsp)
callq 0x11020
jmp 0x124e1
jmp 0x124e3
jmp 0x124e5
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1163f
jmp 0x124f5
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x1162e
jmp 0x12505
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x11617
jmp 0x12515
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x11600
jmp 0x12525
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x115ea
jmp 0x12535
jmp 0x12537
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1157e
jmp 0x12547
leaq -0x48(%rbp), %rdi
callq 0x4550
jmp 0x11544
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)