// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/area_and_volume.cc
// Function: blockPockets(ATOM_NETWORK*, std::ostream&, std::vector<Point, std::allocator<Point>>, std::vector<int, std::allocator<int>>, std::vector<Point, std::allocator<Point>>, std::vector<int, std::allocator<int>>, double)
void blockPockets(ATOM_NETWORK *atmnet, ostream &output, vector<Point> axsPoints, vector<int> axsPChIDs, vector<Point> inaxsPoints, vector<int> inaxsPPIDs, double probeRad){
/*
  for(unsigned int i = 0; i < axsPoints.size(); i++){
    Point coords = axsPoints.at(i);
    output << coords[0] << " " << coords[1] << " " << coords[2] << " 1 a " << axsPChIDs[i] << "\n";
   }
*/
/*
  for(unsigned int i = 0; i < inaxsPoints.size(); i++){
    Point coords = inaxsPoints.at(i);
    // print coordinates and pocket ID
    output <<  coords[0] << " " << coords[1] << " " << coords[2] << " 0 block " << inaxsPPIDs[i] << "\n";
  }
*/

  //DESCRIPTION: iterate over each pore ID that corresponds to a pocket, and block all points in that pocket with spheres without blocking any non-pocket points - the spheres are created iteratively, and many spheres may be needed per pocket
  bool debug = false; //prints extra info to terminal, including .xyz format Cartesian pocket info for visualisation
  vector<SPHERE> spheres_vector; //stores blocking spheres we have created below;
  double sphere_radius_overshoot = 0.1; //optional - the amount in A by which a sphere can extend beyond the furthest point to be blocked (so that the sphere does not perfectly intersect the furthest MC point, potentially leaving volume nearby that should have been blocked)

  //1) identify how many pores we have, and which ones are pockets
  int max_pore_ID = 0;
  int num_axsPoints = axsPoints.size();
  int num_inaxsPoints = inaxsPoints.size();
  for(int i=0; i<num_axsPoints; i++) if(axsPChIDs.at(i)>max_pore_ID) max_pore_ID = axsPChIDs.at(i);
  for(int i=0; i<num_inaxsPoints; i++) if(inaxsPPIDs.at(i)>max_pore_ID) max_pore_ID = inaxsPPIDs.at(i);
  int num_pores = max_pore_ID+1;
  vector<bool> is_pocket;
  for(int i=0; i<num_pores; i++) is_pocket.push_back(false);
  for(int i=0; i<num_inaxsPoints; i++) if(!is_pocket.at(inaxsPPIDs.at(i))) is_pocket.at(inaxsPPIDs.at(i)) = true;
  if(debug) {
    printf("DEBUG: there are %d pores and they are assigned to channels and pockets as follows:\n", num_pores);
    for(int i=0; i<num_pores; i++) {
      printf("ID %d: ", i);
      if(is_pocket.at(i)) printf("pocket\n"); else printf("channel\n");
    }
  }

  //2) for each pocket, determine which points are members of this pocket and not already blocked by an earlier sphere (hence the resulting points may not all be connected), and store them all in selected_points
  for(int i=0; i<num_pores; i++) {
    vector<Point> selected_points; //stores to-be-blocked points in this pore
    if(is_pocket.at(i)) { //this pore is a pocket - we are going to block it with spheres
      for(int j=0; j<num_inaxsPoints; j++) {
        if(inaxsPPIDs.at(j)==i) { //inaxs point j is in pore i, so needs to be blocked - if it is not already blocked, push to selected_points vector
          Point p = inaxsPoints.at(j);
          bool already_blocked = false;
          int num_spheres = spheres_vector.size();
					for(int s=0; s<num_spheres && !already_blocked; s++) {
            SPHERE this_sphere = spheres_vector.at(s);
            double dist = atmnet->calcDistanceABC(p[0], p[1], p[2], this_sphere.x, this_sphere.y, this_sphere.z);
						if(dist<this_sphere.r) already_blocked = true;
					}
          if(!already_blocked) selected_points.push_back(p);
        }
      }

      //3) begin a loop - while there are points in selected_points, we need to do more blocking
      int num_selected_points = selected_points.size();
      while(num_selected_points>0) {
        if(debug) printf("DEBUG: there are %d points left to be blocked in pore with ID %d\n", num_selected_points, i);
        int most_dense_index = get_most_dense_index(atmnet, &selected_points);
        Point most_dense = selected_points.at(most_dense_index); //find most dense point in the remaining point cloud
        double closest_channel = -1; //distance to nearest MC point that is in a channel
        for(int j=0; j<num_axsPoints; j++) { //loop over points to be preserved, and find closest
          Point p = axsPoints.at(j);
          double dist = atmnet->calcDistanceABC(p[0], p[1], p[2], most_dense[0], most_dense[1], most_dense[2]);
          if(dist<closest_channel || closest_channel<0) closest_channel=dist;
        }
        double furthest_same_pocket = 0; //distance to furthest MC point that is part of this pore
        vector<double> vector_of_distances_to_sphere_centroid; //keep track of the distance of each to-be-blocked point to the most dense point - it will save us calculating this again later when we check which points were blocked
        for(int j=0; j<num_selected_points; j++) { //loop over points to be blocked, and find furthest
          Point p = selected_points.at(j);
          double dist = atmnet->calcDistanceABC(p[0], p[1], p[2], most_dense[0], most_dense[1], most_dense[2]);
          if(dist>furthest_same_pocket || furthest_same_pocket<0) furthest_same_pocket=dist;
          vector_of_distances_to_sphere_centroid.push_back(dist);
        }

        //4) calculate the largest acceptable sphere at this most dense position
        double radius = 0;
        if(closest_channel<0) radius = furthest_same_pocket + probeRad + sphere_radius_overshoot; //no channels - we can safely have a single sphere, inflated by probeRad to cover the void space here
        else if(furthest_same_pocket<closest_channel) radius = min(furthest_same_pocket + probeRad + sphere_radius_overshoot, closest_channel - (probeRad + sphere_radius_overshoot)); //there are channels, but none are closer than the furthest point in this pocket, so we can extend the sphere to cover everything; try and inflate the sphere by probeRad to ensure the void space is blocked, but not if this would cause anything within probeRad of an accessible MC point to be blocked
        else radius = max(sphere_radius_overshoot, closest_channel - (probeRad + sphere_radius_overshoot)); //else there are channels closer than the furthest pocket MC point, and we have to accommodate them

        //5) create the sphere and remove to-be-blocked points that were blocked by it
        SPHERE new_sphere;
        new_sphere.x = most_dense[0];
        new_sphere.y = most_dense[1];
        new_sphere.z = most_dense[2];
        new_sphere.r = radius;
        spheres_vector.push_back(new_sphere);
        for(int j=num_selected_points-1; j>=0; j--) { //loop over points to be blocked and eliminate blocked ones - we iterate backwards so that the vector of distances is still relevant
          if(vector_of_distances_to_sphere_centroid.at(j)<radius) { //blocked
				    Point swap = selected_points.at(j);
				    selected_points.at(j) = selected_points.at(num_selected_points-1);
				    selected_points.at(num_selected_points-1) = swap;
				    selected_points.pop_back();
				    num_selected_points--; //update counter iteratively
          }
        }
      } //6) end while loop - we have totally blocked this pocket - safe to move on to next pore
    } //7) end if is_pocket - we either ran the blocking part or bypassed this pore
  } //8) end for loop - we have analysed all pores and blocked where necessary
  int num_spheres = spheres_vector.size();
  //9) write to output (directed to .block file)
  if(debug) printf("DEBUG: %d blocking spheres were created, Cartesian positions in xyz format follow, if any\n%d\nXYZ FORMAT CARTESIAN POCKETS FOR VISUALIZATION\n", num_spheres, num_spheres);
  output << num_spheres << "\n";
  for(int i=0; i<num_spheres; i++) {
    SPHERE s = spheres_vector.at(i);
    if(debug) {
      Point f; f[0] = s.x; f[1] = s.y; f[2] = s.z;
      Point c = atmnet->abc_to_xyz(f);
      printf("X %.3f %.3f %.3f %.3f\n", c[0], c[1], c[2], s.r);
    }
    output << s.x << " " << s.y << " " << s.z << " " << s.r << "\n";
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movsd %xmm0, 0xc8(%rsp)
movq %r9, 0x30(%rsp)
movq %rcx, %rbx
movq %rsi, 0xc0(%rsp)
movq %rdi, 0x8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movq 0x8(%rdx), %rax
movq %rdx, 0x158(%rsp)
subq (%rdx), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
movq 0x8(%r8), %rax
movq %r8, 0x150(%rsp)
subq (%r8), %rax
cqto
idivq %rcx
movq %rax, %r15
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %esi
movq %rsi, 0xd8(%rsp)
xorl %ebp, %ebp
cmpq %r14, 0xd8(%rsp)
je 0x30494
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac00
cmpl %ebp, (%rax)
jle 0x3048f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac00
movl (%rax), %ebp
incq %r14
jmp 0x30469
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
movq %r15, 0x98(%rsp)
cmpq %rbx, 0x98(%rsp)
je 0x304d4
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xac00
cmpl %ebp, (%rax)
jle 0x304cf
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xac00
movl (%rax), %ebp
incq %rbx
jmp 0x304a5
leaq 0x180(%rsp), %rbx
andq $0x0, (%rbx)
andl $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
andl $0x0, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
xorl %r14d, %r14d
cmpl %ebp, %r14d
jg 0x30509
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa8f6
incl %r14d
jmp 0x304f5
xorl %ebx, %ebx
leaq 0x180(%rsp), %r14
cmpq %rbx, 0x98(%rsp)
je 0x3055a
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xac00
movslq (%rax), %rsi
movq %r14, %rdi
callq 0xaba4
testq %rdx, (%rax)
jne 0x30555
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xac00
movslq (%rax), %rsi
movq %r14, %rdi
callq 0xaba4
orq %rdx, (%rax)
incq %rbx
jmp 0x30513
movsd 0xcbb0e(%rip), %xmm0    # 0xfc070
addsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x148(%rsp)
movslq %ebp, %rax
movq %rax, 0x140(%rsp)
xorl %esi, %esi
leaq 0x160(%rsp), %rbx
pushq $0x1
popq %r15
pushq $0x2
popq %r14
leaq 0xe0(%rsp), %r12
cmpq 0x140(%rsp), %rsi
jg 0x30bb6
xorpd %xmm0, %xmm0
movapd %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
leaq 0x180(%rsp), %rdi
movq %rsi, 0xd0(%rsp)
callq 0xaba4
testq %rdx, (%rax)
je 0x30b9c
xorl %esi, %esi
cmpq 0x98(%rsp), %rsi
je 0x30730
movq 0x30(%rsp), %rdi
movq %rsi, 0x58(%rsp)
callq 0xac00
movl (%rax), %eax
cmpq %rax, 0xd0(%rsp)
jne 0x30723
movq 0x150(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x246b4
movq 0x10(%rax), %rcx
movq %rcx, 0xf0(%rsp)
movupd (%rax), %xmm0
movapd %xmm0, 0xe0(%rsp)
movq 0xa8(%rsp), %rax
subq 0xa0(%rsp), %rax
shrq $0x5, %rax
movslq %eax, %rbp
xorl %r13d, %r13d
xorl %eax, %eax
cmpq %rbp, %r13
jge 0x30712
testb $0x1, %al
jne 0x30712
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
callq 0x37170
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x18(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %r12, %rdi
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %r12, %rdi
movl %r14d, %esi
callq 0x63c78
movsd (%rax), %xmm2
movq 0x8(%rsp), %rdi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x10(%rsp), %xmm3
movsd 0x20(%rsp), %xmm4
movsd 0x80(%rsp), %xmm5
callq 0x3f440
movsd 0x48(%rsp), %xmm1
ucomisd %xmm0, %xmm1
seta %al
incq %r13
jmp 0x3064b
testb $0x1, %al
jne 0x30723
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x2468e
movq 0x58(%rsp), %rsi
incq %rsi
jmp 0x305d7
movq 0x68(%rsp), %rax
subq 0x60(%rsp), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
movq %rax, 0x50(%rsp)
cmpl $0x0, 0x50(%rsp)
jle 0x30b9c
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %r13
movq %r13, %rsi
callq 0x367a5
movslq %eax, %rsi
movq %r13, %rdi
callq 0x246b4
movq 0x10(%rax), %rcx
movq %rcx, 0x170(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x160(%rsp)
xorl %r13d, %r13d
movsd 0xcfb57(%rip), %xmm0    # 0x1002e8
movapd %xmm0, 0x10(%rsp)
cmpq %r13, 0xd8(%rsp)
je 0x308a7
movq 0x158(%rsp), %rdi
movq %r13, %rsi
callq 0x246b4
movq 0x10(%rax), %rcx
movq %rcx, 0xf0(%rsp)
movupd (%rax), %xmm0
movapd %xmm0, 0xe0(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r12, %rdi
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r12, %rdi
movl %r14d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x63c78
movsd (%rax), %xmm5
movq 0x8(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
movsd 0x48(%rsp), %xmm2
movsd 0x40(%rsp), %xmm3
movsd 0x38(%rsp), %xmm4
callq 0x3f440
movapd %xmm0, %xmm1
movapd 0x10(%rsp), %xmm3
minsd %xmm3, %xmm1
cmpltsd 0xcfa57(%rip), %xmm3    # 0x1002e0
movapd %xmm3, %xmm2
andnpd %xmm1, %xmm2
andpd %xmm0, %xmm3
orpd %xmm2, %xmm3
movapd %xmm3, 0x10(%rsp)
incq %r13
jmp 0x30797
andq $0x0, 0x130(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x120(%rsp)
movl 0x50(%rsp), %ebp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x30a06
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x246b4
movq 0x10(%rax), %rcx
movq %rcx, 0xf0(%rsp)
movupd (%rax), %xmm0
movapd %xmm0, 0xe0(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r12, %rdi
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r12, %rdi
movl %r14d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x63c78
movsd (%rax), %xmm5
movq 0x8(%rsp), %rdi
movsd 0x80(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
movsd 0x38(%rsp), %xmm3
movsd 0x58(%rsp), %xmm4
callq 0x3f440
movsd %xmm0, 0x100(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movapd %xmm0, 0x80(%rsp)
callq 0xac88
movapd 0x80(%rsp), %xmm3
movapd %xmm3, %xmm0
movapd 0x20(%rsp), %xmm2
maxsd %xmm2, %xmm0
cmpltsd 0xcf8f8(%rip), %xmm2    # 0x1002e0
movapd %xmm2, %xmm1
andnpd %xmm0, %xmm1
andpd %xmm3, %xmm2
orpd %xmm1, %xmm2
movapd %xmm2, 0x20(%rsp)
incq %r13
jmp 0x308ce
xorpd %xmm0, %xmm0
movapd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movapd 0x20(%rsp), %xmm2
movapd %xmm2, %xmm0
addsd 0xc8(%rsp), %xmm0
jbe 0x30a39
addsd 0xcb63f(%rip), %xmm0    # 0xfc070
movsd %xmm0, 0x10(%rsp)
jmp 0x30a64
ucomisd %xmm2, %xmm1
subsd 0x148(%rsp), %xmm1
jbe 0x30a56
addsd 0xcb620(%rip), %xmm0    # 0xfc070
minsd %xmm0, %xmm1
jmp 0x30a5e
maxsd 0xcb612(%rip), %xmm1    # 0xfc070
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0xe0(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0xe8(%rsp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x37192
testl %ebp, %ebp
jle 0x30b8a
decq %rbp
leaq 0x120(%rsp), %rdi
movq %rbp, %rsi
callq 0xaa50
movsd 0x10(%rsp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x30aca
leaq 0x60(%rsp), %rdi
movq %rbp, %rsi
callq 0x246b4
movq 0x10(%rax), %rcx
movq %rcx, 0x110(%rsp)
movupd (%rax), %xmm0
movapd %xmm0, 0x100(%rsp)
movq 0x50(%rsp), %rax
decl %eax
movq %rax, 0x50(%rsp)
movslq %eax, %rsi
leaq 0x60(%rsp), %rdi
movq %rsi, 0x20(%rsp)
callq 0x246b4
movq %rax, %r13
leaq 0x60(%rsp), %rdi
movq %rbp, %rsi
callq 0x246b4
movq 0x10(%r13), %rcx
movq %rcx, 0x10(%rax)
movupd (%r13), %xmm0
movupd %xmm0, (%rax)
leaq 0x60(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x246b4
movq 0x110(%rsp), %rcx
movq %rcx, 0x10(%rax)
movapd 0x100(%rsp), %xmm0
movupd %xmm0, (%rax)
addq $-0x18, 0x68(%rsp)
jmp 0x30aca
leaq 0x120(%rsp), %rdi
callq 0xb25c
jmp 0x30747
leaq 0x60(%rsp), %rdi
callq 0xb83e
movq 0xd0(%rsp), %rsi
incq %rsi
jmp 0x30599
movq 0xa8(%rsp), %rbx
subq 0xa0(%rsp), %rbx
shrq $0x5, %rbx
movq 0xc0(%rsp), %rdi
movl %ebx, %esi
callq 0x4760
leaq 0xd199e(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r14d, %r14d
testl %ebx, %ebx
cmovlel %r14d, %ebx
leaq 0xa0(%rsp), %r15
leaq 0xd3912(%rip), %r12     # 0x104512
leaq 0xd1977(%rip), %r13     # 0x10257e
cmpq %r14, %rbx
je 0x30cab
movq %r15, %rdi
movq %r14, %rsi
callq 0x37170
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x10(%rax), %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x18(%rax), %xmm1
movsd %xmm1, 0x20(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x46c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x46c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x46c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4480
movq %rax, %rdi
movsd 0x20(%rsp), %xmm0
callq 0x46c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x4480
incq %r14
jmp 0x30c07
leaq 0x180(%rsp), %rdi
callq 0xa976
leaq 0xa0(%rsp), %rdi
callq 0x3796e
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30cea
jmp 0x30d05
jmp 0x30cea
jmp 0x30cea
jmp 0x30ce1
movq %rax, %rbx
jmp 0x30d31
jmp 0x30cea
jmp 0x30d05
movq %rax, %rbx
jmp 0x30d24
jmp 0x30d05
jmp 0x30d05
jmp 0x30d05
jmp 0x30d05
jmp 0x30d0a
jmp 0x30d0a
jmp 0x30d05
jmp 0x30d0a
jmp 0x30d0a
jmp 0x30d05
jmp 0x30d05
movq %rax, %rbx
jmp 0x30d1a
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0xb25c
leaq 0x60(%rsp), %rdi
callq 0xb83e
leaq 0x180(%rsp), %rdi
callq 0xa976
leaq 0xa0(%rsp), %rdi
callq 0x3796e
movq %rbx, %rdi
callq 0x4780