LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf.c
// Function: add_desc_to_buffer
static int add_desc_to_buffer(char *buffer, size_t *offset, size_t maxbuffer, const char *description) {

    if (!description || !buffer || !offset || (maxbuffer < 4))
        return -1;

    size_t rembuffer = maxbuffer - *offset;
    if (rembuffer > (strlen(description) + (rembuffer == maxbuffer ? 0 : 1))) {    //add description with optionally required ','
        *offset += snprintf(buffer + *offset, rembuffer, "%s%s", (rembuffer == maxbuffer)? "": ",", description);
    } else {    //not enough space for description, put ...
        size_t tmppos = (rembuffer <= 4) ? maxbuffer - 4 : *offset;
        snprintf(buffer + tmppos, 4, "...");    //ignore offset update
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
testq %rcx, %rcx
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jne 0x41054
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, (%rsp)
movq (%rsi), %r15
movq %rdx, %r13
subq %r15, %r13
movq %r14, %rdi
callq 0x41c0
cmpq $0x1, %r15
sbbq $-0x1, %rax
cmpq %rax, %r13
jbe 0x4103c
movq (%rsp), %rdi
addq %r15, %rdi
testq %r15, %r15
leaq 0x68aca(%rip), %rax     # 0xa9ade
leaq 0x669d2(%rip), %rcx     # 0xa79ed
cmovneq %rax, %rcx
leaq 0x66b60(%rip), %rdx     # 0xa7b86
xorl %ebp, %ebp
movq %r13, %rsi
movq %r14, %r8
xorl %eax, %eax
callq 0x4820
cltq
addq %rax, (%rbx)
jmp 0x41054
addq $-0x4, %r12
cmpq $0x5, %r13
cmovbq %r12, %r15
movq (%rsp), %rax
movl $0x2e2e2e, (%rax,%r15)  # imm = 0x2E2E2E
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf.c
// Function: bcf_hrec_set_type
static void bcf_hrec_set_type(bcf_hrec_t *hrec)
{
    if ( !strcmp(hrec->key, "contig") ) hrec->type = BCF_HL_CTG;
    else if ( !strcmp(hrec->key, "INFO") ) hrec->type = BCF_HL_INFO;
    else if ( !strcmp(hrec->key, "FILTER") ) hrec->type = BCF_HL_FLT;
    else if ( !strcmp(hrec->key, "FORMAT") ) hrec->type = BCF_HL_FMT;
    else if ( hrec->nkeys>0 ) hrec->type = BCF_HL_STR;
    else hrec->type = BCF_HL_GEN;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
leaq 0x6bc05(%rip), %rsi     # 0xad08d
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x414db
leaq 0x69fd7(%rip), %rsi     # 0xab472
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x414e2
leaq 0x66973(%rip), %rsi     # 0xa7e21
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x414e9
leaq 0x6a70d(%rip), %rsi     # 0xabbce
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x414ed
xorl %eax, %eax
cmpl $0x0, 0x18(%rbx)
setg %al
xorl $0x5, %eax
jmp 0x414f2
movl $0x3, %eax
jmp 0x414f2
movl $0x1, %eax
jmp 0x414f2
xorl %eax, %eax
jmp 0x414f2
movl $0x2, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf.c
// Function: bcf_hdr_set_idx
static int bcf_hdr_set_idx(bcf_hdr_t *hdr, int dict_type, const char *tag, bcf_idinfo_t *idinfo)
{
    size_t new_n;

    // If available, preserve existing IDX
    if ( idinfo->id==-1 )
        idinfo->id = hdr->n[dict_type];
    else if ( idinfo->id < hdr->n[dict_type] && hdr->id[dict_type][idinfo->id].key )
    {
        hts_log_error("Conflicting IDX=%d lines in the header dictionary, the new tag is %s",
            idinfo->id, tag);
        errno = EINVAL;
        return -1;
    }

    new_n = idinfo->id >= hdr->n[dict_type] ? idinfo->id+1 : hdr->n[dict_type];
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    // hts_resize() can attempt to allocate up to 2 * requested items
    if (new_n > FUZZ_ALLOC_LIMIT/(2 * sizeof(bcf_idpair_t)))
        return -1;
#endif
    if (hts_resize(bcf_idpair_t, new_n, &hdr->m[dict_type],
                   &hdr->id[dict_type], HTS_RESIZE_CLEAR)) {
        return -1;
    }
    hdr->n[dict_type] = new_n;

    // NB: the next kh_put call can invalidate the idinfo pointer, therefore
    // we leave it unassigned here. It must be set explicitly in bcf_hdr_sync.
    hdr->id[dict_type][idinfo->id].key = tag;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
movslq 0x30(%rcx), %rcx
movl %esi, %r12d
movl (%rdi,%r12,4), %eax
cmpq $-0x1, %rcx
je 0x41568
cmpl %eax, %ecx
jge 0x4156e
movq 0x10(%r15,%r12,8), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
cmpq $0x0, (%rdx,%rsi)
je 0x4156e
leaq 0x6b15c(%rip), %rsi     # 0xac69c
leaq 0x6b165(%rip), %rdx     # 0xac6ac
movl $0x1, %edi
movq %rbx, %r8
xorl %eax, %eax
callq 0x942d
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x415d5
movl %eax, 0x30(%r14)
movl %eax, %ecx
leal 0x1(%rcx), %ebp
cmpl %eax, %ecx
cmovll %eax, %ebp
cmpl 0x98(%r15,%r12,4), %ebp
jbe 0x415be
leaq (%r15,%r12,4), %rcx
addq $0x98, %rcx
movslq %ebp, %rsi
leaq 0x10(%r15,%r12,8), %r8
leaq 0x6b102(%rip), %rax     # 0xac69c
movq %rax, (%rsp)
movl $0x10, %edi
movl $0x4, %edx
movl $0x1, %r9d
callq 0xb0b1
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x415d5
movl %ebp, (%r15,%r12,4)
movq 0x10(%r15,%r12,8), %rax
movslq 0x30(%r14), %rcx
shlq $0x4, %rcx
movq %rbx, (%rax,%rcx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf.c
// Function: bcf_dec_size_safe
static int bcf_dec_size_safe(uint8_t *p, uint8_t *end, uint8_t **q,
                             int *num, int *type) {
    int r;
    if (p >= end) return -1;
    *type = *p & 0xf;
    if (*p>>4 != 15) {
        *q = p + 1;
        *num = *p >> 4;
        return 0;
    }
    r = bcf_dec_typed_int1_safe(p + 1, end, q, num);
    if (r) return r;
    return *num >= 0 ? 0 : -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdi
jae 0x4162a
movq %rcx, %r14
movzbl (%rdi), %eax
andl $0xf, %eax
movl %eax, (%r8)
leaq 0x1(%rdi), %rax
cmpb $-0x11, (%rdi)
jbe 0x4161c
movq %rax, %rdi
movq %r14, %rcx
callq 0x41634
testl %eax, %eax
jne 0x4162a
movl (%r14), %ebx
sarl $0x1f, %ebx
jmp 0x4162a
movq %rax, (%rdx)
movzbl (%rdi), %eax
shrl $0x4, %eax
movl %eax, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf.c
// Function: bcf_dec_typed_int1_safe
static int bcf_dec_typed_int1_safe(uint8_t *p, uint8_t *end, uint8_t **q,
                                   int32_t *val) {
    uint32_t t;
    if (end - p < 2) return -1;
    t = *p++ & 0xf;
    /* Use if .. else if ... else instead of switch to force order.  Assumption
       is that small integers are more frequent than big ones. */
    if (t == BCF_BT_INT8) {
        *val = *(int8_t *) p++;
    } else {
        if (end - p < (1<<bcf_type_shift[t])) return -1;
        if (t == BCF_BT_INT16) {
            *val = le_to_i16(p);
            p += 2;
        } else if (t == BCF_BT_INT32) {
            *val = le_to_i32(p);
            p += 4;
#ifdef VCF_ALLOW_INT64
        } else if (t == BCF_BT_INT64) {
            // This case should never happen because there should be no
            // 64-bit BCFs at all, definitely not coming from htslib
            *val = le_to_i64(p);
            p += 8;
#endif
        } else {
            return -1;
        }
    }
    *q = p;
    return 0;
}

// Assembly:
movq %rcx, %r8
movq %rsi, %rcx
subq %rdi, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x2, %rcx
jl 0x416a7
movzbl (%rdi), %r9d
andl $0xf, %r9d
cmpq $0x1, %r9
jne 0x41668
movsbl 0x1(%rdi), %eax
addq $0x2, %rdi
movl %eax, (%r8)
movq %rdi, (%rdx)
xorl %eax, %eax
jmp 0x416a7
leaq 0x8beb1(%rip), %rcx     # 0xcd520
movb (%r9,%rcx), %cl
movl $0x1, %r10d
shll %cl, %r10d
leaq 0x1(%rdi), %rcx
subq %rcx, %rsi
movslq %r10d, %rcx
cmpq %rcx, %rsi
jl 0x416a7
cmpb $0x3, %r9b
je 0x416a8
movzbl %r9b, %ecx
cmpl $0x2, %ecx
jne 0x416a7
movswl 0x1(%rdi), %eax
movl %eax, (%r8)
addq $0x3, %rdi
jmp 0x41661
retq
movl 0x1(%rdi), %eax
movl %eax, (%r8)
addq $0x5, %rdi
jmp 0x41661
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf.c
// Function: bcf_record_check_err
static void bcf_record_check_err(const bcf_hdr_t *hdr, bcf1_t *rec,
                                 char *type, uint32_t *reports, int i) {
    if (*reports == 0 || hts_verbose >= HTS_LOG_DEBUG)
        hts_log_warning("Bad BCF record at %s:%"PRIhts_pos
                        ": Invalid FORMAT %s %d",
                        bcf_seqname_safe(hdr,rec), rec->pos+1, type, i);
    (*reports)++;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r9
movl (%rcx), %eax
testl %eax, %eax
je 0x416d1
leaq 0x8be34(%rip), %rcx     # 0xcd500
cmpl $0x5, (%rcx)
jl 0x41736
testq %rsi, %rsi
je 0x416fd
movslq 0x10(%rsi), %rax
testq %rax, %rax
sets %cl
testq %rdi, %rdi
sete %dl
orb %cl, %dl
jne 0x416fd
cmpl %eax, 0x4(%rdi)
jle 0x416fd
movq 0x18(%rdi), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rax
jmp 0x416ff
xorl %eax, %eax
testq %rax, %rax
leaq 0x6b206(%rip), %rcx     # 0xac90f
cmovneq %rax, %rcx
movq (%rsi), %rax
incq %rax
movl %r8d, (%rsp)
leaq 0x6b1ad(%rip), %rsi     # 0xac8cb
leaq 0x6b1bb(%rip), %rdx     # 0xac8e0
movl $0x3, %edi
movq %rax, %r8
xorl %eax, %eax
callq 0x942d
movl (%rbx), %eax
incl %eax
movl %eax, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9bc3f
movl (%r14), %eax
testl %eax, %eax
je 0x9bc3f
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x10(%r14), %rcx
movl %r15d, %edx
shrl $0x4, %edx
movl (%rcx,%rdx,4), %edx
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %edx
testb $0x3, %dl
jne 0x9bc34
movq 0x18(%r14), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x45c0
movl (%r14), %eax
incl %r15d
addl $0x2, %ebp
cmpl %eax, %r15d
jne 0x9bc08
movq 0x18(%rbx), %rdi
callq 0xa90b
movq %r14, %rdi
callq 0x6417
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O3/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 0xe558(%rip), %rsi      # 0xaa1da
callq 0x89ff0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x9bd08
movq %rax, %r13
testl %ebx, %ebx
je 0x9bca8
movq %r13, %rdi
movl %ebx, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x8c5c5
movq %r13, %rdi
callq 0x8d578
cmpl $0x2, %eax
jne 0x9bcfa
movq %r13, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x9b732
movq %rax, %r12
movq %r13, %rdi
callq 0x8ce6d
testq %r12, %r12
je 0x9bd08
movq 0x18(%r12), %rdi
xorl %ecx, %ecx
testl %ebp, %ebp
setle %cl
addl %ecx, %ecx
movq %r14, %rsi
movq (%rsp), %rdx
callq 0xc5de
movl %eax, %ebx
movq %r12, %rdi
callq 0x9bbe9
movl %ebx, %eax
jmp 0x9bd0b
movq %r13, %rdi
callq 0x8ce6d
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
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_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x20(%rdi), %r15
testq %r15, %r15
je 0x9bfb2
movl 0x4(%r15), %r14d
movslq %r14d, %rdi
movl $0x8, %esi
callq 0x42f0
testq %rax, %rax
je 0x9bfcc
movl (%r15), %edx
testq %rdx, %rdx
je 0x9bf9a
movq 0x10(%r15), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
movl %r8d, %ecx
shrl $0x4, %ecx
movl (%rsi,%rcx,4), %r9d
movl %edi, %ecx
andb $0x1e, %cl
shrl %cl, %r9d
testb $0x3, %r9b
jne 0x9bf8f
movq 0x20(%r15), %rcx
movq (%rcx,%r8,8), %rcx
cmpl %ecx, %r14d
jle 0x9bff7
movq 0x18(%r15), %r9
movq (%r9,%r8,8), %r9
movslq %ecx, %rcx
movq %r9, (%rax,%rcx,8)
incq %r8
addl $0x2, %edi
cmpq %r8, %rdx
jne 0x9bf5b
testl %r14d, %r14d
jle 0x9bfcf
xorl %ecx, %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x9bfd8
incq %rcx
cmpq %rcx, %r14
jne 0x9bfa1
jmp 0x9bfcf
movl $0x0, (%rbx)
movl $0x1, %edi
movl $0x8, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x42f0
xorl %r14d, %r14d
movl %r14d, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1b558(%rip), %rdi     # 0xb7537
leaq 0x1b521(%rip), %rsi     # 0xb7507
leaq 0x1b520(%rip), %rcx     # 0xb750d
movl $0x276, %edx            # imm = 0x276
callq 0x42e0
leaq 0x1b503(%rip), %rdi     # 0xb7501
leaq 0x1b502(%rip), %rsi     # 0xb7507
leaq 0x1b501(%rip), %rcx     # 0xb750d
movl $0x271, %edx            # imm = 0x271
callq 0x42e0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x683(%rip), %rax       # 0x2004
movl (%rax), %ebp
leaq -0x3ae(%rip), %rsi      # 0x15dc
movl $0x10000, %edi          # imm = 0x10000
callq 0x15e7
leaq -0xa0(%rip), %rdx       # 0x18fb
movl $0x3, %edi
movl $0x2, %esi
callq 0x14a4
movq %rax, %rdi
callq 0x1562
movl 0x26f8(%rip), %esi      # 0x40b0
cmpl $0x13, %esi
jg 0x19e0
movl %esi, %eax
incl %eax
movl %eax, 0x26e9(%rip)      # 0x40b0
je 0x19e0
leaq 0x7e5(%rip), %rdi       # 0x21b5
xorl %eax, %eax
callq 0x10f0
leaq 0x62a(%rip), %rax       # 0x2008
movl (%rax), %ebp
leaq 0x621(%rip), %rax       # 0x2008
movl (%rax), %r15d
leaq 0x26cf(%rip), %r12      # 0x40c0
leaq 0x7e1(%rip), %rbx       # 0x21d9
xorl %r14d, %r14d
movl (%r12), %ecx
cmpq %rcx, %r14
je 0x1a17
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x10f0
movl %r15d, %ebp
incq %r14
addq $0x4, %r12
cmpq $0x14, %r14
jne 0x19fb
testl %ebp, %ebp
je 0x1a36
leaq 0x7c7(%rip), %rdi       # 0x21f6
xorl %eax, %eax
callq 0x13e1
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x4e20, %rsp           # imm = 0x4E20
xorl %ebx, %ebx
callq 0x1040
cmpl $-0x1, %eax
je 0x1184
movb %al, (%rsp,%rbx)
incq %rbx
cmpq $0x270f, %rbx           # imm = 0x270F
jne 0x1166
movl $0x270f, %ebx           # imm = 0x270F
movb $0x0, (%rsp,%rbx)
movq %rsp, %rdi
leaq 0x2710(%rsp), %rbx
movq %rbx, %rsi
callq 0x1201
leaq 0xe62(%rip), %rdi       # 0x2004
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x4e20, %rsp           # imm = 0x4E20
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15d, %r15d
xorl %ebp, %ebp
movslq %r15d, %r12
movsbq (%r14,%r12), %r13
cmpq $-0x1, %r13
je 0x12ef
callq 0x1050
movq (%rax), %rdx
testb $0x8, (%rdx,%r13,2)
je 0x12ce
cmpb $0x2d, 0x1(%r14,%r12)
jne 0x12ce
cmpb 0x2(%r14,%r12), %r13b
jge 0x12ce
leaq 0x2(%r12), %r15
movb 0x2(%r14,%r12), %cl
cmpb %r13b, %cl
jl 0x12ad
movsbl %r13b, %esi
xorl %edx, %edx
leal (%rdx,%rsi), %r8d
movslq %ebp, %rdi
movsbl -0x1(%rbx,%rdi), %r9d
cmpl %r9d, %r8d
je 0x1294
movq (%rax), %r8
movslq %esi, %r9
addq %rdx, %r9
testb $0xc, 0x1(%r8,%r9,2)
je 0x1294
addl %edx, %esi
leal 0x1(%rdi), %ebp
movb %sil, (%rbx,%rdi)
movb (%r14,%r15), %cl
movsbl %cl, %edi
movsbl (%r14,%r12), %esi
subl %esi, %edi
incq %rdx
leal -0x1(%rdx), %r8d
cmpl %edi, %r8d
jl 0x1264
movq (%rax), %rdx
movl %ecx, %r13d
movsbq %cl, %rcx
testb $0x8, (%rdx,%rcx,2)
je 0x12d7
cmpb $0x2d, 0x3(%r14,%r12)
jne 0x12d7
cmpb 0x4(%r14,%r12), %r13b
movq %r15, %r12
jl 0x124f
jmp 0x12d7
movslq %ebp, %rax
incl %ebp
movb %r13b, (%rbx,%rax)
cmpl $0x270d, %r15d          # imm = 0x270D
jg 0x12ef
incl %r15d
cmpl $0x270f, %ebp           # imm = 0x270F
jl 0x1217
movslq %ebp, %rax
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_O3/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x4e15
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
movzwl (%rdi,%r14,2), %ecx
testw %cx, %cx
je 0x4e11
testl %esi, %esi
js 0x4e0a
incl %esi
xorl %eax, %eax
xorl %ebp, %ebp
xorl %edx, %edx
movl %ebp, %edi
movzwl (%rbx,%rax,2), %r8d
leal 0x10000(%rdi), %ebp
cmpl %r8d, %edx
cmovlel %edi, %ebp
leal -0x8000(%r8), %r9d
testl %r8d, %r8d
cmovnel %r9d, %edx
cmovel %edi, %ebp
incq %rax
cmpq %rax, %rsi
jne 0x4db4
testl %ebp, %ebp
je 0x4e0a
movl 0x38366(%rip), %eax     # 0x3d150
leal 0x1(%rax), %edx
movl %edx, 0x3835d(%rip)     # 0x3d150
testl %eax, %eax
jne 0x4e0c
leaq 0x1dc9d(%rip), %rdi     # 0x22a9b
callq 0x4060
movzwl (%rbx,%r14,2), %ecx
jmp 0x4e0c
xorl %ebp, %ebp
movzwl %cx, %eax
addl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikebdp2[P]AtomDis/main.c
// Function: sub_dest
int sub_dest (uint8_t *d, char *out, int type, int align, int size, int index) {
    uint32_t    val;
    int         r;
    const char *ind;
    switch (type) {
    case D_REG:
	val  = *((uint16_t *) d);
	r    = 2;
	break;
    case D_ID:  case D_IM:
	out += sprintf (out, "<internal - illegal addrtype %s>", addrnames [type]);
	val  = 0;
	r    = 0;
	break;
    default:
	val = *d;
	r   = 1;
    }
    if (type == D_WS && (ind = get_index (INDEX_WORK_REG, val)) )
	out += sprintf (out, "%s", ind);
    else if (r)
	out += sprintf (out, addrtypes [type], val << addrtypes_shift[type]);
    switch (size) {
    case 1:
	out += sprintf (out, " [%s]", align_byte[align]);
	break;
    case 2:
	out += sprintf (out, " [%s]", align_word[align]);
	break;
    case 4:
	out += sprintf (out, " [%s]", align_long[align]);
	break;
    }
    if (type == D_REG && (ind = get_index (last_reg_index, val+last_reg_offset)) )
	out += sprintf (out, "  (%s)", ind);
    if (r && (ind = get_index (index, val)) )
	out += sprintf (out, "  (%s)", ind);
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %ebp
movl %ecx, %r13d
movl %edx, %r12d
movq %rsi, %rbx
leal -0x4(%r12), %eax
cmpl $0x2, %eax
jae 0x4e6c
movl %r12d, %eax
leaq 0x372da(%rip), %rcx     # 0x3c120
movq (%rcx,%rax,8), %rdx
leaq 0x1d498(%rip), %rsi     # 0x222e9
movl $0x0, (%rsp)
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41d0
cltq
movb $0x1, %r14b
xorl %r15d, %r15d
jmp 0x4ee8
testl %r12d, %r12d
jne 0x4e7e
movzwl (%rdi), %r15d
movl $0x2, (%rsp)
jmp 0x4ebc
movzbl (%rdi), %r15d
cmpl $0x2, %r12d
jne 0x4eb5
movl $0x4, %edi
movl %r15d, %esi
callq 0x216c4
testq %rax, %rax
je 0x4eb5
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4080
subl %ebx, %eax
cltq
movl $0x1, (%rsp)
xorl %r14d, %r14d
jmp 0x4ee8
movl $0x1, (%rsp)
movslq %r12d, %rax
leaq 0x372ba(%rip), %rcx     # 0x3c180
movq (%rcx,%rax,8), %rsi
leaq 0x3822f(%rip), %rcx     # 0x3d100
movb (%rcx,%rax,4), %cl
movl %r15d, %edx
shll %cl, %edx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41d0
cltq
addq %rax, %rbx
cmpl $0x1, %ebp
je 0x4f0c
cmpl $0x4, %ebp
je 0x4f03
cmpl $0x2, %ebp
jne 0x4f30
leaq 0x3736f(%rip), %rax     # 0x3c270
jmp 0x4f13
leaq 0x37386(%rip), %rax     # 0x3c290
jmp 0x4f13
leaq 0x3733d(%rip), %rax     # 0x3c250
movslq %r13d, %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1d3e9(%rip), %rsi     # 0x2230a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41d0
cltq
addq %rax, %rbx
testl %r12d, %r12d
jne 0x4f67
movl 0x38219(%rip), %edi     # 0x3d154
movl 0x38217(%rip), %esi     # 0x3d158
addl %r15d, %esi
callq 0x216c4
testq %rax, %rax
je 0x4f67
leaq 0x1d5b1(%rip), %rsi     # 0x22506
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41d0
cltq
addq %rax, %rbx
testb %r14b, %r14b
jne 0x4f91
movl 0x4(%rsp), %edi
movl %r15d, %esi
callq 0x216c4
testq %rax, %rax
je 0x4f91
leaq 0x1d582(%rip), %rsi     # 0x22506
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41d0
movl (%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x36e49(%rip), %rax     # 0x3bfc0
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 0x1d221(%rip), %rsi     # 0x223c2
movq %rax, %rdi
xorl %eax, %eax
callq 0x4150
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x548a
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 0x216c4
movq %rax, %rbx
movq 0x36beb(%rip), %rax     # 0x3bfc0
movq (%rax), %rdi
movslq %ebp, %rax
leaq (%rax,%rax,2), %rax
leaq 0x37bfa(%rip), %rcx     # 0x3cfe0
movq (%rcx,%rax,8), %rdx
leaq 0x1d105(%rip), %rsi     # 0x224f6
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4150
testl %r13d, %r13d
js 0x5429
movq 0x36bb9(%rip), %rax     # 0x3bfc0
movq (%rax), %rdi
testq %rbx, %rbx
leaq 0x1d0f9(%rip), %rcx     # 0x2250d
cmovneq %rbx, %rcx
leaq 0x1d0e0(%rip), %rsi     # 0x224ff
movl %r13d, %edx
xorl %eax, %eax
callq 0x4150
movq 0x36b90(%rip), %rbx     # 0x3bfc0
movq (%rbx), %rsi
leaq 0x1d65d(%rip), %rdi     # 0x22a97
callq 0x40c0
testl %r12d, %r12d
movq %rbx, %r12
je 0x548e
movq (%r12), %rdi
leaq 0x1d0c5(%rip), %rsi     # 0x22517
movl 0xc(%rsp), %ebx
movl %ebx, %edx
xorl %eax, %eax
callq 0x4150
testl %ebx, %ebx
je 0x54ce
movq (%r12), %rdi
movl 0x10(%rsp), %ecx
movl %ecx, %edx
andl $0xf, %edx
shrl $0x4, %ecx
leaq 0x1d0b2(%rip), %rsi     # 0x2252c
movl 0x14(%rsp), %r8d
xorl %eax, %eax
callq 0x4150
movb $0x1, %al
jmp 0x5497
xorl %ebx, %ebx
jmp 0x54dc
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
setne %al
cmpl $0x1, %ebp
jne 0x54ce
testb %al, %al
je 0x54ce
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 0x1d0a2(%rip), %rsi     # 0x22569
xorl %eax, %eax
callq 0x4150
movq (%r12), %rsi
movl $0xa, %edi
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_O3/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)
movl %esi, %eax
andl $-0x10, %eax
cmpl %edx, %eax
jge 0x560c
movslq %eax, %r13
movslq %edx, %rbp
movslq %esi, %r14
movq 0x36aa7(%rip), %r15     # 0x3bfc0
movq (%r15), %rdi
leaq 0x1d0d2(%rip), %rsi     # 0x225f5
movl %r13d, %edx
xorl %eax, %eax
callq 0x4150
leaq 0x10(%r13), %rbx
movq %r13, %r12
cmpq %r14, %r12
setl %al
cmpq %rbp, %r12
setge %cl
movq (%r15), %rsi
orb %al, %cl
jne 0x5563
movq (%rsp), %rax
movzbl (%rax,%r12), %edx
movq %rsi, %rdi
leaq 0x1cdfc(%rip), %rsi     # 0x22356
xorl %eax, %eax
callq 0x4150
jmp 0x556f
leaq 0x1ce31(%rip), %rdi     # 0x2239b
callq 0x40c0
testb $0x1, %r12b
je 0x5582
movq (%r15), %rsi
movl $0x20, %edi
callq 0x4140
movl %r12d, %eax
notl %eax
testb $0x3, %al
jne 0x5598
movq (%r15), %rsi
movl $0x20, %edi
callq 0x4140
incq %r12
cmpq %rbx, %r12
jl 0x5534
movq (%r15), %rsi
leaq 0x1cdf1(%rip), %rdi     # 0x2239b
callq 0x40c0
cmpq %r14, %r13
setl %al
cmpq %rbp, %r13
setge %cl
movl $0x20, %edi
orb %al, %cl
jne 0x55e3
callq 0x4210
movq (%rax), %rcx
movq (%rsp), %rax
movzbl (%rax,%r13), %eax
testb $0x40, 0x1(%rcx,%rax,2)
movl $0x2e, %edi
je 0x55e3
movl %eax, %edi
movq (%r15), %rsi
callq 0x4140
incq %r13
cmpq %rbx, %r13
jl 0x55af
movq (%r15), %rsi
movl $0xa, %edi
callq 0x4140
movq %rbx, %r13
cmpq %rbp, %rbx
jl 0x5519
movq 0x369ad(%rip), %rax     # 0x3bfc0
movq (%rax), %rsi
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4140
// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %rbx
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
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 0x2164e
testq %rax, %rax
je 0x574f
movq %rax, %r14
addq %r15, %rbx
movl 0x4(%rsp), %edx
testl %edx, %edx
je 0x56ae
movzbl 0x2(%rbx), %eax
movl (%rsp), %ecx
cmpl %eax, %edx
jne 0x5694
movzbl 0x3(%rbx), %eax
cmpl %eax, %ecx
je 0x56ce
movq 0x36925(%rip), %rax     # 0x3bfc0
movq (%rax), %rdi
leaq 0x1cf84(%rip), %rsi     # 0x22629
xorl %eax, %eax
callq 0x4150
jmp 0x56ce
movq 0x3690b(%rip), %rax     # 0x3bfc0
movq (%rax), %rcx
leaq 0x1cf3f(%rip), %rdi     # 0x225fe
movl $0x2a, %esi
movl $0x1, %edx
callq 0x41f0
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x56f0
movq 0x368e1(%rip), %rax     # 0x3bfc0
movq (%rax), %rdi
leaq 0x1cf90(%rip), %rsi     # 0x22679
xorl %eax, %eax
callq 0x4150
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x5711
movzbl 0x2(%rbx), %ecx
cmpl %ecx, %eax
jne 0x5711
movzbl 0x3(%rbx), %eax
cmpl %eax, (%rsp)
jne 0x5711
cmpq $0x0, 0x8(%rsp)
je 0x5727
movq 0x368a8(%rip), %rax     # 0x3bfc0
movq (%rax), %rsi
leaq 0x1d377(%rip), %rdi     # 0x22a99
callq 0x40c0
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq *%r14
movq 0x36884(%rip), %rcx     # 0x3bfc0
movq (%rcx), %rdi
leaq 0x1cf3f(%rip), %rsi     # 0x22685
movl %eax, %edx
xorl %eax, %eax
callq 0x4150
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
cmpl %edx, %esi
jge 0x58ab
movslq %edx, %rcx
movq 0x8(%rsp), %rax
addq %rax, %rcx
movq %rcx, 0x10(%rsp)
movslq %esi, %r15
addq %rax, %r15
leaq 0x20(%rsp), %r14
movq 0x36822(%rip), %r13     # 0x3bfc0
leaq 0x1cbb1(%rip), %rbp     # 0x22356
movzbl (%r15), %edx
movl %edx, %eax
shll $0x5, %eax
leaq 0x3461b(%rip), %rcx     # 0x39dd0
movq (%rax,%rcx), %rax
testq %rax, %rax
je 0x57ca
movq %r15, %rdi
movq %r14, %rsi
callq *%rax
movl %eax, %ebx
jmp 0x57e0
movq %r14, %rdi
leaq 0x1ced7(%rip), %rsi     # 0x226ab
xorl %eax, %eax
callq 0x41d0
movl $0x1, %ebx
movq (%r13), %rsi
leaq 0x1cbb0(%rip), %rdi     # 0x2239b
callq 0x40c0
movq (%r13), %rdi
movq %r15, %rdx
subq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x4150
testl %ebx, %ebx
jle 0x5870
movl %ebx, %r14d
xorl %r12d, %r12d
testq %r12, %r12
sete %al
testb $0x1f, %r12b
setne %cl
orb %al, %cl
jne 0x583d
movq (%r13), %rcx
movl $0x9, %esi
movl $0x1, %edx
leaq 0x1ce82(%rip), %rdi     # 0x226ba
callq 0x41f0
movq (%r13), %rdi
movzbl (%r15,%r12), %edx
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4150
incq %r12
cmpq %r12, %r14
jne 0x5812
leal (%rbx,%rbx), %eax
cmpl $0x9, %ebx
movl $0x10, %ecx
cmovael %ecx, %eax
movslq %eax, %rdi
leaq 0x20(%rsp), %r14
jmp 0x5872
xorl %edi, %edi
leaq 0x1d276(%rip), %rax     # 0x22aef
addq %rax, %rdi
movq (%r13), %rsi
callq 0x40c0
movq (%r13), %rdi
leaq 0x1ce34(%rip), %rsi     # 0x226c4
movq %r14, %rdx
xorl %eax, %eax
callq 0x4150
movslq %ebx, %rax
addq %rax, %r15
cmpq 0x10(%rsp), %r15
jb 0x57a5
movq 0x3670e(%rip), %rax     # 0x3bfc0
movq (%rax), %rsi
movl $0xa, %edi
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_O3/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 0x344fd(%rip), %rbp     # 0x39de0
movq 0x366d6(%rip), %r13     # 0x3bfc0
leaq 0x1cdd9(%rip), %rbx     # 0x226ca
leaq 0x36828(%rip), %r14     # 0x3c120
leaq 0x1cde3(%rip), %r15     # 0x226e2
xorl %r12d, %r12d
movq -0x8(%rbp), %rcx
testq %rcx, %rcx
je 0x5926
movslq (%rbp), %rax
movq (%r13), %rdi
cmpq $0x7, %rax
jg 0x5939
movq (%r14,%rax,8), %r8
leaq 0x1cdb0(%rip), %rsi     # 0x226d4
jmp 0x5940
movq (%r13), %rdi
movq %rbx, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x4150
jmp 0x594a
movq (%r14,%rax,8), %r8
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x4150
incq %r12
addq $0x20, %rbp
cmpq $0x100, %r12            # imm = 0x100
jne 0x5902
leaq 0x3767f(%rip), %r12     # 0x3cfe0
leaq 0x1cda6(%rip), %r14     # 0x2270e
xorl %ebp, %ebp
movq (%r13), %rdi
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
movq (%r12,%rbx,8), %rdx
movl 0x10(%r12,%rbx,8), %ecx
leaq 0x1cd6a(%rip), %rsi     # 0x226f3
xorl %eax, %eax
callq 0x4150
movl 0x10(%r12,%rbx,8), %eax
testl %eax, %eax
jle 0x59cc
leaq (%r12,%rbx,8), %rbx
xorl %r15d, %r15d
movq 0x8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
testq %rcx, %rcx
je 0x59c1
movq (%r13), %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x4150
movl 0x10(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x59a0
movq (%r13), %rsi
movl $0xa, %edi
callq 0x4140
incq %rbp
cmpq $0xb, %rbp
jne 0x596a
movq (%r13), %rsi
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4140
// File: /workspace/github_c_makefile_star2_O3/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 0x6097
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x362b1(%rip), %rcx     # 0x3c2b0
cmpl $0x19, %edx
movl $0x19, %eax
cmovll %edx, %eax
addl %eax, %eax
movl $0x32, %edx
subl %eax, %edx
movslq %edx, %r15
leaq (%rcx,%r15), %rsi
movl %ebx, %edx
subl %r14d, %edx
addq $0x15, %rcx
movzwl (%rbx), %r8d
leaq 0x1cad2(%rip), %rdi     # 0x22b00
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
movq 0x36271(%rip), %rcx     # 0x3c2b0
leaq (%rcx,%r15), %rsi
leaq 0x2(%rbx), %rdx
subl %r14d, %edx
addq $0x1a, %rcx
movzbl 0x2(%rbx), %r8d
leaq 0x1cadb(%rip), %rdi     # 0x22b35
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
movq 0x36245(%rip), %rcx     # 0x3c2b0
addq %rcx, %r15
leaq 0x3(%rbx), %rdx
subl %r14d, %edx
addq $0x1b, %rcx
movzbl 0x3(%rbx), %r8d
leaq 0x1caec(%rip), %rdi     # 0x22b71
movq %r15, %rsi
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
popq %rbx
popq %r14
popq %r15
movl $0x4, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x72e7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x3504c(%rip), %rcx     # 0x3c2b0
cmpl $0x19, %edx
movl $0x19, %eax
cmovll %edx, %eax
addl %eax, %eax
movl $0x32, %edx
subl %eax, %edx
movslq %edx, %r12
leaq (%rcx,%r12), %rsi
movl %r14d, %edx
subl %r15d, %edx
addq $0x1f, %rcx
leaq 0x1b91e(%rip), %rdi     # 0x22bae
xorl %eax, %eax
callq 0x40b0
incl %ebx
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x5fe4
movq 0x35003(%rip), %rcx     # 0x3c2b0
addq %rcx, %r12
addq $0x4, %r14
movl %r14d, %edx
subl %r15d, %edx
addq $0x32, %rcx
leaq 0x1ce44(%rip), %rdi     # 0x24109
movq %r12, %rsi
xorl %eax, %eax
callq 0x40b0
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x63ef
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movl $0xa4, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mikebdp2[P]AtomDis/./datastructs_gen.c
// Function: ATOM_TABLE_ATTRIBUTE_dumper
int ATOM_TABLE_ATTRIBUTE_dumper (uint8_t *start, uint8_t *data, int indent) {
  ATOM_TABLE_ATTRIBUTE *d = (ATOM_TABLE_ATTRIBUTE *) data;
  int i;
  if (d) {
    printf ("%s       USHORT WS_SizeInBytes:8%s = 0x%04x     (%d)\n", IND(indent), FILL(22), d->WS_SizeInBytes, d->WS_SizeInBytes);
    printf ("%s       USHORT PS_SizeInBytes:7%s = 0x%04x     (%d)\n", IND(indent), FILL(22), d->PS_SizeInBytes, d->PS_SizeInBytes);
    printf ("%s       USHORT UpdatedByUtility:1%s = 0x%04x     (%d)\n", IND(indent), FILL(24), d->UpdatedByUtility, d->UpdatedByUtility);
  }
  return sizeof (ATOM_TABLE_ATTRIBUTE);
}

// Assembly:
testq %rsi, %rsi
je 0x738d
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x19, %edx
movl $0x19, %eax
cmovll %edx, %eax
movq 0x34fa1(%rip), %rdx     # 0x3c2b0
addl %eax, %eax
movl $0x32, %ecx
subl %eax, %ecx
movslq %ecx, %r14
leaq (%rdx,%r14), %rsi
addq $0x16, %rdx
movzbl (%rbx), %ecx
leaq 0x1ce21(%rip), %rdi     # 0x2414e
movl %ecx, %r8d
xorl %eax, %eax
callq 0x40b0
movq 0x34f72(%rip), %rdx     # 0x3c2b0
leaq (%rdx,%r14), %rsi
addq $0x16, %rdx
movzbl 0x1(%rbx), %ecx
andl $0x7f, %ecx
leaq 0x1ce30(%rip), %rdi     # 0x24184
movl %ecx, %r8d
xorl %eax, %eax
callq 0x40b0
movq 0x34f4b(%rip), %rdx     # 0x3c2b0
addq %rdx, %r14
addq $0x18, %rdx
movzwl (%rbx), %ecx
shrl $0xf, %ecx
leaq 0x1ce41(%rip), %rdi     # 0x241ba
movq %r14, %rsi
movl %ecx, %r8d
xorl %eax, %eax
callq 0x40b0
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x2, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mikebdp2[P]AtomDis/./datastructs_gen.c
// Function: ATOM_TABLE_ATTRIBUTE_ACCESS_dumper
int ATOM_TABLE_ATTRIBUTE_ACCESS_dumper (uint8_t *start, uint8_t *data, int indent) {
  ATOM_TABLE_ATTRIBUTE_ACCESS *d = (ATOM_TABLE_ATTRIBUTE_ACCESS *) data;
  int i;
  if (d) {
    printf ("%s%04x:  (union) ATOM_TABLE_ATTRIBUTE sbfAccess%s :\n", IND(indent), (int)(((uint8_t*)&d->sbfAccess)-start), FILL(37)); ATOM_TABLE_ATTRIBUTE_dumper (start, (uint8_t*) &d->sbfAccess, indent+1);
    printf ("%s%04x:  (union) USHORT susAccess%s = 0x%04x     (%d)\n", IND(indent), (int)(((uint8_t*)&d->susAccess)-start), FILL(23), d->susAccess, d->susAccess);
  }
  return sizeof (ATOM_TABLE_ATTRIBUTE_ACCESS);
}

// Assembly:
testq %rsi, %rsi
je 0x7424
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq 0x34f01(%rip), %rcx     # 0x3c2b0
cmpl $0x19, %edx
movl $0x19, %eax
cmovll %edx, %eax
addl %eax, %eax
movl $0x32, %edx
subl %eax, %edx
movslq %edx, %r14
leaq (%rcx,%r14), %rsi
movl %ebx, %r15d
subl %edi, %r15d
addq $0x25, %rcx
leaq 0x1ce17(%rip), %rdi     # 0x241f2
movl %r15d, %edx
xorl %eax, %eax
callq 0x40b0
incl %ebp
movq %rbx, %rsi
movl %ebp, %edx
callq 0x72ed
movq 0x34eb8(%rip), %rcx     # 0x3c2b0
addq %rcx, %r14
addq $0x17, %rcx
movzwl (%rbx), %r8d
leaq 0x1ce1d(%rip), %rdi     # 0x24227
movq %r14, %rsi
movl %r15d, %edx
movl %r8d, %r9d
xorl %eax, %eax
callq 0x40b0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
movl $0x2, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mikebdp2[P]AtomDis/./datastructs_gen.c
// Function: ATOM_COMMON_ROM_COMMAND_TABLE_HEADER_dumper
int ATOM_COMMON_ROM_COMMAND_TABLE_HEADER_dumper (uint8_t *start, uint8_t *data, int indent) {
  ATOM_COMMON_ROM_COMMAND_TABLE_HEADER *d = (ATOM_COMMON_ROM_COMMAND_TABLE_HEADER *) data;
  int i;
  if (d) {
    printf ("%s%04x:  ATOM_COMMON_TABLE_HEADER CommonHeader%s :\n", IND(indent), (int)(((uint8_t*)&d->CommonHeader)-start), FILL(36)); ATOM_COMMON_TABLE_HEADER_dumper (start, (uint8_t*) &d->CommonHeader, indent+1);
    printf ("%s%04x:  ATOM_TABLE_ATTRIBUTE TableAttribute%s :\n", IND(indent), (int)(((uint8_t*)&d->TableAttribute)-start), FILL(34)); ATOM_TABLE_ATTRIBUTE_dumper (start, (uint8_t*) &d->TableAttribute, indent+1);
  }
  return sizeof (ATOM_COMMON_ROM_COMMAND_TABLE_HEADER);
}

// Assembly:
testq %rsi, %rsi
je 0x74ca
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x34e66(%rip), %rcx     # 0x3c2b0
cmpl $0x19, %edx
movl $0x19, %eax
cmovll %edx, %eax
addl %eax, %eax
movl $0x32, %edx
subl %eax, %edx
movslq %edx, %r12
leaq (%rcx,%r12), %rsi
movl %r14d, %edx
subl %r15d, %edx
addq $0x24, %rcx
leaq 0x1cde8(%rip), %rdi     # 0x2425e
xorl %eax, %eax
callq 0x40b0
incl %ebx
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x5fe4
movq 0x34e1d(%rip), %rcx     # 0x3c2b0
addq %rcx, %r12
addq $0x4, %r14
movl %r14d, %edx
subl %r15d, %edx
addq $0x22, %rcx
leaq 0x1cde7(%rip), %rdi     # 0x24292
movq %r12, %rsi
xorl %eax, %eax
callq 0x40b0
movq %r14, %rsi
movl %ebx, %edx
callq 0x72ed
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movl $0x6, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mikebdp2[P]AtomDis/./datastructs_gen.c
// Function: ATOM_ADJUST_MEMORY_CLOCK_FREQ_dumper
int ATOM_ADJUST_MEMORY_CLOCK_FREQ_dumper (uint8_t *start, uint8_t *data, int indent) {
  ATOM_ADJUST_MEMORY_CLOCK_FREQ *d = (ATOM_ADJUST_MEMORY_CLOCK_FREQ *) data;
  int i;
  if (d) {
    printf ("%s       ULONG ulClockFreq:24%s = 0x%08x (%d)\n", IND(indent), FILL(19), d->ulClockFreq, d->ulClockFreq);
    printf ("%s       ULONG ulMemoryModuleNumber:7%s = 0x%08x (%d)\n", IND(indent), FILL(27), d->ulMemoryModuleNumber, d->ulMemoryModuleNumber);
    printf ("%s       ULONG ulPointerReturnFlag:1%s = 0x%08x (%d)\n", IND(indent), FILL(26), d->ulPointerReturnFlag, d->ulPointerReturnFlag);
  }
  return sizeof (ATOM_ADJUST_MEMORY_CLOCK_FREQ);
}

// Assembly:
testq %rsi, %rsi
je 0x7576
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x34dc9(%rip), %rax     # 0x3c2b0
cmpl $0x19, %edx
movl $0x19, %ecx
cmovll %edx, %ecx
addl %ecx, %ecx
movl $0x32, %edx
subl %ecx, %edx
movslq %edx, %r14
leaq (%rax,%r14), %rsi
addq $0x13, %rax
movl $0xffffff, %ecx         # imm = 0xFFFFFF
andl (%rbx), %ecx
leaq 0x1cdb0(%rip), %rdi     # 0x242c4
movq %rax, %rdx
movl %ecx, %r8d
xorl %eax, %eax
callq 0x40b0
movq 0x34d88(%rip), %rdx     # 0x3c2b0
leaq (%rdx,%r14), %rsi
addq $0x1b, %rdx
movzbl 0x3(%rbx), %ecx
andl $0x7f, %ecx
leaq 0x1cdb5(%rip), %rdi     # 0x242f3
movl %ecx, %r8d
xorl %eax, %eax
callq 0x40b0
movq 0x34d61(%rip), %rdx     # 0x3c2b0
addq %rdx, %r14
addq $0x1a, %rdx
movl (%rbx), %ecx
shrl $0x1f, %ecx
leaq 0x1cdc8(%rip), %rdi     # 0x2432a
movq %r14, %rsi
movl %ecx, %r8d
xorl %eax, %eax
callq 0x40b0
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x4, %eax
retq