// File: tomfunkhouser[P]gaps/pkgs/RGBD/RGBDUtil.cpp
// Function: gaps::RGBDCreateNormalChannels(gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid&, gaps::R2Grid&, gaps::R2Grid&, gaps::R2Grid&, gaps::R3Point const&, gaps::R3Vector const&, gaps::R3Vector const&, double, int, int)
int RGBDCreateNormalChannels(const R2Grid& input_depth_image, 
  const R2Grid& input_px_image, const R2Grid& input_py_image, const R2Grid& input_pz_image,
  const R2Grid& input_boundary_image,
  R2Grid& output_nx_image, R2Grid& output_ny_image, R2Grid& output_nz_image, R2Grid& output_radius_image,
  const R3Point& viewpoint, const R3Vector& towards, const R3Vector& up,
  RNLength neighborhood_world_radius, int neighborhood_pixel_radius, RNBoolean neighborhood_search)
{
  // Create normal images
  R2Grid tx_image, ty_image, tz_image, r2_image;
  return RGBDCreateTangentChannels(input_depth_image, input_px_image, input_py_image, input_pz_image, input_boundary_image,
    output_nx_image, output_ny_image, output_nz_image, tx_image, ty_image, tz_image, output_radius_image, r2_image,
    viewpoint, towards, up, neighborhood_world_radius, neighborhood_pixel_radius, neighborhood_search);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movl 0x468(%rsp), %eax
movl 0x460(%rsp), %eax
movq 0x458(%rsp), %rax
movq 0x450(%rsp), %rax
movq 0x448(%rsp), %rax
movq 0x440(%rsp), %rax
movq 0x438(%rsp), %rax
movq 0x430(%rsp), %rax
movq %rdi, 0x3f0(%rsp)
movq %rsi, 0x3e8(%rsp)
movq %rdx, 0x3e0(%rsp)
movq %rcx, 0x3d8(%rsp)
movq %r8, 0x3d0(%rsp)
movq %r9, 0x3c8(%rsp)
movsd %xmm0, 0x3c0(%rsp)
leaq 0x2f0(%rsp), %rdi
xorl %edx, %edx
movl %edx, 0x6c(%rsp)
movl %edx, %esi
callq 0xb1ee0
movl 0x6c(%rsp), %edx
leaq 0x220(%rsp), %rdi
movl %edx, %esi
callq 0xb1ee0
jmp 0x31222
leaq 0x140(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xb1ee0
jmp 0x31235
leaq 0x70(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xb1ee0
jmp 0x31245
movq 0x3f0(%rsp), %rdi
movq 0x3e8(%rsp), %rsi
movq 0x3e0(%rsp), %rdx
movq 0x3d8(%rsp), %rcx
movq 0x3d0(%rsp), %r8
movq 0x3c8(%rsp), %r9
movq 0x430(%rsp), %r10
movq 0x438(%rsp), %r11
movq 0x440(%rsp), %rbx
movq 0x448(%rsp), %r14
movq 0x450(%rsp), %r15
movq 0x458(%rsp), %r12
movsd 0x3c0(%rsp), %xmm0
movl 0x460(%rsp), %ebp
movl 0x468(%rsp), %r13d
movq %rsp, %rax
movq %rax, 0x60(%rsp)
movl %r13d, 0x58(%rax)
movl %ebp, 0x50(%rax)
movq %r12, 0x48(%rax)
movq %r15, 0x40(%rax)
movq %r14, 0x38(%rax)
leaq 0x70(%rsp), %r14
movq %r14, 0x30(%rax)
movq %rbx, 0x28(%rax)
leaq 0x140(%rsp), %rbx
movq %rbx, 0x20(%rax)
leaq 0x220(%rsp), %rbx
movq %rbx, 0x18(%rax)
leaq 0x2f0(%rsp), %rbx
movq %rbx, 0x10(%rax)
movq %r11, 0x8(%rax)
movq %r10, (%rax)
callq 0x31dd0
movl %eax, 0x68(%rsp)
jmp 0x3131b
leaq 0x70(%rsp), %rdi
callq 0xb3390
leaq 0x140(%rsp), %rdi
callq 0xb3390
leaq 0x220(%rsp), %rdi
callq 0xb3390
leaq 0x2f0(%rsp), %rdi
callq 0xb3390
movl 0x68(%rsp), %eax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x313dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x313cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x313c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xb3390
leaq 0x140(%rsp), %rdi
callq 0xb3390
leaq 0x220(%rsp), %rdi
callq 0xb3390
leaq 0x2f0(%rsp), %rdi
callq 0xb3390
movq 0x218(%rsp), %rdi
callq 0x12c20
nopw %cs:(%rax,%rax)