// File: /workspace/github_cpp_makefile_star2_O1/nwieder[P]SSTS/src/Input/Standard_Ipt.cpp
// Function: nw::Standard_Ipt::alloc_Voxel()
void Standard_Ipt::alloc_Voxel(){
	cout << "alloc Voxel... ";

//	border condition is equilibrium
	if(xgd.xml_border_condition == "equilibrium"){

// 		run through voxl list and create Standard_Voxel
		for (long i = 0; i < (long)xgd.xml_vxl_list.size(); i++){
			_Voxel* tvxl = 	new Standard_Vxl(xgd.xml_vxl_list[i]->xml_id,
							xgd.xml_box_lenght, clone_svc());
			vvc.push_back(tvxl);
		}

//		add border Voxel vvc.push_back(tbvxl);
		_Voxel* bv = new Border_Vxl(vvc.size(), xgd.xml_box_lenght, clone_svc());
		vvc.push_back(bv);

//		initialize the diffusion neighbors including the border voxel
		for (long i = 0; i < (long)xgd.xml_vxl_list.size(); i++){
			for (long j = 0; j < (long)xgd.xml_vxl_list[i]->xml_vxl_neighbours.size(); j++)
				vvc[i]->add_neighbour(vvc.at(xgd.xml_vxl_list[i]->xml_vxl_neighbours[j]));
			for (long j = vvc[i]->get_diff_vec()->size(); j < 6; j++){
//				fill every free spot of the diffusion neighbour vector with border voxel
//				(last element of the voxel vector)
				vvc[i]->add_neighbour(vvc.at(vvc.size()-1));
//				add current voxel to the diffusion neighbour vector of the border voxel
				vvc[vvc.size()-1]->add_neighbour(vvc[i]);
			}
	 	}

//	border condition is not equilibrium
	} else{
//		run through voxel list and create Standard_Voxel
		for (long i = 0; i < (long)xgd.xml_vxl_list.size(); i++){
			_Voxel* tvxl =	new Standard_Vxl(xgd.xml_vxl_list[i]->xml_id,
							xgd.xml_box_lenght, clone_svc());
			vvc.push_back(tvxl);
		}
//		initialize the diffusion neighbours including the border voxel
		for (long i = 0; i < (long)xgd.xml_vxl_list.size(); i++){
			for (long j = 0; j < (long)xgd.xml_vxl_list[i]->xml_vxl_neighbours.size(); j++){
				vvc[i]->add_neighbour(vvc.at(xgd.xml_vxl_list[i]->xml_vxl_neighbours[j]));
			}
		}
		cout << " *** NO BORDER VOXEL DEFINED *** ";
	}

	cout << "DONE" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
movq 0x2884e(%rip), %rdi     # 0x32fc8
leaq 0x19f11(%rip), %rsi     # 0x24692
movl $0xf, %edx
callq 0x42f0
leaq 0x50(%r14), %rdi
leaq 0x19ede(%rip), %rsi     # 0x24674
callq 0x40a0
movq 0x128(%r14), %rbx
movq 0x130(%r14), %rcx
subq %rbx, %rcx
testl %eax, %eax
je 0xa936
testq %rcx, %rcx
jle 0xa873
leaq 0x468(%r14), %r15
xorl %r13d, %r13d
leaq 0x28(%rsp), %r12
movl $0x58, %edi
callq 0x42b0
movq %rax, %rbp
movq (%rbx,%r13,8), %rax
movq (%rax), %rbx
movsd 0x90(%r14), %xmm0
movsd %xmm0, (%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0xb836
movq %rbp, %rdi
movq %rbx, %rsi
movsd (%rsp), %xmm0
movq %r12, %rdx
callq 0xbdfe
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa823
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq %rbp, 0x8(%rsp)
movq 0x470(%r14), %rsi
cmpq 0x478(%r14), %rsi
je 0xa845
movq %rbp, (%rsi)
addq $0x8, 0x470(%r14)
jmp 0xa852
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0xd0b2
incq %r13
movq 0x128(%r14), %rbx
movq 0x130(%r14), %rax
subq %rbx, %rax
sarq $0x3, %rax
cmpq %rax, %r13
jl 0xa7cc
movq 0x130(%r14), %rax
subq 0x128(%r14), %rax
testq %rax, %rax
jle 0xa919
xorl %ebx, %ebx
movq 0x128(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0xa8fb
xorl %r15d, %r15d
movq 0x468(%r14), %rcx
movq 0x470(%r14), %rdx
movq (%rax,%r15,8), %rsi
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0xabfb
movq (%rcx,%rbx,8), %rdi
movq (%rcx,%rsi,8), %rsi
callq 0xbf0e
incq %r15
movq 0x128(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jl 0xa8aa
incq %rbx
movq 0x130(%r14), %rax
subq 0x128(%r14), %rax
sarq $0x3, %rax
cmpq %rax, %rbx
jl 0xa88c
movq 0x286a8(%rip), %rdi     # 0x32fc8
leaq 0x19d7b(%rip), %rsi     # 0x246a2
movl $0x21, %edx
callq 0x42f0
jmp 0xaba6
testq %rcx, %rcx
jle 0xa9f5
leaq 0x468(%r14), %r15
xorl %r13d, %r13d
leaq 0x40(%rsp), %r12
movl $0x58, %edi
callq 0x42b0
movq %rax, %rbp
movq (%rbx,%r13,8), %rax
movq (%rax), %rbx
movsd 0x90(%r14), %xmm0
movsd %xmm0, (%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0xb836
movq %rbp, %rdi
movq %rbx, %rsi
movsd (%rsp), %xmm0
movq %r12, %rdx
callq 0xbdfe
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xa9a5
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq %rbp, 0x8(%rsp)
movq 0x470(%r14), %rsi
cmpq 0x478(%r14), %rsi
je 0xa9c7
movq %rbp, (%rsi)
addq $0x8, 0x470(%r14)
jmp 0xa9d4
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0xd0b2
incq %r13
movq 0x128(%r14), %rbx
movq 0x130(%r14), %rax
subq %rbx, %rax
sarq $0x3, %rax
cmpq %rax, %r13
jl 0xa94e
movl $0x58, %edi
callq 0x42b0
movq %rax, %r12
movq 0x470(%r14), %r15
movq 0x468(%r14), %rbx
movsd 0x90(%r14), %xmm0
movsd %xmm0, (%rsp)
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xb836
subq %rbx, %r15
sarq $0x3, %r15
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0xbe86
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xaa5e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
leaq 0x468(%r14), %r15
movq %r12, 0x8(%rsp)
movq 0x470(%r14), %rsi
cmpq 0x478(%r14), %rsi
je 0xaa87
movq %r12, (%rsi)
addq $0x8, 0x470(%r14)
jmp 0xaa94
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0xd0b2
movq 0x130(%r14), %rax
subq 0x128(%r14), %rax
testq %rax, %rax
jle 0xaba6
xorl %ebx, %ebx
movq 0x128(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0xab1c
xorl %r12d, %r12d
movq 0x468(%r14), %rcx
movq 0x470(%r14), %rdx
movq (%rax,%r12,8), %rsi
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0xabfb
movq (%rcx,%rbx,8), %rdi
movq (%rcx,%rsi,8), %rsi
callq 0xbf0e
incq %r12
movq 0x128(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jl 0xaacb
movq (%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x48(%rax), %r12
subq 0x40(%rax), %r12
sarq $0x3, %r12
cmpq $0x5, %r12
jg 0xab88
addq $-0x6, %r12
movq 0x468(%r14), %rax
movq 0x470(%r14), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0xabf7
movq (%rax,%rbx,8), %rdi
movq -0x8(%rax,%rdx,8), %rsi
callq 0xbf0e
movq 0x468(%r14), %rax
movq 0x470(%r14), %rcx
movq -0x8(%rcx), %rdi
movq (%rax,%rbx,8), %rsi
callq 0xbf0e
incq %r12
jne 0xab39
incq %rbx
movq 0x130(%r14), %rax
subq 0x128(%r14), %rax
sarq $0x3, %rax
cmpq %rax, %rbx
jl 0xaaad
leaq 0x1993c(%rip), %rsi     # 0x244e9
movl $0x4, %edx
movq 0x2840f(%rip), %rbx     # 0x32fc8
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4190
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1(%rdx), %rsi
leaq 0x19441(%rip), %rdi     # 0x24043
xorl %eax, %eax
callq 0x4430
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xac28
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
jmp 0xac28
movq %rax, %rbx
movl $0x58, %esi
movq %r12, %rdi
jmp 0xac6f
jmp 0xac48
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xac67
movq 0x50(%rsp), %rsi
jmp 0xac5f
movq %rax, %rbx
jmp 0xac67
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xac67
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movl $0x58, %esi
movq %rbp, %rdi
callq 0x42c0
movq %rbx, %rdi
callq 0x4510