// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Utils/R3Segmentation.cpp
// Function: gaps::R3SegmentationCluster::Affinity(gaps::R3SegmentationCluster*) const
RNScalar R3SegmentationCluster::
Affinity(R3SegmentationCluster *cluster) const
{
  // Get convenient variables
  R3Segmentation *segmentation = cluster->segmentation;
  double max_pair_color_difference = (segmentation) ? segmentation->max_pair_color_difference : 0;
  double max_pair_timestamp_difference = (segmentation) ? segmentation->max_pair_timestamp_difference : 0;
  double max_pair_category_difference = (segmentation) ? segmentation->max_pair_category_difference : 0;
  double max_pair_centroid_distance = (segmentation) ? segmentation->max_pair_centroid_distance : 0;
  double max_pair_primitive_distance = (segmentation) ? segmentation->max_pair_primitive_distance : 0;
  double max_pair_normal_angle = (segmentation) ? segmentation->max_pair_normal_angle : 0;
  RNBoolean equalize_cluster_sizes = (segmentation) ? segmentation->equalize_cluster_sizes : FALSE;
  RNBoolean balance_cluster_sizes = (segmentation) ? segmentation->balance_cluster_sizes : FALSE;
  RNBoolean favor_convex_clusters = (segmentation) ? segmentation->favor_convex_clusters : FALSE;
  RNBoolean scale_tolerances_with_depth = (segmentation) ? segmentation->scale_tolerances_with_depth : FALSE;

  // Initialize affinity
  RNScalar affinity = 1;

  // Check color difference
  if (max_pair_color_difference > 0) {
    RNLength color_difference = 0;
    color_difference += fabs(color.R() - cluster->color.R());
    color_difference += fabs(color.G() - cluster->color.G());
    color_difference += fabs(color.B() - cluster->color.B());
    RNScalar color_difference_affinity = exp(color_difference * color_difference / (-2.0 * 0.25 * max_pair_color_difference * max_pair_color_difference));
    affinity *= color_difference_affinity;
    assert(affinity >= 0);
  }

  // Check timestamp difference
  if (max_pair_timestamp_difference > 0) {
    RNLength timestamp_difference = fabs(timestamp - cluster->timestamp);
    if (timestamp_difference > 0) {
      RNScalar timestamp_difference_affinity = exp(timestamp_difference * timestamp_difference / (-2.0 *  max_pair_timestamp_difference * max_pair_timestamp_difference));
      affinity *= timestamp_difference_affinity;
      assert(affinity >= 0);
    }
  }

  // Check category difference
  if (max_pair_category_difference > 0) {
    if (category_identifier != cluster->category_identifier) {
      RNScalar min_category_confidence = (category_confidence <  cluster->category_confidence) ? category_confidence : cluster->category_confidence;
      RNScalar category_difference_affinity = exp(min_category_confidence * min_category_confidence / (-2.0 * max_pair_category_difference * max_pair_category_difference));
      affinity *= category_difference_affinity;
    }
  }

  // Compute centroid distance
  if (max_pair_centroid_distance > 0) {
    RNLength centroid_distance = R3Distance(primitive.centroid, cluster->primitive.centroid);
    RNScalar centroid_distance_affinity = exp(centroid_distance * centroid_distance / (-2.0 * 0.25 * max_pair_centroid_distance * max_pair_centroid_distance));
    affinity *= centroid_distance_affinity;
    assert(affinity >= 0);
  }

  // Compute primitive distances
  if (max_pair_primitive_distance > 0) {
    // Compute point0-primitive1 distance
    RNLength primitive0_distance = primitive.Distance(cluster->primitive.centroid);
    if (seed_point && (seed_point->depth > 0) && scale_tolerances_with_depth) primitive0_distance  /= seed_point->depth;
    RNScalar primitive0_distance_affinity = exp(primitive0_distance * primitive0_distance / (-2.0 * 0.25 * max_pair_primitive_distance * max_pair_primitive_distance));
    affinity *= primitive0_distance_affinity;
    assert(affinity >= 0);

    // Compute point1-primitive0 distance
    RNLength primitive1_distance = cluster->primitive.Distance(primitive.centroid);
    if (seed_point && (seed_point->depth > 0) && scale_tolerances_with_depth) primitive1_distance  /= seed_point->depth;
    RNScalar primitive1_distance_affinity = exp(primitive1_distance * primitive1_distance / (-2.0 * 0.25 * max_pair_primitive_distance * max_pair_primitive_distance));
    affinity *= primitive1_distance_affinity;
    assert(affinity >= 0);
  }

  // Compute normal angle
  if (max_pair_normal_angle > 0) {
    if ((primitive.primitive_type == R3_SEGMENTATION_LINE_PRIMITIVE_TYPE) &&
      (cluster->primitive.primitive_type == R3_SEGMENTATION_LINE_PRIMITIVE_TYPE)) {
      RNScalar dot = fabs(primitive.line.Vector().Dot(cluster->primitive.line.Vector()));
      RNAngle normal_angle = (dot < 1) ? acos(dot) : 0;
      if (seed_point && (seed_point->depth > 0) && scale_tolerances_with_depth) normal_angle  /= seed_point->depth;
      RNScalar normal_angle_affinity = exp(normal_angle * normal_angle / (-2.0 * 0.25 * max_pair_normal_angle * max_pair_normal_angle));
      affinity *= normal_angle_affinity;
      assert(affinity >= 0);
    }
    else if ((primitive.primitive_type == R3_SEGMENTATION_PLANE_PRIMITIVE_TYPE) &&
      (cluster->primitive.primitive_type == R3_SEGMENTATION_LINE_PRIMITIVE_TYPE)) {
      RNScalar dot = fabs(primitive.plane.Normal().Dot(cluster->primitive.line.Vector()));
      RNAngle normal_angle = (dot < 1) ? RN_PI_OVER_TWO - acos(dot) : RN_PI_OVER_TWO;
      if (seed_point && (seed_point->depth > 0) && scale_tolerances_with_depth) normal_angle  /= seed_point->depth;
      RNScalar normal_angle_affinity = exp(normal_angle * normal_angle / (-2.0 * 0.25 * max_pair_normal_angle * max_pair_normal_angle));
      affinity *= normal_angle_affinity;
      assert(affinity >= 0);
    }
    else if ((primitive.primitive_type == R3_SEGMENTATION_LINE_PRIMITIVE_TYPE) &&
      (cluster->primitive.primitive_type == R3_SEGMENTATION_PLANE_PRIMITIVE_TYPE)) {
      RNScalar dot = fabs(primitive.line.Vector().Dot(cluster->primitive.plane.Normal()));
      RNAngle normal_angle = (dot < 1) ? RN_PI_OVER_TWO - acos(dot) : RN_PI_OVER_TWO;
      if (seed_point && (seed_point->depth > 0) && scale_tolerances_with_depth) normal_angle  /= seed_point->depth;
      RNScalar normal_angle_affinity = exp(normal_angle * normal_angle / (-2.0 * 0.25 * max_pair_normal_angle * max_pair_normal_angle));
      affinity *= normal_angle_affinity;
      assert(affinity >= 0);
    }
    else if ((primitive.primitive_type == R3_SEGMENTATION_PLANE_PRIMITIVE_TYPE) &&
      (cluster->primitive.primitive_type == R3_SEGMENTATION_PLANE_PRIMITIVE_TYPE)) {
      RNScalar dot = primitive.plane.Normal().Dot(cluster->primitive.plane.Normal());
      RNAngle normal_angle = (dot > -1) ? ((dot < 1) ? acos(dot) : 0) : RN_PI;
      if (seed_point && (seed_point->depth > 0) && scale_tolerances_with_depth) normal_angle  /= seed_point->depth;
      RNScalar normal_angle_affinity = exp(normal_angle * normal_angle / (-2.0 * 0.25 * max_pair_normal_angle * max_pair_normal_angle));
      affinity *= normal_angle_affinity;
      assert(affinity >= 0);
    }
  }

  // Compute fraction of points in smallest cluster
  if (equalize_cluster_sizes) {
    int segmentation_npoints = (segmentation) ? segmentation->points.NEntries() : 0;
    int segmentation_nclusters = (segmentation) ? segmentation->clusters.NEntries() : 0;
    if ((segmentation_npoints > 0) && (segmentation_nclusters > 0)) {
      int smaller_npoints = (points.NEntries() < cluster->points.NEntries()) ? points.NEntries() : cluster->points.NEntries();
      if (smaller_npoints == 0) return 0;
      RNScalar avg_points_per_cluster = (RNScalar) segmentation_npoints / (RNScalar) segmentation_nclusters;
      RNScalar balance_affinity =  avg_points_per_cluster / smaller_npoints;
      affinity *= balance_affinity;
      assert(affinity >= 0);
    }
  }
  
  // Compute relative sizes of clusters
  if (balance_cluster_sizes) {
    RNScalar balance_affinity = 1.0;
    if (points.NEntries() == 0) return 0;
    if (cluster->points.NEntries() == 0) return 0;
    if (points.NEntries() < cluster->points.NEntries()) balance_affinity = (RNScalar) points.NEntries() / (RNScalar) cluster->points.NEntries();
    else balance_affinity = (RNScalar) cluster->points.NEntries() / (RNScalar) points.NEntries();
    affinity *= balance_affinity;
    assert(affinity >= 0);
  }
  
  // Compute fraction of points in smallest cluster
  if (favor_convex_clusters) {
    RNScalar convexity_affinity = MergedConvexity(this, cluster);
    affinity *= convexity_affinity;
    assert(affinity >= 0);
  }
  
  // Just checking
  assert(affinity >= 0);

  // Return affinity
  return affinity;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x130(%rsi), %r13
testq %r13, %r13
je 0x2b728
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x98(%r13), %xmm1
movsd 0xa0(%r13), %xmm5
movsd 0xa8(%r13), %xmm4
movsd 0x80(%r13), %xmm2
movsd 0x88(%r13), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x90(%r13), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0xc0(%r13), %r12d
movl 0xc4(%r13), %ebp
movl 0xc8(%r13), %r15d
movl 0xcc(%r13), %eax
movl %eax, 0x14(%rsp)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movsd %xmm2, 0x18(%rsp)
jbe 0x2b735
movupd 0xf0(%r14), %xmm2
movupd 0xf0(%rbx), %xmm0
subpd %xmm0, %xmm2
movapd 0xddeb3(%rip), %xmm3    # 0x109570
andpd %xmm3, %xmm2
movsd %xmm4, 0x30(%rsp)
pshufd $0xee, %xmm2, %xmm4     # xmm4 = xmm2[2,3,2,3]
movsd 0x100(%r14), %xmm0
subsd 0x100(%rbx), %xmm0
addsd %xmm2, %xmm4
andpd %xmm3, %xmm0
addsd %xmm4, %xmm0
mulsd %xmm0, %xmm0
movsd 0xde953(%rip), %xmm2    # 0x10a048
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
divsd %xmm2, %xmm0
movsd %xmm5, 0x8(%rsp)
callq 0x15af0
movsd 0x8(%rsp), %xmm5
movsd 0x30(%rsp), %xmm4
movsd 0x18(%rsp), %xmm2
movapd %xmm0, %xmm3
xorpd %xmm0, %xmm0
jmp 0x2b73d
movsd 0xdd920(%rip), %xmm0    # 0x109050
jmp 0x2bd3d
movsd 0xdd913(%rip), %xmm3    # 0x109050
ucomisd %xmm0, %xmm5
jbe 0x2b79d
movsd 0x108(%r14), %xmm0
subsd 0x108(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
je 0x2b79d
mulsd %xmm0, %xmm0
movsd 0xde8ce(%rip), %xmm1    # 0x10a038
mulsd %xmm5, %xmm1
mulsd %xmm5, %xmm1
divsd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
movsd %xmm4, 0x30(%rsp)
callq 0x15af0
movsd 0x30(%rsp), %xmm4
movsd 0x18(%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
mulsd %xmm0, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm4
jbe 0x2b7fe
movl 0x110(%r14), %eax
cmpl 0x110(%rbx), %eax
je 0x2b7fe
movsd 0x118(%r14), %xmm0
minsd 0x118(%rbx), %xmm0
mulsd %xmm0, %xmm0
movsd 0xde865(%rip), %xmm1    # 0x10a038
mulsd %xmm4, %xmm1
mulsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movsd %xmm3, 0x8(%rsp)
callq 0x15af0
movsd 0x18(%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
mulsd %xmm0, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x2b848
movl $0x80, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
movsd %xmm3, 0x8(%rsp)
callq 0x69830
mulsd %xmm0, %xmm0
movsd 0xde821(%rip), %xmm1    # 0x10a048
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x15af0
movsd 0x8(%rsp), %xmm3
mulsd %xmm0, %xmm3
xorpd %xmm1, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2b948
movl %r12d, 0x18(%rsp)
movl %ebp, %r12d
movl %r15d, %ebp
movsd %xmm3, 0x8(%rsp)
leaq 0x40(%r14), %rdi
leaq 0x40(%rbx), %r15
leaq 0x80(%rbx), %rsi
callq 0x29574
movq (%r14), %rax
testq %rax, %rax
je 0x2b8aa
cmpl $0x0, 0x14(%rsp)
setne %cl
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
seta %al
andb %cl, %al
cmpb $0x1, %al
jne 0x2b8aa
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
movsd 0xde792(%rip), %xmm2    # 0x10a048
movsd 0x28(%rsp), %xmm1
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x28(%rsp)
divsd %xmm2, %xmm0
callq 0x15af0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x80(%r14), %rsi
movq %r15, %rdi
callq 0x29574
movq (%r14), %rax
testq %rax, %rax
je 0x2b920
cmpl $0x0, 0x14(%rsp)
setne %cl
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
seta %al
andb %cl, %al
cmpb $0x1, %al
movl %ebp, %r15d
jne 0x2b923
divsd %xmm1, %xmm0
jmp 0x2b923
movl %ebp, %r15d
mulsd %xmm0, %xmm0
divsd 0x28(%rsp), %xmm0
callq 0x15af0
movsd 0x8(%rsp), %xmm3
mulsd %xmm0, %xmm3
movl %r12d, %ebp
movl 0x18(%rsp), %r12d
xorpd %xmm1, %xmm1
movsd 0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2bb10
movl 0x40(%r14), %eax
cmpl $0x3, %eax
je 0x2b9a3
cmpl $0x2, %eax
jne 0x2bb10
movl 0x40(%rbx), %eax
cmpl $0x3, %eax
je 0x2b9ce
cmpl $0x2, %eax
jne 0x2bb10
movsd %xmm3, 0x8(%rsp)
movl $0xb0, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x9ee8e
movapd %xmm0, %xmm1
andpd 0xddbd2(%rip), %xmm1    # 0x109570
jmp 0x2ba92
movl 0x40(%rbx), %eax
cmpl $0x3, %eax
je 0x2ba6d
cmpl $0x2, %eax
jne 0x2bb10
movsd %xmm3, 0x8(%rsp)
leaq 0xc8(%r14), %rdi
leaq 0xb0(%rbx), %rsi
jmp 0x2b9e2
movsd %xmm3, 0x8(%rsp)
leaq 0xb0(%r14), %rdi
leaq 0xc8(%rbx), %rsi
callq 0x9ee8e
andpd 0xddb81(%rip), %xmm0    # 0x109570
movsd 0xdd659(%rip), %xmm1    # 0x109050
ucomisd %xmm0, %xmm1
leaq 0xe81b6(%rip), %rax     # 0x113bb8
movsd (%rax), %xmm2
jbe 0x2ba1d
movsd %xmm2, 0x18(%rsp)
callq 0x155b0
movsd 0x18(%rsp), %xmm2
subsd %xmm0, %xmm2
movq (%r14), %rax
testq %rax, %rax
je 0x2ba46
cmpl $0x0, 0x14(%rsp)
setne %cl
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
seta %al
andb %cl, %al
cmpb $0x1, %al
jne 0x2ba46
divsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
movsd 0xde5f6(%rip), %xmm0    # 0x10a048
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
divsd %xmm0, %xmm2
movapd %xmm2, %xmm0
jmp 0x2bb01
movsd %xmm3, 0x8(%rsp)
movl $0xc8, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x9ee8e
ucomisd 0xde5c4(%rip), %xmm0    # 0x10a050
jbe 0x2baaf
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movsd 0xdd5b2(%rip), %xmm2    # 0x109050
ucomisd %xmm1, %xmm2
jbe 0x2baba
movapd %xmm1, %xmm0
callq 0x155b0
jmp 0x2baba
leaq 0xe80f2(%rip), %rax     # 0x113ba8
movsd (%rax), %xmm0
movq (%r14), %rax
testq %rax, %rax
je 0x2bae3
cmpl $0x0, 0x14(%rsp)
setne %cl
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
seta %al
andb %cl, %al
cmpb $0x1, %al
jne 0x2bae3
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
movsd 0xde559(%rip), %xmm1    # 0x10a048
movsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x15af0
movsd 0x8(%rsp), %xmm3
mulsd %xmm0, %xmm3
testl %r12d, %r12d
je 0x2bb62
movl 0xc(%r13), %eax
movl 0x24(%r13), %ecx
testl %eax, %eax
setg %dl
testl %ecx, %ecx
setg %sil
testb %sil, %dl
je 0x2bb62
movl 0x14(%r14), %esi
movl 0x14(%rbx), %edx
cmpl %edx, %esi
cmovll %esi, %edx
testl %edx, %edx
je 0x2bd39
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
divsd %xmm1, %xmm0
divsd %xmm2, %xmm0
mulsd %xmm0, %xmm3
testl %ebp, %ebp
je 0x2bbaf
movl 0x14(%r14), %esi
xorpd %xmm0, %xmm0
testl %esi, %esi
je 0x2bd3d
movl 0x14(%rbx), %eax
testl %eax, %eax
je 0x2bd3d
cmpl %eax, %esi
movl %eax, %ecx
cmovll %esi, %ecx
cmovgl %esi, %eax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
mulsd %xmm0, %xmm3
movapd %xmm3, %xmm0
testl %r15d, %r15d
jne 0x2bbbc
jmp 0x2bd3d
testl %r15d, %r15d
je 0x2bd33
movl 0x14(%r14), %esi
xorl %eax, %eax
movl $0x0, %ecx
movl $0x0, %edx
testl %esi, %esi
jle 0x2bc40
movl %esi, %ecx
shrl $0xa, %ecx
cmpl $0x400, %esi            # imm = 0x400
movl $0x1, %edi
cmovael %ecx, %edi
movq 0x8(%r14), %r8
xorl %r9d, %r9d
xorl %edx, %edx
xorl %ecx, %ecx
movq (%r8,%r9,8), %r11
movslq 0xbc(%r11), %r10
testq %r10, %r10
jle 0x2bc38
movq 0xb0(%r11), %r11
xorl %r15d, %r15d
movq (%r11,%r15,8), %r12
movq 0xc0(%r12), %r12
xorl %ebp, %ebp
cmpq %r14, %r12
sete %bpl
setne %r13b
cmpq %rbx, %r12
sete %r12b
andb %r13b, %r12b
movzbl %r12b, %r12d
addl %r12d, %ecx
addl %ebp, %edx
incq %r15
cmpq %r15, %r10
jne 0x2bc04
addq %rdi, %r9
cmpl %r9d, %esi
jg 0x2bbea
movl 0x14(%rbx), %esi
movl $0x0, %r8d
movl %esi, 0x8(%rsp)
testl %esi, %esi
jle 0x2bccb
movl 0x8(%rsp), %esi
movl %esi, %eax
shrl $0xa, %eax
cmpl $0x400, %esi            # imm = 0x400
movl $0x1, %edi
cmovael %eax, %edi
movq 0x8(%rbx), %r9
xorl %r10d, %r10d
xorl %r8d, %r8d
xorl %eax, %eax
movq (%r9,%r10,8), %r15
movslq 0xbc(%r15), %r11
testq %r11, %r11
jle 0x2bcc1
movq 0xb0(%r15), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %r13
movq 0xc0(%r13), %r13
xorl %ebp, %ebp
cmpq %rbx, %r13
sete %bpl
setne %sil
cmpq %r14, %r13
sete %r13b
andb %sil, %r13b
movzbl %r13b, %esi
addl %esi, %eax
addl %ebp, %r8d
incq %r12
cmpq %r12, %r11
jne 0x2bc8e
addq %rdi, %r10
cmpl %r10d, 0x8(%rsp)
jg 0x2bc74
movd %r8d, %xmm0
movd %edx, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd %eax, %xmm0
movd %ecx, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
paddd %xmm2, %xmm1
cvtdq2pd %xmm2, %xmm0
cvtdq2pd %xmm1, %xmm2
divpd %xmm2, %xmm0
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
xorpd %xmm2, %xmm2
pcmpgtd %xmm2, %xmm1
pand %xmm0, %xmm1
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2bd1e
sqrtsd %xmm0, %xmm0
jmp 0x2bd2f
movsd %xmm3, 0x8(%rsp)
callq 0x154d0
movsd 0x8(%rsp), %xmm3
mulsd %xmm0, %xmm3
movapd %xmm3, %xmm0
jmp 0x2bd3d
xorpd %xmm0, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq