// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDUtil.cpp
// Function: gaps::RGBDCreateNormalChannels(gaps::RGBDImage*, gaps::R2Grid&, gaps::R2Grid&, gaps::R2Grid&, double, int, int, int)
int RGBDCreateNormalChannels(RGBDImage *image,
  R2Grid& output_nx_image, R2Grid& output_ny_image, R2Grid& output_nz_image,
  RNLength neighborhood_world_radius, int neighborhood_pixel_radius, RNBoolean neighborhood_search,
  RNBoolean world_coordinates)
{
  R2Grid boundary_image, px_image, py_image, pz_image, radius_image;
  if (!RGBDCreateBoundaryChannel(image, boundary_image)) return 0;
  if (!RGBDCreatePositionChannels(image, px_image, py_image, pz_image, world_coordinates)) return 0;
  return RGBDCreateNormalChannels(*(image->DepthChannel()),
    px_image, py_image, pz_image, boundary_image,
    output_nx_image, output_ny_image, output_nz_image, radius_image,
    image->WorldViewpoint(), image->WorldTowards(), image->WorldUp(),
    neighborhood_world_radius, neighborhood_pixel_radius, neighborhood_search);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movl %r9d, %r12d
movl %r8d, %r15d
movsd %xmm0, 0x28(%rsp)
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x2e8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x57e7c
leaq 0x218(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x57e7c
leaq 0x148(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x57e7c
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x57e7c
leaq 0x3b8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x57e7c
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movq %r14, 0x20(%rsp)
leaq 0x2e8(%rsp), %rsi
movsd 0x88211(%rip), %xmm0    # 0xa8030
movq %rbp, %rdi
callq 0x1ff98
movl 0x4c0(%rsp), %r8d
leaq 0x218(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x78(%rsp), %rcx
movq %rbp, %rdi
callq 0x1fb4c
movq %rbx, %r13
cmpl $0x4, 0x24(%rbp)
jl 0x1fe5f
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rbx
jmp 0x1fe61
xorl %ebx, %ebx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x155fc
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x15686
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x197a6
leaq 0x218(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x78(%rsp), %rcx
leaq 0x2e8(%rsp), %r8
movq %rbx, %rdi
movq 0x8(%rsp), %r9
movsd 0x28(%rsp), %xmm0
pushq 0x10(%rsp)
pushq 0x20(%rsp)
pushq %r12
pushq %r15
pushq %r14
leaq 0x3e0(%rsp), %rax
pushq %rax
pushq 0x50(%rsp)
pushq %r13
callq 0x1ffab
addq $0x40, %rsp
leaq 0x3b8(%rsp), %rdi
callq 0x589c0
leaq 0x78(%rsp), %rdi
callq 0x589c0
leaq 0x148(%rsp), %rdi
callq 0x589c0
leaq 0x218(%rsp), %rdi
callq 0x589c0
leaq 0x2e8(%rsp), %rdi
callq 0x589c0
pushq $0x1
popq %rax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ff4f
jmp 0x1ff4f
movq %rax, %rbx
jmp 0x1ff5f
movq %rax, %rbx
jmp 0x1ff69
movq %rax, %rbx
jmp 0x1ff76
movq %rax, %rbx
jmp 0x1ff83
jmp 0x1ff4f
movq %rax, %rbx
leaq 0x3b8(%rsp), %rdi
callq 0x589c0
leaq 0x78(%rsp), %rdi
callq 0x589c0
leaq 0x148(%rsp), %rdi
callq 0x589c0
leaq 0x218(%rsp), %rdi
callq 0x589c0
leaq 0x2e8(%rsp), %rdi
callq 0x589c0
movq %rbx, %rdi
callq 0x11a80