LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_slice_step
awlval* awlval_slice_step(awlval* x, int start, int end, int step) {
    if (x->type == AWLVAL_QEXPR) {
        return awlval_slice_step_qexpr(x, start, end, step);
    } else if (x->type == AWLVAL_STR) {
        return awlval_slice_step_str(x, start, end, step);
    } else {
        return awlval_slice_step_qsym(x, start, end, step);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x5, %eax
je 0x10f53
cmpl $0xc, %eax
jne 0x10f53
testl %r15d, %r15d
je 0x10ece
movl %r15d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c23
movq %rax, %rdi
callq 0x10767
decl %r12d
jne 0x10ea0
subl %r15d, %ebp
jmp 0x10ece
movq %rbx, %rdi
movl %ebp, %esi
callq 0x10c23
movq %rax, %rdi
callq 0x10767
movl 0x4(%rbx), %eax
cmpl %eax, %ebp
jl 0x10ebc
cmpl $0x2, %r14d
setl %cl
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x10f96
cltd
idivl %r14d
cmpl $0x1, %edx
sbbl $-0x1, %eax
cmpl %eax, 0x4(%rbx)
jle 0x10f96
leal -0x1(%r14), %ecx
xorl %r13d, %r13d
movl $0x1, %r12d
movl %eax, 0xc(%rsp)
movq %r14, 0x10(%rsp)
cmpl $0x2, %r14d
jl 0x10f49
movl %r12d, %r15d
subl %r13d, %r15d
movl %ecx, %ebp
movl %ecx, %r14d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x10c23
movq %rax, %rdi
callq 0x10767
decl %r14d
jne 0x10f23
movl %ebp, %ecx
addl %ebp, %r13d
movq 0x10(%rsp), %r14
movl 0xc(%rsp), %eax
addl %r14d, %r12d
cmpl %eax, 0x4(%rbx)
jg 0x10f12
jmp 0x10f96
movq 0x18(%rbx), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x11bfa
movq %rax, %r15
cmpl $0x2, %r14d
jl 0x10f89
cmpb $0x0, (%r15)
je 0x10f89
movq %r15, %rdi
movl %r14d, %esi
callq 0x11c4f
movq %rax, %r14
movq %r15, %rdi
callq 0x23f0
movq %r14, %r15
movq 0x18(%rbx), %rdi
callq 0x23f0
movq %r15, 0x18(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlval_maybe_promote_numeric
void awlval_maybe_promote_numeric(awlval* a, awlval* b) {
    if (!(ISNUMERIC(a->type) && ISNUMERIC(b->type))) {
        return;
    }
    if (a->type == AWLVAL_FLOAT || b->type == AWLVAL_FLOAT) {
        awlval_promote_numeric(a);
        awlval_promote_numeric(b);
    }
}

// Assembly:
movl (%rdi), %eax
cmpl $0x1, %eax
ja 0x10fff
movl (%rsi), %ecx
cmpl $0x1, %ecx
ja 0x10fff
cmpl $0x1, %eax
setne %dl
cmpl $0x1, %ecx
setne %cl
testb %cl, %dl
jne 0x10fff
cmpl $0x1, %eax
je 0x10fe6
movl $0x1, (%rdi)
cvtsi2sdq 0x18(%rdi), %xmm0
movsd %xmm0, 0x18(%rdi)
cmpl $0x1, (%rsi)
je 0x10fff
movl $0x1, (%rsi)
xorps %xmm0, %xmm0
cvtsi2sdq 0x18(%rsi), %xmm0
movsd %xmm0, 0x18(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_copy
awlenv* awlenv_copy(awlenv* e) {
    awlenv* n = safe_malloc(sizeof(awlenv));
    n->parent = e->parent;
    if (n->parent) {
        n->parent->references++;
    }
    n->internal_dict = dict_copy(e->internal_dict);
    n->top_level = e->top_level;
    n->references = 1;

    return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x18, %edi
callq 0x2290
testq %rax, %rax
je 0x1107b
movq %rax, %r14
movq (%rbx), %rax
movq %rax, (%r14)
testq %rax, %rax
je 0x11054
incl 0x14(%rax)
movq 0x8(%rbx), %rdi
callq 0x5d1e
movq %rax, 0x8(%r14)
movb 0x10(%rbx), %al
movb %al, 0x10(%r14)
movl $0x1, 0x14(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x29ed
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_new_top_level
awlenv* awlenv_new_top_level(void) {
    awlenv* e = awlenv_new();
    e->top_level = true;
    awlenv_add_builtins(e);
    awlenv_add_core_lib(e);
    return e;
}

// Assembly:
pushq %rbx
callq 0x10637
movq %rax, %rbx
movb $0x1, 0x10(%rax)
movq %rax, %rdi
callq 0x11417
movq %rbx, %rdi
callq 0x1184f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_add_core_lib
void awlenv_add_core_lib(awlenv* e) {
    char* awl_base = get_base_path();

    char* corelib = path_join(awl_base, "lib/core");

    awlval* args = awlval_sexpr();
    args = awlval_add(args, awlval_str(corelib));
    awlval_del(builtin_import(e, args));

    free(awl_base);
    free(corelib);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
callq 0x11cf3
movq %rax, %rbx
leaq 0x1ff7(%rip), %rsi      # 0x13861
movq %rax, %rdi
callq 0x11d2c
movq %rax, %r14
callq 0x106d7
movq %rax, %r12
movq %r14, %rdi
callq 0x104fa
movslq 0x4(%r12), %rcx
leaq 0x1(%rcx), %rdx
movl %edx, 0x4(%r12)
incl 0x10(%r12)
movq %rax, %r13
movq 0x8(%r12), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x22e0
movq %rax, 0x8(%r12)
movslq 0x4(%r12), %rcx
movq %r13, -0x8(%rax,%rcx,8)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5495
movq %rax, %rdi
callq 0x10767
movq %rbx, %rdi
callq 0x23f0
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x23f0
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_lookup
static awlval* awlenv_lookup(awlenv* e, char* k) {
    int i = dict_index(e->internal_dict, k);
    if (i != -1) {
        return dict_get_at(e->internal_dict, i);
    }

    /* check parent if not found */
    if (e->parent) {
        return awlenv_lookup(e->parent, k);
    } else {
        return awlval_err("unbound symbol '%s'", k);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x5a1c
cmpl $-0x1, %eax
jne 0x11946
movq (%r14), %r14
testq %r14, %r14
jne 0x11915
leaq 0x1f35(%rip), %rdi      # 0x1386a
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1032f
movq 0x8(%r14), %rdi
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5af4
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/types.c
// Function: awlenv_add_builtin
void awlenv_add_builtin(awlenv* e, char* name, awlbuiltin builtin) {
    awlval* k = awlval_sym(name);
    awlval* v = awlval_fun(builtin, name);
    awlenv_put(e, k, v);
    awlval_del(k);
    awlval_del(v);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x10495
movq %rax, %r12
movl $0x3, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1057a
movq %rax, %rbx
movq 0x8(%r15), %rdi
movq 0x18(%r12), %rsi
movq %rax, %rdx
callq 0x5b0e
movq %r12, %rdi
callq 0x10767
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10767
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: stringbuilder_new
stringbuilder_t* stringbuilder_new(void) {
    stringbuilder_t* sb = safe_malloc(sizeof(stringbuilder_t));
    sb->length = 0;
    sb->size = SB_START_SIZE;
    sb->str = safe_malloc(SB_START_SIZE);
    return sb;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x2290
testq %rax, %rax
je 0x11a14
movq %rax, %rbx
movabsq $0x40000000000, %rax    # imm = 0x40000000000
movq %rax, (%rbx)
movl $0x400, %edi            # imm = 0x400
callq 0x2290
testq %rax, %rax
je 0x11a19
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
callq 0x2a37
callq 0x2a12
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: stringbuilder_write
void stringbuilder_write(stringbuilder_t* sb, const char* format, ...) {
    va_list arguments1;
    va_list arguments2;
    va_start(arguments1, format);
    va_copy(arguments2, arguments1);

    /* First use vsnprintf to check how large the printed result would be */
    int count = vsnprintf(NULL, 0, format, arguments1);

    /* If there isn't enough room, keep resizing until there is */
    int required_size = sb->length + count + 1;
    while (sb->size < required_size) {
        stringbuilder_resize(sb);
    }

    vsnprintf((sb->str + sb->length), count + 1, format, arguments2);
    sb->length += count;

    va_end(arguments1);
    va_end(arguments2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x11a89
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x120(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rsi, 0x10(%rcx)
movq %rsi, 0x10(%rsp)
movq (%rcx), %rax
movq %rax, (%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20c0
movl %eax, %ebp
movl (%rbx), %r12d
addl %eax, %r12d
movl 0x4(%rbx), %eax
cmpl %r12d, %eax
jg 0x11b0e
addl %eax, %eax
movl %eax, 0x4(%rbx)
movq 0x8(%rbx), %r15
movslq %eax, %rdi
callq 0x2290
testq %rax, %rax
je 0x11b39
movq %rax, 0x8(%rbx)
movslq (%rbx), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2270
movq %r15, %rdi
callq 0x23f0
jmp 0x11ad4
movslq (%rbx), %rdi
addq 0x8(%rbx), %rdi
movl %ebp, %eax
incl %eax
movslq %eax, %rsi
movq %rsp, %rcx
movq %r14, %rdx
callq 0x20c0
addl %ebp, (%rbx)
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a5c
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: strrev
char* strrev(const char* str) {
    int len = strlen(str);
    char* newstr = safe_malloc(len + 1);

    char* start = newstr;
    const char* end = str + len - 1;

    for (int i = 0; i < len; i++) {
        *start = *end;
        start++;
        end--;
    }
    newstr[len] = '\0';
    return newstr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x2110
movq %rax, %rbx
movq %rax, %r15
shlq $0x20, %r15
movabsq $0x100000000, %rdi      # imm = 0x100000000
addq %r15, %rdi
sarq $0x20, %rdi
callq 0x2290
testq %rax, %rax
je 0x11bf5
sarq $0x20, %r15
testl %ebx, %ebx
jle 0x11bea
leaq (%r15,%r14), %rcx
decq %rcx
xorl %edx, %edx
movb (%rcx), %sil
movb %sil, (%rax,%rdx)
incq %rdx
decq %rcx
cmpl %edx, %ebx
jne 0x11bd9
movb $0x0, (%rax,%r15)
popq %rbx
popq %r14
popq %r15
retq
callq 0x2aa6
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: strsubstr
char* strsubstr(const char* str, int start, int end) {
    int len = end - start;
    char* buffer = safe_malloc(len + 1);
    memcpy(buffer, &str[start], len);
    buffer[len] = '\0';
    return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
subl %esi, %r14d
leal 0x1(%r14), %eax
movslq %eax, %rdi
callq 0x2290
testq %rax, %rax
je 0x11c4a
movq %rax, %r15
movslq %ebp, %rax
addq %rax, %rbx
movslq %r14d, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2270
movb $0x0, (%r15,%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2acb
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: strstep
char* strstep(const char* str, int step) {
    int len = strlen(str);
    int bufferlen = len / step + (len % step == 0 ? 0 : 1);
    char* buffer = safe_malloc(bufferlen + 1);
    for (int i = 0, j = 0; i < bufferlen; i++, j += step) {
        buffer[i] = str[j];
    }
    buffer[bufferlen] = '\0';
    return buffer;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2110
cltd
idivl %ebp
movl %eax, %r14d
cmpl $0x1, %edx
sbbl $-0x1, %r14d
leal 0x1(%r14), %eax
movslq %eax, %rdi
callq 0x2290
testq %rax, %rax
je 0x11ca6
testl %r14d, %r14d
jle 0x11c9a
movslq %ebp, %rcx
movl %r14d, %edx
xorl %esi, %esi
movb (%rbx), %dil
movb %dil, (%rax,%rsi)
incq %rsi
addq %rcx, %rbx
cmpq %rsi, %rdx
jne 0x11c88
movslq %r14d, %rcx
movb $0x0, (%rax,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2af0
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: get_executable_path
char* get_executable_path(void) {
    /* TODO: reading /proc is definitely not cross platform */
    char* path = safe_malloc(BUFSIZE);

    int len = readlink("/proc/self/exe", path, BUFSIZE - 1);
    if (len == -1) {
        free(path);
        path = NULL;
    } else {
        path[len] = '\0';
    }
    return path;
}

// Assembly:
pushq %rbx
movl $0x1000, %edi           # imm = 0x1000
callq 0x2290
testq %rax, %rax
je 0x11cee
movq %rax, %rbx
leaq 0x1bb9(%rip), %rdi      # 0x1387e
movl $0xfff, %edx            # imm = 0xFFF
movq %rax, %rsi
callq 0x20d0
cmpl $-0x1, %eax
jne 0x11ce3
movq %rbx, %rdi
callq 0x23f0
xorl %ebx, %ebx
jmp 0x11ce9
cltq
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
popq %rbx
retq
callq 0x2b15
// File: /workspace/github_c_makefile_star2_O1/voithos[P]awl/src/util.c
// Function: get_base_path
char* get_base_path(void) {
#ifdef EMSCRIPTEN
    char* base_path = safe_malloc(2);
    base_path[0] = '.';
    base_path[1] = '\0';
    return base_path;
#else
    // Executable is in 'bin' directory, so we need to go up twice
    char* exe_path = get_executable_path();
    char* base_path = path_join(dirname(exe_path), "../");
    free(exe_path);
    return base_path;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x11cab
movq %rax, %rbx
movq %rax, %rdi
callq 0x2150
leaq 0x1b7f(%rip), %rsi      # 0x1388d
movq %rax, %rdi
callq 0x11d2c
movq %rax, %r14
movq %rbx, %rdi
callq 0x23f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/3-ProcessUser/system_example.c
// Function: main
int main(void)
{
	printf("before system ...\n");
	system("ls -l");
	printf("after system ...\n");
	return 0;
}

// Assembly:
pushq %rax
leaq 0xeb6(%rip), %rdi       # 0x200a
callq 0x1030
leaq 0xea4(%rip), %rdi       # 0x2004
callq 0x1040
leaq 0xeb0(%rip), %rdi       # 0x201c
callq 0x1030
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/muayyad-alsadi[P]oneway/oneway.c
// Function: name_to_uid
uid_t name_to_uid(char const *name, gid_t *gid, char** home, char **shell)
{
  if (!name) return -1;
  struct passwd *ptr=getpwnam(name);
  if (0 == ptr) {
      fprintf(stderr, "could not find user [%s]\n", name);
      return -1;
  }
  *gid=ptr->pw_gid;
  *home=strdup(ptr->pw_dir);
  *shell=(ptr->pw_shell);
  return ptr->pw_uid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x1287
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
callq 0x1090
testq %rax, %rax
je 0x1298
movq %rax, %rbp
movl 0x14(%rax), %eax
movl %eax, (%r13)
movq 0x20(%rbp), %rdi
callq 0x1130
movq %rax, (%r15)
movq 0x28(%rbp), %rax
movq %rax, (%r14)
movl 0x10(%rbp), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d59(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd5b(%rip), %rsi       # 0x2004
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a0
jmp 0x1287
// File: /workspace/github_c_makefile_star2_O1/singpolyma[P]mnemonicode/mnencode.c
// Function: main
int main(int argc, char **argv) {
	mn_byte *buf;
	mn_byte cbuf[0x10000];
	mn_byte xbuf[0x8000];
	char outbuf[0x90000];
	int buflen;
	int n;
	int hex_encoded_input = 0;

	if(argc > 1 && strcmp(argv[1],"-x") == 0) {
		hex_encoded_input = 1;
	}

	fprintf (stderr, "%s\n", mn_wordlist_version);

	buflen = fread(cbuf, 1, sizeof cbuf, stdin);

	if(hex_encoded_input) {
		buflen = hex2bytes(buflen, cbuf, xbuf);
		if(buflen < 0) {
			perror("hex2bytes");
			return EXIT_FAILURE;
		}
		buf = xbuf;
	} else {
		buf = cbuf;
	}

	n = mn_encode(buf, buflen, outbuf, sizeof outbuf, "x x x. x x x. x x x\n");

	if(n != 0) {
		fprintf(stderr, "mn_encode error %d\n", n);
		return EXIT_FAILURE;
	}

	fwrite(outbuf, 1, strlen (outbuf), stdout);
	putchar('\n');

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa8000, %rsp          # imm = 0xA8000
movb $0x1, %bpl
cmpl $0x2, %edi
jl 0xb109
movq 0x8(%rsi), %rdi
leaq 0xf06(%rip), %rsi       # 0xc004
callq 0xb070
testl %eax, %eax
setne %bpl
movq 0x5ee8(%rip), %r14      # 0x10ff8
movq (%r14), %rdi
leaq 0x5f66(%rip), %rax      # 0x11080
movq (%rax), %rdx
leaq 0xee3(%rip), %rsi       # 0xc007
xorl %eax, %eax
callq 0xb080
movq 0x5ea6(%rip), %rax      # 0x10fd8
movq (%rax), %rcx
leaq 0x8000(%rsp), %rbx
pushq $0x1
popq %rsi
movl $0x10000, %edx          # imm = 0x10000
movq %rbx, %rdi
callq 0xb050
testb %bpl, %bpl
jne 0xb16b
leaq 0x8000(%rsp), %rsi
movq %rsp, %rbx
movl %eax, %edi
movq %rbx, %rdx
callq 0xb377
testl %eax, %eax
js 0xb1e0
leaq 0xea3(%rip), %r8        # 0xc015
leaq 0x18000(%rsp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl $0x90000, %ecx          # imm = 0x90000
callq 0xb83e
testl %eax, %eax
jne 0xb1cb
leaq 0x18000(%rsp), %rbx
movq %rbx, %rdi
callq 0xb060
movq 0x5e2c(%rip), %rcx      # 0x10fd0
movq (%rcx), %rcx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xb0b0
pushq $0xa
popq %rdi
callq 0xb030
xorl %eax, %eax
addq $0xa8000, %rsp          # imm = 0xA8000
popq %rbx
popq %r14
popq %rbp
retq
movq (%r14), %rdi
leaq 0xe55(%rip), %rsi       # 0xc02a
movl %eax, %edx
xorl %eax, %eax
callq 0xb080
jmp 0xb1ec
leaq 0xe24(%rip), %rdi       # 0xc00b
callq 0xb0a0
pushq $0x1
popq %rax
jmp 0xb1bf
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O1/singpolyma[P]mnemonicode/mnencode.c
// Function: counthex
int counthex(const mn_byte *s, size_t len) {
	int total = 0;
	size_t i;
	for(i = 0; i < len; i++) {
		if(isxdigit(s[i])) total++;
	}
	return total;
}

// Assembly:
testq %rsi, %rsi
je 0xb327
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0xb0c0
movq (%rax), %rcx
xorl %edx, %edx
xorl %eax, %eax
movzbl (%r14,%rdx), %esi
movzwl (%rcx,%rsi,2), %esi
btl $0xc, %esi
adcl $0x0, %eax
incq %rdx
cmpq %rdx, %rbx
jne 0xb307
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/singpolyma[P]mnemonicode/mnencode.c
// Function: countLeadingCrapAndZeros
int countLeadingCrapAndZeros(const mn_byte *in, size_t inlen) {
	size_t i;
	for(i = 0; i < inlen; i++) {
		if(in[i] != '0' && isxdigit(in[i])) break; /* Find first non-zero hex digit */
	}
	return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xb367
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
movzbl (%r15,%rbx), %r12d
cmpq $0x30, %r12
je 0xb35a
callq 0xb0c0
movq (%rax), %rax
testb $0x10, 0x1(%rax,%r12,2)
jne 0xb369
incq %rbx
cmpq %rbx, %r14
jne 0xb33f
movq %r14, %rbx
jmp 0xb369
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/singpolyma[P]mnemonicode/mnencode.c
// Function: hex2bytes
int hex2bytes(int inlen, const mn_byte *in, mn_byte *out) {
	char t[3];
	int i, j = 0, k = 0;
	i = countLeadingCrapAndZeros(in, inlen);
	inlen = inlen - i;
	in = in + i;
	if(counthex(in, inlen) % 2 != 0) {
		t[j++] = '0';
	}
	for(i = 0; i < inlen; i++) {
		if(isxdigit(in[i])) {
			t[j++] = in[i];
			if(j == 2) {
				t[2] = '\0';
				errno = 0;
				out[k++] = strtol(t, NULL, 16);
				if(errno != 0) {
					return -1;
				}
				j = 0;
			}
		}
	}
	return k;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movslq %edi, %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0xb32a
subl %eax, %r12d
movslq %eax, %r14
addq %r15, %r14
movslq %r12d, %rsi
movq %r14, %rdi
callq 0xb2ec
xorl %ebp, %ebp
movl $0x0, %r13d
testb $0x1, %al
je 0xb3c6
movb $0x30, 0xd(%rsp)
movl $0x1, %r13d
testl %r12d, %r12d
jle 0xb448
callq 0xb0c0
movq %rax, %r15
movl %r12d, %r12d
xorl %ebx, %ebx
xorl %ebp, %ebp
movq (%r15), %rcx
movzbl (%r14,%rbx), %eax
testb $0x10, 0x1(%rcx,%rax,2)
je 0xb439
movl %r13d, %ecx
movb %al, 0xd(%rsp,%rcx)
cmpl $0x1, %r13d
jne 0xb433
movb $0x0, 0xf(%rsp)
callq 0xb040
movq %rax, %r13
movl $0x0, (%rax)
leaq 0xd(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xb090
movslq %ebp, %rcx
movq 0x10(%rsp), %rdx
movb %al, (%rdx,%rcx)
cmpl $0x0, (%r13)
jne 0xb443
incl %ebp
xorl %r13d, %r13d
jmp 0xb439
movl $0x1, %r13d
incq %rbx
cmpq %rbx, %r12
jne 0xb3da
jmp 0xb448
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/yahs.c
// Function: print_asm_stats
static void print_asm_stats(uint64_t *n_stats, uint32_t *l_stats, int all)
{
#ifdef DEBUG
    int i;
    fprintf(stderr, "[I::%s] assembly stats:\n", __func__);
    for (i = 0; i < 10; ++i)
        fprintf(stderr, "[I::%s] N%d: %lu (n = %u)\n", __func__, (i + 1) * 10, n_stats[i], l_stats[i]);
#else
    fprintf(stderr, "[I::%s] assembly stats:\n", __func__);
    fprintf(stderr, "[I::%s]  N%d: %lu (n = %u)\n", __func__, 50, n_stats[4], l_stats[4]);
    fprintf(stderr, "[I::%s]  N%d: %lu (n = %u)\n", __func__, 90, n_stats[8], l_stats[8]);
    if (all)
        fprintf(stderr, "[I::%s]  N%d: %lu (n = %u)\n", __func__, 100, n_stats[9], l_stats[9]);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x26ea6(%rip), %r12     # 0x2aff8
movq (%r12), %rdi
leaq 0x2000e(%rip), %rsi     # 0x2416b
leaq 0x20020(%rip), %r14     # 0x24184
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
movq (%r12), %rdi
movq 0x274d7(%rip), %r8      # 0x2b650
movl 0x27510(%rip), %r9d     # 0x2b690
leaq 0x2000d(%rip), %r15     # 0x24194
pushq $0x32
popq %rcx
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
movq (%r12), %rdi
movq 0x274ce(%rip), %r8      # 0x2b670
movl 0x274f7(%rip), %r9d     # 0x2b6a0
pushq $0x5a
popq %rcx
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
testl %ebx, %ebx
jne 0x41c9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r12), %rdi
movq 0x274a4(%rip), %r8      # 0x2b678
movl 0x274c9(%rip), %r9d     # 0x2b6a4
leaq 0x1ffb2(%rip), %rsi     # 0x24194
leaq 0x1ff9b(%rip), %rdx     # 0x24184
pushq $0x64
popq %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22c0
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/bamlite.c
// Function: bam_header_destroy
void bam_header_destroy(bam_header_t *header)
{
    int32_t i;
    if (header == 0) return;
    if (header->target_name) {
        for (i = 0; i < header->n_targets; ++i)
            if (header->target_name[i]) free(header->target_name[i]);
        if (header->target_len) free(header->target_len);
        free(header->target_name);
    }
    if (header->text) free(header->text);
    free(header);
}

// Assembly:
testq %rdi, %rdi
je 0x5089
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x506c
cmpl $0x0, (%rbx)
jle 0x5055
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x504a
callq 0x2060
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x5038
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5063
callq 0x2060
movq 0x8(%rbx), %rdi
callq 0x2060
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x507a
callq 0x2060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/bamlite.c
// Function: bamlite_gzread
int bamlite_gzread(gzFile file, void *ptr, unsigned int len) {
    int ret = gzread(file, ptr, len);
    
    if (ret < 0) {
        int errnum = 0;
        const char *msg = gzerror(file, &errnum);
        fprintf(stderr, "gzread error: %s\n",
                Z_ERRNO == errnum ? strerror(errno) : msg);
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22b0
movl %eax, %ebp
testl %eax, %eax
js 0x527c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x25fc
jmp 0x5273
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/bamlite.c
// Function: get_target_end
int get_target_end(bam1_t *b)
{
    int i, s;
    uint8_t c;
    uint32_t n_cigar, *cigar;
    s = b->core.pos;
    cigar = bam1_cigar(b);
    n_cigar = b->core.n_cigar;
    for (i = 0; i < n_cigar; ++i) {
        c = cigar[i] & BAM_CIGAR_MASK;
        if (c == BAM_CMATCH || c == BAM_CDEL)
            s += cigar[i] >> BAM_CIGAR_SHIFT;
    }
    return s;
}

// Assembly:
movl 0x4(%rdi), %eax
movq 0x8(%rdi), %rcx
movq %rcx, %rdx
shrq $0x30, %rdx
je 0x56da
shrl $0x18, %ecx
addq 0x30(%rdi), %rcx
xorl %esi, %esi
xorl %edi, %edi
movl (%rcx,%rdi,4), %r8d
movl %r8d, %r9d
shrl $0x4, %r9d
testb $0xd, %r8b
cmovnel %esi, %r9d
addl %r9d, %eax
incq %rdi
cmpq %rdi, %rdx
jne 0x56bc
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/bamlite.c
// Function: bamlite_gzopen
gzFile bamlite_gzopen(const char *fn, const char *mode) {
    gzFile fp;
    if (strcmp(fn, "-") == 0) {
        fp = gzdopen(fileno((strstr(mode, "r"))? stdin : stdout), mode);
        if (!fp) {
            fprintf(stderr, "Couldn't open %s : %s",
                    (strstr(mode, "r"))? "stdin" : "stdout",
                    strerror(errno));
        }
        return fp;
    }
    if ((fp = gzopen(fn, mode)) == 0) {
        fprintf(stderr, "Couldn't open %s : %s\n", fn,
                errno ? strerror(errno) : "Out of memory");
    }
    return fp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1bc54(%rip), %rsi     # 0x21341
callq 0x22a0
testl %eax, %eax
je 0x5713
movq %r15, %rdi
movq %rbx, %rsi
callq 0x23b0
movq %rax, %r14
testq %rax, %rax
jne 0x574f
movq %r15, %rdi
callq 0x2649
jmp 0x574f
movq %rbx, %rdi
movl $0x72, %esi
callq 0x2180
testq %rax, %rax
jne 0x572e
movq 0x258a4(%rip), %rax     # 0x2afd0
jmp 0x5735
movq 0x258a3(%rip), %rax     # 0x2afd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %edi
movq %rbx, %rsi
callq 0x2130
movq %rax, %r14
testq %rax, %rax
je 0x5758
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2691
jmp 0x574f
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/bamlite.c
// Function: bamlite_gzclose
int bamlite_gzclose(gzFile file) {
    int ret = gzclose(file);
    if (Z_OK != ret) {
        fprintf(stderr, "gzclose error: %s\n",
                          Z_ERRNO == ret ? strerror(errno) : zError(ret));
    }
    
    return ret;
}

// Assembly:
pushq %rbx
callq 0x2050
movl %eax, %ebx
testl %eax, %eax
jne 0x5772
movl %ebx, %eax
popq %rbx
retq
movl %ebx, %edi
callq 0x26e6
jmp 0x576e
nop
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/break.c
// Function: link_mat_init
link_mat_t *link_mat_init(asm_dict_t *dict, uint32_t b)
{
    link_mat_t *link_mat = (link_mat_t *) malloc(sizeof(link_mat_t));
    link_mat->b = b;
    link_mat->n = dict->n;
    link_mat->link = (link_t *) malloc(sizeof(link_t) * link_mat->n);

    uint32_t i;
    for (i = 0; i < link_mat->n; ++i)
        link_init(link_mat->link + i, i, div_ceil(dict->s[i].len, b));
    
    return link_mat;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x10, %edi
callq 0x2330
movq %rax, %r15
movl %ebx, 0xc(%rsp)
movl %ebx, (%rax)
movq %r14, 0x20(%rsp)
movl (%r14), %ebx
movl %ebx, 0x4(%rax)
movq %rbx, %rdi
shlq $0x4, %rdi
callq 0x2330
movq %r15, 0x10(%rsp)
movq %rax, 0x8(%r15)
movq %rbx, 0x18(%rsp)
testq %rbx, %rbx
je 0x5841
movq %rax, %r12
xorl %r15d, %r15d
movabsq $0x100000000, %rbx      # imm = 0x100000000
movq %r15, %r14
shlq $0x4, %r14
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
imulq $0x58, %r15, %rcx
movq 0x8(%rax,%rcx), %rdi
movl 0xc(%rsp), %esi
callq 0x4bf1
movl %eax, %ebp
movl %r15d, (%r12,%r14)
movl %eax, 0x4(%r12,%r14)
movl %eax, %r13d
leaq (,%r13,8), %rdi
callq 0x2330
testl %ebp, %ebp
je 0x5830
xorl %ecx, %ecx
xorl %edx, %edx
movq %rcx, (%rax,%rdx,8)
incq %rdx
addq %rbx, %rcx
cmpq %rdx, %r13
jne 0x5821
addq %r12, %r14
movq %rax, 0x8(%r14)
incq %r15
cmpq 0x18(%rsp), %r15
jne 0x57dc
movq 0x10(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/break.c
// Function: link_mat_destroy
void link_mat_destroy(link_mat_t *link_mat)
{
    if (!link_mat) return;
    uint32_t i;
    for (i = 0; i < link_mat->n; ++i)
        free(link_mat->link[i].link);
    free(link_mat->link);
    free(link_mat);
}

// Assembly:
testq %rdi, %rdi
je 0x58a3
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
je 0x588d
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2060
incq %r15
movl 0x4(%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x5871
movq 0x8(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/break.c
// Function: add_break_point
KDQ_INIT(int64_t)

static void add_break_point(bp_t *bp, uint64_t p)
{
    if (bp->n == bp->m) {
        bp->m <<= 1;
        bp->p = (uint64_t *) realloc(bp->p, bp->m * sizeof(uint64_t));
    }
    bp->p[bp->n] = p;
    ++bp->n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %esi
cmpl %esi, (%rdi)
jne 0x62df
addl %esi, %esi
movl %esi, 0x4(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rsi
callq 0x2390
movq %rax, 0x10(%rbx)
movq 0x10(%rbx), %rax
movl (%rbx), %ecx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/break.c
// Function: print_link_mat
void print_link_mat(link_mat_t *link_mat, asm_dict_t *dict, FILE *fp)
{
    int i, j, n;
    int64_t *link;
    for (i = 0; i < link_mat->n; ++i) {
        link = link_mat->link[i].link;
        n = link_mat->link[i].n;
        fprintf(fp, "%s:", dict->s[link_mat->link[i].s].name);
        for (j = 0; j < n; ++j)
            fprintf(fp, " %d", (int32_t) link[j]);
        fprintf(fp, "\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
cmpl $0x0, 0x4(%rdi)
je 0x6b8e
movq %rdx, %rbx
leaq 0x1a762(%rip), %r13     # 0x21271
xorl %ebp, %ebp
movq %rdi, 0x8(%rsp)
movq 0x8(%rdi), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %r12
movslq 0x4(%rax,%rcx), %r14
movq 0x10(%rsp), %rdx
movq 0x8(%rdx), %rdx
movl (%rax,%rcx), %eax
imulq $0x58, %rax, %rax
movq (%rdx,%rax), %rdx
movq %rbx, %rdi
leaq 0x1a724(%rip), %rsi     # 0x2126d
xorl %eax, %eax
callq 0x22c0
testq %r14, %r14
jle 0x6b71
xorl %r15d, %r15d
movl (%r12,%r15,8), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x22c0
incq %r15
cmpq %r15, %r14
jne 0x6b58
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2260
incq %rbp
movq 0x8(%rsp), %rdi
movl 0x4(%rdi), %eax
cmpq %rax, %rbp
jb 0x6b16
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/break.c
// Function: print_break_point
void print_break_point(bp_t *bp, asm_dict_t *dict, FILE *fp)
{
    int i;
    fprintf(fp, "%s[%u]:", dict->s[bp->s].name, bp->n);
    for (i = 0; i < bp->n; ++i)
        fprintf(fp, " %lu", bp->p[i]);
    fprintf(fp, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movl (%rdi), %ecx
movl 0x8(%rdi), %edx
imulq $0x58, %rdx, %rdx
movq (%rax,%rdx), %rdx
leaq 0x1a6b2(%rip), %rsi     # 0x21275
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22c0
cmpl $0x0, (%r14)
je 0x6bfd
leaq 0x1a6a3(%rip), %r15     # 0x2127d
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22c0
incq %r12
movl (%r14), %eax
cmpq %rax, %r12
jb 0x6bdd
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2260
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_destroy
void graph_destroy(graph_t *g)
{
    if (!g) return;
    if (g == 0)
        return;
    if (g->arc)
        free(g->arc);
    if (g->idx)
        free(g->idx);
    free(g);
}

// Assembly:
testq %rdi, %rdi
je 0x82ce
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x82b7
callq 0x2060
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x82c5
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_print
void graph_print(const graph_t *g, FILE *fp, int no_seq)
{
    uint32_t i, n;
    uint64_t k;
    sd_aseq_t *s;

    n = g->sdict->n;
    for (i = 0; i < n; ++i) {
        s = &g->sdict->s[i];
        fprintf(fp, "S\t%s\t", s->name);
        if (!no_seq) {
            char *seq = 0;//get_asm_seq(g->sdict, s->name);
            if (seq) {
                fputs(seq, fp);
                free(seq);
            } else {
                fputc('*', fp);
            }
        } else {
            fputc('*', fp);
        }
        fprintf(fp, "\tLN:i:%lu", s->len);
        fputc('\n', fp);
    }
    
    for (k = 0; k < g->n_arc; ++k) {
        const graph_arc_t *a = &g->arc[k];
        if (a->del || a->comp) 
            continue;
        fprintf(fp, "L\t%s\t%c\t%s\t%c\t0M\tWT:f:%.6f", g->sdict->s[a->v>>1].name, "+-"[a->v&1], g->sdict->s[a->w>>1].name, "+-"[a->w&1], a->wt);
        if (a->rank >= 0) 
            fprintf(fp, "\tSR:i:%d", a->rank);
        fputc('\n', fp);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movl (%rax), %eax
testq %rax, %rax
je 0x834a
imulq $0x58, %rax, %r13
leaq 0x19025(%rip), %r12     # 0x2131b
xorl %ebp, %ebp
movq 0x8(%r14), %rax
movq 0x8(%rax), %r15
movq (%r15,%rbp), %rdx
movq %rbx, %rdi
leaq 0x19007(%rip), %rsi     # 0x21315
xorl %eax, %eax
callq 0x22c0
movl $0x2a, %edi
movq %rbx, %rsi
callq 0x2260
movq 0x8(%r15,%rbp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22c0
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2260
addq $0x58, %rbp
cmpq %rbp, %r13
jne 0x82f8
cmpq $0x0, 0x18(%r14)
je 0x83f9
leaq 0x18fe4(%rip), %r13     # 0x21340
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x20(%r14), %r15
movq 0x18(%r15,%rbp), %rax
shrq $0x3e, %rax
jne 0x83e8
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movl (%r15,%rbp), %ecx
movl 0x4(%r15,%rbp), %esi
movl %ecx, %edx
shrl %edx
imulq $0x58, %rdx, %rdx
movq (%rax,%rdx), %rdx
andl $0x1, %ecx
movsbl (%rcx,%r13), %ecx
movl %esi, %edi
shrl %edi
imulq $0x58, %rdi, %rdi
movq (%rax,%rdi), %r8
andl $0x1, %esi
movsbl (%rsi,%r13), %r9d
movsd 0x10(%r15,%rbp), %xmm0
movq %rbx, %rdi
leaq 0x18f6b(%rip), %rsi     # 0x21325
movb $0x1, %al
callq 0x22c0
movl 0x8(%r15,%rbp), %edx
testl %edx, %edx
js 0x83db
movq %rbx, %rdi
leaq 0x18f6f(%rip), %rsi     # 0x21343
xorl %eax, %eax
callq 0x22c0
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2260
incq %r12
addq $0x20, %rbp
cmpq 0x18(%r14), %r12
jb 0x8361
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_add_arc
graph_arc_t *graph_add_arc(graph_t *g, uint32_t v, uint32_t w, int64_t link_id, int comp, double wt)
{
    graph_arc_t *a;
    if (g->m_arc == g->n_arc) {
        uint64_t old_m = g->m_arc;
        g->m_arc = g->m_arc? g->m_arc<<1 : 16;
        g->arc = (graph_arc_t *) realloc(g->arc, g->m_arc * sizeof(graph_arc_t));
        memset(&g->arc[old_m], 0, (g->m_arc - old_m) * sizeof(graph_arc_t));
    }
    a = &g->arc[g->n_arc++];
    a->v = v;
    a->w = w;
    a->wt = wt;
    a->rank = -1;
    a->link_id = link_id >= 0? link_id : g->n_arc - 1;
    if (link_id >= 0) 
        a->rank = g->arc[link_id].rank; // TODO: this is not always correct!
    a->del = a->strong = 0;
    a->comp = comp;
    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r15
movq 0x10(%rdi), %r13
cmpq 0x18(%rdi), %r13
jne 0x847a
leaq (,%r13,2), %rax
testq %r13, %r13
movl $0x10, %esi
cmovneq %rax, %rsi
movq %rsi, 0x10(%r15)
movq 0x20(%r15), %rdi
shlq $0x5, %rsi
movsd %xmm0, (%rsp)
callq 0x2390
movq %rax, 0x20(%r15)
movq %r13, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movq 0x10(%r15), %rdx
subq %r13, %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x21e0
movsd (%rsp), %xmm0
movq 0x18(%r15), %rdx
movq 0x20(%r15), %rsi
leaq 0x1(%rdx), %rax
movq %rax, 0x18(%r15)
movq %rdx, %rdi
shlq $0x5, %rdi
leaq (%rsi,%rdi), %rax
testq %r14, %r14
cmovnsq %r14, %rdx
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
movabsq $-0x2000000000000000, %r8 # imm = 0xE000000000000000
andq 0x18(%rsi,%rdi), %r8
andq %rcx, %rdx
orq %rdx, %r8
movl %r12d, (%rsi,%rdi)
movl %ebp, 0x4(%rsi,%rdi)
movsd %xmm0, 0x10(%rsi,%rdi)
movl $0xffffffff, 0x8(%rsi,%rdi) # imm = 0xFFFFFFFF
movq %r8, 0x18(%rsi,%rdi)
testq %r14, %r14
js 0x84eb
movq 0x20(%r15), %rdx
shlq $0x5, %r14
movl 0x8(%rdx,%r14), %edx
movl %edx, 0x8(%rax)
andq 0x18(%rax), %rcx
shlq $0x3f, %rbx
orq %rbx, %rcx
movq %rcx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_arc_is_sorted
int graph_arc_is_sorted(const graph_t *g)
{
    uint64_t e;
    for (e = 1; e < g->n_arc; ++e)
        if (g->arc[e-1].v > g->arc[e].v)
            break;
    return (e == g->n_arc);
}

// Assembly:
movq 0x18(%rdi), %rcx
movl $0x1, %edx
cmpq $0x2, %rcx
jb 0x8536
movq 0x20(%rdi), %rax
addq $0x20, %rax
movl -0x20(%rax), %esi
cmpl (%rax), %esi
ja 0x8536
incq %rdx
addq $0x20, %rax
cmpq %rdx, %rcx
jne 0x8520
movq %rcx, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
sete %al
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_arc_index_core
uint64_t *graph_arc_index_core(size_t max_seq, size_t n, const graph_arc_t *a)
{
    size_t i, last;
    uint64_t *idx;
    idx = (uint64_t *) calloc(max_seq * 2, 8);
    for (i = 1, last = 0; i <= n; ++i)
        if (i == n || graph_arc_head(a[i - 1]) != graph_arc_head(a[i]))
            idx[graph_arc_head(a[i - 1])] = (uint64_t) last<<32 | (i - last), last = i;
    return idx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
addq %rdi, %rdi
movl $0x8, %esi
callq 0x2290
testq %r14, %r14
je 0x85b5
leaq 0x1(%r14), %rdx
cmpq $0x3, %rdx
movl $0x2, %ecx
cmovaeq %rdx, %rcx
movl $0x1, %edx
xorl %esi, %esi
cmpq %rdx, %r14
je 0x8593
movl (%rbx), %edi
cmpl 0x20(%rbx), %edi
je 0x85a9
movq %rdx, %rdi
subq %rsi, %rdi
shlq $0x20, %rsi
orq %rdi, %rsi
movl (%rbx), %edi
movq %rsi, (%rax,%rdi,8)
movq %rdx, %rsi
incq %rdx
addq $0x20, %rbx
cmpq %rdx, %rcx
jne 0x8587
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: read_graph_from_gfa
graph_t *read_graph_from_gfa(char *gfa)
{
    iostream_t *fp;
    char *line;
    char c0[1024], c1[1024], s0[4], s1[4], wts[1024];
    double wt;

    graph_t *g;
    g = graph_init();
    g->sdict = make_asm_dict_from_sdict(make_sdict_from_gfa(gfa, 0));
    
    fp = iostream_open(gfa);
    if (fp == NULL) {
        fprintf(stderr, "[E::%s] cannot open file %s for reading\n", __func__, gfa);
        exit(EXIT_FAILURE);
    }

    while ((line = iostream_getline(fp)) != NULL) {
        if (line[0] == 'L') {
            sscanf(line, "%*s %s %s %s %s %*s %s", c0, s0, c1, s1, wts);
            wt = strtof(wts + 5, NULL);
            graph_add_arc(g, (asm_sd_get(g->sdict, c0)<<1) | (s0[0]=='-'), (asm_sd_get(g->sdict, c1)<<1) | (s1[0]=='-'), -1, 0, wt);
        }
    }
    iostream_close(fp);

    graph_arc_sort(g);
    graph_arc_index(g);

    return g;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc28, %rsp            # imm = 0xC28
movq %rdi, %r15
movl $0x1, %edi
movl $0x30, %esi
callq 0x2290
movq %rax, %rbx
movq %r15, %rdi
xorl %esi, %esi
callq 0x12055
movq %rax, %rdi
callq 0x12528
movq %rax, 0x8(%rbx)
movq %r15, %rdi
callq 0x4d17
testq %rax, %rax
je 0x873c
movq %rax, %r14
movq %rax, %rdi
callq 0x4e4f
testq %rax, %rax
je 0x8703
leaq 0x820(%rsp), %r13
leaq 0x420(%rsp), %r15
cmpb $0x4c, (%rax)
jne 0x86f2
leaq 0x20(%rsp), %rcx
movq %rcx, (%rsp)
movq %rax, %rdi
leaq 0x18ceb(%rip), %rsi     # 0x21360
movq %r13, %rdx
leaq 0x14(%rsp), %rcx
movq %r15, %r8
leaq 0x10(%rsp), %r9
xorl %eax, %eax
callq 0x2350
leaq 0x25(%rsp), %rdi
xorl %esi, %esi
callq 0x21d0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x8(%rbx), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x12354
xorl %ecx, %ecx
cmpb $0x2d, 0x14(%rsp)
sete %cl
leal (%rcx,%rax,2), %r12d
movq %rbp, %rdi
movq %r15, %rsi
callq 0x12354
xorl %ecx, %ecx
cmpb $0x2d, 0x10(%rsp)
sete %cl
leal (%rcx,%rax,2), %edx
movq %rbx, %rdi
movl %r12d, %esi
movq $-0x1, %rcx
xorl %r8d, %r8d
movsd 0x18(%rsp), %xmm0
callq 0x8408
movq %r14, %rdi
callq 0x4e4f
testq %rax, %rax
jne 0x8659
movq %r14, %rdi
callq 0x4ded
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0x826f
movq %rbx, %rdi
callq 0x85bd
movq %rbx, %rax
addq $0xc28, %rsp            # imm = 0xC28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x27c4
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_clean
void graph_clean(graph_t *g, int shear)
{
    uint64_t n_arc, n;
    graph_arc_t *arc, *a;
    arc = g->arc;
    n_arc = g->n_arc;
    n = 0;
    for(a = arc; a < arc + n_arc; ++a) {
        if (!a->del) {
            memmove(arc + n, a, sizeof(graph_arc_t));
            ++n;
        }
    }
    g->n_arc = n;
#ifdef DEBUG_GRAPH_PRUNE
    fprintf(stderr, "[DEBUG_GRAPH_PRUNE::%s] graph cleaned: #arcs %lu -> %ld\n", __func__, n_arc, n);
#endif
    if (shear) {
        uint64_t m = 16;
#ifdef DEBUG_GRAPH_PRUNE
        uint64_t m_arc = g->m_arc;
#endif
        while (m < n) 
            m <<= 1;
        g->arc = (graph_arc_t *) realloc(g->arc, m * sizeof(graph_arc_t));
        g->m_arc = m;
#ifdef DEBUG_GRAPH_PRUNE
        fprintf(stderr, "[DEBUG_GRAPH_PRUNE::%s] memory sheared: #arcs %lu -> %ld\n", __func__, m_arc, m);
#endif
    }

    graph_arc_sort(g);
    graph_arc_index(g);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x8791
movq 0x20(%rbx), %rdx
shlq $0x5, %rcx
addq %rdx, %rcx
xorl %eax, %eax
movq %rdx, %rdi
testb $0x40, 0x1f(%rdi)
jne 0x8786
movq %rax, %r8
shlq $0x5, %r8
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rdx,%r8)
movups %xmm0, (%rdx,%r8)
incq %rax
addq $0x20, %rdi
cmpq %rcx, %rdi
jb 0x8764
jmp 0x8793
xorl %eax, %eax
movq %rax, 0x18(%rbx)
testl %esi, %esi
je 0x87c3
movl $0x10, %ecx
movq %rcx, %r14
addq %rcx, %rcx
cmpq %rax, %r14
jb 0x87a0
movq 0x20(%rbx), %rdi
movq %r14, %rsi
shlq $0x5, %rsi
callq 0x2390
movq %rax, 0x20(%rbx)
movq %r14, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0x826f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x85bd
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_print_gv
void graph_print_gv(const graph_t *g, FILE *fp)
{
    uint64_t k;
    char *seq;

    fprintf(fp, "digraph {\n");
    fprintf(fp, "\t{\n");
    for (k = 0; k < g->sdict->n; ++k) {
        seq = g->sdict->s[k].name;
        fprintf(fp, "\t\t\"%s%c\" [style=filled fillcolor = salmon];\n", seq, '-');
        fprintf(fp, "\t\t\"%s%c\";\n", seq, '+');
    }
    fprintf(fp, "\t}\n");
    for (k = 0; k < g->n_arc; ++k) {
        const graph_arc_t *a = &g->arc[k];
        if (a->del) 
            continue;
        fprintf(fp, "\t\"%s%c\" -> \"%s%c\"[label=\"%.3f\"];\n", g->sdict->s[a->v>>1].name, "+-"[a->v&1], g->sdict->s[a->w>>1].name, "+-"[a->w&1], a->wt);
    }
    fprintf(fp, "}\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18b79(%rip), %rdi     # 0x21377
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x24d0
leaq 0x18b6b(%rip), %rdi     # 0x21382
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x24d0
movq 0x8(%r14), %rax
cmpl $0x0, (%rax)
je 0x8886
leaq 0x18b7a(%rip), %r12     # 0x213b3
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x8(%rax), %rax
movq (%rax,%rbp), %r13
movq %rbx, %rdi
leaq 0x18b36(%rip), %rsi     # 0x21386
movq %r13, %rdx
movl $0x2d, %ecx
xorl %eax, %eax
callq 0x22c0
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x2b, %ecx
xorl %eax, %eax
callq 0x22c0
incq %r15
movq 0x8(%r14), %rax
movl (%rax), %ecx
addq $0x58, %rbp
cmpq %rcx, %r15
jb 0x883e
leaq 0x18b31(%rip), %rdi     # 0x213be
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x24d0
cmpq $0x0, 0x18(%r14)
je 0x8921
xorl %r12d, %r12d
leaq 0x18a90(%rip), %r13     # 0x21340
leaq 0x18b0b(%rip), %r15     # 0x213c2
xorl %ebp, %ebp
movq 0x20(%r14), %rax
testb $0x40, 0x1f(%rax,%r12)
jne 0x8914
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rsi
movl (%rax,%r12), %ecx
movl 0x4(%rax,%r12), %edi
movl %ecx, %edx
shrl %edx
imulq $0x58, %rdx, %rdx
movq (%rsi,%rdx), %rdx
andl $0x1, %ecx
movsbl (%rcx,%r13), %ecx
movl %edi, %r8d
shrl %r8d
imulq $0x58, %r8, %r8
movq (%rsi,%r8), %r8
andl $0x1, %edi
movsbl (%rdi,%r13), %r9d
movsd 0x10(%rax,%r12), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x22c0
incq %rbp
addq $0x20, %r12
cmpq 0x18(%r14), %rbp
jb 0x88b9
leaq 0x18a97(%rip), %rdi     # 0x213bf
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24d0
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/graph.c
// Function: graph_remove_multi_arcs
int graph_remove_multi_arcs(graph_t *g)
{
    uint32_t nv, na, v, n_del;
    graph_arc_t *av, *a, *b;

    nv = graph_n_vtx(g);
    nv <<= 1;
    n_del = 0;
    for (v = 0; v < nv; ++v) {
        na = graph_arc_n(g, v);
        if (na > 0) {
            av = graph_arc_a(g, v);
            for (a = av; a < av + na; ++a) {
                if (a->del) 
                    continue;
                for(b = a + 1; b < av + na; ++b) {
                    if (b->del) 
                        continue;
                    if (a->w == b->w) {
                        b->del = 1;
                        ++n_del;
                    }
                }
            }
        }
    }
#ifdef DEBUG_GRAPH_PRUNE
    fprintf(stderr, "[DEBUG_GRAPH_PRUNE::%s] number multi-arcs deleted: %d\n", __func__, n_del);
#endif
    graph_clean(g, 1);
    return n_del;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movl (%rax), %ecx
addl %ecx, %ecx
je 0x89d1
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movl %ecx, %ecx
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movq 0x28(%rdi), %r8
movq (%r8,%rdx,8), %r8
movq %r8, %r9
andq %rsi, %r9
je 0x89c7
shrq $0x1b, %r8
andq $-0x20, %r8
addq 0x20(%rdi), %r8
shlq $0x5, %r9
addq %r8, %r9
testq %rax, 0x18(%r8)
jne 0x89be
leaq 0x20(%r8), %r10
cmpq %r9, %r10
jae 0x89be
movq 0x18(%r10), %r11
testq %rax, %r11
jne 0x89b8
movl 0x4(%r8), %ebp
cmpl 0x4(%r10), %ebp
jne 0x89b8
orq %rax, %r11
movq %r11, 0x18(%r10)
incl %ebx
addq $0x20, %r10
jmp 0x8997
addq $0x20, %r8
cmpq %r9, %r8
jb 0x898d
incq %rdx
cmpq %rcx, %rdx
jne 0x896a
jmp 0x89d3
xorl %ebx, %ebx
movl $0x1, %esi
callq 0x8744
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq