LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yylex_destroy
int yylex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		yypop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	yyfree(yyg->yy_buffer_stack , yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        yyfree( yyg->yy_start_stack , yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    yyfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x594b
movq 0x18(%rbx), %rax
movq (%rdi,%rax,8), %rax
testq %rax, %rax
je 0x594b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3280
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
movq %rbx, %rdi
callq 0x3370
jmp 0x5913
callq 0x3050
andq $0x0, 0x28(%rbx)
movq 0x60(%rbx), %rdi
callq 0x3050
movq %rbx, %rdi
callq 0x3050
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/doy[P]libvt100/src/screen.c
// Function: vt100_screen_new
VT100Screen *vt100_screen_new(int rows, int cols)
{
    VT100Screen *vt;

    vt = calloc(1, sizeof(VT100Screen));
    vt100_screen_init(vt);
    vt100_screen_set_window_size(vt, rows, cols);

    return vt;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
pushq $0x1
popq %rdi
pushq $0x50
popq %rsi
callq 0x33b0
movq %rax, %r14
movq %rax, %rdi
callq 0x34e0
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x36a0
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/doy[P]libvt100/src/screen.c
// Function: vt100_screen_ensure_capacity
static void vt100_screen_ensure_capacity(VT100Screen *vt, int size)
{
    int old_capacity = vt->grid->row_capacity;

    if (vt->grid->row_capacity >= size) {
        return;
    }

    if (vt->grid->row_capacity == 0) {
        vt->grid->row_capacity = vt->grid->max.row;
    }

    while (vt->grid->row_capacity < size) {
        vt->grid->row_capacity *= 1.5;
    }

    vt->grid->rows = realloc(
        vt->grid->rows, vt->grid->row_capacity * sizeof(struct vt100_row));
    memset(
        &vt->grid->rows[old_capacity], 0,
        (vt->grid->row_capacity - old_capacity) * sizeof(struct vt100_row));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movl 0x24(%rax), %ecx
cmpl %esi, %ecx
jge 0x5c09
movq %rdi, %rbx
movslq %ecx, %r14
testl %ecx, %ecx
jne 0x5c14
movl 0x8(%rax), %ecx
jmp 0x5c11
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %ecx, 0x24(%rax)
cmpl %esi, %ecx
jge 0x5c2a
cvtsi2sd %ecx, %xmm0
mulsd 0x3cbc(%rip), %xmm0     # 0x98e0
cvttsd2si %xmm0, %ecx
jmp 0x5c11
movq 0x30(%rax), %rdi
movslq %ecx, %rsi
shlq $0x4, %rsi
callq 0x3580
movq (%rbx), %rcx
movq %rax, 0x30(%rcx)
movq %r14, %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movslq 0x24(%rcx), %rdx
subq %r14, %rdx
shlq $0x4, %rdx
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32c0
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x6138
orb $0x20, 0x4a(%r15)
movq (%r15), %rcx
movslq 0x4(%rcx), %rax
testq %rax, %rax
jle 0x6138
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 0x6138
addq %rax, %rcx
andq $0x0, -0x18(%rcx)
leaq 0x3c(%r15), %r12
xorl %r13d, %r13d
pushq $0x1
popq %rbp
cmpq %r13, %rbx
je 0x61a4
movq %r15, %rdi
movl %ebp, %esi
callq 0x61b3
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
jmp 0x6142
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x61e6
pushq %rbx
movq %rdi, %rbx
movslq (%rax), %rcx
movq 0x30(%rax), %rdx
movslq 0x28(%rax), %rax
addq %rcx, %rax
shlq $0x4, %rax
orb $0x1, 0x8(%rdx,%rax)
callq 0x3560
movq (%rbx), %rax
andl $0x0, 0x4(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x63ea
movl 0x8(%rax), %r9d
leal -0x1(%r9), %r8d
cmpl %esi, %r9d
cmovgl %esi, %r8d
testl %edx, %edx
js 0x63f9
movl 0xc(%rax), %esi
leal -0x1(%rsi), %ecx
cmpl %edx, %esi
cmovgl %edx, %ecx
testb $0x1, 0x4a(%rdi)
je 0x640d
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_O2/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
xorl %r14d, %r14d
movq (%rbx), %rax
cmpl 0x8(%rax), %r14d
jge 0x6458
movq 0x30(%rax), %r15
movslq 0x28(%rax), %r12
addq %r14, %r12
shlq $0x4, %r12
movq (%r15,%r12), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r12)
incq %r14
jmp 0x6422
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq 0x30(%rax), %r14
movslq 0x28(%rax), %r15
addq %rcx, %r15
shlq $0x4, %r15
movslq 0x4(%rax), %rdi
movslq 0xc(%rax), %rdx
subq %rdi, %rdx
shlq $0x5, %rdi
addq (%r14,%r15), %rdi
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r14,%r15)
movq (%rbx), %rax
movslq (%rax), %r14
incq %r14
cmpl 0x8(%rax), %r14d
jge 0x64e8
movq 0x30(%rax), %r15
movslq 0x28(%rax), %r12
addq %r14, %r12
shlq $0x4, %r12
movq (%r15,%r12), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r12)
movq (%rbx), %rax
jmp 0x64b2
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
movq (%rbx), %rax
movl (%rax), %edx
movl 0x28(%rax), %ecx
leal -0x1(%rdx), %esi
movq 0x30(%rax), %r14
cmpl %esi, %ebp
jge 0x653d
addl %ebp, %ecx
movslq %ecx, %r15
shlq $0x4, %r15
movq (%r14,%r15), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r14,%r15)
incl %ebp
jmp 0x6504
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movq (%r14,%rcx), %rdi
movslq 0x4(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rcx
movl 0xc(%rcx), %eax
movslq 0x4(%rcx), %rsi
subl %esi, %eax
subl %r14d, %eax
jle 0x66bf
movq 0x30(%rcx), %r15
movslq 0x28(%rcx), %rdx
movslq (%rcx), %r12
addq %rdx, %r12
shlq $0x4, %r12
movq (%r15,%r12), %rcx
leal (%rsi,%r14), %edx
movslq %edx, %rdi
shlq $0x5, %rdi
addq %rcx, %rdi
shlq $0x5, %rsi
addq %rcx, %rsi
movslq %eax, %rdx
shlq $0x5, %rdx
callq 0x35a0
movq (%rbx), %rax
movslq 0x4(%rax), %rdi
shlq $0x5, %rdi
addq (%r15,%r12), %rdi
movslq %r14d, %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r12)
jmp 0x66c7
movq %rbx, %rdi
callq 0x3680
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x8(%rax), %ecx
subl (%rax), %ecx
cmpl %esi, %ecx
jle 0x67ae
movl %esi, %r14d
movl 0x1c(%rax), %r15d
leal 0x1(%r15), %ebp
movl %ebp, %eax
subl %esi, %eax
movslq %eax, %r12
movq (%rbx), %rax
cmpl %r15d, %r12d
jg 0x672c
movq 0x30(%rax), %rcx
movslq 0x28(%rax), %rax
addq %r12, %rax
shlq $0x4, %rax
movq (%rcx,%rax), %rdi
callq 0x3050
incq %r12
jmp 0x6707
movslq (%rax), %rcx
movslq 0x28(%rax), %r15
addq %rcx, %r15
shlq $0x4, %r15
addq 0x30(%rax), %r15
movslq %r14d, %r12
shlq $0x4, %r12
leaq (%r15,%r12), %rdi
subl %ecx, %ebp
subl %r14d, %ebp
movslq %ebp, %rdx
shlq $0x4, %rdx
movq %r15, %rsi
callq 0x35a0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x32c0
movq (%rbx), %rax
movl (%rax), %ecx
movslq %ecx, %r12
pushq $0x20
popq %r15
addl %r14d, %ecx
cmpl %ecx, %r12d
jge 0x67be
movq 0x30(%rax), %r13
movslq 0x28(%rax), %rbp
addq %r12, %rbp
shlq $0x4, %rbp
movslq 0xc(%rax), %rdi
movq %r15, %rsi
callq 0x33b0
movq %rax, (%r13,%rbp)
andb $-0x2, 0x8(%r13,%rbp)
movq (%rbx), %rax
movl (%rax), %ecx
incq %r12
jmp 0x6776
movq %rbx, %rdi
callq 0x3330
movq %rbx, %rdi
callq 0x35c0
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_O2/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 %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rdx
movl 0xc(%rdx), %eax
movslq 0x4(%rdx), %rcx
movl %eax, %esi
subl %ecx, %esi
cmpl %r14d, %esi
jle 0x6855
movslq (%rdx), %rsi
movq 0x30(%rdx), %r15
movslq 0x28(%rdx), %r12
addq %rsi, %r12
shlq $0x4, %r12
movq (%r15,%r12), %rdx
movq %rcx, %rdi
shlq $0x5, %rdi
addq %rdx, %rdi
addl %r14d, %ecx
movslq %ecx, %rsi
subl %esi, %eax
shlq $0x5, %rsi
addq %rdx, %rsi
movslq %eax, %rdx
shlq $0x5, %rdx
callq 0x35a0
movq (%rbx), %rax
movslq 0xc(%rax), %rdi
movslq %r14d, %rdx
subq %rdx, %rdi
shlq $0x5, %rdi
addq (%r15,%r12), %rdi
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r15,%r12)
jmp 0x685d
movq %rbx, %rdi
callq 0x3680
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movq (%rdi), %rdx
movl 0xc(%rdx), %ecx
movslq 0x4(%rdx), %rax
subl %eax, %ecx
cmpl %esi, %ecx
jle 0x69bb
movslq (%rdx), %rdi
movslq 0x28(%rdx), %rcx
addq %rdi, %rcx
shlq $0x4, %rcx
addq 0x30(%rdx), %rcx
addl %eax, %esi
movslq %esi, %rdx
movq %rax, %rsi
shlq $0x5, %rsi
orq $0x8, %rsi
cmpq %rdx, %rax
jge 0x69c3
movq (%rcx), %rdi
andq $0x0, (%rdi,%rsi)
incq %rax
addq $0x20, %rsi
jmp 0x69a5
movq %rbx, %rdi
callq 0x3680
orb $0x20, 0x4a(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x18(%rax), %r15d
movl 0x1c(%rax), %r13d
movl %r13d, %r12d
subl %r15d, %r12d
movl %r12d, %r14d
subl %esi, %r14d
jge 0x6a33
xorl %r14d, %r14d
cmpl %r12d, %r14d
jg 0x6ad7
movq (%rbx), %rax
movq 0x30(%rax), %r13
leal (%r15,%r14), %ecx
addl 0x28(%rax), %ecx
movslq %ecx, %rbp
shlq $0x4, %rbp
movq (%r13,%rbp), %rdi
movslq 0xc(%rax), %rdx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x32c0
andb $-0x2, 0x8(%r13,%rbp)
incl %r14d
jmp 0x69f6
movslq %r15d, %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
testl %esi, %esi
movl %esi, 0xc(%rsp)
cmovgl %esi, %ebp
movl %ebp, %r12d
subl $0x1, %r12d
jb 0x6a70
movq (%rbx), %rax
movq 0x30(%rax), %rcx
movl 0x28(%rax), %eax
addl %r13d, %eax
cltq
shlq $0x4, %rax
movq (%rcx,%rax), %rdi
callq 0x3050
decl %r13d
jmp 0x6a49
movq (%rbx), %rax
movslq 0x28(%rax), %rsi
addq 0x10(%rsp), %rsi
shlq $0x4, %rsi
addq 0x30(%rax), %rsi
movslq 0xc(%rsp), %rdi
shlq $0x4, %rdi
addq %rsi, %rdi
incl %r14d
movslq %r14d, %rdx
shlq $0x4, %rdx
callq 0x35a0
pushq $0x20
popq %r14
subl $0x1, %ebp
jb 0x6ad7
movq (%rbx), %rax
movq 0x30(%rax), %r12
movl 0x28(%rax), %ecx
addl %r15d, %ecx
movslq %ecx, %r13
shlq $0x4, %r13
movslq 0xc(%rax), %rdi
movq %r14, %rsi
callq 0x33b0
movq %rax, (%r12,%r13)
andb $-0x2, 0x8(%r12,%r13)
incl %r15d
jmp 0x6aa3
orb $0x20, 0x4a(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6de1
movq (%r14), %rax
movl 0xc(%rax), %eax
decl %eax
cmpl %r8d, %eax
jg 0x6de1
cmpl %ebx, %ebp
jg 0x6ddc
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
movq 0x6210(%rip), %rax      # 0xcff8
movq (%rax), %rcx
leaq 0x2b2e(%rip), %rdi      # 0x9920
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x3630
jmp 0x6dbd
// File: /workspace/github_c_makefile_star2_O2/doy[P]libvt100/src/screen.c
// Function: vt100_screen_use_alternate_buffer
void vt100_screen_use_alternate_buffer(VT100Screen *vt)
{
    if (vt->alternate) {
        return;
    }

    vt->alternate = vt->grid;
    vt->grid = calloc(1, sizeof(struct vt100_grid));
    vt100_screen_set_window_size(
        vt, vt->alternate->max.row, vt->alternate->max.col
    );

    vt->dirty = 1;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x6e73
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, 0x8(%rdi)
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0x33b0
movq %rax, (%rbx)
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
movq %rbx, %rdi
callq 0x36a0
orb $0x20, 0x4a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6f12
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movslq 0x20(%rax), %rcx
movq 0x30(%rax), %rdi
cmpq %rcx, %r15
jge 0x6ee2
movq (%rdi,%r14), %rdi
callq 0x3050
incq %r15
addq $0x10, %r14
jmp 0x6ec0
callq 0x3050
movq (%rbx), %rdi
callq 0x3050
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x36a0
orb $0x20, 0x4a(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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), %rcx
movq 0x30(%rcx), %rax
movslq %esi, %rdx
shlq $0x4, %rdx
movq (%rax,%rdx), %rax
movl 0xc(%rcx), %edx
xorl %esi, %esi
testl %edx, %edx
movl $0x0, %edi
cmovgl %edx, %edi
leaq 0x8(%rax), %r8
pushq $-0x1
popq %rcx
cmpq %rsi, %rdi
je 0x7078
cmpq $0x0, (%r8)
cmovnel %esi, %ecx
incq %rsi
addq $0x20, %r8
jmp 0x7063
cmpl $-0x1, %ecx
je 0x7096
decl %edx
cmpl %edx, %ecx
jge 0x7099
movslq %ecx, %rdx
shlq $0x5, %rdx
movzbl 0x1c(%rax,%rdx), %eax
andl $0x1, %eax
incl %eax
jmp 0x709c
xorl %eax, %eax
retq
pushq $0x1
popq %rax
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movslq 0x20(%rax), %rcx
movq 0x30(%rax), %rdi
cmpq %rcx, %r15
jge 0x72e1
movq (%rdi,%r14), %rdi
callq 0x3050
incq %r15
addq $0x10, %r14
jmp 0x72bf
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 0x3530
movq 0x10(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O2/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 0x73ad
movq %rcx, %xmm0
punpckldq 0x25a0(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x25a8(%rip), %xmm0     # 0x9910
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x2564(%rip), %xmm1     # 0x98e0
cvttsd2si %xmm1, %rcx
movq %rcx, %rdi
subsd 0x255c(%rip), %xmm1     # 0x98e8
cvttsd2si %xmm1, %rsi
sarq $0x3f, %rdi
andq %rdi, %rsi
orq %rcx, %rsi
movq %rsi, (%rdx)
movq %rax, %rdi
callq 0x3580
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
nop
// File: /workspace/github_c_makefile_star2_O2/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:
subq $0x38, %rsp
movups 0x612f5(%rip), %xmm0    # 0x6820b
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x612d7(%rip), %xmm0    # 0x681fb
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x1e(%rdi)
pushq $0x2
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1953c
cmpw $0x1, %ax
jne 0x6f79
pushq $0xc
popq %rax
leaq 0x612dd(%rip), %rdi     # 0x6822e
leaq 0x26ed58(%rip), %rcx    # 0x275cb0
cmpq $0xb000c, %rax          # imm = 0xB000C
je 0x6f80
movzwl (%rcx,%rax), %edx
testb $0x1, %dl
je 0x6f73
orl $0x100, %edx            # imm = 0x100
movw %dx, (%rcx,%rax)
addq $0x2c, %rax
jmp 0x6f58
leaq 0x612a1(%rip), %rdi     # 0x68221
callq 0x177d3
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1906e
movslq %ebx, %rax
imulq $0x2c, %rax, %rax
leaq 0x26eac5(%rip), %rcx    # 0x275cb0
movzwl 0x2a(%rcx,%rax), %eax
testw %ax, %ax
js 0x725a
movw %ax, 0x8551c(%rip)      # 0x8c718
movswl %bx, %edi
callq 0x727f
leaq 0x6107a(%rip), %rsi     # 0x68285
movq %rsp, %r14
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6b00
movq %r14, %rdi
callq 0x177d3
movswq 0x854ee(%rip), %rax     # 0x8c718
imulq $0x22, %rax, %rax
leaq 0x975db(%rip), %rcx     # 0x9e810
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movups %xmm0, 0x9759b(%rip)    # 0x9e7e0
movups %xmm1, 0x975a4(%rip)    # 0x9e7f0
movzwl 0x20(%rax,%rcx), %eax
movw %ax, 0x975a8(%rip)      # 0x9e800
jmp 0x7277
movups 0x61014(%rip), %xmm0    # 0x68275
movq %rsp, %rdi
movups %xmm0, 0xe(%rdi)
movups 0x60ff8(%rip), %xmm0    # 0x68267
movaps %xmm0, (%rdi)
callq 0x177d3
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
imulq $0x22, %rax, %rax
leaq 0x963b7(%rip), %rcx     # 0x9e810
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
andw $0x0, 0x20(%rax,%rcx)
movslq %edi, %rdx
imulq $0x2c, %rdx, %rdx
leaq 0x26d837(%rip), %rsi    # 0x275cb0
movzwl 0x1a(%rsi,%rdx), %edi
movw %di, 0x8(%rax,%rcx)
movzwl 0xe(%rsi,%rdx), %edx
movw %dx, 0xa(%rax,%rcx)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x26d7ea(%rip), %rcx    # 0x275cb0
movswq 0x2a(%rcx,%rax), %rbx
imulq $0x22, %rbx, %rax
leaq 0x96339(%rip), %rcx     # 0x9e810
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%rcx)
andw $0x0, 0x20(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
leaq 0x1a9538(%rip), %rax    # 0x1b1a28
cmpl $0xc8, (%rax)
je 0x8504
leaq 0x5fe82(%rip), %rdi     # 0x68381
callq 0x177d3
cmpw 0x8420d(%rip), %bx      # 0x8c718
jne 0x8515
orw $-0x1, 0x84203(%rip)    # 0x8c718
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5fe84(%rip), %xmm0    # 0x683a7
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x5fe66(%rip), %xmm0    # 0x68397
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x1d(%rdi)
pushq $0x2
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1953c
leaq 0x5fccc(%rip), %rbx     # 0x68221
cmpw $0x1, %ax
jne 0x85d8
movups 0x5fe6a(%rip), %xmm0    # 0x683cc
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x5fe4c(%rip), %xmm0    # 0x683bc
movaps %xmm0, (%rdi)
movw $0x20, 0x20(%rdi)
pushq $0x2
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1953c
cmpw $0x1, %ax
jne 0x85d8
xorl %eax, %eax
leaq 0x9627c(%rip), %rcx     # 0x9e810
xorps %xmm0, %xmm0
cmpq $0x88000, %rax          # imm = 0x88000
je 0x85b4
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
andw $0x0, 0x20(%rax,%rcx)
addq $0x22, %rax
jmp 0x8597
pushq $0x2a
popq %rax
leaq 0x5fe20(%rip), %rbx     # 0x683de
leaq 0x26d6eb(%rip), %rcx    # 0x275cb0
cmpq $0xb002a, %rax          # imm = 0xB002A
je 0x85d8
orw $-0x1, (%rcx,%rax)
addq $0x2c, %rax
jmp 0x85c5
movq %rbx, %rdi
callq 0x177d3
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5fe11(%rip), %xmm0    # 0x68409
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x5fdf3(%rip), %xmm0    # 0x683f9
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x20(%rdi)
pushq $0x2
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1953c
leaq 0x5fbf7(%rip), %rbx     # 0x68221
cmpw $0x1, %ax
jne 0x86be
movups 0x5fdf6(%rip), %xmm0    # 0x68431
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x5fdd8(%rip), %xmm0    # 0x68421
movaps %xmm0, (%rdi)
movabsq $0x204f4e3d302020, %rax # imm = 0x204F4E3D302020
movq %rax, 0x1d(%rdi)
pushq $0x2
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1953c
cmpw $0x1, %ax
jne 0x86be
leaq 0x26d63d(%rip), %r14    # 0x275cb0
addq $0x2a, %r14
leaq 0x96192(%rip), %r15     # 0x9e810
xorl %r12d, %r12d
leaq 0x5fdbe(%rip), %rbx     # 0x68446
cmpq $0x4000, %r12           # imm = 0x4000
je 0x86be
movswl %r12w, %edi
callq 0x335fc
andw $0x0, 0x20(%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
orw $-0x1, (%r14)
movups %xmm0, 0x10(%r15)
incq %r12
addq $0x22, %r15
addq $0x2c, %r14
jmp 0x8688
movq %rbx, %rdi
callq 0x177d3
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
pushq $0x2a
popq %rcx
leaq 0x26d46f(%rip), %rdx    # 0x275cb0
cmpq $0xb002a, %rcx          # imm = 0xB002A
je 0x885d
xorl %esi, %esi
cmpw $-0x1, (%rdx,%rcx)
setne %sil
addl %esi, %eax
addq $0x2c, %rcx
jmp 0x8841
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x5fd4f(%rip), %rdi     # 0x685c0
callq 0x30c8d
pushq $0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x6490
cmpl $-0x1, %eax
je 0x898d
movl %eax, %ebx
xorps %xmm0, %xmm0
movups %xmm0, 0x11df86(%rip)   # 0x126820
movups %xmm0, 0x11df6f(%rip)   # 0x126810
andw $0x0, 0x11df87(%rip)    # 0x126830
leaq 0x11df68(%rip), %rdi    # 0x126818
pushq $0xc
popq %rdx
movq %r14, %rsi
callq 0x6190
xorl %r12d, %r12d
movb %r12b, 0x11df5f(%rip)   # 0x126824
movabsq $0x58455f50414d2a2a, %rax # imm = 0x58455F50414D2A2A
movq %rax, 0x11df4f(%rip)    # 0x126825
movl $0x2a2a5354, 0x11df4d(%rip) # imm = 0x2A2A5354
movb %r12b, 0x11df4a(%rip)   # 0x126831
andl $0x0, 0x11df22(%rip)    # 0x126810
pushq $0x2
popq %rdx
movl %ebx, %edi
xorl %esi, %esi
callq 0x62b0
movl %eax, 0x11df14(%rip)    # 0x126814
andl $0x0, 0x11df09(%rip)    # 0x126810
leaq 0x95f02(%rip), %r13     # 0x9e810
leaq 0x11df1d(%rip), %r14    # 0x126832
pushq $0x24
popq %r15
cmpq $0x4000, %r12           # imm = 0x4000
je 0x8971
cmpb $-0x1, 0x1e(%r13)
jne 0x8968
incl 0x11dee1(%rip)          # 0x126810
movw %r12w, 0x11defb(%rip)   # 0x126832
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm0, 0x11deec(%rip)   # 0x126834
movups %xmm1, 0x11def5(%rip)   # 0x126844
movzwl 0x20(%r13), %eax
movw %ax, 0x11def9(%rip)     # 0x126854
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6af0
incq %r12
addq $0x22, %r13
jmp 0x8919
leaq 0x11de98(%rip), %rsi    # 0x126810
pushq $0x22
popq %rdx
movl %ebx, %edi
callq 0x6af0
movl %ebx, %edi
callq 0x6220
xorl %eax, %eax
jmp 0x8990
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x22b0bc(%rip), %rcx    # 0x233a60
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_O2/jonof[P]jftekwar/src/bstub.c
// Function: JS_GetNumInClass
void
JS_GetNumInClass(void)
{
     short i;

     for( i=0; i<MAXCLASSES; i++ ) {
          numinclass[i]=0;
     }
     for( i=0; i<MAXSPRITES; i++ ) {
          if( spriteXT[i].lock == 0xFF ) {
               numinclass[spriteXT[i].class]++;
          }
     }

 return;
}

// Assembly:
xorl %ecx, %ecx
leaq 0x11db10(%rip), %rax    # 0x126860
cmpq $0x1e, %rcx
je 0x8d61
andw $0x0, (%rcx,%rax)
addq $0x2, %rcx
jmp 0x8d50
pushq $0x1e
popq %rcx
leaq 0x95aa5(%rip), %rdx     # 0x9e810
cmpq $0x8801e, %rcx          # imm = 0x8801E
je 0x8d89
cmpb $-0x1, (%rcx,%rdx)
jne 0x8d83
movzbl -0x1e(%rcx,%rdx), %esi
incw (%rax,%rsi,2)
addq $0x22, %rcx
jmp 0x8d6b
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5fa8f(%rip), %rsi     # 0x68c74
movq %rsp, %rbx
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x6b00
movslq %ebp, %r14
imulq $0x2c, %r14, %r15
leaq 0x26caae(%rip), %r12    # 0x275cb0
movswl 0x20(%r12,%r15), %esi
pushq $0xa
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x1953c
movw %ax, 0x20(%r12,%r15)
leaq 0x5fa64(%rip), %rsi     # 0x68c88
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x6b00
movswl 0x22(%r12,%r15), %esi
movq %rbx, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x1953c
movw %ax, 0x22(%r12,%r15)
leaq 0x5fa4c(%rip), %rsi     # 0x68c9c
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x6b00
movswl 0x24(%r12,%r15), %esi
movq %rbx, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x1953c
movw %ax, 0x24(%r12,%r15)
leaq 0x5fa34(%rip), %rdi     # 0x68cb0
callq 0x177d3
leaq 0x16e008(%rip), %rax    # 0x177290
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_O2/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 0x1a7bb6(%rip), %rax    # 0x1b1a28
cmpl $0xc8, (%rax)
jne 0x9e7b
retq
pushq %rbx
movl %edi, %ebx
callq 0x1906e
movswl %bx, %edx
leaq 0x94853(%rip), %rbx     # 0x9e6e0
leaq 0x5f14e(%rip), %rsi     # 0x68fe2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6b00
pushq $0x8
popq %rdi
pushq $0x20
popq %rsi
pushq $0xb
popq %rdx
pushq $-0x1
popq %rcx
movq %rbx, %r8
xorl %r9d, %r9d
popq %rbx
jmp 0x176c0
// File: /workspace/github_c_makefile_star2_O2/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, 0x94818(%rip)     # 0x9e6d5
jne 0x9ec7
movb $0x0, 0x9480f(%rip)     # 0x9e6d5
retq
cmpb $0x0, 0x94808(%rip)     # 0x9e6d6
je 0x9edf
movb $0x0, 0x947ff(%rip)     # 0x9e6d6
movswl %di, %edi
jmp 0x8286
cmpb $0x0, 0x947f1(%rip)     # 0x9e6d7
je 0x9ef7
movb $0x0, 0x947e8(%rip)     # 0x9e6d7
movswl %di, %edi
jmp 0x71cf
movswl %di, %edi
jmp 0x727f
// File: /workspace/github_c_makefile_star2_O2/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 0x1a7ad2(%rip), %rax    # 0x1b1a28
cmpl $0xc8, (%rax)
je 0x9fd1
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0x9476b(%rip)     # 0x9e6d4
jne 0x9f7c
movswl %di, %edi
callq 0x91d0
movb $0x0, 0x9475a(%rip)     # 0x9e6d4
jmp 0x9fbf
cmpb $0x1, 0x94757(%rip)     # 0x9e6da
jne 0x9f93
callq 0x6f8a
movb $0x0, 0x94749(%rip)     # 0x9e6da
jmp 0x9fbf
movswl %di, %ebx
leaq 0x94743(%rip), %r14     # 0x9e6e0
leaq 0x5f046(%rip), %rsi     # 0x68fea
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6b00
movq %r14, %rdi
callq 0x177d3
movl %ebx, %edi
callq 0x8d8a
leaq 0x16d2ca(%rip), %rax    # 0x177290
movb $0x0, 0x42(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1a7141(%rip), %rax    # 0x1b1a28
cmpl $0xc8, (%rax)
jne 0xa92e
callq 0x6370e
leaq 0x16c7ad(%rip), %rax    # 0x1770a8
movsbl (%rax), %edi
leaq 0x3f66e7(%rip), %rax    # 0x400fec
movl (%rax), %esi
leaq 0x3f66e2(%rip), %rax    # 0x400ff0
movl (%rax), %edx
leaq 0x16c78d(%rip), %rax    # 0x1770a4
movl (%rax), %ecx
callq 0x30e98
testl %eax, %eax
je 0xa92e
leaq 0x5f5de(%rip), %rdi     # 0x69f07
callq 0x30c8d
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1a70e4(%rip), %rax    # 0x1b1a28
xorl %ebx, %ebx
cmpl $0xc8, (%rax)
jne 0xa9f9
movl (%rdi), %eax
leal -0x5(%rax), %ecx
cmpl $-0x4, %ecx
jae 0xa964
pushq $0x1
popq %rbx
jmp 0xa9f9
leaq 0x16c73d(%rip), %rcx    # 0x1770a8
cmpl $0x4, %eax
jne 0xa989
movq 0x10(%rdi), %r12
movq 0x18(%r12), %rdi
callq 0x6310
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
jmp 0xa995
movl (%rcx), %r13d
cmpl $0x3, %eax
jb 0xaa0a
movq 0x10(%rdi), %r12
movq 0x10(%r12), %rdi
callq 0x6310
movl %eax, %ebp
movq 0x8(%r12), %rdi
callq 0x6310
movl %eax, %r14d
movq (%r12), %rdi
callq 0x6310
movl %eax, %r15d
movsbl %r13b, %edi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x30e98
testl %eax, %eax
je 0xa9db
leaq 0x5f54e(%rip), %rdi     # 0x69f24
callq 0x30c8d
movl %r15d, 0x925fe(%rip)    # 0x9cfe0
movl %r14d, 0x925fb(%rip)    # 0x9cfe4
movl %ebp, 0x925f9(%rip)     # 0x9cfe8
leaq 0x16c6b2(%rip), %rax    # 0x1770a8
movl %r13d, (%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rdi), %r12
cmpl $0x2, %eax
jne 0xaa1e
leaq 0x16c68a(%rip), %rax    # 0x1770a4
movl (%rax), %ebp
jmp 0xa9a1
leaq 0x3f65c7(%rip), %rax    # 0x400fec
movl (%rax), %r15d
leaq 0x3f65c1(%rip), %rax    # 0x400ff0
movl (%rax), %r14d
movq (%r12), %rdi
callq 0x6310
movl %eax, %ebp
jmp 0xa9ba
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_mapversion
static int osdcmd_mapversion(const osdfuncparm_t *parm)
{
	int newversion;

	if (parm->numparms < 1) {
		buildprintf("mapversion is %d\n", mapversion);
		return OSDCMD_OK;
	}
	newversion = atoi(parm->parms[0]);
	if (newversion < 5 || newversion > 8) {
		return OSDCMD_SHOWHELP;
	}

	buildprintf("mapversion is now %d (was %d)\n", newversion, mapversion);
	mapversion = newversion;

	return OSDCMD_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, (%rdi)
jle 0xaa69
movq 0x10(%rdi), %rax
movq (%rax), %rdi
callq 0x6310
movl %eax, %r14d
leal -0x9(%r14), %eax
cmpl $-0x4, %eax
jae 0xaa84
pushq $0x1
popq %rbx
jmp 0xaaa4
leaq 0x92d28(%rip), %rax     # 0x9d798
movl (%rax), %esi
leaq 0x5f4c9(%rip), %rdi     # 0x69f42
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22427
jmp 0xaaa4
leaq 0x92d0d(%rip), %r15     # 0x9d798
movl (%r15), %edx
leaq 0x5f4bf(%rip), %rdi     # 0x69f54
xorl %ebx, %ebx
movl %r14d, %esi
xorl %eax, %eax
callq 0x22427
movl %r14d, (%r15)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq