LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: parsemoveseq(char const*)
moveseq parsemoveseq(const char *s) {
  moveseq r ;
  const char *faces = "UuFfRrDdBbLlIiJjKk" ;
  while (*s) {
    while (*s && *s <= ' ')
       s++ ;
    if (*s == 0 || *s == '/')
       break ;
    const char *fp = strchr(faces, *s) ;
    if (fp == 0) {
       cerr << "Illegal face in " << *s << endl ;
       exit(10) ;
    }
    int f = (fp - faces) / 2 ;
    if (f * TWISTS > NMOVES)
       error("! bad face for this metric") ;
    s++ ;
    switch (*s) {
case '-':
case '3':
case '\'':
       r.push_back(f*TWISTS+2) ;
       s++ ;
       break ;
case '2':
       r.push_back(f*TWISTS+1) ;
       s++ ;
       break ;
case '+':
case '1':
       s++ ;
default:
       r.push_back(f*TWISTS) ;
       break ;
    }
  }
  return r ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movb (%rsi), %al
testb %al, %al
je 0x27aa
movq %rsi, %rbp
leaq 0x39e8(%rip), %r14      # 0x606c
movabsq $0x8208000000000, %r12  # imm = 0x8208000000000
movabsq $0x2080000000000, %r13  # imm = 0x2080000000000
cmpb $0x20, %al
jg 0x26aa
movb 0x1(%rbp), %al
incq %rbp
testb %al, %al
je 0x26aa
cmpb $0x21, %al
jl 0x269c
testb %al, %al
je 0x27aa
movzbl %al, %esi
cmpl $0x2f, %esi
je 0x27aa
movl $0x13, %edx
movq %r14, %rdi
callq 0x2190
testq %rax, %rax
je 0x27bc
subq %r14, %rax
movq %rax, %r15
shrq $0x3f, %r15
addq %rax, %r15
shrq %r15
cmpl $0x7, %r15d
jl 0x26f6
leaq 0x399f(%rip), %rdi      # 0x6090
callq 0x5324
leal (%r15,%r15,2), %eax
leaq 0x1(%rbp), %r15
movzbl 0x1(%rbp), %ecx
cmpq $0x33, %rcx
ja 0x271b
btq %rcx, %r12
jb 0x2735
btq %rcx, %r13
jae 0x2755
addq $0x2, %rbp
movq %rbp, %r15
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x277e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x278b
addl $0x2, %eax
movl %eax, 0x14(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x276b
movq %rbx, %rdi
leaq 0x14(%rsp), %rdx
callq 0x3486
jmp 0x2775
cmpq $0x32, %rcx
jne 0x271b
incl %eax
movl %eax, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x279b
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
addq $0x2, %rbp
movq %rbp, %r15
jmp 0x278b
movq %rbx, %rdi
leaq 0xc(%rsp), %rdx
callq 0x3486
movb (%r15), %al
movq %r15, %rbp
testb %al, %al
jne 0x2698
jmp 0x27aa
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x3486
jmp 0x2775
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6825(%rip), %rdi      # 0x8fe8
leaq 0x38b5(%rip), %rsi      # 0x607f
movl $0x10, %edx
callq 0x21a0
movb (%rbp), %al
leaq 0xb(%rsp), %rsi
movb %al, (%rsi)
movq 0x6803(%rip), %rdi      # 0x8fe8
movl $0x1, %edx
callq 0x21a0
movq %rax, %rdi
callq 0x20a0
movl $0xa, %edi
callq 0x21c0
jmp 0x2809
jmp 0x2809
jmp 0x2809
jmp 0x2809
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2820
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_c_makefile_star2_O3/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: parseposition(cubepos&, char const*)
void parseposition(cubepos &cp, const char *s) {
  cp = identity_cube ;
  if (cp.parse_Singmaster(s) == 0) {
    cubepos cp2 ;
    cp.invert_into(cp2) ;
    cp = cp2 ;
    return ;
  }
  cp = identity_cube ;
  moveseq r = parsemoveseq(s) ;
  for (int i=0; i<r.size(); i++)
    cp.movepc(r[i]) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6e0a(%rip), %r15      # 0x9648
movl 0x10(%r15), %eax
movl %eax, 0x10(%rdi)
movups (%r15), %xmm0
movups %xmm0, (%rdi)
callq 0x3ae2
testq %rax, %rax
je 0x28b6
movl 0x10(%r15), %eax
movl %eax, 0x10(%rbx)
movups (%r15), %xmm0
movups %xmm0, (%rbx)
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2651
movq (%r15), %rdi
cmpq %rdi, 0x8(%r15)
je 0x28a2
xorl %r14d, %r14d
movl (%rdi,%r14,4), %esi
movq %rbx, %rdi
callq 0x4bfc
incq %r14
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r14, %rax
ja 0x287e
testq %rdi, %rdi
je 0x28e2
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x28e2
movl 0x10(%r15), %eax
movq %rsp, %r14
movl %eax, 0x10(%r14)
movups (%r15), %xmm0
movaps %xmm0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a98
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
movaps (%r14), %xmm0
movups %xmm0, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2905
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_c_makefile_star2_O3/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
testl %ecx, %ecx
jle 0x29f1
leaq 0x8(%rsp), %rax
movl $0x0, (%rax)
movl %ebp, %r13d
movslq %ebp, %rax
leal -0x1(%r14), %ecx
movl %ecx, 0xc(%rsp)
xorl %esi, %esi
leaq 0x10(%rsp), %r12
movq %rax, 0x30(%rsp)
leaq (%rax,%rax,4), %rbp
shlq $0x2, %rbp
movl 0x10(%r15), %eax
movl %eax, 0x20(%rsp)
movdqu (%r15), %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %r12, %rdi
callq 0x4bfc
movq 0x6c6b(%rip), %rsi      # 0x95e8
addq %rbp, %rsi
movq %r12, %rdi
callq 0x259c
cmpl %r14d, %eax
jge 0x29d3
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x29a7
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x29b4
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x35c2
movq %r12, %rdi
movl %r13d, %esi
movq %rbx, %rdx
movl 0xc(%rsp), %ecx
callq 0x290d
testl %eax, %eax
jne 0x2a75
addq $-0x4, 0x8(%rbx)
movl 0x8(%rsp), %eax
leal 0x1(%rax), %esi
movl %esi, 0x8(%rsp)
cmpl $0x10, %eax
jle 0x295b
movl %r13d, %ebp
movq 0x30(%rsp), %r12
jmp 0x29f4
movslq %ebp, %r12
movq 0x6bdd(%rip), %rcx      # 0x95d8
movq 0x6bce(%rip), %rax      # 0x95d0
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x2a3d
movl 0x10(%r15), %ecx
movl %ecx, 0x20(%rsp)
movdqu (%r15), %xmm0
movdqa %xmm0, 0x10(%rsp)
leaq (%rax,%r12,4), %rdx
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
je 0x2a7c
movl (%rdx), %esi
movl %esi, (%rax)
addq $0x4, %rax
movq %rax, 0x8(%rbx)
jmp 0x2a92
movdqu (%r15), %xmm0
leaq 0x6bff(%rip), %rax      # 0x9648
movdqu (%rax), %xmm1
pcmpeqb %xmm0, %xmm1
movd 0x10(%r15), %xmm0
movd 0x10(%rax), %xmm2
pcmpeqb %xmm0, %xmm2
pand %xmm1, %xmm2
pmovmskb %xmm2, %ecx
xorl %eax, %eax
cmpl $0xffff, %ecx           # imm = 0xFFFF
sete %al
jmp 0x2ac3
movl $0x1, %eax
jmp 0x2ac3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x35c2
movq 0x6b42(%rip), %rax      # 0x95d0
movl (%rax,%r12,4), %esi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x4bfc
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x290d
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x2ac3
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_O3/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 0x3902(%rip), %rsi      # 0x63e8
callq 0x21b0
movq %rax, %rbx
testq %rax, %rax
jne 0x2aff
leaq 0x35b1(%rip), %rdi      # 0x60ab
callq 0x5324
leaq 0x66da(%rip), %rdi      # 0x91e0
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdx
callq 0x2200
testq %rax, %rax
je 0x2bbb
leaq 0x66bd(%rip), %r14      # 0x91e0
movq %rsp, %r15
leaq 0x6afb(%rip), %r12      # 0x9628
leaq 0x6a9c(%rip), %r13      # 0x95d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x2651
movq 0x6a8a(%rip), %rdi      # 0x95d0
movq 0x6a93(%rip), %rsi      # 0x95e0
movaps (%rsp), %xmm0
movaps %xmm0, 0x6a78(%rip)     # 0x95d0
movq 0x10(%rsp), %rax
movq %rax, 0x6a7c(%rip)      # 0x95e0
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x2b97
subq %rdi, %rsi
callq 0x2180
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2b97
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %r12, %rdi
movq %r13, %rsi
callq 0x336c
movq %r14, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdx
callq 0x2200
testq %rax, %rax
jne 0x2b34
movq %rbx, %rdi
callq 0x2160
movq 0x63fe(%rip), %rbx      # 0x8fc8
leaq 0x34fd(%rip), %rsi      # 0x60ce
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21a0
movq 0x6a4b(%rip), %rax      # 0x9630
subq 0x6a3c(%rip), %rax      # 0x9628
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x34c6(%rip), %rsi      # 0x60d6
movl $0xb, %edx
movq %rax, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x698c(%rip), %rax      # 0x95e8
cmpq %rax, 0x698d(%rip)      # 0x95f0
je 0x2c6c
movq %rax, 0x6984(%rip)      # 0x95f0
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq 0x6950(%rip), %rdi      # 0x95d0
callq 0x3398
leaq 0x69bc(%rip), %rax      # 0x9648
movl 0x10(%rax), %ecx
movl %ecx, 0x10(%rsp)
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq 0x694f(%rip), %rsi      # 0x95f0
cmpq 0x6950(%rip), %rsi      # 0x95f8
je 0x2cc0
movups (%rax), %xmm0
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x14, 0x6932(%rip)     # 0x95f0
jmp 0x2ccf
leaq 0x6921(%rip), %rdi      # 0x95e8
movq %rsp, %rdx
callq 0x3904
movq 0x6902(%rip), %rax      # 0x95d8
movq 0x68f3(%rip), %rcx      # 0x95d0
subq %rcx, %rax
je 0x2d6d
movq $-0x4, %r15
xorl %r12d, %r12d
leaq 0x6d59(%rip), %r13      # 0x9a50
movq %rsp, %rbx
leaq 0x68e7(%rip), %r14      # 0x95e8
addq %rcx, %rax
movslq (%r15,%rax), %rax
movzbl (%r13,%rax), %esi
movq %rbx, %rdi
callq 0x4bfc
movq 0x68d3(%rip), %rsi      # 0x95f0
cmpq 0x68d4(%rip), %rsi      # 0x95f8
je 0x2d3e
movl 0x10(%rsp), %eax
movl %eax, 0x10(%rsi)
movaps (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x14, 0x68b4(%rip)     # 0x95f0
jmp 0x2d49
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3904
incq %r12
movq 0x6885(%rip), %rax      # 0x95d8
movq 0x6876(%rip), %rcx      # 0x95d0
subq %rcx, %rax
movq %rax, %rdx
sarq $0x2, %rdx
addq $-0x4, %r15
cmpq %r12, %rdx
ja 0x2d01
movq 0x6874(%rip), %rax      # 0x95e8
movq 0x6875(%rip), %rcx      # 0x95f0
cmpq %rcx, %rax
setne %dl
addq $-0x14, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x2dd5
addq $0x14, %rax
movl -0x4(%rax), %edx
movl %edx, 0x30(%rsp)
movups -0x14(%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movl 0x10(%rcx), %edx
movl %edx, -0x4(%rax)
movups (%rcx), %xmm0
movups %xmm0, -0x14(%rax)
movl 0x30(%rsp), %edx
movl %edx, 0x10(%rcx)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rcx)
addq $-0x14, %rcx
leaq 0x14(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x2d99
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa76(%rip), %xmm1      # 0x20d8
addsd 0xa76(%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_O3/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 0x151a
movq %rax, %r14
testl %r14d, %r14d
js 0x171f
je 0x1726
movl %r14d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq -0x1010(%rbp), %rsi
movl %ebx, %edi
callq 0x15c5
testq %rax, %rax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnsl %r14d, %eax
jmp 0x1728
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1728
xorl %eax, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
testq %rdx, %rdx
je 0x1789
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
xorl %ebx, %ebx
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10e0
movq %rax, %rcx
orq %rbx, %rcx
je 0x1789
testq %rax, %rax
je 0x178d
cmpq $-0x1, %rax
jne 0x177c
callq 0x1030
cmpl $0x4, (%rax)
jne 0x1798
xorl %eax, %eax
addq %rax, %rbx
addq %rax, %r15
subq %rax, %r14
jne 0x174f
jmp 0x179f
xorl %ebx, %ebx
jmp 0x179f
callq 0x1030
movl $0x16, (%rax)
movq $-0x1, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rsi, %r14
movl %edi, %r15d
cmpl $0x2, %edx
movl $0x1, %r13d
cmovgel %edx, %r13d
decl %r13d
xorl %ebx, %ebx
cmpq %r13, %rbx
je 0x1818
leaq (%r14,%rbx), %r12
movl $0x1, %edx
movl %r15d, %edi
movq %r12, %rsi
callq 0x10e0
cmpl $-0x1, %eax
jne 0x17fb
callq 0x1030
cmpl $0x4, (%rax)
je 0x17da
jmp 0x1823
movl %eax, %ecx
orl %ebx, %ecx
je 0x1839
testl %eax, %eax
je 0x1818
incq %rbx
cmpb $0xa, (%r12)
jne 0x17d1
movl %ebx, %eax
movb $0x0, (%r14,%rax)
jmp 0x1828
callq 0x1030
movl $0x16, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x1828
// File: /workspace/github_c_makefile_star2_O3/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 0x1624
movl %r15d, %edi
movq %rax, %rsi
callq 0x188f
cmpl $-0x1, %eax
je 0x187d
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x151a
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x16, %r12d
cmpl $0x3ff, %edi            # imm = 0x3FF
jbe 0x18be
callq 0x1030
movl %r12d, (%rax)
jmp 0x19fe
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %edi, %r13d
shrl $0x6, %r13d
movq %rax, -0x38(%rbp)
orq %rax, -0xd0(%rbp,%r13,8)
leaq -0x48(%rbp), %rdx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x1a53
cmpl $-0x1, %eax
je 0x19fe
incl %r15d
leaq -0xd0(%rbp), %rsi
leaq -0x48(%rbp), %r8
movl %r15d, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1100
cmpl $-0x1, %eax
je 0x1963
xorl %ecx, %ecx
testl %eax, %eax
jne 0x1a03
movl $0x3e, %r12d
jmp 0x18b1
callq 0x1030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x19fe
movq %r14, %r12
movq %r14, %rdi
movq %rbx, %r14
movq %rbx, %rsi
leaq -0x48(%rbp), %rbx
movq %rbx, %rdx
callq 0x1a53
cmpl $-0x1, %eax
je 0x19fe
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movq -0x38(%rbp), %rax
orq %rax, -0xd0(%rbp,%r13,8)
movl %r15d, %edi
leaq -0xd0(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x1100
cmpl $-0x1, %eax
movq %r14, %rbx
movq %r12, %r14
je 0x196c
jmp 0x194e
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1734
cmpl %r14d, %eax
jne 0x1a48
movl %r15d, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x15c5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1a95
movq $-0xf4240, %rax         # imm = 0xFFF0BDC0
movl $0x1, %ecx
jmp 0x1aa6
testq %rbx, %rbx
jns 0x1ab3
movl $0xf4240, %eax          # imm = 0xF4240
movq $-0x1, %rcx
addq %rcx, %r14
movq %r14, (%r15)
addq %rax, %rbx
movq %rbx, 0x8(%r15)
testq %r14, %r14
js 0x1abf
xorl %eax, %eax
orq %rbx, %r14
jne 0x1acf
callq 0x1030
movl $0x3e, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movaps 0x591(%rip), %xmm0      # 0x20f0
leaq -0x40(%rbp), %rdx
movups %xmm0, (%rdx)
movl $0x0, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
movq $0x0, 0x28(%rdx)
leaq -0x10(%rbp), %rcx
xorl %esi, %esi
callq 0x1190
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x1ba6
movq -0x10(%rbp), %rdi
movq 0x18(%rdi), %rax
movl 0x4(%rax), %eax
movl %eax, (%rbx)
callq 0x11b0
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x1ecf
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1c9d
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x11c0
cmpl $-0x1, %eax
je 0x1c9d
movl %eax, %r14d
leaq -0x24(%rbp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x1060
cmpl $-0x1, %eax
je 0x1c7c
leaq -0x34(%rbp), %rsi
movw $0x2, (%rsi)
movl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
movl %r14d, %edi
movl $0x10, %edx
callq 0x1120
cmpl $-0x1, %eax
je 0x1c5c
movl %r14d, %edi
movl $0x32, %esi
callq 0x1110
cmpl $-0x1, %eax
je 0x1c5c
movl %r14d, %ebx
jmp 0x1c9d
callq 0x1030
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x1c9a
cmpl $0x4, (%r15)
je 0x1c67
jmp 0x1c9a
callq 0x1030
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x1c9a
cmpl $0x4, (%r15)
je 0x1c87
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_O3/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 0x1cf8
callq 0x1030
cmpl $0x4, (%rax)
je 0x1cd6
jmp 0x1d17
testq %r14, %r14
sete %al
cmpl $0x0, -0x2c(%rbp)
setle %cl
orb %al, %cl
jne 0x1d17
movl -0x3c(%rbp), %edi
movq %r14, %rsi
movl -0x2c(%rbp), %edx
callq 0x1adc
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_O3/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 0x1b4c
cmpl $-0x1, %eax
je 0x1da7
rolw $0x8, %bx
movw %bx, -0x3e(%rbp)
movw $0x2, -0x40(%rbp)
callq 0x1ecf
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1db7
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x11c0
cmpl $-0x1, %eax
je 0x1db7
movl %eax, %r15d
movl %eax, %r14d
leaq -0x40(%rbp), %rsi
movl %r15d, %edi
movl $0x10, %edx
callq 0x1180
cmpl $-0x1, %eax
je 0x1dcb
movl %r14d, %ebx
jmp 0x1db7
callq 0x1030
movl $0x16, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1030
movq %rax, %r12
movl (%rax), %r13d
cmpl $0x72, %r13d
je 0x1de6
cmpl $0x4, %r13d
jne 0x1eb9
xorps %xmm0, %xmm0
leaq -0xc0(%rbp), %rdx
movaps %xmm0, 0x70(%rdx)
movaps %xmm0, 0x60(%rdx)
movaps %xmm0, 0x50(%rdx)
movaps %xmm0, 0x40(%rdx)
movaps %xmm0, 0x30(%rdx)
movaps %xmm0, 0x20(%rdx)
leal 0x3f(%r15), %eax
testl %r15d, %r15d
cmovnsl %r15d, %eax
movl %eax, %esi
andl $-0x40, %esi
movl %r15d, %ecx
subl %esi, %ecx
movl $0x1, %r13d
shlq %cl, %r13
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
sarl $0x6, %eax
cltq
incl %r15d
movq %rax, -0x30(%rbp)
orq %r13, -0xc0(%rbp,%rax,8)
movl %r15d, %edi
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1100
cmpl $-0x1, %eax
jne 0x1da2
movq %r13, %rax
movl (%r12), %r13d
cmpl $0x4, %r13d
jne 0x1eb9
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movq %rax, %r13
movq -0x30(%rbp), %rax
orq %r13, -0xc0(%rbp,%rax,8)
movl %r15d, %edi
xorl %esi, %esi
leaq -0xc0(%rbp), %rdx
jmp 0x1e46
cmpl $0x4, (%r12)
jne 0x1ec6
movl %r14d, %edi
callq 0x10c0
cmpl $-0x1, %eax
je 0x1eb2
movl %r13d, (%r12)
jmp 0x1db7
// File: /workspace/github_c_makefile_star2_O3/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
leaq -0xa0(%rbp), %rdx
movl $0xd, %edi
xorl %esi, %esi
callq 0x1050
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1f23
cmpq $0x0, -0xa0(%rbp)
jne 0x1f21
leaq -0xa0(%rbp), %rsi
movq $0x1, (%rsi)
movl $0xd, %edi
xorl %edx, %edx
callq 0x1050
cmpl $-0x1, %eax
je 0x1f23
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2c20
shrl $0x10, %eax
movl %eax, (%rdi)
addl $-0x10, %ecx
movq 0x8(%rdi), %rdx
cmpq 0x10(%rdi), %rdx
jae 0x2c20
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 0x44e0(%rip), %rdx      # 0x7110
andl (%rdx,%rcx,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
testl %esi, %esi
je 0x4d39
movl %esi, %r12d
xorl %r13d, %r13d
testq %rbx, %rbx
je 0x4d2d
leaq (,%r13,8), %r15
addq %r13, %r15
movq (%rbx,%r15,8), %rdi
callq 0x1030
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1030
movq 0x10(%rbx,%r15,8), %rdi
callq 0x1030
movq 0x20(%rbx,%r15,8), %rdi
movl 0x1c(%rbx,%r15,8), %esi
callq 0x62b3
movq 0x30(%rbx,%r15,8), %rdi
movl 0x28(%rbx,%r15,8), %esi
callq 0x62ff
movq 0x40(%rbx,%r15,8), %r14
movl 0x38(%rbx,%r15,8), %ebp
testq %rbp, %rbp
je 0x4d25
leaq 0x30(%r14), %r15
testq %r14, %r14
je 0x4d1c
movq -0x28(%r15), %rdi
movl -0x30(%r15), %esi
callq 0x62b3
movq -0x20(%r15), %rdi
callq 0x1030
movq -0x10(%r15), %rdi
movl -0x18(%r15), %esi
callq 0x62ff
movq %r15, %rdi
callq 0x632f
movq -0x8(%r15), %rdi
callq 0x1030
addq $0x60, %r15
decq %rbp
jne 0x4ce3
movq %r14, %rdi
callq 0x1030
incq %r13
cmpq %r12, %r13
jne 0x4c81
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_O3/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
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movb $0x0, 0x10(%rsp)
testl %esi, %esi
je 0x5d59
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
movq 0x5314(%rip), %r12      # 0xaff8
xorl %ebp, %ebp
xorl %r13d, %r13d
testb $0xf, %bpl
jne 0x5d13
testq %rbp, %rbp
je 0x5cff
movq %rsp, %rdi
callq 0x2804
xorl %r13d, %r13d
movq (%r12), %rdi
leaq 0x189b(%rip), %rsi      # 0x75a5
movl %ebp, %edx
xorl %eax, %eax
callq 0x1100
movq (%r12), %rdi
movzbl (%r14,%rbp), %edx
leaq 0x1888(%rip), %rsi      # 0x75ab
xorl %eax, %eax
callq 0x1100
movzbl (%r14,%rbp), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
movl $0x2e, %ecx
cmovael %ecx, %eax
movl %r13d, %ecx
movb %al, (%rsp,%rcx)
incl %r13d
movb $0x0, (%rsp,%r13)
incq %rbp
cmpq %rbp, %r15
jne 0x5ce9
cmpb $0x0, (%rsp)
jne 0x5d68
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0xf, %ebx
je 0x5d74
movl %ebx, %edi
callq 0x2828
movq (%r12), %rdi
leaq 0x181e(%rip), %rsi      # 0x759d
movq %rsp, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x5d59
// File: /workspace/github_c_makefile_star2_O3/pali[P]bmfdec/./bmfparse.c
// Function: parse_string
static char *parse_string(char *buf, uint32_t size) {
  uint16_t *buf2 = (uint16_t *)buf;
  if (size % 2 != 0) error("Invalid size");
  char *out = malloc(size+1);
  if (!out) error("malloc failed");
  uint32_t i, j;
  for (i=0, j=0; i<size/2; ++i) {
    if (buf2[i] == 0) {
      break;
    } else if (buf2[i] < 0x80) {
      out[j++] = buf2[i];
    } else if (buf2[i] < 0x800) {
      out[j++] = 0xC0 | (buf2[i] >> 6);
      out[j++] = 0x80 | (buf2[i] & 0x3F);
    } else if (buf2[i] >= 0xD800 && buf2[i] <= 0xDBFF && i+1 < size/2 && buf2[i+1] >= 0xDC00 && buf2[i+1] <= 0xDFFF) {
      uint32_t c = 0x10000 + ((buf2[i] - 0xD800) << 10) + (buf2[i+1] - 0xDC00);
      ++i;
      out[j++] = 0xF0 | (c >> 18);
      out[j++] = 0x80 | ((c >> 12) & 0x3F);
      out[j++] = 0x80 | ((c >> 6) & 0x3F);
      out[j++] = 0x80 | (c & 0x3F);
    } else {
      out[j++] = 0xE0 | (buf2[i] >> 12);
      out[j++] = 0x80 | ((buf2[i] >> 6) & 0x3F);
      out[j++] = 0x80 | (buf2[i] & 0x3F);
    }
  }
  out[j] = 0;
  return out;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testb $0x1, %bl
jne 0x5eef
movq %rdi, %r14
movl %ebx, %edi
orl $0x1, %edi
callq 0x1130
testq %rax, %rax
je 0x5ef4
xorl %edx, %edx
testl %ebx, %ebx
je 0x5ee3
shrl %ebx
xorl %ecx, %ecx
movl %edx, %esi
movzwl (%r14,%rsi,2), %esi
testl %esi, %esi
je 0x5ee1
cmpw $0x7f, %si
ja 0x5de1
movl $0x1, %r8d
movl %ecx, %r9d
jmp 0x5ecd
movl %ecx, %r8d
movl %esi, %edi
cmpl $0x7ff, %esi            # imm = 0x7FF
ja 0x5e10
shrl $0x6, %edi
orb $-0x40, %dil
leal 0x1(%rcx), %r9d
movb %dil, (%rax,%r8)
andb $0x3f, %sil
orb $-0x80, %sil
movl $0x2, %r8d
jmp 0x5ecd
andl $0xfc00, %edi           # imm = 0xFC00
cmpl $0xd800, %edi           # imm = 0xD800
jne 0x5e99
leal 0x1(%rdx), %edi
cmpl %ebx, %edi
jae 0x5e99
movl %edi, %r9d
movzwl (%r14,%r9,2), %r10d
movl %r10d, %r9d
andl $0xfc00, %r9d           # imm = 0xFC00
cmpl $0xdc00, %r9d           # imm = 0xDC00
jne 0x5e99
shll $0xa, %esi
leal (%rsi,%r10), %edx
addl $0xfca02400, %edx       # imm = 0xFCA02400
movl %edx, %esi
shrl $0x12, %esi
orb $-0x10, %sil
leal 0x1(%rcx), %r9d
movb %sil, (%rax,%r8)
movl %edx, %esi
shrl $0xc, %esi
andb $0x3f, %sil
orb $-0x80, %sil
leal 0x2(%rcx), %r8d
movb %sil, (%rax,%r9)
shrl $0x6, %edx
andb $0x3f, %dl
orb $-0x80, %dl
leal 0x3(%rcx), %r9d
movb %dl, (%rax,%r8)
andb $0x3f, %r10b
orb $-0x80, %r10b
movl $0x4, %r8d
movl %r10d, %esi
movl %edi, %edx
jmp 0x5ecd
movl %esi, %edi
shrl $0xc, %edi
orb $-0x20, %dil
leal 0x1(%rcx), %r10d
movb %dil, (%rax,%r8)
movl %esi, %edi
shrl $0x6, %edi
andb $0x3f, %dil
orb $-0x80, %dil
leal 0x2(%rcx), %r9d
movb %dil, (%rax,%r10)
andb $0x3f, %sil
orb $-0x80, %sil
movl $0x3, %r8d
addl %r8d, %ecx
movl %r9d, %edi
movb %sil, (%rax,%rdi)
incl %edx
cmpl %ebx, %edx
jb 0x5dbe
movl %ecx, %edx
movb $0x0, (%rax,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x286c
callq 0x28a1
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x10a0
movq %rax, %r15
testl %r15d, %r15d
jle 0x5f54
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movzbl (%rbx,%r12), %eax
cmpl $0x5c, %eax
je 0x5f30
cmpl $0x22, %eax
jne 0x5f41
movl $0x5c, %edi
movq %r14, %rsi
callq 0x10d0
movb (%rbx,%r12), %al
movsbl %al, %edi
movq %r14, %rsi
callq 0x10d0
incq %r12
cmpq %r12, %r15
jne 0x5f21
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x61e7
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x5f60
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x625c
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10d0
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x5ef9
movl 0x18(%r14), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x6254
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x10d0
cmpb $0x0, 0x2c(%r14)
je 0x6240
movl 0x28(%r14), %edx
leaq 0x174a(%rip), %rsi      # 0x7980
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movl $0x5d, %edi
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_O3/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
testl %esi, %esi
je 0x62f2
movl %esi, %r14d
shlq $0x5, %r14
xorl %r15d, %r15d
testq %rbx, %rbx
je 0x62e9
movq 0x8(%rbx,%r15), %rdi
callq 0x1030
cmpl $0x3, (%rbx,%r15)
jne 0x62e9
movq 0x18(%rbx,%r15), %rdi
callq 0x1030
addq $0x20, %r15
cmpq %r15, %r14
jne 0x62c9
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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
testl %esi, %esi
je 0x6322
movl %esi, %r15d
movq %rbx, %r14
movq %r14, %rdi
callq 0x632f
addq $0x30, %r14
decq %r15
jne 0x6311
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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 0x6363
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
movl (%rbx), %esi
callq 0x62b3
movl 0x18(%rbx), %eax
cmpl $0x4, %eax
je 0x6359
cmpl $0x2, %eax
jne 0x6363
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0x1030
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x957(%rip), %rdi       # 0x2154
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x1534
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
movl %r13d, (%r15)
leaq 0x8(%rsp), %r12
movl %r13d, (%r12)
movb $0x41, %al
leaq 0x938(%rip), %rbp       # 0x215f
leaq 0x1(%r13), %rbx
movsbl %al, %edi
leaq 0x91f(%rip), %rsi       # 0x2154
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x1582
movb 0x1(%r13,%rbp), %al
movq %rbx, %r13
cmpq $0x20, %rbx
jne 0x1827
movl 0x8(%rsp), %edx
cmpl $0x2, %edx
jne 0x1863
leaq 0x8eb(%rip), %rax       # 0x214c
jmp 0x187d
leaq 0x916(%rip), %rdi       # 0x2180
movl $0x2, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x8d3(%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_O3/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 0x8fc(%rip), %rbx       # 0x219f
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1534
xorl %eax, %eax
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
leaq 0x8(%rsp), %r12
movl %eax, (%r12)
movb $0x44, %al
movl $0x1, %r13d
leaq 0x8d9(%rip), %rbp       # 0x21ae
movsbl %al, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x1582
movb (%r13,%rbp), %al
incq %r13
cmpq $0x1a, %r13
jne 0x18d5
movl 0x8(%rsp), %edx
cmpl $0x2, %edx
jne 0x1909
leaq 0x845(%rip), %rax       # 0x214c
jmp 0x1923
leaq 0x8b8(%rip), %rdi       # 0x21c8
movl $0x2, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x82d(%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_O3/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 0x8a3(%rip), %rbx       # 0x21ec
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1534
xorl %eax, %eax
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
leaq 0x8(%rsp), %r12
movl %eax, (%r12)
movb $0x41, %al
movl $0x1, %r13d
leaq 0x86c(%rip), %rbp       # 0x21e7
movsbl %al, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x1582
movb (%r13,%rbp), %al
incq %r13
cmpq $0x8, %r13
jne 0x197b
movl 0x8(%rsp), %edx
cmpl $0x3, %edx
jne 0x19af
leaq 0x79f(%rip), %rax       # 0x214c
jmp 0x19c9
leaq 0x839(%rip), %rdi       # 0x21ef
movl $0x3, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x787(%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_O3/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 0x767(%rip), %r14       # 0x214c
callq 0x17e8
movl %eax, %ebx
andl (%r14), %ebx
callq 0x188e
movl %eax, %ebp
andl %ebx, %ebp
callq 0x1934
testl %eax, %ebp
je 0x1a11
leaq 0x806(%rip), %rdi       # 0x220e
xorl %eax, %eax
callq 0x16c5
jmp 0x1a1f
leaq 0x80c(%rip), %rdi       # 0x2224
xorl %eax, %eax
callq 0x1090
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq