LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/unix.cpp
// Function: proc_stat[abi:cxx11](int, int)
const string proc_stat(const int target, const pid_t pid) {
  stringstream ss;
  ss << "/proc/" << pid << "/stat";
  ifstream fin(ss.str().c_str());
  string token;
  for (int i = 0; fin.good(); ++i) {
    fin >> token;
    if (i == target) break;
  }
  fin.close();
  return token;
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x400(%rsp)
movl %esi, 0x3fc(%rsp)
movl %edx, 0x3f8(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x82a0
leaq 0x280(%rsp), %rdi
leaq 0xd0c8(%rip), %rsi      # 0xb433e
callq 0x8400
movq %rax, 0x28(%rsp)
jmp 0xa7282
movq 0x28(%rsp), %rdi
movl 0x3f8(%rsp), %esi
callq 0x8780
movq %rax, 0x10(%rsp)
jmp 0xa729a
movq 0x10(%rsp), %rdi
leaq 0xd022(%rip), %rsi      # 0xb42c8
callq 0x8400
jmp 0xa72ad
leaq 0x38(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x83e0
jmp 0xa72c1
leaq 0x38(%rsp), %rdi
callq 0x8190
movq %rax, 0x8(%rsp)
jmp 0xa72d2
movq 0x8(%rsp), %rsi
leaq 0x58(%rsp), %rdi
movl $0x8, %edx
callq 0x8840
jmp 0xa72e8
leaq 0x38(%rsp), %rdi
callq 0x88f8
jmp 0xa72f4
movq 0x18(%rsp), %rdi
movb $0x0, 0x37(%rsp)
callq 0x85c0
jmp 0xa7305
movl $0x0, 0x30(%rsp)
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x58(%rsp,%rax), %rdi
callq 0x8750
movb %al, 0x7(%rsp)
jmp 0xa7326
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xa7333
jmp 0xa73df
movq 0x18(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x8550
jmp 0xa7344
movl 0x30(%rsp), %eax
cmpl 0x3fc(%rsp), %eax
jne 0xa73cd
jmp 0xa73df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0xa743b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x88f8
jmp 0xa738f
jmp 0xa743b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0xa742d
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
callq 0x88f8
jmp 0xa7411
jmp 0xa73cf
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xa730d
leaq 0x58(%rsp), %rdi
callq 0x80b0
jmp 0xa73eb
movb $0x1, 0x37(%rsp)
testb $0x1, 0x37(%rsp)
jne 0xa7405
movq 0x18(%rsp), %rdi
callq 0x88f8
jmp 0xa7403
jmp 0xa7405
leaq 0x58(%rsp), %rdi
callq 0x80d0
jmp 0xa7413
jmp 0xa742d
leaq 0x270(%rsp), %rdi
callq 0x8900
movq 0x20(%rsp), %rax
addq $0x408, %rsp            # imm = 0x408
retq
leaq 0x58(%rsp), %rdi
callq 0x80d0
jmp 0xa7439
jmp 0xa743b
leaq 0x270(%rsp), %rdi
callq 0x8900
jmp 0xa744a
jmp 0xa744c
movq 0x268(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::cwd[abi:cxx11]()
const string unix::cwd() {
  char * c = get_current_dir_name();
  if (!c) return DBObject::quote(0);
  string cwd(c);
  free(c);
  return DBObject::quote(cwd);
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x60(%rsp)
callq 0x8850
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0xa74ab
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x93e30
jmp 0xa753f
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x87f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x85b0
jmp 0xa74d8
leaq 0x37(%rsp), %rdi
callq 0x84a0
movq 0x58(%rsp), %rdi
callq 0x8520
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x91920
jmp 0xa74fd
leaq 0x38(%rsp), %rdi
callq 0x88f8
jmp 0xa753f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x37(%rsp), %rdi
callq 0x84a0
jmp 0xa7549
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x88f8
jmp 0xa753d
jmp 0xa7549
movq 0x18(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/unix.cpp
// Function: exists(char const*)
bool exists(const char * dir) {
  struct stat st;
  if (stat(dir, &st) != 0) {
    LOG(DEBUG) << "tested file does not exist: '" << dir << "': "
               << strerror(errno);
    return false;
  }
  return true;
}

// Assembly:
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rdi, 0x3d8(%rsp)
movq 0x3d8(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x8360
cmpl $0x0, %eax
je 0xa7630
leaq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
callq 0xa1800
movq 0x10(%rsp), %rdi
leaq 0xcd24(%rip), %rsi      # 0xb42ce
callq 0x945b0
movq %rax, 0x18(%rsp)
jmp 0xa75b6
movq 0x18(%rsp), %rdi
movq 0x3d8(%rsp), %rsi
callq 0x8400
movq %rax, 0x8(%rsp)
jmp 0xa75cf
movq 0x8(%rsp), %rdi
leaq 0xcd11(%rip), %rsi      # 0xb42ec
callq 0x8400
movq %rax, (%rsp)
jmp 0xa75e6
callq 0x8060
movl (%rax), %edi
callq 0x8130
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x8400
jmp 0xa7600
leaq 0x30(%rsp), %rdi
callq 0xa1f50
movb $0x0, 0x3e7(%rsp)
jmp 0xa7638
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa1f50
jmp 0xa762e
jmp 0xa7649
movb $0x1, 0x3e7(%rsp)
movb 0x3e7(%rsp), %al
andb $0x1, %al
addq $0x3e8, %rsp            # imm = 0x3E8
retq
movq 0x28(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::time_zone[abi:cxx11]()
const string unix::time_zone() {
  stringstream ss;
  char zone_buffer[5];
  time_t now = ::time(0);
  strftime(zone_buffer, 5, "%Z", localtime(&now));
  ss << zone_buffer;
  return DBObject::quote(ss.str());
}

// Assembly:
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x1e0(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x82a0
xorl %eax, %eax
movl %eax, %edi
callq 0x8380
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x82b0
movq %rax, %rcx
leaq 0xc290(%rip), %rdx      # 0xb4357
leaq 0x53(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x5, %esi
callq 0x82e0
movq 0x10(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0x8400
jmp 0xa80ec
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x83e0
jmp 0xa80fd
movq (%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x91920
jmp 0xa810d
leaq 0x18(%rsp), %rdi
callq 0x88f8
jmp 0xa8119
leaq 0x58(%rsp), %rdi
callq 0x8900
movq 0x8(%rsp), %rax
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xa815c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x88f8
jmp 0xa815a
jmp 0xa815c
leaq 0x58(%rsp), %rdi
callq 0x8900
jmp 0xa8168
jmp 0xa816a
movq 0x40(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::host_name[abi:cxx11]()
const string unix::host_name() {
  char buffer[1024];
  if (gethostname(buffer, sizeof(buffer))) {
    perror("advanced shell history: Unix: gethostname");
  }
  return DBObject::quote(buffer);
}

// Assembly:
subq $0x418, %rsp            # imm = 0x418
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x410(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x8680
cmpl $0x0, %eax
je 0xa8b2b
leaq 0xb8fd(%rip), %rdi      # 0xb4423
callq 0x8300
movq (%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x93e30
movq 0x8(%rsp), %rax
addq $0x418, %rsp            # imm = 0x418
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::tty[abi:cxx11]()
const string unix::tty() {
  string tty = DBObject::quote(ttyname(0));
  if (tty.find("/dev/") == 1) {
    return "'" + tty.substr(6);
  }
  return tty;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x80(%rsp)
xorl %edi, %edi
movl %edi, 0x14(%rsp)
callq 0x8260
movq %rax, %rsi
leaq 0x60(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x93e30
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rdi
leaq 0xb885(%rip), %rsi      # 0xb444d
movl %eax, %edx
callq 0x88d0
movq %rax, 0x20(%rsp)
jmp 0xa8bd6
movq 0x20(%rsp), %rax
cmpq $0x1, %rax
jne 0xa8c57
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movl $0x6, %edx
movq $-0x1, %rcx
callq 0x8450
jmp 0xa8bfe
movq (%rsp), %rdi
leaq 0xa1dd(%rip), %rsi      # 0xb2de6
leaq 0x30(%rsp), %rdx
callq 0xa8d40
jmp 0xa8c15
leaq 0x30(%rsp), %rdi
callq 0x88f8
jmp 0xa8c21
movl $0x1, 0x2c(%rsp)
jmp 0xa8c6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xa8c86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x88f8
jmp 0xa8c55
jmp 0xa8c86
movq (%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x81a0
jmp 0xa8c67
movl $0x1, 0x2c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x88f8
movq 0x8(%rsp), %rax
addq $0x88, %rsp
retq
leaq 0x60(%rsp), %rdi
callq 0x88f8
jmp 0xa8c92
jmp 0xa8c94
movq 0x58(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/util.cpp
// Function: ash::Util::to_string[abi:cxx11](int)
string Util::to_string(int value) {
  static stringstream ss;
  ss.str("");
  ss << value;
  return ss.str();
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
cmpb $0x0, 0x29bbf(%rip)     # 0xd2a80
jne 0xa8f08
leaq 0x29bb6(%rip), %rdi     # 0xd2a80
callq 0x8810
cmpl $0x0, %eax
je 0xa8f08
leaq 0x29a1d(%rip), %rdi     # 0xd28f8
callq 0x82a0
jmp 0xa8ee2
movq 0x270bf(%rip), %rdi     # 0xcffa8
leaq 0x29a08(%rip), %rsi     # 0xd28f8
leaq 0x27591(%rip), %rdx     # 0xd0488
callq 0x8340
leaq 0x29b7d(%rip), %rdi     # 0xd2a80
callq 0x8240
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x87f0
movq 0x8(%rsp), %rdx
leaq 0x9ed2(%rip), %rsi      # 0xb2df5
leaq 0x28(%rsp), %rdi
callq 0x85b0
jmp 0xa8f2f
leaq 0x299c2(%rip), %rdi     # 0xd28f8
leaq 0x28(%rsp), %rsi
callq 0x84d0
jmp 0xa8f42
leaq 0x28(%rsp), %rdi
callq 0x88f8
jmp 0xa8f4e
leaq 0x27(%rsp), %rdi
callq 0x84a0
movl 0x5c(%rsp), %esi
leaq 0x29995(%rip), %rdi     # 0xd28f8
addq $0x10, %rdi
callq 0x8780
movq 0x10(%rsp), %rdi
leaq 0x29980(%rip), %rsi     # 0xd28f8
callq 0x83e0
movq 0x18(%rsp), %rax
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x29ae4(%rip), %rdi     # 0xd2a80
callq 0x8230
jmp 0xa8fd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xa8fcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x88f8
jmp 0xa8fcd
jmp 0xa8fcf
leaq 0x27(%rsp), %rdi
callq 0x84a0
movq 0x50(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/server_udp.c
// Function: main
int main(int argc, char *argv[]) {
   char buf[BUFSIZE];
   ssize_t bytesread;
   char hostinfo[BUFSIZE];
   u_port_t port;
   int requestfd;
   u_buf_t senderinfo;

   if (argc != 2) {
      fprintf(stderr, "Usage: %s port\n", argv[0]);
      return 1;
   }
   port = (u_port_t) atoi(argv[1]);        /* create communication endpoint */
   if ((requestfd = u_openudp(port)) == -1) {
      perror("Failed to create UDP endpoint");
      return 1;
   }
   for ( ; ; ) {                                 /* process client requests */
      bytesread = u_recvfrom(requestfd, buf, BUFSIZE, &senderinfo);
      if (bytesread < 0) {
         perror("Failed to receive request");
         continue;
      }
      u_gethostinfo(&senderinfo, hostinfo, BUFSIZE);
      if ((r_write(STDOUT_FILENO, hostinfo, strlen(hostinfo)) == -1) ||
          (r_write(STDOUT_FILENO, buf, bytesread) == -1)) {
         perror("Failed to echo reply to standard output");
      }
   }     
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x840, %rsp            # imm = 0x840
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x135a
movq 0x3cc2(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x1cbd(%rip), %rsi      # 0x3004
movb $0x0, %al
callq 0x1130
movl $0x1, -0x4(%rbp)
jmp 0x1457
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11c0
movw %ax, -0x822(%rbp)
movzwl -0x822(%rbp), %edi
callq 0x1fe0
movl %eax, -0x828(%rbp)
cmpl $-0x1, %eax
jne 0x139d
leaq 0x1c88(%rip), %rdi      # 0x3014
callq 0x11b0
movl $0x1, -0x4(%rbp)
jmp 0x1457
jmp 0x139f
movl -0x828(%rbp), %edi
leaq -0x410(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
leaq -0x838(%rbp), %rcx
callq 0x20e0
movq %rax, -0x418(%rbp)
cmpq $0x0, -0x418(%rbp)
jge 0x13dc
leaq 0x1c5d(%rip), %rdi      # 0x3032
callq 0x11b0
jmp 0x139f
leaq -0x820(%rbp), %rsi
leaq -0x838(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x2260
leaq -0x820(%rbp), %rax
movq %rax, -0x840(%rbp)
leaq -0x820(%rbp), %rdi
callq 0x1080
movq -0x840(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
callq 0x16d0
cmpq $-0x1, %rax
je 0x1446
leaq -0x410(%rbp), %rsi
movq -0x418(%rbp), %rdx
movl $0x1, %edi
callq 0x16d0
cmpq $-0x1, %rax
jne 0x1452
leaq 0x1bff(%rip), %rdi      # 0x304c
callq 0x11b0
jmp 0x139f
movl -0x4(%rbp), %eax
addq $0x840, %rsp            # imm = 0x840
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciname.c
// Function: addr2name
void addr2name(struct in_addr addr, char *name, int namelen) {
   struct hostent *hostptr;
   hostptr = gethostbyaddr((char *)&addr, 4, AF_INET);
   if (hostptr == NULL)
      strncpy(name, inet_ntoa(addr), namelen-1);
   else
      strncpy(name, hostptr->h_name, namelen-1);
   name[namelen-1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x4(%rbp), %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x11d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1f17
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %edi
callq 0x1070
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
callq 0x1040
jmp 0x1f30
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
callq 0x1040
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciname.c
// Function: name2addr
int name2addr(char *name, in_addr_t *addrp) {
   struct hostent *hp;

   if (isdigit((int)(*name)))
      *addrp = inet_addr(name);
   else {
      hp = gethostbyname(name);
      if (hp == NULL)
         return -1;
      memcpy((char *)addrp, hp->h_addr_list[0], hp->h_length);
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x11f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1f93
movq -0x10(%rbp), %rdi
callq 0x1110
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1fcc
movq -0x10(%rbp), %rdi
callq 0x1120
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1fb0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1fd3
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x14(%rax), %rdx
callq 0x1140
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_openudp
int u_openudp(u_port_t port) {
   int error;
   int one = 1;
   struct sockaddr_in server;
   int sock;

   if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
      return -1;

   if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) == -1) {
      error = errno;
      r_close(sock);
      errno = error;
      return -1;
   }
       
   if (port > 0) {
      server.sin_family = AF_INET;
      server.sin_addr.s_addr = htonl(INADDR_ANY);
      server.sin_port = htons((short)port);
 
      if (bind(sock, (struct sockaddr *)&server, sizeof(server)) == -1) {
         error = errno;
         r_close(sock);
         errno = error;
         return -1;
      }
   }
   return sock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0x6(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x1200
movl %eax, -0x24(%rbp)
cmpl $-0x1, %eax
jne 0x2018
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x20d3
movl -0x24(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x10(%rbp), %rcx
movl $0x4, %r8d
callq 0x1050
cmpl $-0x1, %eax
jne 0x2064
callq 0x1030
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0x24(%rbp), %edi
callq 0x1470
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0x1030
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x20d3
movzwl -0x6(%rbp), %eax
cmpl $0x0, %eax
jle 0x20cd
movw $0x2, -0x20(%rbp)
xorl %edi, %edi
callq 0x10d0
movl %eax, -0x1c(%rbp)
movzwl -0x6(%rbp), %edi
callq 0x1090
movw %ax, -0x1e(%rbp)
movl -0x24(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x10, %edx
callq 0x1180
cmpl $-0x1, %eax
jne 0x20cb
callq 0x1030
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0x24(%rbp), %edi
callq 0x1470
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
callq 0x1030
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x20d3
jmp 0x20cd
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_recvfrom
ssize_t u_recvfrom(int fd, void *buf, size_t nbytes, u_buf_t *ubufp) {
   int len;
   struct sockaddr *remote;
   int retval;

   len = sizeof (struct sockaddr_in);
   remote = (struct sockaddr *)ubufp;
   while (((retval = recvfrom(fd, buf, nbytes, 0, remote, &len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x10, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %r8
xorl %ecx, %ecx
leaq -0x24(%rbp), %r9
callq 0x1160
movl %eax, %ecx
movl %ecx, -0x34(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0x35(%rbp)
jne 0x213d
callq 0x1030
cmpl $0x4, (%rax)
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x2146
jmp 0x2148
jmp 0x2106
movslq -0x34(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_recvfromtimed
ssize_t u_recvfromtimed(int fd, void *buf, size_t nbytes, u_buf_t *ubufp,
                         double seconds) {
   int len;
   struct sockaddr *remote;
   int retval;
   struct timeval timedone;

   timedone = add2currenttime(seconds);
   if (waitfdtimed(fd, timedone) == -1)
      return (ssize_t)(-1);
   len = sizeof (struct sockaddr_in);
   remote = (struct sockaddr *)ubufp;
   while (((retval = recvfrom(fd, buf, nbytes, 0, remote, &len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0x1780
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x1b40
cmpl $-0x1, %eax
jne 0x21bd
movq $-0x1, -0x8(%rbp)
jmp 0x2216
movl $0x10, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x40(%rbp), %r8
xorl %ecx, %ecx
leaq -0x34(%rbp), %r9
callq 0x1160
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0x69(%rbp)
jne 0x2203
callq 0x1030
cmpl $0x4, (%rax)
sete %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x220c
jmp 0x220e
jmp 0x21cc
movslq -0x44(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_gethostinfo
void u_gethostinfo(u_buf_t *ubufp, char *info, int infosize) {
   int len;
   int portnumber;

   portnumber = ntohs(ubufp->sin_port);
   len = snprintf(info, infosize, "port number is %d on host ", portnumber);
   info[infosize-1] = 0;                              /* in case name not fit */
   if (len >= infosize) return;
   u_gethostname(ubufp, info+len, infosize-len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x1170
movzwl %ax, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movl -0x1c(%rbp), %ecx
leaq 0xdf0(%rip), %rdx       # 0x3088
movb $0x0, %al
callq 0x10b0
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x22bd
jmp 0x22d7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x18(%rbp), %rax
addq %rax, %rsi
movl -0x14(%rbp), %edx
subl -0x18(%rbp), %edx
callq 0x2220
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_comparehost
int u_comparehost(u_buf_t *ubufp, char *hostn, u_port_t port) {
   in_addr_t addr;
   struct sockaddr_in *remotep;

   remotep = (struct sockaddr_in *)ubufp;
   if ((port != ntohs(remotep->sin_port)) ||
       (name2addr(hostn, &addr) == -1) ||
       (memcmp(&(remotep->sin_addr.s_addr), &addr, sizeof(in_addr_t)) != 0))
      return 0;
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movzwl -0x1a(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x1170
movw %ax, %cx
movl -0x2c(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jne 0x234c
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1f50
cmpl $-0x1, %eax
je 0x234c
movq -0x28(%rbp), %rax
addq $0x4, %rax
movl (%rax), %eax
movl -0x20(%rbp), %ecx
subl %ecx, %eax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2355
movl $0x0, -0x4(%rbp)
jmp 0x235c
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_sendto
ssize_t u_sendto(int fd, void *buf, size_t nbytes, u_buf_t *ubufp) {
   int len;
   struct sockaddr *remotep;
   int retval;

   len = sizeof(struct sockaddr_in);
   remotep = (struct sockaddr *)ubufp;
   while (((retval = sendto(fd, buf, nbytes, 0, remotep, len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x10, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %r8
movl -0x24(%rbp), %r9d
xorl %ecx, %ecx
callq 0x10e0
movl %eax, %ecx
movl %ecx, -0x34(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0x35(%rbp)
jne 0x23cd
callq 0x1030
cmpl $0x4, (%rax)
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x23d6
jmp 0x23d8
jmp 0x2396
movslq -0x34(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_sendtohost
ssize_t u_sendtohost(int fd, void *buf, size_t nbytes, char *hostn,
                     u_port_t port) {
   struct sockaddr_in remote;

   if (name2addr(hostn, &(remote.sin_addr.s_addr)) == -1) {
      errno = EINVAL;
      return -1;
   }
   remote.sin_port = htons((short)port);
   remote.sin_family = AF_INET;
   return u_sendto(fd, buf, nbytes, &remote);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %r8w, %ax
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movw %ax, -0x2a(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
addq $0x4, %rsi
callq 0x1f50
cmpl $-0x1, %eax
jne 0x243a
callq 0x1030
movl $0x16, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x2465
movzwl -0x2a(%rbp), %edi
callq 0x1090
movw %ax, -0x3a(%rbp)
movw $0x2, -0x3c(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
callq 0x2370
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_join
int u_join(char *IP_address, u_port_t port, u_buf_t *ubufp) {
   int mcastfd;
   struct ip_mreq tempaddress;

   if ((mcastfd = u_openudp(port)) == -1)
      return mcastfd;
   
   tempaddress.imr_multiaddr.s_addr = inet_addr(IP_address);
   tempaddress.imr_interface.s_addr = htonl(INADDR_ANY);

        /* Join the multicast group. Let kernel choose the interface */
   if (setsockopt(mcastfd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
                   &tempaddress, sizeof(tempaddress)) == -1)
      return -1;
   ubufp->sin_family = AF_INET;
   ubufp->sin_addr.s_addr = inet_addr(IP_address);
   ubufp->sin_port = htons((short)port);
   return mcastfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq %rdx, -0x20(%rbp)
movzwl -0x12(%rbp), %edi
callq 0x1fe0
movl %eax, -0x24(%rbp)
cmpl $-0x1, %eax
jne 0x24a0
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2512
movq -0x10(%rbp), %rdi
callq 0x1110
movl %eax, -0x2c(%rbp)
xorl %edi, %edi
callq 0x10d0
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %edi
xorl %esi, %esi
movl $0x23, %edx
leaq -0x2c(%rbp), %rcx
movl $0x8, %r8d
callq 0x1050
cmpl $-0x1, %eax
jne 0x24dd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2512
movq -0x20(%rbp), %rax
movw $0x2, (%rax)
movq -0x10(%rbp), %rdi
callq 0x1110
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movzwl -0x12(%rbp), %edi
callq 0x1090
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x2(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/amanelis[P]uici/uiciudp.c
// Function: u_leave
int u_leave(int mcastfd, u_buf_t *ubufp) {  
   struct ip_mreq tempaddress;
 
   memcpy(&(tempaddress.imr_multiaddr),
         &(ubufp->sin_addr), sizeof(struct in_addr));   
   tempaddress.imr_interface.s_addr = htonl(INADDR_ANY);
   return setsockopt(mcastfd, IPPROTO_IP, IP_DROP_MEMBERSHIP,
                   &tempaddress, sizeof(tempaddress));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
xorl %edi, %edi
callq 0x10d0
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %edi
xorl %esi, %esi
movl $0x24, %edx
leaq -0x18(%rbp), %rcx
movl $0x8, %r8d
callq 0x1050
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ls4154[P]hash-c/sha512_check.c
// Function: main
int main(int argc, char **argv)
{
	int fd = STDIN_FILENO;
	if (argc > 1 && (fd = open(argv[1], O_RDONLY)) < 0) {
		fprintf(stderr, "%s : cannot access '%s'\n", argv[0], argv[1]);
		exit(EXIT_FAILURE);
	}

	struct sha512_ctx ctx;
	sha512_init(&ctx);

	int total = 0;
	int rd = 0;
	while ((rd = read(fd, buffer + total, CHUNK_SIZE - total)) > 0) {
		total += rd;
		if (total >= CHUNK_SIZE) {
			sha512_update(&ctx, buffer);
			total = 0;
		}
	}
	sha512_update_last(&ctx, buffer, total);

	for (int i = 0; i < WORD_CNT; ++i)
		printf("%016lx", ctx.h[i]);
	printf("\n");

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x1, -0x8(%rbp)
jle 0x120d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x1080
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jge 0x120d
movq 0x2e15(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0xe08(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1060
movl $0x1, %edi
callq 0x1090
leaq -0x60(%rbp), %rdi
callq 0x12e0
movl $0x0, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x14(%rbp), %edi
movslq -0x64(%rbp), %rax
leaq 0x2e3e(%rip), %rsi      # 0x4070
addq %rax, %rsi
movl $0x80, %eax
subl -0x64(%rbp), %eax
movslq %eax, %rdx
callq 0x1050
movl %eax, -0x68(%rbp)
cmpl $0x0, %eax
jle 0x1278
movl -0x68(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
cmpl $0x80, -0x64(%rbp)
jl 0x1276
leaq -0x60(%rbp), %rdi
leaq 0x2e06(%rip), %rsi      # 0x4070
callq 0x1390
movl $0x0, -0x64(%rbp)
jmp 0x1224
movslq -0x64(%rbp), %rdx
leaq -0x60(%rbp), %rdi
leaq 0x2de9(%rip), %rsi      # 0x4070
callq 0x1940
movl $0x0, -0x6c(%rbp)
cmpl $0x8, -0x6c(%rbp)
jge 0x12bb
movslq -0x6c(%rbp), %rax
movq -0x60(%rbp,%rax,8), %rsi
leaq 0xd74(%rip), %rdi       # 0x201d
movb $0x0, %al
callq 0x1030
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x1293
leaq 0xd59(%rip), %rdi       # 0x201b
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ls4154[P]hash-c/sha512.c
// Function: sha512_update_last
void sha512_update_last(struct sha512_ctx *ctx, byte_t *chunk, len_t len)
{
	ctx->len += len;
	len_t bit_len = ctx->len * 8;

	byte_t padding[128];
	memset(padding, 0, sizeof(padding));

	memcpy(padding, chunk, len);
	*(padding + len) = 0x80;

	if (len >= 112) {
		_sha512_iterate(ctx, padding);
		memset(padding, 0, sizeof(padding));
	}

	/* todo : length should be 128 bit */
	byte_t *ptr = padding + 112 + 8;
	for (int i = 7; i >= 0; --i) {
		*ptr = (bit_len >> 8 * i) & 0xFF;
		++ptr;
	}
	_sha512_iterate(ctx, padding);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
shlq $0x3, %rax
movq %rax, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x1040
leaq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1070
movq -0x18(%rbp), %rax
movb $-0x80, -0xa0(%rbp,%rax)
cmpq $0x70, -0x18(%rbp)
jb 0x19d4
movq -0x8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x13d0
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x1040
leaq -0xa0(%rbp), %rax
addq $0x70, %rax
addq $0x8, %rax
movq %rax, -0xa8(%rbp)
movl $0x7, -0xac(%rbp)
cmpl $0x0, -0xac(%rbp)
jl 0x1a43
movq -0x20(%rbp), %rax
movl -0xac(%rbp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0xff, %rax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, (%rax)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movl -0xac(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x19f4
movq -0x8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x13d0
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ls4154[P]hash-c/sha512.c
// Function: sha512_offline
void sha512_offline(struct sha512_ctx *ctx, byte_t *msg, len_t len)
{
	sha512_init(ctx);

	while (len >= 128) {
		sha512_update(ctx, msg);

		msg += 128;
		len -= 128;
	}

	sha512_update_last(ctx, msg, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12e0
cmpq $0x80, -0x18(%rbp)
jb 0x1ab2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1390
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x80, %rax
movq %rax, -0x18(%rbp)
jmp 0x1a7d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1940
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/tests/onlinequantile/main.c
// Function: main
int
main(int argc, char * argv[])
{

	WARNP_INIT;
	(void)argc; /* UNUSED */

	/* Check number of arguments. */
	if (argc < 2) {
		fprintf(stderr, "usage: test_onlinequantile <filename>\n");
		goto err0;
	}

	/* Run test. */
	if (process_test(argv[1]))
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x12dc
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1aa0
jmp 0x12de
cmpl $0x2, -0x8(%rbp)
jge 0x12fe
movq 0x4d0d(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x2d7b(%rip), %rsi      # 0x4070
movb $0x0, %al
callq 0x1100
jmp 0x131b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1330
cmpl $0x0, %eax
je 0x1312
jmp 0x131b
movl $0x0, -0x4(%rbp)
jmp 0x1322
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/tests/onlinequantile/main.c
// Function: handle_line
static int
handle_line(struct onlinequantile * oq, char instr, double val)
{
	double x;

	switch (instr) {
	case 'a':
		/* Add value from file. */
		if (onlinequantile_add(oq, val)) {
			warn0("onlinequantile_add");
			goto err0;
		}
		break;
	case 'g':
		/* Get the online quantile, and check against expected value. */
		if (onlinequantile_get(oq, &x)) {
			warn0("onlinequantile_get");
			goto err0;
		}
		if (fabs(x - val) >= 0.001) {
			warn0("unexpected value: %g instead of %g", x, val);
			goto err0;
		}
		break;
	default:
		warn0("Unrecognized instruction: %c", instr);
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movsd %xmm0, -0x20(%rbp)
movsbl -0x11(%rbp), %eax
movl %eax, -0x2c(%rbp)
subl $0x61, %eax
je 0x1842
jmp 0x1835
movl -0x2c(%rbp), %eax
subl $0x67, %eax
je 0x187a
jmp 0x18f5
movq -0x10(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
callq 0x2420
cmpl $0x0, %eax
je 0x1875
jmp 0x1857
leaq 0x2a27(%rip), %rdi      # 0x4285
movb $0x0, %al
callq 0x1db0
callq 0x1070
movl $0x0, (%rax)
jmp 0x191f
jmp 0x1916
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x20c0
cmpl $0x0, %eax
je 0x18a9
jmp 0x188e
leaq 0x2a03(%rip), %rdi      # 0x4298
movb $0x0, %al
callq 0x1db0
callq 0x1070
movl $0x0, (%rax)
jmp 0x191f
movsd -0x28(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
movaps 0x27a6(%rip), %xmm1     # 0x4060
pand %xmm1, %xmm0
movsd 0x2772(%rip), %xmm1     # 0x4038
ucomisd %xmm1, %xmm0
jb 0x18f3
jmp 0x18ce
movsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
leaq 0x29cc(%rip), %rdi      # 0x42ab
movb $0x2, %al
callq 0x1db0
callq 0x1070
movl $0x0, (%rax)
jmp 0x191f
jmp 0x1916
jmp 0x18f7
movsbl -0x11(%rbp), %esi
leaq 0x29cc(%rip), %rdi      # 0x42ce
movb $0x0, %al
callq 0x1db0
callq 0x1070
movl $0x0, (%rax)
jmp 0x191f
movl $0x0, -0x4(%rbp)
jmp 0x1926
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/onlinequantile.c
// Function: onlinequantile_init
struct onlinequantile *
onlinequantile_init(double q)
{
	struct onlinequantile * Q;

	/* Allocate structure and initialize parameters. */
	if ((Q = malloc(sizeof(struct onlinequantile))) == NULL)
		goto err0;
	Q->larger_min = (double)INFINITY;
	Q->smaller_max = - (double)INFINITY;
	Q->N = 0;
	Q->N_smaller = 0;
	Q->q = q;

	/* Create "smaller" heap. */
	if ((Q->smaller = doubleheap_init()) == NULL)
		goto err1;

	/* Create "larger" heap. */
	if ((Q->larger = doubleheap_init()) == NULL)
		goto err2;

	/* Success! */
	return (Q);

err2:
	doubleheap_free(Q->smaller);
err1:
	free(Q);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm0, -0x10(%rbp)
movl $0x38, %edi
callq 0x1120
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2016
jmp 0x20a7
movq -0x18(%rbp), %rax
movsd 0x200e(%rip), %xmm0     # 0x4030
movsd %xmm0, 0x10(%rax)
movq -0x18(%rbp), %rax
movsd 0x1ff5(%rip), %xmm0     # 0x4028
movsd %xmm0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movsd -0x10(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x30(%rax)
callq 0x2780
movq -0x18(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x2073
jmp 0x209e
callq 0x2780
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x2087
jmp 0x2091
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x20af
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2cf0
movq -0x18(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/onlinequantile.c
// Function: onlinequantile_get
int
onlinequantile_get(struct onlinequantile * Q, double * x)
{
	size_t i;
	double r;

	/* If empty, return 1. */
	if (Q->N == 0)
		return (1);

	/* Figure out the necessary averaging. */
	hazenquantile(Q->N, Q->q, &i, &r);

	/* Sanity-check. */
	assert(Q->N_smaller - 1 == i);

	/* Are we averaging two values? */
	if (r != 0.0) {
		/* Sanity-check. */
		assert(Q->N_smaller < Q->N);

		/* Compute the average. */
		*x = Q->smaller_max + (Q->larger_min - Q->smaller_max) * r;
	} else {
		/* The median is just a single value. */
		*x = Q->smaller_max;
	}

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x20e7
movl $0x1, -0x4(%rbp)
jmp 0x21c7
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movsd 0x30(%rax), %xmm0
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x21d0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
subq $0x1, %rax
cmpq -0x20(%rbp), %rax
jne 0x2119
jmp 0x2138
leaq 0x21e8(%rip), %rdi      # 0x4308
leaq 0x21f7(%rip), %rsi      # 0x431e
movl $0x56, %edx
leaq 0x220e(%rip), %rcx      # 0x4341
callq 0x10d0
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x214a
jp 0x214a
jmp 0x21af
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x215e
jmp 0x217d
leaq 0x2216(%rip), %rdi      # 0x437b
leaq 0x21b2(%rip), %rsi      # 0x431e
movl $0x5b, %edx
leaq 0x21c9(%rip), %rcx      # 0x4341
callq 0x10d0
movq -0x10(%rbp), %rax
movsd 0x18(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0x10(%rbp), %rax
subsd 0x18(%rax), %xmm0
movsd -0x28(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x21c0
movq -0x10(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/onlinequantile.c
// Function: onlinequantile_free
void
onlinequantile_free(struct onlinequantile * Q)
{

	/* Behave consistently with free(NULL). */
	if (Q == NULL)
		return;

	/* Free heaps. */
	doubleheap_free(Q->larger);
	doubleheap_free(Q->smaller);

	/* Free quantile structure. */
	free(Q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2755
jmp 0x2777
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2cf0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2cf0
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_create
struct doubleheap *
doubleheap_create(double * buf, size_t N)
{
	struct doubleheap * H;
	size_t i;

	/* Allocate structure. */
	if ((H = malloc(sizeof(struct doubleheap))) == NULL)
		goto err0;

	/* We will have N elements. */
	H->nelems = N;

	/* Allocate space for N heap elements. */
	if ((H->elems = doublelist_init(N)) == NULL)
		goto err1;

	/* Copy the heap elements in. */
	for (i = 0; i < N; i++)
		*doublelist_get(H->elems, i) = buf[i];

	/* Turn this into a heap. */
	for (i = N - 1; i < N; i--)
		heapify(H->elems, i, N);

	/* Success! */
	return (H);

err1:
	free(H);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x10, %edi
callq 0x1120
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x27c9
jmp 0x2886
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0x28a0
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x27f0
jmp 0x287d
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x283b
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x28d0
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x27f8
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x2873
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2900
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2847
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x288e
movq -0x20(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: heapify
static void
heapify(DOUBLELIST elems, size_t i, size_t N)
{
	size_t min;

	/* Iterate down the tree. */
	do {
		/* Look for the minimum element out of {i, 2i+1, 2i+2}. */
		min = i;

		/* Is this bigger than element 2i+1? */
		if (2 * i + 1 < N &&
		    *doublelist_get(elems, min) >
		    *doublelist_get(elems, 2 * i + 1))
			min = 2 * i + 1;

		/* Is this bigger than element 2i+2? */
		if (2 * i + 2 < N &&
		    *doublelist_get(elems, min) >
		    *doublelist_get(elems, 2 * i + 2))
			min = 2 * i + 2;

		/* If the minimum is i, we have heap-property. */
		if (min == i)
			break;

		/* Move the minimum into position i. */
		swap(elems, min, i);

		/* Move down the tree. */
		i = min;
	} while (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
addq $0x1, %rax
cmpq -0x18(%rbp), %rax
jae 0x2971
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x28d0
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shlq %rsi
addq $0x1, %rsi
callq 0x28d0
movsd -0x28(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x2971
movq -0x10(%rbp), %rax
shlq %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jae 0x29c6
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x28d0
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shlq %rsi
addq $0x2, %rsi
callq 0x28d0
movsd -0x30(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x29c6
movq -0x10(%rbp), %rax
shlq %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x29d2
jmp 0x29f7
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x2d40
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x2914
jmp 0x29f7
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_add
int
doubleheap_add(struct doubleheap * H, double x)
{

	/* Add the element to the end of the heap. */
	if (doublelist_append(H->elems, &x, 1))
		goto err0;
	H->nelems += 1;

	/* Move the new element up in the tree if necessary. */
	heapifyup(H->elems, H->nelems - 1);

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x2a70
cmpl $0x0, %eax
je 0x2a2d
jmp 0x2a5e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
subq $0x1, %rsi
callq 0x2aa0
movl $0x0, -0x4(%rbp)
jmp 0x2a65
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: heapifyup
static void
heapifyup(DOUBLELIST elems, size_t i)
{

	/* Iterate up the tree. */
	do {
		/* If we're at the root, we have nothing to do. */
		if (i == 0)
			break;

		/* If this is >= its parent, we're done. */
		if (*doublelist_get(elems, i) >=
		    *doublelist_get(elems, (i - 1) / 2))
			break;

		/* Swap with the parent. */
		swap(elems, i, (i - 1) / 2);

		/* Move up the tree. */
		i = (i - 1) / 2;
	} while (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2ab9
jmp 0x2b1f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x28d0
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
subq $0x1, %rsi
shrq %rsi
callq 0x28d0
movsd -0x18(%rbp), %xmm0
ucomisd (%rax), %xmm0
jb 0x2af0
jmp 0x2b1f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
subq $0x1, %rdx
shrq %rdx
callq 0x2d40
movq -0x10(%rbp), %rax
subq $0x1, %rax
shrq %rax
movq %rax, -0x10(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x2ab0
jmp 0x2b1f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_getmin
int
doubleheap_getmin(struct doubleheap * H, double * x)
{

	/* If we have any elements, the minimum is in position 0. */
	if (H->nelems) {
		*x = *doublelist_get(H->elems, 0);
		return (0);
	} else
		return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2b70
movq -0x10(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x28d0
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2b77
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_deletemin
void
doubleheap_deletemin(struct doubleheap * H)
{

	/* Sanity-check: Can't delete something which doesn't exist. */
	assert(H->nelems > 0);

	/* Move the last element to the top. */
	*doublelist_get(H->elems, 0) =
	    *doublelist_get(H->elems, H->nelems - 1);

	/* Shrink the heap. */
	doublelist_shrink(H->elems, 1);
	H->nelems--;

	/* Move it down the heap until it finds the right place. */
	heapify(H->elems, 0, H->nelems);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x2c19
jmp 0x2c38
leaq 0x1879(%rip), %rdi      # 0x4499
leaq 0x1880(%rip), %rsi      # 0x44a7
movl $0xd9, %edx
leaq 0x18c7(%rip), %rcx      # 0x44fa
callq 0x10d0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
subq $0x1, %rsi
callq 0x28d0
movsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x28d0
movsd -0x10(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x2cc0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x2900
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)