// File: /workspace/github_cpp_makefile_star2_O2/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 0x126d97(%rip), %rbx    # 0x150900
testq %rbx, %rbx
je 0x29cd3
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
callq 0x911fe
movq %r14, %rdi
callq 0x2b2ee
leaq 0xb40a9(%rip), %rsi     # 0xddc3a
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2a152
movq %rax, %r14
xorl %r15d, %r15d
leaq 0x48(%rsp), %r12
leaq 0x60(%rsp), %r13
leaq 0xb0b9a(%rip), %rbp     # 0xda758
movslq 0x126ca7(%rip), %rax    # 0x15086c
cmpq %rax, %r15
jge 0x29c71
movq 0x126c8b(%rip), %rax    # 0x150860
movq (%rax,%r15,8), %rbx
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x72a70
leaq 0x48(%rbx), %rsi
movq %r12, %rdi
callq 0x73b86
leaq 0x30(%rbx), %rsi
movq %r13, %rdi
callq 0x73230
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 0x22d70
incq %r15
jmp 0x29bbe
movq %r14, %rdi
callq 0x22890
cmpb $0x0, 0x126c18(%rip)    # 0x150898
je 0x29cd3
leaq 0xb0af8(%rip), %rdi     # 0xda781
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x22080
leaq 0xf8(%rsp), %rdi
callq 0x91238
leaq 0xb07d5(%rip), %rdi     # 0xda47e
movb $0x1, %al
callq 0x22080
movl 0x126bb6(%rip), %esi    # 0x15086c
leaq 0xb0886(%rip), %rdi     # 0xda543
xorl %eax, %eax
callq 0x22080
movq 0x121275(%rip), %rax    # 0x14af40
movq (%rax), %rdi
callq 0x22a60
movq 0x126bc6(%rip), %rbx    # 0x1508a0
testq %rbx, %rbx
je 0x29e19
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x911fe
movq %r14, %rdi
callq 0x2b2ee
leaq 0xb3f3b(%rip), %rsi     # 0xddc3a
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2a160
movq %rax, %r14
xorl %r13d, %r13d
leaq 0x78(%rsp), %r15
leaq 0xb0aa2(%rip), %r12     # 0xda7c4
movslq 0x126b43(%rip), %rax    # 0x15086c
cmpq %rax, %r13
jge 0x29dbc
movq 0x126b27(%rip), %rax    # 0x150860
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
callq 0x6e148
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 0x22d70
incq %r13
jmp 0x29d22
movq %r14, %rdi
callq 0x22890
cmpb $0x0, 0x126acd(%rip)    # 0x150898
je 0x29e19
leaq 0xb0a18(%rip), %rdi     # 0xda7ec
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x48(%rsp), %rdi
callq 0x91238
leaq 0xb068f(%rip), %rdi     # 0xda47e
movb $0x1, %al
callq 0x22080
movl 0x126a70(%rip), %esi    # 0x15086c
leaq 0xb0740(%rip), %rdi     # 0xda543
xorl %eax, %eax
callq 0x22080
movq 0x12112f(%rip), %rax    # 0x14af40
movq (%rax), %rdi
callq 0x22a60
movq 0x126a88(%rip), %rbx    # 0x1508a8
testq %rbx, %rbx
je 0x29f7a
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x911fe
movq %r14, %rdi
callq 0x2b2ee
leaq 0xb3df5(%rip), %rsi     # 0xddc3a
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2a169
movq %rax, %r14
cvtsi2sdl 0x121b33(%rip), %xmm0 # 0x14b994
movsd 0xb019f(%rip), %xmm1    # 0xda008
cvtsi2sdl 0x121b27(%rip), %xmm2 # 0x14b998
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
mulsd %xmm1, %xmm2
movsd %xmm2, 0x30(%rsp)
xorl %r12d, %r12d
leaq 0xb09aa(%rip), %r15     # 0xda839
movslq 0x1269d6(%rip), %rax    # 0x15086c
cmpq %rax, %r12
jge 0x29f31
movq 0x1269ba(%rip), %rax    # 0x150860
movq (%rax,%r12,8), %r13
cvtsi2sdl 0x121ae2(%rip), %xmm1 # 0x14b994
movsd 0xb014e(%rip), %xmm0    # 0xda008
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd 0x60(%r13), %xmm0
callq 0x22490
movsd 0x28(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
cvtsi2sdl 0x121ab1(%rip), %xmm0 # 0x14b998
mulsd 0xb0119(%rip), %xmm0    # 0xda008
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 0x22d70
incq %r12
jmp 0x29e8f
movq %r14, %rdi
callq 0x22890
cmpb $0x0, 0x126958(%rip)    # 0x150898
je 0x29f7a
leaq 0xb090a(%rip), %rdi     # 0xda853
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x91238
leaq 0xb051a(%rip), %rdi     # 0xda47e
movb $0x1, %al
callq 0x22080
movq 0x120fce(%rip), %rax    # 0x14af40
movq (%rax), %rdi
callq 0x22a60
movq 0x12692f(%rip), %rbx    # 0x1508b0
testq %rbx, %rbx
je 0x2a04f
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x911fe
movq %r14, %rdi
callq 0x2b2ee
leaq 0xb3c94(%rip), %rsi     # 0xddc3a
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2a172
movq %rax, %r14
leaq 0xb0663(%rip), %r12     # 0xda624
leaq 0xb3dab(%rip), %r15     # 0xddd73
xorl %r13d, %r13d
movslq 0x12689a(%rip), %rax    # 0x15086c
cmpq %rax, %r13
jge 0x2a006
movq 0x126882(%rip), %rax    # 0x150860
movq (%rax,%r13,8), %rax
movq 0x90(%rax), %rax
movq %r12, %rdx
testq %rax, %rax
je 0x29ff4
movq %rax, %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d70
incq %r13
jmp 0x29fcb
movq %r14, %rdi
callq 0x22890
cmpb $0x0, 0x126883(%rip)    # 0x150898
je 0x2a04f
leaq 0xb087d(%rip), %rdi     # 0xda89b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x91238
leaq 0xb0445(%rip), %rdi     # 0xda47e
movb $0x1, %al
callq 0x22080
movq 0x120ef9(%rip), %rax    # 0x14af40
movq (%rax), %rdi
callq 0x22a60
movq 0x126862(%rip), %rbx    # 0x1508b8
testq %rbx, %rbx
je 0x2a140
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x911fe
movq %r14, %rdi
callq 0x2b2ee
leaq 0xb3bbf(%rip), %rsi     # 0xddc3a
movq %rbx, %rdi
callq 0x22a70
testq %rax, %rax
je 0x2a17b
movq %rax, %r14
leaq 0xb058e(%rip), %r13     # 0xda624
leaq 0xb083e(%rip), %r15     # 0xda8db
xorl %r12d, %r12d
movq 0x126861(%rip), %rax    # 0x150908
movslq 0x14(%rax), %rcx
cmpq %rcx, %r12
jge 0x2a0df
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x1a0(%rax), %rax
movq %r13, %rcx
testq %rax, %rax
je 0x2a0ca
movq %rax, %rcx
incq %r12
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x22d70
jmp 0x2a0a0
movq %r14, %rdi
callq 0x22890
cmpb $0x0, 0x1267aa(%rip)    # 0x150898
je 0x2a140
leaq 0xb07eb(%rip), %rdi     # 0xda8e2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x91238
leaq 0xb036c(%rip), %rdi     # 0xda47e
movb $0x1, %al
callq 0x22080
movq 0x1267e8(%rip), %rax    # 0x150908
movl 0x14(%rax), %esi
leaq 0xb036b(%rip), %rdi     # 0xda495
xorl %eax, %eax
callq 0x22080
movq 0x120e08(%rip), %rax    # 0x14af40
movq (%rax), %rdi
callq 0x22a60
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb03b0(%rip), %rdi     # 0xda509
movq 0x28(%rsp), %rsi
jmp 0x2a185
leaq 0xb0633(%rip), %rdi     # 0xda79a
jmp 0x2a182
leaq 0xb069f(%rip), %rdi     # 0xda80f
jmp 0x2a182
leaq 0xb06fd(%rip), %rdi     # 0xda876
jmp 0x2a182
leaq 0xb0737(%rip), %rdi     # 0xda8b9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x93dbe
pushq $-0x1
popq %rdi
callq 0x22ac0