LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/sds.c
// Function: sdscatvprintf
sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
    va_list cpy;
    char *buf, *t;
    size_t buflen = 16;

    while(1) {
        buf = malloc(buflen);
#ifdef SDS_ABORT_ON_OOM
        if (buf == NULL) sdsOomAbort();
#else
        if (buf == NULL) return NULL;
#endif
        buf[buflen-2] = '\0';
        va_copy(cpy,ap);
        vsnprintf(buf, buflen, fmt, cpy);
        if (buf[buflen-2] != '\0') {
            free(buf);
            buflen *= 2;
            continue;
        }
        break;
    }
    t = sdscat(s, buf);
    free(buf);
    return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl $0x10, %r13d
movl $0x10, %edi
callq 0x2300
testq %rax, %rax
je 0x4c78
movq %rax, %rbp
movq %rbx, 0x8(%rsp)
leaq 0x10(%rsp), %r14
xorl %ebx, %ebx
movb $0x0, -0x2(%rbp,%r13)
movq 0x10(%r15), %rax
movq %rax, 0x20(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20c0
cmpb $0x0, -0x2(%rbp,%r13)
je 0x4c7c
movq %rbp, %rdi
callq 0x2060
addq %r13, %r13
movq %r13, %rdi
callq 0x2300
movq %rax, %rbp
testq %rax, %rax
jne 0x4c2a
jmp 0x4c94
xorl %ebx, %ebx
jmp 0x4c94
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x2330
movq %rax, %rbx
movq %rbp, %rdi
callq 0x2060
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/sds.c
// Function: sdstrim
sds sdstrim(sds s, const char *cset) {
    struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
    char *start, *end, *sp, *ep;
    size_t len;

    sp = start = s;
    ep = end = s+sdslen(s)-1;
    while(sp <= end && strchr(cset, *sp)) sp++;
    while(ep > start && strchr(cset, *ep)) ep--;
    len = (sp > ep) ? 0 : ((ep-sp)+1);
    if (sh->buf != sp) memmove(sh->buf, sp, len);
    sh->buf[len] = '\0';
    sh->free = sh->free+(sh->len-len);
    sh->len = len;
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movslq -0x8(%rdi), %rax
leaq (%rdi,%rax), %r12
decq %r12
movq %rdi, %r14
cmpq %rdi, %r12
jb 0x4d67
movq %rbx, %r14
movsbl (%r14), %esi
movq %r15, %rdi
callq 0x2170
testq %rax, %rax
je 0x4d67
incq %r14
cmpq %r12, %r14
jbe 0x4d4e
cmpq %rbx, %r12
jbe 0x4d89
movsbl (%r12), %esi
movq %r15, %rdi
callq 0x2170
testq %rax, %rax
je 0x4d89
decq %r12
cmpq %rbx, %r12
ja 0x4d6c
movq %rbx, %r12
xorl %r15d, %r15d
subq %r14, %r12
leaq 0x1(%r12), %rax
cmovaeq %rax, %r15
cmpq %rbx, %r14
je 0x4dab
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x23a0
movb $0x0, (%rbx,%r15)
movl -0x4(%rbx), %eax
subl %r15d, %eax
addl -0x8(%rbx), %eax
movl %eax, -0x4(%rbx)
movl %r15d, -0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/sds.c
// Function: sdsrange
sds sdsrange(sds s, int start, int end) {
    struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
    size_t newlen, len = sdslen(s);

    if (len == 0) return s;
    if (start < 0) {
        start = len+start;
        if (start < 0) start = 0;
    }
    if (end < 0) {
        end = len+end;
        if (end < 0) end = 0;
    }
    newlen = (start > end) ? 0 : (end-start)+1;
    if (newlen != 0) {
        if (start >= (signed)len) {
            newlen = 0;
        } else if (end >= (signed)len) {
            end = len-1;
            newlen = (start > end) ? 0 : (end-start)+1;
        }
    } else {
        start = 0;
    }
    if (start && newlen) memmove(sh->buf, sh->buf+start, newlen);
    sh->buf[newlen] = 0;
    sh->free = sh->free+(sh->len-newlen);
    sh->len = newlen;
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl -0x8(%rdi), %edi
testl %edi, %edi
je 0x4e61
leal (%rdi,%rsi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
testl %esi, %esi
cmovnsl %esi, %ecx
leal (%rdi,%rdx), %esi
testl %esi, %esi
cmovlel %eax, %esi
testl %edx, %edx
cmovnsl %edx, %esi
movl %esi, %edx
subl %ecx, %edx
leal 0x1(%rdx), %edx
cmovbl %eax, %edx
testl %edx, %edx
je 0x4e1a
movl %edi, %eax
subl %ecx, %eax
jle 0x4e1f
cmpl %edi, %esi
jge 0x4e24
movslq %edx, %r14
jmp 0x4e30
xorl %r14d, %r14d
jmp 0x4e32
xorl %r14d, %r14d
jmp 0x4e30
decl %edi
xorl %edx, %edx
cmpl %edi, %ecx
cmovgl %edx, %eax
movslq %eax, %r14
movl %ecx, %eax
testl %eax, %eax
je 0x4e4c
testq %r14, %r14
je 0x4e4c
movslq %eax, %rsi
addq %rbx, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x23a0
movb $0x0, (%rbx,%r14)
movl -0x4(%rbx), %eax
subl %r14d, %eax
addl -0x8(%rbx), %eax
movl %eax, -0x4(%rbx)
movl %r14d, -0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/sds.c
// Function: sdscmp
int sdscmp(sds s1, sds s2) {
    size_t l1, l2, minlen;
    int cmp;

    l1 = sdslen(s1);
    l2 = sdslen(s2);
    minlen = (l1 < l2) ? l1 : l2;
    cmp = memcmp(s1,s2,minlen);
    if (cmp == 0) return l1-l2;
    return cmp;
}

// Assembly:
pushq %rbx
movl -0x8(%rdi), %eax
movl -0x8(%rsi), %ecx
movl %eax, %ebx
subl %ecx, %ebx
cmovbl %eax, %ecx
movslq %ecx, %rdx
callq 0x2240
testl %eax, %eax
cmovel %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: redisAsyncConnect
redisAsyncContext *redisAsyncConnect(const char *ip, int port) {
    redisContext *c = redisConnectNonBlock(ip,port);
    redisAsyncContext *ac = redisAsyncInitialize(c);
    __redisAsyncCopyError(ac);
    return ac;
}

// Assembly:
pushq %rax
callq 0x2340
movq %rax, %rdi
callq 0x56c7
movl (%rax), %ecx
movl %ecx, 0xa0(%rax)
leaq 0x4(%rax), %rcx
movq %rcx, 0xa8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: redisAsyncInitialize
static redisAsyncContext *redisAsyncInitialize(redisContext *c) {
    redisAsyncContext *ac = realloc(c,sizeof(redisAsyncContext));
    c = &(ac->c);

    /* The regular connect functions will always set the flag REDIS_CONNECTED.
     * For the async API, we want to wait until the first write event is
     * received up before setting this flag, so reset it here. */
    c->flags &= ~REDIS_CONNECTED;

    ac->err = 0;
    ac->errstr = NULL;
    ac->data = NULL;

    ac->ev.data = NULL;
    ac->ev.addRead = NULL;
    ac->ev.delRead = NULL;
    ac->ev.addWrite = NULL;
    ac->ev.delWrite = NULL;
    ac->ev.cleanup = NULL;

    ac->onConnect = NULL;
    ac->onDisconnect = NULL;

    ac->replies.head = NULL;
    ac->replies.tail = NULL;
    ac->sub.invalid.head = NULL;
    ac->sub.invalid.tail = NULL;
    ac->sub.channels = dictCreate(&callbackDict,NULL);
    ac->sub.patterns = dictCreate(&callbackDict,NULL);
    return ac;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x128, %esi            # imm = 0x128
callq 0x2350
movq %rax, %rbx
andb $-0x3, 0x88(%rax)
movl $0x0, 0xa0(%rax)
movl $0x30, %edi
callq 0x2300
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
movups %xmm0, 0xf8(%rbx)
movups %xmm0, 0x108(%rbx)
xorl %r14d, %r14d
movq %r14, (%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
leaq 0x4b4b(%rip), %r15      # 0xa288
movq %r15, 0x8(%rax)
movq %rax, 0x118(%rbx)
movl $0x30, %edi
callq 0x2300
movq %r14, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x120(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: redisAsyncConnectUnix
redisAsyncContext *redisAsyncConnectUnix(const char *path) {
    redisContext *c = redisConnectUnixNonBlock(path);
    redisAsyncContext *ac = redisAsyncInitialize(c);
    __redisAsyncCopyError(ac);
    return ac;
}

// Assembly:
pushq %rax
callq 0x2360
movq %rax, %rdi
callq 0x56c7
movl (%rax), %ecx
movl %ecx, 0xa0(%rax)
leaq 0x4(%rax), %rcx
movq %rcx, 0xa8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: _redisAsyncHandleConnect
static int __redisAsyncHandleConnect(redisAsyncContext *ac) {
    redisContext *c = &(ac->c);

    if (redisCheckSocketError(c,c->fd) == REDIS_ERR) {
        /* Try again later when connect(2) is still in progress. */
        if (errno == EINPROGRESS)
            return REDIS_OK;

        if (ac->onConnect) ac->onConnect(ac,REDIS_ERR);
        __redisAsyncDisconnect(ac);
        return REDIS_ERR;
    }

    /* Mark context as connected. */
    c->flags |= REDIS_CONNECTED;
    if (ac->onConnect) ac->onConnect(ac,REDIS_OK);
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x84(%rdi), %esi
callq 0x2150
cmpl $-0x1, %eax
je 0x5f42
orb $0x2, 0x88(%rbx)
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0x5f4c
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq *%rax
jmp 0x5f73
callq 0x2080
cmpl $0x73, (%rax)
jne 0x5f50
xorl %ebp, %ebp
jmp 0x5f73
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0x5f66
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *%rax
movq %rbx, %rdi
callq 0x5a17
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: redisvAsyncCommand
int redisvAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, va_list ap) {
    char *cmd;
    int len;
    int status;
    len = redisvFormatCommand(&cmd,format,ap);
    status = __redisAsyncCommand(ac,fn,privdata,cmd,len);
    free(cmd);
    return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq 0x2450
movq (%r12), %rcx
movslq %eax, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6056
movl %eax, %ebx
movq (%r12), %rdi
callq 0x2060
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: redisAsyncCommandArgv
int redisAsyncCommandArgv(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, int argc, const char **argv, const size_t *argvlen) {
    char *cmd;
    int len;
    int status;
    len = redisFormatCommandArgv(&cmd,argc,argv,argvlen);
    status = __redisAsyncCommand(ac,fn,privdata,cmd,len);
    free(cmd);
    return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
movl %ecx, %esi
movq %r8, %rdx
movq %r9, %rcx
callq 0x2040
movq (%r12), %rcx
movslq %eax, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6056
movl %eax, %ebx
movq (%r12), %rdi
callq 0x2060
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: nextArgument
static char *nextArgument(char *start, char **str, size_t *len) {
    char *p = start;
    if (p[0] != '$') {
        p = strchr(p,'$');
        if (p == NULL) return NULL;
    }

    *len = (int)strtol(p+1,NULL,10);
    p = strchr(p,'\r');
    assert(p);
    *str = p+2;
    return p+2+(*len)+2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpb $0x24, (%rdi)
je 0x64b9
movq %r15, %rdi
movl $0x24, %esi
callq 0x2170
movq %rax, %r15
testq %rax, %rax
je 0x64fb
leaq 0x1(%r15), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x22b0
movslq %eax, %r12
movq %r12, (%r14)
movq %r15, %rdi
movl $0xd, %esi
callq 0x2170
testq %rax, %rax
je 0x64ff
leaq 0x2(%rax), %rcx
movq %rcx, (%rbx)
addq %r12, %rax
addq $0x4, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x64ef
leaq 0x126c(%rip), %rdi      # 0x7772
leaq 0x104f(%rip), %rsi      # 0x755c
leaq 0x1260(%rip), %rcx      # 0x7774
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/dict.c
// Function: dictReplace
static int dictReplace(dict *ht, void *key, void *val) {
    dictEntry *entry, auxentry;

    /* Try to add the element. If the key
     * does not exists dictAdd will suceed. */
    if (dictAdd(ht, key, val) == DICT_OK)
        return 1;
    /* It already exists, get the entry */
    entry = dictFind(ht, key);
    /* Free the old value and set the new one */
    /* Set the new value and free the old one. Note that it is important
     * to do that in this order, as the value may just be exactly the same
     * as the previous one. In this context, think to reference counting,
     * you want to increment (set), and then decrement (free), and not the
     * reverse. */
    auxentry = *entry;
    dictSetHashVal(ht, entry, val);
    dictFreeEntryVal(ht, &auxentry);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x6544
cmpq %rsi, 0x20(%rbx)
jne 0x655b
addq %rsi, %rsi
jmp 0x6549
movl $0x4, %esi
movq %rbx, %rdi
callq 0x66bb
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x65a9
movq 0x8(%rbx), %rax
movq %r15, %rdi
callq *(%rax)
movl %eax, %r12d
andl 0x18(%rbx), %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x65a9
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x6597
movq 0x28(%rbx), %rdi
movq (%r13), %rdx
movq %r15, %rsi
callq *%rax
testl %eax, %eax
je 0x659d
jmp 0x65a3
cmpq %r15, (%r13)
je 0x65a3
movq 0x10(%r13), %r13
jmp 0x6572
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl $-0x1, %r12d
je 0x6612
movl $0x18, %edi
callq 0x2300
movq %rax, %r13
movq (%rbx), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rax,%rcx,8)
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rcx
movq %r15, %rax
testq %rcx, %rcx
je 0x65e7
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq *%rcx
movq %rax, (%r13)
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rcx
movq %r14, %rax
testq %rcx, %rcx
je 0x6604
movq 0x28(%rbx), %rdi
movq %r14, %rsi
callq *%rcx
movq %rax, 0x8(%r13)
incq 0x20(%rbx)
cmpl $-0x1, %r12d
jne 0x6661
movq %rbx, %rdi
movq %r15, %rsi
callq 0x642e
movq %rax, %r12
movq 0x8(%rax), %r15
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x663d
movq 0x28(%rbx), %rdi
movq %r14, %rsi
callq *%rax
movq %rax, %r14
movq %r14, 0x8(%r12)
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x6661
movq 0x28(%rbx), %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ranbenbasat[P]RHHH/randhhh1D.c
// Function: update
void update(LCLitem_t item, int count) {
#ifdef  PROB
	if (nrIgnore--) return;
	short i = rand() % NUM_COUNTERS;
	LCU_Update(counters[i], item & masks[i]);
	nrIgnore = log((float)rand()) / logIgnoreProb - minusQuantity;
#else
	short i = rand() % NUM_COUNTERS;
	LCU_Update(counters[i], item & masks[i]);
#endif
}

// Assembly:
subl $0x1, 0x4dde(%rip)      # 0x6270
jae 0x1508
pushq %rbx
movl %edi, %ebx
callq 0x11f0
cltq
imulq $0x3e0f83e1, %rax, %rcx # imm = 0x3E0F83E1
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
movl %ecx, %edx
shll $0x5, %edx
addl %ecx, %edx
subl %edx, %eax
movswq %ax, %rax
leaq 0x4dba(%rip), %rcx      # 0x6280
movq (%rcx,%rax,8), %rdi
leaq 0x4c4f(%rip), %rcx      # 0x6120
andl (%rcx,%rax,4), %ebx
movl %ebx, %esi
callq 0x2133
callq 0x11f0
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x10e0
divsd 0x4d6b(%rip), %xmm0     # 0x6260
subsd 0x4d6b(%rip), %xmm0     # 0x6268
cvttsd2si %xmm0, %eax
movl %eax, 0x4d69(%rip)      # 0x6270
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/pid.c
// Function: fork_so_much
void
fork_so_much(int n)
{
	int pid;

	printf("Starting to spawn %d blocking children\n", n);
	while (--n) {
		switch (pid = fork()) {
			case -1:
				_STRESS_MUST(0, "Fork returned -1.");
				break;
			case 0:
				printf("[%d] - blocking\n", n);
				stress_wait_until_signalized();
				return;
		}
	}
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x933(%rip), %rdi       # 0x2108
movl %ebx, %esi
xorl %eax, %eax
callq 0x1090
cmpl $0x1, %ebx
je 0x17f8
callq 0x1130
decl %ebx
testl %eax, %eax
je 0x17fa
cmpl $-0x1, %eax
jne 0x17de
callq 0x138c
popq %rbx
retq
leaq 0x94b(%rip), %rdi       # 0x214c
movl %ebx, %esi
xorl %eax, %eax
callq 0x1090
popq %rbx
jmp 0x16c2
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/pid.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };

	stress_parse_args(argc, argv, &args);
	fork_so_much(args.n);
	stress_wait_until_signalized();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x2008, %edx           # imm = 0x2008
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1599
movl (%r14), %edi
callq 0x17cb
callq 0x16c2
xorl %eax, %eax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doUmount
static void doUmount(void)
{
  struct mountedFS *mount, **ptr = &mounts;

  if (checkDev(words[0]) != 0) {
    if ((mount = lookupDev(words[0])) != NULL) {
      if (mount->filesys->umount == NULL) {
        fprintf(stderr, "umount: \"%s\" may not be unmounted\n", words[0]);
        return;
      }

      for (ptr = &mounts; *ptr != NULL; ptr = &((*ptr)->next))
        if (*ptr == mount) {
          *ptr = mount->next;
          (*mount->filesys->umount)(mount);
          fclose(mount->container);
          free(mount);
          return;
        }
      fprintf(stderr, "Mounted file system list corrupted\n");
      exit(10);
    } else fprintf(stderr, "umount: \"%s\" is not mounted\n", words[0]);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x142cc(%rip), %rax     # 0x190a8
movq (%rax), %rdi
callq 0x635e
testl %eax, %eax
je 0x4e13
movq 0x142b9(%rip), %rax     # 0x190a8
movq (%rax), %r14
leaq 0x152b7(%rip), %rbx     # 0x1a0b0
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x4e1b
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x31c0
testl %eax, %eax
jne 0x4df9
jmp 0x4e1d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x4e6c
movq 0x20(%rbx), %rax
cmpq $0x0, 0x30(%rax)
je 0x4e7f
leaq 0x1527c(%rip), %rax     # 0x1a0b0
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
je 0x4ea1
cmpq %rbx, %rax
jne 0x4e34
movq (%rbx), %rax
movq %rax, (%rcx)
movq 0x20(%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x38(%rbx), %rdi
callq 0x3110
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3050
movq 0x1317d(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xb3db(%rip), %rsi      # 0x10258
jmp 0x4e90
movq 0x1316a(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xb381(%rip), %rsi      # 0x10211
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x31d0
callq 0x3372
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doSet
static void doSet(void)
{
  struct mountedFS *mount;
  char *fname;
  uint8_t unit, present;

  if ((mount = findMount("set", words[0], &unit, &present, &fname)) != NULL) {
    if (*fname == '\0') {
      if (mount->filesys->set != NULL)
        (*mount->filesys->set)(mount, unit, present);
      else fprintf(stderr, "set: \"%s\" does not support \"set\" command\n",
                   mount->filesys->fstype);
    } else fprintf(stderr, "set: Does not expect a file name\n");
  }
}

// Assembly:
subq $0x18, %rsp
movq 0x14066(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xaff3(%rip), %rdi      # 0x1003f
leaq 0xf(%rsp), %rdx
leaq 0xe(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x509b
movq 0x10(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x508f
movq 0x20(%rax), %rdi
movq 0x48(%rdi), %rcx
testq %rcx, %rcx
je 0x5096
movzbl 0xf(%rsp), %esi
movzbl 0xe(%rsp), %edx
movq %rax, %rdi
addq $0x18, %rsp
jmpq *%rcx
callq 0x3419
jmp 0x509b
callq 0x3435
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doInfo
static void doInfo(void)
{
  struct mountedFS *mount;
  char *fname;
  uint8_t unit, present;

  if ((mount = findMount("info", words[0], &unit, &present, &fname)) != NULL) {
    if (*fname == '\0')
      (*mount->filesys->info)(mount, unit, present);
    else fprintf(stderr, "info: Does not expect a file name\n");
  }
}

// Assembly:
subq $0x18, %rsp
movq 0x13ffd(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xaf8e(%rip), %rdi      # 0x10043
leaq 0xf(%rsp), %rdx
leaq 0xe(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x50f8
movq 0x10(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x50f3
movq 0x20(%rax), %rcx
movq 0x50(%rcx), %rcx
movzbl 0xf(%rsp), %esi
movzbl 0xe(%rsp), %edx
movq %rax, %rdi
addq $0x18, %rsp
jmpq *%rcx
callq 0x3454
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doType
static void doType(void)
{
  struct mountedFS *mount;
  char *fname;
  void *file;
  uint8_t unit, present;

  /*
   * Force ASCII mode
   */
  SWSET('a');

  if ((mount = findMount("type", words[0], &unit, &present, &fname)) != NULL) {
    if ((file = (*mount->filesys->openFileR)(mount, unit, fname)) != NULL) {
      char buf[BFRSIZ];
      size_t len, i;

      while ((len = (*mount->filesys->readFile)(file, buf, BFRSIZ)) != 0) {
        for (i = 0; i < len; i++)
          if (buf[i] != '\0')
            putchar(buf[i]);
      }

      /*
       * Close the file
       */
      (*mount->filesys->closeFile)(file);
    } else fprintf(stderr, "type: \"%s\" no such file\n", fname);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
orb $0x1, 0x1383c(%rip)     # 0x18fc8
movq 0x13915(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xa8cc(%rip), %rdi      # 0x10069
leaq 0x6(%rsp), %rdx
leaq 0x7(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x584d
movq %rax, %rbx
movq 0x20(%rax), %rax
movzbl 0x6(%rsp), %esi
movq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq *0x60(%rax)
testq %rax, %rax
je 0x585e
movq %rax, %r14
movq 0x20(%rbx), %rax
leaq 0x10(%rsp), %rsi
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
callq *0x80(%rax)
testq %rax, %rax
je 0x5843
movq %rax, %r12
leaq 0x10(%rsp), %r15
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r13d, %r13d
movsbl 0x10(%rsp,%r13), %edi
testl %edi, %edi
je 0x581e
callq 0x3060
incq %r13
cmpq %r13, %r12
jne 0x580f
movq 0x20(%rbx), %rax
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %r15, %rsi
callq *0x80(%rax)
movq %rax, %r12
testq %rax, %rax
jne 0x5804
movq 0x20(%rbx), %rax
movq %r14, %rdi
callq *0x78(%rax)
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x1278b(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xad70(%rip), %rsi      # 0x105df
movq %r15, %rdx
xorl %eax, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x31d0
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doDelete
static void doDelete(void)
{
  struct mountedFS *mount;
  char *fname;
  void *file;
  uint8_t unit, present;

  if ((mount = findMount("delete", words[0], &unit, &present, &fname)) != NULL) {
    if (mount->filesys->deleteFile != NULL) {
      if ((mount->flags & FS_READONLY) == 0) {
        if ((file = (*mount->filesys->openFileR)(mount, unit, fname)) != NULL)
          (*mount->filesys->deleteFile)(file, fname);
        else fprintf(stderr, "delete: \"%s\" no such file\n", fname);
      } else fprintf(stderr, "delete: \"%s\" is mounted read-only\n", mount->name);
    } else fprintf(stderr, "delete: Function not supported\n");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x13811(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xa7d0(%rip), %rdi      # 0x10071
leaq 0xe(%rsp), %rdx
leaq 0xf(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x5908
movq %rax, %rbx
movq 0x20(%rax), %rax
cmpq $0x0, 0x90(%rax)
je 0x5903
testb $0x1, 0x30(%rbx)
jne 0x5910
movzbl 0xe(%rsp), %esi
movq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq *0x60(%rax)
testq %rax, %rax
je 0x592a
movq 0x20(%rbx), %rcx
movq 0x90(%rcx), %rcx
movq %rax, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r14
jmpq *%rcx
callq 0x34a6
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x126d9(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
addq $0x8, %rbx
leaq 0xacee(%rip), %rsi      # 0x10613
movq %rbx, %rdx
jmp 0x593e
movq 0x126bf(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xacbd(%rip), %rsi      # 0x105f8
movq %r14, %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x31d0
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doDo
static void doDo(void)
{
  uint8_t noecho = SWISSET('q');
  FILE *cmdFile;
  char buf[MAX_CMDLEN];

  if ((cmdFile = fopen(words[0], "r")) != NULL) {
    for (;;) {
      int len;

      if (fgets(buf, sizeof(buf), cmdFile) == NULL) {
        fclose(cmdFile);
        return;
      }

      if (!noecho)
        printf("fsio> %s", buf);

      /*
       * Remove any trailing newline
       */
      len = strlen(buf);
      if (buf[len - 1] == '\n')
        buf[len - 1] = '\0';

      /*
       * Parse the command line and execute any command found
       */
      FSioExecute(buf);
    }
  } else fprintf(stderr, "do: failed to open \"%s\"\n", words[0]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl 0x1362a(%rip), %ebp     # 0x18fc8
movq 0x13703(%rip), %rax     # 0x190a8
movq (%rax), %rdi
leaq 0xbc44(%rip), %rsi      # 0x115f3
callq 0x3270
testq %rax, %rax
je 0x5a2e
movq %rax, %rbx
movq %rsp, %r14
leaq 0xa71f(%rip), %r15      # 0x100e5
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x31b0
movq %rax, %r12
testq %rax, %rax
je 0x5a11
btl $0x10, %ebp
jb 0x59f1
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x3160
movq %r14, %rdi
callq 0x3130
decl %eax
cltq
cmpb $0xa, (%rsp,%rax)
jne 0x5a07
movb $0x0, (%rsp,%rax)
movq %r14, %rdi
callq 0x5ee2
jmp 0x5a19
movq %rbx, %rdi
callq 0x3110
testq %r12, %r12
jne 0x59c6
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x34c2
jmp 0x5a1e
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doExit
static void doExit(void)
{
  struct mountedFS *mount;

  for (mount = mounts; mount != NULL; mount = mount->next)
    if (mount != &localMount)
      fclose(mount->container);

#ifdef DEBUG
  if ((DEBUGout != NULL) && (DEBUGout != stdout))
    fclose(DEBUGout);
#endif

  exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x1462f(%rip), %rbx     # 0x1a0b0
testq %rbx, %rbx
je 0x5aa3
leaq 0x1462b(%rip), %r14     # 0x1a0b8
cmpq %r14, %rbx
je 0x5a9b
movq 0x38(%rbx), %rdi
callq 0x3110
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x5a8d
movq 0x1350e(%rip), %rdi     # 0x18fb8
testq %rdi, %rdi
je 0x5ac0
movq 0x12502(%rip), %rax     # 0x17fb8
cmpq (%rax), %rdi
je 0x5ac0
callq 0x3110
xorl %edi, %edi
callq 0x32b0
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doRewind
static void doRewind(void)
{
  struct mountedFS *mount;
  char *fname;
  uint8_t unit, present;

  if ((mount = findMount("rewind", words[0], &unit, &present, &fname)) != NULL) {
    if ((mount->filesys->flags & FS_TAPE) == 0) {
      fprintf(stderr, "rewind: Command only valid on magtapes\n");
      return;
    }

    if (*fname == '\0')
      (*mount->filesys->rewind)(mount);
    else fprintf(stderr, "rewind: Does not expect a file name\n");
  }
}

// Assembly:
subq $0x18, %rsp
movq 0x135d6(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xa5b8(%rip), %rdi      # 0x10094
leaq 0xf(%rsp), %rdx
leaq 0xe(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x5b22
movq 0x20(%rax), %rcx
testb $0x2, 0x18(%rcx)
je 0x5b16
movq 0x10(%rsp), %rdx
cmpb $0x0, (%rdx)
jne 0x5b1d
movq %rax, %rdi
addq $0x18, %rsp
jmpq *0x98(%rcx)
callq 0x3500
jmp 0x5b22
callq 0x34e4
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doEOM
static void doEOM(void)
{
  struct mountedFS *mount;
  char *fname;
  uint8_t unit, present;

  if ((mount = findMount("eom", words[0], &unit, &present, &fname)) != NULL) {
    if ((mount->filesys->flags & FS_TAPE) == 0) {
      fprintf(stderr, "eom: Command only valid on magtapes\n");
      return;
    }

    if (*fname == '\0')
      (*mount->filesys->eom)(mount);
    else fprintf(stderr, "eom: Does not expect a file name\n");
  }
}

// Assembly:
subq $0x18, %rsp
movq 0x13576(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xa55f(%rip), %rdi      # 0x1009b
leaq 0xf(%rsp), %rdx
leaq 0xe(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x5b82
movq 0x20(%rax), %rcx
testb $0x2, 0x18(%rcx)
je 0x5b76
movq 0x10(%rsp), %rdx
cmpb $0x0, (%rdx)
jne 0x5b7d
movq %rax, %rdi
addq $0x18, %rsp
jmpq *0xa0(%rcx)
callq 0x3538
jmp 0x5b82
callq 0x351c
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doSkipForw
static void doSkipForw(void)
{
  struct mountedFS *mount;
  char *fname;
  uint8_t unit, present;

  if ((mount = findMount("skipf", words[0], &unit, &present, &fname)) != NULL) {
    if ((mount->filesys->flags & FS_TAPE) == 0) {
      fprintf(stderr, "skipf: Command only valid on magtapes\n");
      return;
    }

    if (*fname == '\0') {
      char *endptr;
      unsigned long count = strtoul(words[1], &endptr, 10);

      if (*endptr != '\0') {
        fprintf(stderr, "skipf: Invalid character in count\n");
        return;
      }

      if (count != 0)
        (*mount->filesys->skipforw)(mount, count);
    } else fprintf(stderr, "skipf: Does not expect a file name\n");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x13513(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xa500(%rip), %rdi      # 0x1009f
leaq 0x7(%rsp), %rdx
leaq 0x6(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x5c09
movq %rax, %rbx
movq 0x20(%rax), %rax
testb $0x2, 0x18(%rax)
je 0x5c11
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x5c18
movq 0x134d2(%rip), %rax     # 0x190a8
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x3290
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x5c1f
testq %rax, %rax
je 0x5c09
movq 0x20(%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0xa8(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x358c
jmp 0x5c09
callq 0x3554
jmp 0x5c09
callq 0x3570
jmp 0x5c09
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: doSkipRev
static void doSkipRev(void)
{
  struct mountedFS *mount;
  char *fname;
  uint8_t unit, present;

  if ((mount = findMount("skipf", words[0], &unit, &present, &fname)) != NULL) {
    if ((mount->filesys->flags & FS_TAPE) == 0) {
      fprintf(stderr, "skipr: Command only valid on magtapes\n");
      return;
    }

    if (*fname == '\0') {
      char *endptr;
      unsigned long count = strtoul(words[1], &endptr, 10);

      if (*endptr != '\0') {
        fprintf(stderr, "skipr: Invalid character in count\n");
        return;
      }

      if (count != 0)
        (*mount->filesys->skiprev)(mount, count);
    } else fprintf(stderr, "skipr: Does not expect a file name\n");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x13474(%rip), %rax     # 0x190a8
movq (%rax), %rsi
leaq 0xa461(%rip), %rdi      # 0x1009f
leaq 0x7(%rsp), %rdx
leaq 0x6(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0x63c4
testq %rax, %rax
je 0x5ca8
movq %rax, %rbx
movq 0x20(%rax), %rax
testb $0x2, 0x18(%rax)
je 0x5cb0
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x5cb7
movq 0x13433(%rip), %rax     # 0x190a8
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x3290
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x5cbe
testq %rax, %rax
je 0x5ca8
movq 0x20(%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0xb0(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x35e0
jmp 0x5ca8
callq 0x35a8
jmp 0x5ca8
callq 0x35c4
jmp 0x5ca8
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: main
int main(
  int argc,
  char **argv
)
{
  FILE *commands = stdin;
  int ch;

  FSioInit();

  /*
   * Process command line switches
   */
  while ((ch = getopt(argc, argv, "qv")) != -1) {
    switch (ch) {
      case 'q':
        quiet = 1;
        break;

      case 'v':
        verbose = 1;
        break;

      default:
        Usage();
    }
  }

  argc -= optind;
  argv += optind;

#if !defined(__linux__)
  optreset = 1;
#endif
  optind = 1;

  if (argc <= 1) {
    if (argc == 1) {
      commands = fopen(argv[0], "r");
      if (commands == NULL) {
        fprintf(stderr, "Failed to open \"%s\": %s\n",
                argv[0], strerror(errno));
        exit(2);
      }
    }
    FSioCommands(commands);
  } else Usage();

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movq 0x122b9(%rip), %rax     # 0x17fc0
movq (%rax), %rbx
leaq 0x143a7(%rip), %rax     # 0x1a0b8
movl $0x61636f6c, 0x8(%rax)  # imm = 0x61636F6C
movw $0x6c, 0xc(%rax)
leaq 0x12fe3(%rip), %rcx     # 0x18d08
movq %rcx, 0x20(%rax)
xorl %edx, %edx
movq %rdx, 0x28(%rax)
movq %rdx, 0x38(%rax)
movq %rdx, (%rax)
movq %rax, 0x14373(%rip)     # 0x1a0b0
movq 0x1327c(%rip), %rax     # 0x18fc0
movq %rax, (%rcx)
leaq 0x12d92(%rip), %rax     # 0x18ae0
movq %rcx, (%rax)
leaq 0x12e40(%rip), %rcx     # 0x18b98
movq %rax, (%rcx)
leaq 0x12eee(%rip), %rax     # 0x18c50
movq %rcx, (%rax)
leaq 0x13174(%rip), %rcx     # 0x18ee0
movq %rax, (%rcx)
movq %rcx, 0x1324a(%rip)     # 0x18fc0
leaq 0xa345(%rip), %r15      # 0x100c2
leaq 0x13230(%rip), %r12     # 0x18fb4
leaq 0x13225(%rip), %r13     # 0x18fb0
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3280
movq %r12, %rcx
cmpl $0x71, %eax
je 0x5da8
cmpl $0x76, %eax
jne 0x5db0
movq %r13, %rcx
movl $0x1, (%rcx)
jmp 0x5d8b
cmpl $-0x1, %eax
jne 0x5e02
movq 0x1220c(%rip), %rcx     # 0x17fc8
movslq (%rcx), %rax
subl %eax, %ebp
movl $0x1, (%rcx)
cmpl $0x1, %ebp
jg 0x5e07
jne 0x5de9
leaq (%r14,%rax,8), %r14
movq (%r14), %rdi
leaq 0xb817(%rip), %rsi      # 0x115f3
callq 0x3270
movq %rax, %rbx
testq %rax, %rax
je 0x5e0c
movq %rbx, %rdi
callq 0x5e14
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x365d
callq 0x35fc
movq %r14, %rdi
callq 0x3621
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: FSioReadBlock
int FSioReadBlock(
  struct mountedFS *mount,
  unsigned int block,
  void *buf
)
{
  off_t offset = block * mount->blocksz;

  if (fseeko(mount->container, offset + mount->skip, SEEK_SET) == 0)
    return fread(buf, mount->blocksz, 1, mount->container);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %esi
imulq 0x28(%rdi), %rsi
movq %rdx, %r14
movq 0x38(%rdi), %rdi
addq 0x40(%rbx), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x3260
testl %eax, %eax
jne 0x6274
movq 0x28(%rbx), %rsi
movq 0x38(%rbx), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x30f0
movq %rax, %r15
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: FSioWriteBlock
int FSioWriteBlock(
  struct mountedFS *mount,
  unsigned int block,
  void *buf
)
{
  off_t offset = block * mount->blocksz;

  if (fseeko(mount->container, offset + mount->skip, SEEK_SET) == 0)
    return fwrite(buf, mount->blocksz, 1, mount->container);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %esi
imulq 0x28(%rdi), %rsi
movq %rdx, %r14
movq 0x38(%rdi), %rdi
addq 0x40(%rbx), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x3260
testl %eax, %eax
jne 0x62bd
movq 0x28(%rbx), %rsi
movq 0x38(%rbx), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x32c0
movq %rax, %r15
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: FSioReadSector
int FSioReadSector(
  struct mountedFS *mount,
  unsigned int sector,
  unsigned int size,
  void *buf
)
{
  off_t offset = sector * size;

  if (fseeko(mount->container, offset + mount->skip, SEEK_SET) == 0)
    return fread(buf, size, 1, mount->container);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
imull %edx, %esi
movq 0x38(%rdi), %rdi
addq 0x40(%r14), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x3260
testl %eax, %eax
jne 0x6304
movl %ebp, %esi
movq 0x38(%r14), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x30f0
movq %rax, %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: FSioWriteSector
int FSioWriteSector(
  struct mountedFS *mount,
  unsigned int sector,
  unsigned int size,
  void *buf
)
{
  off_t offset = sector * size;

  if (fseeko(mount->container, offset + mount->skip, SEEK_SET) == 0)
    return fwrite(buf, size, 1, mount->container);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
imull %edx, %esi
movq 0x38(%rdi), %rdi
addq 0x40(%r14), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x3260
testl %eax, %eax
jne 0x6350
movl %ebp, %esi
movq 0x38(%r14), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x32c0
movq %rax, %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/fsio.c
// Function: checkDev
static int checkDev(
  char *dev
)
{
  unsigned int i;

  /*
   * Remove any trailing ':' characters
   */
  while ((strlen(dev) != 0) && (dev[strlen(dev) - 1] == ':'))
    dev[strlen(dev) - 1] = '\0';

  for (i = 0; i < strlen(dev); i++)
    if (!isalpha(dev[i])) {
      fprintf(stderr,
              "%s: Device name contains non-alpha character\n", wds[0]);
      return 0;
    }
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3130
movq %rax, %r14
testq %rax, %rax
je 0x6385
cmpb $0x3a, -0x1(%rbx,%r14)
jne 0x6385
movb $0x0, -0x1(%rbx,%r14)
movq %rbx, %rdi
jmp 0x6365
testq %r14, %r14
je 0x63ae
callq 0x32f0
movq (%rax), %rax
movl $0x1, %ecx
xorl %edx, %edx
movsbq (%rbx,%rdx), %rdx
testb $0x4, 0x1(%rax,%rdx,2)
je 0x63bb
movl %ecx, %edx
incl %ecx
cmpq %rdx, %r14
ja 0x6399
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x36cf
xorl %eax, %eax
jmp 0x63b3
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/declib.c
// Function: r50Asc
void r50Asc(
  uint16_t value,
  char *outbuf
)
{
  outbuf[2] = rad50[value % 050];
  value /= 050;
  outbuf[1] = rad50[value % 050];
  outbuf[0] = rad50[value / 050];
}

// Assembly:
imull $0xcccd, %edi, %eax     # imm = 0xCCCD
shrl $0x15, %eax
leal (,%rax,8), %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %edi
movzwl %di, %ecx
leaq 0x11ff5(%rip), %rdx     # 0x18610
movb (%rcx,%rdx), %cl
movb %cl, 0x2(%rsi)
imulq $0x6666667, %rax, %rcx  # imm = 0x6666667
shrq $0x20, %rcx
leal (,%rcx,8), %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %eax
movb (%rax,%rdx), %al
movb %al, 0x1(%rsi)
movb (%rcx,%rdx), %al
movb %al, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/declib.c
// Function: r50AscNoSpace
void r50AscNoSpace(
  uint16_t value,
  char *outbuf
)
{
  uint16_t value2 = value / 050;

  /*
   * The rad50 representation of ' ' is zero.
   */
  if ((value2 / 050) != 0)
    *outbuf++ = rad50[value2 / 050];
  if ((value2 % 050) != 0)
    *outbuf++ = rad50[value2 % 050];
  if ((value % 050) != 0)
    *outbuf++ = rad50[value % 050];
}

// Assembly:
imull $0xcccd, %edi, %ecx     # imm = 0xCCCD
shrl $0x15, %ecx
leal (,%rcx,8), %eax
leal (%rax,%rax,4), %edx
movl %edi, %eax
subl %edx, %eax
movl %ecx, %edx
cmpl $0x640, %edi            # imm = 0x640
jb 0x6681
imulq $0x6666667, %rdx, %rdi  # imm = 0x6666667
shrq $0x20, %rdi
leaq 0x11f99(%rip), %r8      # 0x18610
movb (%rdi,%r8), %dil
movb %dil, (%rsi)
incq %rsi
imulq $0x6666667, %rdx, %rdx  # imm = 0x6666667
shrq $0x20, %rdx
shll $0x3, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
je 0x66a7
movl %ecx, %ecx
leaq 0x11f71(%rip), %rdx     # 0x18610
movb (%rcx,%rdx), %cl
movb %cl, (%rsi)
incq %rsi
testw %ax, %ax
je 0x66bb
movzwl %ax, %eax
leaq 0x11f5a(%rip), %rcx     # 0x18610
movb (%rax,%rcx), %al
movb %al, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/declib.c
// Function: ascR50
uint16_t ascR50(
  char *inbuf
)
{
  uint16_t value;
  char *ptr;

  if ((ptr = strchr(rad50, toupper(*inbuf++))) == NULL)
    ptr = strchr(rad50, '%');

  value = (ptr - rad50) * 03100;

  if ((ptr = strchr(rad50, toupper(*inbuf++))) == NULL)
    ptr = strchr(rad50, '%');

  value += (ptr - rad50) * 050;

  if ((ptr = strchr(rad50, toupper(*inbuf++))) == NULL)
    ptr = strchr(rad50, '%');

  value += ptr - rad50;

  return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3030
movq (%rax), %r12
movsbq (%r14), %rax
movl (%r12,%rax,4), %esi
leaq 0x11f32(%rip), %rdi     # 0x18610
callq 0x3150
movq %rax, %rbx
testq %rax, %rax
jne 0x66ff
leaq 0x11f1e(%rip), %rdi     # 0x18610
movl $0x25, %esi
callq 0x3150
movq %rax, %rbx
movsbq 0x1(%r14), %rax
movl (%r12,%rax,4), %esi
leaq 0x11f01(%rip), %rdi     # 0x18610
callq 0x3150
movq %rax, %r15
testq %rax, %rax
jne 0x6730
leaq 0x11eed(%rip), %rdi     # 0x18610
movl $0x25, %esi
callq 0x3150
movq %rax, %r15
movsbq 0x2(%r14), %rax
movl (%r12,%rax,4), %esi
leaq 0x11ed0(%rip), %rdi     # 0x18610
callq 0x3150
testq %rax, %rax
jne 0x675b
leaq 0x11ebf(%rip), %rdi     # 0x18610
movl $0x25, %esi
callq 0x3150
leaq 0x11eae(%rip), %rcx     # 0x18610
subl %ecx, %ebx
imull $0x640, %ebx, %edx      # imm = 0x640
subl %ecx, %r15d
shll $0x3, %r15d
leal (%r15,%r15,4), %esi
subl %ecx, %edx
addl %esi, %eax
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/declib.c
// Function: dos11Date
char *dos11Date(
  uint16_t value,
  char *buf
)
{
  unsigned short year, doyr, leapyr;
  unsigned short *table;

  /*
   * The DOS/BATCH-11 date format is documented as having 3 reserved bit.
   * Version 9.20C (and later?) makes use of these bits to allow dates up
   * to 2035. Unfortunately, the date input routine only allows up to 1999!
   */
  year = 1970 + value / 1000;
  doyr = value % 1000;
  leapyr = ((year % 4) == 0) && (year != 2000);

  table = leapyr ? mnthl : mnth;

  /*
   * Check for valid day of year.
   */
  if (doyr < (leapyr ? 366 : 365)) {
    int i = 0;

    while (doyr > table[i])
      doyr -= table[i++];

    sprintf(buf, "%2d-%s-%4d", doyr, month[i], year);
  } else strcpy(buf, "xx-yyy-xxxx");
  return buf;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movl %edi, %eax
shrl $0x3, %eax
imull $0x20c5, %eax, %r8d     # imm = 0x20C5
shrl $0x14, %r8d
imull $0x3e8, %r8d, %eax      # imm = 0x3E8
addl $0x7b2, %r8d            # imm = 0x7B2
subl %eax, %edi
testb $0x3, %r8b
sete %al
cmpl $0x7d0, %r8d            # imm = 0x7D0
setne %cl
andb %al, %cl
leaq 0x11efb(%rip), %rdx     # 0x186c0
leaq 0x11ed4(%rip), %rax     # 0x186a0
cmovneq %rdx, %rax
movzwl %di, %edx
movzbl %cl, %ecx
addl $0x16d, %ecx            # imm = 0x16D
cmpl %edx, %ecx
jbe 0x6817
movzwl (%rax), %edx
xorl %ecx, %ecx
cmpw %dx, %di
jbe 0x67f6
subl %edx, %edi
movzwl 0x2(%rax,%rcx,2), %edx
incq %rcx
jmp 0x67e5
movzwl %di, %edx
leaq 0x11e40(%rip), %rax     # 0x18640
movq (%rax,%rcx,8), %rcx
leaq 0xb00a(%rip), %rsi      # 0x11815
movq %rbx, %rdi
xorl %eax, %eax
callq 0x32a0
jmp 0x682b
movabsq $0x782d7979792d7878, %rax # imm = 0x782D7979792D7878
movq %rax, (%rbx)
movl $0x787878, 0x8(%rbx)    # imm = 0x787878
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/tape.c
// Function: tapeReadRecordLength
uint32_t tapeReadRecordLength(
  FILE *container
)
{
  off_t pos = ftello(container);
  uint32_t meta, bc, erflag;

  if (fread(&meta, sizeof(meta), 1, container) != 1)
    return ST_FAIL;

  bc = le32toh(meta);

  switch (bc) {
    case ST_EOM:
    case ST_TM:
      return bc;

    default:
      erflag = bc & ST_ERROR;
      bc &= ST_LENGTH;

      /*
       * Now position the file after this record.
       */
      pos += RECLEN(bc) + (2 * sizeof(meta));
      if (fseeko(container, pos, SEEK_SET) != 0)
        return ST_FAIL;

      return erflag | bc;
  }
  return ST_FAIL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x30d0
movq %rax, %r15
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x30f0
movl $0xfefefefe, %r14d      # imm = 0xFEFEFEFE
cmpq $0x1, %rax
jne 0x6a65
movl 0xc(%rsp), %r14d
leal 0x1(%r14), %eax
cmpl $0x2, %eax
jb 0x6a65
movl %r14d, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
incl %eax
andl $-0x2, %eax
leaq (%rax,%r15), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3260
andl $0x80ffffff, %r14d      # imm = 0x80FFFFFF
testl %eax, %eax
movl $0xfefefefe, %eax       # imm = 0xFEFEFEFE
cmovel %r14d, %eax
movl %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/tape.c
// Function: tapeReadRecordLengthReverse
uint32_t tapeReadRecordLengthReverse(
  FILE *container
)
{
  uint32_t meta, bc, erflag;
  off_t delta;

  if ((fseeko(container, -sizeof(meta), SEEK_CUR) != 0) ||
      (fread(&meta, sizeof(meta), 1, container) != 1))
    return ST_FAIL;

  bc = le32toh(meta);

  switch (bc) {
    case ST_EOM:
    case ST_TM:
      if (fseeko(container, -sizeof(meta), SEEK_CUR) != 0)
        return ST_FAIL;
      return bc;

    default:
      erflag = bc & ST_ERROR;
      bc &= ST_LENGTH;

      /*
       * Now position the file before this record.
       */
      delta = RECLEN(bc) + (2 * sizeof(meta));
      if (fseeko(container, -delta, SEEK_CUR) != 0)
        return ST_FAIL;

      return erflag | bc;
  }
  return ST_FAIL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $-0x4, %rsi
movl $0x1, %edx
callq 0x3260
movl $0xfefefefe, %ebp       # imm = 0xFEFEFEFE
testl %eax, %eax
jne 0x6b13
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x30f0
cmpq $0x1, %rax
jne 0x6b13
movl 0xc(%rsp), %r14d
leal 0x1(%r14), %eax
cmpl $0x1, %eax
ja 0x6add
movq %rbx, %rdi
movq $-0x4, %rsi
movl $0x1, %edx
callq 0x3260
jmp 0x6b08
movl %r14d, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
incl %eax
andl $-0x2, %eax
movq $-0x8, %rsi
subq %rax, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3260
andl $0x80ffffff, %r14d      # imm = 0x80FFFFFF
testl %eax, %eax
movl $0xfefefefe, %ebp       # imm = 0xFEFEFEFE
cmovel %r14d, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/fsio/tape.c
// Function: tapePeekRecordLength
uint32_t tapePeekRecordLength(
  FILE *container
)
{
  off_t pos = ftello(container);
  uint32_t meta;

  if ((fread(&meta, sizeof(meta), 1, container) != 1) ||
      (fseeko(container, pos, SEEK_SET) != 0))
    return ST_FAIL;

  return le32toh(meta);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x30d0
movq %rax, %r14
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x30f0
movq %rax, %rcx
movl $0xfefefefe, %eax       # imm = 0xFEFEFEFE
cmpq $0x1, %rcx
jne 0x6b6e
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3260
movl %eax, %ecx
movl $0xfefefefe, %eax       # imm = 0xFEFEFEFE
testl %ecx, %ecx
jne 0x6b6e
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq