// File: /workspace/github_cpp_makefile_star2_O3/Linkerist[P]xs/src/io.cc
// Function: edit_list_file()
void
edit_list_file(void)
{
 string editor = getenv("EDITOR");
 if (editor.empty()) {
  // FIXME: how to detect debian and the /usr/bin/editor rule?
  struct stat buf;
  if (stat("/usr/bin/editor", &buf) == 0)
   editor = "/usr/bin/editor";
  else
   editor = "vi";
 }

 endwin();
 list_to_file();
 if(system((editor + " \"" + get_listfile() + "\"").c_str())){};
 list_from_file();
 refresh();
 init_curses();
 display_list();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
leaq 0x4575(%rip), %rdi      # 0xab2d
callq 0x3420
leaq 0x60(%rsp), %rbx
leaq 0x80(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4900
cmpq $0x0, 0x8(%rbx)
jne 0x661f
leaq 0x3c43(%rip), %rbx      # 0xa226
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x3310
testl %eax, %eax
leaq 0x60(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x3c31(%rip), %rcx      # 0xa236
cmoveq %rbx, %rcx
movl $0xf, %eax
movl $0x2, %r8d
cmoveq %rax, %r8
xorl %esi, %esi
callq 0x3580
callq 0x33e0
callq 0x5cd3
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x4a20
leaq 0x3beb(%rip), %rsi      # 0xa239
movq %rsp, %rdi
callq 0x3680
leaq 0x40(%rsp), %rdi
callq 0x3bea
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x48(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x6681
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x66a4
leaq 0x50(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x669f
movq 0x50(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x66ae
movq %rsp, %rdi
callq 0x3110
jmp 0x66bc
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33b0
leaq 0x30(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x66e0
movq %rsi, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x66e6
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x3b30(%rip), %rsi      # 0xa23a
leaq 0x20(%rsp), %rdi
callq 0x3680
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6744
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x674b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x88(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x80(%rsp), %rdi
callq 0x32d0
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x6790
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3350
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67ab
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3350
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67c6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3350
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x67dc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3350
callq 0x4ba4
callq 0x35f0
callq 0x7e8c
callq 0x9289
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x680b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3350
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
jmp 0x689e
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x6842
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x6842
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6862
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x6862
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6884
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x6884
jmp 0x6881
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x68a1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3350
jmp 0x68a1
jmp 0x689e
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68bc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3350
movq %rbx, %rdi
callq 0x3620