// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/prp2prp/prp2prp.cpp
// Function: ReadProperties(gaps::R3Mesh*, char const*)
static R3MeshPropertySet *
ReadProperties(R3Mesh *mesh, const char *filename)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Allocate properties
  R3MeshPropertySet *properties = new R3MeshPropertySet(mesh);
  if (!properties) {
    RNFail("Unable to allocate properties for %s\n", filename);
    return NULL;
  }

  // Read properties from file
  if (!properties->Read(filename)) {
    delete properties;
    return NULL;
  }

  // Print statistics
  if (print_verbose) {
    printf("Read properties from %s ...\n", filename);
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Properties = %d\n", properties->NProperties());
    printf("  # Vertices = %d\n", properties->Mesh()->NVertices());
    fflush(stdout);
  }

  // Print more statistics
  if (print_debug) {
    printf("\n");
    for (int i = 0; i < properties->NProperties(); i++) {
      R3MeshProperty *property = properties->Property(i);
      printf("  Property %d %s\n", i, property->Name());
      printf("    Minimum = %g\n", property->Minimum());
      printf("    Maximum = %g\n", property->Maximum());
      printf("    Median = %g\n", property->Median());
      printf("    Mean = %g\n", property->Mean());
      printf("    # Minima = %d\n", property->LocalMinimumCount());
      printf("    # Maxima = %d\n", property->LocalMaximumCount());
      printf("    L1Norm = %g\n", property->L1Norm());
      printf("    L2Norm = %g\n", property->L2Norm());
      printf("\n");
    }
  }

  // Return property set
  return properties;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x54c4c
movq %rbx, %rdi
xorl %esi, %esi
callq 0xc5d0
movl $0x18, %edi
callq 0xc390
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x104e4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x107d2
testl %eax, %eax
je 0xf863
cmpb $0x1, 0x6e3cc(%rip)     # 0x7dab8
jne 0xf74b
leaq 0x48a2a(%rip), %rdi     # 0x5811f
movq %r14, %rsi
xorl %eax, %eax
callq 0xc070
leaq 0x8(%rsp), %rdi
callq 0x54cae
leaq 0x489c5(%rip), %rdi     # 0x580d5
movb $0x1, %al
callq 0xc070
movl 0x14(%rbx), %esi
leaq 0x48a1b(%rip), %rdi     # 0x5813c
xorl %eax, %eax
callq 0xc070
movq (%rbx), %rax
movl 0x14(%rax), %esi
leaq 0x489d7(%rip), %rdi     # 0x5810c
xorl %eax, %eax
callq 0xc070
movq 0x6d845(%rip), %rax     # 0x7cf88
movq (%rax), %rdi
callq 0xc440
cmpb $0x1, 0x6e36a(%rip)     # 0x7dabc
jne 0xf87a
movl $0xa, %edi
callq 0xc4f0
cmpl $0x0, 0x14(%rbx)
jle 0xf87a
leaq 0x48a47(%rip), %r15     # 0x581ba
leaq 0x48a53(%rip), %r12     # 0x581cd
leaq 0x48a5d(%rip), %r13     # 0x581de
xorl %ebp, %ebp
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x8(%r14), %rdx
leaq 0x489bb(%rip), %rdi     # 0x58151
movl %ebp, %esi
xorl %eax, %eax
callq 0xc070
movq %r14, %rdi
callq 0x126bc
leaq 0x489b5(%rip), %rdi     # 0x58163
movb $0x1, %al
callq 0xc070
movq %r14, %rdi
callq 0x12742
leaq 0x489b1(%rip), %rdi     # 0x58175
movb $0x1, %al
callq 0xc070
movq %r14, %rdi
callq 0x12b68
leaq 0x489ad(%rip), %rdi     # 0x58187
movb $0x1, %al
callq 0xc070
movq %r14, %rdi
callq 0x1262c
leaq 0x489a8(%rip), %rdi     # 0x58198
movb $0x1, %al
callq 0xc070
movq %r14, %rdi
callq 0x12ba2
leaq 0x489a1(%rip), %rdi     # 0x581a7
movl %eax, %esi
xorl %eax, %eax
callq 0xc070
movq %r14, %rdi
callq 0x12bec
movq %r15, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0xc070
movq %r14, %rdi
callq 0x12c82
movq %r12, %rdi
movb $0x1, %al
callq 0xc070
movq %r14, %rdi
callq 0x12ce2
movq %r13, %rdi
movb $0x1, %al
callq 0xc070
movl $0xa, %edi
callq 0xc4f0
incq %rbp
movslq 0x14(%rbx), %rax
cmpq %rax, %rbp
jl 0xf783
jmp 0xf87a
movq %rbx, %rdi
callq 0x10598
movl $0x18, %esi
movq %rbx, %rdi
callq 0xc3a0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0xc3a0
movq %r14, %rdi
callq 0xc650