LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::PropertyIndex(char const*) const
int R3MeshPropertySet::
PropertyIndex(const char *property_name) const
{
  // Search through properties for matching name
  for (int i = 0; i < NProperties(); i++) {
    R3MeshProperty *property = Property(i);
    if (!strcmp(property->Name(), property_name)) return i;
  }

  // Not found
  return -1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x2ae90
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x693c4
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x2b330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2adf0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x22ea0
cmpl $0x0, %eax
jne 0x693b5
movl 0x1c(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x693cc
jmp 0x693b7
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x69360
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::SortByName()
void R3MeshPropertySet::
SortByName(void)
{
  // Sort properties
  for (int i = 0; i < properties.NEntries(); i++) {
    for (int j = i+1; j < properties.NEntries(); j++) {
      if (strcmp(properties[i]->Name(), properties[j]->Name()) > 0) {
        R3MeshProperty *swap = properties[i];
        properties.EntryContents(properties.KthEntry(i)) = properties[j];
        properties.EntryContents(properties.KthEntry(j)) = swap;
      }
    }
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0x34(%rsp)
addq $0x8, %rdi
callq 0x2ac70
movl %eax, %ecx
movl 0x34(%rsp), %eax
cmpl %ecx, %eax
jge 0x69565
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
movq 0x38(%rsp), %rdi
movl 0x48(%rsp), %eax
movl %eax, 0x30(%rsp)
addq $0x8, %rdi
callq 0x2ac70
movl %eax, %ecx
movl 0x30(%rsp), %eax
cmpl %ecx, %eax
jge 0x69553
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
movl 0x4c(%rsp), %esi
callq 0x6c020
movq (%rax), %rdi
callq 0x2adf0
movq 0x38(%rsp), %rdi
movq %rax, 0x28(%rsp)
addq $0x8, %rdi
movl 0x48(%rsp), %esi
callq 0x6c020
movq (%rax), %rdi
callq 0x2adf0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x22ea0
cmpl $0x0, %eax
jle 0x69541
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
movl 0x4c(%rsp), %esi
callq 0x6c020
movq 0x38(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x40(%rsp)
addq $0x8, %rdi
movl 0x48(%rsp), %esi
callq 0x6c020
movq 0x38(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
movl 0x4c(%rsp), %esi
callq 0x4f9e0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x6c040
movq 0x10(%rsp), %rcx
movq 0x38(%rsp), %rdi
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
addq $0x8, %rdi
movl 0x48(%rsp), %esi
callq 0x4f9e0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x6c040
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x69543
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x6942a
jmp 0x69555
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x693fb
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::operator=(gaps::R3MeshPropertySet const&)
R3MeshPropertySet& R3MeshPropertySet::
operator=(const R3MeshPropertySet& set)
{
  // Delete everything
  Empty();

  // Copy mesh
  mesh = set.mesh;
  
  // Copy properties
  for (int i = 0; i < set.NProperties(); i++) {
    R3MeshProperty *property = set.Property(i);
    Insert(new R3MeshProperty(*property));
  }

  // Return this
  return *this;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x69290
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2ae90
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x696cd
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x2b330
movq %rax, 0x28(%rsp)
movl $0x448, %edi            # imm = 0x448
callq 0x229d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rsi
callq 0x6c4c0
jmp 0x69694
movq (%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x69220
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x69645
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x448, %esi            # imm = 0x448
callq 0x229f0
jmp 0x696d7
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x23270
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::Read(char const*)
int R3MeshPropertySet::
Read(const char *filename)
{
  // Check mesh
  if (!mesh) {
    RNFail("Property set must be associated with mesh before file can be read: %s\n", filename);
    return 0;
  }
  
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .arff)\n", filename);
    return 0;
  }

  // Read file of appropriate type
  if (!strcmp(extension, ".arff")) return ReadARFF(filename);
  else if (!strcmp(extension, ".npy")) return ReadNumpy(filename);
  else if (!strcmp(extension, ".prp")) return ReadBinary(filename);
  else if (!strcmp(extension, ".trt")) return ReadToronto(filename);
  else return ReadProperty(filename);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x6972d
movq 0x10(%rsp), %rsi
leaq 0x12e787(%rip), %rdi    # 0x197ea0
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x24(%rsp)
jmp 0x69824
movq 0x10(%rsp), %rdi
movl $0x2e, %esi
callq 0x22b00
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x69767
movq 0x10(%rsp), %rsi
leaq 0x12e794(%rip), %rdi    # 0x197ee7
movb $0x0, %al
callq 0x22090
movl $0x0, 0x24(%rsp)
jmp 0x69824
movq 0x8(%rsp), %rdi
leaq 0x12e7a0(%rip), %rsi    # 0x197f13
callq 0x22ea0
cmpl $0x0, %eax
jne 0x69794
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x69830
movl %eax, 0x24(%rsp)
jmp 0x69824
movq 0x8(%rsp), %rdi
leaq 0x12e779(%rip), %rsi    # 0x197f19
callq 0x22ea0
cmpl $0x0, %eax
jne 0x697be
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x69ce0
movl %eax, 0x24(%rsp)
jmp 0x69824
movq 0x8(%rsp), %rdi
leaq 0x12e754(%rip), %rsi    # 0x197f1e
callq 0x22ea0
cmpl $0x0, %eax
jne 0x697e8
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6a960
movl %eax, 0x24(%rsp)
jmp 0x69824
movq 0x8(%rsp), %rdi
leaq 0x12e72f(%rip), %rsi    # 0x197f23
callq 0x22ea0
cmpl $0x0, %eax
jne 0x69812
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6ac60
movl %eax, 0x24(%rsp)
jmp 0x69824
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6b260
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::ReadProperty(char const*)
int R3MeshPropertySet::
ReadProperty(const char *filename)
{
  // Create property name
  char name[1024];
  strcpy(name, filename);
  char *start = strrchr(name, '/');
  if (start) start++; 
  else start = name;
  char *end = strrchr(start, '.');
  if (end) *end = '\0';

  // Create mesh property
  R3MeshProperty *property = new R3MeshProperty(mesh, start);
  if (!property) {
    RNFail("Unable to create mesh property for %s\n", filename);
    return 0;
  }

  // Read data 
  if (!property->Read(filename)) {
    RNFail("Unable to read values from %s\n", filename);
    return 0;
  }

  // Add property to set
  Insert(property);

  // Return success
  return 1;
}

// Assembly:
subq $0x458, %rsp            # imm = 0x458
movq %rdi, 0x448(%rsp)
movq %rsi, 0x440(%rsp)
movq 0x448(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x40(%rsp), %rdi
movq 0x440(%rsp), %rsi
callq 0x228f0
leaq 0x40(%rsp), %rdi
movl $0x2f, %esi
callq 0x22b00
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x6b2c2
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x6b2cc
leaq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2e, %esi
callq 0x22b00
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x6b2f0
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
movl $0x448, %edi            # imm = 0x448
callq 0x229d0
movq %rax, %rdi
movq 0x10(%rsp), %rax
movq %rdi, %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rsi
movq 0x38(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x6c2b0
jmp 0x6b31d
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x6b371
movq 0x440(%rsp), %rsi
leaq 0x12cf23(%rip), %rdi    # 0x198261
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x454(%rsp)
jmp 0x6b3c5
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x448, %esi            # imm = 0x448
callq 0x229f0
jmp 0x6b3d4
movq 0x28(%rsp), %rdi
movq 0x440(%rsp), %rsi
callq 0x70730
cmpl $0x0, %eax
jne 0x6b3ab
movq 0x440(%rsp), %rsi
leaq 0x12cef1(%rip), %rdi    # 0x198288
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x454(%rsp)
jmp 0x6b3c5
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x69220
movl $0x1, 0x454(%rsp)
movl 0x454(%rsp), %eax
addq $0x458, %rsp            # imm = 0x458
retq
movq 0x20(%rsp), %rdi
callq 0x23270
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::Write(char const*) const
int R3MeshPropertySet::
Write(const char *filename) const
{
  // Check mesh
  if (!mesh) {
    RNFail("Property set must be associated with mesh before file can be written: %s\n", filename);
    return 0;
  }
  
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .arff)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strcmp(extension, ".arff")) return WriteARFF(filename);
  else if (!strcmp(extension, ".npy")) return WriteNumpy(filename);
  else if (!strcmp(extension, ".txt")) return WriteValues(filename);
  else if (!strcmp(extension, ".prp")) return WriteBinary(filename);
  else if (!strcmp(extension, ".val")) return WriteValues(filename);
  else if (!strcmp(extension, ".dat")) return WriteValues(filename);

  // None of the extensions matched
  RNFail("Unable to write file %s (unrecognized extension: %s)\n", filename, extension);
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x6b44d
movq 0x10(%rsp), %rsi
leaq 0x12ce6e(%rip), %rdi    # 0x1982a7
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x24(%rsp)
jmp 0x6b5b6
movq 0x10(%rsp), %rdi
movl $0x2e, %esi
callq 0x22b00
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x6b487
movq 0x10(%rsp), %rsi
leaq 0x12ca74(%rip), %rdi    # 0x197ee7
movb $0x0, %al
callq 0x22090
movl $0x0, 0x24(%rsp)
jmp 0x6b5b6
movq 0x8(%rsp), %rdi
leaq 0x12ca80(%rip), %rsi    # 0x197f13
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6b4b4
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6b5c0
movl %eax, 0x24(%rsp)
jmp 0x6b5b6
movq 0x8(%rsp), %rdi
leaq 0x12ca59(%rip), %rsi    # 0x197f19
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6b4e1
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6b7a0
movl %eax, 0x24(%rsp)
jmp 0x6b5b6
movq 0x8(%rsp), %rdi
leaq 0x12b230(%rip), %rsi    # 0x19671d
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6b50e
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6bac0
movl %eax, 0x24(%rsp)
jmp 0x6b5b6
movq 0x8(%rsp), %rdi
leaq 0x12ca04(%rip), %rsi    # 0x197f1e
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6b538
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6bcb0
movl %eax, 0x24(%rsp)
jmp 0x6b5b6
movq 0x8(%rsp), %rdi
leaq 0x12cdad(%rip), %rsi    # 0x1982f1
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6b562
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6bac0
movl %eax, 0x24(%rsp)
jmp 0x6b5b6
movq 0x8(%rsp), %rdi
leaq 0x12cd88(%rip), %rsi    # 0x1982f6
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6b58c
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6bac0
movl %eax, 0x24(%rsp)
jmp 0x6b5b6
jmp 0x6b58e
jmp 0x6b590
jmp 0x6b592
jmp 0x6b594
jmp 0x6b596
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x12b1cb(%rip), %rdi    # 0x196772
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::WriteARFF(char const*) const
int R3MeshPropertySet::
WriteARFF(const char *filename) const
{
  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open ARFF file: %s\n", filename);
    return 0;
  }

  // Write header
  fprintf(fp, "@relation %s\n\n", mesh->Name());

  // Write names
  for (int i = 0; i < NProperties(); i++) {
    R3MeshProperty *property = Property(i);
    fprintf(fp, "@attribute %s real\n", property->Name());
  }

  // Write values
  fprintf(fp, "\n@data\n\n");
  for (int i = 0; i < mesh->NVertices(); i++) {
    for (int j = 0; j < NProperties(); j++) {
      fprintf(fp, "%g ", properties[j]->VertexValue(i));
    }
    fprintf(fp, "\n");
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x12e5da(%rip), %rsi    # 0x199bbe
callq 0x22bf0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x6b616
movq 0x50(%rsp), %rsi
leaq 0x12c926(%rip), %rdi    # 0x197f28
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x64(%rsp)
jmp 0x6b78e
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdi
callq 0x6c200
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0x12ccbf(%rip), %rsi    # 0x1982fb
movb $0x0, %al
callq 0x22f10
movl $0x0, 0x44(%rsp)
movq 0x28(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x2ae90
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x6b6b1
movq 0x28(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x2b330
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2adf0
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x12cc6d(%rip), %rsi    # 0x19830a
movb $0x0, %al
callq 0x22f10
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x6b64b
movq 0x48(%rsp), %rdi
leaq 0x12cc61(%rip), %rsi    # 0x19831e
movb $0x0, %al
callq 0x22f10
movl $0x0, 0x34(%rsp)
movq 0x28(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6b77c
movl $0x0, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %eax
movl %eax, 0x8(%rsp)
callq 0x2ae90
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x6b759
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
addq $0x8, %rdi
movl 0x30(%rsp), %esi
callq 0x6c210
movq %rax, %rdi
movl 0x34(%rsp), %esi
callq 0x2b0a0
movq (%rsp), %rdi
leaq 0x12cbe2(%rip), %rsi    # 0x198327
movb $0x1, %al
callq 0x22f10
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x6b6f7
movq 0x48(%rsp), %rdi
leaq 0x13251d(%rip), %rsi    # 0x19dc82
movb $0x0, %al
callq 0x22f10
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x6b6cc
movq 0x48(%rsp), %rdi
callq 0x229c0
movl $0x1, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::WriteValues(char const*) const
int R3MeshPropertySet::
WriteValues(const char *filename) const
{
  // Check number of properties
  for (int i = 0; i < NProperties(); i++) {
    R3MeshProperty *property = Property(i);

    // Determine file name
    char name[1024];
    strncpy(name, filename, 1023);
    if (NProperties() > 1) {
      char basename[512];
      strncpy(basename, filename, 511);
      char *extension = strrchr(basename, '.');
      if (extension) { *extension = '\0'; }
      else extension = (char *) ".val";
      sprintf(name, "%s_%d.%s", basename, i, extension);
    }

    // Open file
    FILE *fp = fopen(name, "w");
    if (!fp) {
      RNFail("Unable to open values file: %s\n", name);
      return 0;
    }

    // Write values
    for (int i = 0; i < mesh->NVertices(); i++) {
      fprintf(fp, "%g\n", property->VertexValue(i));
    }

    // Close file
    fclose(fp);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x658, %rsp            # imm = 0x658
movq %rdi, 0x648(%rsp)
movq %rsi, 0x640(%rsp)
movq 0x648(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x63c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x63c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2ae90
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6bc8b
movq 0x10(%rsp), %rdi
movl 0x63c(%rsp), %esi
callq 0x2b330
movq %rax, 0x630(%rsp)
leaq 0x230(%rsp), %rdi
movq 0x640(%rsp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x22490
movq 0x10(%rsp), %rdi
callq 0x2ae90
cmpl $0x1, %eax
jle 0x6bbc4
leaq 0x30(%rsp), %rdi
movq 0x640(%rsp), %rsi
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x22490
leaq 0x30(%rsp), %rdi
movl $0x2e, %esi
callq 0x22b00
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x6bb91
movq 0x28(%rsp), %rax
movb $0x0, (%rax)
jmp 0x6bb9d
leaq 0x12c759(%rip), %rax    # 0x1982f1
movq %rax, 0x28(%rsp)
leaq 0x230(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movl 0x63c(%rsp), %ecx
movq 0x28(%rsp), %r8
leaq 0x12c8ce(%rip), %rsi    # 0x19848b
movb $0x0, %al
callq 0x22150
leaq 0x230(%rsp), %rdi
leaq 0x12dfeb(%rip), %rsi    # 0x199bbe
callq 0x22bf0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x6bc0b
leaq 0x230(%rsp), %rsi
leaq 0x12c8a0(%rip), %rdi    # 0x198494
movb $0x0, %al
callq 0xfbc30
movl $0x0, 0x654(%rsp)
jmp 0x6bc96
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x8(%rsp)
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x6bc6b
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x630(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x2b0a0
movq (%rsp), %rdi
leaq 0x12bd95(%rip), %rsi    # 0x1979ec
movb $0x1, %al
callq 0x22f10
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6bc13
movq 0x20(%rsp), %rdi
callq 0x229c0
movl 0x63c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x63c(%rsp)
jmp 0x6baef
movl $0x1, 0x654(%rsp)
movl 0x654(%rsp), %eax
addq $0x658, %rsp            # imm = 0x658
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::R3MeshProperty(gaps::R3Mesh*, char const*, double const*)
R3MeshProperty::
R3MeshProperty(R3Mesh *mesh, const char *name, const RNScalar *vertex_values)
  : mesh(mesh),
    nvalues(0),
    values(NULL)
{
  // Assign property name
  if (name) strncpy(this->name, name, 1023); 
  else sprintf(this->name, "Property%d", next_property_name++);
  this->name[1023] = '\0';
  
  // Assign vertex values
  this->nvalues = mesh->NVertices();
  this->values = new RNScalar [ this->nvalues ];
  if (vertex_values) {
    for (int i = 0; i < mesh->NVertices(); i++) {
      this->values[i] = vertex_values[i];
    }
  }
  else {
    for (int i = 0; i < mesh->NVertices(); i++) {
      this->values[i] = 0;
    }
  }

  // Reset statistics
  ResetStatistics();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movl $0x0, 0x408(%rax)
movq $0x0, 0x410(%rax)
cmpq $0x0, 0x20(%rsp)
je 0x6c311
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movq 0x20(%rsp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x22490
jmp 0x6c339
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movl 0x192950(%rip), %edx    # 0x1fec70
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x192945(%rip)    # 0x1fec70
leaq 0x12c1a6(%rip), %rsi    # 0x1984d8
movb $0x0, %al
callq 0x22150
movq 0x8(%rsp), %rax
movb $0x0, 0x407(%rax)
movq 0x28(%rsp), %rdi
callq 0x2abd0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x408(%rax)
movslq 0x408(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x22040
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x410(%rax)
cmpq $0x0, 0x18(%rsp)
je 0x6c3f3
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x6c3f1
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x410(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x6c3a3
jmp 0x6c43d
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, (%rsp)
movq 0x28(%rsp), %rdi
callq 0x2abd0
movl %eax, %ecx
movl (%rsp), %eax
cmpl %ecx, %eax
jge 0x6c43b
movq 0x8(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x10(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x6c3fb
jmp 0x6c43d
movq 0x8(%rsp), %rdi
callq 0x6c450
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::ResetStatistics()
void R3MeshProperty::
ResetStatistics(void) 
{
  // Reset all the statistics derived from values
  mean = RN_UNKNOWN;
  stddev = RN_UNKNOWN;
  minimum = RN_UNKNOWN;
  maximum = RN_UNKNOWN;
  median = RN_UNKNOWN;
  l2norm = RN_UNKNOWN;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movsd 0x129bbe(%rip), %xmm0   # 0x196020
movsd %xmm0, 0x418(%rax)
movsd 0x129bae(%rip), %xmm0   # 0x196020
movsd %xmm0, 0x420(%rax)
movsd 0x129b9e(%rip), %xmm0   # 0x196020
movsd %xmm0, 0x428(%rax)
movsd 0x129b8e(%rip), %xmm0   # 0x196020
movsd %xmm0, 0x430(%rax)
movsd 0x129b7e(%rip), %xmm0   # 0x196020
movsd %xmm0, 0x438(%rax)
movsd 0x129b6e(%rip), %xmm0   # 0x196020
movsd %xmm0, 0x440(%rax)
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::R3MeshProperty(gaps::R3MeshProperty const&)
R3MeshProperty::
R3MeshProperty(const R3MeshProperty& property)
  : mesh(property.mesh),
    nvalues(0),
    values(NULL),
    mean(property.mean),
    stddev(property.stddev),
    minimum(property.minimum),
    maximum(property.maximum),
    median(property.median),
    l2norm(property.l2norm)
{
  // Copy property name
  strcpy(this->name, property.name);
  
  // Copy vertex values
  this->nvalues = mesh->NVertices();
  this->values = new RNScalar [ this->nvalues ];
  for (int i = 0; i < mesh->NVertices(); i++) {
    this->values[i] = property.values[i];
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rdi)
movl $0x0, 0x408(%rdi)
movq $0x0, 0x410(%rdi)
movq 0x18(%rsp), %rax
movsd 0x418(%rax), %xmm0
movsd %xmm0, 0x418(%rdi)
movq 0x18(%rsp), %rax
movsd 0x420(%rax), %xmm0
movsd %xmm0, 0x420(%rdi)
movq 0x18(%rsp), %rax
movsd 0x428(%rax), %xmm0
movsd %xmm0, 0x428(%rdi)
movq 0x18(%rsp), %rax
movsd 0x430(%rax), %xmm0
movsd %xmm0, 0x430(%rdi)
movq 0x18(%rsp), %rax
movsd 0x438(%rax), %xmm0
movsd %xmm0, 0x438(%rdi)
movq 0x18(%rsp), %rax
movsd 0x440(%rax), %xmm0
movsd %xmm0, 0x440(%rdi)
addq $0x8, %rdi
movq 0x18(%rsp), %rsi
addq $0x8, %rsi
callq 0x228f0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x408(%rax)
movslq 0x408(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x22040
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x410(%rax)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x6c639
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x410(%rcx), %rcx
movslq 0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x410(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x6c5e1
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::IsLocalMinimum(gaps::R3MeshVertex*) const
RNBoolean R3MeshProperty::
IsLocalMinimum(R3MeshVertex *vertex) const
{
  // Return whether value at vertex is local minimum
  RNScalar value = VertexValue(mesh->VertexID(vertex));
  if (value == RN_UNKNOWN) return FALSE;
  for (int i = 0; i < mesh->VertexValence(vertex); i++) {
    R3MeshEdge *edge = mesh->EdgeOnVertex(vertex, i);
    R3MeshVertex *neighbor_vertex = mesh->VertexAcrossEdge(edge, vertex);
    RNScalar neighbor_value = VertexValue(mesh->VertexID(neighbor_vertex));
    if (neighbor_value == RN_UNKNOWN) continue;
    if (neighbor_value <= value) return FALSE;
  }

  // Vertex value is less than all neighbors
  return TRUE;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x2b080
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x2b0a0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x12925b(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6cdda
jp 0x6cdda
movl $0x0, 0x54(%rsp)
jmp 0x6ceb9
movl $0x0, 0x34(%rsp)
movq 0x10(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x6c0d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6ceb1
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0x6c100
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x712f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x2b080
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x2b0a0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd 0x1291a7(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6ce83
jp 0x6ce83
jmp 0x6cea1
movsd 0x18(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x6ce9f
movl $0x0, 0x54(%rsp)
jmp 0x6ceb9
jmp 0x6cea1
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x6cde2
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::IsLocalMaximum(gaps::R3MeshVertex*) const
RNBoolean R3MeshProperty::
IsLocalMaximum(R3MeshVertex *vertex) const
{
  // Return whether value at vertex is local maximum
  RNScalar value = VertexValue(mesh->VertexID(vertex));
  if (value == RN_UNKNOWN) return FALSE;
  for (int i = 0; i < mesh->VertexValence(vertex); i++) {
    R3MeshEdge *edge = mesh->EdgeOnVertex(vertex, i);
    R3MeshVertex *neighbor_vertex = mesh->VertexAcrossEdge(edge, vertex);
    RNScalar neighbor_value = VertexValue(mesh->VertexID(neighbor_vertex));
    if (neighbor_value == RN_UNKNOWN) continue;
    if (neighbor_value >= value) return FALSE;
  }

  // Vertex value is greater than all neighbors
  return TRUE;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x2b080
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x2b0a0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x12910b(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6cf2a
jp 0x6cf2a
movl $0x0, 0x54(%rsp)
jmp 0x6d005
movl $0x0, 0x34(%rsp)
movq 0x10(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x6c0d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6cffd
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0x6c100
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x712f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x2b080
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x2b0a0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd 0x129057(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6cfd3
jp 0x6cfd3
jmp 0x6cfed
movsd 0x18(%rsp), %xmm0
ucomisd 0x38(%rsp), %xmm0
jb 0x6cfeb
movl $0x0, 0x54(%rsp)
jmp 0x6d005
jmp 0x6cfed
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x6cf32
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Mean() const
RNScalar R3MeshProperty::
Mean(void) const
{
  // Compute mean of property values
  if (mean == RN_UNKNOWN) {
    R3MeshProperty *property = (R3MeshProperty *) this;
    property->mean = 0;
    if (nvalues > 0) {
      // Compute sum 
      int count = 0;
      RNScalar sum = 0;
      for (int i = 0; i < nvalues; i++) {
        if (values[i] == RN_UNKNOWN) continue;
        sum += values[i];
        count++;
      }

      // Compute mean
      if (count > 0) property->mean = sum / count;
    }
  }

  // Return mean
  return mean;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
movsd 0x418(%rax), %xmm0
movsd 0x128ff1(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d11a
jp 0x6d11a
movq -0x30(%rsp), %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x418(%rcx)
cmpl $0x0, 0x408(%rax)
jle 0x6d118
movl $0x0, -0x14(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rsp)
movl $0x0, -0x24(%rsp)
movq -0x30(%rsp), %rcx
movl -0x24(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6d0f2
movq -0x30(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x128f72(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d0b8
jp 0x6d0b8
jmp 0x6d0e5
movq -0x30(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x20(%rsp), %xmm0
movsd %xmm0, -0x20(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x6d07f
cmpl $0x0, -0x14(%rsp)
jle 0x6d116
movsd -0x20(%rsp), %xmm0
cvtsi2sdl -0x14(%rsp), %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rsp), %rax
movsd %xmm0, 0x418(%rax)
jmp 0x6d118
jmp 0x6d11a
movq -0x30(%rsp), %rax
movsd 0x418(%rax), %xmm0
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Minimum() const
RNScalar R3MeshProperty::
Minimum(void) const
{
  // Compute minimum of property values
  if (minimum == RN_UNKNOWN) {
    R3MeshProperty *property = (R3MeshProperty *) this;
    property->minimum = 0;
    if (nvalues > 0) {
      property->minimum = FLT_MAX;
      for (int i = 0; i < nvalues; i++) {
        if (values[i] == RN_UNKNOWN) continue;
        if (values[i] < property->minimum) property->minimum = values[i];
      }
    }
  }

  // Return minimum
  return minimum;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movsd 0x428(%rax), %xmm0
movsd 0x128ed1(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d242
jp 0x6d242
movq -0x20(%rsp), %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x428(%rcx)
cmpl $0x0, 0x408(%rax)
jle 0x6d240
movq -0x10(%rsp), %rax
movsd 0x12abdd(%rip), %xmm0   # 0x197d70
movsd %xmm0, 0x428(%rax)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6d23e
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x128e4a(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d1e0
jp 0x6d1e0
jmp 0x6d22e
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x10(%rsp), %rax
movsd 0x428(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6d22c
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
movsd %xmm0, 0x428(%rax)
jmp 0x6d22e
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x6d1a3
jmp 0x6d240
jmp 0x6d242
movq -0x20(%rsp), %rax
movsd 0x428(%rax), %xmm0
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Maximum() const
RNScalar R3MeshProperty::
Maximum(void) const
{
  // Compute maximum of property values
  if (maximum == RN_UNKNOWN) {
    R3MeshProperty *property = (R3MeshProperty *) this;
    property->maximum = 0;
    if (nvalues > 0) {
      property->maximum = -FLT_MAX;
      for (int i = 0; i < nvalues; i++) {
        if (values[i] == RN_UNKNOWN) continue;
        if (values[i] > property->maximum) property->maximum = values[i];
      }
    }
  }

  // Return maximum
  return maximum;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movsd 0x430(%rax), %xmm0
movsd 0x128db1(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d35e
jp 0x6d35e
movq -0x20(%rsp), %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x430(%rcx)
cmpl $0x0, 0x408(%rax)
jle 0x6d35c
movq -0x10(%rsp), %rax
movsd 0x12aac5(%rip), %xmm0   # 0x197d78
movsd %xmm0, 0x430(%rax)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6d35a
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x128d2a(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d300
jp 0x6d300
jmp 0x6d34a
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
ucomisd 0x430(%rax), %xmm0
jbe 0x6d348
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
movsd %xmm0, 0x430(%rax)
jmp 0x6d34a
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x6d2c3
jmp 0x6d35c
jmp 0x6d35e
movq -0x20(%rsp), %rax
movsd 0x430(%rax), %xmm0
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::StandardDeviation() const
RNScalar R3MeshProperty::
StandardDeviation(void) const
{
  // Compute standard deviation of property values
  if (stddev == RN_UNKNOWN) {
    R3MeshProperty *property = (R3MeshProperty *) this;
    property->stddev = 0;
    if (nvalues > 0) {
      // Comute sum of squared residuals
      int count = 0;
      RNScalar ssd = 0;
      RNScalar avg = Mean();
      for (int i = 0; i < nvalues; i++) {
        if (values[i] == RN_UNKNOWN) continue;
        RNScalar delta = values[i] - avg;
        ssd += delta * delta;
        count++;
      }

      // Compute standard deviation
      if (count > 0) property->stddev = sqrt(ssd / count);
    }
  }

  // Return standard deviation
  return stddev;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x420(%rax), %xmm0
movsd 0x128c8d(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d4ba
jp 0x6d4ba
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x420(%rcx)
cmpl $0x0, 0x408(%rax)
jle 0x6d4b8
movq 0x8(%rsp), %rdi
movl $0x0, 0x34(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
callq 0x6d010
movsd %xmm0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6d48d
movq 0x8(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x128bfa(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d430
jp 0x6d430
jmp 0x6d47d
movq 0x8(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6d3f3
cmpl $0x0, 0x34(%rsp)
jle 0x6d4b6
movsd 0x28(%rsp), %xmm0
cvtsi2sdl 0x34(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x22760
movq 0x38(%rsp), %rax
movsd %xmm0, 0x420(%rax)
jmp 0x6d4b8
jmp 0x6d4ba
movq 0x8(%rsp), %rax
movsd 0x420(%rax), %xmm0
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Percentile(double) const
RNScalar R3MeshProperty::
Percentile(RNScalar percentile) const
{
  // Compute value at given percentile (100=max, 0=min)
  if (nvalues == 0) return 0;

  // Copy values
  int count = 0;
  RNScalar *copy = new RNScalar [ nvalues ];
  for (int i = 0; i < nvalues; i++) {
    if (values[i] == RN_UNKNOWN) continue;
    copy[count++] = values[i];
  }

  // Check count of values
  if (count == 0) return 0;

  // Compute value at given percentile
  qsort(copy, count, sizeof(RNScalar), RNCompareScalars);
  int index = (int) (count * percentile / 100.0);
  if (index >= count) index = count - 1;
  RNScalar result = copy[index];

  // Delete copy
  delete [] copy;

  // Return result
  return result;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x408(%rax)
jne 0x6d890
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x6d9e6
movq 0x8(%rsp), %rax
movl $0x0, 0x2c(%rsp)
movslq 0x408(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x22040
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6d948
movq 0x8(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x12871f(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6d90b
jp 0x6d90b
jmp 0x6d93b
movq 0x8(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x20(%rsp), %rax
movl 0x2c(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x2c(%rsp)
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6d8d2
cmpl $0x0, 0x2c(%rsp)
jne 0x6d95d
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x6d9e6
movq 0x20(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
movl $0x8, %edx
leaq 0x8cd5d(%rip), %rcx     # 0xfa6d0
callq 0x233f0
cvtsi2sdl 0x2c(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
movsd 0x12871c(%rip), %xmm1   # 0x1960a8
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jl 0x6d9ad
movl 0x2c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movslq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x6d9da
movq (%rsp), %rdi
callq 0x22d80
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Median() const
RNScalar R3MeshProperty::
Median(void) const
{
  // Compute mean of property values
  if (median == RN_UNKNOWN) {
    R3MeshProperty *property = (R3MeshProperty *) this;
    property->median = Percentile(50);
  }

  // Return median
  return median;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movsd 0x438(%rax), %xmm0
movsd 0x1285fe(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6da4d
jp 0x6da4d
movq (%rsp), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x12aa85(%rip), %xmm0   # 0x1984c0
callq 0x6d860
movq 0x8(%rsp), %rax
movsd %xmm0, 0x438(%rax)
movq (%rsp), %rax
movsd 0x438(%rax), %xmm0
addq $0x18, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::LocalMinimumCount() const
int R3MeshProperty::
LocalMinimumCount(void) const
{
  // Count values that are minima
  int count = 0;
  for (int i = 0; i < mesh->NVertices(); i++) 
    if (IsLocalMinimum(i)) count++;
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6dacf
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x71410
cmpl $0x0, %eax
je 0x6dac0
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6dac2
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x6da83
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::LocalMaximumCount() const
int R3MeshProperty::
LocalMaximumCount(void) const
{
  // Count values that are maxima
  int count = 0;
  for (int i = 0; i < mesh->NVertices(); i++) 
    if (IsLocalMaximum(i)) count++;
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6db4f
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x71450
cmpl $0x0, %eax
je 0x6db40
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6db42
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x6db03
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::NonZeroCount() const
int R3MeshProperty::
NonZeroCount(void) const
{
  // Count values that are non-zero
  int count = 0;
  for (int i = 0; i < mesh->NVertices(); i++) {
    if (values[i] == RN_UNKNOWN) continue;
    if (values[i] == 0) continue;
    count++;
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq (%rax), %rdi
callq 0x2abd0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x6dc08
movq 0x10(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x128460(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6dbca
jp 0x6dbca
jmp 0x6dbf8
movq 0x10(%rsp), %rax
movq 0x410(%rax), %rax
movslq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6dbed
jp 0x6dbed
jmp 0x6dbf8
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x6db83
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::L1Norm() const
RNScalar R3MeshProperty::
L1Norm(void) const
{
  // Compute sum 
  RNScalar sum = 0;
  for (int i = 0; i < nvalues; i++) {
    if (values[i] == RN_UNKNOWN) continue;
    sum += fabs(values[i]);
  }

  // Return sum
  return sum;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6dcb3
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x1283b1(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6dc79
jp 0x6dc79
jmp 0x6dca6
movq -0x20(%rsp), %rax
movq 0x410(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x1288aa(%rip), %xmm1   # 0x196540
pand %xmm1, %xmm0
addsd -0x10(%rsp), %xmm0
movsd %xmm0, -0x10(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x6dc40
movsd -0x10(%rsp), %xmm0
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::L2Norm() const
RNScalar R3MeshProperty::
L2Norm(void) const
{
  // Compute L2 norm of property values
  if (l2norm == RN_UNKNOWN) {
    R3MeshProperty *property = (R3MeshProperty *) this;
    property->l2norm = 0;
    if (nvalues > 0) {
      // Compute sum 
      RNScalar sum = 0;
      for (int i = 0; i < nvalues; i++) {
        if (values[i] == RN_UNKNOWN) continue;
        sum += values[i] * values[i];
      }

      // Compute l2norm
      property->l2norm = sqrt( sum );
    }
  }

  // Return l2norm
  return l2norm;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movsd 0x440(%rax), %xmm0
movsd 0x12833e(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6ddc1
jp 0x6ddc1
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x440(%rcx)
cmpl $0x0, 0x408(%rax)
jle 0x6ddbf
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6dda7
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x1282ca(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6dd60
jp 0x6dd60
jmp 0x6dd9a
movq (%rsp), %rax
movq 0x410(%rax), %rcx
movslq 0xc(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6dd29
movsd 0x10(%rsp), %xmm0
callq 0x22760
movq 0x18(%rsp), %rax
movsd %xmm0, 0x440(%rax)
jmp 0x6ddc1
movq (%rsp), %rax
movsd 0x440(%rax), %xmm0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Abs()
void R3MeshProperty::
Abs(void)
{
  // Replace every value by its absolute value
  for (int i = 0; i < nvalues; i++) {
    if (values[i] == RN_UNKNOWN) continue;
    values[i] = fabs(values[i]);
  }

  // Reset statistics
  ResetStatistics();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6de6f
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x1281f9(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6de31
jp 0x6de31
jmp 0x6de62
movq (%rsp), %rax
movq 0x410(%rax), %rcx
movslq 0xc(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movaps 0x1286f3(%rip), %xmm1   # 0x196540
pand %xmm1, %xmm0
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6ddfa
movq (%rsp), %rdi
callq 0x6c450
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Sqrt()
void R3MeshProperty::
Sqrt(void)
{
  // Replace every value by its sqrt
  for (int i = 0; i < nvalues; i++) {
    if (values[i] == RN_UNKNOWN) continue;
    if (values[i] >= 0) values[i] = sqrt(values[i]);
    else values[i] = -1.0 * sqrt( -values[i] );
  }

  // Reset statistics
  ResetStatistics();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x408(%rcx), %eax
jge 0x6df8e
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x128155(%rip), %xmm1   # 0x196020
ucomisd %xmm1, %xmm0
jne 0x6ded8
jp 0x6ded8
jmp 0x6df7e
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6df27
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x22760
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x6df7c
movq (%rsp), %rax
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x22760
movq (%rsp), %rax
movaps %xmm0, %xmm1
movsd 0x1280b9(%rip), %xmm0   # 0x196020
mulsd %xmm1, %xmm0
movq 0x410(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x6df7e
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6de9a
movq (%rsp), %rdi
callq 0x6c450
addq $0x18, %rsp
retq
nopl (%rax)