LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tbx.c
// Function: get_intv
static inline int get_intv(tbx_t *tbx, kstring_t *str, tbx_intv_t *intv, int is_add)
{
    if (tbx_parse1(&tbx->conf, str->l, str->s, intv) == 0) {
        int c = *intv->se;
        *intv->se = '\0';
        if ((tbx->conf.preset&0xffff) == TBX_GAF){
            intv->tid = 0;
        } else {
            intv->tid = get_tid(tbx, intv->ss, is_add);
        }
        *intv->se = c;
        if (intv->tid < 0) return -2;  // get_tid out of memory
        return (intv->beg >= 0 && intv->end >= 0)? 0 : -1;
    } else {
        char *type = NULL;
        switch (tbx->conf.preset&0xffff)
        {
            case TBX_SAM: type = "TBX_SAM"; break;
            case TBX_VCF: type = "TBX_VCF"; break;
            case TBX_GAF: type = "TBX_GAF"; break;
            case TBX_UCSC: type = "TBX_UCSC"; break;
            default: type = "TBX_GENERIC"; break;
        }
        if (hts_is_utf16_text(str))
            hts_log_error("Failed to parse %s: offending line appears to be encoded as UTF-16", type);
        else
            hts_log_error("Failed to parse %s: was wrong -p [type] used?\nThe offending line was: \"%s\"",
                type, str->s);
        return -1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rcx
callq 0x77295
testl %eax, %eax
je 0x77c05
movl (%r15), %eax
decl %eax
cmpw $0x2, %ax
ja 0x77c46
movzwl %ax, %eax
leaq 0x19ea4(%rip), %rcx     # 0x91aa0
movslq (%rcx,%rax,4), %rbx
addq %rcx, %rbx
jmp 0x77c4d
movq 0x18(%rbx), %rax
movb (%rax), %r14b
movb $0x0, (%rax)
xorl %eax, %eax
cmpw $0x3, (%r15)
je 0x77c26
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x771d8
movl %eax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movb %r14b, (%rax)
cmpl $0x0, 0x20(%rbx)
js 0x77ca3
cmpq $0x0, (%rbx)
js 0x77c95
movq 0x8(%rbx), %rax
sarq $0x3f, %rax
jmp 0x77c98
leaq 0x19f8d(%rip), %rbx     # 0x91bda
movq %r14, %rdi
callq 0x98d5
testl %eax, %eax
je 0x77c76
leaq 0x19f86(%rip), %rsi     # 0x91be6
leaq 0x19f88(%rip), %rdx     # 0x91bef
pushq $0x1
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8132
jmp 0x77c95
movq 0x10(%r14), %r8
leaq 0x19f65(%rip), %rsi     # 0x91be6
leaq 0x19faa(%rip), %rdx     # 0x91c32
pushq $0x1
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8132
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x2
jmp 0x77c97
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tbx.c
// Function: tbx_destroy
void tbx_destroy(tbx_t *tbx)
{
    khash_t(s2i) *d = (khash_t(s2i)*)tbx->dict;
    if (d != NULL)
    {
        khint_t k;
        for (k = kh_begin(d); k != kh_end(d); ++k)
            if (kh_exist(d, k)) free((char*)kh_key(d, k));
    }
    hts_idx_destroy(tbx->idx);
    kh_destroy(s2i, d);
    free(tbx);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
testq %r14, %r14
je 0x7813e
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpl (%r14), %r15d
je 0x7813e
movq 0x10(%r14), %rax
movl %r15d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x78136
movq 0x18(%r14), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x45c0
incl %r15d
addl $0x2, %ebp
jmp 0x78109
movq 0x18(%rbx), %rdi
callq 0x956e
movq %r14, %rdi
callq 0x5ff7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tbx.c
// Function: tbx_index_build3
int tbx_index_build3(const char *fn, const char *fnidx, int min_shift, int n_threads, const tbx_conf_t *conf)
{
    tbx_t *tbx;
    BGZF *fp;
    int ret;
    if ((fp = bgzf_open(fn, "r")) == 0) return -1;
    if ( n_threads ) bgzf_mt(fp, n_threads, 256);
    if ( bgzf_compression(fp) != bgzf ) { bgzf_close(fp); return -2; }
    tbx = tbx_index(fp, min_shift, conf);
    bgzf_close(fp);
    if ( !tbx ) return -1;
    ret = hts_idx_save_as(tbx->idx, fn, fnidx, min_shift > 0? HTS_FMT_CSI : HTS_FMT_TBI);
    tbx_destroy(tbx);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, (%rsp)
movq %rdi, %r14
leaq 0xd024(%rip), %rsi      # 0x851a5
callq 0x69966
pushq $-0x1
popq %r15
testq %rax, %rax
je 0x78203
movq %rax, %r13
testl %ebx, %ebx
je 0x781a5
movq %r13, %rdi
movl %ebx, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x6b97b
movq %r13, %rdi
callq 0x6c5e8
cmpl $0x2, %eax
jne 0x781f7
movq %r13, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x77ca7
movq %rax, %r12
movq %r13, %rdi
callq 0x6c066
testq %r12, %r12
je 0x78203
movq 0x18(%r12), %rdi
xorl %ecx, %ecx
testl %ebp, %ebp
setle %cl
addl %ecx, %ecx
movq %r14, %rsi
movq (%rsp), %rdx
callq 0xaf47
movl %eax, %ebx
movq %r12, %rdi
callq 0x780f1
movl %ebx, %eax
jmp 0x78206
movq %r13, %rdi
callq 0x6c066
pushq $-0x2
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tbx.c
// Function: index_load
static tbx_t *index_load(const char *fn, const char *fnidx, int flags)
{
    tbx_t *tbx;
    uint8_t *meta;
    char *nm, *p;
    uint32_t l_meta, l_nm;
    tbx = (tbx_t*)calloc(1, sizeof(tbx_t));
    if (!tbx)
        return NULL;
    tbx->idx = hts_idx_load3(fn, fnidx, HTS_FMT_TBI, flags);
    if ( !tbx->idx )
    {
        free(tbx);
        return NULL;
    }
    meta = hts_idx_get_meta(tbx->idx, &l_meta);
    if ( !meta || l_meta < 28) goto invalid;

    tbx->conf.preset = le_to_i32(&meta[0]);
    tbx->conf.sc = le_to_i32(&meta[4]);
    tbx->conf.bc = le_to_i32(&meta[8]);
    tbx->conf.ec = le_to_i32(&meta[12]);
    tbx->conf.meta_char = le_to_i32(&meta[16]);
    tbx->conf.line_skip = le_to_i32(&meta[20]);
    l_nm = le_to_u32(&meta[24]);
    if (l_nm > l_meta - 28) goto invalid;

    p = nm = (char*)meta + 28;
    // This assumes meta is NUL-terminated, so we can merrily strlen away.
    // hts_idx_load_local() assures this for us by adding a NUL on the end
    // of whatever it reads.
    for (; p - nm < l_nm; p += strlen(p) + 1) {
        if (get_tid(tbx, p, 1) < 0) {
            hts_log_error("%s", strerror(errno));
            goto fail;
        }
    }
    return tbx;

 invalid:
    hts_log_error("Invalid index header for %s", fnidx ? fnidx : fn);

 fail:
    tbx_destroy(tbx);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x42f0
testq %rax, %rax
je 0x782eb
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %ecx
callq 0xe5c9
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x782e3
leaq 0x4(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0xb3bc
movq %rax, %r12
testq %rax, %rax
sete %cl
movl (%r13), %eax
cmpl $0x1c, %eax
setb %dl
orb %cl, %dl
jne 0x782b7
movups (%r12), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r12), %rcx
movq %rcx, 0x10(%rbx)
movl 0x18(%r12), %r13d
addl $-0x1c, %eax
cmpl %eax, %r13d
jbe 0x782ff
testq %r15, %r15
cmovneq %r15, %r14
leaq 0x17c4a(%rip), %rsi     # 0x8ff0f
leaq 0x199ba(%rip), %rdx     # 0x91c86
pushq $0x1
popq %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x8132
movq %rbx, %rdi
callq 0x780f1
jmp 0x782eb
movq %rbx, %rdi
callq 0x45c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x1c, %r12
pushq $0x1
popq %rbp
movq %r12, %r14
movq %r14, %rax
subq %r12, %rax
cmpq %r13, %rax
jge 0x782ed
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x771d8
testl %eax, %eax
js 0x78335
movq %r14, %rdi
callq 0x41c0
addq %rax, %r14
incq %r14
jmp 0x78309
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x17bc7(%rip), %rsi     # 0x8ff0f
leaq 0xdf71(%rip), %rdx      # 0x862c0
pushq $0x1
popq %rdi
movq %rax, %rcx
jmp 0x782d2
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tbx.c
// Function: tbx_seqnames
const char **tbx_seqnames(tbx_t *tbx, int *n)
{
    khash_t(s2i) *d = (khash_t(s2i)*)tbx->dict;
    if (d == NULL)
    {
        *n = 0;
        return calloc(1, sizeof(char *));
    }
    int tid, m = kh_size(d);
    const char **names = (const char**) calloc(m,sizeof(const char*));
    khint_t k;
    if (!names) {
        *n = 0;
        return NULL;
    }
    for (k=kh_begin(d); k<kh_end(d); k++)
    {
        if ( !kh_exist(d,k) ) continue;
        tid = kh_val(d,k);
        assert( tid<m );
        names[tid] = kh_key(d,k);
    }
    // sanity check: there should be no gaps
    for (tid=0; tid<m; tid++)
        assert(names[tid]);
    *n = m;
    return names;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x20(%rdi), %r14
testq %r14, %r14
je 0x7841f
movl 0x4(%r14), %ebp
movslq %ebp, %rdi
pushq $0x8
popq %rsi
callq 0x42f0
testq %rax, %rax
je 0x78431
movl (%r14), %edx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rdi, %rdx
je 0x783e4
movq 0x10(%r14), %rcx
movl %edi, %r8d
shrl $0x4, %r8d
movl (%rcx,%r8,4), %r8d
movl %esi, %ecx
andb $0x1e, %cl
shrl %cl, %r8d
testb $0x3, %r8b
jne 0x783dc
movq 0x20(%r14), %rcx
movq (%rcx,%rdi,8), %rcx
cmpl %ecx, %ebp
jle 0x7843a
movq 0x18(%r14), %r8
movq (%r8,%rdi,8), %r8
movslq %ecx, %rcx
movq %r8, (%rax,%rcx,8)
incq %rdi
addl $0x2, %esi
jmp 0x7839f
xorl %ecx, %ecx
testl %ebp, %ebp
movl $0x0, %edx
cmovgl %ebp, %edx
cmpq %rcx, %rdx
je 0x78433
cmpq $0x0, (%rax,%rcx,8)
leaq 0x1(%rcx), %rcx
jne 0x783f0
leaq 0x197b0(%rip), %rdi     # 0x91bb7
leaq 0x19779(%rip), %rsi     # 0x91b87
leaq 0x19778(%rip), %rcx     # 0x91b8d
movl $0x276, %edx            # imm = 0x276
callq 0x42e0
andl $0x0, (%rbx)
pushq $0x1
popq %rdi
pushq $0x8
popq %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x42f0
xorl %ebp, %ebp
movl %ebp, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x19740(%rip), %rdi     # 0x91b81
leaq 0x1973f(%rip), %rsi     # 0x91b87
leaq 0x1973e(%rip), %rcx     # 0x91b8d
movl $0x271, %edx            # imm = 0x271
callq 0x42e0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/thread/test/test_thread.c
// Function: generator
int generator() {
    int value = -1;

    if (counter < 20) {
        value = counter++;
    }

    return value;
}

// Assembly:
movl 0x28aa(%rip), %eax      # 0x40b0
cmpl $0x13, %eax
jg 0x1815
leal 0x1(%rax), %ecx
movl %ecx, 0x289c(%rip)      # 0x40b0
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/thread/test/test_thread.c
// Function: task
void *task(void *args) {
    thread_pool *tp = args;

    for (;;) {
        tp_lock(tp, 0);
        int number = generator();
        tp_unlock(tp, 0);

        tp_lock(tp, 1);
        write(number);
        tp_unlock(tp, 1);

        if (number == -1) {
            return NULL;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $-0x1
popq %r14
pushq $0x1
popq %rbp
leaq 0x2873(%rip), %r15      # 0x40c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1524
movl 0x2853(%rip), %eax      # 0x40b0
movl %r14d, %r12d
cmpl $0x13, %eax
jg 0x1871
leal 0x1(%rax), %ecx
movl %ecx, 0x2842(%rip)      # 0x40b0
movl %eax, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1554
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1524
movslq 0x28fc(%rip), %rax      # 0x4188
leal 0x1(%rax), %ecx
movl %ecx, 0x28f3(%rip)      # 0x4188
movl %r12d, (%r15,%rax,4)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1554
cmpl $-0x1, %r12d
jne 0x184d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OhYee[P]computer_application_programming_experiment/utils/thread/test/test_thread.c
// Function: main
int main() {
    boolean pass = T;
    mp_init(1 << 16, mp_exit);
    thread_pool *tp = tp_new(3, 2, task);
    tp_wait(tp);

    int got = generator(tp);
    if (got != -1) {
        print_err("generator should be -1, but got %d\n", got);
        pass = F;
    }
    for (int i = 0; i < 20; ++i) {
        if (i != res[i]) {
            print_err("res[%d] excepted %d, got %d\n", i, i, res[i]);
            pass = F;
        }
    }
    if (pass) {
        print_ok("All test case passed!\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x741(%rip), %rax       # 0x2004
movl (%rax), %ebp
leaq -0x348(%rip), %rsi      # 0x1584
movl $0x10000, %edi          # imm = 0x10000
callq 0x158d
leaq -0xa9(%rip), %rdx       # 0x1834
pushq $0x3
popq %rdi
pushq $0x2
popq %rsi
callq 0x1418
movq %rax, %rdi
callq 0x14db
movl 0x27ba(%rip), %esi      # 0x40b0
cmpl $0x13, %esi
jg 0x191e
movl %esi, %eax
incl %eax
movl %eax, 0x27ab(%rip)      # 0x40b0
je 0x191e
leaq 0x8a7(%rip), %rdi       # 0x21b5
xorl %eax, %eax
callq 0x12a8
leaq 0x6ec(%rip), %rax       # 0x2008
movl (%rax), %ebp
leaq 0x6e3(%rip), %rax       # 0x2008
movl (%rax), %r15d
leaq 0x2791(%rip), %r12      # 0x40c0
leaq 0x8a3(%rip), %rbx       # 0x21d9
xorl %r14d, %r14d
cmpq $0x14, %r14
je 0x1964
movl (%r12), %ecx
cmpq %rcx, %r14
je 0x195b
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x12a8
movl %r15d, %ebp
incq %r14
addq $0x4, %r12
jmp 0x1939
testl %ebp, %ebp
je 0x1976
leaq 0x887(%rip), %rdi       # 0x21f6
xorl %eax, %eax
callq 0x1360
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_3/exercise_3_03/expand.c
// Function: main
int main(void)
{
  char str[MAXLEN];
  char expanded_str[MAXLEN];

  get_str(str, MAXLEN);
  expand(str, expanded_str);
  printf("%s", expanded_str);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4e28, %rsp           # imm = 0x4E28
leaq 0x2710(%rsp), %rbx
movq %rbx, %rdi
movl $0x2710, %esi           # imm = 0x2710
callq 0x11a7
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11ee
leaq 0xe74(%rip), %rdi       # 0x2004
movq %r14, %rsi
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x4e28, %rsp           # imm = 0x4E28
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_3/exercise_3_03/expand.c
// Function: expand
void expand(char src[], char dest[])
{
  /**
   * a-z
   * a-b-c
   * a-c-h-v
   * a-c-b-v
   * 0-9
   * 1-5
   * a-zA-Z
   * 0-9a-zA-Z
   * -a-z
   * a-z-
   * -a-z-
   */
  int i, j = 0;
  for (i = 0; i < MAXLEN - 1 && j < MAXLEN - 1 && src[i] != EOF; ++i)
  {
    if (isalnum(src[i]) && src[i + 1] == '-' && src[i] < src[i + 2])
    {
      do
      {
        int k;
        for (k = 0; k <= (src[i + 2] - src[i]); ++k)
        {
          int temp = src[i] + k;
          if (dest[j - 1] != temp && (isdigit(temp) || isalpha(temp)))
          {
            dest[j++] = temp;
          }
        }

        i += 2;
      } while (isalnum(src[i]) && src[i + 1] == '-' && src[i] < src[i + 2]);
    }
    else
    {
      dest[j++] = src[i];
    }
  }
  dest[j] = '\0';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
xorl %r15d, %r15d
movslq %ebp, %rax
cmpl $0x270e, %r15d          # imm = 0x270E
jg 0x12cb
cmpl $0x270e, %ebp           # imm = 0x270E
jg 0x12cb
movslq %r15d, %r12
movsbq (%r14,%r12), %r13
cmpq $-0x1, %r13
je 0x12cb
movq %rax, (%rsp)
callq 0x1050
movq (%rax), %rcx
testb $0x8, (%rcx,%r13,2)
je 0x12b9
cmpb $0x2d, 0x1(%r14,%r12)
jne 0x12b9
cmpb 0x2(%r14,%r12), %r13b
jge 0x12b9
leaq 0x2(%r12), %r15
xorl %ecx, %ecx
movsbl (%r14,%r15), %esi
movsbl %r13b, %edx
movl %esi, %edi
subl %edx, %edi
cmpl %edi, %ecx
jg 0x1296
addl %ecx, %edx
movslq %ebp, %rsi
movsbl -0x1(%rbx,%rsi), %edi
cmpl %edi, %edx
je 0x128e
movq (%rax), %rdi
movslq %edx, %r8
testb $0xc, 0x1(%rdi,%r8,2)
je 0x128e
leal 0x1(%rsi), %ebp
movb %dl, (%rbx,%rsi)
incl %ecx
movb (%r14,%r12), %r13b
jmp 0x125b
movslq %esi, %rcx
movq (%rax), %rdx
testb $0x8, (%rdx,%rcx,2)
je 0x12c3
cmpb $0x2d, 0x3(%r14,%r12)
jne 0x12c3
movl %esi, %r13d
cmpb 0x4(%r14,%r12), %sil
movq %r15, %r12
jl 0x1254
jmp 0x12c3
incl %ebp
movq (%rsp), %rax
movb %r13b, (%rbx,%rax)
incl %r15d
jmp 0x1204
movb $0x0, (%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/mikebdp2[P]AtomDis/main.c
// Function: op_destsrc
int op_destsrc (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    uint8_t *t    = d+1;
    int      attr = *t++;
    out += sprintf  (out, "%-5s  ", op->name);
    t   += sub_dest (t, out, op->desttype, attr >> 6, size_align[(attr & 0x38)>>3], op->destindex);
    out += strlen   (out);
    out += sprintf  (out, "  <-  ");
    t   += sub_src  (t, out, attr & 0x07, (attr & 0x38) >> 3, size_align[(attr & 0x38)>>3], op->srcindex);
    return t - d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rdi), %r12d
shll $0x5, %r12d
leaq 0x36a94(%rip), %rax     # 0x3add0
leaq 0x2(%rdi), %r13
movzbl 0x1(%rdi), %ebp
movq 0x8(%r12,%rax), %rdx
leaq 0x1d026(%rip), %rsi     # 0x21376
movq %r14, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %r15
addq %r14, %r15
leaq 0x36a69(%rip), %rsi     # 0x3add0
movl 0x10(%r12,%rsi), %edx
movl %ebp, %ecx
shrl $0x6, %ecx
movl %ebp, %r14d
shrl $0x3, %r14d
andl $0x7, %r14d
leaq 0x1ccbd(%rip), %rax     # 0x21040
movl (%rax,%r14,4), %r8d
movl %r8d, 0x4(%rsp)
movl 0x18(%r12,%rsi), %r9d
movq %r13, %rdi
movq %r15, %rsi
callq 0x4c8b
movl %eax, %eax
leaq (%rbx,%rax), %r13
addq $0x2, %r13
movq %r15, %rdi
callq 0x4090
leaq (%rax,%r15), %rsi
addq $0x6, %rsi
movl $0x2d3c2020, -0x6(%rsi) # imm = 0x2D3C2020
movl $0x20202d, -0x3(%rsi)   # imm = 0x20202D
andl $0x7, %ebp
leaq 0x36a02(%rip), %rax     # 0x3add0
movl 0x14(%r12,%rax), %r9d
movq %r13, %rdi
movl %ebp, %edx
movl %r14d, %ecx
movl 0x4(%rsp), %r8d
callq 0x4e15
addl %r13d, %eax
subl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_shift
int op_shift (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    uint8_t *t    = d+1;
    int      attr = *t++;
    out += sprintf  (out, "%-5s  ", op->name);
    t   += sub_src (t, out, op->desttype, (attr & 0x38) >> 3, size_align[(attr & 0x38)>>3], op->destindex);
    out += strlen   (out);
    out += sprintf  (out, "  by  %02x", *t++);
    return t - d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movzbl (%rdi), %ebp
shll $0x5, %ebp
leaq 0x369b9(%rip), %r12     # 0x3add0
leaq 0x2(%rdi), %rax
movq %rax, (%rsp)
movzbl 0x1(%rdi), %r13d
movq 0x8(%rbp,%r12), %rdx
leaq 0x1cf46(%rip), %rsi     # 0x21376
movq %r15, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %r14
addq %r15, %r14
movl 0x10(%rbp,%r12), %edx
shrl $0x3, %r13d
andl $0x7, %r13d
leaq 0x1cbec(%rip), %rax     # 0x21040
movl (%rax,%r13,4), %r8d
movl 0x18(%rbp,%r12), %r9d
movq (%rsp), %rdi
movq %r14, %rsi
movl %r13d, %ecx
callq 0x4e15
cltq
leaq (%rbx,%rax), %r15
addq $0x2, %r15
movq %r14, %rdi
callq 0x4090
addq %rax, %r14
movzbl (%r15), %edx
leaq 0x1cec4(%rip), %rsi     # 0x21350
movq %r14, %rdi
xorl %eax, %eax
callq 0x41d0
subl %ebx, %r15d
incl %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_setpt1
int op_setpt1 (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    last_reg_index = op->srcindex + *(uint16_t *) &d[1];
    if (last_reg_index == INDEX_REG_MM && opt_reg_addresses)
	addrtypes_shift[D_REG] = 2;
    else
	addrtypes_shift[D_REG] = 0;
    return op_1x16 (d, out);
}

// Assembly:
pushq %rax
movzbl (%rdi), %eax
shll $0x5, %eax
leaq 0x36914(%rip), %rcx     # 0x3add0
movzwl 0x1(%rdi), %edx
addl 0x14(%rax,%rcx), %edx
cmpl $0x5, %edx
sete %al
andb 0x39c8c(%rip), %al      # 0x3e15c
movl %edx, 0x39c7e(%rip)     # 0x3e154
movzbl %al, %eax
addl %eax, %eax
movl %eax, 0x39c1f(%rip)     # 0x3e100
callq 0x4765
pushq $0x3
popq %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_setpt0
int op_setpt0 (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    last_reg_index = op->srcindex;
    /* is never INDEX_REG_MM */
    addrtypes_shift[D_REG] = 0;
    return op_0x (d, out);
}

// Assembly:
pushq %rax
movzbl (%rdi), %eax
shll $0x5, %eax
leaq 0x368d7(%rip), %rcx     # 0x3add0
movl 0x14(%rax,%rcx), %eax
movl %eax, 0x39c51(%rip)     # 0x3e154
andl $0x0, 0x39bf6(%rip)     # 0x3e100
callq 0x4938
pushq $0x1
popq %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_src
int op_src (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    uint8_t       *t    = d+1;
    int            attr = *t++;
    out += sprintf (out, "%-5s  ", op->name);
    t   += sub_src (t, out, attr & 0x07, (attr & 0x38) >> 3, size_align[(attr & 0x38)>>3], op->srcindex);
    return t - d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movzbl (%rdi), %r13d
shll $0x5, %r13d
leaq 0x36876(%rip), %rbp     # 0x3add0
leaq 0x2(%rdi), %r14
movzbl 0x1(%rdi), %r12d
movq 0x8(%r13,%rbp), %rdx
leaq 0x1ce07(%rip), %rsi     # 0x21376
movq %r15, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %rsi
addq %r15, %rsi
movl %r12d, %edx
andl $0x7, %edx
shrl $0x3, %r12d
andl $0x7, %r12d
leaq 0x1caac(%rip), %rax     # 0x21040
movl (%rax,%r12,4), %r8d
movl 0x14(%r13,%rbp), %r9d
movq %r14, %rdi
movl %r12d, %ecx
callq 0x4e15
addl %r14d, %eax
subl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_1x16
int op_1x16 (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    const char    *ind;
    out += sprintf (out, "%-5s  ", op->name);
    out += sprintf (out, addrtypes [op->desttype],
		    (*(uint16_t *) &d[1]) << addrtypes_shift [op->desttype]);
    if ( (ind = get_index (op->destindex, d[1])) )
	out += sprintf (out, "  (%s)", ind);
    return 3;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movzbl (%rdi), %r12d
shll $0x5, %r12d
leaq 0x3664b(%rip), %r13     # 0x3add0
movq 0x8(%r12,%r13), %rdx
leaq 0x1cbe5(%rip), %rsi     # 0x21376
movq %r15, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %rbx
addq %r15, %rbx
movslq 0x10(%r12,%r13), %rax
leaq 0x389d3(%rip), %rcx     # 0x3d180
movq (%rcx,%rax,8), %rsi
movzwl 0x1(%r14), %edx
leaq 0x39943(%rip), %rcx     # 0x3e100
movb (%rcx,%rax,4), %cl
shll %cl, %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41d0
movl %eax, %ebp
movl 0x18(%r12,%r13), %edi
movzbl 0x1(%r14), %esi
callq 0x20888
testq %rax, %rax
je 0x47fc
movslq %ebp, %rcx
addq %rcx, %rbx
leaq 0x1cd17(%rip), %rsi     # 0x21506
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41d0
pushq $0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_1x8
int op_1x8 (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    const char    *ind;
    out += sprintf (out, "%-5s  ", op->name);
    out += sprintf (out, addrtypes [op->desttype],
		    d[1] << addrtypes_shift [op->desttype]);
    if ( (ind = get_index (op->destindex, d[1])) )
	out += sprintf (out, "  (%s)", ind);
    return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movzbl (%rdi), %r12d
shll $0x5, %r12d
leaq 0x365a2(%rip), %r13     # 0x3add0
movq 0x8(%r12,%r13), %rdx
leaq 0x1cb3c(%rip), %rsi     # 0x21376
movq %r15, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %rbx
addq %r15, %rbx
movslq 0x10(%r12,%r13), %rax
leaq 0x3892a(%rip), %rcx     # 0x3d180
movq (%rcx,%rax,8), %rsi
movzbl 0x1(%r14), %edx
leaq 0x3989a(%rip), %rcx     # 0x3e100
movb (%rcx,%rax,4), %cl
shll %cl, %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41d0
movl %eax, %ebp
movl 0x18(%r12,%r13), %edi
movzbl 0x1(%r14), %esi
callq 0x20888
testq %rax, %rax
je 0x48a5
movslq %ebp, %rcx
addq %rcx, %rbx
leaq 0x1cc6e(%rip), %rsi     # 0x21506
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41d0
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_dest
int op_dest (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    uint8_t *t    = d+1;
    int      attr = *t++;
    out += sprintf  (out, "%-5s  ", op->name);
    t   += sub_src (t, out, op->desttype, (attr & 0x38) >> 3, size_align[(attr & 0x38)>>3], op->destindex);
    return t - d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movzbl (%rdi), %r13d
shll $0x5, %r13d
leaq 0x364f9(%rip), %rbp     # 0x3add0
leaq 0x2(%rdi), %r14
movzbl 0x1(%rdi), %r12d
movq 0x8(%r13,%rbp), %rdx
leaq 0x1ca8a(%rip), %rsi     # 0x21376
movq %r15, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %rsi
addq %r15, %rsi
movl 0x10(%r13,%rbp), %edx
shrl $0x3, %r12d
andl $0x7, %r12d
leaq 0x1c730(%rip), %rax     # 0x21040
movl (%rax,%r12,4), %r8d
movl 0x18(%r13,%rbp), %r9d
movq %r14, %rdi
movl %r12d, %ecx
callq 0x4e15
addl %r14d, %eax
subl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_sdb
int op_sdb (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    const char    *ind;
    out += sprintf (out, "%-5s  ", op->name);
    out += sprintf (out, addrtypes [op->desttype],
		    d[1] << addrtypes_shift [op->desttype]);
    if (d[1] == 0xff)
	out += sprintf (out, "  (this table)");
    else if ( (ind = get_index (op->destindex, d[1])) )
	out += sprintf (out, "  (%s)", ind);
    return 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rdi), %r12d
shll $0x5, %r12d
leaq 0x36330(%rip), %r13     # 0x3add0
movq 0x8(%r12,%r13), %rdx
leaq 0x1c8ca(%rip), %rsi     # 0x21376
movq %r14, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %r15
addq %r14, %r15
movslq 0x10(%r12,%r13), %rax
leaq 0x386b8(%rip), %rcx     # 0x3d180
movq (%rcx,%rax,8), %rsi
movzbl 0x1(%rbx), %edx
leaq 0x39629(%rip), %rcx     # 0x3e100
movb (%rcx,%rax,4), %cl
shll %cl, %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x41d0
movslq %eax, %r14
addq %r15, %r14
movzbl 0x1(%rbx), %esi
cmpl $0xff, %esi
je 0x4b1f
addq %r12, %r13
movl 0x18(%r13), %edi
callq 0x20888
testq %rax, %rax
je 0x4b3a
leaq 0x1c9f6(%rip), %rsi     # 0x21506
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41d0
jmp 0x4b3a
movabsq $0x29656c62617420, %rax # imm = 0x29656C62617420
movq %rax, 0x7(%r14)
movabsq $0x2073696874282020, %rax # imm = 0x2073696874282020
movq %rax, (%r14)
pushq $0x2
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: op_ds
int op_ds (uint8_t *d, char *out) {
    const optab_t *op = &optable[d[0]];
    uint16_t size = *(uint16_t *) &d[1];
    /* Multiline, because even the hexdump typically needs lots of space */
    out += sprintf (out, "\n                          %-5s  %d bytes", op->name, size);
    return size + 3;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movzbl (%rdi), %ecx
movzwl 0x1(%rdi), %ebx
shll $0x5, %ecx
leaq 0x36274(%rip), %rdx     # 0x3add0
movq 0x8(%rcx,%rdx), %rdx
leaq 0x1c7a8(%rip), %rsi     # 0x21310
movq %rax, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x41d0
addl $0x3, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: get_pointers
bios_tables_t *get_pointers (uint8_t *data)
{
    static bios_tables_t tabs;		/* FIXME: */

    tabs.base = data;
    tabs.AtomRomHeader = (ATOM_ROM_HEADER *) (data + *(uint16_t *) (data + OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER));
    if (strcmp ((char *) tabs.AtomRomHeader->uaFirmWareSignature, "ATOM") != 0) {
	fprintf (stderr, "No AtomBIOS\n");
	exit (1);
    }
    tabs.MasterCommandTables = (uint16_t *)
	& ((ATOM_MASTER_COMMAND_TABLE *)
	   (data + tabs.AtomRomHeader->usMasterCommandTableOffset))
	->ListOfCommandTables;
    tabs.MasterDataTables    = (uint16_t *)
	& ((ATOM_MASTER_DATA_TABLE *)
	   (data + tabs.AtomRomHeader->usMasterDataTableOffset))
	->ListOfDataTables;
    
    return &tabs;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, 0x395a7(%rip)     # 0x3e130
movzwl 0x48(%rdi), %eax
leaq (%rdi,%rax), %r14
movq %r14, 0x395a0(%rip)     # 0x3e138
addq %rax, %rdi
addq $0x4, %rdi
leaq 0x1c731(%rip), %rsi     # 0x212d7
callq 0x4130
testl %eax, %eax
jne 0x4be4
movzwl 0x1e(%r14), %eax
addq %rbx, %rax
addq $0x4, %rax
movq %rax, 0x3957e(%rip)     # 0x3e140
leaq 0x39567(%rip), %rax     # 0x3e130
movzwl 0x20(%r14), %ecx
addq %rbx, %rcx
addq $0x4, %rcx
movq %rcx, 0x3956c(%rip)     # 0x3e148
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x3840d(%rip), %rax     # 0x3cff8
movq (%rax), %rcx
leaq 0x1c6e7(%rip), %rdi     # 0x212dc
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x41f0
pushq $0x1
popq %rdi
callq 0x41e0
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: get_table_offset
int get_table_offset(uint16_t *table, int idx) {
    int i, last = 0, offset = 0;
    static int wrapwarning = 0;

    if (! table || ! table[idx])
	return 0;

    for (i = 0; i <= idx; i++) {
	int off = table[i];
	if (off) {
	    if (off < last)
		offset += 0x10000;
	    last = off - 0x8000;
	}
    }

    if (offset && ! wrapwarning++)
	printf ("*** Wrap around of table offset - assuming offset\n");
    return table[idx] + offset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x4c83
movq %rdi, %r14
movslq %esi, %r15
movzwl (%rdi,%r15,2), %eax
testw %ax, %ax
je 0x4c83
xorl %ecx, %ecx
xorl %edx, %edx
xorl %ebx, %ebx
cmpq %r15, %rcx
jg 0x4c56
movzwl (%r14,%rcx,2), %esi
leal 0x10000(%rbx), %edi
cmpl %esi, %edx
cmovlel %ebx, %edi
leal -0x8000(%rsi), %r8d
testl %esi, %esi
cmovnel %r8d, %edx
cmovel %ebx, %edi
incq %rcx
movl %edi, %ebx
jmp 0x4c2a
testl %ebx, %ebx
je 0x4c7e
movl 0x394f0(%rip), %ecx     # 0x3e150
leal 0x1(%rcx), %edx
movl %edx, 0x394e7(%rip)     # 0x3e150
testl %ecx, %ecx
jne 0x4c7e
leaq 0x1ce27(%rip), %rdi     # 0x21a9b
callq 0x4060
movzwl (%r14,%r15,2), %eax
movzwl %ax, %eax
addl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: do_info
void do_info (bios_tables_t *tabs)
{
    fprintf (stdout,
	     "Table Format Rev.   %02x\n"
	     "Table Content Rev.  %02x\n"
	     "BIOS Boot Message:  '%s'\n"
	     "Subsystem Vendor ID %04x\n"
	     "Subsystem ID        %04x\n\n",
	     tabs->AtomRomHeader->sHeader.ucTableFormatRevision,
	     tabs->AtomRomHeader->sHeader.ucTableContentRevision,
	     (char *) (tabs->base + tabs->AtomRomHeader->usBIOS_BootupMessageOffset),
	     tabs->AtomRomHeader->usSubsystemVendorID,
	     tabs->AtomRomHeader->usSubsystemID);
}

// Assembly:
pushq %rax
movq 0x37fe2(%rip), %rax     # 0x3cfc0
movq (%rax), %rax
movq 0x8(%rdi), %rsi
movzbl 0x2(%rsi), %edx
movzbl 0x3(%rsi), %ecx
movzwl 0x10(%rsi), %r8d
addq (%rdi), %r8
movzwl 0x18(%rsi), %r9d
movzwl 0x1a(%rsi), %esi
movl %esi, (%rsp)
leaq 0x1c3ba(%rip), %rsi     # 0x213c2
movq %rax, %rdi
xorl %eax, %eax
callq 0x4150
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: do_tableinfo
int do_tableinfo (uint8_t *data, int off, int type, int nr)
{
    int size, frev, crev;
    const char *ind;

    if (! data)
	return 0;

    size = * (uint16_t *) (data+off);
    frev = *              (data+off+2);
    crev = *              (data+off+3);
    ind  = get_index (type, nr);

    fprintf (stdout, "%s  %08x", index_tables[type].name, off);
    if (nr >= 0)
	fprintf (stdout, "  #%02x  (%s)", nr, ind ? ind:"<unknown>");
    fputs (":\n\n", stdout);

    if (off)
	fprintf (stdout, "  Size         %04x\n", size);
    
    if (off && size)
	fprintf (stdout,
		 "  Format Rev.  %02x\n"
		 "  Param Rev.   %02x\n"
		 "  Content Rev. %02x\n",
		 frev & 0x0f, frev >> 4, crev);

    if (type == INDEX_COMMAND_TABLE && size) {
	int attr = * (uint16_t *) (data+off+4);
	fprintf (stdout,
		 "  Attributes:  Work space size        %02x longs\n"
		 "               Parameter space size   %02x longs\n"
		 "               Table update indicator %x\n",
		 (attr & 0xff) >> 2, (attr & 0x7f00) >> (8+2), attr >> 15);
    }
    putc ('\n', stdout);
    
    return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x52fd
movl %ecx, %r13d
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movslq %esi, %r15
movzwl (%rdi,%r15), %eax
movl %eax, 0xc(%rsp)
movzbl 0x2(%rdi,%r15), %eax
movl %eax, 0x10(%rsp)
movzbl 0x3(%rdi,%r15), %eax
movl %eax, 0x14(%rsp)
movl %edx, %edi
movl %ecx, %esi
callq 0x20888
movq %rax, %rbx
movq 0x37d78(%rip), %rax     # 0x3cfc0
movq (%rax), %rdi
movslq %ebp, %rax
imulq $0x18, %rax, %rax
leaq 0x38d87(%rip), %rcx     # 0x3dfe0
movq (%rcx,%rax), %rdx
leaq 0x1c292(%rip), %rsi     # 0x214f6
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4150
testl %r13d, %r13d
js 0x529c
movq 0x37d46(%rip), %rax     # 0x3cfc0
movq (%rax), %rdi
testq %rbx, %rbx
leaq 0x1c286(%rip), %rcx     # 0x2150d
cmovneq %rbx, %rcx
leaq 0x1c26d(%rip), %rsi     # 0x214ff
movl %r13d, %edx
xorl %eax, %eax
callq 0x4150
movq 0x37d1d(%rip), %rbx     # 0x3cfc0
movq (%rbx), %rsi
leaq 0x1c7ea(%rip), %rdi     # 0x21a97
callq 0x40c0
testl %r12d, %r12d
movq %rbx, %r12
je 0x5301
movq (%r12), %rdi
leaq 0x1c252(%rip), %rsi     # 0x21517
movl 0xc(%rsp), %ebx
movl %ebx, %edx
xorl %eax, %eax
callq 0x4150
testl %ebx, %ebx
je 0x5341
movq (%r12), %rdi
movl 0x10(%rsp), %ecx
movl %ecx, %edx
andl $0xf, %edx
shrl $0x4, %ecx
leaq 0x1c23f(%rip), %rsi     # 0x2152c
movl 0x14(%rsp), %r8d
xorl %eax, %eax
callq 0x4150
movb $0x1, %al
jmp 0x530a
xorl %ebx, %ebx
jmp 0x534d
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
setne %al
cmpl $0x1, %ebp
jne 0x5341
testb %al, %al
je 0x5341
movzwl 0x4(%r14,%r15), %r8d
movq (%r12), %rdi
movl %r8d, %edx
shrl $0x2, %edx
andl $0x3f, %edx
movl %r8d, %ecx
shrl $0xa, %ecx
andl $0x1f, %ecx
shrl $0xf, %r8d
leaq 0x1c22f(%rip), %rsi     # 0x21569
xorl %eax, %eax
callq 0x4150
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x4140
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: do_dump
void do_dump (uint8_t *data, int start, int end)
{
    int i, j;

    for (i = start & -16; i < end; i += 16) {
	fprintf (stdout, "  %08x: ", i);
	for (j = i; j < i+16; j++) {
	    if (j >= start && j < end)
		fprintf (stdout, "%02x", data[j]);
	    else
		fputs ("  ", stdout);
	    if ((j & 1) == 1)
		putc (' ', stdout);
	    if ((j & 3) == 3)
		putc (' ', stdout);
	}
	fputs ("  ", stdout);
	for (j = i; j < i+16; j++) {
	    if (j >= start && j < end) {
		if (isprint (data[j]))
		    putc (data[j], stdout);
		else
		    putc ('.', stdout);
	    } else
		putc (' ', stdout);
	}
	putc ('\n', stdout);
    }
    putc ('\n', stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movslq %esi, %r14
andl $-0x10, %esi
movslq %esi, %rbx
movslq %edx, %r15
movq 0x37c40(%rip), %r12     # 0x3cfc0
movq (%r12), %rsi
cmpq %r15, %rbx
jge 0x547e
movq %rsi, %rdi
leaq 0x1c25e(%rip), %rsi     # 0x215f5
movl %ebx, %edx
xorl %eax, %eax
callq 0x4150
leaq 0x10(%rbx), %rbp
movq %rbx, %r13
cmpq %rbp, %r13
jge 0x5414
cmpq %r14, %r13
setl %al
cmpq %r15, %r13
setge %cl
movq (%r12), %rsi
orb %al, %cl
jne 0x53dc
movq (%rsp), %rax
movzbl (%rax,%r13), %edx
movq %rsi, %rdi
leaq 0x1bf83(%rip), %rsi     # 0x21356
xorl %eax, %eax
callq 0x4150
jmp 0x53e8
leaq 0x1bfb8(%rip), %rdi     # 0x2139b
callq 0x40c0
testb $0x1, %r13b
je 0x53fa
movq (%r12), %rsi
pushq $0x20
popq %rdi
callq 0x4140
movl %r13d, %eax
notl %eax
testb $0x3, %al
jne 0x540f
movq (%r12), %rsi
pushq $0x20
popq %rdi
callq 0x4140
incq %r13
jmp 0x53a7
movq (%r12), %rsi
leaq 0x1bf7c(%rip), %rdi     # 0x2139b
callq 0x40c0
pushq $0x2e
popq %r13
cmpq %rbp, %rbx
jge 0x546a
cmpq %r14, %rbx
setl %al
cmpq %r15, %rbx
setge %cl
orb %al, %cl
pushq $0x20
popq %rdi
jne 0x545c
callq 0x4210
movq (%rax), %rcx
movq (%rsp), %rax
movzbl (%rax,%rbx), %eax
testb $0x40, 0x1(%rcx,%rax,2)
movl %r13d, %edi
je 0x545c
movl %eax, %edi
movq (%r12), %rsi
callq 0x4140
incq %rbx
jmp 0x5428
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x4140
movq %rbp, %rbx
jmp 0x5380
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4140
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: do_data
void do_data (uint8_t *data, int off, int nr)
{
    int len;
    const char *comment = NULL;
    int frev = data[off+2];
    int crev = data[off+3];
    data_dumper_t *dt = get_data_dumper (nr, &frev, &crev, &comment);

    if (! dt)
	return;
    if (frev == 0)
	fprintf (stdout, "  NOTE: General revisionless dumper only.\n");
    else if (frev != data[off+2] || crev != data[off+3])
	fprintf (stdout, "  NOTE: Dumper revision differs.   "
		 "Used:   Format Rev. %02x  Content Rev. %02x\n", frev, crev);
    if (comment)
	fprintf (stdout, "  NOTE: %s\n", comment);
    if (frev == 0 || frev != data[off+2] || crev != data[off+3] || comment)
	fputs ("\n", stdout);
    len = (*dt) (data+off, data+off, 1);
    fprintf (stdout, "\n  Total data structure size:  %04x\n\n", len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %eax
leaq 0x8(%rsp), %rcx
andq $0x0, (%rcx)
movq %rdi, %rbx
movslq %esi, %r15
movzbl 0x2(%rdi,%r15), %edx
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
movzbl 0x3(%rdi,%r15), %edi
movq %rsp, %rdx
movl %edi, (%rdx)
movl %eax, %edi
callq 0x2082b
testq %rax, %rax
je 0x55ac
movq %rax, %r14
addq %r15, %rbx
movl 0x4(%rsp), %edx
testl %edx, %edx
je 0x5511
movzbl 0x2(%rbx), %eax
movl (%rsp), %ecx
cmpl %eax, %edx
jne 0x54f7
movzbl 0x3(%rbx), %eax
cmpl %eax, %ecx
je 0x552d
movq 0x37ac2(%rip), %rax     # 0x3cfc0
movq (%rax), %rdi
leaq 0x1c121(%rip), %rsi     # 0x21629
xorl %eax, %eax
callq 0x4150
jmp 0x552d
movq 0x37aa8(%rip), %rax     # 0x3cfc0
movq (%rax), %rcx
leaq 0x1c0dc(%rip), %rdi     # 0x215fe
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x41f0
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x554f
movq 0x37a82(%rip), %rax     # 0x3cfc0
movq (%rax), %rdi
leaq 0x1c131(%rip), %rsi     # 0x21679
xorl %eax, %eax
callq 0x4150
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x5570
movzbl 0x2(%rbx), %ecx
cmpl %ecx, %eax
jne 0x5570
movzbl 0x3(%rbx), %eax
cmpl %eax, (%rsp)
jne 0x5570
cmpq $0x0, 0x8(%rsp)
je 0x5586
movq 0x37a49(%rip), %rax     # 0x3cfc0
movq (%rax), %rsi
leaq 0x1c518(%rip), %rdi     # 0x21a99
callq 0x40c0
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq *%r14
movq 0x37a27(%rip), %rcx     # 0x3cfc0
movq (%rcx), %rdi
leaq 0x1c0e2(%rip), %rsi     # 0x21685
movl %eax, %edx
xorl %eax, %eax
callq 0x4150
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: do_diss
void do_diss (uint8_t *data, int off, int size, const char *addrformat)
{
    int j, len;
    uint8_t  *d = data + off;
    char buf[256];

    for (d = data + off; d < data+size; d += len) {
	if (optable[*d].process) {
	    len = optable[*d].process (d, buf);
	} else {
	    sprintf (buf, "<unknown> %02x", *d);
	    len = 1;
	}
	fputs ("  ", stdout);
	fprintf (stdout, addrformat, d - data);
	for (j = 0; j < len; j++) {
	    if (j && ! (j & 31))
		fprintf (stdout, "\n        ");
	    fprintf (stdout, "%02x", d[j]);
	}
	fputs (&"                "[j>8?16:j<<1], stdout);
	fprintf (stdout, "  %s\n", buf);
    }
    putc ('\n', stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rcx, 0x10(%rsp)
movslq %esi, %r15
addq %rdi, %r15
movslq %edx, %rax
movq %rdi, 0x8(%rsp)
addq %rdi, %rax
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %r12
movq 0x379d2(%rip), %r14     # 0x3cfc0
pushq $0x1
popq %rbx
leaq 0x1bd5e(%rip), %r13     # 0x21356
cmpq 0x18(%rsp), %r15
jae 0x5702
movzbl (%r15), %edx
movl %edx, %eax
shll $0x5, %eax
leaq 0x357bd(%rip), %rcx     # 0x3add0
movq (%rax,%rcx), %rax
testq %rax, %rax
je 0x5628
movq %r15, %rdi
movq %r12, %rsi
callq *%rax
movl %eax, %ebp
jmp 0x563c
movq %r12, %rdi
leaq 0x1c079(%rip), %rsi     # 0x216ab
xorl %eax, %eax
callq 0x41d0
pushq $0x1
popq %rbp
movq (%r14), %rsi
leaq 0x1bd55(%rip), %rdi     # 0x2139b
callq 0x40c0
movq (%r14), %rdi
movq %r15, %rdx
subq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x4150
testl %ebp, %ebp
movl %ebp, %eax
movl $0x0, %ebp
movl %eax, 0x4(%rsp)
cmovgl %eax, %ebp
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x56b7
testq %r12, %r12
sete %al
testb $0x1f, %r12b
setne %cl
orb %al, %cl
jne 0x56a0
movq (%r14), %rcx
leaq 0x1c025(%rip), %rdi     # 0x216ba
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x41f0
movq (%r14), %rdi
movzbl (%r15,%r12), %edx
movq %r13, %rsi
xorl %eax, %eax
callq 0x4150
incq %r12
jmp 0x5675
addl %ebp, %ebp
movl 0x4(%rsp), %ebx
cmpl $0x9, %ebx
pushq $0x10
popq %rax
cmovgel %eax, %ebp
movslq %ebp, %rdi
leaq 0x1c41f(%rip), %rax     # 0x21aef
addq %rax, %rdi
movq (%r14), %rsi
callq 0x40c0
movq (%r14), %rdi
leaq 0x1bfdf(%rip), %rsi     # 0x216c4
leaq 0x20(%rsp), %r12
movq %r12, %rdx
xorl %eax, %eax
callq 0x4150
movslq %ebx, %rax
pushq $0x1
popq %rbx
addq %rax, %r15
jmp 0x55f8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x4140
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/main.c
// Function: do_test
void do_test (uint8_t *data)
{
    int i, j;
    for (i = 0; i < 0x100; i++) {
	if (! optable[i].name)
	    fprintf (stdout, "%02x:  -\n", i);
	else if (optable[i].desttype < 8)
	    fprintf (stdout, "%02x:  %s_%s\n", i, optable[i].name, addrnames[optable[i].desttype]);
	else
	    fprintf (stdout, "%02x:  %s  (%s)\n", i, optable[i].name, addrnames[optable[i].desttype]);
    }
    for (i = 0; i < INDEXTABLE_SIZEOF; i++) {
	fprintf (stdout, "\nindex_table %s len %02x\n ", index_tables[i].name, index_tables[i].len);
	for (j = 0; j < index_tables[i].len; j++)
	    if (index_tables[i].tab[j])
		fprintf (stdout, " %02x=%s", j, index_tables[i].tab[j]);
	putc ('\n', stdout);
    }
    putc ('\n', stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x356af(%rip), %rbp     # 0x3ade0
movq 0x37888(%rip), %r13     # 0x3cfc0
leaq 0x1bf8b(%rip), %rbx     # 0x216ca
leaq 0x379da(%rip), %r14     # 0x3d120
leaq 0x1bf95(%rip), %r15     # 0x216e2
xorl %r12d, %r12d
cmpq $0x100, %r12            # imm = 0x100
je 0x57aa
movq -0x8(%rbp), %rcx
testq %rcx, %rcx
je 0x577d
movslq (%rbp), %rax
movq (%r13), %rdi
cmpq $0x7, %rax
jg 0x5790
movq (%r14,%rax,8), %r8
leaq 0x1bf59(%rip), %rsi     # 0x216d4
jmp 0x5797
movq (%r13), %rdi
movq %rbx, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x4150
jmp 0x57a1
movq (%r14,%rax,8), %r8
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x4150
incq %r12
addq $0x20, %rbp
jmp 0x5750
leaq 0x3882f(%rip), %r12     # 0x3dfe0
leaq 0x1bf56(%rip), %r14     # 0x2170e
xorl %ebx, %ebx
movq (%r13), %rsi
cmpq $0xb, %rbx
je 0x5826
imulq $0x18, %rbx, %rax
leaq (%r12,%rax), %rbp
movq (%r12,%rax), %rdx
movl 0x10(%r12,%rax), %ecx
movq %rsi, %rdi
leaq 0x1bf14(%rip), %rsi     # 0x216f3
xorl %eax, %eax
callq 0x4150
xorl %r15d, %r15d
movslq 0x10(%rbp), %rax
cmpq %rax, %r15
jge 0x5815
movq 0x8(%rbp), %rax
movq (%rax,%r15,8), %rcx
testq %rcx, %rcx
je 0x5810
movq (%r13), %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x4150
incq %r15
jmp 0x57e9
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x4140
incq %rbx
jmp 0x57ba
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4140
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/./datastructs_gen.c
// Function: ATOM_COMMON_TABLE_HEADER_dumper
int ATOM_COMMON_TABLE_HEADER_dumper (uint8_t *start, uint8_t *data, int indent) {
  ATOM_COMMON_TABLE_HEADER *d = (ATOM_COMMON_TABLE_HEADER *) data;
  int i;
  if (d) {
    printf ("%s%04x:  USHORT usStructureSize%s = 0x%04x     (%d)\n", IND(indent), (int)(((uint8_t*)&d->usStructureSize)-start), FILL(21), d->usStructureSize, d->usStructureSize);
    printf ("%s%04x:  UCHAR ucTableFormatRevision%s = 0x%02x       (%d)\n", IND(indent), (int)(((uint8_t*)&d->ucTableFormatRevision)-start), FILL(26), d->ucTableFormatRevision, d->ucTableFormatRevision);
    printf ("%s%04x:  UCHAR ucTableContentRevision%s = 0x%02x       (%d)\n", IND(indent), (int)(((uint8_t*)&d->ucTableContentRevision)-start), FILL(27), d->ucTableContentRevision, d->ucTableContentRevision);
  }
  return sizeof (ATOM_COMMON_TABLE_HEADER);
}

// Assembly:
testq %rsi, %rsi
je 0x5def
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x37555(%rip), %rcx     # 0x3d2b0
cmpl $0x19, %edx
pushq $0x19
popq %rax
cmovll %edx, %eax
addl %eax, %eax
pushq $0x32
popq %rdx
subl %eax, %edx
movslq %edx, %r15
leaq (%rcx,%r15), %rsi
movl %ebx, %edx
subl %r14d, %edx
addq $0x15, %rcx
movzwl (%rbx), %r8d
leaq 0x1bd7a(%rip), %rdi     # 0x21b00
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
movq 0x37519(%rip), %rcx     # 0x3d2b0
leaq (%rcx,%r15), %rsi
leaq 0x2(%rbx), %rdx
subl %r14d, %edx
addq $0x1a, %rcx
movzbl 0x2(%rbx), %r8d
leaq 0x1bd83(%rip), %rdi     # 0x21b35
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
movq 0x374ed(%rip), %rcx     # 0x3d2b0
addq %rcx, %r15
leaq 0x3(%rbx), %rdx
subl %r14d, %edx
addq $0x1b, %rcx
movzbl 0x3(%rbx), %r8d
leaq 0x1bd94(%rip), %rdi     # 0x21b71
movq %r15, %rsi
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
popq %rbx
popq %r14
popq %r15
pushq $0x4
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mikebdp2[P]AtomDis/./datastructs_gen.c
// Function: ATOM_MASTER_COMMAND_TABLE_dumper
int ATOM_MASTER_COMMAND_TABLE_dumper (uint8_t *start, uint8_t *data, int indent) {
  ATOM_MASTER_COMMAND_TABLE *d = (ATOM_MASTER_COMMAND_TABLE *) data;
  int i;
  if (d) {
    printf ("%s%04x:  ATOM_COMMON_TABLE_HEADER sHeader%s :\n", IND(indent), (int)(((uint8_t*)&d->sHeader)-start), FILL(31)); ATOM_COMMON_TABLE_HEADER_dumper (start, (uint8_t*) &d->sHeader, indent+1);
    printf ("%s%04x:  ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables%s :\n", IND(indent), (int)(((uint8_t*)&d->ListOfCommandTables)-start), FILL(53)); ATOM_MASTER_LIST_OF_COMMAND_TABLES_dumper (start, (uint8_t*) &d->ListOfCommandTables, indent+1);
  }
  return sizeof (ATOM_MASTER_COMMAND_TABLE);
}

// Assembly:
testq %rsi, %rsi
je 0x7026
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x36309(%rip), %rcx     # 0x3d2b0
cmpl $0x19, %edx
pushq $0x19
popq %rax
cmovll %edx, %eax
addl %eax, %eax
pushq $0x32
popq %rdx
subl %eax, %edx
movslq %edx, %r12
leaq (%rcx,%r12), %rsi
movl %r14d, %edx
subl %r15d, %edx
addq $0x1f, %rcx
leaq 0x1abdf(%rip), %rdi     # 0x21bae
xorl %eax, %eax
callq 0x40b0
incl %ebx
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x5d40
movq 0x362c4(%rip), %rcx     # 0x3d2b0
addq %rcx, %r12
addq $0x4, %r14
movl %r14d, %edx
subl %r15d, %edx
addq $0x32, %rcx
leaq 0x1c105(%rip), %rdi     # 0x23109
movq %r12, %rsi
xorl %eax, %eax
callq 0x40b0
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x6136
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movl $0xa4, %eax
retq