LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_show_string_ascii
void vt100_screen_show_string_ascii(VT100Screen *vt, char *buf, size_t len)
{
    size_t i;

    if (len) {
        vt->dirty = 1;

        if (vt->grid->cur.col > 0) {
            struct vt100_cell *cell;

            cell = vt100_screen_cell_at(
                vt, vt->grid->cur.row, vt->grid->cur.col - 1);
            if (cell->is_wide) {
                cell->len = 0;
            }
        }
    }

    for (i = 0; i < len; ++i) {
        struct vt100_cell *cell;

        vt100_screen_check_wrap(vt, 1);
        cell = vt100_screen_cell_at(vt, vt->grid->cur.row, vt->grid->cur.col);

        cell->len = 1;
        cell->contents[0] = buf[i];
        cell->attrs = vt->attrs;
        cell->is_wide = 0;

        vt->grid->cur.col++;
    }
}

// Assembly:
testq %rdx, %rdx
je 0x6502
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
orb $0x20, 0x4a(%rdi)
movq (%rdi), %rcx
movslq 0x4(%rcx), %rax
testq %rax, %rax
jle 0x648f
movslq (%rcx), %rdx
movq 0x30(%rcx), %rsi
movslq 0x28(%rcx), %rcx
addq %rdx, %rcx
shlq $0x4, %rcx
movq (%rsi,%rcx), %rcx
shlq $0x5, %rax
testb $0x1, -0x4(%rcx,%rax)
je 0x648f
addq %rax, %rcx
movq $0x0, -0x18(%rcx)
leaq 0x3c(%r15), %r12
xorl %r13d, %r13d
movq %r15, %rdi
movl $0x1, %esi
callq 0x6503
movq (%r15), %rax
movslq (%rax), %rcx
movslq 0x4(%rax), %rdx
movq 0x30(%rax), %rsi
movslq 0x28(%rax), %rax
addq %rcx, %rax
shlq $0x4, %rax
movq (%rsi,%rax), %rax
shlq $0x5, %rdx
movq $0x1, 0x8(%rax,%rdx)
movb (%r14,%r13), %cl
movb %cl, (%rax,%rdx)
movq (%r12), %rcx
movq %rcx, 0x10(%rax,%rdx)
movl 0x8(%r12), %ecx
movl %ecx, 0x18(%rax,%rdx)
andb $-0x2, 0x1c(%rax,%rdx)
movq (%r15), %rax
incl 0x4(%rax)
incq %r13
cmpq %r13, %rbx
jne 0x6496
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_check_wrap
static void vt100_screen_check_wrap(VT100Screen *vt, int width)
{
    if (vt->grid->cur.col + width > vt->grid->max.col) {
        vt100_screen_row_at(vt, vt->grid->cur.row)->wrapped = 1;
        vt100_screen_move_down_or_scroll(vt);
        vt->grid->cur.col = 0;
    }
}

