// File: suhasjains[P]AMR-Solver/src/block.cpp
// Function: myOctree::Block::Block(double, double, double, double, double, double)
Block::Block( double x1, double x2, double y1, double y2, double z1, double z2 ) : x_min(x1), x_max(x2), y_min(y1), y_max(y2), z_min(z1), z_max(z2) {
//  		std::cerr << "Parametrized constructor of block is working" << std::endl;

	max_gradient = 0.0;

        dx = ( x_max - x_min ) / iNx;
        dy = ( y_max - y_min ) / iNy;
        dz = ( z_max - z_min ) / iNz;

	//std::cerr << dz << std::endl;

        //printf("dx=%g, dy=%g, dz=%g \n", dx, dy, dz);

        x_centre = (x_min + x_max ) / 2.0;
        y_centre = (y_min + y_max ) / 2.0;
        z_centre = (z_min + z_max ) / 2.0;

        //dynamical allocation of the objects
        VecField mesh_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, "mesh");
        mesh = new VecField(mesh_field);
        
        Field field_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, "field");
	field = new Field(field_field);

	scalarfields = new Field* [scalar_fields.size()];
	for(int i = 0; i<scalar_fields.size() ; i++) {
        	Field field_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, scalar_fields[i]);
	       	scalarfields[i] = new Field(field_field);	
	}       

	vectorfields = new VecField* [vector_fields.size()];
	for(int i = 0; i<vector_fields.size() ; i++) {
        	VecField vec_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, vector_fields[i]);
	       	vectorfields[i] = new VecField(vec_field);	
	}       

	//std::cerr << "Hi" << z_max << std::endl;
	
	//storing cell centre locations in mesh vector field
	for(int i=0;i<mesh->Nx;i++) {
		for(int j=0;j<mesh->Ny;j++) {
			for(int k=0;k<mesh->Nz;k++) {
				mesh->x[i][j][k] = x_min - pad*dx + dx*(i + 0.5);	 
				mesh->y[i][j][k] = y_min - pad*dy + dy*(j + 0.5);	 
				mesh->z[i][j][k] = z_min - pad*dz + dz*(k + 0.5);	 
			}
		}
	}

	//dynamic allocation of domain masking - stored here because it is common for all fields. 
	flag = new Mask** [iNx+2*pad];
	for(int i=0;i<(iNx+2*pad);i++) {
		flag[i] = new Mask* [iNy+2*pad];
 		for(int j=0;j<(iNy+2*pad);j++) {
                  	flag[i][j] = new Mask [iNz+2*pad];
           	}
        }

	set_domain_masking();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd %xmm3, -0x28(%rbp)
