// File: /workspace/github_cpp_makefile_star2_O1/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 $0x478, %rsp            # imm = 0x478
movl %r9d, %r12d
movl %r8d, %r15d
movsd %xmm0, 0x18(%rsp)
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x2d8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x603d0
leaq 0x208(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x603d0
leaq 0x138(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x603d0
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x603d0
leaq 0x3a8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x603d0
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x2d8(%rsp), %rsi
movsd 0x9b6cd(%rip), %xmm0    # 0xbd008
callq 0x21c87
movl 0x4b0(%rsp), %r8d
leaq 0x208(%rsp), %rsi
leaq 0x138(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %rbp, %rdi
callq 0x21650
movq %r15, %r13
cmpl $0x4, 0x24(%rbp)
movq %rbx, (%rsp)
jl 0x2197c
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rbx
jmp 0x2197e
xorl %ebx, %ebx
addq $0x38, %rbp
leaq 0xe6227(%rip), %rdx     # 0x107bb0
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x4a83e
leaq 0x9d64b(%rip), %rdx     # 0xbefe8
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x4a7c6
leaq 0x9d5d4(%rip), %rdx     # 0xbef88
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4a7c6
leaq 0x208(%rsp), %rsi
leaq 0x138(%rsp), %rdx
leaq 0x68(%rsp), %rcx
leaq 0x2d8(%rsp), %r8
movq %rbx, %rdi
movq 0x8(%rsp), %r9
movsd 0x18(%rsp), %xmm0
pushq 0x10(%rsp)
pushq %r13
pushq %r12
pushq %r15
leaq 0x40(%rsp), %rax
pushq %rax
leaq 0x3d0(%rsp), %rax
pushq %rax
pushq %r14
pushq 0x38(%rsp)
callq 0x21ae4
addq $0x40, %rsp
leaq 0x3a8(%rsp), %rdi
callq 0x60ff0
leaq 0x68(%rsp), %rdi
callq 0x60ff0
leaq 0x138(%rsp), %rdi
callq 0x60ff0
leaq 0x208(%rsp), %rdi
callq 0x60ff0
leaq 0x2d8(%rsp), %rdi
callq 0x60ff0
movl $0x1, %eax
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21a86
jmp 0x21a86
movq %rax, %rbx
jmp 0x21a96
movq %rax, %rbx
jmp 0x21aa0
movq %rax, %rbx
jmp 0x21aad
movq %rax, %rbx
jmp 0x21aba
jmp 0x21a86
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x60ff0
leaq 0x68(%rsp), %rdi
callq 0x60ff0
leaq 0x138(%rsp), %rdi
callq 0x60ff0
leaq 0x208(%rsp), %rdi
callq 0x60ff0
leaq 0x2d8(%rsp), %rdi
callq 0x60ff0
movq %rbx, %rdi
callq 0x11a70