LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/./f1.c
// Function: comma
v *
comma(fctx *cctx, struct v *f, struct v *v) 
{
    struct v *e, *l = cdr(f); 
    rplaca(l,v);
    rplacd(f,e=mkCons(0,cdr(f)));
    FPRINTF(FDBG, "%-10s: @ ",""); 
    dbgfdef(cctx, car(f), cdr(f)); FPRINTF(FDBG, "\n");
    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rsi, %rsi
je 0x5684
movq 0x10(%rbx), %r14
jmp 0x5687
xorl %r14d, %r14d
testq %r14, %r14
je 0x5690
movq %rdx, 0x8(%r14)
testq %rbx, %rbx
je 0x569b
movq 0x10(%rbx), %r15
jmp 0x569e
xorl %r15d, %r15d
movl $0x18, %edi
callq 0x10e0
andb $-0x10, (%rax)
movq $0x0, 0x8(%rax)
movq %r15, 0x10(%rax)
testq %rbx, %rbx
je 0x56c0
movq %rax, 0x10(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/./f1.c
// Function: fop_interpret
v *
fop_interpret(fctx *cctx)
{
    int lit, imm = 0; long val;
    struct v *v = next(cctx, &imm);
    if (v) {
        switch(v->tag) {
            
        case CONS:
            
            if ((cctx->w = v)) {
                if (imm || !FCTX_COMPILE(cctx)) {
                    return car(cctx->w);
                } else { /* compiling */
                    comma(cctx, cctx->here, v);
                }
            }
            return NEXT(cctx);
            break;
            
        case STR: case INT:
            
            if (FCTX_COMPILE(cctx)) {
                comma(cctx, cctx->here, g_LIT);
                comma(cctx, cctx->here, v);
            } else {
                PUSH(v);
            }
            return NEXT(cctx);
            break;
        
        case SYM:
            if (FCTX_COMPILE(cctx)) {
                comma(cctx, cctx->here, g_SYM);
                comma(cctx, cctx->here, v);
                return NEXT(cctx);
            }
            break;
            
        }
    }
    dbgprint(cctx," * ");

    if (cctx->fc >= 0) 
        return NEXT(cctx);
    else 
        return 0;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x1c(%rbp), %rsi
movl $0x0, (%rsi)
callq 0x5750
testq %rax, %rax
je 0x6047
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x6010
cmpl $0x3, %eax
je 0x603e
testl %eax, %eax
jne 0x6047
movq %r14, 0x138(%rbx)
cmpl $0x0, -0x1c(%rbp)
jne 0x60ba
testb $0x1, 0x118(%rbx)
jne 0x6076
jmp 0x60ba
testb $0x1, 0x118(%rbx)
jne 0x6053
movq 0x120(%rbx), %r15
movl $0x18, %edi
callq 0x10e0
andb $-0x10, (%rax)
movq %r14, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rax, 0x120(%rbx)
jmp 0x6085
testb $0x1, 0x118(%rbx)
jne 0x6063
cmpq $0x0, 0x90(%rbx)
jns 0x6085
jmp 0x60c0
movq 0x158(%rbx), %rsi
movq 0xc267(%rip), %rdx      # 0x122c8
jmp 0x6071
movq 0x158(%rbx), %rsi
movq 0xc25f(%rip), %rdx      # 0x122d0
callq 0x566c
movq 0x158(%rbx), %rsi
movq %r14, %rdx
callq 0x566c
movq 0x130(%rbx), %rax
testq %rax, %rax
je 0x6097
movq 0x8(%rax), %r14
jmp 0x609a
xorl %r14d, %r14d
movq %r14, 0x138(%rbx)
testq %rax, %rax
je 0x60ac
movq 0x10(%rax), %rax
jmp 0x60ae
xorl %eax, %eax
movq %rax, 0x130(%rbx)
testq %r14, %r14
je 0x60c0
movq 0x8(%r14), %rax
jmp 0x60c2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/./f1.c
// Function: key
int 
key(fctx *cctx)
{
    int c = EOF;
    if (cctx->fc >= 0) {
        while ((c = getc(cctx->f[cctx->fc])) == EOF) {
            fclose(cctx->f[cctx->fc--]);
            if (cctx->fc < 0)
                return c;
        }
    }
    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq $0x0, 0x90(%rdi)
js 0x61c0
movq %rdi, %r14
movq 0x90(%r14), %rax
movq 0x10(%r14,%rax,8), %rdi
callq 0x1170
cmpl $-0x1, %eax
jne 0x61be
movq 0x90(%r14), %rax
leaq -0x1(%rax), %rcx
movq %rcx, 0x90(%r14)
movq 0x10(%r14,%rax,8), %rdi
callq 0x1040
cmpq $0x0, 0x90(%r14)
jns 0x6180
jmp 0x61c0
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/./f1.c
// Function: fdef
v *
fdef(fctx *cctx, char *n, int cnt, ...) 
{
    va_list ap; int i, j; unsigned long b;
    va_start(ap, cnt);
    v *e, *l = mkCons(car(g_DOCOL), 0), *u;
    for (i = 0; i < cnt; i++) {
        e = (v *)va_arg(ap, v *);
        if ((b = ((unsigned long)e)-1) < 128) {
            for (j = 0, e = l; j < b; j++) {
                e = cdr(e);
            }
        }
        l = mkCons(e, l);
    }
    l = nreverse(mkCons(g_EXIT, l));
    u = unique(&cctx->lctx, n, strlen(n));
    cctx->env = mkCons(e = mkCons(u, l),cctx->env);
    va_end(ap);
    FOP_IMMEDIATE_VAL(e,1);
    CONS_WORD_VAL(l,1);
    dbgfdef(cctx, u, l);
    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, -0x58(%rbp)
movq %rdi, -0x60(%rbp)
leaq -0x120(%rbp), %rdx
movq %rcx, 0x18(%rdx)
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0x78e4
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
movq %rdx, -0x40(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, -0x50(%rbp)
movq 0xa9b3(%rip), %rax      # 0x122b8
testq %rax, %rax
je 0x7910
movq 0x8(%rax), %rbx
jmp 0x7912
xorl %ebx, %ebx
movl $0x18, %edi
callq 0x10e0
movq %rax, %r15
andb $-0x10, (%rax)
movq %rbx, 0x8(%rax)
movq $0x0, 0x10(%rax)
cmpl $0x0, -0x2c(%rbp)
jle 0x79c9
movl -0x50(%rbp), %r14d
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
xorl %ebx, %ebx
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x28, %r14d
ja 0x7965
movl %r14d, %eax
addq -0x68(%rbp), %rax
addl $0x8, %r14d
movl %r14d, -0x50(%rbp)
jmp 0x7978
movq -0x38(%rbp), %rcx
movq %rcx, %rax
addq $0x8, %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, -0x38(%rbp)
movq (%rax), %r12
leaq -0x1(%r12), %rax
cmpq $0x7f, %rax
ja 0x79a5
movq %r15, %r12
testq %rax, %rax
je 0x79a5
movq %r15, %r12
testq %r12, %r12
je 0x799d
movq 0x10(%r12), %r12
jmp 0x79a0
xorl %r12d, %r12d
decq %rax
jne 0x7991
movl $0x18, %edi
callq 0x10e0
movq %rax, %r13
andb $-0x10, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
incl %ebx
movq %rax, %r15
cmpl -0x2c(%rbp), %ebx
jne 0x794e
jmp 0x79cc
movq %r15, %r13
movq 0xa8ed(%rip), %rbx      # 0x122c0
movl $0x18, %edi
callq 0x10e0
movq %rax, %r15
andb $-0x10, (%rax)
movq %rbx, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rax, %rdi
callq 0x2714
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x1050
movq -0x60(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x25f6
movq %rax, %r14
movl $0x18, %edi
callq 0x10e0
movq %rax, %r12
andb $-0x10, (%rax)
movq %r14, 0x8(%rax)
movq %r15, 0x10(%rax)
movq 0x148(%r13), %rbx
movl $0x18, %edi
callq 0x10e0
andb $-0x10, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rax, 0x148(%r13)
orb $-0x80, (%r12)
orb $0x1, 0x1(%r15)
movq %r15, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/./f1.c
// Function: word
v *
word(fctx *cctx)
{
    int c, l = 0, bc = 0; char *n = 0; v *s;
retry:
    while(strchr(" \n\t",(c = key(cctx))));
    if (c == '(') { /* eat comments */
        cctx->b[l++] = c; 
        if (strchr(" \t",(c = key(cctx)))) {
            l--; bc = 1;
            do { 
                c = key(cctx);
                switch(c) {
                case ')': bc--; break;
                case '(': bc++; break;
                };
            } while(!(bc <= 0 || c == EOF));
            goto retry;
        };
    } else if (c == '\\') {
        do {
            c = key(cctx);
        } while(!(c == '\n' || c == EOF));
        goto retry;
    } 
    do {
        cctx->b[l++] = c; 
        c = key(cctx);
    } while(!(c == ' ' || c == '\n' || c == EOF));
    s = unique(&cctx->lctx, cctx->b, l);
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1189(%rip), %r15      # 0xe3c6
xorl %r14d, %r14d
leaq 0x1183(%rip), %r12      # 0xe3ca
movq %rbx, %rdi
callq 0x6167
movl %eax, %r13d
movl $0x4, %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x1090
testq %rax, %rax
jne 0xd247
cmpl $0x28, %r13d
je 0xd286
cmpl $0x5c, %r13d
jne 0xd2e5
movq %rbx, %rdi
callq 0x6167
cmpl $-0x1, %eax
je 0xd247
cmpl $0xa, %eax
jne 0xd272
jmp 0xd247
movb $0x28, 0x98(%rbx)
movq %rbx, %rdi
callq 0x6167
movl %eax, %r13d
movl $0x3, %edx
movq %r12, %rdi
movl %eax, %esi
callq 0x1090
testq %rax, %rax
je 0xd2df
movl $0x1, %r13d
movq %rbx, %rdi
callq 0x6167
cmpl $0x28, %eax
je 0xd2c9
cmpl $0x29, %eax
jne 0xd2cc
decl %r13d
jmp 0xd2cc
incl %r13d
cmpl $-0x1, %eax
je 0xd247
testl %r13d, %r13d
jg 0xd2b2
jmp 0xd247
movl $0x1, %r14d
leaq 0x98(%rbx), %r15
movabsq $0x200000801, %r12      # imm = 0x200000801
movb %r13b, 0x98(%rbx,%r14)
incq %r14
movq %rbx, %rdi
callq 0x6167
movl %eax, %r13d
incl %eax
cmpl $0x21, %eax
ja 0xd2f6
btq %rax, %r12
jae 0xd2f6
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x25f6
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/./f1.c
// Function: find
v *
find(fctx *cctx, v *s)
{
    v *e = 0;
    if ((e = assq(s, cctx->env))) {
        return (e);
    }
    return 0;
}

// Assembly:
movq 0x148(%rdi), %rcx
testq %rcx, %rcx
je 0xd368
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0xd354
movq 0x8(%rax), %rdx
jmp 0xd356
xorl %edx, %edx
cmpq %rsi, %rdx
je 0xd366
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0xd345
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/eiselekd[P]MinimalLisp/f.c
// Function: main
int
main(int argc, char **argv) 
{
    fctx cctx; int c, i; FILE *f; char v[32];
    struct v *fx = 0, *r;
    memset(&cctx,0,sizeof(cctx));

    atexit(colreset);
    signal(SIGINT, sigint);
    
    /* input */
    cctx.f[cctx.fc = 0] = stdin;
    for (i = argc-1; i >= 1; i--) {
        if (f = fopen(argv[i],"r")) {
            cctx.f[++cctx.fc] = f;
        }
    }
    
    f_init(&cctx) ;
    
    r = mkCons(g_QUIT, 0);
    cctx.ip = r;
    fx = NEXT(&cctx);
    
    /* main loop */
    while(fx) {
        fx = fop(fx)(&cctx);
    }

    fprintf(FDBG, "[39m"); /* col def */
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x190(%rbp), %r15
movl $0x178, %edx            # imm = 0x178
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
leaq -0x58(%rip), %rdi       # 0xd376
callq 0xd4d0
leaq -0x6f(%rip), %rsi       # 0xd36b
movl $0x2, %edi
callq 0x10a0
movq 0x4bed(%rip), %rax      # 0x11fd8
movq (%rax), %rax
movq $0x0, 0x90(%r15)
movq %rax, 0x10(%r15)
cmpl $0x2, %r14d
jl 0xd445
movl %r14d, %r15d
incq %r15
leaq 0xf2d(%rip), %r14       # 0xe33d
movq -0x10(%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x1120
testq %rax, %rax
je 0xd43c
movq -0x100(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, -0x100(%rbp)
movq %rax, -0x178(%rbp,%rcx,8)
decq %r15
cmpq $0x2, %r15
jg 0xd410
leaq -0x190(%rbp), %rbx
movq %rbx, %rdi
callq 0x7a6d
movq 0x519d(%rip), %r14      # 0x125f8
movl $0x18, %edi
callq 0x10e0
movq %rax, %rcx
andb $-0x10, (%rax)
movq %r14, 0x8(%rax)
xorl %eax, %eax
movq %rax, 0x10(%rcx)
movq %r14, 0x138(%rbx)
movq %rax, 0x130(%rbx)
testq %r14, %r14
je 0xd494
movq 0x8(%r14), %rax
jmp 0xd494
movq %rbx, %rdi
callq *0x8(%rax)
testq %rax, %rax
jne 0xd48e
movq 0x4b30(%rip), %rax      # 0x11fd0
movq (%rax), %rcx
leaq 0xf33(%rip), %rdi       # 0xe3dd
movl $0x5, %esi
movl $0x1, %edx
callq 0x1160
xorl %eax, %eax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/6-Memory/constant_array.c
// Function: main
int main(void) {
	char string[]  = "hello";  //you initialized a local array in the stack, which is not read-only
	printf("\"hello\"      = %p\n", "hello");
	printf("String pointer = %p\n", string);
	string[4] = '\0';
	printf("Go to %s\n", string);
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movw $0x6f, 0x4(%rbx)
movl $0x6c6c6568, (%rbx)     # imm = 0x6C6C6568
leaq 0xebe(%rip), %rsi       # 0x2017
leaq 0xea4(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1030
leaq 0xeaf(%rip), %rdi       # 0x201d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
movb $0x0, 0x4(%rbx)
leaq 0xeaf(%rip), %rdi       # 0x2032
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_int_atomic_set.c
// Function: shmem_int_atomic_set
void shmem_int_atomic_set( int* ptr, int val, int pe)
{
	int* remote_ptr = (int*)shmem_ptr((void*)ptr, pe ); 
	long* x = (long*)shmem_ptr((void*)&__shmem.lock_atomic_int, pe);
	__set_spin_lock(x);
	*remote_ptr = val;
	__clear_spin_lock(x);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movl %edx, %esi
callq 0x1c20
movq %rax, %r14
leaq 0x327b(%rip), %rdi      # 0x61f0
addq $0x10, %rdi
movl %ebx, %esi
callq 0x1c20
movq %rax, %rbx
movq %rax, %rdi
callq 0x3217
movl %ebp, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3208
nop
// File: /workspace/github_c_makefile_star2_O1/vusec[P]fpvi-scsb/fp_reverse_engineering/find_operands/find_operands.c
// Function: main
int main(int argc, char **argv)
{
    uint64_t target;

    if (argc < 2)
    {
        printf("Usage: %s <pointer in hex>\n", argv[0]);
        return -1;
    }

    sscanf(argv[1], "0x%lx", &target);
    target = target & 0x00007ffffffffffULL;
    printf("Finding X,Y for target 0x%016lx\n", target);

    uint64_t yh = 0x0000000000000001ULL;
    double   y  = *((double *) &yh);

    //0xfffb is String tag
    uint64_t xh = 0xbffb000000000000ULL;
    xh = xh | (target & 0x00007ffffffffff0ULL);
    double   x  = *((double *) &xh);

    uint64_t offset = target & 0xfULL;
    if(offset == 0ULL) {
        xh |= 0x7ULL;
    } else if(offset == 8ULL) {
        xh |= 0xfULL;
    } else {
        printf("Only target addresses ending i 0x0 or 0x8 are supported\n");
        return -1;
    }

    printf("X = 0x%016lx\t%.16e\n", xh, x);
    printf("Y = 0x%016lx\t%.16e\n", yh, y);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jg 0x1181
movq (%rsi), %rsi
leaq 0xe9b(%rip), %rdi       # 0x2010
xorl %eax, %eax
callq 0x1040
jmp 0x122e
movabsq $-0x4005000000000000, %r15 # imm = 0xBFFB000000000000
movq 0x8(%rsi), %rdi
leaq 0xe96(%rip), %rsi       # 0x202c
xorl %ebx, %ebx
leaq -0x20(%rbp), %r14
movq %r14, %rdx
xorl %eax, %eax
callq 0x1050
movabsq $0x7ffffffffff, %rsi    # imm = 0x7FFFFFFFFFF
andq (%r14), %rsi
movq %rsi, (%r14)
leaq 0xe75(%rip), %rdi       # 0x2032
xorl %eax, %eax
callq 0x1040
movq (%r14), %rsi
movq %rsi, %rax
andq $0xf, %rax
je 0x11db
cmpl $0x8, %eax
jne 0x1222
leaq 0xf(%r15), %rax
jmp 0x11df
leaq 0x7(%r15), %rax
movabsq $0x7ffffffffff0, %rcx   # imm = 0x7FFFFFFFFFF0
andq %rcx, %rsi
orq %rsi, %r15
movq %r15, %xmm0
orq %rax, %rsi
leaq 0xe55(%rip), %rdi       # 0x2053
movb $0x1, %al
callq 0x1040
leaq 0xe5b(%rip), %rdi       # 0x2067
movsd 0xdf4(%rip), %xmm0      # 0x2008
movl $0x1, %esi
movb $0x1, %al
callq 0x1040
jmp 0x1233
leaq 0xe52(%rip), %rdi       # 0x207b
callq 0x1030
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/4-ProcessKernel/time_example.c
// Function: main
int main(int argc, char **argv) {
	int i, is_printf;
	double x = 0;

	if(argc != 2) {
		print_usage(argv[0]);
		exit(1);
	}

	is_printf = atoi(argv[1]);
	if(is_printf != 0 && is_printf != 1) {
		print_usage(argv[0]);
		exit(1);
	}

	for(i = 1; i <= 1000000; i++) {
		x += i;
		if(is_printf == 1)
			printf("x = %.0f\n", x);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
cmpl $0x2, %edi
jne 0x1230
movq 0x8(%r14), %rdi
callq 0x1050
cmpl $0x1, %eax
ja 0x1238
movl %eax, %ebx
movsd 0xe34(%rip), %xmm0      # 0x2008
xorpd %xmm1, %xmm1
movl $0xf4240, %ebp          # imm = 0xF4240
leaq 0xe6f(%rip), %r14       # 0x2053
movapd %xmm0, %xmm2
addsd %xmm2, %xmm1
cmpl $0x1, %ebx
jne 0x121d
movq %r14, %rdi
movapd %xmm1, %xmm0
movb $0x1, %al
movsd %xmm1, 0x8(%rsp)
movsd %xmm2, (%rsp)
callq 0x1030
movsd (%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
movsd 0xdeb(%rip), %xmm0      # 0x2008
addsd %xmm0, %xmm2
decl %ebp
jne 0x11e8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x109b
movq %r14, %rdi
callq 0x10ac
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/test2.c
// Function: vmtest
void vmtest (int n, vm_mode_t trace) {
    int codelen = sizeof(code)/sizeof(Bcode);
    Function f = new_function(1, 0, code + 10, codelen - 10);
    gv[0] = (Value)n;
    gv[1] = (Value)f;

    vm(code, codelen, vs_base, VS_SIZE, gv, GV_SIZE, trace);

    delete_function(f);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x2817(%rip), %rdx      # 0x407a
movl $0x1, %edi
movl $0x15, %ecx
xorl %esi, %esi
callq 0x15bc
movq %rax, %r14
leaq 0x27f2(%rip), %rdi      # 0x4070
movslq %ebp, %rax
movq %rax, 0x2818(%rip)      # 0x40a0
leaq 0x2811(%rip), %r8       # 0x40a0
movq %r14, 0x2812(%rip)      # 0x40a8
movl %ebx, (%rsp)
leaq 0x3040(%rip), %rdx      # 0x48e0
movl $0x1f, %esi
movl $0x100, %ecx            # imm = 0x100
movl $0x8, %r9d
callq 0x121c
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x15ff
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/fssort.c
// Function: main
int main(int argc, char * argv[]) {
    struct _fst * fst = fst_create(); 
    const char * ifilename = NULL; 
    const char * ofilename = NULL;
    FILE * fin = stdin;
    FILE * fout = stdout;
    int sort_outer = 0;
    int c;

    while ( (c = getopt(argc, argv, "ioh")) != -1 ) {
        switch(c) {
            case 'i': 
                sort_outer = 0;
                break;
            case 'o': 
                sort_outer = 1;
                break;
            default:
                fprintf(stderr, "Usage: %s [-o] [input_file] [output_file]\n", argv[0]);
                exit(EXIT_SUCCESS);
        } 
    }

    if (optind < argc)
        ifilename = argv[optind];
    if (optind+1 < argc)
        ofilename = argv[optind+1];
    
    if (ifilename) {
        if (( fin = fopen(ifilename, "rb")) == NULL ) {
            fprintf(stderr, "Error opening file: %s", ifilename);
            exit(EXIT_FAILURE);
        }
    }

    if (ofilename) {
        if (( fout = fopen(ofilename, "w")) == NULL ) {
            fprintf(stderr, "Error opening file: %s", ofilename);
            exit(EXIT_FAILURE);
        }
    }

    fst_read(fst, fin);
    fst_arc_sort(fst, sort_outer);
    fst_write(fst, fout);
    fst_remove(fst);
    
    if (fin != stdout) {
        fclose(fin);
    }

    if (fout != stdout) {
        fclose(fout);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movl %edi, %ebx
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x2124
movq %rax, -0x38(%rbp)
movq 0x3d31(%rip), %rax      # 0x8fd0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq 0x3d1b(%rip), %rax      # 0x8fc8
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq 0x14bb(%rip), %r15      # 0x6776
movl %r12d, %r14d
movl %ebx, %edi
movq %r13, %rsi
movq %r15, %rdx
callq 0x11a0
movl $0x0, %r12d
cmpl $0x69, %eax
je 0x52bb
cmpl $0x6f, %eax
jne 0x52e3
movl $0x1, %r12d
jmp 0x52bb
cmpl $-0x1, %eax
jne 0x53b8
movq 0x3ce5(%rip), %rax      # 0x8fd8
movslq (%rax), %rax
cmpl %ebx, %eax
jge 0x5301
movq (%r13,%rax,8), %r15
jmp 0x5304
xorl %r15d, %r15d
incl %eax
cmpl %ebx, %eax
jge 0x5313
cltq
movq (%r13,%rax,8), %rbx
jmp 0x5315
xorl %ebx, %ebx
movq -0x30(%rbp), %r12
testq %r15, %r15
je 0x5339
leaq 0xda9(%rip), %rsi       # 0x60ce
movq %r15, %rdi
callq 0x1180
movq %rax, %r12
testq %rax, %rax
je 0x53c0
testq %rbx, %rbx
movq -0x40(%rbp), %r15
je 0x5359
leaq 0x145c(%rip), %rsi      # 0x67a5
movq %rbx, %rdi
callq 0x1180
movq %rax, %r15
testq %rax, %rax
je 0x53c8
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x23dd
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2d4c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22c2
movq %rbx, %rdi
callq 0x2222
movq 0x3c3b(%rip), %rbx      # 0x8fc8
cmpq (%rbx), %r12
je 0x539a
movq %r12, %rdi
callq 0x1090
cmpq (%rbx), %r15
je 0x53a7
movq %r15, %rdi
callq 0x1090
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x131b
movq %r15, %rdi
callq 0x12cd
movq %rbx, %rdi
callq 0x12f4
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_3/3.4/fork-exec.c
// Function: spawn(char*, char**)
int spawn (char* program, char** arg_list)
	{
	pid_t child_pid;
	/* Duplicate this process. */
	child_pid = fork ();
	if (child_pid != 0)
	/* This is the parent process. */
	return child_pid;
	else {
		/* Now execute PROGRAM, searching for it in the path. */
		execvp (program, arg_list);
		/* The execvp function returns only if an error occurs. */
		fprintf (stderr, "an error occurred in execvp\n");
		abort ();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1030
testl %eax, %eax
je 0x11c7
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_3/3.4/fork-exec.c
// Function: main
int main ()
{
	/* The argument list to pass to the "ls" command. */
	char* arg_list[] = {
		"ls", /* argv[0], the name of the program. */
		"-l",
		"/",
		NULL  /* The argument list must end with a NULL. */
	};
	/* Spawn a child process running the "ls" command. Ignore the returned child process ID. */
	spawn ("ls", arg_list);
	printf ("done with main program\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movaps 0x2bcf(%rip), %xmm0     # 0x3db0
leaq -0x20(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps 0x2bb0(%rip), %xmm0     # 0x3da0
movaps %xmm0, (%rsi)
leaq 0xe27(%rip), %rdi       # 0x2021
callq 0x11ac
leaq 0xe23(%rip), %rdi       # 0x2029
callq 0x1060
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: changeState(Thread*, char, bool)
void changeState(struct Thread* t, char statebit, bool op){
    char truebit = statebit;

    if(op){ // add a state
        if(t->state & truebit){} // already has the state
        else
            t->state += truebit;
    }else{
        if(t->state & truebit)
            t->state -= truebit;
        else{} // already lose the state
    }
}

// Assembly:
movb (%rdi), %al
testl %edx, %edx
je 0xdf48
testb %sil, %al
je 0xdf52
retq
testb %sil, %al
je 0xdf47
subb %sil, %al
jmp 0xdf55
addb %sil, %al
movb %al, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_resolve_state[abi:cxx11](char)
string unq_resolve_state(char state){
    string ret = "";
    
    ret += state & NORMAL_DISPLAY ? "Normal," : "Deleted,";
    ret += state & MAIN_THREAD ? "Thread," : "";
    ret += state & THREAD_REPLY ? "Reply," : "";
    ret += state & SAGE_THREAD ? "Sage," : "";
    ret += state & LOCKED_THREAD ? "Locked," : "";

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x6b6f5(%rip), %r14     # 0x79667
movq %r14, %rsi
movq %r14, %rdx
callq 0xedfa
testb $0x1, %bpl
leaq 0x65084(%rip), %rax     # 0x7300c
leaq 0x65075(%rip), %rsi     # 0x73004
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0xc790
testb $0x4, %bpl
leaq 0x6506f(%rip), %rsi     # 0x73015
cmoveq %r14, %rsi
movq %rbx, %rdi
callq 0xc790
testb $0x2, %bpl
leaq 0x65060(%rip), %rsi     # 0x7301d
cmoveq %r14, %rsi
movq %rbx, %rdi
callq 0xc790
testb $0x10, %bpl
leaq 0x65050(%rip), %rsi     # 0x73024
cmoveq %r14, %rsi
movq %rbx, %rdi
callq 0xc790
testb %bpl, %bpl
leaq 0x65040(%rip), %rsi     # 0x7302a
cmovnsq %r14, %rsi
movq %rbx, %rdi
callq 0xc790
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xe014
callq 0xc640
movq %r14, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_reset(unqlite*)
int unq_reset(unqlite *pDb){
    int rc = unq_write_int(pDb, "global_counter", 0, true);
    if (!rc) return 0;

    //construct the root thread
    cclong *key = new cclong(0);
    struct Thread *t = new Thread();
    t->threadID = 0;
    //t->state = 'r';
    t->nextThread = 0;
    t->childCount = 0;

    strcpy(t->content, "slogan");

    rc = unqlite_kv_store(pDb, key, 4, t, sizeof(struct Thread));
    if (rc != UNQLITE_OK)
        return 0;
    else{
        unqlite_commit(pDb);
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x65005(%rip), %rsi     # 0x73032
xorl %ebp, %ebp
xorl %edx, %edx
movl $0x1, %ecx
callq 0xe0b7
testl %eax, %eax
je 0xe0aa
movl $0x4, %edi
callq 0xc1d0
movq %rax, %r14
movl $0x0, (%rax)
movl $0xd0, %edi
callq 0xc1d0
movq %rax, %r15
xorl %ebp, %ebp
movl $0xd0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0xc360
movl $0x676f6c73, 0x1(%r15)  # imm = 0x676F6C73
movl $0x6e6167, 0x4(%r15)    # imm = 0x6E6167
movl $0xd0, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movl $0x4, %edx
movq %r15, %rcx
callq 0x319b2
testl %eax, %eax
jne 0xe0aa
movq %rbx, %rdi
callq 0x32eb6
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_write_int(unqlite*, char const*, int, bool)
int unq_write_int(unqlite *pDb, const char* key, int value, bool autoCommit){
    int* zzz = new cclong(value);
    int rc;
    rc = unqlite_kv_store(pDb, key, -1, zzz, 4);
    delete zzz;

    if (rc != UNQLITE_OK)
        return 0;
    else{
        if(autoCommit) unqlite_commit(pDb);
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl $0x4, %edi
callq 0xc1d0
movq %rax, %r12
movl %r14d, (%rax)
movl $0x4, %r8d
movq %rbx, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rax, %rcx
callq 0x319b2
movl %eax, %r14d
movq %r12, %rdi
callq 0xc640
xorl %eax, %eax
testl %r14d, %r14d
sete %cl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0xe11e
movq %rbx, %rdi
callq 0x32eb6
movl $0x1, %eax
jmp 0xe120
movb %cl, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_thread_parent(unqlite*, Thread*)
int unq_thread_parent(unqlite *pDb, struct Thread* b){
    // struct Thread* b = unq_read_thread(pDb, startID);
    int startID = b->threadID;
    if (!(b->state & NORMAL_DISPLAY)) return -1;
    if (b->state & MAIN_THREAD) return 0;
    if (b->parentThread) return b->parentThread;

    while (b->nextThread != startID){
        b = unq_read_thread(pDb, b->nextThread);
        if (b->parentThread) return b->parentThread;
    }

    return 0;
}

// Assembly:
movzbl (%rsi), %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
je 0xe17e
testb $0x4, %dl
jne 0xe172
movq %rsi, %rax
movl 0xc8(%rsi), %ecx
testl %ecx, %ecx
jne 0xe17e
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xb8(%rax), %ebp
movl 0xbc(%rax), %esi
cmpl %ebp, %esi
je 0xe176
movq %rbx, %rdi
callq 0xe181
movl 0xc8(%rax), %ecx
testl %ecx, %ecx
je 0xe154
jmp 0xe178
xorl %ecx, %ecx
jmp 0xe17e
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_read_thread(unqlite*, int)
struct Thread* unq_read_thread(unqlite *pDb, int key){
    unqlite_int64 nBytes = sizeof(struct Thread);
    // cclong *k = new cclong(key);
    int k = key;

    int rc;
    struct Thread* zBuf = new Thread();

    rc = unqlite_kv_fetch(pDb, &k, 4, zBuf, &nBytes);
    
    // delete k;
    //even the fetch function failed, we return an empty structure

    return zBuf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq $0xd0, (%r14)
leaq 0xc(%rsp), %r15
movl %esi, (%r15)
movl $0xd0, %edi
callq 0xc1d0
movq %rax, %r12
movl $0xd0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0xc360
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x32133
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_delete_thread(unqlite*, int)
int unq_delete_thread(unqlite *pDb, int tid){
    // cchan will never truely delete a thread, it just hides it
    struct Thread* t = unq_read_thread(pDb, tid);
    struct Thread* tp = unq_read_thread(pDb, t->prevThread);
    struct Thread* tn = unq_read_thread(pDb, t->nextThread);

    if (!(t->state & NORMAL_DISPLAY)) return 0;

    if (t->parentThread == 0 && t->state & MAIN_THREAD){
        tn->prevThread = t->prevThread;
        tp->nextThread = t->nextThread;

        if (t->prevThread == t->nextThread){
            //this happens only if the thread has one child reply
            tn->nextThread = tn->threadID;
            unq_write_thread(pDb, tn->threadID, tn, false);
        }
        else{
            unq_write_thread(pDb, tn->threadID, tn, false);
            unq_write_thread(pDb, tp->threadID, tp, false);
        }

        //t->state = 'd';
        //t->state -= NORMAL_DISPLAY;
        changeState(t, NORMAL_DISPLAY, false);
        unq_write_thread(pDb, t->threadID, t, false);
    }

    if (!(t->state & MAIN_THREAD)){
        changeState(t, NORMAL_DISPLAY, false);
        unq_write_thread(pDb, t->threadID, t, false);
    }

    unqlite_commit(pDb);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe181
movq %rax, %r14
movl 0xc0(%rax), %esi
movq %rbx, %rdi
callq 0xe181
movq %rax, %r15
movl 0xbc(%r14), %esi
movq %rbx, %rdi
callq 0xe181
movzbl (%r14), %edx
xorl %ecx, %ecx
testb $0x1, %dl
je 0xe347
testb $0x4, %dl
je 0xe306
cmpl $0x0, 0xc8(%r14)
jne 0xe306
movl 0xc0(%r14), %ecx
movl %ecx, 0xc0(%rax)
movl 0xbc(%r14), %ecx
movl %ecx, 0xbc(%r15)
movl 0xc0(%r14), %edx
movl 0xb8(%rax), %ecx
cmpl 0xbc(%r14), %edx
jne 0xe28e
movl %ecx, 0xbc(%rax)
leaq 0x4(%rsp), %rsi
movl %ecx, (%rsi)
movl $0xd0, %r8d
movq %rbx, %rdi
movl $0x4, %edx
movq %rax, %rcx
jmp 0xe2d1
leaq 0x4(%rsp), %r12
movl %ecx, (%r12)
movl $0xd0, %r8d
movq %rbx, %rdi
movq %r12, %rsi
movl $0x4, %edx
movq %rax, %rcx
callq 0x319b2
movl 0xb8(%r15), %eax
movl %eax, (%r12)
leaq 0x4(%rsp), %rsi
movl $0xd0, %r8d
movq %rbx, %rdi
movl $0x4, %edx
movq %r15, %rcx
callq 0x319b2
movb (%r14), %al
testb $0x1, %al
je 0xe2e2
decb %al
movb %al, (%r14)
movl 0xb8(%r14), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0xd0, %r8d
movq %rbx, %rdi
movl $0x4, %edx
movq %r14, %rcx
callq 0x319b2
movb (%r14), %al
testb $0x4, %al
jne 0xe33a
testb $0x1, %al
je 0xe316
decb %al
movb %al, (%r14)
movl 0xb8(%r14), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0xd0, %r8d
movq %rbx, %rdi
movl $0x4, %edx
movq %r14, %rcx
callq 0x319b2
movq %rbx, %rdi
callq 0x32eb6
movl $0x1, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_write_thread(unqlite*, int, Thread*, bool)
int unq_write_thread(unqlite *pDb, cclong key, struct Thread* t, bool autoCommit){
    
    int k = key;
    int rc;
    rc = unqlite_kv_store(pDb, &k, 4, t, sizeof(struct Thread));

    if (rc != UNQLITE_OK)
        return 0;
    else{
        if (autoCommit) unqlite_commit(pDb);
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rcx
movq %rdi, %rbx
leaq 0x4(%rsp), %rax
movl %esi, (%rax)
movl $0xd0, %r8d
movq %rax, %rsi
movl $0x4, %edx
callq 0x319b2
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %cl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0xe39b
movq %rbx, %rdi
callq 0x32eb6
movl $0x1, %eax
jmp 0xe39d
movb %cl, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_write_string(unqlite*, char const*, char const*, bool)
int unq_write_string(unqlite *pDb, const char* key, const char* value, bool autoCommit){
    int rc;
    rc = unqlite_kv_store_fmt(pDb, key, -1, value); //simple
    if (rc != UNQLITE_OK)
        return 0;
    else{
        if (autoCommit) unqlite_commit(pDb);
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rcx
movq %rdi, %rbx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x31b64
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %cl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0xe5cf
movq %rbx, %rdi
callq 0x32eb6
movl $0x1, %eax
jmp 0xe5d1
movb %cl, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: displayReply(unqlite*, Thread*)
int displayReply(unqlite *pDb, struct Thread *t){
    cclong ct = t->childThread;
    struct Thread *r = unq_read_thread(pDb, ct); // beginning of the circle
    cclong rid = r->threadID; //the ID

    struct tm * timeinfo;
    timeinfo = localtime(&(r->date));
    fprintf(stdout, "  %d Reply(s)\n", r->childCount);
    fprintf(stdout, "  Reply-ID: %d, Author: %s, Date: %s  %s\n", rid, r->author, asctime(timeinfo), unq_read_string(pDb, r->content));

    while (r->prevThread != rid){
        r = unq_read_thread(pDb, r->prevThread);
        timeinfo = localtime(&(r->date));
        fprintf(stdout, "  Reply-ID: %d, Author: %s, Date: %s  %s\n", r->threadID, r->author, asctime(timeinfo), unq_read_string(pDb, r->content));
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc4(%rsi), %esi
callq 0xe181
movq %rax, %r14
movl 0xb8(%rax), %ebp
leaq 0xa0(%rax), %rdi
callq 0xc770
movq %rax, %r15
movq 0x8753c(%rip), %r12     # 0x95fa0
movq (%r12), %rdi
movl 0xcc(%r14), %edx
leaq 0x645cb(%rip), %rsi     # 0x73041
xorl %eax, %eax
callq 0xc260
movq (%r12), %r12
leaq 0x11(%r14), %r13
movq %r15, %rdi
callq 0xc520
movq %rax, %r15
leaq 0x1(%r14), %rsi
movq %rbx, %rdi
callq 0xeb4e
leaq 0x645ad(%rip), %rsi     # 0x73050
movq %r12, %rdi
movl %ebp, %edx
movq %r13, %rcx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xc260
movl 0xc0(%r14), %esi
cmpl %ebp, %esi
je 0xeb3a
movq %rbx, %rdi
callq 0xe181
movq %rax, %r15
leaq 0xa0(%rax), %rdi
callq 0xc770
movq 0x874bf(%rip), %rcx     # 0x95fa0
movq (%rcx), %r12
movl 0xb8(%r15), %r13d
leaq 0x11(%r15), %rcx
movq %rcx, (%rsp)
movq %rax, %rdi
callq 0xc520
movl %ebp, %r14d
movq %rax, %rbp
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
callq 0xeb4e
movq %r12, %rdi
leaq 0x64539(%rip), %rsi     # 0x73050
movl %r13d, %edx
movq (%rsp), %rcx
movq %rbp, %r8
movl %r14d, %ebp
movq %rax, %r9
xorl %eax, %eax
callq 0xc260
movl 0xc0(%r15), %esi
cmpl %r14d, %esi
jne 0xeac3
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_read_string(unqlite*, char const*)
const char* unq_read_string(unqlite *pDb, const char* key){
    unqlite_int64 nBytes;
    int rc;
    rc = unqlite_kv_fetch(pDb, key, -1, NULL, &nBytes);
    if (rc != UNQLITE_OK)
        return 0;

    char *zBuf = new char[++nBytes];
    if (zBuf == NULL) 
        return 0;

    rc = unqlite_kv_fetch(pDb, key, -1, zBuf, &nBytes);
    if (rc != UNQLITE_OK)
        return 0;

    zBuf[nBytes] = 0;

    return zBuf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
movq %rsp, %r8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x32133
testl %eax, %eax
jne 0xebbd
movq %rsp, %r12
movq (%r12), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r12)
cmpq $-0x1, %rax
movq $-0x1, %rdi
cmovgeq %rcx, %rdi
callq 0xc560
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rax, %rcx
movq %r12, %r8
callq 0x32133
testl %eax, %eax
je 0xebb5
xorl %ebx, %ebx
jmp 0xebbd
movq (%rsp), %rax
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: listThread(unqlite*)
int listThread(unqlite *pDb){
    struct Thread *r = unq_read_thread(pDb, 0); // get the root thread
    //iterThread(pDb, r);

    while (r->nextThread){
        r = unq_read_thread(pDb, r->nextThread);

        struct tm * timeinfo;
        timeinfo = localtime(&(r->date));
        fprintf(stdout, "ID: %d, Author: %s, Date: %s%s\n", r->threadID, r->author, asctime(timeinfo), unq_read_string(pDb, r->content));

        if (r->childThread) displayReply(pDb, r);
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0xe181
movl 0xbc(%rax), %esi
testl %esi, %esi
je 0xec6f
movq %rbx, %rdi
callq 0xe181
movq %rax, %r15
leaq 0xa0(%rax), %rdi
callq 0xc770
movq 0x87393(%rip), %rcx     # 0x95fa0
movq (%rcx), %r12
movl 0xb8(%r15), %ebp
leaq 0x11(%r15), %r13
movq %rax, %rdi
callq 0xc520
movq %rax, %r14
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
callq 0xeb4e
movq %r12, %rdi
leaq 0x6443e(%rip), %rsi     # 0x7307a
movl %ebp, %edx
movq %r13, %rcx
movq %r14, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xc260
cmpl $0x0, 0xc4(%r15)
je 0xec63
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea2c
movl 0xbc(%r15), %esi
jmp 0xebe7
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_read_int(unqlite*, int)
int unq_read_int(unqlite *pDb, int key){
    unqlite_int64 nBytes = 4;
    int *k = new int(key);
    int rc;
    int* zBuf = new int(0);

    rc = unqlite_kv_fetch(pDb, k, 4, zBuf, &nBytes);
    delete k;

    // if (rc != UNQLITE_OK)
    //  return 0;

    return *zBuf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movq $0x4, (%r15)
movl $0x4, %edi
callq 0xc1d0
movq %rax, %r12
movl %ebx, (%rax)
movl $0x4, %edi
callq 0xc1d0
movq %rax, %rbx
movl $0x0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
movl $0x4, %edx
movq %rax, %rcx
movq %r15, %r8
callq 0x32133
movq %r12, %rdi
callq 0xc640
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/general.cpp
// Function: unq_read_thread_sp(unqlite*, int)
std::shared_ptr<struct Thread> unq_read_thread_sp(unqlite * pDb, int key)
{
    unqlite_int64 nBytes = sizeof(struct Thread);
    std::shared_ptr<struct Thread> ret = std::shared_ptr<struct Thread>(new Thread());

    unqlite_kv_fetch(pDb, &key, 4, ret.get(), &nBytes);

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc(%rsp), %r12
movl %edx, (%r12)
leaq 0x10(%rsp), %r13
movq $0xd0, (%r13)
movl $0xd0, %edi
callq 0xc1d0
movq %rax, %rbp
movl $0xd0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0xc360
movq %rbp, (%rbx)
leaq 0x8(%rbx), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0xee8a
movq (%rbx), %rcx
movq %r15, %rdi
movq %r12, %rsi
movl $0x4, %edx
movq %r13, %r8
callq 0x32133
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0xed78
callq 0xed80
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/helper.cpp
// Function: cck_extract_ssid[abi:cxx11](mg_connection*)
string cck_extract_ssid(mg_connection* conn){
    char ssid[128]; 
    mg_parse_header(mg_get_header(conn, "Cookie"), "ssid", ssid, sizeof(ssid));
    string ret(ssid);

    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x641ca(%rip), %rsi     # 0x73162
movq %rax, %rdi
callq 0x69863
leaq 0x641c2(%rip), %rsi     # 0x73169
movq %rsp, %r14
movl $0x80, %ecx
movq %rax, %rdi
movq %r14, %rdx
callq 0x6ae99
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0xc460
leaq (%rsp,%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xedfa
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/helper.cpp
// Function: is_assist[abi:cxx11](mg_connection*)
string is_assist(mg_connection* conn){
    string ssid = cck_extract_ssid(conn);
    for(auto x = assist_cookie.begin(); x != assist_cookie.end(); ++x){
        // cout << x->first << "," << x->second << "," << ssid << endl;
        if(x->second == ssid) return x->first;
    }

    return string("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0xef81
leaq 0x87c43(%rip), %r12     # 0x96c48
movq 0x18(%r12), %r14
addq $0x8, %r12
cmpq %r12, %r14
je 0xf04a
movq (%rsp), %r15
movq 0x8(%rsp), %r13
movq 0x48(%r14), %rdx
cmpq %r13, %rdx
jne 0xf03a
testq %rdx, %rdx
je 0xf065
movq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0xc7c0
testl %eax, %eax
je 0xf065
movq %r14, %rdi
callq 0xcaa0
movq %rax, %r14
cmpq %r12, %rax
jne 0xf01c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6a60f(%rip), %rdx     # 0x79667
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xedfa
jmp 0xf07f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x12396
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf092
callq 0xc640
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf0a5
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf0bb
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/helper.cpp
// Function: cck_send_ssid(mg_connection*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void cck_send_ssid(mg_connection *conn, const std::string c){
    char expire[100];
    time_t t = time(NULL) + 60 * 60 * 24 * 30;
    strftime(expire, sizeof(expire), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&t));

    mg_printf(conn,
        "HTTP/1.1 200 OK\r\n"
        "Set-Cookie: ssid=%s; expires=%s; max-age=%d; path=/; http-only; HttpOnly;\r\n"
        "Content-type: text/html\r\n"
        "X-UA-Compatible: IE=edge\r\n"
        "Content-Length: 0\r\n",
        c.c_str(), expire, 60 * 60 * 24 * 30);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %edi, %edi
callq 0xc820
addq $0x278d00, %rax         # imm = 0x278D00
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0xc2f0
leaq 0x64078(%rip), %rdx     # 0x7316e
leaq 0x10(%rsp), %r15
movl $0x64, %esi
movq %r15, %rdi
movq %rax, %rcx
callq 0xc9d0
movq (%r14), %rdx
leaq 0x64073(%rip), %rsi     # 0x73188
movq %rbx, %rdi
movq %r15, %rcx
movl $0x278d00, %r8d         # imm = 0x278D00
xorl %eax, %eax
callq 0x69675
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/helper.cpp
// Function: _generate_appender[abi:cxx11](char const*)
string __generate_appender(const char *username) {
    char *hash = new char[33];
    ConfigManager c;
    mg_md5(hash, username, ":", c.global().get("security::salt").c_str(), NULL);
    // mg_md5(hash, username, ":", md5Salt, NULL);

    string ret(hash);
    delete [] hash;

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x21, %edi
callq 0xc560
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0xc8(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x11bfe
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x63e94(%rip), %rsi     # 0x732db
leaq 0x63e9b(%rip), %rdx     # 0x732e9
leaq 0x8(%rsp), %rdi
callq 0xedfa
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x11ee8
movq (%rax), %rcx
leaq 0x64806(%rip), %rdx     # 0x73c75
movq %r14, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x6a8d8
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf48e
callq 0xc640
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0xc460
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xedfa
leaq 0x60(%rsp), %r15
leaq 0x98(%rsp), %r12
movq %r14, %rdi
callq 0xc400
movq %r12, %rdi
callq 0x11d00
movq %r15, %rdi
callq 0x11d96
leaq 0x28(%rsp), %rdi
callq 0x11e2c
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf4f3
movq %rax, %rbx
jmp 0xf50a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf50a
callq 0xc640
leaq 0x28(%rsp), %rdi
callq 0x11c1c
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/helper.cpp
// Function: cck_create_ssid[abi:cxx11](char const*)
string cck_create_ssid(const char* username){
    // char newssid[33];
    // strcpy(newssid, to_ssid(username));

    string appender = __generate_appender(username);

    char finalssid[64];// = new char[64];

    int len = sprintf(finalssid, "%s|%s", username, appender.c_str());
    finalssid[len] = 0;

    std::string ret(finalssid);

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0xf3ac
movq (%r15), %rcx
leaq 0x63daa(%rip), %rsi     # 0x732ea
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xcb60
cltq
movb $0x0, 0x20(%rsp,%rax)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0xc460
leaq (%rsp,%rax), %rdx
addq $0x20, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xedfa
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf58e
callq 0xc640
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf5b1
callq 0xc640
movq %rbx, %rdi
callq 0xc760