LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/winton[P]redis_parse/hiredis/sds.c
// Function: sdscatlen
sds sdscatlen(sds s, const void *t, size_t len) {
    struct sdshdr *sh;
    size_t curlen = sdslen(s);

    s = sdsMakeRoomFor(s,len);
    if (s == NULL) return NULL;
    sh = (void*) (s-(sizeof(struct sdshdr)));
    memcpy(s+curlen, t, len);
    sh->len = curlen+len;
    sh->free = sh->free-len;
    s[curlen+len] = '\0';
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x63c0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x66b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x67a3
movq $0x0, -0x8(%rbp)
jmp 0x6801
movq -0x10(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x22b0
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movslq 0x4(%rax), %rax
subq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
addq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x10, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2300
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x69ad
movq $0x0, -0x8(%rbp)
jmp 0x6a3a
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
subq $0x2, %rcx
movb $0x0, (%rax,%rcx)
leaq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x20c0
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
subq $0x2, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x6a16
movq -0x48(%rbp), %rdi
callq 0x2050
movq -0x58(%rbp), %rax
shlq %rax
movq %rax, -0x58(%rbp)
jmp 0x698c
jmp 0x6a18
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x2320
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2050
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x63c0
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x49(%rbp)
ja 0x6b78
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
callq 0x2170
cmpq $0x0, %rax
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x6b81
jmp 0x6b8f
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6b4f
jmp 0x6b91
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x4a(%rbp)
jbe 0x6bba
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movsbl (%rax), %esi
callq 0x2170
cmpq $0x0, %rax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x6bc3
jmp 0x6bd1
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6b91
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jbe 0x6be3
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x6bf6
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
cmpq -0x30(%rbp), %rax
je 0x6c21
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2390
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movb $0x0, 0x8(%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0x4(%rax), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
subq -0x40(%rbp), %rcx
addq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x63c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6caf
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6de7
cmpl $0x0, -0x14(%rbp)
jge 0x6cd2
movq -0x30(%rbp), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x6cd0
movl $0x0, -0x14(%rbp)
jmp 0x6cd2
cmpl $0x0, -0x18(%rbp)
jge 0x6cf5
movq -0x30(%rbp), %rax
movslq -0x18(%rbp), %rcx
addq %rcx, %rax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x6cf3
movl $0x0, -0x18(%rbp)
jmp 0x6cf5
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x6d04
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x6d10
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cltq
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x6d73
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl %ecx, %eax
jl 0x6d35
movq $0x0, -0x28(%rbp)
jmp 0x6d71
movl -0x18(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl %ecx, %eax
jl 0x6d6f
movq -0x30(%rbp), %rax
subq $0x1, %rax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x6d5a
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x6d66
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cltq
movq %rax, -0x28(%rbp)
jmp 0x6d71
jmp 0x6d7a
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x6da7
cmpq $0x0, -0x28(%rbp)
je 0x6da7
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x2390
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, 0x8(%rax,%rcx)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
subq -0x28(%rbp), %rcx
addq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x63c0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x63c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6efe
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x6f06
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2230
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x6f35
movq -0x20(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x6f3b
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2330
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7840
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x79a0
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x128, %esi            # imm = 0x128
callq 0x2340
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xb0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xb8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xd8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xe8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xf8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x100(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x108(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x110(%rax)
leaq 0x6918(%rip), %rdi      # 0xe278
xorl %eax, %eax
movl %eax, %esi
callq 0x8930
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
leaq 0x68fa(%rip), %rdi      # 0xe278
xorl %eax, %eax
movl %eax, %esi
callq 0x8930
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2350
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7840
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x79a0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x84(%rax), %esi
callq 0x2150
cmpl $-0x1, %eax
jne 0x83f5
callq 0x2070
cmpl $0x73, (%rax)
jne 0x83bf
movl $0x0, -0x4(%rbp)
jmp 0x8430
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
je 0x83e3
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x7d50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8430
movq -0x18(%rbp), %rax
movl 0x88(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
je 0x8429
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq *%rax
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/winton[P]redis_parse/hiredis/async.c
// Function: callbackKeyCompare
static int callbackKeyCompare(void *privdata, const void *key1, const void *key2) {
    int l1, l2;
    ((void) privdata);

    l1 = sdslen((sds)key1);
    l2 = sdslen((sds)key2);
    if (l1 != l2) return 0;
    return memcmp(key1,key2,l1) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x77c0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x77c0
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0x8aad
movl $0x0, -0x4(%rbp)
jmp 0x8acc
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x2230
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl 0x5d7e(%rip), %eax      # 0x7250
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x5d73(%rip)      # 0x7250
cmpl $0x0, %eax
je 0x14e4
jmp 0x154f
callq 0x11c0
movl $0x21, %ecx
cltd
idivl %ecx
movw %dx, %ax
movw %ax, 0xe(%rsp)
movswq 0xe(%rsp), %rcx
leaq 0x5d5a(%rip), %rax      # 0x7260
movq (%rax,%rcx,8), %rdi
movl 0x14(%rsp), %esi
movswq 0xe(%rsp), %rcx
leaq 0x5be5(%rip), %rax      # 0x7100
andl (%rax,%rcx,4), %esi
callq 0x2c30
callq 0x11c0
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x10c0
divsd 0x5d03(%rip), %xmm0     # 0x7240
subsd 0x5d03(%rip), %xmm0     # 0x7248
cvttsd2si %xmm0, %eax
movl %eax, 0x5d01(%rip)      # 0x7250
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl 0x14(%rsp), %esi
leaq 0x88d(%rip), %rdi       # 0x2120
movb $0x0, %al
callq 0x1090
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, %eax
je 0x19cb
callq 0x1110
movl %eax, 0x10(%rsp)
movl %eax, %ecx
movl %ecx, 0xc(%rsp)
subl $-0x1, %eax
je 0x18d5
jmp 0x18c4
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x19ad
jmp 0x19c6
jmp 0x18d7
movq 0x271a(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x750(%rip), %rsi       # 0x2038
movb $0x0, %al
callq 0x10c0
movq 0x2702(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x73e(%rip), %rsi       # 0x203e
movb $0x0, %al
callq 0x10c0
movq 0x26ea(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x830(%rip), %rsi       # 0x2148
movb $0x0, %al
callq 0x10c0
movq 0x26d2(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x735(%rip), %rsi       # 0x2065
movb $0x0, %al
callq 0x10c0
movq 0x26ba(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x720(%rip), %rsi       # 0x2068
leaq 0x80b(%rip), %rdx       # 0x215a
movb $0x0, %al
callq 0x10c0
movq 0x269b(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x71d(%rip), %rsi       # 0x2084
movl $0x15, %edx
movb $0x0, %al
callq 0x10c0
movq 0x267e(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x6e2(%rip), %rsi       # 0x2066
movb $0x0, %al
callq 0x10c0
movq 0x2666(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x6f5(%rip), %rsi       # 0x2091
movb $0x0, %al
callq 0x10c0
movl $0x1, %edi
callq 0x10f0
movl 0x14(%rsp), %esi
leaq 0x7ac(%rip), %rdi       # 0x2164
movb $0x0, %al
callq 0x1090
callq 0x16c0
jmp 0x19cb
jmp 0x189a
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x2018, %rsp           # imm = 0x2018
movl $0x0, 0x2014(%rsp)
movl %edi, 0x2010(%rsp)
movq %rsi, 0x2008(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x2008, %edx           # imm = 0x2008
callq 0x10a0
movl 0x2010(%rsp), %edi
movq 0x2008(%rsp), %rsi
movq %rsp, %rdx
callq 0x12c0
movl (%rsp), %edi
callq 0x1880
callq 0x16c0
xorl %eax, %eax
addq $0x2018, %rsp           # imm = 0x2018
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1cc01(%rip), %rax     # 0x202e0
movq %rax, -0x10(%rbp)
movq 0x1bbee(%rip), %rax     # 0x1f2d8
movq (%rax), %rdi
callq 0x5720
cmpl $0x0, %eax
je 0x37fd
movq 0x1bbd6(%rip), %rax     # 0x1f2d8
movq (%rax), %rdi
callq 0x5830
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x37d9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x30(%rax)
jne 0x374e
movq 0x1a8ca(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq 0x1bba0(%rip), %rax     # 0x1f2d8
movq (%rax), %rdx
leaq 0x14b2b(%rip), %rsi     # 0x1826d
movb $0x0, %al
callq 0x31c0
jmp 0x37fd
leaq 0x1cb8b(%rip), %rax     # 0x202e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x37b7
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x37a8
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3110
movq -0x8(%rbp), %rdi
callq 0x3040
jmp 0x37fd
jmp 0x37aa
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3759
movq 0x1a83a(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14ac8(%rip), %rsi     # 0x18290
movb $0x0, %al
callq 0x31c0
movl $0xa, %edi
callq 0x32a0
movq 0x1a818(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq 0x1baee(%rip), %rax     # 0x1f2d8
movq (%rax), %rdx
leaq 0x14ac0(%rip), %rsi     # 0x182b4
movb $0x0, %al
callq 0x31c0
jmp 0x37fd
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x1b849(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x14602(%rip), %rdi     # 0x1809b
leaq -0x11(%rbp), %rdx
leaq -0x12(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x3b2d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3b13
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x3aed
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rdi
movb -0x11(%rbp), %cl
movzbl %cl, %esi
movzbl -0x12(%rbp), %edx
callq *%rax
jmp 0x3b11
movq 0x1a504(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x14883(%rip), %rsi     # 0x1838d
movb $0x0, %al
callq 0x31c0
jmp 0x3b2b
movq 0x1a4de(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14893(%rip), %rsi     # 0x183b7
movb $0x0, %al
callq 0x31c0
jmp 0x3b2d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x1b789(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x14546(%rip), %rdi     # 0x1809f
leaq -0x11(%rbp), %rdx
leaq -0x12(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x3bb8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3b9e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rdi
movb -0x11(%rbp), %cl
movzbl %cl, %esi
movzbl -0x12(%rbp), %edx
callq *%rax
jmp 0x3bb6
movq 0x1a453(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x1492b(%rip), %rsi     # 0x184da
movb $0x0, %al
callq 0x31c0
jmp 0x3bb8
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movl 0x1adb7(%rip), %eax     # 0x1f1f8
orl $0x1, %eax
movl %eax, 0x1adae(%rip)     # 0x1f1f8
movq 0x1ae87(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x13c6a(%rip), %rdi     # 0x180c5
leaq -0x19(%rbp), %rdx
leaq -0x1a(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4564
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rdi
movb -0x19(%rbp), %cl
movq -0x10(%rbp), %rdx
movzbl %cl, %esi
callq *%rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x4546
jmp 0x44a6
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x80(%rax), %rax
movq -0x18(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movl $0x200, %edx            # imm = 0x200
callq *%rax
movq %rax, -0x228(%rbp)
cmpq $0x0, %rax
je 0x4532
movq $0x0, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq -0x228(%rbp), %rax
jae 0x452d
movq -0x230(%rbp), %rax
movsbl -0x220(%rbp,%rax), %eax
cmpl $0x0, %eax
je 0x4517
movq -0x230(%rbp), %rax
movsbl -0x220(%rbp,%rax), %edi
callq 0x3050
jmp 0x4519
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x44df
jmp 0x44a6
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x78(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0x4562
movq 0x19aab(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x140e0(%rip), %rsi     # 0x1863b
movb $0x0, %al
callq 0x31c0
jmp 0x4564
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x1ad59(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x13b44(%rip), %rdi     # 0x180cd
leaq -0x19(%rbp), %rdx
leaq -0x1a(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4669
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x90(%rax)
je 0x464f
movq -0x8(%rbp), %rax
movzwl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x462d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rdi
movb -0x19(%rbp), %cl
movq -0x10(%rbp), %rdx
movzbl %cl, %esi
callq *%rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x460f
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x90(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
jmp 0x462b
movq 0x199e2(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x14030(%rip), %rsi     # 0x18654
movb $0x0, %al
callq 0x31c0
jmp 0x464d
movq 0x199c4(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $0x8, %rdx
leaq 0x14029(%rip), %rsi     # 0x1866f
movb $0x0, %al
callq 0x31c0
jmp 0x4667
movq 0x199a2(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14032(%rip), %rsi     # 0x18692
movb $0x0, %al
callq 0x31c0
jmp 0x4669
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/fsio.c
// Function: doStatus
static void doStatus(void)
{
  if (mounts != NULL) {
    struct mountedFS *mount;

    for (mount = mounts; mount != NULL; mount = mount->next)
      printf("%-20s%s\n", mount->name, mount->filesys->fstype);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x1bc60(%rip)     # 0x202e0
je 0x46c5
movq 0x1bc57(%rip), %rax     # 0x202e0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x46c3
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x14003(%rip), %rdi     # 0x186b2
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x468d
jmp 0x46c5
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movl 0x1ab17(%rip), %eax     # 0x1f1f8
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movq 0x1abdd(%rip), %rax     # 0x1f2d8
movq (%rax), %rdi
leaq 0x14f4b(%rip), %rsi     # 0x19650
callq 0x3260
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x47ac
jmp 0x471a
leaq -0x210(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x200, %esi            # imm = 0x200
callq 0x31a0
cmpq $0x0, %rax
jne 0x4743
movq -0x10(%rbp), %rdi
callq 0x3110
jmp 0x47ce
cmpb $0x0, -0x1(%rbp)
jne 0x475e
leaq -0x210(%rbp), %rsi
leaq 0x139ea(%rip), %rdi     # 0x18141
movb $0x0, %al
callq 0x3160
leaq -0x210(%rbp), %rdi
callq 0x3130
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
subl $0x1, %eax
cltq
movsbl -0x210(%rbp,%rax), %eax
cmpl $0xa, %eax
jne 0x479b
movl -0x214(%rbp), %eax
subl $0x1, %eax
cltq
movb $0x0, -0x210(%rbp,%rax)
leaq -0x210(%rbp), %rdi
callq 0x4fc0
jmp 0x471a
movq 0x19845(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
movq 0x1ab1b(%rip), %rax     # 0x1f2d8
movq (%rax), %rdx
leaq 0x13ef4(%rip), %rsi     # 0x186bb
movb $0x0, %al
callq 0x31c0
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x1ba91(%rip), %rax     # 0x202e0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4883
leaq 0x1ba87(%rip), %rax     # 0x202e8
cmpq %rax, -0x8(%rbp)
je 0x4874
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3110
jmp 0x4876
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x4853
cmpq $0x0, 0x1a95d(%rip)     # 0x1f1e8
je 0x48ac
movq 0x1a954(%rip), %rax     # 0x1f1e8
movq 0x19725(%rip), %rcx     # 0x1dfc0
cmpq (%rcx), %rax
je 0x48ac
movq 0x1a941(%rip), %rdi     # 0x1f1e8
callq 0x3110
xorl %edi, %edi
callq 0x32a0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x1aa09(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x13817(%rip), %rdi     # 0x180f0
leaq -0x11(%rbp), %rdx
leaq -0x12(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x495f
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movzwl 0x18(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4922
movq 0x196e9(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14b66(%rip), %rsi     # 0x1947f
movb $0x0, %al
callq 0x31c0
jmp 0x495f
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4945
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x98(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x495d
movq 0x196ac(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14b51(%rip), %rsi     # 0x194a7
movb $0x0, %al
callq 0x31c0
jmp 0x495f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x1a959(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x1376e(%rip), %rdi     # 0x180f7
leaq -0x11(%rbp), %rdx
leaq -0x12(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4a0f
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movzwl 0x18(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x49d2
movq 0x19639(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14b03(%rip), %rsi     # 0x194cc
movb $0x0, %al
callq 0x31c0
jmp 0x4a0f
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x49f5
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0xa0(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x4a0d
movq 0x195fc(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14aeb(%rip), %rsi     # 0x194f1
movb $0x0, %al
callq 0x31c0
jmp 0x4a0f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x1a8a9(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x136c2(%rip), %rdi     # 0x180fb
leaq -0x11(%rbp), %rdx
leaq -0x12(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4b14
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movzwl 0x18(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4a89
movq 0x19585(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14a96(%rip), %rsi     # 0x19513
movb $0x0, %al
callq 0x31c0
jmp 0x4b14
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4afa
movq 0x1a83c(%rip), %rax     # 0x1f2d8
movq 0x8(%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x3280
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4ad8
movq 0x19533(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14a6b(%rip), %rsi     # 0x1953a
movb $0x0, %al
callq 0x31c0
jmp 0x4b14
cmpq $0x0, -0x28(%rbp)
je 0x4af8
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0xa8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
jmp 0x4b12
movq 0x194f7(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14a52(%rip), %rsi     # 0x1955d
movb $0x0, %al
callq 0x31c0
jmp 0x4b14
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x1a7a9(%rip), %rax     # 0x1f2d8
movq (%rax), %rsi
leaq 0x135c2(%rip), %rdi     # 0x180fb
leaq -0x11(%rbp), %rdx
leaq -0x12(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x58f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4c14
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movzwl 0x18(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4b89
movq 0x19485(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x14a04(%rip), %rsi     # 0x19581
movb $0x0, %al
callq 0x31c0
jmp 0x4c14
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4bfa
movq 0x1a73c(%rip), %rax     # 0x1f2d8
movq 0x8(%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x3280
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4bd8
movq 0x19433(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x149d9(%rip), %rsi     # 0x195a8
movb $0x0, %al
callq 0x31c0
jmp 0x4c14
cmpq $0x0, -0x28(%rbp)
je 0x4bf8
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0xb0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
jmp 0x4c12
movq 0x193f7(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x149c0(%rip), %rsi     # 0x195cb
movb $0x0, %al
callq 0x31c0
jmp 0x4c14
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x1935b(%rip), %rax     # 0x1dfc8
movq (%rax), %rax
movq %rax, -0x18(%rbp)
callq 0x4d90
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x13497(%rip), %rdx     # 0x1811e
callq 0x3270
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
je 0x4cca
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
subl $0x71, %eax
je 0x4cab
jmp 0x4ca1
movl -0x20(%rbp), %eax
subl $0x76, %eax
je 0x4cb7
jmp 0x4cc3
movl $0x1, 0x1a52f(%rip)     # 0x1f1e4
jmp 0x4cc8
movl $0x1, 0x1a51f(%rip)     # 0x1f1e0
jmp 0x4cc8
callq 0x4c20
jmp 0x4c79
movq 0x192ff(%rip), %rax     # 0x1dfd0
movl (%rax), %ecx
movl -0x8(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x8(%rbp)
movq 0x192ee(%rip), %rax     # 0x1dfd0
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq 0x192d3(%rip), %rax     # 0x1dfd0
movl $0x1, (%rax)
cmpl $0x1, -0x8(%rbp)
jg 0x4d82
cmpl $0x1, -0x8(%rbp)
jne 0x4d77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x14933(%rip), %rsi     # 0x19650
callq 0x3260
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4d75
movq 0x192c4(%rip), %rax     # 0x1dff8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x3060
movl (%rax), %edi
callq 0x32c0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq %rax, %rcx
leaq 0x133bd(%rip), %rsi     # 0x18121
movb $0x0, %al
callq 0x31c0
movl $0x2, %edi
callq 0x32a0
jmp 0x4d77
movq -0x18(%rbp), %rdi
callq 0x4eb0
jmp 0x4d87
callq 0x4c20
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/fsio/fsio.c
// Function: FSioInit
static void FSioInit(void)
{
  mounts = NULL;

  /*
   * Initialize the the local access device
   */
  strcpy(localMount.name, "local");
  localMount.filesys = &localFS;
  localMount.blocksz = 0; /*** TODO ***/
  localMount.container = NULL;

  /*
   * Add the local file access device.
   */
  localMount.next = mounts;
  mounts = &localMount;

  /*
   * Add supported file systems
   */
  localFS.next = fileSystems;
  fileSystems = &localFS;

  dos11FS.next = fileSystems;
  fileSystems = &dos11FS;

  rt11FS.next = fileSystems;
  fileSystems = &rt11FS;

  dosmtFS.next = fileSystems;
  fileSystems = &dosmtFS;

  os8FS.next = fileSystems;
  fileSystems = &os8FS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq $0x0, 0x1b541(%rip) # 0x202e0
leaq 0x1b542(%rip), %rdi     # 0x202e8
addq $0x8, %rdi
leaq 0x13399(%rip), %rsi     # 0x1814a
callq 0x30b0
leaq 0x1b52b(%rip), %rax     # 0x202e8
leaq 0x19ff4(%rip), %rcx     # 0x1edb8
movq %rcx, 0x20(%rax)
leaq 0x1b519(%rip), %rax     # 0x202e8
movq $0x0, 0x28(%rax)
leaq 0x1b50a(%rip), %rax     # 0x202e8
movq $0x0, 0x38(%rax)
movq 0x1b4f3(%rip), %rcx     # 0x202e0
leaq 0x1b4f4(%rip), %rax     # 0x202e8
movq %rcx, (%rax)
leaq 0x1b4ea(%rip), %rax     # 0x202e8
movq %rax, 0x1b4db(%rip)     # 0x202e0
movq 0x1a3e4(%rip), %rcx     # 0x1f1f0
leaq 0x19fa5(%rip), %rax     # 0x1edb8
movq %rcx, (%rax)
leaq 0x19f9b(%rip), %rax     # 0x1edb8
movq %rax, 0x1a3cc(%rip)     # 0x1f1f0
movq 0x1a3c5(%rip), %rcx     # 0x1f1f0
leaq 0x19cae(%rip), %rax     # 0x1eae0
movq %rcx, (%rax)
leaq 0x19ca4(%rip), %rax     # 0x1eae0
movq %rax, 0x1a3ad(%rip)     # 0x1f1f0
movq 0x1a3a6(%rip), %rcx     # 0x1f1f0
leaq 0x19d6f(%rip), %rax     # 0x1ebc0
movq %rcx, (%rax)
leaq 0x19d65(%rip), %rax     # 0x1ebc0
movq %rax, 0x1a38e(%rip)     # 0x1f1f0
movq 0x1a387(%rip), %rcx     # 0x1f1f0
leaq 0x19e70(%rip), %rax     # 0x1ece0
movq %rcx, (%rax)
leaq 0x19e66(%rip), %rax     # 0x1ece0
movq %rax, 0x1a36f(%rip)     # 0x1f1f0
movq 0x1a368(%rip), %rcx     # 0x1f1f0
leaq 0x1a101(%rip), %rax     # 0x1ef90
movq %rcx, (%rax)
leaq 0x1a0f7(%rip), %rax     # 0x1ef90
movq %rax, 0x1a350(%rip)     # 0x1f1f0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
imulq 0x28(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rsi
xorl %edx, %edx
callq 0x3250
cmpl $0x0, %eax
jne 0x5586
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movl $0x1, %edx
callq 0x30f0
movl %eax, -0x4(%rbp)
jmp 0x558d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
imulq 0x28(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rsi
xorl %edx, %edx
callq 0x3250
cmpl $0x0, %eax
jne 0x5606
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movl $0x1, %edx
callq 0x32b0
movl %eax, -0x4(%rbp)
jmp 0x560d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x14(%rbp), %eax
imull -0x18(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rsi
xorl %edx, %edx
callq 0x3250
cmpl $0x0, %eax
jne 0x5683
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movl $0x1, %edx
callq 0x30f0
movl %eax, -0x4(%rbp)
jmp 0x568a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)