// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/amrsolver.cpp
// Function: main
int main(int argc, char **argv) {


	//reading input
	read_input_file();

	//setting up grid
	myOctree::OctreeGrid();
	amrsolver::adapt_gradient();

	//setting initial condition
	//amrsolver::set_field();
	
	//solving
	amrsolver::multigrid("alpha");
	
	//checking flags
	amrsolver::set_field();

	//writing vtk
	myOctree::create_lists_of_level_nodes();
	myOctree::create_list_of_leaf_nodes();
	myOctree::write_vtk(myOctree::leaf_nodes,"level-4");
	myOctree::write_vtk(myOctree::level_nodes[0],"level-0");
	myOctree::write_vtk(myOctree::level_nodes[1],"level-1");
	myOctree::write_vtk(myOctree::level_nodes[2],"level-2");
	myOctree::write_vtk(myOctree::level_nodes[3],"level-3");
	
	//writing output file
	write_output_file();

	cerr << "\n" << "Finishing" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
callq 0xd3d4
callq 0x38e3
callq 0x2b7b
leaq -0xc8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe421(%rip), %rsi      # 0x11038
leaq 0xe41f(%rip), %rdx      # 0x1103d
leaq -0xd8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e92
movq %rbx, %rdi
callq 0x10640
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2c50
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2210
callq 0x2a90
callq 0x3018
callq 0x2f30
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe3cd(%rip), %rsi      # 0x1103e
leaq 0xe3cd(%rip), %rdx      # 0x11045
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e92
leaq 0x125a2(%rip), %rdi     # 0x15230
movq %rbx, %rsi
callq 0x9bfd
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2cb1
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x88(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe383(%rip), %rsi      # 0x11046
leaq 0xe383(%rip), %rdx      # 0x1104d
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x2e92
leaq 0x12580(%rip), %rbx     # 0x15260
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9bfd
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d06
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe339(%rip), %rsi      # 0x1104e
leaq 0xe339(%rip), %rdx      # 0x11055
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x2e92
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x9bfd
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d49
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe2fe(%rip), %rsi      # 0x11056
leaq 0xe2fe(%rip), %rdx      # 0x1105d
leaq -0x58(%rbp), %r14
movq %r14, %rdi
callq 0x2e92
leaq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x9bfd
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d8c
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe2c3(%rip), %rsi      # 0x1105e
leaq 0xe2c3(%rip), %rdx      # 0x11065
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x2e92
addq $0x48, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9bfd
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2dd2
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2210
callq 0xa7c0
movq 0x12212(%rip), %rbx     # 0x14ff0
leaq 0xe54e(%rip), %rsi      # 0x11333
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2240
leaq 0xe26d(%rip), %rsi      # 0x11066
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
jmp 0x2e7a
movq %rax, %rbx
movq -0x58(%rbp), %rdi
jmp 0x2e7a
movq %rax, %rbx
movq -0x78(%rbp), %rdi
jmp 0x2e7a
movq %rax, %rbx
movq -0x98(%rbp), %rdi
jmp 0x2e7a
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
jmp 0x2e7a
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2e8a
movq (%r15), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2350