// File: /workspace/github_cpp_makefile_star2_O3/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 0x5f630
leaq 0x208(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f630
leaq 0x138(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f630
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f630
leaq 0x3a8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f630
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x2d8(%rsp), %rsi
movsd 0x9997b(%rip), %xmm0    # 0xbb008
callq 0x219d9
movl 0x4b0(%rsp), %r8d
leaq 0x208(%rsp), %rsi
leaq 0x138(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %rbp, %rdi
callq 0x21398
movq %r15, %r13
cmpl $0x4, 0x24(%rbp)
movq %rbx, (%rsp)
jl 0x216ce
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rbx
jmp 0x216d0
xorl %ebx, %ebx
addq $0x38, %rbp
leaq 0xe44c5(%rip), %rdx     # 0x105ba0
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x49ffa
leaq 0x9b8f9(%rip), %rdx     # 0xbcfe8
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x49f82
leaq 0x9b882(%rip), %rdx     # 0xbcf88
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x49f82
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 0x21836
addq $0x40, %rsp
leaq 0x3a8(%rsp), %rdi
callq 0x60264
leaq 0x68(%rsp), %rdi
callq 0x60264
leaq 0x138(%rsp), %rdi
callq 0x60264
leaq 0x208(%rsp), %rdi
callq 0x60264
leaq 0x2d8(%rsp), %rdi
callq 0x60264
movl $0x1, %eax
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x217d8
jmp 0x217d8
movq %rax, %rbx
jmp 0x217e8
movq %rax, %rbx
jmp 0x217f2
movq %rax, %rbx
jmp 0x217ff
movq %rax, %rbx
jmp 0x2180c
jmp 0x217d8
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x60264
leaq 0x68(%rsp), %rdi
callq 0x60264
leaq 0x138(%rsp), %rdi
callq 0x60264
leaq 0x208(%rsp), %rdi
callq 0x60264
leaq 0x2d8(%rsp), %rdi
callq 0x60264
movq %rbx, %rdi
callq 0x11a60