movsd %xmm4, -0x30(%rbp)
movsd %xmm5, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x40(%rax)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x48(%rax)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x50(%rax)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x58(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x60(%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x68(%rax)
movq $0x0, 0x20(%rax)
movsd 0x40(%rax), %xmm1
movsd 0x48(%rax), %xmm0
subsd %xmm1, %xmm0
cvtsi2sdl 0x1d666(%rip), %xmm1 # 0x266e8
divsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rax)
movsd 0x50(%rax), %xmm1
movsd 0x58(%rax), %xmm0
subsd %xmm1, %xmm0
cvtsi2sdl 0x1d64b(%rip), %xmm1 # 0x266ec
divsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rax)
movsd 0x60(%rax), %xmm1
movsd 0x68(%rax), %xmm0
subsd %xmm1, %xmm0
cvtsi2sdl 0x1d630(%rip), %xmm1 # 0x266f0
divsd %xmm1, %xmm0
movsd %xmm0, 0x80(%rax)
movsd 0x40(%rax), %xmm0
movsd 0x48(%rax), %xmm1
addsd %xmm1, %xmm0
movsd 0x1809e(%rip), %xmm1    # 0x21180
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rax)
movsd 0x50(%rax), %xmm0
movsd 0x58(%rax), %xmm2
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rax)
movsd 0x60(%rax), %xmm0
movsd 0x68(%rax), %xmm2
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rax)
movl 0x1d5c9(%rip), %edx     # 0x266e8
movl 0x1d143(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x2cc(%rbp)
movl 0x1d5b4(%rip), %edx     # 0x266ec
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x2c8(%rbp)
movl 0x1d5a7(%rip), %edx     # 0x266f0
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x2c4(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x3430
movq -0x2c0(%rbp), %rdx
leaq 0x18049(%rip), %rsi     # 0x211be
leaq -0xe8(%rbp), %rdi
callq 0x4570
jmp 0x9183
movl -0x2c4(%rbp), %ecx
movl -0x2c8(%rbp), %edx
movl -0x2cc(%rbp), %esi
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %r8
callq 0xb430
jmp 0x91aa
leaq -0xe8(%rbp), %rdi
callq 0x3180
leaq -0xe9(%rbp), %rdi
callq 0x3290
movl $0x90, %edi
callq 0x3250
movq %rax, -0x2e0(%rbp)
jmp 0x91d5
movq -0x2e0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xbaf0
jmp 0x91ea
movq -0x2d8(%rbp), %rax
movq -0x2e0(%rbp), %rcx
movq %rcx, (%rax)
movl 0x1d4e7(%rip), %edx     # 0x266e8
movl 0x1d061(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x2f4(%rbp)
movl 0x1d4d2(%rip), %edx     # 0x266ec
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x2f0(%rbp)
movl 0x1d4c5(%rip), %edx     # 0x266f0
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x2ec(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x3430
movq -0x2e8(%rbp), %rdx
leaq 0x17f6c(%rip), %rsi     # 0x211c3
leaq -0x170(%rbp), %rdi
callq 0x4570
jmp 0x9265
movl -0x2ec(%rbp), %ecx
movl -0x2f0(%rbp), %edx
movl -0x2f4(%rbp), %esi
leaq -0x150(%rbp), %rdi
leaq -0x170(%rbp), %r8
callq 0xc0a0
jmp 0x928c
leaq -0x170(%rbp), %rdi
callq 0x3180
leaq -0x171(%rbp), %rdi
callq 0x3290
movl $0x50, %edi
callq 0x3250
movq %rax, -0x300(%rbp)
jmp 0x92b7
movq -0x300(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xc440
jmp 0x92cc
movq -0x2d8(%rbp), %rax
movq -0x300(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x1d3d3(%rip), %rdi     # 0x266b8
callq 0x5b00
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3040
movq %rax, -0x308(%rbp)
jmp 0x930e
movq -0x2d8(%rbp), %rax
movq -0x308(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x0, -0x178(%rbp)
movslq -0x178(%rbp), %rax
movq %rax, -0x310(%rbp)
leaq 0x1d379(%rip), %rdi     # 0x266b8
callq 0x5b00
movq %rax, %rcx
movq -0x310(%rbp), %rax
cmpq %rcx, %rax
jae 0x95bd
movl 0x1d38b(%rip), %edx     # 0x266e8
movl 0x1cf05(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x31c(%rbp)
movl 0x1d376(%rip), %edx     # 0x266ec
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x318(%rbp)
movl 0x1d369(%rip), %edx     # 0x266f0
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x314(%rbp)
movslq -0x178(%rbp), %rsi
leaq 0x1d318(%rip), %rdi     # 0x266b8
callq 0x5b20
movq %rax, %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x3120
jmp 0x93b6
movl -0x314(%rbp), %ecx
movl -0x318(%rbp), %edx
movl -0x31c(%rbp), %esi
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %r8
callq 0xc0a0
jmp 0x93dd
leaq -0x1e8(%rbp), %rdi
callq 0x3180
movl $0x50, %edi
callq 0x3250
movq %rax, -0x328(%rbp)
jmp 0x93fc
movq -0x328(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xc440
jmp 0x9411
movq -0x328(%rbp), %rdx
movq -0x2d8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x178(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
leaq -0x1c8(%rbp), %rdi
callq 0xc640
movl -0x178(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x178(%rbp)
jmp 0x932a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x9480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x3180
leaq -0xe9(%rbp), %rdi
callq 0x3290
jmp 0x9b86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x9b7a
movq -0x2e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
movl $0x90, %esi
callq 0x3260
jmp 0x9b7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x9502
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x3180
leaq -0x171(%rbp), %rdi
callq 0x3290
jmp 0x9b7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x9b6e
movq -0x300(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
movl $0x50, %esi
callq 0x3260
jmp 0x9b6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x3180
jmp 0x9b6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x95ac
movq -0x328(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
movl $0x50, %esi
callq 0x3260
leaq -0x1c8(%rbp), %rdi
callq 0xc640
jmp 0x9b6e
leaq 0x1d10c(%rip), %rdi     # 0x266d0
callq 0x5b00
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3040
movq %rax, -0x330(%rbp)
jmp 0x95ed
movq -0x2d8(%rbp), %rax
movq -0x330(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl $0x0, -0x1ec(%rbp)
movslq -0x1ec(%rbp), %rax
movq %rax, -0x338(%rbp)
leaq 0x1d0b2(%rip), %rdi     # 0x266d0
callq 0x5b00
movq %rax, %rcx
movq -0x338(%rbp), %rax
cmpq %rcx, %rax
jae 0x9798
movl 0x1d0ac(%rip), %edx     # 0x266e8
movl 0x1cc26(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x344(%rbp)
movl 0x1d097(%rip), %edx     # 0x266ec
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x340(%rbp)
movl 0x1d08a(%rip), %edx     # 0x266f0
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x33c(%rbp)
movslq -0x1ec(%rbp), %rsi
leaq 0x1d051(%rip), %rdi     # 0x266d0
callq 0x5b20
movq %rax, %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x3120
jmp 0x9695
movl -0x33c(%rbp), %ecx
movl -0x340(%rbp), %edx
movl -0x344(%rbp), %esi
leaq -0x280(%rbp), %rdi
leaq -0x2a0(%rbp), %r8
callq 0xb430
jmp 0x96bc
leaq -0x2a0(%rbp), %rdi
callq 0x3180
movl $0x90, %edi
callq 0x3250
movq %rax, -0x350(%rbp)
jmp 0x96db
movq -0x350(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0xbaf0
jmp 0x96f0
movq -0x350(%rbp), %rdx
movq -0x2d8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1ec(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
leaq -0x280(%rbp), %rdi
callq 0xbef0
movl -0x1ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ec(%rbp)
jmp 0x9609
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x3180
jmp 0x9b6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x9787
movq -0x350(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
movl $0x90, %esi
callq 0x3260
leaq -0x280(%rbp), %rdi
callq 0xbef0
jmp 0x9b6e
movl $0x0, -0x2a4(%rbp)
movq -0x2d8(%rbp), %rcx
movl -0x2a4(%rbp), %eax
movq (%rcx), %rcx
cmpl (%rcx), %eax
jge 0x99be
movl $0x0, -0x2a8(%rbp)
movq -0x2d8(%rbp), %rcx
movl -0x2a8(%rbp), %eax
movq (%rcx), %rcx
cmpl 0x4(%rcx), %eax
jge 0x99a8
movl $0x0, -0x2ac(%rbp)
movq -0x2d8(%rbp), %rcx
movl -0x2ac(%rbp), %eax
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
jge 0x9992
movq -0x2d8(%rbp), %rax
movsd 0x40(%rax), %xmm0
cvtsi2sdl 0x1ca54(%rip), %xmm1 # 0x26268
movsd 0x70(%rax), %xmm2
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x70(%rax), %xmm0
cvtsi2sdl -0x2a4(%rbp), %xmm2
movsd 0x17933(%rip), %xmm3    # 0x21180
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq (%rax), %rcx
movq 0x10(%rcx), %rcx
movslq -0x2a4(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2a8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2ac(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movsd 0x50(%rax), %xmm0
cvtsi2sdl 0x1c9d9(%rip), %xmm1 # 0x26268
movsd 0x78(%rax), %xmm2
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x78(%rax), %xmm0
cvtsi2sdl -0x2a8(%rbp), %xmm2
movsd 0x178b8(%rip), %xmm3    # 0x21180
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq (%rax), %rcx
movq 0x18(%rcx), %rcx
movslq -0x2a4(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2a8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2ac(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movsd 0x60(%rax), %xmm0
cvtsi2sdl 0x1c95e(%rip), %xmm1 # 0x26268
movsd 0x80(%rax), %xmm2
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rax), %xmm0
cvtsi2sdl -0x2ac(%rbp), %xmm2
movsd 0x17837(%rip), %xmm3    # 0x21180
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq (%rax), %rax
movq 0x20(%rax), %rax
movslq -0x2a4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2a8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2ac(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x2ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2ac(%rbp)
jmp 0x97e7
jmp 0x9994
movl -0x2a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a8(%rbp)
jmp 0x97c4
jmp 0x99aa
movl -0x2a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a4(%rbp)
jmp 0x97a2
movl 0x1cd24(%rip), %edx     # 0x266e8
movl 0x1c89e(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3040
movq %rax, -0x358(%rbp)
jmp 0x99f7
movq -0x2d8(%rbp), %rax
movq -0x358(%rbp), %rcx
movq %rcx, 0x88(%rax)
movl $0x0, -0x2b0(%rbp)
movl -0x2b0(%rbp), %eax
movl 0x1ccc6(%rip), %ecx     # 0x266e8
movl 0x1c840(%rip), %edx     # 0x26268
shll %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x9b3f
movl 0x1ccb2(%rip), %edx     # 0x266ec
movl 0x1c828(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3040
movq %rax, -0x360(%rbp)
jmp 0x9a6d
movq -0x360(%rbp), %rdx
movq -0x2d8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2b0(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x2b4(%rbp)
movl -0x2b4(%rbp), %eax
movl 0x1cc49(%rip), %ecx     # 0x266ec
movl 0x1c7bf(%rip), %edx     # 0x26268
shll %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x9b29
movl 0x1cc39(%rip), %edx     # 0x266f0
movl 0x1c7ab(%rip), %eax     # 0x26268
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3040
movq %rax, -0x368(%rbp)
jmp 0x9aea
movq -0x368(%rbp), %rdx
movq -0x2d8(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2b0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2b4(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x2b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b4(%rbp)
jmp 0x9a97
jmp 0x9b2b
movl -0x2b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b0(%rbp)
jmp 0x9a16
movq -0x2d8(%rbp), %rdi
callq 0x9ba0
jmp 0x9b4d
leaq -0x150(%rbp), %rdi
callq 0xc640
leaq -0xc8(%rbp), %rdi
callq 0xbef0
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
leaq -0x150(%rbp), %rdi
callq 0xc640
leaq -0xc8(%rbp), %rdi
callq 0xbef0
movq -0xf8(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)