LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: solveit(cubepos const&, int, std::vector<int, std::allocator<int>>&, int)
int solveit(const cubepos &cp, int at, moveseq &r, int d) {
   cubepos cp2 ;
   if (d > 0) {
      for (int mv=0; mv<NMOVES; mv++) {
         cp2 = cp ;
         cp2.movepc(mv) ;
         int md = mindelta(cp2, scramble_pos[at]) ;
         if (md < d) {
            r.push_back(mv) ;
            if (solveit(cp2, at, r, d-1))
               return 1 ;
            r.pop_back() ;
         }
      }
   }
   if (at < scramble.size()) {
      cp2 = cp ;
      r.push_back(scramble[at]) ;
      cp2.movepc(scramble[at]) ;
      if (solveit(cp2, at+1, r, d))
         return 1 ;
      r.pop_back() ;
      return 0 ;
   }
   if (cp == identity_cube)
      return 1 ;
   else
      return 0 ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r14d
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
leaq 0x5f13(%rip), %rax      # 0x8635
movl 0x10(%rax), %ecx
movl %ecx, 0x20(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
testl %r14d, %r14d
jle 0x27cf
movl %ebp, %r12d
movslq %ebp, %rax
leal -0x1(%r14), %ecx
movl %ecx, 0xc(%rsp)
xorl %esi, %esi
leaq 0x10(%rsp), %r13
movq %rax, 0x30(%rsp)
imulq $0x14, %rax, %rbp
movl %esi, 0x8(%rsp)
cmpl $0x11, %esi
jg 0x27c5
movl 0x10(%r15), %eax
movl %eax, 0x20(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r13, %rdi
callq 0x426a
movq 0x5e47(%rip), %rsi      # 0x85c8
addq %rbp, %rsi
movq %r13, %rdi
callq 0x247c
cmpl %r14d, %eax
jge 0x27bd
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2e08
movq %r13, %rdi
movl %r12d, %esi
movq %rbx, %rdx
movl 0xc(%rsp), %ecx
callq 0x2702
testl %eax, %eax
jne 0x2838
addq $-0x4, 0x8(%rbx)
movl 0x8(%rsp), %esi
incl %esi
jmp 0x2758
movl %r12d, %ebp
movq 0x30(%rsp), %r13
jmp 0x27d2
movslq %ebp, %r13
movq 0x5ddf(%rip), %rcx      # 0x85b8
movq 0x5dd0(%rip), %rax      # 0x85b0
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x283d
movl 0x10(%r15), %ecx
leaq 0x10(%rsp), %r12
movl %ecx, 0x10(%r12)
movups (%r15), %xmm0
movaps %xmm0, (%r12)
leaq (%rax,%r13,4), %rsi
movq %rbx, %rdi
callq 0x2e08
movq 0x5d9a(%rip), %rax      # 0x85b0
movl (%rax,%r13,4), %esi
movq %r12, %rdi
callq 0x426a
incl %ebp
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x2702
testl %eax, %eax
je 0x2851
pushq $0x1
popq %rax
jmp 0x2858
leaq 0x5df1(%rip), %rsi      # 0x8635
movq %r15, %rdi
callq 0x2e26
movzbl %al, %eax
jmp 0x2858
addq $-0x4, 0x8(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: loadfile(char const*)
void loadfile(const char *fn) {
   FILE *f = fopen(fn, "r") ;
   if (f == 0)
      error("! could not open scramble set file") ;
   while (fgets(buf, 1000, f) != 0) {
      scramble = parsemoveseq(buf);
      scrambleset.push_back(scramble) ;
   }
   fclose(f) ;
   cout << "Parsed " << scrambleset.size() << " scrambles." << endl ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x2a1d(%rip), %rsi      # 0x5298
callq 0x2190
movq %rax, %rbx
testq %rax, %rax
jne 0x2894
leaq 0x2800(%rip), %rdi      # 0x508f
callq 0x48e6
leaq 0x5925(%rip), %r14      # 0x81c0
leaq 0x8(%rsp), %r15
leaq 0x5d09(%rip), %r12      # 0x85b0
leaq 0x5d5a(%rip), %r13      # 0x8608
movq %r14, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdx
callq 0x21e0
testq %rax, %rax
je 0x28ee
movq %r15, %rdi
movq %r14, %rsi
callq 0x24d7
movq %r12, %rdi
movq %r15, %rsi
callq 0x3286
movq %r15, %rdi
callq 0x2f7c
movq %r13, %rdi
movq %r12, %rsi
callq 0x2e58
jmp 0x28ae
movq %rbx, %rdi
callq 0x2130
movq 0x56cb(%rip), %rdi      # 0x7fc8
leaq 0x27ae(%rip), %rsi      # 0x50b2
callq 0x2120
movq %rax, %rdi
movq 0x5cfd(%rip), %rax      # 0x8610
subq 0x5cee(%rip), %rax      # 0x8608
pushq $0x18
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x20b0
leaq 0x2789(%rip), %rsi      # 0x50ba
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2080
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: setup_scramble(std::vector<int, std::allocator<int>>&)
void setup_scramble(moveseq &ms) {
   scramble_pos.clear() ;
   scramble = ms ;
   cubepos cp, cp2 ;
   cp = identity_cube ;
   scramble_pos.push_back(cp) ;
   for (int i=0; i<scramble.size(); i++) {
      cp.movepc(cubepos::inv_move[scramble[scramble.size()-1-i]]) ;
      scramble_pos.push_back(cp) ;
   }
   reverse(scramble_pos.begin(), scramble_pos.end()) ;
}

// Assembly:
movq %rdi, %rsi
movq 0x5c6f(%rip), %rax      # 0x85c8
cmpq %rax, 0x5c70(%rip)      # 0x85d0
je 0x2969
movq %rax, 0x5c67(%rip)      # 0x85d0
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x5c33(%rip), %rdi      # 0x85b0
callq 0x2e84
leaq 0x5cac(%rip), %rax      # 0x8635
movl 0x10(%rax), %ecx
movq %rsp, %rbx
movl %ecx, 0x10(%rbx)
movups (%rax), %xmm0
movaps %xmm0, (%rbx)
leaq 0x5c29(%rip), %r14      # 0x85c8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f4e
pushq $-0x4
popq %r15
xorl %r12d, %r12d
leaq 0x6088(%rip), %r13      # 0x8a40
movq 0x5bf9(%rip), %rax      # 0x85b8
movq 0x5bea(%rip), %rcx      # 0x85b0
subq %rcx, %rax
movq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0x29fe
addq %rax, %rcx
movslq (%r15,%rcx), %rax
movzbl (%r13,%rax), %esi
movq %rbx, %rdi
callq 0x426a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f4e
incq %r12
addq $-0x4, %r15
jmp 0x29b8
movq 0x5bc3(%rip), %rdi      # 0x85c8
movq 0x5bc4(%rip), %rsi      # 0x85d0
callq 0x36f3
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/server.c
// Function: main
int main(int argc, char *argv[]) {
   int bytescopied;
   char client[MAX_CANON];
   int communfd;
   int listenfd;
   u_port_t portnumber;
 
   if (argc != 2) {
      fprintf(stderr, "Usage: %s port\n", argv[0]);
      return 1;   
   }  
   portnumber = (u_port_t) atoi(argv[1]);
   if ((listenfd = u_open(portnumber)) == -1) {
      perror("Failed to create listening endpoint");
      return 1;
   }      
   fprintf(stderr, "[%ld]:waiting for the first connection on port %d\n",
                    (long)getpid(), (int)portnumber);
   for ( ; ; ) {
      if ((communfd = u_accept(listenfd, client, MAX_CANON)) == -1) {
         perror("Failed to accept connection");
         continue;
      }
      fprintf(stderr, "[%ld]:connected to %s\n", (long)getpid(), client);
      bytescopied = copyfile(communfd, STDOUT_FILENO);
      fprintf(stderr, "[%ld]:received %d bytes\n", (long)getpid(), bytescopied);
      if (r_close(communfd) == -1)
         perror("Failed to close communfd\n");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
cmpl $0x2, %edi
jne 0x130d
movq 0x8(%rsi), %rdi
callq 0x1170
movl %eax, %r14d
movzwl %r14w, %edi
callq 0x1b14
cmpl $-0x1, %eax
jne 0x133d
leaq 0xd0e(%rip), %rdi       # 0x2014
callq 0x1150
jmp 0x1328
movq 0x2ce4(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rsi), %rdx
leaq 0xce3(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x10f0
pushq $0x1
popq %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebx
movq 0x2cb2(%rip), %rax      # 0x3ff8
movq (%rax), %r15
callq 0x1080
movslq %eax, %rdx
movzwl %r14w, %ecx
leaq 0xcdc(%rip), %rsi       # 0x2038
movq %r15, %rdi
xorl %eax, %eax
callq 0x10f0
leaq -0x130(%rbp), %r14
leaq 0xcf7(%rip), %r12       # 0x206b
movl %ebx, -0x2c(%rbp)
movl %ebx, %edi
movq %r14, %rsi
movl $0xff, %edx
callq 0x1bfd
movq %r12, %rdi
cmpl $-0x1, %eax
je 0x1407
movl %eax, %r15d
movq 0x2c60(%rip), %r13      # 0x3ff8
movq %r12, %rbx
movq (%r13), %r12
callq 0x1080
movslq %eax, %rdx
movq %r12, %rdi
leaq 0xcd6(%rip), %rsi       # 0x2087
movq %r14, %rcx
xorl %eax, %eax
callq 0x10f0
movl %r15d, %edi
pushq $0x1
popq %rsi
callq 0x1676
movl %eax, %r12d
movq (%r13), %r13
callq 0x1080
movslq %eax, %rdx
movq %r13, %rdi
leaq 0xcbf(%rip), %rsi       # 0x209e
movl %r12d, %ecx
movq %rbx, %r12
movl -0x2c(%rbp), %ebx
xorl %eax, %eax
callq 0x10f0
movl %r15d, %edi
callq 0x1414
leaq 0xcb9(%rip), %rdi       # 0x20b7
cmpl $-0x1, %eax
jne 0x1377
callq 0x1150
jmp 0x1377
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: r_waitpid
pid_t r_waitpid(pid_t pid, int *stat_loc, int options) {
   pid_t retval;
   while (((retval = waitpid(pid, stat_loc, options)) == -1) &&
           (errno == EINTR)) ;
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
movl %r15d, %edi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1130
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x1591
callq 0x1030
cmpl $0x4, (%rax)
je 0x1572
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: r_write
ssize_t r_write(int fd, void *buf, size_t size) {
   char *bufp;
   size_t bytestowrite;
   ssize_t byteswritten;
   size_t totalbytes;

   for (bufp = buf, bytestowrite = size, totalbytes = 0;
        bytestowrite > 0;
        bufp += byteswritten, bytestowrite -= byteswritten) {
      byteswritten = write(fd, bufp, bytestowrite);
      if ((byteswritten) == -1 && (errno != EINTR))
         return -1;
      if (byteswritten == -1)
         byteswritten = 0;
      totalbytes += byteswritten;
   }
   return totalbytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
xorl %ebx, %ebx
pushq $-0x1
popq %r13
testq %r14, %r14
je 0x15ed
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1070
cmpq $-0x1, %rax
jne 0x15df
callq 0x1030
cmpl $0x4, (%rax)
jne 0x15ea
xorl %eax, %eax
addq %rax, %rbx
addq %rax, %r15
subq %rax, %r14
jmp 0x15ba
movq %r13, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: add2currenttime
struct timeval add2currenttime(double seconds) {
   struct timeval newtime;

   gettimeofday(&newtime, NULL);
   newtime.tv_sec += (int)seconds;
   newtime.tv_usec += (int)((seconds - (int)seconds)*D_MILLION + 0.5);
   if (newtime.tv_usec >= MILLION) {
      newtime.tv_sec++;
      newtime.tv_usec -= MILLION;
   }
   return newtime;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movaps %xmm0, -0x20(%rbp)
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10b0
movapd -0x20(%rbp), %xmm1
cvttsd2si %xmm1, %eax
movslq %eax, %rcx
addq (%rbx), %rcx
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm1
mulsd 0xa9b(%rip), %xmm1      # 0x20d8
addsd 0xa9b(%rip), %xmm1      # 0x20e0
cvttsd2si %xmm1, %eax
movslq %eax, %rdx
movq 0x8(%rbx), %rsi
leaq (%rsi,%rdx), %rdi
xorl %eax, %eax
cmpq $0xf4240, %rdi          # imm = 0xF4240
leaq -0xf4240(%rsi,%rdx), %rdx
cmovlq %rdi, %rdx
setge %al
addq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: copyfile
int copyfile(int fromfd, int tofd) {
   int bytesread;
   int totalbytes = 0;

   while ((bytesread = readwrite(fromfd, tofd)) > 0)
      totalbytes += bytesread;
   return totalbytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
xorl %ecx, %ecx
movl %ecx, %r15d
movl %r14d, %edi
movl %ebx, %esi
callq 0x16aa
leal (%rax,%r15), %ecx
testl %eax, %eax
jg 0x1687
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: readwrite
int readwrite(int fromfd, int tofd) {
   char buf[BLKSIZE];
   int bytesread;

   if ((bytesread = r_read(fromfd, buf, BLKSIZE)) < 0)
      return -1;
   if (bytesread == 0)
      return 0;
   if (r_write(tofd, buf, bytesread) < 0)
      return -1;
   return bytesread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %esi, %ebx
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x14f2
movq %rax, %r14
testl %r14d, %r14d
js 0x16f8
je 0x16fd
movl %r14d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq -0x1010(%rbp), %rsi
movl %ebx, %edi
callq 0x159d
testq %rax, %rax
pushq $-0x1
popq %rax
cmovnsl %r14d, %eax
jmp 0x16ff
pushq $-0x1
popq %rax
jmp 0x16ff
xorl %eax, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: readblock
ssize_t readblock(int fd, void *buf, size_t size) {
   char *bufp;
   ssize_t bytesread;
   size_t bytestoread;
   size_t totalbytes;
 
   for (bufp = buf, bytestoread = size, totalbytes = 0;
        bytestoread > 0;
        bufp += bytesread, bytestoread -= bytesread) {
      bytesread = read(fd, bufp, bytestoread);
      if ((bytesread == 0) && (totalbytes == 0))
         return 0;
      if (bytesread == 0) {
         errno = EINVAL;
         return -1;
      }  
      if ((bytesread) == -1 && (errno != EINTR))
         return -1;
      if (bytesread == -1)
         bytesread = 0;
      totalbytes += bytesread;
   }
   return totalbytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
xorl %r13d, %r13d
pushq $-0x1
popq %rbx
testq %r14, %r14
je 0x1765
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10e0
movq %rax, %rcx
orq %r13, %rcx
je 0x176a
testq %rax, %rax
je 0x176e
cmpq $-0x1, %rax
jne 0x175a
callq 0x1030
cmpl $0x4, (%rax)
jne 0x1779
xorl %eax, %eax
addq %rax, %r13
addq %rax, %r15
subq %rax, %r14
jmp 0x1728
movq %r13, %rbx
jmp 0x1779
xorl %ebx, %ebx
jmp 0x1779
callq 0x1030
movl $0x16, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: readline
int readline(int fd, char *buf, int nbytes) {
   int numread = 0;
   int returnval;

   while (numread < nbytes - 1) {
      returnval = read(fd, buf + numread, 1);
      if ((returnval == -1) && (errno == EINTR))
         continue;
      if ((returnval == 0) && (numread == 0))
         return 0;
      if (returnval == 0)
         break;
      if (returnval == -1)
         return -1;
      numread++;
      if (buf[numread-1] == '\n') {
         buf[numread] = '\0';
         return numread;
      }  
   }   
   errno = EINVAL;
   return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %r15d
cmpl $0x2, %edx
pushq $0x1
popq %rbx
cmovgel %edx, %ebx
decl %ebx
xorl %r14d, %r14d
pushq $0x1
popq %r12
movq %rsi, -0x30(%rbp)
cmpq %rbx, %r14
je 0x17ff
leaq (%rsi,%r14), %r13
movl %r15d, %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10e0
cmpl $-0x1, %eax
jne 0x17da
callq 0x1030
cmpl $0x4, (%rax)
je 0x17bb
jmp 0x180a
movl %eax, %ecx
orl %r14d, %ecx
je 0x181c
testl %eax, %eax
movq -0x30(%rbp), %rsi
je 0x17ff
incq %r14
cmpb $0xa, (%r13)
jne 0x17b2
movl %r14d, %eax
movb $0x0, (%rsi,%rax)
movl %r14d, %eax
jmp 0x180d
callq 0x1030
movl $0x16, (%rax)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x180d
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: readtimed
ssize_t readtimed(int fd, void *buf, size_t nbyte, double seconds) {
   struct timeval timedone;

   timedone = add2currenttime(seconds);
   if (waitfdtimed(fd, timedone) == -1)
      return (ssize_t)(-1);
   return r_read(fd, buf, nbyte);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
callq 0x15ff
movl %r15d, %edi
movq %rax, %rsi
callq 0x186e
cmpl $-0x1, %eax
je 0x1860
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x14f2
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: waitfdtimed
int waitfdtimed(int fd, struct timeval end) {
   fd_set readset;
   int retval;
   struct timeval timeout;
 
   if ((fd < 0) || (fd >= FD_SETSIZE)) {
      errno = EINVAL;
      return -1;
   }  
   FD_ZERO(&readset);
   FD_SET(fd, &readset);
   if (gettimeout(end, &timeout) == -1)
      return -1;
   while (((retval = select(fd+1, &readset, NULL, NULL, &timeout)) == -1)
           && (errno == EINTR)) {
      if (gettimeout(end, &timeout) == -1)
         return -1;
      FD_ZERO(&readset);
      FD_SET(fd, &readset);
   }
   if (retval == 0) {
      errno = ETIME;
      return -1;
   }
   if (retval == -1)
      return -1;
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
cmpl $0x3ff, %edi            # imm = 0x3FF
jbe 0x18a5
callq 0x1030
movl $0x16, (%rax)
pushq $-0x1
popq %rcx
jmp 0x1967
movl %edi, %r15d
xorl %eax, %eax
cmpq $0x10, %rax
je 0x18be
andq $0x0, -0xc8(%rbp,%rax,8)
incq %rax
jmp 0x18aa
pushq $0x1
popq %rbx
movl %r15d, %ecx
shlq %cl, %rbx
movl %r15d, %r14d
shrl $0x6, %r14d
orq %rbx, -0xc8(%rbp,%r14,8)
leaq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x19c7
pushq $-0x1
popq %rcx
cmpl $-0x1, %eax
je 0x1967
incl %r15d
leaq -0x48(%rbp), %r13
movl %r15d, %edi
leaq -0xc8(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x1100
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x1957
callq 0x1030
cmpl $0x4, (%rax)
jne 0x195c
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x19c7
cmpl $-0x1, %eax
je 0x189d
xorl %eax, %eax
cmpq $0x10, %rax
je 0x194d
andq $0x0, -0xc8(%rbp,%rax,8)
incq %rax
jmp 0x1939
orq %rbx, -0xc8(%rbp,%r14,8)
jmp 0x18f6
testl %r12d, %r12d
je 0x197b
xorl %ecx, %ecx
cmpl $-0x1, %r12d
sete %cl
negl %ecx
movl %ecx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1030
movl $0x3e, (%rax)
jmp 0x189d
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: readwriteblock
int readwriteblock(int fromfd, int tofd, char *buf, int size) {
   int bytesread;

   bytesread = readblock(fromfd, buf, size);
   if (bytesread != size)         /* can only be 0 or -1 */
      return bytesread;
   return r_write(tofd, buf, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movslq %ecx, %r14
movq %rdx, %rsi
movq %r14, %rdx
callq 0x170b
cmpl %r14d, %eax
jne 0x19bc
movl %r15d, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x159d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/restart.c
// Function: gettimeout
static int gettimeout(struct timeval end,
                               struct timeval *timeoutp) {
   gettimeofday(timeoutp, NULL);
   timeoutp->tv_sec = end.tv_sec - timeoutp->tv_sec;
   timeoutp->tv_usec = end.tv_usec - timeoutp->tv_usec;
   if (timeoutp->tv_usec >= MILLION) {
      timeoutp->tv_sec++;
      timeoutp->tv_usec -= MILLION;
   }
   if (timeoutp->tv_usec < 0) {
      timeoutp->tv_sec--;
      timeoutp->tv_usec += MILLION;
   }
   if ((timeoutp->tv_sec < 0) ||
       ((timeoutp->tv_sec == 0) && (timeoutp->tv_usec == 0))) {
      errno = ETIME;
      return -1;
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
xorl %esi, %esi
callq 0x10b0
subq (%r15), %r14
movq %r14, (%r15)
subq 0x8(%r15), %rbx
movq %rbx, 0x8(%r15)
cmpq $0xf423f, %rbx          # imm = 0xF423F
jle 0x1a06
movq $-0xf4240, %rax         # imm = 0xFFF0BDC0
pushq $0x1
jmp 0x1a12
testq %rbx, %rbx
jns 0x1a20
movl $0xf4240, %eax          # imm = 0xF4240
pushq $-0x1
popq %rcx
addq %rcx, %r14
movq %r14, (%r15)
addq %rax, %rbx
movq %rbx, 0x8(%r15)
testq %r14, %r14
js 0x1a2c
xorl %eax, %eax
orq %rbx, %r14
jne 0x1a3a
callq 0x1030
movl $0x3e, (%rax)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciname.c
// Function: addr2name
void addr2name(struct in_addr addr, char *name, int namelen) {
   struct sockaddr_in saddr;
   saddr.sin_family = AF_INET;
   saddr.sin_port = 0;
   saddr.sin_addr = addr;
   if (getnameinfo((struct sockaddr *)&saddr, sizeof(saddr), name, namelen,
         NULL, 0, 0) != 0) {
      strncpy(name, inet_ntoa(addr), namelen-1);
      name[namelen-1] = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %r15d
leaq -0x28(%rbp), %rdi
movl $0x2, (%rdi)
movl %r15d, 0x4(%rdi)
andl $0x0, (%rsp)
pushq $0x10
popq %rsi
movq %rbx, %rdx
movl %r14d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x10d0
testl %eax, %eax
je 0x1aa8
movl %r15d, %edi
callq 0x1090
movslq %r14d, %r14
leaq -0x1(%r14), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1040
movb $0x0, -0x1(%rbx,%r14)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciname.c
// Function: name2addr
int name2addr(char *name, in_addr_t *addrp) {
   struct addrinfo hints;
   struct addrinfo *res;
   struct sockaddr_in *saddrp;

   hints.ai_flags = AI_PASSIVE;
   hints.ai_family = PF_INET;
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_protocol = 0;
   hints.ai_addrlen = 0;
   hints.ai_canonname = NULL;
   hints.ai_addr = NULL;
   hints.ai_next = NULL;
 
   if (getaddrinfo(name, NULL, &hints, &res) != 0)
      return -1;
   saddrp = (struct sockaddr_in *)(res->ai_addr);
   memcpy(addrp, &saddrp->sin_addr.s_addr, 4);
   freeaddrinfo(res);
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movaps 0x628(%rip), %xmm0      # 0x20f0
leaq -0x48(%rbp), %rdx
movups %xmm0, (%rdx)
andl $0x0, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
andq $0x0, 0x28(%rdx)
xorl %ebx, %ebx
leaq -0x18(%rbp), %rcx
xorl %esi, %esi
callq 0x1190
testl %eax, %eax
je 0x1af5
pushq $-0x1
popq %rbx
jmp 0x1b08
movq -0x18(%rbp), %rdi
movq 0x18(%rdi), %rax
movl 0x4(%rax), %eax
movl %eax, (%r14)
callq 0x11b0
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uici.c
// Function: u_open
int u_open(u_port_t port) {
   int error;  
   struct sockaddr_in server;
   int sock;
   int true = 1;

   if ((u_ignore_sigpipe() == -1) ||
        ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1))
      return -1; 

   if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
                  sizeof(true)) == -1) {
      error = errno;
      while ((close(sock) == -1) && (errno == EINTR)); 
      errno = error;
      return -1;
   }
 
   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) ||
        (listen(sock, MAXBACKLOG) == -1)) {
      error = errno;
      while ((close(sock) == -1) && (errno == EINTR)); 
      errno = error;
      return -1;
   }
   return sock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edi, %r15d
movl $0x1, -0x24(%rbp)
callq 0x1dd0
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x1bee
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x11c0
cmpl $-0x1, %eax
je 0x1bee
movl %eax, %r14d
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
leaq -0x24(%rbp), %rcx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x1060
cmpl $-0x1, %eax
je 0x1bcd
leaq -0x34(%rbp), %rsi
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
pushq $0x10
popq %rdx
movl %r14d, %edi
callq 0x1120
cmpl $-0x1, %eax
je 0x1bad
pushq $0x32
popq %rsi
movl %r14d, %edi
callq 0x1110
cmpl $-0x1, %eax
je 0x1bad
movl %r14d, %ebx
jmp 0x1bee
callq 0x1030
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x1beb
cmpl $0x4, (%r15)
je 0x1bb8
jmp 0x1beb
callq 0x1030
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x1beb
cmpl $0x4, (%r15)
je 0x1bd8
movl %r12d, (%r15)
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uici.c
// Function: u_accept
int u_accept(int fd, char *hostn, int hostnsize) {
   int len = sizeof(struct sockaddr);
   struct sockaddr_in netclient;
   int retval;

   while (((retval =
           accept(fd, (struct sockaddr *)(&netclient), &len)) == -1) &&
          (errno == EINTR))
      ;  
   if ((retval == -1) || (hostn == NULL) || (hostnsize <= 0))
      return retval;
   addr2name(netclient.sin_addr, hostn, hostnsize);
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, %r14
movl %edi, %r12d
leaq -0x30(%rbp), %r13
movl $0x10, (%r13)
leaq -0x40(%rbp), %rbx
movl %r12d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1160
movl %eax, %r15d
cmpl $-0x1, %eax
jne 0x1c47
callq 0x1030
cmpl $0x4, (%rax)
je 0x1c27
cmpl $-0x1, %r15d
sete %al
testq %r14, %r14
sete %cl
movl -0x2c(%rbp), %edx
testl %edx, %edx
setle %sil
orb %cl, %sil
orb %al, %sil
jne 0x1c70
movl -0x3c(%rbp), %edi
movq %r14, %rsi
callq 0x1a48
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uici.c
// Function: u_connect
int u_connect(u_port_t port, char *hostn) {
   int error;
   int retval;
   struct sockaddr_in server;
   int sock;
   fd_set sockset;

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

   if ((u_ignore_sigpipe() == -1) ||
        ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1))
      return -1;

   if (((retval =
       connect(sock, (struct sockaddr *)&server, sizeof(server))) == -1) &&
       ((errno == EINTR) || (errno == EALREADY))) {
       FD_ZERO(&sockset);
       FD_SET(sock, &sockset);
       while ( ((retval = select(sock+1, NULL, &sockset, NULL, NULL)) == -1) &&
               (errno == EINTR) ) {
          FD_ZERO(&sockset);
          FD_SET(sock, &sockset);
       } 
   }
   if (retval == -1) {
        error = errno;
        while ((close(sock) == -1) && (errno == EINTR)); 
        errno = error;
        return -1;
   }
   return sock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rax
movl %edi, %ebx
leaq -0x3c(%rbp), %rsi
movq %rax, %rdi
callq 0x1ab3
cmpl $-0x1, %eax
je 0x1cf4
rolw $0x8, %bx
movw %bx, -0x3e(%rbp)
movw $0x2, -0x40(%rbp)
callq 0x1dd0
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x1d02
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x11c0
cmpl $-0x1, %eax
je 0x1d02
movl %eax, %r14d
leaq -0x40(%rbp), %rsi
pushq $0x10
popq %rdx
movl %eax, %edi
callq 0x1180
cmpl $-0x1, %eax
je 0x1d16
movl %r14d, %ebx
jmp 0x1d02
callq 0x1030
movl $0x16, (%rax)
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1030
movq %rax, %r15
movl (%rax), %r13d
cmpl $0x72, %r13d
je 0x1d31
cmpl $0x4, %r13d
jne 0x1dbb
xorl %eax, %eax
cmpq $0x10, %rax
je 0x1d47
andq $0x0, -0xc0(%rbp,%rax,8)
incq %rax
jmp 0x1d33
pushq $0x40
popq %rcx
movl %r14d, %eax
cltd
idivl %ecx
movslq %eax, %rcx
movq %rcx, -0x30(%rbp)
shll $0x6, %eax
movl %r14d, %ecx
subl %eax, %ecx
pushq $0x1
popq %rbx
shlq %cl, %rbx
movl %r14d, %r12d
incl %r12d
movq -0x30(%rbp), %rax
orq %rbx, -0xc0(%rbp,%rax,8)
movl %r12d, %edi
xorl %esi, %esi
leaq -0xc0(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1100
cmpl $-0x1, %eax
jne 0x1cef
movl (%r15), %r13d
cmpl $0x4, %r13d
jne 0x1dbb
xorl %eax, %eax
cmpq $0x10, %rax
je 0x1d6b
andq $0x0, -0xc0(%rbp,%rax,8)
incq %rax
jmp 0x1da1
cmpl $0x4, (%r15)
jne 0x1dc8
movl %r14d, %edi
callq 0x10c0
cmpl $-0x1, %eax
je 0x1db5
movl %r13d, (%r15)
jmp 0x1cff
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uici.c
// Function: u_ignore_sigpipe
static int u_ignore_sigpipe() {
   struct sigaction act;

   if (sigaction(SIGPIPE, (struct sigaction *)NULL, &act) == -1)
      return -1;
   if (act.sa_handler == SIG_DFL) {
      act.sa_handler = SIG_IGN;
      if (sigaction(SIGPIPE, &act, (struct sigaction *)NULL) == -1)
         return -1;
   }   
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
pushq $0xd
popq %rdi
leaq -0xa0(%rbp), %rdx
xorl %esi, %esi
callq 0x1050
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x1e1e
cmpq $0x0, -0xa0(%rbp)
jne 0x1e1c
leaq -0xa0(%rbp), %rsi
movq $0x1, (%rsi)
pushq $0xd
popq %rdi
xorl %edx, %edx
callq 0x1050
cmpl $-0x1, %eax
je 0x1e1e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/./bmfdec.c
// Function: dblb_rdn
INLINE unsigned dblb_rdn(bits_t *pbits,int n)
{
  unsigned u;
  RDN_PR(*pbits,u);
  pbits->pb+=n;
  u&=dblb_bmsk[n];
  return u;
}

// Assembly:
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
cmpl $0x10, %ecx
jl 0x14a0
shrl $0x10, %eax
movl %eax, (%rdi)
addl $-0x10, %ecx
movq 0x8(%rdi), %rdx
cmpq 0x10(%rdi), %rdx
jae 0x14a0
leaq 0x2(%rdx), %r8
movq %r8, 0x8(%rdi)
movzwl (%rdx), %edx
shll $0x10, %edx
orl %edx, %eax
movl %eax, (%rdi)
shrl %cl, %eax
addl %esi, %ecx
movl %ecx, 0x4(%rdi)
movl %esi, %ecx
leaq 0x4c60(%rip), %rdx      # 0x6110
andl (%rdx,%rcx,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/./bmfparse.c
// Function: free_classes
static void free_classes(struct mof_class *classes, uint32_t count) {
  uint32_t i;
  for (i=0; i<count; ++i)
    free_class(&classes[i]);
  free(classes);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r12d
xorl %r13d, %r13d
cmpq %r12, %r13
je 0x3aae
testq %rbx, %rbx
je 0x3aa6
imulq $0x48, %r13, %r15
movq (%rbx,%r15), %rdi
callq 0x1030
movq 0x8(%rbx,%r15), %rdi
callq 0x1030
movq 0x10(%rbx,%r15), %rdi
callq 0x1030
movq 0x20(%rbx,%r15), %rdi
movl 0x1c(%rbx,%r15), %esi
callq 0x557a
movq 0x30(%rbx,%r15), %rdi
movl 0x28(%rbx,%r15), %esi
callq 0x55c4
movq 0x40(%rbx,%r15), %r14
movl 0x38(%rbx,%r15), %ebp
leaq 0x30(%r14), %r15
subq $0x1, %rbp
jb 0x3a9e
testq %r14, %r14
je 0x3a98
movq -0x28(%r15), %rdi
movl -0x30(%r15), %esi
callq 0x557a
movq -0x20(%r15), %rdi
callq 0x1030
movq -0x10(%r15), %rdi
movl -0x18(%r15), %esi
callq 0x55c4
movq %r15, %rdi
callq 0x55f6
movq -0x8(%r15), %rdi
callq 0x1030
addq $0x60, %r15
jmp 0x3a59
movq %r14, %rdi
callq 0x1030
incq %r13
jmp 0x39fa
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/./bmfparse.c
// Function: dump_bytes
static void dump_bytes(char *buf, uint32_t size) {
  uint32_t i, ascii_cnt = 0;
  char ascii[17] = { 0, };
  for (i=0; i<size; i++) {
    if (i % 16 == 0) {
      if (i != 0) {
        fprintf(stderr, "  |%s|\n", ascii);
        ascii[0] = 0;
        ascii_cnt = 0;
      }
      fprintf(stderr, "%04X:", (unsigned int)i);
    }
    fprintf(stderr, " %02X", buf[i] & 0xFF);
    ascii[ascii_cnt] = to_ascii(buf[i]);
    ascii[ascii_cnt + 1] = 0;
    ascii_cnt++;
  }
  if (ascii[0]) {
    if (size % 16)
      for (i=0; i<16-(size%16); i++)
        fprintf(stderr, "   ");
    fprintf(stderr, "  |%s|\n", ascii);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movb $0x0, 0x10(%rax)
movl %esi, %ebp
movq 0x40b4(%rip), %r12      # 0x8ff8
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpq %r13, %rbp
je 0x4fc6
testb $0xf, %r13b
jne 0x4f8b
testq %r13, %r13
je 0x4f76
movq (%r12), %rdi
xorl %r15d, %r15d
leaq 0x1635(%rip), %rsi      # 0x659d
movq %rsp, %rdx
xorl %eax, %eax
callq 0x1100
movb $0x0, (%rsp)
movq (%r12), %rdi
leaq 0x1624(%rip), %rsi      # 0x65a5
movl %r13d, %edx
xorl %eax, %eax
callq 0x1100
movq (%r12), %rdi
movzbl (%r14,%r13), %edx
leaq 0x1610(%rip), %rsi      # 0x65ab
xorl %eax, %eax
callq 0x1100
movzbl (%r14,%r13), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
pushq $0x2e
popq %rcx
cmovael %ecx, %eax
movl %r15d, %ecx
movb %al, (%rsp,%rcx)
incl %r15d
movb $0x0, (%rsp,%r15)
incq %r13
jmp 0x4f4a
cmpb $0x0, (%rsp)
jne 0x4fdb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0xf, %ebx
jne 0x4ff7
movq (%r12), %rdi
leaq 0x15b2(%rip), %rsi      # 0x659d
movq %rsp, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x4fcc
orl $-0x10, %ebx
leaq 0x15b0(%rip), %r14      # 0x65b1
pushq $0x3
popq %r15
pushq $0x1
popq %r13
testl %ebx, %ebx
je 0x4fe0
movq (%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1180
incl %ebx
jmp 0x5009
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/bmf2mof.c
// Function: print_string
static void print_string(FILE *fout, char *str) {
  int len = strlen(str);
  int i;
  for (i=0; i<len; ++i) {
    if (str[i] == '"' || str[i] == '\\')
      fputc('\\', fout);
    fputc(str[i], fout);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x10a0
movq %rax, %r15
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
pushq $0x5c
popq %rbp
cmpq %r12, %r15
je 0x5253
movzbl (%rbx,%r12), %eax
cmpl $0x5c, %eax
je 0x5235
cmpl $0x22, %eax
jne 0x5243
movl %ebp, %edi
movq %r14, %rsi
callq 0x10d0
movb (%rbx,%r12), %al
movsbl %al, %edi
movq %r14, %rsi
callq 0x10d0
incq %r12
jmp 0x5221
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/bmf2mof.c
// Function: print_variable
static void print_variable(FILE *fout, struct mof_variable *variable, char *prefix) {
  if (variable->qualifiers_count > 0 || prefix) {
    print_qualifiers(fout, variable->qualifiers, variable->qualifiers_count, prefix);
    fprintf(fout, " ");
  }
  print_variable_type(fout, variable);
  fprintf(fout, " ");
  print_string(fout, variable->name);
  if (variable->variable_type == MOF_VARIABLE_BASIC_ARRAY || variable->variable_type == MOF_VARIABLE_OBJECT_ARRAY) {
    fprintf(fout, "[");
    if (variable->has_array_max)
      fprintf(fout, "%d", variable->array_max);
    fprintf(fout, "]");
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edx
testl %edx, %edx
sete %al
testq %rcx, %rcx
sete %sil
testb %al, %sil
jne 0x54b4
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x525c
pushq $0x20
popq %rdi
movq %rbx, %rsi
callq 0x10d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5523
pushq $0x20
popq %rdi
movq %rbx, %rsi
callq 0x10d0
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x51fb
movl 0x18(%r14), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x551b
pushq $0x5b
popq %rdi
movq %rbx, %rsi
callq 0x10d0
cmpb $0x0, 0x2c(%r14)
je 0x5509
movl 0x28(%r14), %edx
leaq 0x1481(%rip), %rsi      # 0x6980
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
pushq $0x5d
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/./bmfparse.c
// Function: free_qualifiers
static void free_qualifiers(struct mof_qualifier *qualifiers, uint32_t count) {
  uint32_t i;
  for (i=0; i<count; ++i)
    free_qualifier(&qualifiers[i]);
  free(qualifiers);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
shlq $0x5, %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x55b7
testq %rbx, %rbx
je 0x55b1
movq 0x8(%rbx,%r15), %rdi
callq 0x1030
cmpl $0x3, (%rbx,%r15)
jne 0x55b1
movq 0x18(%rbx,%r15), %rdi
callq 0x1030
addq $0x20, %r15
jmp 0x558c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/./bmfparse.c
// Function: free_variables
static void free_variables(struct mof_variable *variables, uint32_t count) {
  uint32_t i;
  for (i=0; i<count; ++i)
    free_variable(&variables[i]);
  free(variables);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %eax
imulq $0x30, %rax, %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x55e9
leaq (%rbx,%r15), %rdi
callq 0x55f6
addq $0x30, %r15
jmp 0x55d5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pali[P]bmfdec/./bmfparse.c
// Function: free_variable
static void free_variable(struct mof_variable *variable) {
  if (!variable)
    return;
  free(variable->name);
  free_qualifiers(variable->qualifiers, variable->qualifiers_count);
  if (variable->variable_type == MOF_VARIABLE_OBJECT || variable->variable_type == MOF_VARIABLE_OBJECT_ARRAY)
    free(variable->type.object);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x562a
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
movl (%rbx), %esi
callq 0x557a
movl 0x18(%rbx), %eax
cmpl $0x4, %eax
je 0x5620
cmpl $0x2, %eax
jne 0x562a
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0x1030
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: test_1
boolean test_1() {
    char *pattern = "ABCABCABCD";
    char *string = "AABCABCABCABCDABCABCDABCABCABCDA";
    int   next[10];
    kmp_get_next(pattern, next);

    char *c = string;
    int   pos = 0;
    int   ans = 0;
    while (*c != '\0') {
        kmp_char(*(c++), pattern, &pos, next, &ans);
    }
    if (ans != 2) {
        print_err("test_1 error, want %d, got %d\n", 2, ans);
        return F;
    }
    return T;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0xa0b(%rip), %rbx       # 0x2154
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13f8
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
leaq 0x8(%rsp), %r12
andl $0x0, (%r12)
xorl %r13d, %r13d
leaq 0x9e9(%rip), %rbp       # 0x215f
cmpq $0x20, %r13
je 0x1798
movsbl (%r13,%rbp), %edi
incq %r13
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x143b
jmp 0x1776
movl 0x8(%rsp), %edx
cmpl $0x2, %edx
jne 0x17aa
leaq 0x9a4(%rip), %rax       # 0x214c
jmp 0x17c2
leaq 0x9cf(%rip), %rdi       # 0x2180
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x1564
leaq 0x98e(%rip), %rax       # 0x2150
movl (%rax), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: test_2
boolean test_2() {
    char *pattern = "ABCABCDABCABCD";
    char *string = "DDABCABCDABCABCDABCABCDDD";
    int   next[15];
    kmp_get_next(pattern, next);

    char *c = string;
    int   pos = 0;
    int   ans = 0;
    while (*c != '\0') {
        kmp_char(*(c++), pattern, &pos, next, &ans);
    }
    if (ans != 2) {
        print_err("test_2 error, want %d, got %d\n", 2, ans);
        return F;
    }
    return T;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq 0x9b7(%rip), %rbx       # 0x219f
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13f8
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
leaq 0x8(%rsp), %r12
andl $0x0, (%r12)
xorl %r13d, %r13d
leaq 0x999(%rip), %rbp       # 0x21ae
cmpq $0x19, %r13
je 0x1837
movsbl (%r13,%rbp), %edi
incq %r13
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x143b
jmp 0x1815
movl 0x8(%rsp), %edx
cmpl $0x2, %edx
jne 0x1849
leaq 0x905(%rip), %rax       # 0x214c
jmp 0x1861
leaq 0x978(%rip), %rdi       # 0x21c8
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x1564
leaq 0x8ef(%rip), %rax       # 0x2150
movl (%rax), %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: test_3
boolean test_3() {
    char *pattern = "AB";
    char *string = "ABABBAB";
    int   next[2];
    kmp_get_next(pattern, next);

    char *c = string;
    int   pos = 0;
    int   ans = 0;
    while (*c != '\0') {
        kmp_char(*(c++), pattern, &pos, next, &ans);
    }
    if (ans != 3) {
        print_err("test_3 error, want %d, got %d\n", 3, ans);
        return F;
    }
    return T;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x965(%rip), %rbx       # 0x21ec
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13f8
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
leaq 0x8(%rsp), %r12
andl $0x0, (%r12)
xorl %r13d, %r13d
leaq 0x933(%rip), %rbp       # 0x21e7
cmpq $0x7, %r13
je 0x18d6
movsbl (%r13,%rbp), %edi
incq %r13
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x143b
jmp 0x18b4
movl 0x8(%rsp), %edx
cmpl $0x3, %edx
jne 0x18e8
leaq 0x866(%rip), %rax       # 0x214c
jmp 0x1900
leaq 0x900(%rip), %rdi       # 0x21ef
pushq $0x3
popq %rsi
xorl %eax, %eax
callq 0x1564
leaq 0x850(%rip), %rax       # 0x2150
movl (%rax), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: main
int main() {
    boolean pass = T;

    pass &= test_1();
    pass &= test_2();
    pass &= test_3();

    if (pass) {
        print_ok("All testcases passed\n");
    } else {
        print_err("Some errors!\n");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x830(%rip), %r14       # 0x214c
callq 0x1734
movl %eax, %ebx
andl (%r14), %ebx
callq 0x17d3
movl %eax, %ebp
andl %ebx, %ebp
callq 0x1872
testl %eax, %ebp
je 0x1948
leaq 0x8cf(%rip), %rdi       # 0x220e
xorl %eax, %eax
callq 0x161c
jmp 0x1956
leaq 0x8d5(%rip), %rdi       # 0x2224
xorl %eax, %eax
callq 0x1564
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_08/envars.c
// Function: main
int main(int argc, char *argv[])
{
	char *val;
	bool do_set = false, do_unset = false;
	int ret;

	/* Check the command line */
	if (argc < 2) {
		fprintf(stderr, "usage: %s [-]<var> [<val>]\n", argv[0]);
		return -1;
	}
	if (argv[1][0] == '-') {
		do_unset = true;
		argv[1]++;
	} else if (argc == 3)
		do_set = true;

	if (do_set || do_unset) {
		/* Try to set/unset the environment variable */
		if (do_set)
			ret = setenv(argv[1], argv[2], 1);
		else
			ret = unsetenv(argv[1]);
		if (ret) {
			perror(do_set ? "setenv" : "unsetenv");
			return -1;
		}
	}

	/* Try to get the environment variable */
	val = getenv(argv[1]);
	if (val == NULL) {
		fprintf(stderr, "variable %s %s\n", argv[1],
			do_unset ? "canceled" : "not found");
		return -1;
	}

	printf("%s\n", val);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x1, %edi
jle 0x11fc
movq 0x8(%rbx), %r14
movb (%r14), %bpl
cmpb $0x2d, %bpl
jne 0x11bd
incq %r14
movq %r14, 0x8(%rbx)
movq %r14, %rdi
callq 0x1080
leaq 0xe65(%rip), %rdi       # 0x2020
jmp 0x11d8
cmpl $0x3, %edi
jne 0x11e0
movq 0x10(%rbx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0xe4a(%rip), %rdi       # 0x2022
testl %eax, %eax
jne 0x124c
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x1030
testq %rax, %rax
je 0x1219
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2df5(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xdf4(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x1251
cmpb $0x2d, %bpl
movq 0x2dd4(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xe0b(%rip), %rax       # 0x2039
leaq 0xe0d(%rip), %rcx       # 0x2042
cmoveq %rax, %rcx
leaq 0xde9(%rip), %rsi       # 0x2029
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x1251
callq 0x1070
pushq $-0x1
popq %rax
jmp 0x11f7
// File: /workspace/github_c_makefile_star2_O2/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: dictGenHashFunction
unsigned int dictGenHashFunction(const unsigned char *buf, int len) {
    unsigned int hash = 5381;

    while (len--)
        hash = ((hash << 5) + hash) + (*buf++); /* hash * 33 + c */
    return hash;
}

// Assembly:
movl %esi, %ecx
movl $0x1505, %eax           # imm = 0x1505
xorl %edx, %edx
cmpl %edx, %ecx
je 0x2557
imull $0x21, %eax, %esi
movzbl (%rdi,%rdx), %eax
addl %esi, %eax
incq %rdx
jmp 0x2545
retq
// File: /workspace/github_c_makefile_star2_O2/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: calculate
size_t calculate (UINT64_RC n, double e, UINT64_RC* m, int* k, double* tmp_e)
{
    double te = 1;
    int kk = 0;
    int x;
 
    for(x = 2; te > e && x < 100; x++) {
        kk = ceil(x * log(2));
        te =  pow((1 - exp((double)(-kk) / x)), kk);
    }

    /* overflow check. */
    if ((double)(x - 1) * n > (UINT64_RC)(-1)) return 0;

    UINT64_RC mm = (x - 1) * n;
    UINT64_RC bytes = (((mm + 0x1F) & (~0x1FULL)) >> 3) + sizeof(bloom_t);

    /* overflow check. */
    if (bytes > (size_t)(-1)) return 0;

    *k = kk;
    *tmp_e = te;
    *m = mm;

    return (size_t)bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movsd %xmm0, 0x10(%rsp)
movq %rdi, %r12
movsd 0x2a86(%rip), %xmm0     # 0x5008
xorl %ebp, %ebp
pushq $0x1
popq %rax
movq %rdi, %r13
ucomisd 0x10(%rsp), %xmm0
jbe 0x25f4
leal 0x1(%rax), %ebx
cmpl $0x63, %ebx
ja 0x25f4
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x18(%rsp)
mulsd 0x2a6c(%rip), %xmm0     # 0x5018
callq 0x23f0
movapd %xmm0, 0x20(%rsp)
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
negl %eax
cvtsi2sd %eax, %xmm0
divsd 0x18(%rsp), %xmm0
callq 0x2420
movsd 0x2a32(%rip), %xmm2     # 0x5008
subsd %xmm0, %xmm2
cvttpd2dq 0x20(%rsp), %xmm0
cvtdq2pd %xmm0, %xmm1
movapd %xmm2, %xmm0
callq 0x20f0
addq %r12, %r13
movl %ebx, %eax
jmp 0x258a
cvtsi2sd %eax, %xmm1
movq %r12, %xmm2
punpckldq 0x2a1b(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x2a23(%rip), %xmm2     # 0x5030
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
ucomisd 0x29eb(%rip), %xmm3     # 0x5010
jbe 0x262b
xorl %eax, %eax
jmp 0x264a
leaq 0x1f(%r13), %rax
shrq $0x5, %rax
leaq 0x80(,%rax,4), %rax
movl %ebp, (%r15)
movq 0x8(%rsp), %rcx
movsd %xmm0, (%rcx)
movq %r13, (%r14)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq