LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/derekzwy[P]an-optimal-tcam-encoding-algorithm-for-packet-classification/rulesutils.cc
// Function: CheckIPBounds(range)
int CheckIPBounds(range fld)
{
    if (fld.low > 0xFFFFFFFF)
    {
        printf("Error: IPRange is buggy!(%llu)\n",fld.low);
        return 1;
    }
    if (fld.high > 0xFFFFFFFF)
    {
        printf("Error: IPRange is buggy!(%llu)\n",fld.high);
        return 1;
    }
    if (fld.low > fld.high)
    {
        printf("Error: IPRange is buggy!(%llu - %llu)\n",fld.low,fld.high);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rdx
movq %rdi, %rsi
movq %rdi, %rax
shrq $0x20, %rax
je 0x3241
leaq 0x3eb9(%rip), %rdi      # 0x70f8
jmp 0x3254
movq %rdx, %rax
shrq $0x20, %rax
je 0x3262
leaq 0x3ea7(%rip), %rdi      # 0x70f8
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2040
movl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
cmpq %rdx, %rsi
jbe 0x3260
leaq 0x3ea8(%rip), %rdi      # 0x7118
xorl %eax, %eax
callq 0x2040
jmp 0x325b
// File: /workspace/github_cpp_makefile_star2_O3/derekzwy[P]an-optimal-tcam-encoding-algorithm-for-packet-classification/rulesutils.cc
// Function: IP2Range(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, pc_rule*, int)
void IP2Range(unsigned ip1,unsigned ip2,unsigned ip3,unsigned ip4,unsigned iplen,pc_rule *rule,int index)
{
    unsigned tmp;
    unsigned Lo,Hi;

    if(iplen == 0){
        Lo = 0;
        Hi = 0xFFFFFFFF;

    }else if(iplen > 0 && iplen <= 8) {
        tmp = ip1 << 24;
        tmp &= (0xffffffff << (32-iplen));

        Lo = tmp;
        Hi = Lo + (1<<(32-iplen)) - 1;
    }else if(iplen > 8 && iplen <= 16){
        tmp =  ip1 << 24; 
        tmp += ip2 << 16;
        tmp &= (0xffffffff << (32-iplen));

        Lo = tmp;
        Hi = Lo + (1<<(32-iplen)) - 1;
    }else if(iplen > 16 && iplen <= 24){
        tmp = ip1 << 24; 
        tmp += ip2 << 16; 
        tmp += ip3 << 8; 
        tmp &= (0xffffffff << (32-iplen));

        Lo = tmp;
        Hi = Lo + (1<<(32-iplen)) - 1;
    }else if(iplen > 24 && iplen <= 32){
        tmp = ip1 << 24; 
        tmp += ip2 << 16; 
        tmp += ip3 << 8; 
        tmp += ip4;
        tmp &= (0xffffffff << (32-iplen));

        Lo = tmp;
        Hi = Lo + (1<<(32-iplen)) - 1;
    }else{
        printf("Error: Src IP length exceeds 32\n");
        exit(1);
    }

    rule->field[index].low  = Lo;
    rule->field[index].high = Hi;

    if (CheckIPBounds(rule->field[index]))
    {
        printf("Error: IP2Range bounds check for %d failed\n",index);
        exit(1);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %r8d, %r8d
je 0x32a2
cmpl $0x8, %r8d
ja 0x32ab
negb %r8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %r8d, %ecx
shll %cl, %eax
shll $0x18, %edi
andl %eax, %edi
notl %eax
addl %edi, %eax
jmp 0x330d
xorl %edi, %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x330d
cmpl $0x10, %r8d
ja 0x32d0
shll $0x18, %edi
shll $0x10, %esi
addl %edi, %esi
negb %r8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %r8d, %ecx
shll %cl, %eax
andl %eax, %esi
notl %eax
addl %esi, %eax
movl %esi, %edi
jmp 0x330d
cmpl $0x18, %r8d
ja 0x32e3
shll $0x18, %edi
shll $0x10, %esi
addl %edi, %esi
shll $0x8, %edx
jmp 0x32f6
cmpl $0x20, %r8d
ja 0x334f
shll $0x18, %edi
shll $0x10, %esi
addl %edi, %esi
shll $0x8, %edx
addl %ecx, %edx
addl %esi, %edx
negb %r8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %r8d, %ecx
shll %cl, %eax
andl %eax, %edx
notl %eax
addl %edx, %eax
movl %edx, %edi
movl 0x10(%rbp), %ebx
movl %edi, %edi
movslq %ebx, %rcx
shlq $0x4, %rcx
movq %rdi, 0x8(%r9,%rcx)
movl %eax, %esi
movq %rsi, 0x10(%r9,%rcx)
callq 0x3225
testl %eax, %eax
jne 0x3335
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3e03(%rip), %rdi      # 0x713f
movl %ebx, %esi
xorl %eax, %eax
callq 0x2040
movl $0x1, %edi
callq 0x21b0
leaq 0x3e9a(%rip), %rdi      # 0x71f0
callq 0x2200
jmp 0x3345
// File: /workspace/github_cpp_makefile_star2_O3/derekzwy[P]an-optimal-tcam-encoding-algorithm-for-packet-classification/rulesutils.cc
// Function: check_cmpl(prefix*)
bool check_cmpl(struct prefix *pf) 
{
    int rangelen = 0;
    if(pf->nvalid != 1) {
        for(size_t i = 0; i < pf->nvalid; i ++) {
            rangelen += (int)pow(2, 16 - pf->length[i]);
        }
        for(size_t i = 0; i < pf->ninvalid; i ++) {
            rangelen += (int)pow(2, 16 - pf->cmpllength[i]);
        }
    }
    else {
        rangelen = (int)pow(2, 16 - pf->length[0]);
    }
    if(rangelen == (int)pow(2, 16 - pf->fpf_len)) {
        return true;
    }
    else {
        cout<<pf->nvalid<<endl;
        cout<<rangelen<<" "<<pf->fpf_len<<" "<<(int)pow(2, 16 - pf->fpf_len)<<endl;
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x108(%rdi), %ebx
testl %ebx, %ebx
je 0x4562
cmpl $0x1, %ebx
jne 0x4531
movl $0x10, %eax
subl 0x40(%r14), %eax
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %ebx
jmp 0x459e
xorl %r15d, %r15d
xorl %ebx, %ebx
movl $0x10, %eax
subl 0x40(%r14,%r15,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %eax, %ebx
incq %r15
movl 0x108(%r14), %eax
cmpq %rax, %r15
jb 0x4536
cmpl $0x0, 0x10c(%r14)
je 0x459e
xorl %r15d, %r15d
movl $0x10, %eax
subl 0xc0(%r14,%r15,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %eax, %ebx
incq %r15
movl 0x10c(%r14), %eax
cmpq %rax, %r15
jb 0x456f
movl $0x10, %r13d
movl $0x10, %eax
subl 0x104(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
cmpl %eax, %ebx
je 0x469f
movl 0x108(%r14), %esi
movq 0x5a01(%rip), %r15      # 0x9fd8
movq %r15, %rdi
movl %eax, -0x2c(%rbp)
callq 0x20c0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %r15, %rdi
movl %ebx, %esi
callq 0x2230
movq %rax, %r15
leaq 0x2a2d(%rip), %r12      # 0x704d
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
movl 0x104(%r14), %esi
movq %r15, %rdi
callq 0x20c0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
subl 0x104(%r14), %r13d
xorps %xmm0, %xmm0
cvtsi2sd %r13, %xmm0
callq 0x2120
cvttsd2si %xmm0, %esi
movq %r15, %rdi
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl -0x2c(%rbp), %eax
cmpl %eax, %ebx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/derekzwy[P]an-optimal-tcam-encoding-algorithm-for-packet-classification/rtrie.cc
// Function: rt_insert(rnode*, rg, pc_rule*)
void rt_insert(rnode *n, rg r, pc_rule* index)
{
    if(r.high >= n->b.high && r.low <= n->b.low) {
        n->rlist.push_back(index);
        return;
    }

    uint32_t m = (n->b.high -  n->b.low + 1ULL)/2 + n->b.low - 1;

    if(r.low <= m) {
        if(!n->left) {
            n->left = new rnode(rg(n->b.low, m));
        }

        rt_insert(n->left, r, index);
    }

    if(r.high > m) {
        if(!n->right) {
            n->right = new rnode(rg(m+1, n->b.high)); 
        }
        rt_insert(n->right, r, index);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq %rdx, -0x40(%rbp)
movl (%rsi), %r12d
movl 0x4(%rsi), %r8d
movl (%rdi), %r13d
movl 0x4(%rdi), %ebx
cmpl %ebx, %r8d
setb %al
cmpl %r13d, %r12d
seta %cl
orb %al, %cl
je 0x5a8d
movq %rsi, %r15
subl %r13d, %ebx
incq %rbx
shrq %rbx
leal (%rbx,%r13), %eax
decl %eax
cmpl %eax, %r12d
jbe 0x5aa8
movq %rdx, %r12
jmp 0x5b0b
movq 0x10(%r14), %rsi
cmpq 0x18(%r14), %rsi
je 0x5b67
movq %rdx, (%rsi)
addq $0x8, 0x10(%r14)
jmp 0x5b77
movl %eax, -0x2c(%rbp)
movq 0x28(%r14), %rdi
testq %rdi, %rdi
jne 0x5af1
movl $0x30, %edi
movq %rdx, -0x38(%rbp)
movl %r8d, -0x30(%rbp)
callq 0x2160
movl -0x30(%rbp), %r8d
movq -0x38(%rbp), %rdx
movq %rax, %rdi
movl %r13d, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, 0x4(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movq %rdi, 0x28(%r14)
leaq -0x50(%rbp), %rsi
movl %r12d, (%rsi)
movl %r8d, 0x4(%rsi)
movq %rdx, %r12
callq 0x5a3c
movl 0x4(%r15), %r8d
movl -0x2c(%rbp), %eax
cmpl %eax, %r8d
jbe 0x5b77
movq 0x20(%r14), %rdi
testq %rdi, %rdi
jne 0x5b50
addl %ebx, %r13d
movl $0x30, %edi
movl %r8d, %ebx
callq 0x2160
movl %ebx, %r8d
movq %rax, %rdi
movl 0x4(%r14), %eax
movl %r13d, (%rdi)
movl %eax, 0x4(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x28(%rdi)
movq %rdi, 0x20(%r14)
movl (%r15), %eax
leaq -0x48(%rbp), %rsi
movl %eax, (%rsi)
movl %r8d, 0x4(%rsi)
movq %r12, %rdx
callq 0x5a3c
jmp 0x5b77
addq $0x8, %r14
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x5964
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/derekzwy[P]an-optimal-tcam-encoding-algorithm-for-packet-classification/rtrie.cc
// Function: rt_destory(rnode*)
void rt_destory(rnode *n)
{
    if(!n)
        return;

    if(n->right){
        rt_destory(n->right);
        n->right = NULL;
    }

    if(n->left){
        rt_destory(n->left);
        n->left = NULL;
    }

    n->rlist.clear();
    delete n;
}

// Assembly:
testq %rdi, %rdi
je 0x5be6
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x5baa
callq 0x5b86
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x5bc0
callq 0x5b86
movq $0x0, 0x28(%rbx)
movq 0x8(%rbx), %rdi
cmpq %rdi, 0x10(%rbx)
je 0x5bce
movq %rdi, 0x10(%rbx)
testq %rdi, %rdi
je 0x5bd8
callq 0x2130
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2130
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/amrsolver.cpp
// Function: amrsolver::set_initial_field()
void set_initial_field() {

	myOctree::create_list_of_leaf_nodes();

    	for (std::list<Octree*>::iterator i = myOctree::leaf_nodes.begin(), end = myOctree::leaf_nodes.end(); i != end; ++i) {

   		Field* field = (*i)->get_block_data()->field;
   		VecField* location = (*i)->get_block_data()->mesh;
	
		for(int i=0;i<field->Nx;i++) {
                	for(int j=0;j<field->Ny;j++) {
                        	for(int k=0;k<field->Nz;k++) {
                                	
					double x = location->x[i][j][k];
					double y = location->y[i][j][k];
					double z = location->z[i][j][k];
 					
					((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) >= 0.5625)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		

//					((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) + (z-1.0)*(z-1.0) >= 0.421875)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		
					//((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) >= 0.5625)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		
				//	(x*x + y*y >= 1.0)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		
					if(x*x + y*y <= 1.0)	{field->val[i][j][k] = 0.1; }		
					if(x*x + y*y >= 3.0)	{field->val[i][j][k] = 100.0; }		
                        	}
                	}
        	}
    	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x2f30
leaq 0x128f7(%rip), %rax     # 0x15230
movq (%rax), %r14
cmpq %rax, %r14
je 0x2a81
leaq 0xe6dc(%rip), %r15      # 0x11028
movabsq $0x4059000000000000, %r12 # imm = 0x4059000000000000
movabsq $0x3fb999999999999a, %r13 # imm = 0x3FB999999999999A
movq 0x10(%r14), %rdi
callq 0x418c
movq 0x8(%rax), %rbx
movq %r14, -0x30(%rbp)
movq 0x10(%r14), %rdi
callq 0x418c
movsd 0xe69e(%rip), %xmm7     # 0x11020
movsd 0xe68e(%rip), %xmm6     # 0x11018
movsd 0xe67e(%rip), %xmm5     # 0x11010
movsd 0xe66e(%rip), %xmm4     # 0x11008
movslq (%rbx), %rcx
movq %rcx, -0x38(%rbp)
testq %rcx, %rcx
jle 0x2a6d
movq (%rax), %rax
movl 0x4(%rbx), %edx
xorl %esi, %esi
testl %edx, %edx
jle 0x2a60
movl 0x8(%rbx), %edi
xorl %r8d, %r8d
testl %edi, %edi
jle 0x2a54
movq 0x10(%rax), %r9
movq 0x18(%rax), %r10
movq (%r9,%rsi,8), %r9
movq (%r9,%r8,8), %r9
movq (%r10,%rsi,8), %r10
movq (%r10,%r8,8), %r10
movq 0x10(%rbx), %r11
movq (%r11,%rsi,8), %r11
movq (%r11,%r8,8), %r11
xorl %r14d, %r14d
movsd (%r9,%r14,8), %xmm0
movsd (%r10,%r14,8), %xmm1
movapd %xmm0, %xmm2
addsd %xmm4, %xmm2
movapd %xmm1, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm2, %xmm2
addsd %xmm3, %xmm2
xorl %ecx, %ecx
ucomisd %xmm5, %xmm2
setb %cl
movsd (%r15,%rcx,8), %xmm2
movsd %xmm2, (%r11,%r14,8)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm6
jb 0x2a42
movq %r13, (%r11,%r14,8)
ucomisd %xmm7, %xmm0
jb 0x2a4c
movq %r12, (%r11,%r14,8)
incq %r14
cmpq %r14, %rdi
jne 0x29ef
incq %r8
cmpq %rdx, %r8
jne 0x29c0
incq %rsi
cmpq -0x38(%rbp), %rsi
jne 0x29b2
movq -0x30(%rbp), %r14
movq (%r14), %r14
cmpq 0x12535(%rip), %r14     # 0x14fb0
jne 0x2960
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/amrsolver.cpp
// Function: amrsolver::set_field()
void set_field() {

	myOctree::create_list_of_leaf_nodes();

    	for (std::list<Octree*>::iterator it = myOctree::leaf_nodes.begin(), end = myOctree::leaf_nodes.end(); it != end; ++it) {

   		Field* field = (*it)->get_block_data()->scalarfields[1];
   		VecField* location = (*it)->get_block_data()->mesh;
	
		for(int i=0;i<field->Nx;i++) {
                	for(int j=0;j<field->Ny;j++) {
                        	for(int k=0;k<field->Nz;k++) {
				
					double x = location->x[i][j][k];
					double y = location->y[i][j][k];
					double z = location->z[i][j][k];
 					
					if((*it)->get_block_data()->flag[i][j][k]==myOctree::DOMAIN) 
						field->val[i][j][k] = 1.0;		
					//if(x*x + y*y >= 3.0)	{field->val[i][j][k] = 100.0; }		
                        	}
                	}
        	}

    	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x2f30
leaq 0x12786(%rip), %rax     # 0x15230
movq (%rax), %r14
cmpq %rax, %r14
je 0x2b6c
movq 0x10(%r14), %rdi
callq 0x418c
movq 0x10(%rax), %rax
movq 0x8(%rax), %r12
movq 0x10(%r14), %rdi
callq 0x418c
movl (%r12), %ecx
testl %ecx, %ecx
jle 0x2b5c
movl 0x4(%r12), %eax
xorl %r13d, %r13d
testl %eax, %eax
jle 0x2b51
movl 0x8(%r12), %ecx
xorl %ebx, %ebx
testl %ecx, %ecx
jle 0x2b42
xorl %r15d, %r15d
movq 0x10(%r14), %rdi
callq 0x418c
movq 0x88(%rax), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbx,8), %rax
cmpl $0x7, (%rax,%r15,4)
jne 0x2b30
movq 0x10(%r12), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbx,8), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax,%r15,8)
incq %r15
movslq 0x8(%r12), %rcx
cmpq %rcx, %r15
jl 0x2af6
movl 0x4(%r12), %eax
incq %rbx
movslq %eax, %rdx
cmpq %rdx, %rbx
jl 0x2aef
movl (%r12), %ecx
incq %r13
movslq %ecx, %rdx
cmpq %rdx, %r13
jl 0x2ae4
movq (%r14), %r14
cmpq 0x1244a(%rip), %r14     # 0x14fb0
jne 0x2ab6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::create_list_of_leaf_nodes()
void create_list_of_leaf_nodes() {

	leaf_nodes.clear();

	for (std::list<Octree*>::iterator i = nodes.begin(), end = nodes.end(); i != end; ++i) {
		if((*i)->isLeafNode()) 
			leaf_nodes.push_back(*i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x122ef(%rip), %rdi     # 0x15230
callq 0x397e
movq 0x122cb(%rip), %r14     # 0x15218
leaq 0x122c4(%rip), %r15     # 0x15218
cmpq %r15, %r14
je 0x2f99
leaq 0x122d0(%rip), %rbx     # 0x15230
movq 0x10(%r14), %rdi
callq 0x4168
testb %al, %al
je 0x2f91
movl $0x18, %edi
callq 0x2200
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x122af(%rip)           # 0x15240
movq (%r14), %r14
cmpq %r15, %r14
jne 0x2f60
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::create_list_of_root_nodes()
void create_list_of_root_nodes() {

	root_nodes.clear();

	for (std::list<Octree*>::iterator i = nodes.begin(), end = nodes.end(); i != end; ++i) {
		if((*i)->isRootNode()) 
			root_nodes.push_back(*i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x12293(%rip), %rdi     # 0x15248
callq 0x397e
movq 0x12257(%rip), %r14     # 0x15218
leaq 0x12250(%rip), %r15     # 0x15218
cmpq %r15, %r14
je 0x300d
leaq 0x12274(%rip), %rbx     # 0x15248
movq 0x10(%r14), %rdi
callq 0x417a
testb %al, %al
je 0x3005
movl $0x18, %edi
callq 0x2200
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x12253(%rip)           # 0x15258
movq (%r14), %r14
cmpq %r15, %r14
jne 0x2fd4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::create_lists_of_level_nodes()
void create_lists_of_level_nodes() {

	//clearing all lists
	for (unsigned level=0; level <= max_level; level++) {
		level_nodes[level].clear();
	}
	

	//pushing nodes to respective lists	
	for (std::list<Octree*>::iterator j = nodes.begin(), end = nodes.end(); j != end; ++j) {
                int level = (*j)->get_level();
		level_nodes[level].push_back(*j);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
leaq 0x12234(%rip), %r14     # 0x15260
leaq 0x125f1(%rip), %r15     # 0x15624
movl %ebx, %eax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rdi
callq 0x397e
incl %ebx
cmpl (%r15), %ebx
jbe 0x3033
movq 0x121c8(%rip), %r15     # 0x15218
leaq 0x121c1(%rip), %r12     # 0x15218
cmpq %r12, %r15
je 0x3095
movq 0x10(%r15), %rdi
callq 0x41e2
cltq
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rbx
movl $0x18, %edi
callq 0x2200
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x10(%rbx)
movq (%r15), %r15
jmp 0x3057
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::create_lists_of_multilevel_nodes()
void create_lists_of_multilevel_nodes() {

	//clearing all lists
	for (unsigned level=0; level <= max_level; level++) {
		multilevel_nodes[level].clear();
	}

	//pushing nodes to respective lists	
	for (unsigned level=0; level <= max_level; level++) {
		for (std::list<Octree*>::iterator j = nodes.begin(), end = nodes.end(); j != end; ++j) {
                	if(((*j)->get_level()<level && (*j)->isLeafNode())||((*j)->get_level()==level)) { 
				multilevel_nodes[level].push_back(*j);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x1238b(%rip), %r14     # 0x15440
leaq 0x12568(%rip), %r15     # 0x15624
movl %ebx, %eax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rdi
callq 0x397e
incl %ebx
movl (%r15), %eax
cmpl %eax, %ebx
jbe 0x30bc
xorl %r12d, %r12d
leaq 0x1213a(%rip), %r13     # 0x15218
movq 0x12133(%rip), %r14     # 0x15218
cmpq %r13, %r14
je 0x3151
movl %r12d, %eax
leaq (%rax,%rax,2), %rax
leaq 0x12348(%rip), %rcx     # 0x15440
leaq (%rcx,%rax,8), %rbx
movq 0x10(%r14), %rdi
callq 0x41e2
cmpl %r12d, %eax
jae 0x3117
movq 0x10(%r14), %rdi
callq 0x4168
testb %al, %al
jne 0x3125
movq 0x10(%r14), %rdi
callq 0x41e2
cmpl %r12d, %eax
jne 0x3146
movl $0x18, %edi
callq 0x2200
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x10(%rbx)
movq (%r14), %r14
cmpq %r13, %r14
jne 0x30fc
movl (%r15), %eax
incl %r12d
cmpl %eax, %r12d
jbe 0x30de
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::create_node(int, double, double, double, double, double, double, int, myOctree::node_boundary_flags**)
void create_node(int blocknumber, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, int level, NodeBc **bc) {

	//memory allocation to new node
	Octree r(xmin,xmax,ymin,ymax,zmin,zmax,level);
	nodes.pop_back();
	Octree* root = new Octree(r);

	//boundaries are assigned to this root node
//	root->east_bc = east_bc;
//	root->west_bc = west_bc;
//	root->north_bc = north_bc;
//	root->south_bc = south_bc;
//	root->top_bc = top_bc;
//	root->bottom_bc = bottom_bc;

	for(int i=0;i<3;i++) {
		for(int j=0;j<2;j++) {
			root->bc[i][j] = bc[i][j];
		}
	}

	root->number = blocknumber;
		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %rbx
movl %edi, %r14d
leaq -0x110(%rbp), %rdi
callq 0x4cf0
movq 0x1208f(%rip), %r15     # 0x15220
decq 0x12090(%rip)           # 0x15228
movq %r15, %rdi
callq 0x2320
movl $0x18, %esi
movq %r15, %rdi
callq 0x2210
movl $0xf8, %edi
callq 0x2200
movq %rax, %r15
leaq -0x110(%rbp), %rsi
movq %rax, %rdi
callq 0x4b4e
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
movl (%rcx), %edx
movl %edx, 0x38(%r15,%rax,8)
movl 0x4(%rcx), %ecx
movl %ecx, 0x3c(%r15,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x31cb
movl %r14d, 0x98(%r15)
leaq -0x110(%rbp), %rdi
callq 0x4b20
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xf8, %esi
movq %r15, %rdi
callq 0x2210
jmp 0x321d
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x4b20
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::exchange_ghost_values_of_level(int)
void exchange_ghost_values_of_level(int level) {

	for(int l = 0; l<scalar_fields.size() ; l++) {
		amrsolver::exchange_ghost_val(level, scalar_fields[l]);
	}
	
	for(int l = 0; l<vector_fields.size() ; l++) {
		amrsolver::exchange_ghost_val(level, vector_fields[l]);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edi, %ebx
leaq 0x11e77(%rip), %rcx     # 0x15638
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x3833
movl $0x8, %r13d
leaq -0x58(%rbp), %r15
xorl %r12d, %r12d
leaq -0x68(%rbp), %r14
movq %r15, -0x68(%rbp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x39ba
movl %ebx, %edi
movq %r14, %rsi
callq 0x744c
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3812
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
incq %r12
leaq 0x11e1c(%rip), %rcx     # 0x15638
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %r12, %rcx
ja 0x37db
leaq 0x11e16(%rip), %rcx     # 0x15650
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x38ac
movl $0x8, %r13d
leaq -0x38(%rbp), %r15
xorl %r12d, %r12d
leaq -0x48(%rbp), %r14
movq %r15, -0x48(%rbp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x39ba
movl %ebx, %edi
movq %r14, %rsi
callq 0x744c
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x388b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
incq %r12
leaq 0x11dbb(%rip), %rcx     # 0x15650
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %r12, %rcx
ja 0x3854
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
jmp 0x38cb
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x38db
movq (%r15), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::OctreeGrid()
void OctreeGrid() {

	std::cerr << "\n"  <<"Setting up grid" << std::endl;

	set_root_neighbours();

	//This is to be done after neighbours are set at that particular level
	exchange_ghost_values_of_level(0);

	//prints neighbours information
	//print_neighbour_information(nodes);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x11700(%rip), %rbx     # 0x14ff0
leaq 0xda3c(%rip), %rsi      # 0x11333
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2240
leaq 0xd84c(%rip), %rsi      # 0x11157
movl $0xf, %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
callq 0x34cd
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x37a7
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/adapt.cpp
// Function: myOctree::refine_nodes()
void refine_nodes() {

        create_list_of_leaf_nodes();

        for (std::list<Octree*>::iterator i = leaf_nodes.begin(), end = leaf_nodes.end(); i != end; ++i) {

                if((*i)->get_level() >= max_level)
                        continue;

                if((*i)->setToRefine)
                        (*i)->refine();

        }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x2f30
leaq 0x117c5(%rip), %rbx     # 0x15230
movq (%rbx), %r14
cmpq %rbx, %r14
je 0x3a97
movq 0x10(%r14), %rdi
callq 0x41e2
cmpl 0x11ba2(%rip), %eax     # 0x15624
jge 0x3a92
movq 0x10(%r14), %rdi
cmpb $0x1, (%rdi)
jne 0x3a92
callq 0x4402
movq (%r14), %r14
jmp 0x3a6e
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/adapt.cpp
// Function: myOctree::coarsen_nodes()
void coarsen_nodes() {

        create_list_of_leaf_nodes();

        for (std::list<Octree*>::iterator i = nodes.begin(), end = nodes.end(); i != end;) {

                if((*i)->setToCoarsen && !((*i)->isRootNode()) && ((*i)->isLeafNode())) {

                        //printf("deleting\n");
                        //setting the children of its parent to NULL
                        for(int n=0; n<2; n++) {
                                for(int m=0; m<2; m++) {
                                        for(int l=0; l<2; l++) {
                                                (*i)->get_parent()->set_child_null_at(l, m, n);
                                        }       
                                }       
                        }       

                        i = nodes.erase(i);
                }
                else {
                        ++i;
                }       
        }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0x2f30
leaq 0x11765(%rip), %r15     # 0x15218
movq (%r15), %rbx
cmpq %r15, %rbx
je 0x3b9b
movq 0x10(%rbx), %rdi
cmpb $0x1, 0x1(%rdi)
jne 0x3b93
callq 0x417a
testb %al, %al
jne 0x3b93
movq 0x10(%rbx), %rdi
callq 0x4168
testb %al, %al
je 0x3b93
xorl %r14d, %r14d
movb $0x1, %r12b
movq 0x10(%rbx), %rdi
callq 0x423e
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %r14d, %ecx
callq 0x4214
movq 0x10(%rbx), %rdi
callq 0x423e
movq %rax, %rdi
movl $0x1, %esi
xorl %edx, %edx
movl %r14d, %ecx
callq 0x4214
movq 0x10(%rbx), %rdi
callq 0x423e
movq %rax, %rdi
xorl %esi, %esi
movl $0x1, %edx
movl %r14d, %ecx
callq 0x4214
movq 0x10(%rbx), %rdi
callq 0x423e
movq %rax, %rdi
movl $0x1, %esi
movl $0x1, %edx
movl %r14d, %ecx
callq 0x4214
movl $0x1, %r14d
testb $0x1, %r12b
movl $0x0, %r12d
jne 0x3af1
movq (%rbx), %r14
decq 0x10(%r15)
movq %rbx, %rdi
callq 0x2320
movl $0x18, %esi
movq %rbx, %rdi
callq 0x2210
movq %r14, %rbx
jmp 0x3ab6
movq (%rbx), %rbx
jmp 0x3ab6
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/adapt.cpp
// Function: myOctree::recheck_siblings_coarsen_flags()
void recheck_siblings_coarsen_flags() {

        create_list_of_leaf_nodes();


        for (std::list<Octree*>::iterator it = leaf_nodes.begin(), end = leaf_nodes.end(); it != end; ++it) {
	
		if((*it)->setToCoarsen == true)	{
			
                        for(int n=0; n<2; n++) {
                                for(int m=0; m<2; m++) {
                                        for(int l=0; l<2; l++) {
						if((*it)->get_parent()->get_child_at(l,m,n)->setToCoarsen == false)
							(*it)->setToCoarsen = false;
					}
				}
			}
		}
	}		

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x2f30
leaq 0x11168(%rip), %rax     # 0x15230
movq (%rax), %r13
cmpq %rax, %r13
je 0x4159
movq 0x10(%r13), %rax
cmpb $0x1, 0x1(%rax)
jne 0x4148
xorl %ebx, %ebx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
movb $0x1, %al
xorl %r14d, %r14d
movl %eax, -0x30(%rbp)
xorl %r15d, %r15d
movb $0x1, %r12b
movq 0x10(%r13), %rdi
callq 0x423e
movq %rax, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x41ee
cmpb $0x0, 0x1(%rax)
jne 0x411a
movq 0x10(%r13), %rax
movb $0x0, 0x1(%rax)
movl $0x1, %r15d
testb $0x1, %r12b
movl $0x0, %r12d
jne 0x40f3
movl $0x1, %r14d
testb $0x1, -0x30(%rbp)
movl $0x0, %eax
jne 0x40ea
movl $0x1, %ebx
testb $0x1, -0x2c(%rbp)
jne 0x40e2
movq (%r13), %r13
cmpq 0x10e5d(%rip), %r13     # 0x14fb0
jne 0x40d4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::get_relative_location(int*, int*, int*)
void Octree::get_relative_location(int* i, int* j, int* k) {

	if(this->isRootNode()) {
             	std::cerr << "Error!: This is root node, no siblings at root node. " << std::endl;
              	exit(1);
       	}

	for(int n=0; n<2; n++) {
		for(int m=0; m<2; m++) {
     			for(int l=0; l<2; l++) {
                      		if(this->get_parent()->get_child_at(l,m,n) == this) {
                              		*i = l;
					*j = m;
					*k = n;
				}
                        }
            	}
       	}	

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0xe8(%rdi), %rax
testq %rax, %rax
je 0x42da
addq $0xa0, %rax
movb $0x1, %r8b
xorl %r9d, %r9d
movb $0x1, %r10b
xorl %r11d, %r11d
movb $0x1, %bl
movq %r11, %r14
shlq $0x4, %r14
xorl %r15d, %r15d
movq %r15, %r12
shlq $0x5, %r12
addq %rax, %r12
addq %r14, %r12
cmpq %rdi, (%r12,%r9,8)
jne 0x429d
movl %r15d, (%rsi)
movl %r11d, (%rdx)
movl %r9d, (%rcx)
movl $0x1, %r15d
testb $0x1, %bl
movl $0x0, %ebx
jne 0x4281
movl $0x1, %r11d
testb $0x1, %r10b
movl $0x0, %r10d
jne 0x4275
movl $0x1, %r9d
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x426f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10d0f(%rip), %rdi     # 0x14ff0
leaq 0xcea8(%rip), %rsi      # 0x11190
callq 0x21f0
movq %rax, %rdi
callq 0x2100
movl $0x1, %edi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::set_to_refine_with_nesting()
void Octree::set_to_refine_with_nesting() {

	//set refinement criteria
	this->setToRefine = true;
	
	//check nesting
	if(!(this->isRootNode())) {

		for(int m=0;m<3;m++) {
                	for(int n=0;n<2;n++) {	
				if(this->neighbour[m][n]==NULL && this->bc[m][n]==NONE) {
                      			if(!(this->parent->neighbour[m][n]->setToRefine==true)) { 
                              			this->parent->neighbour[m][n]->set_to_refine_with_nesting();     
                      			}
              			}
			}
		}	
	}
}

// Assembly:
movb $0x1, (%rdi)
cmpq $0x0, 0xe8(%rdi)
je 0x43a9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x38(%rdi), %rax
movq %rax, -0x30(%rbp)
xorl %ecx, %ecx
movb $0x1, %r13b
movq %rcx, %r12
shlq $0x4, %r12
movq -0x38(%rbp), %rax
leaq (%rax,%r12), %r15
movq -0x30(%rbp), %rax
movq %rcx, -0x40(%rbp)
leaq (%rax,%rcx,8), %rbx
xorl %eax, %eax
cmpq $0x0, (%r15,%rax,8)
jne 0x437d
cmpl $0x0, (%rbx,%rax,4)
jne 0x437d
movq 0xe8(%r14), %rcx
addq %r12, %rcx
movq 0x8(%rcx,%rax,8), %rdi
cmpb $0x0, (%rdi)
jne 0x437d
callq 0x4300
movl $0x1, %eax
testb $0x1, %r13b
movl $0x0, %r13d
jne 0x4357
movq -0x40(%rbp), %rcx
incq %rcx
cmpq $0x3, %rcx
jne 0x4337
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::set_to_coarsen_with_nesting()
void Octree::set_to_coarsen_with_nesting() {
	
	bool criteria;	
	criteria = true;

	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			if(this->neighbour[m][n]) {
		//std::cerr << "\n" << "hi" << std::endl;
              			if(!(this->neighbour[m][n]->isLeafNode())) {
                      			criteria = false;
              			}
      			}     	
		}
	}	

	this->setToCoarsen = criteria;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8(%rdi), %rcx
movb $0x1, %al
xorl %edx, %edx
xorl %esi, %esi
movq %rsi, %r8
shlq $0x4, %r8
addq %rcx, %r8
movb $0x1, %r9b
xorl %r10d, %r10d
movq (%r8,%r10,8), %r10
testq %r10, %r10
je 0x43df
cmpq $0x0, 0xa0(%r10)
movzbl %al, %eax
cmovnel %edx, %eax
movl $0x1, %r10d
testb $0x1, %r9b
movl $0x0, %r9d
jne 0x43c8
incq %rsi
cmpq $0x3, %rsi
jne 0x43b8
andb $0x1, %al
movb %al, 0x1(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::Octree(myOctree::Octree const&)
Octree::Octree(const Octree &obj) {
    
//	std::cerr << " copy constructor of octree is working " << std::endl;

  	x_min = obj.x_min;
    	y_min = obj.y_min;
    	z_min = obj.z_min;
    	x_max = obj.x_max;
    	y_max = obj.y_max;
    	z_max = obj.z_max;
    	x_centre = obj.x_centre;
    	y_centre = obj.y_centre;
    	z_centre = obj.z_centre;
    	level = obj.level;

    	for(int i=0; i<2; i++) {
        	for(int j=0; j<2; j++) {
            		for(int k=0; k<2; k++)
                		children[i][j][k] = obj.children[i][j][k];
        	}
    	}

    	parent = obj.parent;
    	block_data = new Block(*(obj.block_data));
	setToRefine = obj.setToRefine;
	setToCoarsen = obj.setToCoarsen;

	number = obj.number;

	//neighbors
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			neighbour[m][n] = obj.neighbour[m][n];
		}
	}	
	
	//boundary conditions
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			bc[m][n] = obj.bc[m][n];
		}
	}	
    	

	nodes.push_back(this);
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x68(%rsi), %xmm0
movsd %xmm0, 0x68(%rdi)
movsd 0x78(%rsi), %xmm0
movsd %xmm0, 0x78(%rdi)
movsd 0x88(%rsi), %xmm0
movsd %xmm0, 0x88(%rdi)
movsd 0x70(%rsi), %xmm0
movsd %xmm0, 0x70(%rdi)
movsd 0x80(%rsi), %xmm0
movsd %xmm0, 0x80(%rdi)
movsd 0x90(%rsi), %xmm0
movsd %xmm0, 0x90(%rdi)
movsd 0x50(%rsi), %xmm0
movsd %xmm0, 0x50(%rdi)
movsd 0x58(%rsi), %xmm0
movsd %xmm0, 0x58(%rdi)
movsd 0x60(%rsi), %xmm0
movsd %xmm0, 0x60(%rdi)
movl 0xf0(%rsi), %eax
movl %eax, 0xf0(%rdi)
movl $0xa0, %eax
leaq (%rsi,%rax), %rcx
addq %rdi, %rax
movb $0x1, %dl
xorl %esi, %esi
shlq $0x5, %rsi
movq (%rcx,%rsi), %rdi
movq %rdi, (%rax,%rsi)
movq 0x8(%rcx,%rsi), %rdi
movq %rdi, 0x8(%rax,%rsi)
movq 0x10(%rcx,%rsi), %rdi
movq %rdi, 0x10(%rax,%rsi)
movq 0x18(%rcx,%rsi), %rdi
movq %rdi, 0x18(%rax,%rsi)
movl $0x1, %esi
testb $0x1, %dl
movl $0x0, %edx
jne 0x4be6
movq 0xe8(%r14), %rax
movq %rax, 0xe8(%rbx)
movl $0x90, %edi
callq 0x2200
movq %rax, %r15
movq 0xe0(%r14), %rsi
movq %rax, %rdi
callq 0x5e3c
movq %r15, 0xe0(%rbx)
movb (%r14), %al
movb %al, (%rbx)
movb 0x1(%r14), %al
movb %al, 0x1(%rbx)
movl 0x98(%r14), %eax
movl %eax, 0x98(%rbx)
movl $0x10, %eax
movq -0x8(%r14,%rax), %rcx
movq %rcx, -0x8(%rbx,%rax)
movq (%r14,%rax), %rcx
movq %rcx, (%rbx,%rax)
addq $0x10, %rax
cmpq $0x40, %rax
jne 0x4c6e
movl $0x7, %eax
movl (%r14,%rax,8), %ecx
movl %ecx, (%rbx,%rax,8)
movl 0x4(%r14,%rax,8), %ecx
movl %ecx, 0x4(%rbx,%rax,8)
incq %rax
cmpq $0xa, %rax
jne 0x4c8f
movl $0x18, %edi
callq 0x2200
movq %rbx, 0x10(%rax)
leaq 0x1055b(%rip), %rbx     # 0x15218
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x90, %esi
movq %r15, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::Octree(double, double, double, double, double, double, int)
Octree::Octree( double x1, double x2, double y1, double y2, double z1, double z2, int l ) : x_min(x1), x_max(x2), y_min(y1), y_max(y2), z_min(z1), z_max(z2), level(l)   {
//	std::cerr << " parametrized constructor of octree is working " << std::endl;
    
    	for(int i=0; i<2; i++) {
        	for(int j=0; j<2; j++) {
            		for(int k=0; k<2; k++)
                		children[i][j][k] = NULL;
        	}
    	}
    
	parent = NULL;
   	setToRefine = false;
	setToCoarsen = false; 
	
	//neighbors
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			neighbour[m][n] = NULL;
		}
	}	
   
	//boundary conditions
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			bc[m][n] = NONE;
		}
	}	

	number = 0;
 
    	x_centre = (x_min + x_max ) / 2.0;
    	y_centre = (y_min + y_max ) / 2.0;
    	z_centre = (z_min + z_max ) / 2.0;
    
    
    	//creating block to assign it to the data
    	Block new_block(x_min, x_max, y_min, y_max, z_min, z_max);
    	block_data = new Block(new_block);
    
    	nodes.push_back(this);
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movsd %xmm0, 0x68(%rdi)
movsd %xmm1, 0x70(%rdi)
movsd %xmm2, 0x78(%rdi)
movsd %xmm3, 0x80(%rdi)
movsd %xmm4, 0x88(%rdi)
movsd %xmm5, 0x90(%rdi)
movl %esi, 0xf0(%rdi)
xorps %xmm6, %xmm6
movups %xmm6, 0xa0(%rdi)
movups %xmm6, 0xb0(%rdi)
movups %xmm6, 0xc0(%rdi)
movups %xmm6, 0xd0(%rdi)
xorl %eax, %eax
movq %rax, 0xe8(%rdi)
movw $0x0, (%rdi)
movl $0x0, 0x98(%rdi)
movapd %xmm0, %xmm7
addsd %xmm1, %xmm7
movsd 0xc412(%rip), %xmm8     # 0x11188
mulsd %xmm8, %xmm7
movups %xmm6, 0x8(%rdi)
movups %xmm6, 0x18(%rdi)
movups %xmm6, 0x28(%rdi)
movups %xmm6, 0x38(%rdi)
movq %rax, 0x48(%rdi)
movsd %xmm7, 0x50(%rdi)
movapd %xmm2, %xmm6
addsd %xmm3, %xmm6
mulsd %xmm8, %xmm6
movsd %xmm6, 0x58(%rdi)
movapd %xmm4, %xmm6
addsd %xmm5, %xmm6
mulsd %xmm8, %xmm6
movsd %xmm6, 0x60(%rdi)
leaq -0xa0(%rbp), %rdi
callq 0x4f40
movl $0x90, %edi
callq 0x2200
movq %rax, %r14
leaq -0xa0(%rbp), %rsi
movq %rax, %rdi
callq 0x5e3c
movq %r14, 0xe0(%rbx)
movl $0x18, %edi
callq 0x2200
movq %rbx, 0x10(%rax)
leaq 0x1041c(%rip), %rbx     # 0x15218
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x10(%rbx)
leaq -0xa0(%rbp), %rdi
callq 0x618a
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4e37
movq %rax, %rbx
movl $0x90, %esi
movq %r14, %rdi
callq 0x2210
jmp 0x4e3a
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x618a
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::Octree()
Octree::Octree() {
//	std::cerr << " default constructor of octree is working " << std::endl;
    
    for(int i=0; i<2; i++) {
        for(int j=0; j<2; j++) {
            for(int k=0; k<2; k++)
                children[i][j][k] = NULL;
        }
    }
    
 	parent = NULL;
	setToRefine = false;
	setToCoarsen = false;   

	//neighbors
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			neighbour[m][n] = NULL;
		}
	}	
	
	x_centre = 0.0;
	y_centre = 0.0;
	z_centre = 0.0;
	x_min = 0.0;
	y_min = 0.0;
	z_min = 0.0;
	x_max = 0.0;
	y_max = 0.0;
	z_max = 0.0;

	level = 0;

	//boundary conditions
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			bc[m][n] = NONE;
		}
	}	

	number = 0;

    //creating block to assign it to the data
    Block new_block;
    block_data = new Block(new_block);
    
    nodes.push_back(this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rdi)
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xa0(%rdi)
movq $0x0, 0xe8(%rdi)
movw $0x0, (%rdi)
addq $0x8, %rdi
movl $0x0, 0xf0(%rbx)
movl $0x94, %edx
xorl %esi, %esi
callq 0x2130
leaq -0xa0(%rbp), %rdi
callq 0x5886
movl $0x90, %edi
callq 0x2200
movq %rax, %r14
leaq -0xa0(%rbp), %rsi
movq %rax, %rdi
callq 0x5e3c
movq %r14, 0xe0(%rbx)
movl $0x18, %edi
callq 0x2200
movq %rbx, 0x10(%rax)
leaq 0x1032c(%rip), %rbx     # 0x15218
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
incq 0x10(%rbx)
leaq -0xa0(%rbp), %rdi
callq 0x618a
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4f27
movq %rax, %rbx
movl $0x90, %esi
movq %r14, %rdi
callq 0x2210
jmp 0x4f2a
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x618a
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/block.cpp
// Function: myOctree::Block::~Block()
Block::~Block() {
  //		std::cerr << "destructor of block is working" << std::endl;

        delete mesh;
	delete field;

	for (int i = 0; i < scalar_fields.size(); ++i)
                        delete scalarfields[i];
   	
	delete scalarfields;

	for (int i = 0; i < vector_fields.size(); ++i)
                        delete vectorfields[i];
   	
	delete vectorfields;


	for (int i = 0; i < (iNx+2*pad); ++i) {
		for (int j = 0; j < (iNy+2*pad); ++j)
	      		delete [] flag[i][j];
	 
		delete [] flag[i];
	}
	
	delete [] flag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x61a7
movq %r14, %rdi
callq 0x6870
movl $0x90, %esi
movq %r14, %rdi
callq 0x2210
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x61c5
movq %r14, %rdi
callq 0x6caa
movl $0x50, %esi
movq %r14, %rdi
callq 0x2210
movq 0xf467(%rip), %rax      # 0x15640
cmpq 0xf458(%rip), %rax      # 0x15638
je 0x6221
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x61fa
movq %r14, %rdi
callq 0x6caa
movl $0x50, %esi
movq %r14, %rdi
callq 0x2210
incq %r15
movq 0xf42f(%rip), %rax      # 0x15640
subq 0xf420(%rip), %rax      # 0x15638
sarq $0x5, %rax
cmpq %r15, %rax
ja 0x61e5
movq 0x10(%rbx), %rdi
movl $0x8, %esi
callq 0x2210
movq 0xf422(%rip), %rax      # 0x15658
cmpq 0xf413(%rip), %rax      # 0x15650
je 0x627e
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x6257
movq %r14, %rdi
callq 0x6870
movl $0x90, %esi
movq %r14, %rdi
callq 0x2210
incq %r15
movq 0xf3ea(%rip), %rax      # 0x15658
subq 0xf3db(%rip), %rax      # 0x15650
sarq $0x5, %rax
cmpq %r15, %rax
ja 0x6242
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0x2210
movl 0xef56(%rip), %eax      # 0x151e8
leal (%rax,%rax), %ecx
addl 0xf3cd(%rip), %ecx      # 0x15668
jle 0x631a
movl 0xf3c9(%rip), %ecx      # 0x1566c
xorl %r14d, %r14d
leal (%rax,%rax), %edx
addl %ecx, %edx
jle 0x62e3
xorl %r15d, %r15d
movq 0x88(%rbx), %rdx
movq (%rdx,%r14,8), %rdx
movq (%rdx,%r15,8), %rdi
testq %rdi, %rdi
je 0x62d5
callq 0x2290
movl 0xf39d(%rip), %ecx      # 0x1566c
movl 0xef13(%rip), %eax      # 0x151e8
incq %r15
leal (%rcx,%rax,2), %edx
movslq %edx, %rdx
cmpq %rdx, %r15
jl 0x62b0
movq 0x88(%rbx), %rdx
movq (%rdx,%r14,8), %rdi
testq %rdi, %rdi
je 0x6304
callq 0x2290
movl 0xf36e(%rip), %ecx      # 0x1566c
movl 0xeee4(%rip), %eax      # 0x151e8
incq %r14
movslq 0xf35a(%rip), %rdx      # 0x15668
movslq %eax, %rsi
leaq (%rdx,%rsi,2), %rdx
cmpq %rdx, %r14
jl 0x62a6
movq 0x88(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x6335
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2290
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/vecfield.cpp
// Function: myOctree::VecField::VecField(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
VecField::VecField( int N_x, int N_y, int N_z, std::string info ) : Nx(N_x), Ny(N_y), Nz(N_z), name(info) {
                //std::cerr << "parametrized constructor of vecfield is working" << std::endl; 
                
        N = Nx*Ny*Nz;
        x = new double** [Nx];
        y = new double** [Nx];
        z = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                x[i] = new double* [Ny];
                y[i] = new double* [Ny];
                z[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        x[i][j] = new double [Nz];
                        y[i][j] = new double [Nz];
                        z[i][j] = new double [Nz];
                }       
        }

	set_field(0.0);
       
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
addq $0x28, %rdi
leaq 0x38(%r14), %rax
movq %rax, -0x48(%rbp)
movq %rax, 0x28(%r14)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
movq %rdi, -0x40(%rbp)
callq 0x39ba
movslq (%r14), %rdx
movslq 0x4(%r14), %rcx
movq %rcx, %rax
movq %rcx, -0x30(%rbp)
imull %edx, %eax
movslq 0x8(%r14), %rbx
movl %ebx, %ecx
imull %eax, %ecx
leaq (,%rdx,8), %rax
movq %rdx, -0x38(%rbp)
testq %rdx, %rdx
movl %ecx, 0xc(%r14)
movq $-0x1, %r15
cmovnsq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x18(%r14)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%r14)
cmpl $0x0, -0x38(%rbp)
jle 0x650e
movq -0x30(%rbp), %rcx
leaq (,%rcx,8), %rdx
testl %ecx, %ecx
movq $-0x1, %rax
cmovsq %rax, %rdx
movq %rdx, -0x50(%rbp)
movq %rbx, %r12
shlq $0x3, %r12
testl %ebx, %ebx
cmovsq %rax, %r12
movl %ecx, %ebx
xorl %r13d, %r13d
movq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x2030
movq 0x10(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq %r15, %rdi
callq 0x2030
movq 0x18(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq %r15, %rdi
callq 0x2030
movq 0x20(%r14), %rcx
movq %rax, (%rcx,%r13,8)
cmpl $0x0, -0x30(%rbp)
jle 0x6501
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x2030
movq 0x10(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, (%rcx,%r15,8)
movq %r12, %rdi
callq 0x2030
movq 0x18(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, (%rcx,%r15,8)
movq %r12, %rdi
callq 0x2030
movq 0x20(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x64bd
incq %r13
cmpq -0x38(%rbp), %r13
jne 0x6480
xorps %xmm0, %xmm0
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6552
jmp 0x652b
jmp 0x652b
movq %rax, %r14
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x6549
movq (%rax), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/vecfield.cpp
// Function: myOctree::VecField::set_field(double)
void VecField::set_field(double value) {

        for(int i=0;i<this->Nx;i++) {
                for(int j=0;j<this->Ny;j++) {
                        for(int k=0;k<this->Nz;k++) {
                                this->x[i][j][k] = value;
                                this->y[i][j][k] = value;
                                this->z[i][j][k] = value;
                        }
                }
        }
}

// Assembly:
movslq (%rdi), %rax
testq %rax, %rax
jle 0x65d1
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x4(%rdi), %ecx
movl 0x8(%rdi), %edx
xorl %esi, %esi
testl %ecx, %ecx
jle 0x65c1
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %r9
movq 0x20(%rdi), %r10
xorl %r11d, %r11d
testl %edx, %edx
jle 0x65b9
movq (%r8,%rsi,8), %rbx
movq (%rbx,%r11,8), %rbx
movq (%r9,%rsi,8), %r14
movq (%r14,%r11,8), %r14
movq (%r10,%rsi,8), %r15
movq (%r15,%r11,8), %r15
xorl %r12d, %r12d
movsd %xmm0, (%rbx,%r12,8)
movsd %xmm0, (%r14,%r12,8)
movsd %xmm0, (%r15,%r12,8)
incq %r12
cmpq %r12, %rdx
jne 0x659f
incq %r11
cmpq %rcx, %r11
jne 0x6580
incq %rsi
cmpq %rax, %rsi
jne 0x656d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq