// File: /workspace/github_cpp_makefile_star2_O1/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 0xd3d0
callq 0x3847
callq 0x2b76
leaq -0xc8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe426(%rip), %rsi      # 0x11038
leaq 0xe424(%rip), %rdx      # 0x1103d
leaq -0xd8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e8e
movq %rbx, %rdi
callq 0x1079a
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2c4b
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2200
callq 0x2a98
callq 0x3010
callq 0x2f28
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe3d2(%rip), %rsi      # 0x1103e
leaq 0xe3d2(%rip), %rdx      # 0x11045
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2e8e
leaq 0x12597(%rip), %rdi     # 0x15220
movq %rbx, %rsi
callq 0x9b3d
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2cac
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x88(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe388(%rip), %rsi      # 0x11046
leaq 0xe388(%rip), %rdx      # 0x1104d
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x2e8e
leaq 0x12575(%rip), %rbx     # 0x15250
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9b3d
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d01
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe33e(%rip), %rsi      # 0x1104e
leaq 0xe33e(%rip), %rdx      # 0x11055
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x2e8e
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x9b3d
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d44
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe303(%rip), %rsi      # 0x11056
leaq 0xe303(%rip), %rdx      # 0x1105d
leaq -0x58(%rbp), %r14
movq %r14, %rdi
callq 0x2e8e
leaq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x9b3d
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d87
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe2c8(%rip), %rsi      # 0x1105e
leaq 0xe2c8(%rip), %rdx      # 0x11065
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x2e8e
addq $0x48, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9b3d
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2dcd
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2200
callq 0xa7bb
movq 0x12217(%rip), %rbx     # 0x14ff0
leaq 0xe553(%rip), %rsi      # 0x11333
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2230
leaq 0xe272(%rip), %rsi      # 0x11066
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
jmp 0x2e75
movq %rax, %rbx
movq -0x58(%rbp), %rdi
jmp 0x2e75
movq %rax, %rbx
movq -0x78(%rbp), %rdi
jmp 0x2e75
movq %rax, %rbx
movq -0x98(%rbp), %rdi
jmp 0x2e75
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
jmp 0x2e75
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2e85
movq (%r15), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2340
nop