// File: /workspace/github_cpp_makefile_star2_O1/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 0x3beb
leaq 0x879c(%rip), %r12      # 0xe490
movq (%r12), %rax
cmpq 0x8(%r12), %rax
je 0x5e98
movq (%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x3310
testl %eax, %eax
jne 0x5d76
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 0x42fe(%rip), %rsi      # 0xa03c
leaq 0x40(%rsp), %rdi
callq 0x3680
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3200
cmpl $-0x1, %eax
je 0x5ecd
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x5d76
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 0x5ddb
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x445d(%rip), %rsi      # 0xa206
leaq 0x446d(%rip), %rdx      # 0xa21d
leaq 0x20(%rsp), %rdi
callq 0x4b08
leaq 0x20(%rsp), %rdi
callq 0x43c2
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ddb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3350
movq (%r12), %r13
cmpq 0x8(%r12), %r13
je 0x5e5a
leaq 0x40(%rsp), %rbx
leaq 0x4ddf(%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 0x5df2
leaq 0x40(%rsp), %rdi
callq 0x34b0
movq 0x814d(%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 0x5ea1
movq (%rsp), %rdi
callq 0x3190
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ebc
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 0x5d5f
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x5f27
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x5f27
jmp 0x5f15
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x5f1d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x5f1d
jmp 0x5f1a
jmp 0x5f1a
movq %rax, %rbx
jmp 0x5f27
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3500
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f42
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3350
movq %rbx, %rdi
callq 0x3620