// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/scn2cam/scn2cam.cpp
// Function: WriteCameras()
static int
WriteCameras(void)
{
  // Write cameras 
  if (output_cameras_filename) {
    if (!WriteCameras(output_cameras_filename)) exit(-1);
  }
  
  // Write camera extrinsics 
  if (output_camera_extrinsics_filename) {
    if (!WriteCameraExtrinsics(output_camera_extrinsics_filename)) exit(-1);
  }
  
  // Write camera intrinsics 
  if (output_camera_intrinsics_filename) {
    if (!WriteCameraIntrinsics(output_camera_intrinsics_filename)) exit(-1);
  }

  // Write camera names 
  if (output_camera_names_filename) {
    if (!WriteCameraNames(output_camera_names_filename)) exit(-1);
  }

  // Write node names
  if (output_nodes_filename) {
    if (!WriteNodeNames(output_nodes_filename)) exit(-1);
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq 0x136a3b(%rip), %rbx    # 0x1618e0
testq %rbx, %rbx
je 0x2b019
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
callq 0x9e61c
movq %r14, %rdi
xorl %esi, %esi
callq 0x22f90
leaq 0xcadeb(%rip), %rsi     # 0xf5cba
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2b4ca
movq %rax, %r14
cmpl $0x0, 0x13695d(%rip)    # 0x16184c
jle 0x2afb7
xorl %r15d, %r15d
leaq 0x48(%rsp), %r12
leaq 0x60(%rsp), %r13
leaq 0xc784f(%rip), %rbp     # 0xf2758
movq 0x136930(%rip), %rax    # 0x161840
movq (%rax,%r15,8), %rbx
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x7d006
leaq 0x48(%rbx), %rsi
movq %r12, %rdi
callq 0x7e6c4
leaq 0x30(%rbx), %rsi
movq %r13, %rdi
callq 0x7da9a
movsd 0x78(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
movsd 0x48(%rsp), %xmm3
movsd 0x50(%rsp), %xmm4
movsd 0x58(%rsp), %xmm5
movsd 0x60(%rsp), %xmm6
movsd 0x68(%rsp), %xmm7
movsd 0x70(%rsp), %xmm8
movups 0x60(%rbx), %xmm9
movsd 0x80(%rbx), %xmm10
movsd %xmm10, 0x18(%rsp)
movups %xmm9, 0x8(%rsp)
movsd %xmm8, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movb $0x8, %al
callq 0x22d50
incq %r15
movslq 0x13689e(%rip), %rax    # 0x16184c
cmpq %rax, %r15
jl 0x2af09
movq %r14, %rdi
callq 0x22880
cmpb $0x0, 0x1368b2(%rip)    # 0x161878
je 0x2b019
leaq 0xc77b2(%rip), %rdi     # 0xf2781
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x22080
leaq 0xf8(%rsp), %rdi
callq 0x9e67e
leaq 0xc748f(%rip), %rdi     # 0xf247e
movb $0x1, %al
callq 0x22080
movl 0x136850(%rip), %esi    # 0x16184c
leaq 0xc7540(%rip), %rdi     # 0xf2543
xorl %eax, %eax
callq 0x22080
movq 0x130f0f(%rip), %rax    # 0x15bf20
movq (%rax), %rdi
callq 0x22a60
movq 0x136860(%rip), %rbx    # 0x161880
testq %rbx, %rbx
je 0x2b169
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x9e61c
movq %r14, %rdi
xorl %esi, %esi
callq 0x22f90
leaq 0xcac73(%rip), %rsi     # 0xf5cba
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2b4d8
movq %rax, %r14
cmpl $0x0, 0x1367ea(%rip)    # 0x16184c
jle 0x2b10c
xorl %r13d, %r13d
leaq 0x78(%rsp), %r15
leaq 0xc774d(%rip), %r12     # 0xf27c4
movq 0x1367c2(%rip), %rax    # 0x161840
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
callq 0x77d82
movsd 0x78(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
movsd 0x90(%rsp), %xmm3
movsd 0x98(%rsp), %xmm4
movsd 0xa0(%rsp), %xmm5
movsd 0xa8(%rsp), %xmm6
movsd 0xb0(%rsp), %xmm7
movups 0xb8(%rsp), %xmm8
movups 0xc8(%rsp), %xmm9
movups %xmm9, 0x10(%rsp)
movups %xmm8, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
movb $0x8, %al
callq 0x22d50
incq %r13
movslq 0x136749(%rip), %rax    # 0x16184c
cmpq %rax, %r13
jl 0x2b077
movq %r14, %rdi
callq 0x22880
cmpb $0x0, 0x13675d(%rip)    # 0x161878
je 0x2b169
leaq 0xc76c8(%rip), %rdi     # 0xf27ec
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x48(%rsp), %rdi
callq 0x9e67e
leaq 0xc733f(%rip), %rdi     # 0xf247e
movb $0x1, %al
callq 0x22080
movl 0x136700(%rip), %esi    # 0x16184c
leaq 0xc73f0(%rip), %rdi     # 0xf2543
xorl %eax, %eax
callq 0x22080
movq 0x130dbf(%rip), %rax    # 0x15bf20
movq (%rax), %rdi
callq 0x22a60
movq 0x136718(%rip), %rbx    # 0x161888
testq %rbx, %rbx
je 0x2b2e0
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x9e61c
movq %r14, %rdi
xorl %esi, %esi
callq 0x22f90
leaq 0xcab23(%rip), %rsi     # 0xf5cba
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2b4e1
movq %rax, %r14
cmpl $0x0, 0x13669a(%rip)    # 0x16184c
jle 0x2b297
xorps %xmm0, %xmm0
cvtsi2sdl 0x1317b1(%rip), %xmm0 # 0x15c974
movsd 0xc6e3d(%rip), %xmm1    # 0xf2008
xorps %xmm2, %xmm2
cvtsi2sdl 0x1317a2(%rip), %xmm2 # 0x15c978
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
mulsd %xmm1, %xmm2
movsd %xmm2, 0x30(%rsp)
xorl %r12d, %r12d
leaq 0xc7645(%rip), %r15     # 0xf2839
movq 0x136645(%rip), %rax    # 0x161840
movq (%rax,%r12,8), %r13
xorps %xmm1, %xmm1
cvtsi2sdl 0x13176a(%rip), %xmm1 # 0x15c974
movsd 0xc6df6(%rip), %xmm0    # 0xf2008
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd 0x60(%r13), %xmm0
callq 0x22490
movsd 0x28(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x131736(%rip), %xmm0 # 0x15c978
mulsd 0xc6dbe(%rip), %xmm0    # 0xf2008
movsd %xmm0, 0x40(%rsp)
movsd 0x68(%r13), %xmm0
callq 0x22490
movsd 0x40(%rsp), %xmm2
divsd %xmm0, %xmm2
movq %r14, %rdi
movq %r15, %rsi
movsd 0x28(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x30(%rsp), %xmm3
movb $0x4, %al
callq 0x22d50
incq %r12
movslq 0x1365be(%rip), %rax    # 0x16184c
cmpq %rax, %r12
jl 0x2b1f4
movq %r14, %rdi
callq 0x22880
cmpb $0x0, 0x1365d2(%rip)    # 0x161878
je 0x2b2e0
leaq 0xc75a4(%rip), %rdi     # 0xf2853
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x9e67e
leaq 0xc71b4(%rip), %rdi     # 0xf247e
movb $0x1, %al
callq 0x22080
movq 0x130c48(%rip), %rax    # 0x15bf20
movq (%rax), %rdi
callq 0x22a60
movq 0x1365a9(%rip), %rbx    # 0x161890
testq %rbx, %rbx
je 0x2b3be
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x9e61c
movq %r14, %rdi
xorl %esi, %esi
callq 0x22f90
leaq 0xca9ac(%rip), %rsi     # 0xf5cba
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2b4ea
movq %rax, %r14
cmpl $0x0, 0x136523(%rip)    # 0x16184c
jle 0x2b375
leaq 0xc72f2(%rip), %r12     # 0xf2624
leaq 0xcaaba(%rip), %r15     # 0xf5df3
xorl %r13d, %r13d
movq 0x1364fd(%rip), %rax    # 0x161840
movq (%rax,%r13,8), %rax
movq 0x90(%rax), %rax
movq %r12, %rdx
testq %rax, %rax
je 0x2b359
movq %rax, %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d50
incq %r13
movslq 0x1364dc(%rip), %rax    # 0x16184c
cmpq %rax, %r13
jl 0x2b33c
movq %r14, %rdi
callq 0x22880
cmpb $0x0, 0x1364f4(%rip)    # 0x161878
je 0x2b3be
leaq 0xc750e(%rip), %rdi     # 0xf289b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x9e67e
leaq 0xc70d6(%rip), %rdi     # 0xf247e
movb $0x1, %al
callq 0x22080
movq 0x130b6a(%rip), %rax    # 0x15bf20
movq (%rax), %rdi
callq 0x22a60
movq 0x1364d3(%rip), %rbx    # 0x161898
testq %rbx, %rbx
je 0x2b4b8
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x9e61c
movq %r14, %rdi
xorl %esi, %esi
callq 0x22f90
leaq 0xca8ce(%rip), %rsi     # 0xf5cba
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2b4f3
movq %rax, %r14
movq 0x1364e1(%rip), %rax    # 0x1618e8
cmpl $0x0, 0x14(%rax)
jle 0x2b457
leaq 0xc7210(%rip), %r13     # 0xf2624
leaq 0xc74c0(%rip), %r15     # 0xf28db
xorl %r12d, %r12d
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x1a0(%rax), %rcx
testq %rcx, %rcx
cmoveq %r13, %rcx
incq %r12
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x22d50
movq 0x13649a(%rip), %rax    # 0x1618e8
movslq 0x14(%rax), %rcx
cmpq %rcx, %r12
jl 0x2b41e
movq %r14, %rdi
callq 0x22880
cmpb $0x0, 0x136412(%rip)    # 0x161878
je 0x2b4b8
leaq 0xc7473(%rip), %rdi     # 0xf28e2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x9e67e
leaq 0xc6ff4(%rip), %rdi     # 0xf247e
movb $0x1, %al
callq 0x22080
movq 0x136450(%rip), %rax    # 0x1618e8
movl 0x14(%rax), %esi
leaq 0xc6ff3(%rip), %rdi     # 0xf2495
xorl %eax, %eax
callq 0x22080
movq 0x130a70(%rip), %rax    # 0x15bf20
movq (%rax), %rdi
callq 0x22a60
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc7038(%rip), %rdi     # 0xf2509
movq 0x28(%rsp), %rsi
jmp 0x2b4fd
leaq 0xc72bb(%rip), %rdi     # 0xf279a
jmp 0x2b4fa
leaq 0xc7327(%rip), %rdi     # 0xf280f
jmp 0x2b4fa
leaq 0xc7385(%rip), %rdi     # 0xf2876
jmp 0x2b4fa
leaq 0xc73bf(%rip), %rdi     # 0xf28b9
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa172a
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22ac0