LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: hfile_oflags
int hfile_oflags(const char *mode)
{
    int rdwr = 0, flags = 0;
    const char *s;
    for (s = mode; *s; s++)
        switch (*s) {
        case 'r': rdwr = O_RDONLY;  break;
        case 'w': rdwr = O_WRONLY; flags |= O_CREAT | O_TRUNC;  break;
        case 'a': rdwr = O_WRONLY; flags |= O_CREAT | O_APPEND;  break;
        case '+': rdwr = O_RDWR;  break;
#ifdef O_CLOEXEC
        case 'e': flags |= O_CLOEXEC;  break;
#endif
#ifdef O_EXCL
        case 'x': flags |= O_EXCL;  break;
#endif
        default:  break;
        }

#ifdef O_BINARY
    flags |= O_BINARY;
#endif

    return rdwr | flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6b017
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x2b, %eax
je 0x6afdf
jmp 0x6af7c
movl -0x1c(%rbp), %eax
subl $0x61, %eax
je 0x6afcb
jmp 0x6af86
movl -0x1c(%rbp), %eax
subl $0x65, %eax
je 0x6afe8
jmp 0x6af90
movl -0x1c(%rbp), %eax
subl $0x72, %eax
je 0x6afae
jmp 0x6af9a
movl -0x1c(%rbp), %eax
subl $0x77, %eax
je 0x6afb7
jmp 0x6afa4
movl -0x1c(%rbp), %eax
subl $0x78, %eax
je 0x6aff5
jmp 0x6b002
movl $0x0, -0xc(%rbp)
jmp 0x6b004
movl $0x1, -0xc(%rbp)
movl -0x10(%rbp), %eax
orl $0x240, %eax            # imm = 0x240
movl %eax, -0x10(%rbp)
jmp 0x6b004
movl $0x1, -0xc(%rbp)
movl -0x10(%rbp), %eax
orl $0x440, %eax            # imm = 0x440
movl %eax, -0x10(%rbp)
jmp 0x6b004
movl $0x2, -0xc(%rbp)
jmp 0x6b004
movl -0x10(%rbp), %eax
orl $0x80000, %eax          # imm = 0x80000
movl %eax, -0x10(%rbp)
jmp 0x6b004
movl -0x10(%rbp), %eax
orl $0x80, %eax
movl %eax, -0x10(%rbp)
jmp 0x6b004
jmp 0x6b004
jmp 0x6b006
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6af5e
movl -0xc(%rbp), %eax
orl -0x10(%rbp), %eax
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: hopen
hFILE *hopen(const char *fname, const char *mode)
{
    const struct hFILE_scheme_handler *handler = find_scheme_handler(fname);
    if (handler) return handler->open(fname, mode);
    else if (strcmp(fname, "-") == 0) return hopen_fd_stdinout(mode);
    else return hopen_fd(fname, mode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6b470
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6b42b
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq %rax, -0x8(%rbp)
jmp 0x6b460
movq -0x10(%rbp), %rdi
leaq 0xce47(%rip), %rsi      # 0x7827d
callq 0x4810
cmpl $0x0, %eax
jne 0x6b44f
movq -0x18(%rbp), %rdi
callq 0x6b5d0
movq %rax, -0x8(%rbp)
jmp 0x6b460
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6b610
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: find_scheme_handler
static const struct hFILE_scheme_handler *find_scheme_handler(const char *s)
{
    static const struct hFILE_scheme_handler unknown_scheme =
        { hopen_unknown_scheme, hfile_always_local, "built-in", 0 };

    char scheme[12];
    int i;

    for (i = 0; i < sizeof scheme; i++)
        if (isalnum_c(s[i]) || s[i] == '+' || s[i] == '-' || s[i] == '.')
            scheme[i] = tolower_c(s[i]);
        else if (s[i] == ':') break;
        else return NULL;

    if (i == 0 || i >= sizeof scheme) return NULL;
    scheme[i] = '\0';

    pthread_mutex_lock(&plugins_lock);
    if (! schemes) load_hfile_plugins();
    pthread_mutex_unlock(&plugins_lock);

    khint_t k = kh_get(scheme_string, schemes, scheme);
    return (k != kh_end(schemes))? kh_value(schemes, k) : &unknown_scheme;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
movslq -0x20(%rbp), %rax
cmpq $0xc, %rax
jae 0x6b527
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x6bf20
cmpl $0x0, %eax
jne 0x6b4da
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2b, %eax
je 0x6b4da
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
je 0x6b4da
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x6b4f7
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x6bf50
movb %al, %cl
movslq -0x20(%rbp), %rax
movb %cl, -0x1c(%rbp,%rax)
jmp 0x6b517
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3a, %eax
jne 0x6b50a
jmp 0x6b527
movq $0x0, -0x8(%rbp)
jmp 0x6b5bf
jmp 0x6b519
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x6b483
cmpl $0x0, -0x20(%rbp)
je 0x6b537
movslq -0x20(%rbp), %rax
cmpq $0xc, %rax
jb 0x6b541
movq $0x0, -0x8(%rbp)
jmp 0x6b5bf
movslq -0x20(%rbp), %rax
movb $0x0, -0x1c(%rbp,%rax)
leaq 0x1f327(%rip), %rdi     # 0x8a878
callq 0x4880
cmpq $0x0, 0x1f312(%rip)     # 0x8a870
jne 0x6b565
callq 0x6c0c0
leaq 0x1f30c(%rip), %rdi     # 0x8a878
callq 0x4420
movq 0x1f2f8(%rip), %rdi     # 0x8a870
leaq -0x1c(%rbp), %rsi
callq 0x6bf70
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq 0x1f2e2(%rip), %rcx     # 0x8a870
cmpl (%rcx), %eax
je 0x6b5aa
movq 0x1f2d7(%rip), %rax     # 0x8a870
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b5b7
leaq 0x1e6f7(%rip), %rax     # 0x89ca8
movq %rax, -0x30(%rbp)
jmp 0x6b5b7
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: hopen_fd
static hFILE *hopen_fd(const char *filename, const char *mode)
{
    hFILE_fd *fp = NULL;
    int fd = open(filename, hfile_oflags(mode), 0666);
    if (fd < 0) goto error;

    fp = (hFILE_fd *) hfile_init(sizeof (hFILE_fd), mode, blksize(fd));
    if (fp == NULL) goto error;

    fp->fd = fd;
    fp->is_socket = 0;
    fp->base.backend = &fd_backend;
    return &fp->base;

error:
    if (fd >= 0) { int save = errno; (void) close(fd); errno = save; }
    hfile_destroy((hFILE *) fp);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6af40
movq -0x30(%rbp), %rdi
movl %eax, %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x43e0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x6b656
jmp 0x6b6b7
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %edi
callq 0x6aef0
movq -0x38(%rbp), %rsi
movq %rax, %rdx
movl $0x40, %edi
callq 0x6a340
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6b684
jmp 0x6b6b7
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x20(%rbp), %rax
movb 0x3c(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x3c(%rax)
movq -0x20(%rbp), %rax
leaq 0x1e5d7(%rip), %rcx     # 0x89c80
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6b6f0
cmpl $0x0, -0x24(%rbp)
jl 0x6b6df
callq 0x4070
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %edi
callq 0x4b40
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
callq 0x4070
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x6a440
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: fd_read
static ssize_t fd_read(hFILE *fpv, void *buffer, size_t nbytes)
{
    hFILE_fd *fp = (hFILE_fd *) fpv;
    ssize_t n;
    do {
        n = fp->is_socket? recv(fp->fd, buffer, nbytes, 0)
                         : read(fp->fd, buffer, nbytes);
    } while (n < 0 && errno == EINTR);
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb 0x3c(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6b7b9
movq -0x20(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4180
movq %rax, -0x30(%rbp)
jmp 0x6b7d1
movq -0x20(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4840
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
jge 0x6b7f3
callq 0x4070
cmpl $0x4, (%rax)
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x6b78c
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: fd_write
static ssize_t fd_write(hFILE *fpv, const void *buffer, size_t nbytes)
{
    hFILE_fd *fp = (hFILE_fd *) fpv;
    ssize_t n;
    do {
        n = fp->is_socket?  send(fp->fd, buffer, nbytes, 0)
                         : write(fp->fd, buffer, nbytes);
    } while (n < 0 && errno == EINTR);
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb 0x3c(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6b859
movq -0x20(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x42a0
movq %rax, -0x30(%rbp)
jmp 0x6b871
movq -0x20(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x41d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
jge 0x6b893
callq 0x4070
cmpl $0x4, (%rax)
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x6b82c
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: fd_flush
static int fd_flush(hFILE *fpv)
{
    hFILE_fd *fp = (hFILE_fd *) fpv;
    int ret;
    do {
#ifdef HAVE_FDATASYNC
        ret = fdatasync(fp->fd);
#else
        ret = fsync(fp->fd);
#endif
        // Ignore invalid-for-fsync(2) errors due to being, e.g., a pipe,
        // and operation-not-supported errors (Mac OS X)
        if (ret < 0 && (errno == EINVAL || errno == ENOTSUP)) ret = 0;
    } while (ret < 0 && errno == EINTR);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x44a0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x6b934
callq 0x4070
cmpl $0x16, (%rax)
je 0x6b92d
callq 0x4070
cmpl $0x5f, (%rax)
jne 0x6b934
movl $0x0, -0x14(%rbp)
jmp 0x6b936
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x15(%rbp)
jge 0x6b94f
callq 0x4070
cmpl $0x4, (%rax)
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x6b904
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: fd_close
static int fd_close(hFILE *fpv)
{
    hFILE_fd *fp = (hFILE_fd *) fpv;
    int ret;
    do {
#ifdef HAVE_CLOSESOCKET
        ret = fp->is_socket? closesocket(fp->fd) : close(fp->fd);
#else
        ret = close(fp->fd);
#endif
    } while (ret < 0 && errno == EINTR);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x4b40
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x15(%rbp)
jge 0x6b99c
callq 0x4070
cmpl $0x4, (%rax)
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x6b974
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: hopen_mem
static hFILE *hopen_mem(const char *data, const char *mode)
{
    if (strncmp(data, "data:", 5) == 0) data += 5;

    // TODO Implement write modes, which will require memory allocation
    if (strchr(mode, 'r') == NULL) { errno = EINVAL; return NULL; }

    hFILE_mem *fp = (hFILE_mem *) hfile_init(sizeof (hFILE_mem), mode, 0);
    if (fp == NULL) return NULL;

    fp->buffer = data;
    fp->length = strlen(data);
    fp->pos = 0;
    fp->base.backend = &mem_backend;
    return &fp->base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x127cd(%rip), %rsi     # 0x7e918
movl $0x5, %edx
callq 0x4290
cmpl $0x0, %eax
jne 0x6c166
movq -0x10(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl $0x72, %esi
callq 0x41e0
cmpq $0x0, %rax
jne 0x6c18f
callq 0x4070
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x6c1f9
movq -0x18(%rbp), %rsi
movl $0x50, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x6a340
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6c1b6
movq $0x0, -0x8(%rbp)
jmp 0x6c1f9
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rdi
callq 0x4230
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rax
leaq 0x1db1b(%rip), %rcx     # 0x89d08
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: hopen_fd_fileuri
static hFILE *hopen_fd_fileuri(const char *url, const char *mode)
{
    if (strncmp(url, "file://localhost/", 17) == 0) url += 16;
    else if (strncmp(url, "file:///", 8) == 0) url += 7;
    else { errno = EPROTONOSUPPORT; return NULL; }

    return hopen_fd(url, mode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x126f3(%rip), %rsi     # 0x7e91e
movl $0x11, %edx
callq 0x4290
cmpl $0x0, %eax
jne 0x6c248
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
jmp 0x6c287
movq -0x10(%rbp), %rdi
leaq 0x126dd(%rip), %rsi     # 0x7e930
movl $0x8, %edx
callq 0x4290
cmpl $0x0, %eax
jne 0x6c270
movq -0x10(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x10(%rbp)
jmp 0x6c285
callq 0x4070
movl $0x5d, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x6c298
jmp 0x6c287
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6b610
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: init_add_plugin
static int init_add_plugin(void *obj, int (*init)(struct hFILE_plugin *),
                           const char *pluginname)
{
    struct hFILE_plugin_list *p = malloc (sizeof (struct hFILE_plugin_list));
    if (p == NULL) abort();

    p->plugin.api_version = 1;
    p->plugin.obj = obj;
    p->plugin.name = NULL;
    p->plugin.destroy = NULL;

    int ret = (*init)(&p->plugin);

    if (ret != 0) {
        if (hts_verbose >= 4)
            fprintf(stderr, "[W::load_hfile_plugins] "
                    "initialisation failed for plugin \"%s\": %d\n",
                    pluginname, ret);
        free(p);
        return ret;
    }

    if (hts_verbose >= 5)
        fprintf(stderr, "[M::load_hfile_plugins] loaded \"%s\"\n", pluginname);

    p->next = plugins, plugins = p;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x28, %edi
callq 0x47a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6c2fe
callq 0x42e0
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rdi
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6c37b
leaq 0x1e29a(%rip), %rax     # 0x8a5e0
cmpl $0x4, (%rax)
jl 0x6c36a
movq 0x1dc7e(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
leaq 0x125d6(%rip), %rsi     # 0x7e939
movb $0x0, %al
callq 0x4830
movq -0x28(%rbp), %rdi
callq 0x46a0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6c3c4
leaq 0x1e25e(%rip), %rax     # 0x8a5e0
cmpl $0x5, (%rax)
jl 0x6c3a3
movq 0x1dc42(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x125e0(%rip), %rsi     # 0x7e97c
movb $0x0, %al
callq 0x4830
movq 0x1e4f6(%rip), %rcx     # 0x8a8a0
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rax, 0x1e4e3(%rip)     # 0x8a8a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: mem_read
static ssize_t mem_read(hFILE *fpv, void *buffer, size_t nbytes)
{
    hFILE_mem *fp = (hFILE_mem *) fpv;
    size_t avail = fp->length - fp->pos;
    if (nbytes > avail) nbytes = avail;
    memcpy(buffer, fp->buffer + fp->pos, nbytes);
    fp->pos += nbytes;
    return nbytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x48(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x6c412
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x20(%rbp), %rax
addq 0x48(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x4460
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: mem_seek
static off_t mem_seek(hFILE *fpv, off_t offset, int whence)
{
    hFILE_mem *fp = (hFILE_mem *) fpv;
    size_t absoffset = (offset >= 0)? offset : -offset;
    size_t origin;

    switch (whence) {
    case SEEK_SET: origin = 0; break;
    case SEEK_CUR: origin = fp->pos; break;
    case SEEK_END: origin = fp->length; break;
    default: errno = EINVAL; return -1;
    }

    if ((offset  < 0 && absoffset > origin) ||
        (offset >= 0 && absoffset > fp->length - origin)) {
        errno = EINVAL;
        return -1;
    }

    fp->pos = origin + offset;
    return fp->pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jl 0x6c47c
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x6c486
xorl %eax, %eax
subq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x44(%rbp)
testl %eax, %eax
je 0x6c4ae
jmp 0x6c49a
movl -0x44(%rbp), %eax
subl $0x1, %eax
je 0x6c4b8
jmp 0x6c4a4
movl -0x44(%rbp), %eax
subl $0x2, %eax
je 0x6c4c6
jmp 0x6c4d4
movq $0x0, -0x38(%rbp)
jmp 0x6c4e9
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x6c4e9
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x6c4e9
callq 0x4070
movl $0x16, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x6c547
cmpq $0x0, -0x18(%rbp)
jge 0x6c4fa
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x6c516
cmpq $0x0, -0x18(%rbp)
jl 0x6c52b
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq -0x38(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x6c52b
callq 0x4070
movl $0x16, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x6c547
movq -0x38(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile.c
// Function: hfile_exit
static void hfile_exit()
{
    pthread_mutex_lock(&plugins_lock);

    kh_destroy(scheme_string, schemes);

    while (plugins != NULL) {
        struct hFILE_plugin_list *p = plugins;
        if (p->plugin.destroy) p->plugin.destroy();
#ifdef ENABLE_PLUGINS
        if (p->plugin.obj) close_plugin(p->plugin.obj);
#endif
        plugins = p->next;
        free(p);
    }

    pthread_mutex_unlock(&plugins_lock);
    pthread_mutex_destroy(&plugins_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1e2f9(%rip), %rdi     # 0x8a878
callq 0x4880
movq 0x1e2e5(%rip), %rdi     # 0x8a870
callq 0x6c5f0
cmpq $0x0, 0x1e308(%rip)     # 0x8a8a0
je 0x6c5d1
movq 0x1e2ff(%rip), %rax     # 0x8a8a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6c5b7
movq -0x8(%rbp), %rax
callq *0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x1e2da(%rip)     # 0x8a8a0
movq -0x8(%rbp), %rdi
callq 0x46a0
jmp 0x6c590
leaq 0x1e2a0(%rip), %rdi     # 0x8a878
callq 0x4420
leaq 0x1e294(%rip), %rdi     # 0x8a878
callq 0x4670
addq $0x10, %rsp
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/hfile_net.c
// Function: hopen_net
hFILE *hopen_net(const char *filename, const char *mode)
{
    hFILE_net *fp;

    // Do any networking initialisation if this is the first use.
    if (! net_inited) { if (net_init() < 0) return NULL; }

    fp = (hFILE_net *) hfile_init(sizeof (hFILE_net), mode, 0);
    if (fp == NULL) return NULL;

    fp->netfp = knet_open(filename, mode);
    if (fp->netfp == NULL) { hfile_destroy((hFILE *) fp); return NULL; }

    fp->base.backend = &net_backend;
    return &fp->base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpl $0x0, 0x1e251(%rip)     # 0x8a8a8
jne 0x6c66f
callq 0x6c6f0
cmpl $0x0, %eax
jge 0x6c66d
movq $0x0, -0x8(%rbp)
jmp 0x6c6e3
jmp 0x6c66f
movq -0x18(%rbp), %rsi
movl $0x40, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x6a340
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6c696
movq $0x0, -0x8(%rbp)
jmp 0x6c6e3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x772a0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x6c6cc
movq -0x20(%rbp), %rdi
callq 0x6a440
movq $0x0, -0x8(%rbp)
jmp 0x6c6e3
movq -0x20(%rbp), %rax
leaq 0x1d659(%rip), %rcx     # 0x89d30
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/hfile_net.c
// Function: hfile_plugin_init_net
int hfile_plugin_init_net(struct hFILE_plugin *self)
{
    static const struct hFILE_scheme_handler handler =
        { hopen_net, hfile_always_remote, "knetfile", 0 };

    self->name = "knetfile";
    hfile_add_scheme_handler("http", &handler);
    hfile_add_scheme_handler("ftp",  &handler);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0x121e8(%rip), %rcx     # 0x7e90f
movq %rcx, 0x10(%rax)
leaq 0x1226f(%rip), %rdi     # 0x7e9a1
leaq 0x1d61f(%rip), %rsi     # 0x89d58
callq 0x6b020
leaq 0x12261(%rip), %rdi     # 0x7e9a6
leaq 0x1d60c(%rip), %rsi     # 0x89d58
callq 0x6b020
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/md5.c
// Function: hts_md5_update
void hts_md5_update(hts_md5_context *ctx, const void *data, unsigned long size)
{
	hts_md5_u32plus saved_lo;
	unsigned long used, available;

	saved_lo = ctx->lo;
	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
		ctx->hi++;
	ctx->hi += size >> 29;

	used = saved_lo & 0x3f;

	if (used) {
		available = 64 - used;

		if (size < available) {
			memcpy(&ctx->buffer[used], data, size);
			return;
		}

		memcpy(&ctx->buffer[used], data, available);
		data = (const unsigned char *)data + available;
		size -= available;
		body(ctx, ctx->buffer, 64);
	}

	if (size >= 64) {
		data = body(ctx, data, size & ~(unsigned long)0x3f);
		size &= 0x3f;
	}

	memcpy(ctx->buffer, data, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq -0x18(%rbp), %rax
andq $0x1fffffff, %rax       # imm = 0x1FFFFFFF
movq -0x8(%rbp), %rcx
movl %eax, (%rcx)
cmpl -0x1c(%rbp), %eax
jae 0x6c8a2
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rdx
shrq $0x1d, %rdx
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %eax
andl $0x3f, %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x6c949
movl $0x40, %eax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x6c8ff
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
addq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4460
jmp 0x6c98a
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
addq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x4460
movq -0x10(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
movl $0x40, %edx
callq 0x6c990
cmpq $0x40, -0x18(%rbp)
jb 0x6c975
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
andq $-0x40, %rdx
callq 0x6c990
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4460
addq $0x30, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/md5.c
// Function: hts_md5_init
hts_md5_context *hts_md5_init(void)
{
    hts_md5_context *ctx = malloc(sizeof(*ctx));
    if (!ctx)
        return NULL;

    hts_md5_reset(ctx);
    return ctx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x98, %edi
callq 0x47a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6dc77
movq $0x0, -0x8(%rbp)
jmp 0x6dc88
movq -0x10(%rbp), %rdi
callq 0x6c810
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/md5.c
// Function: hts_md5_hex
void hts_md5_hex(char *hex, const unsigned char *digest)
{
    int i;
    for (i = 0; i < 16; i++) {
        hex[i*2+0] = "0123456789abcdef"[(digest[i]>>4)&0xf];
        hex[i*2+1] = "0123456789abcdef"[digest[i]&0xf];
    }
    hex[32] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x10, -0x14(%rbp)
jge 0x6dd53
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0xe081(%rip), %rax      # 0x7bd86
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0xe053(%rip), %rax      # 0x7bd86
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6dce3
movq -0x8(%rbp), %rax
movb $0x0, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_external_decode_int
int cram_external_decode_int(cram_slice *slice, cram_codec *c,
			     cram_block *in, char *out, int *out_size) {
    int l;
    char *cp;
    cram_block *b;

    /* Find the external block */
    b = cram_get_block_by_id(slice, c->external.content_id);
    if (!b)
        return *out_size?-1:0;

    cp = (char *)b->data + b->idx;
    // E_INT and E_LONG are guaranteed single item queries
    l = safe_itf8_get(cp, (char *)b->data + b->uncomp_size, (int32_t *)out);
    b->idx += l;
    *out_size = 1;

    return l > 0 ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x6de20
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x6ddaf
movq -0x30(%rbp), %rax
movl (%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6de13
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x48(%rbp), %rcx
movslq 0x1c(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x48(%rbp), %rax
movslq 0x14(%rax), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x6ded0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x48(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movl -0x34(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovgl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_external_decode_char
int cram_external_decode_char(cram_slice *slice, cram_codec *c,
			      cram_block *in, char *out,
			      int *out_size) {
    char *cp;
    cram_block *b;

    /* Find the external block */
    b = cram_get_block_by_id(slice, c->external.content_id);
    if (!b)
        return *out_size?-1:0;

    cp = cram_extract_block(b, *out_size);
    if (!cp)
	return -1;

    if (out)
	memcpy(out, cp, *out_size);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x6de20
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x6e0df
movq -0x30(%rbp), %rax
movl (%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6e124
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
callq 0x6e130
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x6e102
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6e124
cmpq $0x0, -0x28(%rbp)
je 0x6e11d
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq (%rax), %rdx
callq 0x4460
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_extract_block
static char *cram_extract_block(cram_block *b, int size) {
    char *cp = (char *)b->data + b->idx;
    b->idx += size;
    if (b->idx > b->uncomp_size)
	return NULL;

    return cp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x1c(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jle 0x6e179
movq $0x0, -0x8(%rbp)
jmp 0x6e181
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_external_decode_block
static int cram_external_decode_block(cram_slice *slice, cram_codec *c,
				      cram_block *in, char *out_,
				      int *out_size) {
    char *cp;
    cram_block *b = NULL;
    cram_block *out = (cram_block *)out_;

    /* Find the external block */
    b = cram_get_block_by_id(slice, c->external.content_id);
    if (!b)
        return *out_size?-1:0;

    cp = cram_extract_block(b, *out_size);
    if (!cp)
	return -1;

    BLOCK_APPEND(out, cp, *out_size);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x6de20
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x6e4a2
movq -0x30(%rbp), %rax
movl (%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6e5dd
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
callq 0x6e130
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x6e4c8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6e5dd
jmp 0x6e4ca
jmp 0x6e4cc
jmp 0x6e4ce
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq -0x30(%rbp), %rdx
movslq (%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x6e5a1
movq -0x48(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x6e53a
movq -0x48(%rbp), %rax
movq 0x28(%rax), %xmm0
movaps 0xc5d4(%rip), %xmm1     # 0x7aae0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xc5d8(%rip), %xmm1     # 0x7aaf0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xd5a9(%rip), %xmm1     # 0x7bad8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x6e549
movsd 0xd58e(%rip), %xmm0     # 0x7bad0
movsd %xmm0, -0x50(%rbp)
jmp 0x6e549
movsd -0x50(%rbp), %xmm0
movsd 0xc56a(%rip), %xmm2     # 0x7aac0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x4990
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x6e4ce
jmp 0x6e5a3
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x48(%rbp), %rax
addq 0x30(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq (%rax), %rdx
callq 0x4460
movq -0x30(%rbp), %rax
movslq (%rax), %rcx
movq -0x48(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_external_encode_init
cram_codec *cram_external_encode_init(cram_stats *st,
				      enum cram_external_type option,
				      void *dat,
				      int version) {
    cram_codec *c;

    c = malloc(sizeof(*c));
    if (!c)
	return NULL;
    c->codec = E_EXTERNAL;
    c->free = cram_external_encode_free;
    if (option == E_INT || option == E_LONG)
	c->encode = cram_external_encode_int;
    else if (option == E_BYTE_ARRAY || option == E_BYTE)
	c->encode = cram_external_encode_char;
    else
	abort();
    c->store = cram_external_encode_store;

    c->e_external.content_id = (size_t)dat;

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x240, %edi            # imm = 0x240
callq 0x47a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6ed45
movq $0x0, -0x8(%rbp)
jmp 0x6edc3
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
leaq -0x5da(%rip), %rcx      # 0x6e780
movq %rcx, 0x10(%rax)
cmpl $0x1, -0x14(%rbp)
je 0x6ed6a
cmpl $0x2, -0x14(%rbp)
jne 0x6ed7b
movq -0x30(%rbp), %rax
leaq -0x785(%rip), %rcx      # 0x6e5f0
movq %rcx, 0x20(%rax)
jmp 0x6ed9f
cmpl $0x4, -0x14(%rbp)
je 0x6ed87
cmpl $0x3, -0x14(%rbp)
jne 0x6ed98
movq -0x30(%rbp), %rax
leaq -0x762(%rip), %rcx      # 0x6e630
movq %rcx, 0x20(%rax)
jmp 0x6ed9d
callq 0x42e0
jmp 0x6ed9f
movq -0x30(%rbp), %rax
leaq -0x5fa(%rip), %rcx      # 0x6e7b0
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_beta_decode_int
int cram_beta_decode_int(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int32_t *out_i = (int32_t *)out;
    int i, n;

    if (c->beta.nbits) {
        if (cram_not_enough_bits(in, c->beta.nbits))
            return -1;

	for (i = 0, n = *out_size; i < n; i++)
	    out_i[i] = get_bits_MSB(in, c->beta.nbits) - c->beta.offset;
    } else {
	for (i = 0, n = *out_size; i < n; i++)
	    out_i[i] = -c->beta.offset;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0x6ee68
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x6eec0
cmpl $0x0, %eax
je 0x6ee1f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6eea8
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x6ee66
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x6ef50
movl %eax, %edx
movq -0x18(%rbp), %rax
subl 0x30(%rax), %edx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x6ee2f
jmp 0x6eea1
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x6ee9f
movq -0x18(%rbp), %rax
xorl %edx, %edx
subl 0x30(%rax), %edx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x6ee78
jmp 0x6eea1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/./cram/cram_codecs.h
// Function: cram_not_enough_bits
static inline int cram_not_enough_bits(cram_block *blk, int nbits) {
    if (nbits < 0 ||
	(blk->byte >= blk->uncomp_size && nbits > 0) ||
	(blk->uncomp_size - blk->byte <= INT32_MAX / 8 + 1 &&
	 (blk->uncomp_size - blk->byte) * 8 + blk->bit - 7 < nbits)) {
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x6ef30
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jb 0x6eeec
cmpl $0x0, -0x14(%rbp)
jg 0x6ef30
movq -0x10(%rbp), %rax
movslq 0x14(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
cmpq $0x10000000, %rax       # imm = 0x10000000
ja 0x6ef39
movq -0x10(%rbp), %rax
movslq 0x14(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
shlq $0x3, %rax
movq -0x10(%rbp), %rcx
movslq 0x38(%rcx), %rcx
addq %rcx, %rax
subq $0x7, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jae 0x6ef39
movl $0x1, -0x4(%rbp)
jmp 0x6ef40
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_beta_decode_char
int cram_beta_decode_char(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int i, n;


    if (c->beta.nbits) {
        if (cram_not_enough_bits(in, c->beta.nbits))
            return -1;

	if (out)
	    for (i = 0, n = *out_size; i < n; i++)
		out[i] = get_bits_MSB(in, c->beta.nbits) - c->beta.offset;
	else
	    for (i = 0, n = *out_size; i < n; i++)
		get_bits_MSB(in, c->beta.nbits);
    } else {
	if (out)
	    for (i = 0, n = *out_size; i < n; i++)
		out[i] = -c->beta.offset;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0x6f482
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x6eec0
cmpl $0x0, %eax
je 0x6f3fb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6f4cd
cmpq $0x0, -0x28(%rbp)
je 0x6f44b
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x6f449
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x6ef50
movq -0x18(%rbp), %rcx
subl 0x30(%rcx), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6f412
jmp 0x6f480
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x6f47e
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x6ef50
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6f45b
jmp 0x6f480
jmp 0x6f4c6
cmpq $0x0, -0x28(%rbp)
je 0x6f4c4
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x6f4c2
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl 0x30(%rcx), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6f499
jmp 0x6f4c4
jmp 0x6f4c6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_beta_encode_int
int cram_beta_encode_int(cram_slice *slice, cram_codec *c,
			 char *in, int in_size) {
    int *syms = (int *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
	r |= store_bits_MSB(c->out, syms[i] + c->e_beta.offset,
			    c->e_beta.nbits);

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x6fc2c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq -0x10(%rbp), %rax
addl 0x30(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x34(%rax), %edx
callq 0x6fc40
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6fbed
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_beta_encode_char
int cram_beta_encode_char(cram_slice *slice, cram_codec *c,
			  char *in, int in_size) {
    unsigned char *syms = (unsigned char *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
	r |= store_bits_MSB(c->out, syms[i] + c->e_beta.offset,
			    c->e_beta.nbits);

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x6ff1d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %esi
movq -0x10(%rbp), %rax
addl 0x30(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x34(%rax), %edx
callq 0x6fc40
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6fedd
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: get_one_bits_MSB
static int get_one_bits_MSB(cram_block *block) {
    int n = 0, b;
    if (block->byte >= block->uncomp_size)
        return -1;
    do {
	b = block->data[block->byte] >> block->bit;
	if (--block->bit == -1) {
	    block->bit = 7;
	    block->byte++;
	    if (block->byte == block->uncomp_size && (b&1))
	        return -1;
	}
	n++;
    } while (b&1);

    return n-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jb 0x703b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7044b
jmp 0x703b2
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %ecx
sarl %cl, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rcx)
cmpl $-0x1, %eax
jne 0x7042a
movq -0x10(%rbp), %rax
movl $0x7, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jne 0x70428
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x70428
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7044b
jmp 0x7042a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x703b2
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_subexp_decode_init
cram_codec *cram_subexp_decode_init(char *data, int size,
				    enum cram_external_type option,
				    int version) {
    cram_codec *c;
    char *cp = data;

    if (!(c = malloc(sizeof(*c))))
	return NULL;

    c->codec  = E_SUBEXP;
    c->decode = cram_subexp_decode;
    c->free   = cram_subexp_decode_free;
    c->subexp.k = -1;

    cp += safe_itf8_get(cp, data + size, &c->subexp.offset);
    cp += safe_itf8_get(cp, data + size, &c->subexp.k);

    if (cp - data != size || c->subexp.k < 0) {
	fprintf(stderr, "Malformed subexp header stream\n");
	free(c);
	return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x240, %edi            # imm = 0x240
callq 0x47a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x704be
movq $0x0, -0x8(%rbp)
jmp 0x7059e
movq -0x28(%rbp), %rax
movl $0x7, (%rax)
movq -0x28(%rbp), %rax
leaq -0x363(%rip), %rcx      # 0x70170
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
leaq -0x92(%rip), %rcx       # 0x70450
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x34(%rax) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
addq $0x30, %rdx
callq 0x6ded0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
addq $0x30, %rdx
addq $0x4, %rdx
callq 0x6ded0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7056b
movq -0x28(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jge 0x70596
movq 0x19a5e(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
leaq 0xe578(%rip), %rsi      # 0x7eaf4
movb $0x0, %al
callq 0x4830
movq -0x28(%rbp), %rdi
callq 0x46a0
movq $0x0, -0x8(%rbp)
jmp 0x7059e
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)