LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/utils.c
// Function: dir_list_ext
void dir_list_ext(const char *dir, const char *extension, dir_list *list)
{
   char *pool;
   char *pool_ptr;
   struct dirent *entry;
   DIR *dfd;
   int idx;

   dfd = opendir(dir);
   if (dfd == NULL) {
      ERROR("Can't open '%s'\n", dir);
      exit(1);
   }

   pool = malloc(FILENAME_MAX * MAX_DIR_FILES);
   pool_ptr = pool;

   idx = 0;
   while ((entry = readdir(dfd)) != NULL && idx < MAX_DIR_FILES) {
      if (!extension || str_ends_with(entry->d_name, extension)) {
         sprintf(pool_ptr, "%s/%s", dir, entry->d_name);
         list->files[idx] = pool_ptr;
         pool_ptr += strlen(pool_ptr) + 1;
         idx++;
      }
   }
   list->count = idx;

   closedir(dfd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
callq 0x10c0
testq %rax, %rax
je 0x2f44
movq %rax, %r12
movl $0x80000, %edi          # imm = 0x80000
callq 0x11d0
movq %rax, %r13
xorl %r14d, %r14d
movq %r12, %rdi
callq 0x11c0
testq %rax, %rax
je 0x2f23
cmpl $0x7f, %r14d
ja 0x2f23
movq %rax, %rbx
testq %r15, %r15
je 0x2ee9
leaq 0x13(%rbx), %rdi
movq %r15, %rsi
callq 0x2f68
testl %eax, %eax
je 0x2ebe
addq $0x13, %rbx
movq %r13, %rdi
leaq 0xe1cc(%rip), %rsi      # 0x110c3
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1260
movl %r14d, %eax
movq -0x38(%rbp), %rcx
movq %r13, (%rcx,%rax,8)
movq %r13, %rdi
callq 0x10d0
addq %rax, %r13
incq %r13
incl %r14d
jmp 0x2ebe
movq -0x38(%rbp), %rax
movl %r14d, 0x400(%rax)
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
movq 0x150a5(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xe15d(%rip), %rsi      # 0x110b2
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x1170
pushq $0x1
popq %rdi
callq 0x1270
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/utils.c
// Function: str_ends_with
int str_ends_with(const char *str, const char *suffix)
{
   if (!str || !suffix) {
      return 0;
   }
   size_t len_str = strlen(str);
   size_t len_suffix = strlen(suffix);
   if (len_suffix > len_str) {
      return 0;
   }
   return (0 == strncmp(str + len_str - len_suffix, suffix, len_suffix));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0x2fbe
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10d0
movq %rax, %r12
movq %rbx, %rdi
callq 0x10d0
cmpq %r12, %rax
ja 0x2fbe
addq %r12, %r14
subq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1060
xorl %r15d, %r15d
testl %eax, %eax
sete %r15b
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/./stb/stb_image_write.h
// Function: stbi__start_write_file
static int stbi__start_write_file(stbi__write_context *s, const char *filename)
{
   FILE *f;
#ifdef STBI_MSC_SECURE_CRT
   if (fopen_s(&f, filename, "wb"))
      f = NULL;
#else
   f = fopen(filename, "wb");
#endif
   stbi__start_write_callbacks(s, stbi__stdio_write, (void *) f);
   return f != NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xc7c6(%rip), %rsi      # 0x110a9
movq %rax, %rdi
callq 0x1230
leaq 0xb517(%rip), %rcx      # 0xfe09
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/./stb/stb_image_write.h
// Function: stbi_write_hdr_core
static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data)
{
   if (y <= 0 || x <= 0 || data == NULL)
      return 0;
   else {
      // Each component is stored separately. Allocate scratch space for full output scanline.
      unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);
      int i, len;
      char buffer[128];
      char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
      s->func(s->context, header, sizeof(header)-1);

#ifdef STBI_MSC_SECURE_CRT
      len = sprintf_s(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
#else
      len = sprintf(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
#endif
      s->func(s->context, buffer, len);

      for(i=0; i < y; i++)
         stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*x*(stbi__flip_vertically_on_write ? y-1-i : i)*x);
      STBIW_FREE(scratch);
      return 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %edx, %r15d
movl %esi, %r13d
testl %edx, %edx
setle %al
testl %esi, %esi
setle %sil
orb %al, %sil
movq %r8, -0x40(%rbp)
testq %r8, %r8
sete %dl
xorl %eax, %eax
orb %sil, %dl
jne 0x528c
movq %rdi, %r14
leal (,%r13,4), %edi
movl %ecx, %r12d
callq 0x11d0
movq %rax, -0x30(%rbp)
leaq 0xf2b6(%rip), %rsi      # 0x144a0
pushq $0x42
popq %rcx
leaq -0x110(%rbp), %rax
movq %rax, %rdi
rep  movsb (%rsi), %es:(%rdi)
movq 0x8(%r14), %rdi
pushq $0x41
popq %rdx
movq %rax, %rsi
callq *(%r14)
leaq 0xef6c(%rip), %rsi      # 0x14179
xorl %ebx, %ebx
leaq -0xc0(%rbp), %rdi
movl %r15d, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x1260
movq 0x8(%r14), %rdi
leaq -0xc0(%rbp), %rsi
movl %eax, %edx
movq %r14, -0x38(%rbp)
callq *(%r14)
movq %r13, %rcx
imull %r12d, %r13d
movq %rcx, %r14
imull %ecx, %r13d
decl %r15d
cmpl $-0x1, %r15d
je 0x5280
cmpl $0x0, 0x12faf(%rip)     # 0x18204
movl %r15d, %eax
cmovel %ebx, %eax
imull %r13d, %eax
cltq
movq -0x40(%rbp), %rcx
leaq (%rcx,%rax,4), %r8
movq -0x38(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
movq -0x30(%rbp), %rcx
callq 0x4ed3
incl %ebx
jmp 0x5245
movq -0x30(%rbp), %rdi
callq 0x1040
pushq $0x1
popq %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/./stb/stb_image_write.h
// Function: stbi_write_png
STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
{
   FILE *f;
   int len;
   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;
#ifdef STBI_MSC_SECURE_CRT
   if (fopen_s(&f, filename, "wb"))
      f = NULL;
#else
   f = fopen(filename, "wb");
#endif
   if (!f) { STBIW_FREE(png); return 0; }
   fwrite(png, 1, len, f);
   fclose(f);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r10d
movl %ecx, %eax
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %r14
leaq -0x14(%rbp), %r9
movq %r8, %rdi
movl %r10d, %esi
movl %eax, %r8d
callq 0x5b79
testq %rax, %rax
je 0x61c6
movq %rax, %rbx
leaq 0xaf13(%rip), %rsi      # 0x110a9
movq %r14, %rdi
callq 0x1230
testq %rax, %rax
je 0x61cb
movq %rax, %r14
movslq -0x14(%rbp), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x1280
movq %r14, %rdi
callq 0x10b0
pushq $0x1
popq %r14
jmp 0x61ce
xorl %r14d, %r14d
jmp 0x61d6
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1040
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/n64graphics_ci.c
// Function: raw2rgba
rgba *raw2rgba(const uint8_t *raw, int width, int height, int depth)
{
    rgba *img;
    int img_size;

    img_size = width * height * sizeof(*img);
    img = malloc(img_size);
    if (!img) {
        ERROR("Error allocating %d bytes\n", img_size);
        return NULL;
    }

    if (depth == 16) {
        for (int i = 0; i < width * height; i++) {
            img[i].red = SCALE_5_8((raw[i * 2] & 0xF8) >> 3);
            img[i].green = SCALE_5_8(((raw[i * 2] & 0x07) << 2) | ((raw[i * 2 + 1] & 0xC0) >> 6));
            img[i].blue = SCALE_5_8((raw[i * 2 + 1] & 0x3E) >> 1);
            img[i].alpha = (raw[i * 2 + 1] & 0x01) ? 0xFF : 0x00;
        }
    }
    else if (depth == 32) {
        for (int i = 0; i < width * height; i++) {
            img[i].red = raw[i * 4];
            img[i].green = raw[i * 4 + 1];
            img[i].blue = raw[i * 4 + 2];
            img[i].alpha = raw[i * 4 + 3];
        }
    }

    return img;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movl %esi, %r14d
movq %rdi, %r15
imull %edx, %r14d
leal (,%r14,4), %r13d
movslq %r13d, %rdi
callq 0x11d0
movq %rax, %rbx
testq %rax, %rax
je 0x6a89
cmpl $0x10, %r12d
je 0x6a13
cmpl $0x20, %r12d
jne 0x6aa4
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
cmpq %rax, %r14
je 0x6aa4
movb (%r15,%rax,4), %cl
movb %cl, (%rbx,%rax,4)
movb 0x1(%r15,%rax,4), %cl
movb %cl, 0x1(%rbx,%rax,4)
movb 0x2(%r15,%rax,4), %cl
movb %cl, 0x2(%rbx,%rax,4)
movb 0x3(%r15,%rax,4), %cl
movb %cl, 0x3(%rbx,%rax,4)
incq %rax
jmp 0x69e3
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
movw $0x1f, %cx
xorl %esi, %esi
cmpq %rsi, %r14
je 0x6aa4
movzbl (%r15,%rsi,2), %r8d
movl %r8d, %eax
shrl $0x3, %eax
imull $0xff, %eax, %eax
xorl %edx, %edx
divw %cx
movb %al, (%rbx,%rsi,4)
andl $0x7, %r8d
movzbl 0x1(%r15,%rsi,2), %edi
movl %edi, %eax
shrl $0x6, %eax
leal (%rax,%r8,4), %eax
imull $0xff, %eax, %eax
xorl %edx, %edx
divw %cx
movb %al, 0x1(%rbx,%rsi,4)
movl %edi, %eax
shrl %eax
andl $0x1f, %eax
imull $0xff, %eax, %eax
xorl %edx, %edx
divw %cx
movb %al, 0x2(%rbx,%rsi,4)
andb $0x1, %dil
negb %dil
movb %dil, 0x3(%rbx,%rsi,4)
incq %rsi
jmp 0x6a22
movq 0x11560(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xc9d8(%rip), %rsi      # 0x13472
movl %r13d, %edx
xorl %eax, %eax
callq 0x1170
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/DavidSM64[P]n64graphics_ci/n64graphics_ci.c
// Function: rawci2rgba
rgba *rawci2rgba(const uint8_t *rawci, const uint8_t *palette, int width, int height, int depth)
{
    uint8_t *raw_rgba;
    rgba *img = NULL;
    int raw_size;
    int pal_index_1;
    int pal_index_2;

    // first convert to raw RGBA
    raw_size = 2 * width * height;
    raw_rgba = malloc(raw_size);
    if (!raw_rgba) {
        ERROR("Error allocating %u bytes\n", raw_size);
        return NULL;
    }

    if (depth == 4) { // CI4
        for (int i = 0; i < (width * height) / 2; i++) {
            pal_index_1 = rawci[i] >> 4;
            pal_index_2 = rawci[i] & 0xF;
            raw_rgba[i * 4 + 0] = palette[pal_index_1 * 2 + 0];
            raw_rgba[i * 4 + 1] = palette[pal_index_1 * 2 + 1];
            raw_rgba[i * 4 + 2] = palette[pal_index_2 * 2 + 0];
            raw_rgba[i * 4 + 3] = palette[pal_index_2 * 2 + 1];
        }
    } else { // CI8
        for (int i = 0; i < width * height; i++) {
            pal_index_1 = rawci[i];
            raw_rgba[i * 2 + 0] = palette[pal_index_1 * 2 + 0];
            raw_rgba[i * 2 + 1] = palette[pal_index_1 * 2 + 1];
        }
    }

    // then convert to RGBA image data
    img = raw2rgba(raw_rgba, width, height, 16);

    free(raw_rgba);

    return img;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x2c(%rbp)
movq %rsi, %r12
movq %rdi, %r13
movl %edx, -0x30(%rbp)
movl %edx, %ebx
movl %ecx, -0x34(%rbp)
imull %ecx, %ebx
leal (%rbx,%rbx), %r14d
movslq %r14d, %rdi
callq 0x11d0
testq %rax, %rax
je 0x6ba5
movq %rax, %r15
cmpl $0x4, -0x2c(%rbp)
jne 0x6b4e
pushq $0x2
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x6b77
movzbl (%r13,%rcx), %edx
movl %edx, %esi
shrl $0x3, %esi
movl %esi, %edi
andl $-0x2, %edi
movb (%r12,%rdi), %dil
movb %dil, (%r15,%rcx,4)
orq $0x1, %rsi
movb (%r12,%rsi), %sil
movb %sil, 0x1(%r15,%rcx,4)
andl $0xf, %edx
movb (%r12,%rdx,2), %sil
movb %sil, 0x2(%r15,%rcx,4)
movb 0x1(%r12,%rdx,2), %dl
movb %dl, 0x3(%r15,%rcx,4)
incq %rcx
jmp 0x6b09
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x6b77
movzbl (%r13,%rax), %ecx
movb (%r12,%rcx,2), %dl
movb %dl, (%r15,%rax,2)
movb 0x1(%r12,%rcx,2), %cl
movb %cl, 0x1(%r15,%rax,2)
incq %rax
jmp 0x6b55
pushq $0x10
popq %rcx
movq %r15, %rdi
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %edx
callq 0x6993
movq %rax, %rbx
movq %r15, %rdi
callq 0x1040
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x11444(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xc8d7(%rip), %rsi      # 0x1348d
movl %r14d, %edx
xorl %eax, %eax
callq 0x1170
xorl %eax, %eax
jmp 0x6b96
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/n64graphics_ci.c
// Function: rgba2png
int rgba2png(const char *png_filename, const rgba *img, int width, int height)
{
    int ret = 0;
    INFO("Saving RGBA %dx%d to \"%s\"\n", width, height, png_filename);

    // convert to format stb_image_write expects
    uint8_t *data = malloc(4 * width*height);
    if (data) {
        for (int j = 0; j < height; j++) {
            for (int i = 0; i < width; i++) {
                int idx = j*width + i;
                data[4 * idx] = img[idx].red;
                data[4 * idx + 1] = img[idx].green;
                data[4 * idx + 2] = img[idx].blue;
                data[4 * idx + 3] = img[idx].alpha;
            }
        }

        ret = stbi_write_png(png_filename, width, height, 4, data, 0);

        free(data);
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
leaq 0x1124e(%rip), %rax     # 0x181e8
cmpl $0x0, (%rax)
je 0x6fb5
leaq 0xc585(%rip), %rdi      # 0x1352b
movl %r14d, %esi
movl %ebx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10e0
movl %r14d, %eax
imull %ebx, %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x11d0
testq %rax, %rax
je 0x7063
movq %rax, %r13
xorl %eax, %eax
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
movslq %r14d, %rdx
testl %ebx, %ebx
movl $0x0, %esi
cmovgl %ebx, %esi
movq %r13, %rdi
addq $0x3, %rdi
shlq $0x2, %rdx
addq $0x3, %r12
cmpq %rsi, %rax
je 0x703f
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x7034
movb -0x3(%r12,%r8,4), %r9b
movb %r9b, -0x3(%rdi,%r8,4)
movb -0x2(%r12,%r8,4), %r9b
movb %r9b, -0x2(%rdi,%r8,4)
movb -0x1(%r12,%r8,4), %r9b
movb %r9b, -0x1(%rdi,%r8,4)
movb (%r12,%r8,4), %r9b
movb %r9b, (%rdi,%r8,4)
incq %r8
jmp 0x7004
incq %rax
addq %rdx, %rdi
addq %rdx, %r12
jmp 0x6ffc
pushq $0x4
popq %rcx
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x615e
movl %eax, %ebx
movq %r13, %rdi
callq 0x1040
movl %ebx, %eax
jmp 0x7065
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DavidSM64[P]n64graphics_ci/n64graphics_ci.c
// Function: getPaletteFilename
char* getPaletteFilename(char* ci_filename)
{
    int bin_filename_len;
    int extension_len;
    char* pal_bin_filename;
    char* extension_loc;
    char* extension;

    // Write Palette file
    bin_filename_len = strlen(ci_filename);
    extension_loc = strrchr(ci_filename, '.');
    extension_len = (int)(extension_loc - ci_filename);
    extension = malloc(extension_len);
    memcpy(extension, extension_loc, extension_len);
    pal_bin_filename = malloc(bin_filename_len + 4); // +4 to include ".pal"
    if (!pal_bin_filename) {
        ERROR("Error allocating bytes for palette filename\n");
    }
    memcpy(pal_bin_filename, ci_filename, bin_filename_len);
    strcpy(pal_bin_filename + bin_filename_len, ".pal");
    //strcpy(pal_bin_filename + bin_filename_len, extension);

    free(extension);

    return pal_bin_filename;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10d0
movq %rax, %r14
shlq $0x20, %r14
movabsq $0x400000000, %rdi      # imm = 0x400000000
addq %r14, %rdi
sarq $0x20, %rdi
callq 0x11d0
movq %rax, %r15
testq %rax, %rax
je 0x70f3
sarq $0x20, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11b0
movl $0x6c61702e, (%r15,%r14) # imm = 0x6C61702E
movb $0x0, 0x4(%r15,%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x10ef6(%rip), %rax     # 0x17ff0
movq (%rax), %rcx
leaq 0xc466(%rip), %rdi      # 0x1356a
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x1280
jmp 0x70c5
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/sysendian/main.c
// Function: perftest
static int
perftest(void)
{
	struct tests tests_actual;
	struct tests * tests = &tests_actual;

	/* Copy the tests into the volatile variables. */
	fill_testcases(tests);

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 1, NULL, perftest_func, NULL, tests)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x1923
movq %rbx, 0x10(%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x5aa(%rip), %rax       # 0x19c0
movq %rax, (%rsp)
leaq 0x1daf(%rip), %rsi      # 0x31d0
xorl %r14d, %r14d
pushq $0x2
popq %rdx
pushq $0x1
popq %rbx
movl $0x5f5e100, %edi        # imm = 0x5F5E100
movl $0x5f5e100, %ecx        # imm = 0x5F5E100
movl %ebx, %r8d
xorl %r9d, %r9d
callq 0x2394
testl %eax, %eax
je 0x145c
leaq 0x1bc0(%rip), %rdi      # 0x300a
xorl %eax, %eax
callq 0x296c
callq 0x1080
andl $0x0, (%rax)
movl %ebx, %r14d
movl %r14d, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/sysendian/main.c
// Function: fill_testcases
static void
fill_testcases(struct tests * tests)
{
	uint16_t val16;
	uint32_t val32;
	uint64_t val64;
	size_t i;

	/* Load 16-bit tests. */
	for (i = 0; i < 2; i++) {
		tests->val16[i] = tests16[i].val;
		memcpy(&val16, tests16[i].be_arr, 2);
		tests->val16_be[i] = val16;
		memcpy(&val16, tests16[i].le_arr, 2);
		tests->val16_le[i] = val16;
	}

	/* Load 32-bit tests. */
	for (i = 0; i < 4; i++) {
		tests->val32[i] = tests32[i].val;
		memcpy(&val32, tests32[i].be_arr, 4);
		tests->val32_be[i] = val32;
		memcpy(&val32, tests32[i].le_arr, 4);
		tests->val32_le[i] = val32;
	}

	/* Load 64-bit tests. */
	for (i = 0; i < 8; i++) {
		tests->val64[i] = tests64[i].val;
		memcpy(&val64, tests64[i].be_arr, 8);
		tests->val64_be[i] = val64;
		memcpy(&val64, tests64[i].le_arr, 8);
		tests->val64_le[i] = val64;
	}
}

// Assembly:
pushq $-0x4
popq %rax
leaq 0x37d7(%rip), %rcx      # 0x5104
testq %rax, %rax
je 0x1956
movzwl -0x4(%rcx), %edx
movw %dx, 0x4(%rdi,%rax)
movzwl -0x2(%rcx), %edx
movw %dx, 0x8(%rdi,%rax)
movzwl (%rcx), %edx
movw %dx, 0xc(%rdi,%rax)
addq $0x2, %rax
addq $0x6, %rcx
jmp 0x192d
pushq $-0x10
popq %rax
leaq 0x37b8(%rip), %rcx      # 0x5118
testq %rax, %rax
je 0x1983
movl -0x8(%rcx), %edx
movl %edx, 0x1c(%rdi,%rax)
movl -0x4(%rcx), %edx
movl %edx, 0x2c(%rdi,%rax)
movl (%rcx), %edx
movl %edx, 0x3c(%rdi,%rax)
addq $0x4, %rax
addq $0xc, %rcx
jmp 0x1960
pushq $-0x40
popq %rax
leaq 0x37c3(%rip), %rcx      # 0x5150
testq %rax, %rax
je 0x19bf
movq -0x10(%rcx), %rdx
movq %rdx, 0x80(%rdi,%rax)
movq -0x8(%rcx), %rdx
movq %rdx, 0xc0(%rdi,%rax)
movq (%rcx), %rdx
movq %rdx, 0x100(%rdi,%rax)
addq $0x8, %rax
addq $0x18, %rcx
jmp 0x198d
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/sysendian/main.c
// Function: perftest_func
static int
perftest_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct tests * tests = cookie;
	size_t nreps_i;

	(void)buf; /* UNUSED */

	if (buflen == 32) {
		for (nreps_i = 0; nreps_i < nreps; nreps_i++)
			PERFTEST_FULL(tests, 32);
	} else if (buflen == 64) {
		for (nreps_i = 0; nreps_i < nreps; nreps_i++)
			PERFTEST_FULL(tests, 64);
	}

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdi, %r14
cmpq $0x20, %rdx
je 0x1a3f
cmpq $0x40, %rdx
jne 0x1a7b
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
cmpq %rbx, %r12
je 0x1a7b
xorl %r13d, %r13d
cmpq $0x8, %r13
je 0x1a3a
movq 0x40(%r14,%r13,8), %rax
movq 0x40(%r14,%r13,8), %rax
movq 0x80(%r14,%r13,8), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0x1a8b
movq %rax, (%rsp)
movq 0xc0(%r14,%r13,8), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movq (%rsp), %rax
incq %r13
jmp 0x19f7
incq %r12
jmp 0x19eb
xorl %eax, %eax
pushq $-0x10
popq %rcx
cmpq %rbx, %rax
je 0x1a7b
movq %rcx, %rdx
testq %rdx, %rdx
je 0x1a76
movl 0x1c(%r14,%rdx), %esi
movl 0x1c(%r14,%rdx), %esi
movl 0x2c(%r14,%rdx), %esi
bswapl %esi
movl %esi, (%rsp)
movl 0x3c(%r14,%rdx), %esi
movl %esi, (%rsp)
movl (%rsp), %esi
addq $0x4, %rdx
jmp 0x1a4c
incq %rax
jmp 0x1a44
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/sysendian/main.c
// Function: print_arr
static void
print_arr(const char * str, const uint8_t * arr, size_t n)
{
	size_t i;

	printf("%s", str);
	for (i = 0; i < n; i++)
		printf("%02x ", arr[i]);
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x1938(%rip), %rdi      # 0x33e2
xorl %eax, %eax
callq 0x10d0
leaq 0x16d0(%rip), %r15      # 0x3188
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1ad4
movzbl (%r14,%r12), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10d0
incq %r12
jmp 0x1abb
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
nop
// File: /workspace/github_c_makefile_star2_O2/smilingthax[P]libfontembed/main.c
// Function: main
int main(int argc,char **argv)
{
  const char *fn=TESTFONT;
  if (argc==2) {
    fn=argv[1];
  }
  OTF_FILE *otf=otf_load(fn);
  assert(otf);
  printf("width(4): %d\n",otf_get_width(otf,4));


  if (strcmp(fn,"test.ttf")!=0) {
    example_write_fontdescr(otf,"test.ttf");
  } else {
    example_write_fontdescr(otf,NULL);
  }

  // show_post(otf);

  // show_name(otf);

  // show_cmap(otf);
  // printf("%d %d\n",otf_from_unicode(otf,'A'),0);

  // ... name 6 -> FontName  /20(cid)
  // ? StemV Flags(?) from FontName

  otf_close(otf);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jne 0x272f
movq 0x8(%rsi), %r14
jmp 0x2736
leaq 0x6968(%rip), %r14      # 0x909e
movq %r14, %rdi
callq 0x3231
testq %rax, %rax
je 0x279c
movq %rax, %rbx
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x3bd9
leaq 0x6995(%rip), %rdi      # 0x90ed
movl %eax, %esi
xorl %eax, %eax
callq 0x2040
leaq 0x6993(%rip), %rsi      # 0x90fb
movq %r14, %rdi
callq 0x21f0
testl %eax, %eax
je 0x2780
leaq 0x6980(%rip), %rsi      # 0x90fb
movq %rbx, %rdi
jmp 0x2785
movq %rbx, %rdi
xorl %esi, %esi
callq 0x23ac
movq %rbx, %rdi
callq 0x314a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x692f(%rip), %rdi      # 0x90d2
leaq 0x685f(%rip), %rsi      # 0x9009
leaq 0x6925(%rip), %rcx      # 0x90d6
movl $0x94, %edx
callq 0x20f0
nop
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/run_hmmannot.c
// Function: annot_worker_for
static void annot_worker_for(void *_data, long i, int tid) // kt_for() callback
{
    annot_step_t *annot_s = (annot_step_t *) _data;
    int exit_code, wexit_st;

    char cmd[4096];
    sprintf(cmd, "%s --noali --cpu 1 -o /dev/null --tblout %s %s %s", annot_s->shared->nhmmscan, annot_s->temp_out[i], annot_s->shared->nhmmdb, annot_s->temp_in[i]);

    exit_code = run_system_cmd(cmd, 3);
    if (exit_code == -1) {
        fprintf(stderr, "[E::%s] failed to execute command: %s\n", __func__, cmd);
        exit(EXIT_FAILURE);
    }
    
    wexit_st = WEXITSTATUS(exit_code);
    if (wexit_st) {
        fprintf(stderr, "[E::%s] command with non-zero exit code: %d\n", __func__, wexit_st);
        exit(EXIT_FAILURE);
    }

    return;
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq 0x18(%rdi), %rax
movq (%rax,%rsi,8), %rcx
movq (%rdi), %rax
movq 0x10(%rdi), %rdi
movq 0x8(%rax), %rdx
movq 0x10(%rax), %r8
movq (%rdi,%rsi,8), %r9
leaq 0x2c7a(%rip), %rsi      # 0x64ca
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2360
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x4db2
cmpl $-0x1, %eax
je 0x3880
shrl $0x8, %eax
andl $0xff, %eax
jne 0x38a4
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
movq 0x5769(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x2c6b(%rip), %rsi      # 0x64fc
leaq 0x2c8b(%rip), %rdx      # 0x6523
movq %rsp, %rcx
xorl %eax, %eax
callq 0x2220
jmp 0x38c5
movq 0x5745(%rip), %rcx      # 0x8ff0
movq (%rcx), %rdi
leaq 0x2c7f(%rip), %rsi      # 0x6534
leaq 0x2c67(%rip), %rdx      # 0x6523
movl %eax, %ecx
xorl %eax, %eax
callq 0x2220
pushq $0x1
popq %rdi
callq 0x2370
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_db_destroy
void hmm_annot_db_destroy(hmm_annot_db_t *annot_db)
{
    if (!annot_db) return;
    size_t i;
    kh_str_t *h_gnames = (kh_str_t *) annot_db->h_gnames;
    kh_str_destroy(h_gnames);
    for (i = 0; i < annot_db->n_gene; ++i)
        free(annot_db->gnames[i]);
    free(annot_db->gnames);
    kh_str_t *h_snames = (kh_str_t *) annot_db->h_snames;
    kh_str_destroy(h_snames);
    for (i = 0; i < annot_db->n_seg; ++i)
        free(annot_db->snames[i]);
    free(annot_db->snames);
    free(annot_db->a);
    free(annot_db->index);
    free(annot_db);
}

// Assembly:
testq %rdi, %rdi
je 0x3987
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x3988
xorl %r14d, %r14d
movl 0x18(%rbx), %eax
movq 0x20(%rbx), %rdi
cmpq %rax, %r14
jae 0x3936
movq (%rdi,%r14,8), %rdi
callq 0x2050
incq %r14
jmp 0x391c
callq 0x2050
movq 0x38(%rbx), %rdi
callq 0x3988
xorl %r14d, %r14d
movl 0x1c(%rbx), %eax
movq 0x28(%rbx), %rdi
cmpq %rax, %r14
jae 0x3961
movq (%rdi,%r14,8), %rdi
callq 0x2050
incq %r14
jmp 0x3947
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x48(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_bed6_db_destroy
void hmm_annot_bed6_db_destroy(hmm_annot_bed6_db_t *annot_db)
{
    size_t i;
    for (i = 0; i < annot_db->n_seg; ++i)
        free(annot_db->snames[i]);
    free(annot_db->snames);
    free(annot_db->a);
    free(annot_db);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x28(%rbx), %rdi
cmpq 0x18(%rbx), %r14
jae 0x39f0
movq (%rdi,%r14,8), %rdi
callq 0x2050
incq %r14
jmp 0x39d8
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_cmpfunc5
static int hmm_annot_cmpfunc5(const void *a, const void *b)
{
    hmm_annot_t *x, *y;
    x = (hmm_annot_t *) a;
    y = (hmm_annot_t *) b;

    if (x->sid != y->sid)
        return (x->sid > y->sid) - (x->sid < y->sid);
    if (x->og_type != y->og_type)
        return (x->og_type > y->og_type) - (x->og_type < y->og_type);
    if (x->gid != y->gid)
        return (x->gid > y->gid) - (x->gid < y->gid);
    return (x->score < y->score) - (x->score > y->score);
}

// Assembly:
movl 0x4c(%rsi), %eax
cmpl %eax, 0x4c(%rdi)
jne 0x4634
movl 0x48(%rdi), %eax
movl %eax, %edx
shrl $0x1d, %edx
andl $0x3, %edx
movl 0x48(%rsi), %ecx
movl %ecx, %r8d
shrl $0x1d, %r8d
andl $0x3, %r8d
cmpl %r8d, %edx
jne 0x4634
movl $0x1fffffff, %edx       # imm = 0x1FFFFFFF
andl %edx, %eax
andl %edx, %ecx
cmpl %ecx, %eax
jne 0x4634
movsd 0x38(%rdi), %xmm0
movsd 0x38(%rsi), %xmm1
ucomisd %xmm0, %xmm1
seta %al
ucomisd %xmm1, %xmm0
seta %cl
jmp 0x463a
seta %al
setb %cl
movzbl %al, %eax
movzbl %cl, %ecx
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_db_index_query
hmm_annot_t *hmm_annot_db_index_query(hmm_annot_db_t *annot_db, uint32_t id, uint32_t *n)
{
    hmm_annot_t *q = 0;
    *n = 0;
    if (id < annot_db->n_idx) {
        q = &annot_db->a[annot_db->index[id] >> 32];
        *n = (uint32_t) annot_db->index[id];
    }
    return q;
}

// Assembly:
andl $0x0, (%rdx)
cmpl %esi, 0x44(%rdi)
jbe 0x468c
movq 0x48(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
imulq $0x50, %rax, %rax
addq 0x10(%rdi), %rax
movl %ecx, (%rdx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_formatted_print_index_list
void hmm_annot_formatted_print_index_list(hmm_annot_db_t *annot_db, uint64_t *index_list, size_t n, FILE *fo,
        OG_TYPE_t og_type, double max_evalue, int header)
{
    uint32_t i, j, n_annot;
    int score;
    hmm_annot_t *annot;
    hmm_annot_db_sort(annot_db, ORDER_SID_CO);
    if (header)
        print_hmm_annot_bed6_header(fo);
    for (i = 0; i < n; ++i) {
        annot = hmm_annot_db_index_query(annot_db, index_list[i], &n_annot);
        for (j = 0; j < n_annot; ++j) {
            if (annot[j].og_type != (uint32_t) og_type || 
                    annot[j].evalue > max_evalue) continue;
            score = lround(annot[j].score);
            score = MIN(score, MAX_BED_SCORE);
            fprintf(fo, "%s\t%u\t%u\t%s\t%d\t%c\n", annot[j].sname, annot[j].alifrom, 
                    annot[j].alito, annot[j].gname, score, annot[j].strand? '-' : '+');
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movsd %xmm0, 0x20(%rsp)
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
pushq $0x6
popq %rsi
movq %rdi, 0x8(%rsp)
callq 0x4421
testl %ebp, %ebp
je 0x4715
movq %r12, %rdi
callq 0x47fe
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq 0x18(%rsp), %r15
jae 0x47ef
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rcx
movl $0x0, %eax
movl $0x0, %r13d
movq 0x8(%rsp), %rdx
cmpl %ecx, 0x44(%rdx)
jbe 0x4761
movl %ecx, %eax
movq 0x8(%rsp), %rdx
movq 0x48(%rdx), %rcx
movq (%rcx,%rax,8), %rcx
movl %ecx, %eax
shrq $0x20, %rcx
imulq $0x50, %rcx, %r13
addq 0x10(%rdx), %r13
imulq $0x50, %rax, %rbp
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0x47e7
movl 0x48(%r13,%r14), %eax
shrl $0x1d, %eax
andl $0x3, %eax
cmpl %ebx, %eax
jne 0x47e1
movsd 0x30(%r13,%r14), %xmm0
ucomisd 0x20(%rsp), %xmm0
ja 0x47e1
movsd 0x38(%r13,%r14), %xmm0
callq 0x20e0
movq %rax, %r10
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %eax, %r10d
cmovgel %eax, %r10d
movq (%r13,%r14), %r9
movq 0x8(%r13,%r14), %rdx
movl 0x18(%r13,%r14), %ecx
movl 0x1c(%r13,%r14), %r8d
movl 0x48(%r13,%r14), %eax
shrl $0x1f, %eax
leal 0x2b(,%rax,2), %r11d
movq %r12, %rdi
leaq 0x1e53(%rip), %rsi      # 0x6627
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2220
popq %rcx
popq %rdx
addq $0x50, %r14
jmp 0x4768
incl %r15d
jmp 0x4718
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_formatted_print_sname_list
void hmm_annot_formatted_print_sname_list(hmm_annot_db_t *annot_db, char **sname_list, size_t n, FILE *fo,
        OG_TYPE_t og_type, double max_evalue, int header)
{
    uint32_t i, j, n_annot;
    int score;
    hmm_annot_t *annot;
    hmm_annot_db_sort(annot_db, ORDER_SID_CO);
    if (header)
        print_hmm_annot_bed6_header(fo);
    for (i = 0; i < n; ++i) {
        annot = hmm_annot_db_sname_query(annot_db, sname_list[i], &n_annot);
        for (j = 0; j < n_annot; ++j) {
            if (annot[j].og_type != (uint32_t) og_type ||
                    annot[j].evalue > max_evalue) continue;
            score = lround(annot[j].score);
            score = MIN(score, MAX_BED_SCORE);
            fprintf(fo, "%s\t%u\t%u\t%s\t%d\t%c\n", annot[j].sname, annot[j].alifrom,
                    annot[j].alito, annot[j].gname, score, annot[j].strand? '-' : '+');
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movsd %xmm0, 0x30(%rsp)
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
pushq $0x6
popq %rsi
movq %rdi, 0x10(%rsp)
callq 0x4421
testl %ebp, %ebp
je 0x4851
movq %r14, %rdi
callq 0x47fe
movq %r14, 0x28(%rsp)
movl $0x3e8, %r15d           # imm = 0x3E8
xorl %r13d, %r13d
movl %r13d, %r13d
cmpq 0x20(%rsp), %r13
jae 0x4918
movq 0x18(%rsp), %rax
movq (%rax,%r13,8), %rsi
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x468f
movq %rax, %r12
movl 0xc(%rsp), %ebp
addq $0x48, %r12
xorl %r14d, %r14d
cmpq %rbp, %r14
jae 0x4910
movl (%r12), %eax
shrl $0x1d, %eax
andl $0x3, %eax
cmpl %ebx, %eax
jne 0x4907
movsd -0x18(%r12), %xmm0
ucomisd 0x30(%rsp), %xmm0
ja 0x4907
movsd -0x10(%r12), %xmm0
callq 0x20e0
movq %rax, %r10
cmpl %r15d, %r10d
cmovgel %r15d, %r10d
movq -0x48(%r12), %r9
movq -0x40(%r12), %rdx
movl -0x30(%r12), %ecx
movl -0x2c(%r12), %r8d
movl (%r12), %eax
shrl $0x1f, %eax
leal 0x2b(,%rax,2), %r11d
movq 0x28(%rsp), %rdi
leaq 0x1d2d(%rip), %rsi      # 0x6627
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2220
popq %rcx
popq %rdx
incq %r14
addq $0x50, %r12
jmp 0x4893
incl %r13d
jmp 0x485f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: hmm_annot_print_bed6
void hmm_annot_print_bed6(hmm_annot_bed6_db_t *annots, FILE *fo, int header)
{
    if (!annots->n) return;

    if (header)
        print_hmm_annot_bed6_header(fo);
    size_t i;
    hmm_annot_bed6_t *bed6;
    
    qsort(annots->a, annots->n, sizeof(hmm_annot_bed6_t), annot_bed6_cmpfunc);
    
    for (i = 0; i < annots->n; ++i) {
        bed6 = &annots->a[i];
        fprintf(fo, "%s\t%u\t%u\t%s\t%d\t%c\n", bed6->sname, bed6->alifrom,
                bed6->alito, bed6->gname, bed6->score, bed6->strand);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x4bb0
movq %rdi, %r14
testl %edx, %edx
je 0x4b4c
movq %rbx, %rdi
callq 0x47fe
movq (%r14), %rsi
movq 0x10(%r14), %rdi
leaq 0x63(%rip), %rcx        # 0x4bba
pushq $0x20
popq %rdx
callq 0x20d0
pushq $0x1c
popq %r12
leaq 0x1abd(%rip), %r15      # 0x6627
xorl %r13d, %r13d
cmpq (%r14), %r13
jae 0x4bb0
movq 0x10(%r14), %rax
movl -0x8(%rax,%r12), %ecx
movl -0x4(%rax,%r12), %r8d
movq -0x1c(%rax,%r12), %rdx
movq -0x14(%rax,%r12), %r9
movl (%rax,%r12), %r10d
movsbl -0xc(%rax,%r12), %r11d
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2220
popq %rcx
popq %rdx
incq %r13
addq $0x20, %r12
jmp 0x4b6d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/hmmannot.c
// Function: annot_bed6_cmpfunc
static int annot_bed6_cmpfunc(const void *a, const void *b)
{
    hmm_annot_bed6_t *x, *y;
    x = (hmm_annot_bed6_t *) a;
    y = (hmm_annot_bed6_t *) b;
    int c;
    c = strcmp(x->sname, y->sname);
    if (c) return c;
    c = (x->alifrom > y->alifrom) - (x->alifrom < y->alifrom);
    if (c) return c;
    return (x->alito > y->alito) - (x->alito < y->alito);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rsi), %rsi
callq 0x2200
testl %eax, %eax
jne 0x4bf3
movl 0x14(%r14), %ecx
xorl %eax, %eax
cmpl 0x14(%rbx), %ecx
seta %al
sbbl $0x0, %eax
jne 0x4bf3
movl 0x18(%r14), %ecx
xorl %eax, %eax
cmpl 0x18(%rbx), %ecx
seta %al
sbbl $0x0, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/misc.c
// Function: sleep_ms
void sleep_ms(int milliseconds) {
#ifdef WIN32
    Sleep(milliseconds);
#elif _POSIX_C_SOURCE >= 199309L
    struct timespec ts;
    ts.tv_sec = milliseconds / 1000;
    ts.tv_nsec = (milliseconds % 1000) * 1000000;
    nanosleep(&ts, NULL);
#else
    if (milliseconds >= 1000)
        sleep(milliseconds / 1000);
    usleep((milliseconds % 1000) * 1000);
#endif
}

// Assembly:
subq $0x18, %rsp
movl %edi, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
cltq
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
imull $0xf4240, %edx, %eax    # imm = 0xF4240
cltq
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x2160
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/misc.c
// Function: make_tempfile
char *make_tempfile(char *temp_dir, char *file_template, const char *suffix)
{
    sprintf(file_template, "%s/tmpXXXXXXXXXX%s", temp_dir, suffix);
    int ret = mkstemps(file_template, strlen(suffix));
    if (ret >= 0) {
        // need to close the file descriptor
        close(ret);
        return strdup(file_template);
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rdx
leaq 0x1969(%rip), %rsi      # 0x66d8
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2360
movq %r14, %rdi
callq 0x2130
movq %rbx, %rdi
movl %eax, %esi
callq 0x2030
testl %eax, %eax
js 0x4da8
movl %eax, %edi
callq 0x21b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x23b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/misc.c
// Function: check_executable
void check_executable(char *exe)
{
    char cmd[4096];
    sprintf(cmd, "command -v %s 1>/dev/null 2>/dev/null", exe);

    int exit_code = run_system_cmd(cmd, 1);
    if (exit_code == -1 || WEXITSTATUS(exit_code)) {
        fprintf(stderr, "[E::%s] executable %s is not available\n", __func__, exe);
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
leaq 0x18fb(%rip), %rsi      # 0x66eb
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2360
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x4db2
testw $0xff00, %ax            # imm = 0xFF00
jne 0x4e1c
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movq 0x41cd(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x18e4(%rip), %rsi      # 0x6711
leaq 0x1905(%rip), %rdx      # 0x6739
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2220
pushq $0x1
popq %rdi
callq 0x2370
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/misc.c
// Function: open_outstream
FILE *open_outstream(char *prefix, char *suffix)
{
    FILE *fo;
    char *out;

    MYMALLOC(out, strlen(prefix) + strlen(suffix) + 1);
    sprintf(out, "%s%s", prefix, suffix);
    fo = fopen(out, "w");
    if (!fo) {
        fprintf(stderr, "[E::%s] failed to open file '%s' to write: %s\n", __func__, out, strerror(errno));
        exit(EXIT_FAILURE);
    }
    free(out);

    return fo;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x2130
movq %rax, %rbx
movq %r14, %rdi
callq 0x2130
leaq (%rbx,%rax), %rdi
incq %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x181f(%rip), %rsi      # 0x674a
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2360
leaq 0x1407(%rip), %rsi      # 0x6349
movq %rbx, %rdi
callq 0x2310
testq %rax, %rax
je 0x4f63
movq %rax, %r14
movq %rbx, %rdi
callq 0x2050
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x4086(%rip), %rax      # 0x8ff0
movq (%rax), %r14
callq 0x2070
movl (%rax), %edi
callq 0x23c0
leaq 0x17cf(%rip), %rsi      # 0x674f
leaq 0x17f7(%rip), %rdx      # 0x677e
movq %r14, %rdi
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x2220
pushq $0x1
popq %rdi
callq 0x2370
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/kthread.c
// Function: kt_forpool_init
void *kt_forpool_init(int n_threads)
{
	kt_forpool_t *fp;
	int i;
	fp = (kt_forpool_t*)calloc(1, sizeof(kt_forpool_t));
	fp->n_threads = fp->n_pending = n_threads;
	fp->tid = (pthread_t*)calloc(fp->n_threads, sizeof(pthread_t));
	fp->w = (kto_worker_t*)calloc(fp->n_threads, sizeof(kto_worker_t));
	for (i = 0; i < fp->n_threads; ++i) fp->w[i].t = fp;
	pthread_mutex_init(&fp->mutex, 0);
	pthread_cond_init(&fp->cv_m, 0);
	pthread_cond_init(&fp->cv_s, 0);
	for (i = 0; i < fp->n_threads; ++i) pthread_create(&fp->tid[i], 0, kt_fp_worker, &fp->w[i]);
	pthread_mutex_lock(&fp->mutex);
	while (fp->n_pending) pthread_cond_wait(&fp->cv_m, &fp->mutex);
	pthread_mutex_unlock(&fp->mutex);
	return fp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
pushq $0x1
popq %rdi
movl $0xb8, %esi
callq 0x21f0
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movl %ebp, (%rax)
movslq %ebp, %r14
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x21f0
movq %rax, 0x10(%rbx)
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x21f0
movq %rax, 0x18(%rbx)
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
imulq $0x18, %r14, %rdx
cmpq %rcx, %rdx
je 0x57d6
movq %rbx, (%rax,%rcx)
addq $0x18, %rcx
jmp 0x57c7
leaq 0x30(%rbx), %r14
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
callq 0x23d0
leaq 0x58(%rbx), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x2250
movq %rbx, %rdi
addq $0x88, %rdi
xorl %esi, %esi
callq 0x2250
xorl %ebp, %ebp
xorl %r12d, %r12d
movslq (%rbx), %rax
cmpq %rax, %r12
jge 0x583c
movq 0x10(%rbx), %rdi
addq %r13, %rdi
movq 0x18(%rbx), %rcx
addq %rbp, %rcx
xorl %esi, %esi
leaq 0x47(%rip), %rdx        # 0x5871
callq 0x22e0
incq %r12
addq $0x18, %rbp
addq $0x8, %r13
jmp 0x580b
movq %r14, %rdi
callq 0x23e0
cmpl $0x0, 0x4(%rbx)
je 0x5857
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
jmp 0x5844
movq %r14, %rdi
callq 0x2260
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/c-zhou[P]oatk/kthread.c
// Function: kt_fp_worker
static void *kt_fp_worker(void *data)
{
	kto_worker_t *w = (kto_worker_t*)data;
	kt_forpool_t *fp = w->t;
	for (;;) {
		long i;
		int action;
		pthread_mutex_lock(&fp->mutex);
		if (--fp->n_pending == 0)
			pthread_cond_signal(&fp->cv_m);
		w->action = 0;
		while (w->action == 0) pthread_cond_wait(&fp->cv_s, &fp->mutex);
		action = w->action;
		pthread_mutex_unlock(&fp->mutex);
		if (action < 0) break;
		for (;;) { // process jobs allocated to this worker
			i = __sync_fetch_and_add(&w->i, fp->n_threads);
			if (i >= fp->n) break;
			fp->func(fp->data, i, w - fp->w);
		}
		while ((i = kt_fp_steal_work(fp)) >= 0) // steal jobs allocated to other workers
			fp->func(fp->data, i, w - fp->w);
	}
	pthread_exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r13
leaq 0x30(%r13), %r14
leaq 0x58(%r13), %rax
movq %rax, (%rsp)
leaq 0x88(%r13), %r12
pushq $0x18
popq %rbp
movq %r14, %rdi
callq 0x23e0
decl 0x4(%r13)
jne 0x58af
movq (%rsp), %rdi
callq 0x21e0
andl $0x0, 0x10(%rbx)
xorl %r15d, %r15d
testl %r15d, %r15d
jne 0x58cc
movq %r12, %rdi
movq %r14, %rsi
callq 0x2100
movl 0x10(%rbx), %r15d
jmp 0x58b6
movq %r14, %rdi
callq 0x2260
testl %r15d, %r15d
js 0x5983
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
movslq (%r13), %rsi
lock
xaddq %rsi, 0x8(%rbx)
cmpq 0x8(%r13), %rsi
jge 0x5925
movq 0x28(%r13), %rdi
movq %rbx, %rax
subq 0x18(%r13), %rax
cqto
idivq %rbp
movl %eax, %edx
callq *0x20(%r13)
jmp 0x58e7
movq 0x28(%r13), %rdi
movq %rbx, %rax
subq 0x18(%r13), %rax
cqto
idivq %rbp
movl %eax, %edx
callq *0x20(%r13)
movslq (%r13), %rsi
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
movq 0x18(%r13), %rax
leaq 0x8(%rax), %rdx
xorl %r8d, %r8d
pushq $-0x1
popq %rdi
movq %r15, %r9
cmpq %r8, %rcx
je 0x5960
movq (%rdx), %r10
cmpq %r10, %r9
cmovgl %r8d, %edi
cmovgeq %r10, %r9
incq %r8
addq $0x18, %rdx
jmp 0x5944
movslq %edi, %rcx
imulq $0x18, %rcx, %rcx
lock
xaddq %rsi, 0x8(%rax,%rcx)
cmpq 0x8(%r13), %rsi
pushq $-0x1
popq %rax
cmovgeq %rax, %rsi
testq %rsi, %rsi
jns 0x590f
jmp 0x5898
xorl %edi, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/kthread.c
// Function: kt_forpool_destroy
void kt_forpool_destroy(void *_fp)
{
	kt_forpool_t *fp = (kt_forpool_t*)_fp;
	int i;
	for (i = 0; i < fp->n_threads; ++i) fp->w[i].action = -1;
	pthread_cond_broadcast(&fp->cv_s);
	for (i = 0; i < fp->n_threads; ++i) pthread_join(fp->tid[i], 0);
	pthread_cond_destroy(&fp->cv_s);
	pthread_cond_destroy(&fp->cv_m);
	pthread_mutex_destroy(&fp->mutex);
	free(fp->w); free(fp->tid); free(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq (%rdi), %rax
pushq $0x10
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jge 0x59b0
movq 0x18(%rbx), %rsi
orl $-0x1, (%rsi,%rcx)
incq %rdx
addq $0x18, %rcx
jmp 0x599a
leaq 0x88(%rbx), %r14
movq %r14, %rdi
callq 0x20a0
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x59de
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
callq 0x23a0
incq %r15
jmp 0x59c2
movq %r14, %rdi
callq 0x2300
leaq 0x58(%rbx), %rdi
callq 0x2300
leaq 0x30(%rbx), %rdi
callq 0x2150
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/kthread.c
// Function: kt_forpool
void kt_forpool(void *_fp, void (*func)(void*,long,int), void *data, long n)
{
	kt_forpool_t *fp = (kt_forpool_t*)_fp;
	long i;
	if (fp && fp->n_threads > 1) {
		fp->n = n, fp->func = func, fp->data = data, fp->n_pending = fp->n_threads;
		for (i = 0; i < fp->n_threads; ++i) fp->w[i].i = i, fp->w[i].action = 1;
		pthread_mutex_lock(&fp->mutex);
		pthread_cond_broadcast(&fp->cv_s);
		while (fp->n_pending) pthread_cond_wait(&fp->cv_m, &fp->mutex);
		pthread_mutex_unlock(&fp->mutex);
	} else for (i = 0; i < n; ++i) func(data, i, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
testq %rdi, %rdi
je 0x5a6a
movq %rdi, %rbx
movslq (%rdi), %rax
cmpq $0x2, %rax
jl 0x5a6a
movq %r15, 0x8(%rbx)
movq %r12, 0x20(%rbx)
movq %r14, 0x28(%rbx)
movl %eax, 0x4(%rbx)
movq 0x18(%rbx), %rcx
addq $0x10, %rcx
xorl %edx, %edx
cmpq %rdx, %rax
je 0x5a94
movq %rdx, -0x8(%rcx)
movl $0x1, (%rcx)
incq %rdx
addq $0x18, %rcx
jmp 0x5a52
xorl %ebx, %ebx
testq %r15, %r15
cmovleq %rbx, %r15
cmpq %rbx, %r15
je 0x5a88
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq *%r12
incq %rbx
jmp 0x5a73
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x30(%rbx), %r14
movq %r14, %rdi
callq 0x23e0
leaq 0x88(%rbx), %rdi
callq 0x20a0
leaq 0x58(%rbx), %r15
cmpl $0x0, 0x4(%rbx)
je 0x5ac3
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
jmp 0x5ab0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2260