// Assembly:
movq (%rdi), %rax
addl 0x4(%rax), %esi
cmpl 0xc(%rax), %esi
jle 0x6539
pushq %rbx
movq %rdi, %rbx
movslq (%rax), %rcx
movslq 0x28(%rax), %rdx
addq %rcx, %rdx
movq 0x30(%rax), %rax
shlq $0x4, %rdx
orb $0x1, 0x8(%rax,%rdx)
callq 0x3550
movq (%rbx), %rax
movl $0x0, 0x4(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_move_to
void vt100_screen_move_to(VT100Screen *vt, int row, int col)
{
    row = row < 0                  ? 0
        : row >= vt->grid->max.row ? vt->grid->max.row - 1
        : row;
    col = col < 0                  ? 0
        : col >= vt->grid->max.col ? vt->grid->max.col - 1
        : col;

    if (vt->origin_mode) {
        row += vt->grid->scroll_top;
        if (row > vt->grid->scroll_bottom) {
            row = vt->grid->scroll_bottom;
        }
    }

    vt->grid->cur.row = row;
    vt->grid->cur.col = col;
}

// Assembly:
xorl %ecx, %ecx
movq (%rdi), %rax
movl $0x0, %r8d
testl %esi, %esi
js 0x6742
movl 0x8(%rax), %r9d
leal -0x1(%r9), %r8d
cmpl %esi, %r9d
cmovgl %esi, %r8d
testl %edx, %edx
js 0x6751
movl 0xc(%rax), %esi
leal -0x1(%rsi), %ecx
cmpl %edx, %esi
cmovgl %edx, %ecx
testb $0x1, 0x4a(%rdi)
je 0x6765
addl 0x18(%rax), %r8d
movl 0x1c(%rax), %edx
cmpl %edx, %r8d
cmovgel %edx, %r8d
movl %r8d, (%rax)
movl %ecx, 0x4(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_clear_screen
void vt100_screen_clear_screen(VT100Screen *vt)
{
    int r;

    for (r = 0; r < vt->grid->max.row; ++r) {
        struct vt100_row *row;

        row = vt100_screen_row_at(vt, r);
        memset(row->cells, 0, vt->grid->max.col * sizeof(struct vt100_cell));
        row->wrapped = 0;
    }

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
cmpl $0x0, 0x8(%rax)
jle 0x67b7
xorl %r14d, %r14d
movslq 0x28(%rax), %r15
movq 0x30(%rax), %r12
addq %r14, %r15
shlq $0x4, %r15
movq (%r12,%r15), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r12,%r15)
movq (%rbx), %rax
incq %r14
cmpl 0x8(%rax), %r14d
jl 0x6783
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_clear_screen_forward
void vt100_screen_clear_screen_forward(VT100Screen *vt)
{
    struct vt100_row *row;
    int r;

    row = vt100_screen_row_at(vt, vt->grid->cur.row);
    memset(
        &row->cells[vt->grid->cur.col], 0,
        (vt->grid->max.col - vt->grid->cur.col) * sizeof(struct vt100_cell));
    row->wrapped = 0;
    for (r = vt->grid->cur.row + 1; r < vt->grid->max.row; ++r) {
        row = vt100_screen_row_at(vt, r);
        memset(row->cells, 0, vt->grid->max.col * sizeof(struct vt100_cell));
        row->wrapped = 0;
    }

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movslq (%rax), %rcx
movslq 0x28(%rax), %r14
addq %rcx, %r14
movq 0x30(%rax), %r15
shlq $0x4, %r14
movslq 0x4(%rax), %rdi
movslq 0xc(%rax), %rdx
subq %rdi, %rdx
shlq $0x5, %rdi
addq (%r15,%r14), %rdi
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r14)
movq (%rbx), %rax
movslq (%rax), %r14
leal 0x1(%r14), %ecx
cmpl 0x8(%rax), %ecx
jge 0x6851
incq %r14
movslq 0x28(%rax), %r15
movq 0x30(%rax), %r12
addq %r14, %r15
shlq $0x4, %r15
movq (%r12,%r15), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r12,%r15)
movq (%rbx), %rax
incq %r14
cmpl 0x8(%rax), %r14d
jl 0x681d
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_clear_screen_backward
void vt100_screen_clear_screen_backward(VT100Screen *vt)
{
    struct vt100_row *row;
    int r;

    for (r = 0; r < vt->grid->cur.row - 1; ++r) {
        row = vt100_screen_row_at(vt, r);
        memset(row->cells, 0, vt->grid->max.col * sizeof(struct vt100_cell));
        row->wrapped = 0;
    }
    row = vt100_screen_row_at(vt, vt->grid->cur.row);
    memset(row->cells, 0, vt->grid->cur.col * sizeof(struct vt100_cell));

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movl (%rax), %ecx
cmpl $0x2, %ecx
jl 0x68b1
xorl %r14d, %r14d
movslq 0x28(%rax), %r15
movq 0x30(%rax), %r12
addq %r14, %r15
shlq $0x4, %r15
movq (%r12,%r15), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r12,%r15)
movq (%rbx), %rax
movl (%rax), %ecx
leal -0x1(%rcx), %edx
incq %r14
cmpl %edx, %r14d
jl 0x6879
movslq 0x28(%rax), %rdx
movq 0x30(%rax), %rsi
movslq %ecx, %rcx
addq %rdx, %rcx
shlq $0x4, %rcx
movq (%rsi,%rcx), %rdi
movslq 0x4(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_kill_line
void vt100_screen_kill_line(VT100Screen *vt)
{
    struct vt100_row *row;

    row = vt100_screen_row_at(vt, vt->grid->cur.row);
    memset(row->cells, 0, vt->grid->max.col * sizeof(struct vt100_cell));
    row->wrapped = 0;

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq (%rax), %rcx
movslq 0x28(%rax), %r14
addq %rcx, %r14
movq 0x30(%rax), %r15
shlq $0x4, %r14
movq (%r15,%r14), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r14)
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_kill_line_forward
void vt100_screen_kill_line_forward(VT100Screen *vt)
{
    struct vt100_row *row;

    row = vt100_screen_row_at(vt, vt->grid->cur.row);
    memset(
        &row->cells[vt->grid->cur.col], 0,
        (vt->grid->max.col - vt->grid->cur.col) * sizeof(struct vt100_cell));
    row->wrapped = 0;

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq (%rax), %rcx
movslq 0x28(%rax), %r14
addq %rcx, %r14
movq 0x30(%rax), %r15
shlq $0x4, %r14
movslq 0x4(%rax), %rdi
movslq 0xc(%rax), %rdx
subq %rdi, %rdx
shlq $0x5, %rdi
addq (%r15,%r14), %rdi
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r14)
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_kill_line_backward
void vt100_screen_kill_line_backward(VT100Screen *vt)
{
    struct vt100_row *row;

    row = vt100_screen_row_at(vt, vt->grid->cur.row);
    memset(row->cells, 0, vt->grid->cur.col * sizeof(struct vt100_cell));
    if (vt->grid->cur.row > 0) {
        row = vt100_screen_row_at(vt, vt->grid->cur.row - 1);
        row->wrapped = 0;
    }

    vt->dirty = 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq (%rax), %rcx
movslq 0x28(%rax), %rdx
addq %rcx, %rdx
movq 0x30(%rax), %rcx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rdi
movslq 0x4(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
movq (%rbx), %rcx
movslq (%rcx), %rax
testq %rax, %rax
jle 0x69bc
movslq 0x28(%rcx), %rdx
addq %rdx, %rax
movq 0x30(%rcx), %rcx
shlq $0x4, %rax
andb $-0x2, -0x8(%rax,%rcx)
orb $0x20, 0x4a(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_insert_characters
void vt100_screen_insert_characters(VT100Screen *vt, int count)
{
    struct vt100_row *row;

    row = vt100_screen_row_at(vt, vt->grid->cur.row);
    if (count >= vt->grid->max.col - vt->grid->cur.col) {
        vt100_screen_kill_line_forward(vt);
    }
    else {
        memmove(
            &row->cells[vt->grid->cur.col + count],
            &row->cells[vt->grid->cur.col],
            (vt->grid->max.col - vt->grid->cur.col - count) * sizeof(struct vt100_cell));
        memset(
            &row->cells[vt->grid->cur.col], 0,
            count * sizeof(struct vt100_cell));
        row->wrapped = 0;
    }

    vt->dirty = 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movslq (%rax), %rcx
movslq 0x28(%rax), %rdi
addq %rcx, %rdi
movq 0x30(%rax), %r8
shlq $0x4, %rdi
leaq (%r8,%rdi), %r14
movl 0x4(%rax), %ecx
movl 0xc(%rax), %esi
subl %ecx, %esi
movl %esi, %edx
movq (%r8,%rdi), %rax
subl %ebp, %edx
jle 0x6a23
movslq %ecx, %rsi
addl %ebp, %ecx
movslq %ecx, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
shlq $0x5, %rsi
addq %rax, %rsi
movslq %edx, %rdx
shlq $0x5, %rdx
callq 0x3590
movq (%r14), %rax
movq (%rbx), %rcx
movl 0x4(%rcx), %ecx
jmp 0x6a25
movl %esi, %ebp
movslq %ecx, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movslq %ebp, %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r14)
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_insert_lines
void vt100_screen_insert_lines(VT100Screen *vt, int count)
{
    if (count >= vt->grid->max.row - vt->grid->cur.row) {
        vt100_screen_clear_screen_forward(vt);
        vt100_screen_kill_line(vt);
    }
    else {
        struct vt100_row *row;
        int bottom = vt->grid->scroll_bottom + 1;
        int i;

        for (i = bottom - count; i < bottom; ++i) {
            row = vt100_screen_row_at(vt, i);
            free(row->cells);
        }
        row = vt100_screen_row_at(vt, vt->grid->cur.row);
        memmove(
            row + count, row,
            (bottom - vt->grid->cur.row - count) * sizeof(struct vt100_row));
        memset(row, 0, count * sizeof(struct vt100_row));
        for (i = vt->grid->cur.row; i < vt->grid->cur.row + count; ++i) {
            row = vt100_screen_row_at(vt, i);
            row->cells = calloc(vt->grid->max.col, sizeof(struct vt100_cell));
            row->wrapped = 0;
        }
    }

    vt->dirty = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movl (%rax), %ecx
movl 0x8(%rax), %edx
subl %ecx, %edx
cmpl %esi, %edx
jle 0x6b28
movl %esi, %ebp
movl 0x1c(%rax), %edx
leal 0x1(%rdx), %r12d
movl %r12d, %esi
subl %ebp, %esi
cmpl %edx, %esi
jg 0x6aa8
movl %ebp, %r14d
negl %r14d
movq (%rbx), %rax
leal (%r12,%r14), %ecx
addl 0x28(%rax), %ecx
movq 0x30(%rax), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdi
callq 0x3050
incl %r14d
jne 0x6a80
movq (%rbx), %rax
movl (%rax), %ecx
movslq 0x28(%rax), %r14
movslq %ecx, %rcx
addq %rcx, %r14
shlq $0x4, %r14
addq 0x30(%rax), %r14
movslq %ebp, %r15
shlq $0x4, %r15
leaq (%r14,%r15), %rdi
addl %ebp, %ecx
subl %ecx, %r12d
movslq %r12d, %rdx
shlq $0x4, %rdx
movq %r14, %rsi
callq 0x3590
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x32c0
testl %ebp, %ebp
jle 0x6b62
movq (%rbx), %rax
movslq (%rax), %r14
movslq 0x28(%rax), %r15
movq 0x30(%rax), %r12
addq %r14, %r15
shlq $0x4, %r15
movslq 0xc(%rax), %rdi
movl $0x20, %esi
callq 0x33b0
movq %rax, (%r12,%r15)
andb $-0x2, 0x8(%r12,%r15)
movq (%rbx), %rax
movl (%rax), %ecx
addl %ebp, %ecx
incq %r14
cmpl %ecx, %r14d
jl 0x6af0
jmp 0x6b62
movq %rbx, %rdi
callq 0x3330
movq (%rbx), %rax
movslq (%rax), %rcx
movslq 0x28(%rax), %r14
addq %rcx, %r14
movq 0x30(%rax), %r15
shlq $0x4, %r14
movq (%r15,%r14), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r14)
orb $0x20, 0x4a(%rbx)
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_delete_characters
void vt100_screen_delete_characters(VT100Screen *vt, int count)
{
    if (count >= vt->grid->max.col - vt->grid->cur.col) {
        vt100_screen_kill_line_forward(vt);
    }
    else {
        struct vt100_row *row;

        row = vt100_screen_row_at(vt, vt->grid->cur.row);
        memmove(
            &row->cells[vt->grid->cur.col],
            &row->cells[vt->grid->cur.col + count],
            (vt->grid->max.col - vt->grid->cur.col - count) * sizeof(struct vt100_cell));
        memset(
            &row->cells[vt->grid->max.col - count], 0,
            count * sizeof(struct vt100_cell));
        row->wrapped = 0;
    }

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rsi
movl 0xc(%rsi), %eax
movslq 0x4(%rsi), %rcx
movl %eax, %edx
subl %ecx, %edx
movslq (%rsi), %rdi
movslq 0x28(%rsi), %r8
addq %rdi, %r8
movq 0x30(%rsi), %rsi
shlq $0x4, %r8
leaq (%rsi,%r8), %r15
movq (%rsi,%r8), %rsi
movq %rcx, %rdi
shlq $0x5, %rdi
addq %rsi, %rdi
cmpl %r14d, %edx
jle 0x6be2
addl %r14d, %ecx
movslq %ecx, %rcx
subl %ecx, %eax
shlq $0x5, %rcx
addq %rcx, %rsi
movslq %eax, %rdx
shlq $0x5, %rdx
callq 0x3590
movq (%rbx), %rax
movslq 0xc(%rax), %rdi
movslq %r14d, %rax
subq %rax, %rdi
shlq $0x5, %rdi
addq (%r15), %rdi
jmp 0x6be5
movl %edx, %r14d
movslq %r14d, %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15)
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_erase_characters
void vt100_screen_erase_characters(VT100Screen *vt, int count)
{
    if (count >= vt->grid->max.col - vt->grid->cur.col) {
        vt100_screen_kill_line_forward(vt);
    }
    else {
        struct vt100_row *row;
        int i;

        row = vt100_screen_row_at(vt, vt->grid->cur.row);

        for (i = vt->grid->cur.col; i < vt->grid->cur.col + count; ++i) {
            struct vt100_cell *cell = &row->cells[i];

            cell->len = 0;
        }
    }

    vt->dirty = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq 0xc(%rax), %rdx
movslq 0x4(%rax), %rdi
subq %rdi, %rdx
cmpl %esi, %edx
jle 0x6e30
testl %esi, %esi
jle 0x6e5f
movq 0x30(%rax), %rcx
movslq 0x28(%rax), %rdx
movslq (%rax), %rax
addq %rdx, %rax
shlq $0x4, %rax
movq (%rcx,%rax), %rcx
leaq 0x1(%rdi), %rax
addl %edi, %esi
movslq %esi, %rdx
cmpq %rdx, %rax
cmovgq %rax, %rdx
subq %rdi, %rdx
leaq 0x1(%rdx), %rax
andq $-0x2, %rax
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shlq $0x5, %rdi
addq %rdi, %rcx
addq $0x28, %rcx
xorl %edx, %edx
movdqa 0x2b49(%rip), %xmm1     # 0x9900
movdqa 0x2b51(%rip), %xmm2     # 0x9910
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x6e0b
movq $0x0, -0x20(%rcx)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x6e21
movq $0x0, (%rcx)
addq $0x2, %rdx
addq $0x40, %rcx
cmpq %rdx, %rax
jne 0x6dc7
jmp 0x6e5f
movslq (%rax), %rcx
movslq 0x28(%rax), %r14
addq %rcx, %r14
movq 0x30(%rax), %r15
shlq $0x4, %r14
shlq $0x5, %rdi
addq (%r15,%r14), %rdi
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r14)
orb $0x20, 0x4a(%rbx)
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_scroll_down
void vt100_screen_scroll_down(VT100Screen *vt, int count)
{
    struct vt100_row *row;
    int bottom = vt->grid->scroll_bottom, top = vt->grid->scroll_top;
    int i;

    if (bottom - top + 1 > count) {
        for (i = 0; i < count; ++i) {
            row = vt100_screen_row_at(vt, bottom - i);
            free(row->cells);
        }
        row = vt100_screen_row_at(vt, top);
        memmove(
            row + count, row,
            (bottom - top + 1 - count) * sizeof(struct vt100_row));
        for (i = 0; i < count; ++i) {
            row = vt100_screen_row_at(vt, top + i);
            row->cells = calloc(vt->grid->max.col, sizeof(struct vt100_cell));
            row->wrapped = 0;
        }
    }
    else {
        for (i = 0; i < bottom - top + 1; ++i) {
            row = vt100_screen_row_at(vt, top + i);
            memset(
                row->cells, 0, vt->grid->max.col * sizeof(struct vt100_cell));
            row->wrapped = 0;
        }
    }

    vt->dirty = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x18(%rax), %r14d
movl 0x1c(%rax), %r15d
movl %r15d, %ecx
subl %r14d, %ecx
movl %ecx, %r12d
subl %esi, %r12d
jge 0x6ed5
testl %ecx, %ecx
js 0x6f65
incl %r15d
movq (%rbx), %rax
movq 0x30(%rax), %r12
movl 0x28(%rax), %ecx
addl %r14d, %ecx
movslq %ecx, %r13
shlq $0x4, %r13
movq (%r12,%r13), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r12,%r13)
incl %r14d
cmpl %r14d, %r15d
jne 0x6e9b
jmp 0x6f65
movl %esi, %ebp
movslq %r14d, %r14
testl %esi, %esi
jle 0x6f08
movl %ebp, %r13d
movq (%rbx), %rax
movq 0x30(%rax), %rcx
movl 0x28(%rax), %eax
addl %r15d, %eax
cltq
shlq $0x4, %rax
movq (%rcx,%rax), %rdi
callq 0x3050
decl %r15d
decl %r13d
jne 0x6ee1
movq (%rbx), %rax
movslq 0x28(%rax), %rsi
addq %r14, %rsi
shlq $0x4, %rsi
addq 0x30(%rax), %rsi
movslq %ebp, %rdi
shlq $0x4, %rdi
addq %rsi, %rdi
incl %r12d
movslq %r12d, %rdx
shlq $0x4, %rdx
callq 0x3590
testl %ebp, %ebp
jle 0x6f65
movq (%rbx), %rax
movslq 0x28(%rax), %r15
movq 0x30(%rax), %r12
addq %r14, %r15
shlq $0x4, %r15
movslq 0xc(%rax), %rdi
movl $0x20, %esi
callq 0x33b0
movq %rax, (%r12,%r15)
andb $-0x2, 0x8(%r12,%r15)
incq %r14
decl %ebp
jne 0x6f34
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_set_scroll_region
void vt100_screen_set_scroll_region(
    VT100Screen *vt, int top, int bottom, int left, int right)
{
    if (left > 0 || right < vt->grid->max.col - 1) {
        fprintf(stderr, "vertical scroll regions not yet implemented\n");
    }

    if (top > bottom) {
        return;
    }

    vt->grid->scroll_top = top < 0
        ? 0
        : top;
    vt->grid->scroll_bottom = bottom >= vt->grid->max.row
        ? vt->grid->max.row - 1
        : bottom;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
testl %ecx, %ecx
jg 0x728f
movq (%r14), %rax
movl 0xc(%rax), %eax
decl %eax
cmpl %r8d, %eax
jg 0x728f
cmpl %ebx, %ebp
jg 0x728a
xorl %eax, %eax
testl %ebp, %ebp
cmovgl %ebp, %eax
movq (%r14), %rcx
movl %eax, 0x18(%rcx)
movl 0x8(%rcx), %eax
leal -0x1(%rax), %edx
cmpl %ebx, %eax
cmovgl %ebx, %edx
movl %edx, 0x1c(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
callq 0x38aa
jmp 0x726b
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_use_normal_buffer
void vt100_screen_use_normal_buffer(VT100Screen *vt)
{
    int i;

    if (!vt->alternate) {
        return;
    }

    for (i = 0; i < vt->grid->row_count; ++i) {
        free(vt->grid->rows[i].cells);
    }
    free(vt->grid->rows);
    free(vt->grid);

    vt->grid = vt->alternate;
    vt->alternate = NULL;

    vt100_screen_set_window_size(vt, vt->grid->max.row, vt->grid->max.col);

    vt->dirty = 1;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x73c1
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
cmpl $0x0, 0x20(%rax)
jle 0x738a
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x30(%rax), %rax
movq (%rax,%r14), %rdi
callq 0x3050
incq %r15
movq (%rbx), %rax
movslq 0x20(%rax), %rcx
addq $0x10, %r14
cmpq %rcx, %r15
jl 0x736a
movq 0x30(%rax), %rdi
callq 0x3050
movq (%rbx), %rdi
callq 0x3050
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x3690
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_row_max_col
int vt100_screen_row_max_col(VT100Screen *vt, int row)
{
    struct vt100_cell *cells = vt->grid->rows[row].cells;
    int i, max = -1;

    for (i = 0; i < vt->grid->max.col; ++i) {
        if (cells[i].len) {
            max = i;
        }
    }

    if (max == -1) {
        return 0;
    }

    return max + ((max < vt->grid->max.col - 1 && cells[max].is_wide) ? 2 : 1);
}

// Assembly:
movq (%rdi), %rax
movslq 0xc(%rax), %rdi
testq %rdi, %rdi
jle 0x7547
movq 0x30(%rax), %rax
movslq %esi, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
leaq 0x8(%rdx), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %esi, %esi
cmpq $0x0, (%rax)
cmovnel %esi, %ecx
incq %rsi
addq $0x20, %rax
cmpq %rsi, %rdi
jne 0x7510
cmpl $-0x1, %ecx
je 0x7547
decl %edi
movl $0x1, %eax
cmpl %edi, %ecx
jge 0x7544
movslq %ecx, %rax
shlq $0x5, %rax
movzbl 0x1c(%rdx,%rax), %eax
andl $0x1, %eax
incl %eax
addl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_cleanup
void vt100_screen_cleanup(VT100Screen *vt)
{
    int i;

    vt100_screen_use_normal_buffer(vt);

    for (i = 0; i < vt->grid->row_count; ++i) {
        free(vt->grid->rows[i].cells);
    }
    free(vt->grid->rows);
    free(vt->grid);

    free(vt->title);
    free(vt->icon_name);

    vt100_parser_yylex_destroy(vt->parser_state->scanner);
    free(vt->parser_state);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3150
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jle 0x77a4
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x30(%rax), %rax
movq (%rax,%r14), %rdi
callq 0x3050
incq %r15
movq (%rbx), %rax
movslq 0x20(%rax), %rcx
addq $0x10, %r14
cmpq %rcx, %r15
jl 0x7784
movq 0x30(%rax), %rdi
callq 0x3050
movq (%rbx), %rdi
callq 0x3050
movq 0x18(%rbx), %rdi
callq 0x3050
movq 0x28(%rbx), %rdi
callq 0x3050
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x3520
movq 0x10(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_push_string
static void vt100_screen_push_string(char **strp, size_t *lenp,
                                     size_t *capacity, char *append,
                                     size_t append_len)
{
    if (*lenp + append_len > *capacity) {
        *capacity *= 1.5;
        *strp = realloc(*strp, *capacity);
    }
    memcpy(*strp + *lenp, append, append_len);
    *lenp += append_len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq (%rsi), %rdi
leaq (%rdi,%r8), %rsi
movq (%rdx), %rcx
movq (%r12), %rax
cmpq %rcx, %rsi
jbe 0x7874
movq %rcx, %xmm0
punpckldq 0x20f9(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x2101(%rip), %xmm0     # 0x9930
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x209d(%rip), %xmm1     # 0x98e0
cvttsd2si %xmm1, %rcx
movq %rcx, %rdi
subsd 0x2095(%rip), %xmm1     # 0x98e8
cvttsd2si %xmm1, %rsi
sarq $0x3f, %rdi
andq %rdi, %rsi
orq %rcx, %rsi
movq %rsi, (%rdx)
movq %rax, %rdi
callq 0x3570
movq %rax, (%r12)
movq (%r14), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3430
addq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_MatchCstats
void
JS_MatchCstats(void)
{
     char      what[50];
     int       i,ans;

     sprintf(what, "1=YES,MATCH SPR CSTATS. 0 TO CANCEL. ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     for( i=0; i<MAXSPRITES; i++ ) {
          if( sprite[i].cstat & 0x0001 ) {
               sprite[i].cstat|=0x0100;
          }
     }

     printmessage16("All sprite hitscans match blocking...");

 return;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movups 0x6c337(%rip), %xmm0    # 0x73257
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movdqu 0x6c318(%rip), %xmm0    # 0x73247
movdqa %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x1e(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b432
cmpw $0x1, %ax
jne 0x70ba
movl $0x140, %eax            # imm = 0x140
leaq 0x275d4b(%rip), %rcx    # 0x27ccb0
leaq 0x6c30e(%rip), %rdi     # 0x7327a
movl -0x134(%rcx,%rax), %ebp
testb $0x1, %bpl
je 0x6f89
movl %ebp, %edx
orl $0x100, %edx            # imm = 0x100
movw %dx, -0x134(%rcx,%rax)
movl -0x108(%rcx,%rax), %ebx
movl -0xdc(%rcx,%rax), %r11d
movl -0xb0(%rcx,%rax), %r10d
movl -0x84(%rcx,%rax), %r9d
movl -0x58(%rcx,%rax), %r8d
movl -0x2c(%rcx,%rax), %esi
movl (%rcx,%rax), %edx
movd %edx, %xmm0
movd %esi, %xmm1
punpcklwd %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
movd %r8d, %xmm0
movd %r9d, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movd %r10d, %xmm0
movd %r11d, %xmm1
punpcklwd %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
movd %ebx, %xmm3
movd %ebp, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movd %xmm0, %ebp
shrl $0x10, %ebp
testb $0x1, %bpl
je 0x700f
orl $0x100, %ebx            # imm = 0x100
movw %bx, -0x108(%rcx,%rax)
pextrw $0x2, %xmm0, %ebx
testb $0x1, %bl
je 0x7029
orl $0x100, %r11d           # imm = 0x100
movw %r11w, -0xdc(%rcx,%rax)
pextrw $0x3, %xmm0, %r11d
testb $0x1, %r11b
je 0x7045
orl $0x100, %r10d           # imm = 0x100
movw %r10w, -0xb0(%rcx,%rax)
pextrw $0x4, %xmm0, %r10d
testb $0x1, %r10b
je 0x7061
orl $0x100, %r9d            # imm = 0x100
movw %r9w, -0x84(%rcx,%rax)
pextrw $0x5, %xmm0, %r9d
testb $0x1, %r9b
je 0x707a
orl $0x100, %r8d            # imm = 0x100
movw %r8w, -0x58(%rcx,%rax)
pextrw $0x6, %xmm0, %r8d
testb $0x1, %r8b
je 0x7091
orl $0x100, %esi            # imm = 0x100
movw %si, -0x2c(%rcx,%rax)
pextrw $0x7, %xmm0, %esi
testb $0x1, %sil
je 0x70a6
orl $0x100, %edx            # imm = 0x100
movw %dx, (%rcx,%rax)
addq $0x160, %rax            # imm = 0x160
cmpq $0xb0140, %rax          # imm = 0xB0140
jne 0x6f6c
jmp 0x70c1
leaq 0x6c1ac(%rip), %rdi     # 0x7326d
callq 0x192c8
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_RecordExt
void
JS_RecordExt(int sn)
{
     char      what[50];

     clearmidstatbar16();

     if( sprite[sn].extra < 0 ) {
          sprintf(what, "Sprite has no EXT to record !");
          printmessage16(what);
          return;
     }

     recordXT=sprite[sn].extra;

     JS_ShowSpriteExts(sn);

     sprintf(what, "Recording Ext %d for copying...", sn);
     printmessage16(what);

     memcpy(&recXT, &spriteXT[recordXT], sizeof(struct spriteextension));     
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edi, %ebx
callq 0x1adf6
movslq %ebx, %rax
imulq $0x2c, %rax, %rax
leaq 0x275974(%rip), %rcx    # 0x27ccb0
movzwl 0x2a(%rcx,%rax), %eax
testw %ax, %ax
js 0x73b2
movw %ax, 0x8c3cb(%rip)      # 0x93718
movswl %bx, %edi
callq 0x73d7
leaq 0x6bf75(%rip), %rsi     # 0x732d1
movq %rsp, %r14
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6b00
movq %r14, %rdi
callq 0x192c8
movswq 0x8c39d(%rip), %rax     # 0x93718
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
leaq 0x9e483(%rip), %rcx     # 0xa5810
movups (%rcx,%rax), %xmm0
movups 0x10(%rcx,%rax), %xmm1
movups %xmm0, 0x9e443(%rip)    # 0xa57e0
movups %xmm1, 0x9e44c(%rip)    # 0xa57f0
movzwl 0x20(%rcx,%rax), %eax
movw %ax, 0x9e450(%rip)      # 0xa5800
jmp 0x73cf
movups 0x6bf08(%rip), %xmm0    # 0x732c1
movq %rsp, %rdi
movups %xmm0, 0xe(%rdi)
movups 0x6beec(%rip), %xmm0    # 0x732b3
movaps %xmm0, (%rdi)
callq 0x192c8
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_InitExtension
int
JS_InitExtension(short sn, short en)
{
 memset(&spriteXT[en], 0, sizeof(struct spriteextension));     
 spriteXT[en].basestat=sprite[sn].statnum;
 spriteXT[en].basepic=sprite[sn].picnum;

 return(1);
}

// Assembly:
movslq %esi, %rax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
leaq 0x9cc77(%rip), %rcx     # 0xa5810
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
movw $0x0, 0x20(%rcx,%rax)
movslq %edi, %rdx
imulq $0x2c, %rdx, %rdx
leaq 0x2740f6(%rip), %rsi    # 0x27ccb0
movzwl 0x1a(%rsi,%rdx), %edi
movw %di, 0x8(%rcx,%rax)
movzwl 0xe(%rsi,%rdx), %edx
movw %dx, 0xa(%rcx,%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_DeleteExt
void
JS_DeleteExt(short sn)
{
     short     x=sprite[sn].extra;

     memset(&spriteXT[x], 0, sizeof(struct spriteextension));

     if( qsetmode != 200 ) {
          printmessage16("Deleting Extension...");
     }

     // reset recordXT
     if( x == recordXT ) {
          recordXT=-1;
     }

 return;
}

// Assembly:
pushq %rbx
movslq %edi, %rax
imulq $0x2c, %rax, %rax
leaq 0x27409e(%rip), %rcx    # 0x27ccb0
movswq 0x2a(%rcx,%rax), %rbx
movq %rbx, %rax
shlq $0x5, %rax
leaq (%rax,%rbx,2), %rax
leaq 0x9cbe6(%rip), %rcx     # 0xa5810
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
movw $0x0, 0x20(%rcx,%rax)
leaq 0x1afde4(%rip), %rax    # 0x1b8a28
cmpl $0xc8, (%rax)
je 0x8c58
leaq 0x6a77a(%rip), %rdi     # 0x733cd
callq 0x192c8
cmpw 0x8aab9(%rip), %bx      # 0x93718
jne 0x8c6a
movw $0xffff, 0x8aaae(%rip)  # imm = 0xFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_ClearAllExts
void
JS_ClearAllExts(void)
{
     char      what[50];
     int       i,ans;

     sprintf(what, "1=YES,DELETE ALL EXTS, 0 TO CANCEL. ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     sprintf(what, "REALLY DELETE EXTS ? 1=YES  0=NO ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     for( i=0; i<MAXSPRITES; i++ ) {
          memset(&spriteXT[i], 0, sizeof(struct spriteextension));
     }
     for( i=0; i<MAXSPRITES; i++ ) {
          sprite[i].extra=-1;
     }

     printmessage16("All sprite EXTS cleared...");

 return;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movups 0x6a77b(%rip), %xmm0    # 0x733f3
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x6a75d(%rip), %xmm0    # 0x733e3
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x1d(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b432
leaq 0x6a5c1(%rip), %rbx     # 0x7326d
cmpw $0x1, %ax
jne 0x8d1c
movups 0x6a75f(%rip), %xmm0    # 0x73418
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x6a741(%rip), %xmm0    # 0x73408
movaps %xmm0, (%rdi)
movw $0x20, 0x20(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b432
cmpw $0x1, %ax
jne 0x8d1c
leaq 0x9cb25(%rip), %rdi     # 0xa5810
movl $0x88000, %edx          # imm = 0x88000
xorl %esi, %esi
callq 0x62f0
movl $0x2a, %eax
leaq 0x273fad(%rip), %rcx    # 0x27ccb0
leaq 0x6a720(%rip), %rbx     # 0x7342a
movw $0xffff, (%rcx,%rax)    # imm = 0xFFFF
addq $0x2c, %rax
cmpq $0xb002a, %rax          # imm = 0xB002A
jne 0x8d0a
movq %rbx, %rdi
callq 0x192c8
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_ClearAllSprites
void
JS_ClearAllSprites(void)
{
     char      what[50];
     int       i,ans;

     sprintf(what, "1=YES,DELETE ALL SPRITES, 0 TO CANCEL. ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     sprintf(what, "REALLY DELETE SPRITES ? 1=YES  0=NO ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     for( i=0; i<MAXSPRITES; i++ ) {
          deletesprite(i);
          memset(&spriteXT[i], 0, sizeof(struct spriteextension));
          sprite[i].extra=-1;
     }

     printmessage16("All sprites gone...");

 return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movups 0x6a719(%rip), %xmm0    # 0x73455
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x6a6fb(%rip), %xmm0    # 0x73445
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x20(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b432
leaq 0x6a4fd(%rip), %rbx     # 0x7326d
cmpw $0x1, %ax
jne 0x8e06
movups 0x6a6fc(%rip), %xmm0    # 0x7347d
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x6a6de(%rip), %xmm0    # 0x7346d
movaps %xmm0, (%rdi)
movabsq $0x204f4e3d302020, %rax # imm = 0x204F4E3D302020
movq %rax, 0x1d(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b432
cmpw $0x1, %ax
jne 0x8e06
leaq 0x273ef5(%rip), %r14    # 0x27ccb0
addq $0x2a, %r14
leaq 0x9ca4a(%rip), %r15     # 0xa5810
xorl %r12d, %r12d
leaq 0x6a6c2(%rip), %rbx     # 0x73492
movswl %r12w, %edi
callq 0x36dab
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movups %xmm0, 0x10(%r15)
movw $0x0, 0x20(%r15)
movw $0xffff, (%r14)         # imm = 0xFFFF
incq %r12
addq $0x22, %r15
addq $0x2c, %r14
cmpq $0x4000, %r12           # imm = 0x4000
jne 0x8dd0
movq %rbx, %rdi
callq 0x192c8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_CheckExtras
int
JS_CheckExtras(void)
{
     int       i,nse;

     nse=0;
     for( i=0; i<MAXSPRITES; i++ ) {
          if( sprite[i].extra != -1 )
               nse++;
     }

 return(nse);
}

// Assembly:
pxor %xmm0, %xmm0
movl $0xae, %eax
leaq 0x273c8a(%rip), %rcx    # 0x27ccb0
pcmpeqd %xmm1, %xmm1
movdqa 0x6a1be(%rip), %xmm2    # 0x731f0
movzwl -0x84(%rcx,%rax), %edx
movd %edx, %xmm3
pinsrw $0x1, -0x58(%rcx,%rax), %xmm3
pinsrw $0x2, -0x2c(%rcx,%rax), %xmm3
pinsrw $0x3, (%rcx,%rax), %xmm3
pcmpeqw %xmm1, %xmm3
pxor %xmm1, %xmm3
punpcklwd %xmm3, %xmm3    # xmm3 = xmm3[0,0,1,1,2,2,3,3]
pand %xmm2, %xmm3
paddd %xmm3, %xmm0
addq $0xb0, %rax
cmpq $0xb00ae, %rax          # imm = 0xB00AE
jne 0x9032
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_SaveSpriteExts
int
JS_SaveSpriteExts(const char *mapname)
{
     int       fh,i;

     buildputs("Appending extensions...\n");

     fh=open(mapname, O_BINARY | O_WRONLY, 0);
     if ( fh == -1 ) {
          return(-1);
     }

     //checkextras();

     // prepare trailer
     memset(&XTtrailer, 0, sizeof(struct XTtrailertype));
     strncpy(XTtrailer.mapname, mapname, 12);
     XTtrailer.mapname[12]='\0';
     strcpy(XTtrailer.ID, TRAILERID);
     XTtrailer.ID[12]='\0';
     XTtrailer.numXTs=0L;

     // go to end of map = beginning of eXTensions
     XTtrailer.start=(int)lseek(fh, 0, SEEK_END);

     // verify extension then
     // write extensions to end of map file
     XTtrailer.numXTs=0L;
     for (i=0; i<MAXSPRITES; i++) {
          if( spriteXT[i].lock == 0xFF ) {
               memset(&XTsave, 0, sizeof(struct XTsavetype));
               XTtrailer.numXTs++;
               XTsave.XTnum=i;
               XTsave.sprXT=spriteXT[i];
               write(fh, &XTsave, sizeof(struct XTsavetype));
          }
     }

     // write trailer 
     write(fh, &XTtrailer, sizeof(struct XTtrailertype));
     close(fh);

 return(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x6a56f(%rip), %rdi     # 0x7360c
callq 0x32d18
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x6490
cmpl $-0x1, %eax
je 0x91c1
movl %eax, %ebx
xorps %xmm0, %xmm0
movups %xmm0, 0x124755(%rip)   # 0x12d820
movups %xmm0, 0x12473e(%rip)   # 0x12d810
movw $0x0, 0x124755(%rip)    # 0x12d830
leaq 0x124736(%rip), %rdi    # 0x12d818
movl $0xc, %edx
movq %r14, %rsi
callq 0x6190
movb %r15b, 0x12472e(%rip)   # 0x12d824
movabsq $0x58455f50414d2a2a, %rax # imm = 0x58455F50414D2A2A
movq %rax, 0x12471e(%rip)    # 0x12d825
movl $0x2a2a5354, 0x12471c(%rip) # imm = 0x2A2A5354
movb %r15b, 0x124719(%rip)   # 0x12d831
movl %r15d, 0x1246f1(%rip)   # 0x12d810
movl %ebx, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x62b0
movl %eax, 0x1246e1(%rip)    # 0x12d814
movl %r15d, 0x1246d6(%rip)   # 0x12d810
leaq 0x9c6cf(%rip), %r12     # 0xa5810
leaq 0x1246ea(%rip), %r14    # 0x12d832
cmpb $-0x1, 0x1e(%r12)
jne 0x9193
incl 0x1246ba(%rip)          # 0x12d810
movw %r15w, 0x1246d4(%rip)   # 0x12d832
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm0, 0x1246c4(%rip)   # 0x12d834
movups %xmm1, 0x1246cd(%rip)   # 0x12d844
movzwl 0x20(%r12), %eax
movw %ax, 0x1246d0(%rip)     # 0x12d854
movl $0x24, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x6af0
incq %r15
addq $0x22, %r12
cmpq $0x4000, %r15           # imm = 0x4000
jne 0x9148
leaq 0x124666(%rip), %rsi    # 0x12d810
movl $0x22, %edx
movl %ebx, %edi
callq 0x6af0
movl %ebx, %edi
callq 0x6220
xorl %eax, %eax
jmp 0x91c6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_GetPicInfo
void
JS_GetPicInfo(struct picattribtype *picattr, short picnum)
{
     long      amask=picanm[picnum];

     memset(picattr, 0, sizeof(struct picattribtype));

     picattr->numframes=amask&0x0000003F;     
     picattr->animtype =( amask&0x000000C0 )>>6;
     picattr->xcenteroffset=( amask&0x0000FF00 )>>8;
     picattr->ycenteroffset=( amask&0x00FF0000 )>>16;
     picattr->animspeed=( amask&0x0F000000 )>>24;
}

// Assembly:
movslq %esi, %rax
leaq 0x231884(%rip), %rcx    # 0x23aa60
movl (%rcx,%rax,4), %eax
movl %eax, %ecx
andb $0x3f, %cl
movb %cl, (%rdi)
movl %eax, %ecx
shrb $0x6, %cl
movb %cl, 0x1(%rdi)
movb %ah, 0x3(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x2(%rdi)
shrl $0x18, %eax
andb $0xf, %al
movb %al, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: JS_ChangeVelocity
int
JS_ChangeVelocity(short sn)
{
     char      what[50];

     sprintf(what, "sprite[%d].xvel  = ", sn);
     sprite[sn].xvel=getnumber16(what, sprite[sn].xvel, 10L, 0);

     sprintf(what, "sprite[%d].yvel  = ", sn);          
     sprite[sn].yvel=getnumber16(what, sprite[sn].yvel, 10L, 0);

     sprintf(what, "sprite[%d].zvel  = ", sn);
     sprite[sn].zvel=getnumber16(what, sprite[sn].zvel, 10L, 0);

     printmessage16("Velocities adjusted");

     keystatus[56]=1;
     keystatus[15]=1;

 return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebp
leaq 0x69f56(%rip), %rsi     # 0x73cb6
movq %rsp, %rbx
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x6b00
movslq %ebp, %r14
imulq $0x2c, %r14, %r15
leaq 0x272f33(%rip), %r12    # 0x27ccb0
movswl 0x20(%r12,%r15), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1b432
movw %ax, 0x20(%r12,%r15)
leaq 0x69f2b(%rip), %rsi     # 0x73cca
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x6b00
movswl 0x22(%r12,%r15), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1b432
movw %ax, 0x22(%r12,%r15)
leaq 0x69f10(%rip), %rsi     # 0x73cde
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x6b00
movswl 0x24(%r12,%r15), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1b432
movw %ax, 0x24(%r12,%r15)
leaq 0x69ef5(%rip), %rdi     # 0x73cf2
callq 0x192c8
leaq 0x174487(%rip), %rax    # 0x17e290
movb $0x1, %cl
movb %cl, 0x38(%rax)
movb %cl, 0xf(%rax)
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: ExtShowWallData
void ExtShowWallData(short wallnum)       //F6
{
	if (qsetmode == 200)    //In 3D mode
	{
	}
	else
	{
		clearmidstatbar16();             //Clear middle of status bar

		sprintf(tempbuf,"Wall %d",wallnum);
		printext16(8,32,11,-1,tempbuf,0);
	}
}

// Assembly:
leaq 0x1aded9(%rip), %rax    # 0x1b8a28
cmpl $0xc8, (%rax)
jne 0xab58
retq
pushq %rbx
movl %edi, %ebx
callq 0x1adf6
movswl %bx, %edx
leaq 0x9ab76(%rip), %rbx     # 0xa56e0
leaq 0x694b3(%rip), %rsi     # 0x74024
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6b00
movl $0x8, %edi
movl $0x20, %esi
movl $0xb, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rbx, %r8
xorl %r9d, %r9d
popq %rbx
jmp 0x1915d
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: ExtShowSpriteData
void ExtShowSpriteData(short spritenum)   //F6
{
    if( elapsedtime == 1) {
         elapsedtime=0;
    }
    else if( copyext ) {
         copyext=0;
         JS_CopyExt(spritenum);
    }
    else if( recordext ) {
         recordext=0;
         JS_RecordExt(spritenum);
    }
    else {
         JS_ShowSpriteExts(spritenum);
    }
}

// Assembly:
cmpb $0x1, 0x9ab33(%rip)     # 0xa56d5
jne 0xabac
movb $0x0, 0x9ab2a(%rip)     # 0xa56d5
retq
cmpb $0x0, 0x9ab23(%rip)     # 0xa56d6
je 0xabc4
movb $0x0, 0x9ab1a(%rip)     # 0xa56d6
movswl %di, %edi
jmp 0x898b
cmpb $0x0, 0x9ab0c(%rip)     # 0xa56d7
je 0xabdc
movb $0x0, 0x9ab03(%rip)     # 0xa56d7
movswl %di, %edi
jmp 0x7320
movswl %di, %edi
jmp 0x73d7
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/bstub.c
// Function: ExtEditSpriteData
void ExtEditSpriteData(short spritenum)   //F8
{
     if (qsetmode == 200)    //In 3D mode
     {
          return;
     }
     cursprite=spritenum;
     curspritenum=0;
     if ( editvelocity == 1 ) {
          JS_ChangeVelocity(spritenum);
          editvelocity=0;
          keystatus[0x42]=0;
          return;
     }
     if ( docleanup == 1 ) {
          JS_CleanupExtensions();
          docleanup=0;
          keystatus[0x42]=0;
          return;
     }
     sprintf(tempbuf,"Current Sprite %d",cursprite);
     printmessage16(tempbuf);
     JS_EditSpriteExts(spritenum);
     keystatus[0x42]=0;
}

// Assembly:
leaq 0x1added(%rip), %rax    # 0x1b8a28
cmpl $0xc8, (%rax)
je 0xacd6
pushq %r14
pushq %rbx
subq $0x38, %rsp
cmpb $0x1, 0x9aa7f(%rip)     # 0xa56d4
jne 0xac68
movswl %di, %edi
callq 0x9d4b
movb $0x0, 0x9aa6e(%rip)     # 0xa56d4
jmp 0xacc4
cmpb $0x1, 0x9aa6b(%rip)     # 0xa56da
jne 0xac98
movups 0x68628(%rip), %xmm0    # 0x732a0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movl $0x2e2e2e, 0xf(%rdi)    # imm = 0x2E2E2E
callq 0x192c8
callq 0x70f4
movb $0x0, 0x9aa44(%rip)     # 0xa56da
jmp 0xacc4
movswl %di, %ebx
leaq 0x9aa3e(%rip), %r14     # 0xa56e0
leaq 0x69383(%rip), %rsi     # 0x7402c
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6b00
movq %r14, %rdi
callq 0x192c8
movl %ebx, %edi
callq 0x98ca
leaq 0x1735c5(%rip), %rax    # 0x17e290
movb $0x0, 0x42(%rax)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_restartvid
static int osdcmd_restartvid(const osdfuncparm_t *parm)
{
	extern int qsetmode;

	(void)parm;

	if (qsetmode != 200) return OSDCMD_OK;

	resetvideomode();
	if (setgamemode(fullscreen,xdim,ydim,bpp))
		buildputs("restartvid: Reset failed...\n");

	return OSDCMD_OK;
}

// Assembly:
pushq %rax
leaq 0x1ad3bc(%rip), %rax    # 0x1b8a28
cmpl $0xc8, (%rax)
jne 0xb6b3
callq 0x6efbb
leaq 0x172a28(%rip), %rax    # 0x17e0a8
movsbl (%rax), %edi
leaq 0x3fc962(%rip), %rax    # 0x407fec
movl (%rax), %esi
leaq 0x3fc95d(%rip), %rax    # 0x407ff0
movl (%rax), %edx
leaq 0x172a08(%rip), %rax    # 0x17e0a4
movl (%rax), %ecx
callq 0x33e08
testl %eax, %eax
je 0xb6b3
leaq 0x69919(%rip), %rdi     # 0x74fc7
callq 0x32d18
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_vidmode
static int osdcmd_vidmode(const osdfuncparm_t *parm)
{
	int newx = xdim, newy = ydim, newbpp = bpp, newfullscreen = fullscreen;
	extern int qsetmode;

	if (qsetmode != 200) return OSDCMD_OK;

	if (parm->numparms < 1 || parm->numparms > 4) {
		return OSDCMD_SHOWHELP;
	}

	if (parm->numparms == 4) {
		// fs, res, bpp switch
		newfullscreen = (atoi(parm->parms[3]) != 0);
	}
	if (parm->numparms >= 3) {
		// res & bpp switch
		newbpp = atoi(parm->parms[2]);
	}
	if (parm->numparms >= 2) {
		// res switch
		newy = atoi(parm->parms[1]);
		newx = atoi(parm->parms[0]);
	}
	if (parm->numparms == 1) {
		// bpp switch
		newbpp = atoi(parm->parms[0]);
	}

	if (setgamemode(newfullscreen,newx,newy,newbpp))
		buildputs("vidmode: Mode change failed!\n");
	xdimgame = newx;
	ydimgame = newy;
	bppgame = newbpp;
	fullscreen = newfullscreen;
	return OSDCMD_OK;
}

// Assembly:
leaq 0x1ad36a(%rip), %rcx    # 0x1b8a28
xorl %eax, %eax
cmpl $0xc8, (%rcx)
jne 0xb782
movl (%rdi), %ecx
leal -0x5(%rcx), %edx
movl $0x1, %eax
cmpl $-0x4, %edx
jb 0xb782
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1729b7(%rip), %r15    # 0x17e0a8
cmpl $0x4, %ecx
jne 0xb70e
movq 0x10(%rdi), %r13
movq 0x18(%r13), %rdi
callq 0x6310
xorl %r12d, %r12d
testl %eax, %eax
setne %r12b
jmp 0xb71a
movl (%r15), %r12d
cmpl $0x3, %ecx
jb 0xb783
movq 0x10(%rdi), %r13
movq 0x10(%r13), %rdi
callq 0x6310
movl %eax, %ebx
movq 0x8(%r13), %rdi
callq 0x6310
movl %eax, %ebp
movq (%r13), %rdi
callq 0x6310
movl %eax, %r14d
movsbl %r12b, %edi
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x33e08
testl %eax, %eax
je 0xb75c
leaq 0x6988d(%rip), %rdi     # 0x74fe4
callq 0x32d18
movl %r14d, 0x9887d(%rip)    # 0xa3fe0
movl %ebp, 0x9887b(%rip)     # 0xa3fe4
movl %ebx, 0x98879(%rip)     # 0xa3fe8
movl %r12d, (%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rdi), %r13
cmpl $0x2, %ecx
jne 0xb797
leaq 0x172911(%rip), %rax    # 0x17e0a4
movl (%rax), %ebx
jmp 0xb725
leaq 0x3fc84e(%rip), %rax    # 0x407fec
movl (%rax), %r14d
leaq 0x3fc848(%rip), %rax    # 0x407ff0
movl (%rax), %ebp
movq (%r13), %rdi
callq 0x6310
movl %eax, %ebx
jmp 0xb73c