// File: /workspace/github_cpp_makefile_star2_O3/Linkerist[P]xs/src/io.cc
// Function: list_to_file()
void
list_to_file(void)
{
 // don't write empty files FIXME: unlink file?
 string __listfile = get_listfile();

 if (default_list.empty()) {
  unlink(__listfile.c_str());
  return;
 }

 struct stat buf;
 if (stat(__listfile.c_str(), &buf) == 0) {
  string backup_file = __listfile + "~";
  if (rename(__listfile.c_str(), backup_file.c_str()) == -1)
   fprintf(stderr,"warning: could not create backupfile\n");
 }

 ofstream listfile(__listfile.c_str());
 if (!listfile)
  fatal_exit("couldn't write listfile");

 //for (vector<pair<string, string> > li = default_list.begin(); li != default_list.end(); ++li)
 for (listit li = default_list.begin(); li != default_list.end(); ++li)
  listfile << li->first << " " << li->second << endl;

 listfile.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rsp, %rdi
callq 0x3bea
leaq 0x879e(%rip), %r12      # 0xe490
movq (%r12), %rax
cmpq 0x8(%r12), %rax
je 0x5e96
movq (%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x3310
testl %eax, %eax
jne 0x5d74
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x4a20
leaq 0x4300(%rip), %rsi      # 0xa03c
leaq 0x40(%rsp), %rdi
callq 0x3680
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3200
cmpl $-0x1, %eax
je 0x5ecb
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x5d74
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3350
movq (%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x10, %edx
callq 0x33a0
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
je 0x5dd9
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x445f(%rip), %rsi      # 0xa206
leaq 0x446f(%rip), %rdx      # 0xa21d
leaq 0x20(%rsp), %rdi
callq 0x4b0e
leaq 0x20(%rsp), %rdi
callq 0x43c1
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5dd9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3350
movq (%r12), %r13
cmpq 0x8(%r12), %r13
je 0x5e58
leaq 0x40(%rsp), %rbx
leaq 0x4de1(%rip), %r14      # 0xabd1
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x33c0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x33c0
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3320
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3230
addq $0x40, %r13
cmpq 0x8(%r12), %r13
jne 0x5df0
leaq 0x40(%rsp), %rdi
callq 0x34b0
movq 0x814f(%rip), %rax      # 0xdfb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x48(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x40(%rsp,%rcx)
callq 0x32c0
leaq 0x138(%rsp), %rdi
callq 0x3130
jmp 0x5e9f
movq (%rsp), %rdi
callq 0x3190
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5eba
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3350
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x36e2
jmp 0x5d5d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x5f25
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x5f25
jmp 0x5f13
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5f1b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x5f1b
jmp 0x5f18
jmp 0x5f18
movq %rax, %rbx
jmp 0x5f25
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3500
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f40
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3350
movq %rbx, %rdi
callq 0x3620