// File: /workspace/github_cpp_makefile_star2_O1/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 0x138a29(%rip), %r14    # 0x1638f0
testq %r14, %r14
je 0x2b057
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
callq 0x9f834
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22fa0
leaq 0xccdf9(%rip), %rsi     # 0xf7cea
movq %r14, %rdi
callq 0x22a80
movq %rax, %rbx
testq %rax, %rax
je 0x2b03d
movq %r14, 0x28(%rsp)
cmpl $0x0, 0x13894b(%rip)    # 0x16385c
jle 0x2afd9
xorl %r15d, %r15d
leaq 0x48(%rsp), %r12
leaq 0x60(%rsp), %r13
leaq 0xc9830(%rip), %rbp     # 0xf475b
movq 0x13891e(%rip), %rax    # 0x163850
movq (%rax,%r15,8), %r14
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x7e05e
leaq 0x48(%r14), %rsi
movq %r12, %rdi
callq 0x7f77c
leaq 0x30(%r14), %rsi
movq %r13, %rdi
callq 0x7eaf6
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(%r14), %xmm9
movsd 0x80(%r14), %xmm10
movsd %xmm10, 0x18(%rsp)
movups %xmm9, 0x8(%rsp)
movsd %xmm8, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movb $0x8, %al
callq 0x22d60
incq %r15
movslq 0x13888c(%rip), %rax    # 0x16385c
cmpq %rax, %r15
jl 0x2af2b
movq %rbx, %rdi
callq 0x22880
cmpb $0x0, 0x1388a0(%rip)    # 0x163888
je 0x2b04e
leaq 0xc9793(%rip), %rdi     # 0xf4784
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x22080
leaq 0xf8(%rsp), %rdi
callq 0x9f896
leaq 0xc9470(%rip), %rdi     # 0xf4481
movb $0x1, %al
callq 0x22080
movl 0x13883e(%rip), %esi    # 0x16385c
leaq 0xc9521(%rip), %rdi     # 0xf4546
xorl %eax, %eax
callq 0x22080
movq 0x132eed(%rip), %rax    # 0x15df20
movq (%rax), %rdi
callq 0x22a70
jmp 0x2b04e
leaq 0xc94c8(%rip), %rdi     # 0xf450c
movq %r14, %rsi
xorl %eax, %eax
callq 0xa2c4e
testq %rbx, %rbx
je 0x2b574
movq 0x138832(%rip), %r14    # 0x163890
testq %r14, %r14
je 0x2b1c3
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x9f834
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22fa0
leaq 0xccc65(%rip), %rsi     # 0xf7cea
movq %r14, %rdi
callq 0x22a80
movq %rax, %rbx
testq %rax, %rax
je 0x2b1a9
cmpl $0x0, 0x1387bc(%rip)    # 0x16385c
jle 0x2b14a
xorl %r13d, %r13d
leaq 0x78(%rsp), %r15
leaq 0xc9712(%rip), %r12     # 0xf47c7
movq 0x138794(%rip), %rax    # 0x163850
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
callq 0x78d26
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 %rbx, %rdi
movq %r12, %rsi
movb $0x8, %al
callq 0x22d60
incq %r13
movslq 0x13871b(%rip), %rax    # 0x16385c
cmpq %rax, %r13
jl 0x2b0b5
movq %rbx, %rdi
callq 0x22880
cmpb $0x0, 0x13872f(%rip)    # 0x163888
je 0x2b1ba
leaq 0xc968d(%rip), %rdi     # 0xf47ef
movq %r14, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x48(%rsp), %rdi
callq 0x9f896
leaq 0xc9304(%rip), %rdi     # 0xf4481
movb $0x1, %al
callq 0x22080
movl 0x1386d2(%rip), %esi    # 0x16385c
leaq 0xc93b5(%rip), %rdi     # 0xf4546
xorl %eax, %eax
callq 0x22080
movq 0x132d81(%rip), %rax    # 0x15df20
movq (%rax), %rdi
callq 0x22a70
jmp 0x2b1ba
leaq 0xc95ed(%rip), %rdi     # 0xf479d
movq %r14, %rsi
xorl %eax, %eax
callq 0xa2c4e
testq %rbx, %rbx
je 0x2b574
movq 0x1386ce(%rip), %r14    # 0x163898
testq %r14, %r14
je 0x2b356
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x9f834
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22fa0
leaq 0xccaf9(%rip), %rsi     # 0xf7cea
movq %r14, %rdi
callq 0x22a80
movq %rax, %rbx
testq %rax, %rax
je 0x2b33c
cmpl $0x0, 0x138650(%rip)    # 0x16385c
jle 0x2b2f1
xorps %xmm0, %xmm0
cvtsi2sdl 0x133767(%rip), %xmm0 # 0x15e984
movsd 0xc8de3(%rip), %xmm1    # 0xf4008
xorps %xmm2, %xmm2
cvtsi2sdl 0x133758(%rip), %xmm2 # 0x15e988
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
mulsd %xmm1, %xmm2
movsd %xmm2, 0x30(%rsp)
xorl %r12d, %r12d
leaq 0xc95ee(%rip), %r15     # 0xf483c
movq 0x1385fb(%rip), %rax    # 0x163850
movq (%rax,%r12,8), %r13
xorps %xmm1, %xmm1
cvtsi2sdl 0x133720(%rip), %xmm1 # 0x15e984
movsd 0xc8d9c(%rip), %xmm0    # 0xf4008
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 0x1336ec(%rip), %xmm0 # 0x15e988
mulsd 0xc8d64(%rip), %xmm0    # 0xf4008
movsd %xmm0, 0x40(%rsp)
movsd 0x68(%r13), %xmm0
callq 0x22490
movsd 0x40(%rsp), %xmm2
divsd %xmm0, %xmm2
movq %rbx, %rdi
movq %r15, %rsi
movsd 0x28(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x30(%rsp), %xmm3
movb $0x4, %al
callq 0x22d60
incq %r12
movslq 0x138574(%rip), %rax    # 0x16385c
cmpq %rax, %r12
jl 0x2b24e
movq %rbx, %rdi
callq 0x22880
cmpb $0x0, 0x138588(%rip)    # 0x163888
je 0x2b34d
leaq 0xc954d(%rip), %rdi     # 0xf4856
movq %r14, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x9f896
leaq 0xc915d(%rip), %rdi     # 0xf4481
movb $0x1, %al
callq 0x22080
movq 0x132bee(%rip), %rax    # 0x15df20
movq (%rax), %rdi
callq 0x22a70
jmp 0x2b34d
leaq 0xc94cf(%rip), %rdi     # 0xf4812
movq %r14, %rsi
xorl %eax, %eax
callq 0xa2c4e
testq %rbx, %rbx
je 0x2b574
movq 0x138543(%rip), %r14    # 0x1638a0
testq %r14, %r14
je 0x2b450
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x9f834
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22fa0
leaq 0xcc966(%rip), %rsi     # 0xf7cea
movq %r14, %rdi
callq 0x22a80
movq %rax, %rbx
testq %rax, %rax
je 0x2b436
cmpl $0x0, 0x1384bd(%rip)    # 0x16385c
jle 0x2b3eb
leaq 0xc927f(%rip), %r12     # 0xf4627
leaq 0xcca74(%rip), %r15     # 0xf7e23
xorl %r13d, %r13d
movq 0x138497(%rip), %rax    # 0x163850
movq (%rax,%r13,8), %rax
movq 0x90(%rax), %rax
movq %r12, %rdx
testq %rax, %rax
je 0x2b3cf
movq %rax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d60
incq %r13
movslq 0x138476(%rip), %rax    # 0x16385c
cmpq %rax, %r13
jl 0x2b3b2
movq %rbx, %rdi
callq 0x22880
cmpb $0x0, 0x13848e(%rip)    # 0x163888
je 0x2b447
leaq 0xc949b(%rip), %rdi     # 0xf489e
movq %r14, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x9f896
leaq 0xc9063(%rip), %rdi     # 0xf4481
movb $0x1, %al
callq 0x22080
movq 0x132af4(%rip), %rax    # 0x15df20
movq (%rax), %rdi
callq 0x22a70
jmp 0x2b447
leaq 0xc943c(%rip), %rdi     # 0xf4879
movq %r14, %rsi
xorl %eax, %eax
callq 0xa2c4e
testq %rbx, %rbx
je 0x2b574
movq 0x138451(%rip), %r14    # 0x1638a8
testq %r14, %r14
je 0x2b562
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x9f834
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22fa0
leaq 0xcc86c(%rip), %rsi     # 0xf7cea
movq %r14, %rdi
callq 0x22a80
movq %rax, %rbx
testq %rax, %rax
je 0x2b54c
movq 0x13845f(%rip), %rax    # 0x1638f8
cmpl $0x0, 0x14(%rax)
jle 0x2b4e9
leaq 0xc9181(%rip), %r13     # 0xf4627
leaq 0xc9431(%rip), %r15     # 0xf48de
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 %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x22d60
movq 0x138418(%rip), %rax    # 0x1638f8
movslq 0x14(%rax), %rcx
cmpq %rcx, %r12
jl 0x2b4b0
movq %rbx, %rdi
callq 0x22880
cmpb $0x0, 0x138390(%rip)    # 0x163888
je 0x2b55d
leaq 0xc93e4(%rip), %rdi     # 0xf48e5
movq %r14, %rsi
xorl %eax, %eax
callq 0x22080
leaq 0x78(%rsp), %rdi
callq 0x9f896
leaq 0xc8f65(%rip), %rdi     # 0xf4481
movb $0x1, %al
callq 0x22080
movq 0x1383ce(%rip), %rax    # 0x1638f8
movl 0x14(%rax), %esi
leaq 0xc8f64(%rip), %rdi     # 0xf4498
xorl %eax, %eax
callq 0x22080
movq 0x1329de(%rip), %rax    # 0x15df20
movq (%rax), %rdi
callq 0x22a70
jmp 0x2b55d
leaq 0xc9369(%rip), %rdi     # 0xf48bc
movq %r14, %rsi
xorl %eax, %eax
callq 0xa2c4e
testq %rbx, %rbx
je 0x2b574
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22ad0