// File: tomfunkhouser[P]gaps/apps/sflprocess/sflprocess.cpp
// Function: Transform(gaps::R3SurfelScene*, gaps::R3Affine const&)
static int
Transform(R3SurfelScene *scene, const R3Affine& transformation)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Transform scene
  // (actually change xyz of surfels, not just update scene transformation)
  scene->Transform(transformation, TRUE);

  // Print statistics
  if (print_verbose) {
    const R4Matrix& m = transformation.Matrix();
    printf("Tranformed scene ...\n");
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  Matrix = %12.6f %12.6f %12.6f %12.6f\n", m[0][0], m[0][1], m[0][2], m[0][3]); 
    printf("           %12.6f %12.6f %12.6f %12.6f\n", m[1][0], m[1][1], m[1][2], m[1][3]); 
    printf("           %12.6f %12.6f %12.6f %12.6f\n", m[2][0], m[2][1], m[2][2], m[2][3]); 
    printf("           %12.6f %12.6f %12.6f %12.6f\n", m[3][0], m[3][1], m[3][2], m[3][3]); 
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x16dd30
leaq 0x68(%rsp), %rdi
callq 0x263f0
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
movl $0x1, %edx
callq 0x717a0
cmpl $0x0, 0x241d5a(%rip)    # 0x2647c0
je 0x22ca6
movq 0x78(%rsp), %rdi
callq 0x276c0
movq %rax, 0x60(%rsp)
leaq 0x1d6186(%rip), %rdi    # 0x1f8c08
movb $0x0, %al
callq 0x16090
leaq 0x68(%rsp), %rdi
callq 0x16ddf0
leaq 0x1d5ae5(%rip), %rdi    # 0x1f857f
movb $0x1, %al
callq 0x16090
movq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x29c10
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x29c10
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x29c10
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x29c10
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movsd 0x18(%rax), %xmm3
leaq 0x1d6111(%rip), %rdi    # 0x1f8c1e
movb $0x4, %al
callq 0x16090
movq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x29c10
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x29c10
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x29c10
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x29c10
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movsd 0x18(%rax), %xmm3
leaq 0x1d60b8(%rip), %rdi    # 0x1f8c46
movb $0x4, %al
callq 0x16090
movq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x29c10
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x29c10
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x29c10
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x29c10
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
movsd 0x18(%rax), %xmm3
leaq 0x1d6037(%rip), %rdi    # 0x1f8c46
movb $0x4, %al
callq 0x16090
movq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0x29c10
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0x29c10
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0x29c10
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0x29c10
movsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movsd 0x18(%rax), %xmm3
leaq 0x1d5fb6(%rip), %rdi    # 0x1f8c46
movb $0x4, %al
callq 0x16090
movq 0x2382f2(%rip), %rax    # 0x25af90
movq (%rax), %rdi
callq 0x168c0
movl $0x1, %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)