LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_sprintf
static inline int str_sprintf(string_t* str, const char* format, ...) {
    va_list args[2];
    size_t newcapacity;
    void*  newp;
    int    ret;

    va_start(args[0], format);
    ret = vsnprintf(str->str, str->capacity, format, args[0]);
    va_end(args[0]);

    if((newcapacity = ret + 4) > str->capacity) {
        if((newp = realloc(str->str, newcapacity)) != NULL) {
            str->capacity = newcapacity;
            str->str = newp;

            va_start(args[1], format);
            ret = vsnprintf(str->str, str->capacity, format, args[0]);
            va_end(args[1]);
        } else {
            STRING_UTILS_ON_ALLOC_FAIL();
            return -1;
        }
    }
    str->len = strlen(str->str);

    va_end(args[0]);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x16841
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x1080
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rax
movl -0x54(%rbp), %eax
addl $0x4, %eax
cltq
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1696b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x11c0
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x1694c
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
leaq -0x40(%rbp), %rax
addq $0x18, %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x1080
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rax
addq $0x18, %rax
jmp 0x16969
movq 0x46a5(%rip), %rax      # 0x1aff8
movq (%rax), %rdi
leaq 0x1e97(%rip), %rsi      # 0x187f4
movb $0x0, %al
callq 0x1150
callq 0x1040
jmp 0x1696b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x10b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0x54(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/slimox-pack.c
// Function: encode_block
static inline int encode_block(buf_t* ib, ppm_model_t* ppm, FILE* fout) {
    buf_t* ob = buf_new();
    size_t pos_sync;
    size_t out_size;

    /* put block header */
    pos_sync = ftell(fout);
    if(fwrite(&ob->m_size, sizeof(ob->m_size), 1, fout) != 1) {
        buf_del(ob);
        return -1;
    }

    /* encode */
    out_size = slimox_encode(ib, ob, ppm, fout);

    /* rewrite block header */
    fseek(fout, pos_sync, SEEK_SET);
    if(fwrite(&out_size, sizeof(ob->m_size), 1, fout) != 1) {
        buf_del(ob);
        return -1;
    }
    fseek(fout, 0, SEEK_END);

    buf_del(ob);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
callq 0x17180
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1160
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1220
cmpq $0x1, %rax
je 0x169ed
movq -0x28(%rbp), %rdi
callq 0x16a80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16a68
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1350
cltq
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x11b0
movq -0x20(%rbp), %rcx
leaq -0x38(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x1220
cmpq $0x1, %rax
je 0x16a46
movq -0x28(%rbp), %rdi
callq 0x16a80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16a68
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x11b0
movq -0x28(%rbp), %rdi
callq 0x16a80
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/slimox-pack.c
// Function: decode_block
static inline int decode_block(buf_t* ob, ppm_model_t* ppm, FILE* fin) {
    buf_t* ib = buf_new();

    /* read block header */
    if(fread(&ib->m_size, sizeof(ib->m_size), 1, fin) != 1) {
        buf_del(ib);
        return -1;
    }
    buf_resize(ib, ib->m_size);

    /* read block data */
    if(fread(ib->m_data, ib->m_size, 1, fin) != 1) {
        buf_del(ib);
        return -1;
    }

    /* decode */
    buf_resize(ob, 0);
    slimox_decode(ib, ob, ppm);

    buf_del(ib);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
callq 0x17180
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
cmpq $0x1, %rax
je 0x16e60
movq -0x28(%rbp), %rdi
callq 0x16a80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16ed2
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x166b0
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
movq -0x20(%rbp), %rcx
movl $0x1, %edx
callq 0x1070
cmpq $0x1, %rax
je 0x16ea6
movq -0x28(%rbp), %rdi
callq 0x16a80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16ed2
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x166b0
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xec70
movq -0x28(%rbp), %rdi
callq 0x16a80
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/slimox-pack.c
// Function: file_item_from_path
static inline int file_item_from_path(struct file_item* item, const string_t* full_path, const string_t* root_path) {
    struct stat statbuf;

    if(stat(full_path->str, &statbuf) != -1 && (S_ISREG(statbuf.st_mode) || S_ISDIR(statbuf.st_mode))) {
        if(S_ISDIR(statbuf.st_mode)) {
            statbuf.st_size = 0;
        }
        item->m_mode = statbuf.st_mode;
        item->m_size = statbuf.st_size;
        str_assign(item->m_path_to_root, root_path->str);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x1170
cmpl $-0x1, %eax
je 0x16f85
movl -0x98(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x16f34
movl -0x98(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x16f85
movl -0x98(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x16f4e
movq $0x0, -0x80(%rbp)
movl -0x98(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x80(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x16fa0
movl $0x1, -0x4(%rbp)
jmp 0x16f8c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_assign
static inline void str_assign(string_t* str, const char* s) {
    char* newp;
    size_t slen = strlen(s);

    if((newp = realloc(str->str, slen + 4)) != NULL) {
        str->str = newp;
        strcpy(str->str, s);
        str->len = slen;
        str->capacity = slen + 4;
        return;
    }
    STRING_UTILS_ON_ALLOC_FAIL();
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x11c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1701a
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1050
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
addq $0x4, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
movq 0x3fd7(%rip), %rax      # 0x1aff8
movq (%rax), %rdi
leaq 0x17c9(%rip), %rsi      # 0x187f4
movb $0x0, %al
callq 0x1150
callq 0x1040
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/slimox-pack.c
// Function: file_item_new
static inline struct file_item* file_item_new() {
    struct file_item* item = malloc(sizeof(struct file_item));
    item->m_mode = 0;
    item->m_size = 0;
    item->m_path_to_root = str_new();
    return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x10, %edi
callq 0x1190
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
callq 0x17090
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_new
static inline string_t* str_new() {
    string_t* str;

    if((str = malloc(sizeof(string_t))) != NULL) {
        if((str->str = malloc(4)) != NULL) {
            str->str[0] = 0;
            str->len = 0;
            str->capacity = 1;
            return str;
        }
        free(str);
    }
    STRING_UTILS_ON_ALLOC_FAIL();
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x1190
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x170f9
movl $0x4, %edi
callq 0x1190
movq -0x8(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
je 0x170f0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
movq -0x8(%rbp), %rdi
callq 0x1030
movq 0x3ef8(%rip), %rax      # 0x1aff8
movq (%rax), %rdi
leaq 0x16ea(%rip), %rsi      # 0x187f4
movb $0x0, %al
callq 0x1150
callq 0x1040
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_substr
static inline void str_substr(string_t* str, size_t from, size_t to) {
    str->len = to - from + 1;
    memmove(str->str, str->str + from, str->len);
    str->str[str->len] = 0;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
subq -0x10(%rbp), %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
addq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
callq 0x11f0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/utils/string-utils.h
// Function: str_concat_chr
static inline void str_concat_chr(string_t* str, int c) {
    size_t newcapacity;
    void*  newp;

    if(str->len + 2 > str->capacity) {
        newcapacity = str->len * 2 + 4;
        if((newp = realloc(str->str, newcapacity)) != NULL) {
            str->capacity = newcapacity;
            str->str = newp;
        } else {
            STRING_UTILS_ON_ALLOC_FAIL();
            return;
        }
    }
    str->str[str->len] = c, str->len++;
    str->str[str->len] = 0;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x2, %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1725a
movq -0x8(%rbp), %rax
movq (%rax), %rax
shlq %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x11c0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1723b
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x17258
movq 0x3db6(%rip), %rax      # 0x1aff8
movq (%rax), %rdi
leaq 0x15a8(%rip), %rsi      # 0x187f4
movb $0x0, %al
callq 0x1150
callq 0x1040
jmp 0x1725a
movl -0xc(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/starfield_3d.c
// Function: main
int main(int arcg, char *argv[]) {
    scg_config_t config = scg_config_new_default();
    config.video.title = "SCG Example: Starfield 3D";

    scg_app_t app;
    scg_app_init(&app, config);

    srand(scg_get_performance_counter());

    starfield_t starfield;
    init(&starfield, &app, STARFIELD_NUM_STARS, STARFIELD_MAX_DISTANCE,
         STARFIELD_WORLD_SPEED);

    while (scg_app_process_events(&app)) {
        update(&starfield, &app);

        draw(app.draw_target, &starfield);

        scg_app_present(&app);
    }

    scg_app_free(&app);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4a10
leaq 0x1e73(%rip), %rax      # 0x85ac
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xa0(%rbp), %rdi
callq 0x4a60
callq 0x2690
movl %eax, %edi
callq 0x2260
leaq -0xc8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0xfa0, %edx            # imm = 0xFA0
movss 0x18ae(%rip), %xmm0     # 0x8038
movss 0x18aa(%rip), %xmm1     # 0x803c
callq 0x6800
leaq -0xa0(%rbp), %rdi
callq 0x56e0
testb $0x1, %al
jne 0x67a9
jmp 0x67da
leaq -0xc8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6a00
movq -0x68(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x6ba0
leaq -0xa0(%rbp), %rdi
callq 0x5830
jmp 0x6797
leaq -0xa0(%rbp), %rdi
callq 0x5ce0
xorl %eax, %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/starfield_3d.c
// Function: update
static void update(starfield_t *starfield, scg_app_t *app) {
    int w = app->draw_target->width;
    int h = app->draw_target->height;
    float32_t delta_time = app->delta_time;
    int num_stars = starfield->num_stars;

    for (int i = 0; i < num_stars; i++) {
        star_t *current = &starfield->stars[i];
        float32_t speed_modifier = (current->is_super_fast) ? 3.0f : 1.0f;
        current->z -= (starfield->world_speed * speed_modifier) * delta_time;

        if (current->z <= 0) {
            current->x = (float32_t)(rand() % w) - (float32_t)w / 2.0f;
            current->y = (float32_t)h / 2.0f - (float32_t)(rand() % h);
            current->z = starfield->max_distance + (float32_t)(rand() % 10);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x6b8d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb 0xc(%rax), %al
movss 0x15cd(%rip), %xmm0     # 0x8048
movss 0x1585(%rip), %xmm1     # 0x8008
movss %xmm1, -0x3c(%rbp)
testb $0x1, %al
movss %xmm0, -0x38(%rbp)
jne 0x6a9b
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movss 0x18(%rax), %xmm0
mulss -0x34(%rbp), %xmm0
movss -0x1c(%rbp), %xmm2
movq -0x30(%rbp), %rax
movss 0x8(%rax), %xmm1
movd %xmm0, %ecx
xorl $0x80000000, %ecx       # imm = 0x80000000
movd %ecx, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x8(%rax), %xmm0
jb 0x6b7d
callq 0x2080
cltd
idivl -0x14(%rbp)
cvtsi2ss %edx, %xmm0
cvtsi2ssl -0x14(%rbp), %xmm1
movss 0x1509(%rip), %xmm2     # 0x8010
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, (%rax)
cvtsi2ssl -0x18(%rbp), %xmm0
movss 0x14ec(%rip), %xmm1     # 0x8010
divss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
callq 0x2080
movss -0x44(%rbp), %xmm0
cltd
idivl -0x18(%rbp)
cvtsi2ss %edx, %xmm1
subss %xmm1, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movss 0x14(%rax), %xmm0
movss %xmm0, -0x40(%rbp)
callq 0x2080
movss -0x40(%rbp), %xmm0
movl $0xa, %ecx
cltd
idivl %ecx
cvtsi2ss %edx, %xmm1
addss %xmm1, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x8(%rax)
jmp 0x6b7f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6a49
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tlinehistlen
int
tlinehistlen(int y)
{
	int i = term.col;

	if (TLINE_HIST(y)[i - 1].mode & ATTR_WRAP)
		return i;

	while (i > 0 && TLINE_HIST(y)[i - 1].u == ' ')
		--i;

	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl 0x17167(%rip), %eax     # 0x1cee4
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl $0x7d0, %ecx            # imm = 0x7D0
subl 0x17152(%rip), %ecx     # 0x1cee0
addl $0x2, %ecx
cmpl %ecx, %eax
jg 0x5dab
movslq -0x8(%rbp), %rcx
leaq 0x17140(%rip), %rax     # 0x1cee0
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x5dcf
movq 0x17136(%rip), %rax     # 0x1cee8
movl -0x8(%rbp), %ecx
subl $0x7d0, %ecx            # imm = 0x7D0
addl 0x1711f(%rip), %ecx     # 0x1cee0
subl $0x3, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x5dfc
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e92
jmp 0x5dfe
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0x19(%rbp)
jle 0x5e75
movl -0x8(%rbp), %eax
movl $0x7d0, %ecx            # imm = 0x7D0
subl 0x170c9(%rip), %ecx     # 0x1cee0
addl $0x2, %ecx
cmpl %ecx, %eax
jg 0x5e34
movslq -0x8(%rbp), %rcx
leaq 0x170b7(%rip), %rax     # 0x1cee0
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0x5e58
movq 0x170ad(%rip), %rax     # 0x1cee8
movl -0x8(%rbp), %ecx
subl $0x7d0, %ecx            # imm = 0x7D0
addl 0x17096(%rip), %ecx     # 0x1cee0
subl $0x3, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x20, (%rax)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x5e7e
jmp 0x5e8c
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5dfe
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: selclear
void
selclear(void)
{
	if (sel.ob.x == -1)
		return;
	selremove();
	tsetdirt(sel.nb.y, sel.ne.y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, 0x16f81(%rip)    # 0x1cecc
jne 0x5f4f
jmp 0x5f65
callq 0x6820
movl 0x16f66(%rip), %edi     # 0x1cec0
movl 0x16f68(%rip), %esi     # 0x1cec8
callq 0x61f0
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: regionselected
int
regionselected(int x1, int y1, int x2, int y2)
{
	if (sel.ob.x == -1 || sel.mode == SEL_EMPTY ||
	    sel.alt != IS_SET(MODE_ALTSCREEN) || sel.nb.y > y2 || sel.ne.y < y1)
		return 0;

	return (sel.type == SEL_RECTANGULAR) ? sel.nb.x <= x2 && sel.ne.x >= x1
		: (sel.nb.y != y2 || sel.nb.x <= x2) &&
		  (sel.ne.y != y1 || sel.ne.x >= x1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
cmpl $-0x1, 0x16ab5(%rip)    # 0x1cecc
je 0x6457
cmpl $0x1, 0x16a90(%rip)     # 0x1ceb0
je 0x6457
movl 0x16ab4(%rip), %eax     # 0x1cedc
movl 0x1a98e(%rip), %ecx     # 0x20dbc
andl $0x4, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x6457
movl 0x16a79(%rip), %eax     # 0x1cec0
cmpl -0x14(%rbp), %eax
jg 0x6457
movl 0x16a76(%rip), %eax     # 0x1cec8
cmpl -0xc(%rbp), %eax
jge 0x6463
movl $0x0, -0x4(%rbp)
jmp 0x64e9
cmpl $0x2, 0x16a4a(%rip)     # 0x1ceb4
jne 0x6498
movl 0x16a4a(%rip), %ecx     # 0x1cebc
xorl %eax, %eax
cmpl -0x10(%rbp), %ecx
movb %al, -0x15(%rbp)
jg 0x648b
movl 0x16a42(%rip), %eax     # 0x1cec4
cmpl -0x8(%rbp), %eax
setge %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
jmp 0x64e3
movl 0x16a22(%rip), %eax     # 0x1cec0
cmpl -0x14(%rbp), %eax
jne 0x64b3
movl 0x16a13(%rip), %ecx     # 0x1cebc
xorl %eax, %eax
cmpl -0x10(%rbp), %ecx
movb %al, -0x1d(%rbp)
jg 0x64d8
movl 0x16a0f(%rip), %ecx     # 0x1cec8
movb $0x1, %al
cmpl -0xc(%rbp), %ecx
movb %al, -0x1e(%rbp)
jne 0x64d2
movl 0x169fb(%rip), %eax     # 0x1cec4
cmpl -0x8(%rbp), %eax
setge %al
movb %al, -0x1e(%rbp)
movb -0x1e(%rbp), %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tgetglyphs
char *
tgetglyphs(char *buf, const Glyph *gp, const Glyph *lgp)
{
	while (gp <= lgp)
		if (gp->mode & ATTR_WDUMMY) {
			gp++;
		} else {
			buf += utf8encode((gp++)->u, buf);
		}
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x6812
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x67ee
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
jmp 0x6810
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x10(%rbp)
movl (%rax), %edi
movq -0x8(%rbp), %rsi
callq 0x5bd0
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x67c4
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: sigchld
void
sigchld(int a)
{
	int stat;
	pid_t p;

	if ((p = waitpid(pid, &stat, WNOHANG)) < 0)
		die("waiting for pid %hd failed: %s\n", pid, strerror(errno));

	if (pid != p) {
		if (p == 0 && wait(&stat) < 0)
			die("wait: %s\n", strerror(errno));

		/* reinstall sigchld handler */
		signal(SIGCHLD, sigchld);
		return;
	}

	if (WIFEXITED(stat) && WEXITSTATUS(stat))
		die("child exited with status %d\n", WEXITSTATUS(stat));
	else if (WIFSIGNALED(stat))
		die("child terminated due to signal %d\n", WTERMSIG(stat));
	_exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0x19ed3(%rip), %edi     # 0x20de4
leaq -0x8(%rbp), %rsi
movl $0x1, %edx
callq 0x5530
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jge 0x6f50
movl 0x19eb7(%rip), %eax     # 0x20de4
movl %eax, -0x10(%rbp)
callq 0x55a0
movl (%rax), %edi
callq 0x5460
movl -0x10(%rbp), %esi
movq %rax, %rdx
leaq 0xea9e(%rip), %rdi      # 0x159e7
movb $0x0, %al
callq 0x5a80
movl 0x19e8e(%rip), %eax     # 0x20de4
cmpl -0xc(%rbp), %eax
je 0x6fa3
cmpl $0x0, -0xc(%rbp)
jne 0x6f8c
leaq -0x8(%rbp), %rdi
callq 0x5100
cmpl $0x0, %eax
jge 0x6f8c
callq 0x55a0
movl (%rax), %edi
callq 0x5460
movq %rax, %rsi
leaq 0xea82(%rip), %rdi      # 0x15a07
movb $0x0, %al
callq 0x5a80
movl $0x11, %edi
leaq -0x98(%rip), %rsi       # 0x6f00
callq 0x5060
addq $0x10, %rsp
popq %rbp
retq
movl -0x8(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x6fda
movl -0x8(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
cmpl $0x0, %eax
je 0x6fda
movl -0x8(%rbp), %esi
andl $0xff00, %esi           # imm = 0xFF00
sarl $0x8, %esi
leaq 0xea40(%rip), %rdi      # 0x15a11
movb $0x0, %al
callq 0x5a80
jmp 0x7003
movl -0x8(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x7001
movl -0x8(%rbp), %esi
andl $0x7f, %esi
leaq 0xea34(%rip), %rdi      # 0x15a2e
movb $0x0, %al
callq 0x5a80
jmp 0x7003
xorl %edi, %edi
callq 0x5230
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: kscrolldown
void
kscrolldown(const Arg* a)
{
	int n = a->i;

	if (!term.scr || IS_SET(MODE_ALTSCREEN))
		return;

	if (n < 0)
		n = MAX(term.row / -n, 1);

	if (n <= term.scr) {
		term.scr -= n;
	} else {
		n = term.scr;
		term.scr = 0;
	}

	if (sel.ob.x != -1 && !sel.alt)
		selmove(-n); /* negate change in term.scr */
	tfulldirt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, 0x19a2c(%rip)     # 0x20d78
je 0x735c
movl 0x19a68(%rip), %eax     # 0x20dbc
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7361
jmp 0x73ed
cmpl $0x0, -0xc(%rbp)
jge 0x739b
movl 0x15b73(%rip), %eax     # 0x1cee0
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x1, %eax
jge 0x7384
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7395
movl 0x15b56(%rip), %eax     # 0x1cee0
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x199d4(%rip), %eax     # 0x20d78
jg 0x73b9
movl -0xc(%rbp), %ecx
movl 0x199c9(%rip), %eax     # 0x20d78
subl %ecx, %eax
movl %eax, 0x199c1(%rip)     # 0x20d78
jmp 0x73cc
movl 0x199b9(%rip), %eax     # 0x20d78
movl %eax, -0xc(%rbp)
movl $0x0, 0x199ac(%rip)     # 0x20d78
cmpl $-0x1, 0x15af9(%rip)    # 0x1cecc
je 0x73e8
cmpl $0x0, 0x15b00(%rip)     # 0x1cedc
jne 0x73e8
xorl %edi, %edi
subl -0xc(%rbp), %edi
callq 0x7bd0
callq 0x7c20
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tsetdirtattr
void
tsetdirtattr(int attr)
{
	int i, j;

	for (i = 0; i < term.row-1; i++) {
		for (j = 0; j < term.col-1; j++) {
			if (term.line[i][j].mode & attr) {
				term.dirty[i] = 1;
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl 0x15679(%rip), %ecx     # 0x1cee0
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x78d9
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl 0x15666(%rip), %ecx     # 0x1cee4
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x78cc
movq 0x1565c(%rip), %rax     # 0x1cee8
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
andl -0x4(%rbp), %eax
cmpl $0x0, %eax
je 0x78bf
movq 0x194d6(%rip), %rax     # 0x20d88
movslq -0x8(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x78cc
jmp 0x78c1
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7875
jmp 0x78ce
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x785e
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tnew
void
tnew(int col, int row)
{
	int i, j;

	for (i = 0; i < 2; i++) {
		term.line = xmalloc(row * sizeof(Line));
		for (j = 0; j < row; j++)
			term.line[j] = xmalloc(col * sizeof(Glyph));
		term.col = col, term.row = row;
		tswapscreen();
	}
	term.dirty = xmalloc(row * sizeof(*term.dirty));
	term.tabs = xmalloc(col * sizeof(*term.tabs));
	for (i = 0; i < HISTSIZE; i++)
		term.hist[i] = xmalloc(col * sizeof(Glyph));
  treset();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jge 0x796a
movslq -0x8(%rbp), %rdi
shlq $0x3, %rdi
callq 0x5a30
movq %rax, 0x155d9(%rip)     # 0x1cee8
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x7948
movslq -0x4(%rbp), %rdi
shlq $0x4, %rdi
callq 0x5a30
movq %rax, %rdx
movq 0x155b3(%rip), %rax     # 0x1cee8
movslq -0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7916
movl -0x4(%rbp), %eax
movl %eax, 0x15593(%rip)     # 0x1cee4
movl -0x8(%rbp), %eax
movl %eax, 0x15586(%rip)     # 0x1cee0
callq 0x79e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x78f5
movslq -0x8(%rbp), %rdi
shlq $0x2, %rdi
callq 0x5a30
movq %rax, 0x1940a(%rip)     # 0x20d88
movslq -0x4(%rbp), %rdi
shlq $0x2, %rdi
callq 0x5a30
movq %rax, 0x1943e(%rip)     # 0x20dd0
movl $0x0, -0xc(%rbp)
cmpl $0x7d0, -0xc(%rbp)      # imm = 0x7D0
jge 0x79cd
movslq -0x4(%rbp), %rdi
shlq $0x4, %rdi
callq 0x5a30
movq %rax, %rdx
movslq -0xc(%rbp), %rcx
leaq 0x15523(%rip), %rax     # 0x1cee0
movq %rdx, 0x10(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7999
callq 0x7a60
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tswapscreen
void
tswapscreen(void)
{
	static Line *altline;
	static int altcol, altrow;
	Line *tmpline = term.line;
	int tmpcol = term.col, tmprow = term.row;

	term.line = altline;
	term.col = altcol, term.row = altrow;
	altline = tmpline;
	altcol = tmpcol, altrow = tmprow;
	term.mode ^= MODE_ALTSCREEN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x154fd(%rip), %rax     # 0x1cee8
movq %rax, -0x8(%rbp)
movl 0x154ef(%rip), %eax     # 0x1cee4
movl %eax, -0xc(%rbp)
movl 0x154e2(%rip), %eax     # 0x1cee0
movl %eax, -0x10(%rbp)
movq 0x1b430(%rip), %rax     # 0x22e38
movq %rax, 0x154d9(%rip)     # 0x1cee8
movl 0x1b42b(%rip), %eax     # 0x22e40
movl %eax, 0x154c9(%rip)     # 0x1cee4
movl 0x1b423(%rip), %eax     # 0x22e44
movl %eax, 0x154b9(%rip)     # 0x1cee0
movq -0x8(%rbp), %rax
movq %rax, 0x1b406(%rip)     # 0x22e38
movl -0xc(%rbp), %eax
movl %eax, 0x1b405(%rip)     # 0x22e40
movl -0x10(%rbp), %eax
movl %eax, 0x1b400(%rip)     # 0x22e44
movl 0x19372(%rip), %eax     # 0x20dbc
xorl $0x4, %eax
movl %eax, 0x19369(%rip)     # 0x20dbc
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: treset
void
treset(void)
{
	uint i;
  int x, y;

	tresetcursor();

	memset(term.tabs, 0, term.col * sizeof(*term.tabs));
	for (i = tabspaces; i < term.col; i += tabspaces)
		term.tabs[i] = 1;
	term.top = 0;
	term.histf = 0;
	term.scr = 0;
	term.bot = term.row - 1;
	term.mode = MODE_WRAP|MODE_UTF8;
	memset(term.trantbl, CS_USA, sizeof(term.trantbl));
	term.charset = 0;

  selremove();
	for (i = 0; i < 2; i++) {
  	tcursor(CURSOR_SAVE); /* reset saved cursor */
		for (y = 0; y < term.row; y++)
			for (x = 0; x < term.col; x++)
				tclearglyph(&term.line[y][x], 0);
		tswapscreen();
	}
  tfulldirt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x9020
movq 0x1935c(%rip), %rdi     # 0x20dd0
movslq 0x15469(%rip), %rdx     # 0x1cee4
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x50a0
leaq 0x12c4b(%rip), %rax     # 0x1a6d8
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x15449(%rip), %eax     # 0x1cee4
jae 0x7abf
movq 0x1932c(%rip), %rax     # 0x20dd0
movl -0x4(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
leaq 0x12c23(%rip), %rax     # 0x1a6d8
movl (%rax), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7a92
movl $0x0, 0x192eb(%rip)     # 0x20db4
movl $0x0, 0x192a1(%rip)     # 0x20d74
movl $0x0, 0x1929b(%rip)     # 0x20d78
movl 0x153fd(%rip), %eax     # 0x1cee0
subl $0x1, %eax
movl %eax, 0x192cc(%rip)     # 0x20db8
movl $0x41, 0x192c6(%rip)    # 0x20dbc
leaq 0x153e3(%rip), %rdi     # 0x1cee0
addq $0x3ee4, %rdi           # imm = 0x3EE4
movl $0x3, %esi
movl $0x4, %edx
callq 0x50a0
movl $0x0, 0x192ab(%rip)     # 0x20dc8
callq 0x6820
movl $0x0, -0x4(%rbp)
cmpl $0x2, -0x4(%rbp)
jae 0x7ba3
xorl %edi, %edi
callq 0x9090
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x1539a(%rip), %eax     # 0x1cee0
jge 0x7b93
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x1538c(%rip), %eax     # 0x1cee4
jge 0x7b86
movq 0x15387(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x8(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x9170
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x7b4f
jmp 0x7b88
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7b3d
callq 0x79e0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x7b29
callq 0x7c20
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: kscrollup
void
kscrollup(const Arg* a)
{
	int n = a->i;

	if (!term.histf || IS_SET(MODE_ALTSCREEN))
		return;

	if (n < 0)
		n = MAX(term.row / -n, 1);

	if (term.scr + n <= term.histf) {
		term.scr += n;
	} else {
		n = term.histf - term.scr;
		term.scr = term.histf;
	}

	if (sel.ob.x != -1 && !sel.alt)
		selmove(n); /* negate change in term.scr */
	tfulldirt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, 0x190f8(%rip)     # 0x20d74
je 0x7c8c
movl 0x19138(%rip), %eax     # 0x20dbc
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7c91
jmp 0x7d27
cmpl $0x0, -0xc(%rbp)
jge 0x7ccb
movl 0x15243(%rip), %eax     # 0x1cee0
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x1, %eax
jge 0x7cb4
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7cc5
movl 0x15226(%rip), %eax     # 0x1cee0
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl 0x190a7(%rip), %eax     # 0x20d78
addl -0xc(%rbp), %eax
cmpl 0x1909a(%rip), %eax     # 0x20d74
jg 0x7ced
movl -0xc(%rbp), %eax
addl 0x19093(%rip), %eax     # 0x20d78
movl %eax, 0x1908d(%rip)     # 0x20d78
jmp 0x7d08
movl 0x19081(%rip), %eax     # 0x20d74
subl 0x1907f(%rip), %eax     # 0x20d78
movl %eax, -0xc(%rbp)
movl 0x19072(%rip), %eax     # 0x20d74
movl %eax, 0x19070(%rip)     # 0x20d78
cmpl $-0x1, 0x151bd(%rip)    # 0x1cecc
je 0x7d22
cmpl $0x0, 0x151c4(%rip)     # 0x1cedc
jne 0x7d22
movl -0xc(%rbp), %edi
callq 0x7bd0
callq 0x7c20
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tresize
void
tresize(int col, int row)
{
	int *bp;

	/* col and row are always MAX(_, 1)
	if (col < 1 || row < 1) {
		fprintf(stderr, "tresize: error resizing to %dx%d\n", col, row);
		return;
	} */

	term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
	term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
	if (col > term.col) {
		bp = term.tabs + term.col;
		memset(bp, 0, sizeof(*term.tabs) * (col - term.col));
		while (--bp > term.tabs && !*bp)
			/* nothing */ ;
		for (bp += tabspaces; bp < term.tabs + col; bp += tabspaces)
			*bp = 1;
	}

	if (IS_SET(MODE_ALTSCREEN))
		tresizealt(col, row);
	else
		tresizedef(col, row);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq 0x18bd3(%rip), %rdi     # 0x20d88
movslq -0x8(%rbp), %rsi
shlq $0x2, %rsi
callq 0x5b30
movq %rax, 0x18bbf(%rip)     # 0x20d88
movq 0x18c00(%rip), %rdi     # 0x20dd0
movslq -0x4(%rbp), %rsi
shlq $0x2, %rsi
callq 0x5b30
movq %rax, 0x18bec(%rip)     # 0x20dd0
movl -0x4(%rbp), %eax
cmpl 0x14cf7(%rip), %eax     # 0x1cee4
jle 0x82b8
movq 0x18bd6(%rip), %rax     # 0x20dd0
movslq 0x14ce3(%rip), %rcx     # 0x1cee4
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %eax
subl 0x14ccb(%rip), %eax     # 0x1cee4
movslq %eax, %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x50a0
movq -0x10(%rbp), %rcx
addq $-0x4, %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq 0x18b94(%rip), %rcx     # 0x20dd0
movb %al, -0x11(%rbp)
jbe 0x8250
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x8259
jmp 0x825b
jmp 0x8227
leaq 0x12476(%rip), %rax     # 0x1a6d8
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18b50(%rip), %rcx     # 0x20dd0
movslq -0x4(%rbp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x82b6
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
leaq 0x12437(%rip), %rax     # 0x1a6d8
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x8275
jmp 0x82b8
movl 0x18afe(%rip), %eax     # 0x20dbc
andl $0x4, %eax
cmpl $0x0, %eax
je 0x82d3
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x82f0
jmp 0x82de
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x85b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tclearglyph
void
tclearglyph(Glyph *gp, int usecurattr)
{
	if (usecurattr) {
		gp->fg = term.c.attr.fg;
		gp->bg = term.c.attr.bg;
	} else {
		gp->fg = defaultfg;
		gp->bg = defaultbg;
	}
	gp->mode = ATTR_NULL;
	gp->u = ' ';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x919d
movl 0x17c11(%rip), %ecx     # 0x20d98
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl 0x17c08(%rip), %ecx     # 0x20d9c
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x91bd
leaq 0x11538(%rip), %rax     # 0x1a6dc
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
leaq 0x1152c(%rip), %rax     # 0x1a6e0
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x20, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tgetline
size_t
tgetline(char *buf, const Glyph *fgp)
{
	char *ptr;
	const Glyph *lgp = &fgp[term.col - 1];

	while (lgp > fgp && !(lgp->mode & (ATTR_SET | ATTR_WRAP)))
		lgp--;
	ptr = tgetglyphs(buf, fgp, lgp);
	if (!(lgp->mode & ATTR_WRAP))
		*(ptr++) = '\n';
	return ptr - buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x13b4a(%rip), %ecx     # 0x1cee4
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x21(%rbp)
jbe 0x93d2
movq -0x20(%rbp), %rax
movzwl 0x4(%rax), %eax
andl $0x201, %eax            # imm = 0x201
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x93db
jmp 0x93e9
movq -0x20(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x93ab
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x67b0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x9422
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0xa, (%rax)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tnewline
void
tnewline(int first_col)
{
	int y = term.c.y;

	if (y == term.bot) {
		tscrollup(term.top, term.bot, 1, SCROLL_SAVEHIST);
	} else {
		y++;
	}
	tmoveto(first_col ? 0 : term.c.x, y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0x16053(%rip), %eax     # 0x20da4
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x1605b(%rip), %eax     # 0x20db8
jne 0xad79
movl 0x1604f(%rip), %edi     # 0x20db4
movl 0x1604d(%rip), %esi     # 0x20db8
movl $0x1, %ecx
movl %ecx, %edx
callq 0xbed0
jmp 0xad82
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0xad8f
xorl %eax, %eax
movl %eax, -0xc(%rbp)
jmp 0xad98
movl 0x1600b(%rip), %eax     # 0x20da0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x91e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tinsertblank
void
tinsertblank(int n)
{
	int src, dst, size;
	Line line;

	if (n <= 0)
		return;
	dst = MIN(term.c.x + n, term.col);
	src = term.c.x;
	size = term.col - dst;
	if (size > 0) { /* otherwise dst would point beyond the array */
		line = term.line[term.c.y];
		memmove(&line[dst], &line[src], size * sizeof(Glyph));
	}
	tclearregion(src, term.c.y, dst - 1, term.c.y, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jg 0xbcf6
jmp 0xbda0
movl 0x150a4(%rip), %eax     # 0x20da0
addl -0x4(%rbp), %eax
cmpl 0x111df(%rip), %eax     # 0x1cee4
jge 0xbd15
movl 0x15093(%rip), %eax     # 0x20da0
addl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xbd1e
movl 0x111c9(%rip), %eax     # 0x1cee4
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
movl 0x15076(%rip), %eax     # 0x20da0
movl %eax, -0x8(%rbp)
movl 0x111b1(%rip), %eax     # 0x1cee4
subl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0xbd80
movq 0x111a2(%rip), %rax     # 0x1cee8
movslq 0x15057(%rip), %rcx     # 0x20da4
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x8(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
callq 0x5510
movl -0x8(%rbp), %edi
movl 0x1501b(%rip), %esi     # 0x20da4
movl -0xc(%rbp), %edx
subl $0x1, %edx
movl 0x1500f(%rip), %ecx     # 0x20da4
movl $0x1, %r8d
callq 0xbe10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tclearregion
void
tclearregion(int x1, int y1, int x2, int y2, int usecurattr)
{
	int x, y;

	/* regionselected() takes relative coordinates */
	if (regionselected(x1+term.scr, y1+term.scr, x2+term.scr, y2+term.scr))
		selremove();

	for (y = y1; y <= y2; y++) {
		term.dirty[y] = 1;
		for (x = x1; x <= x2; x++)
			tclearglyph(&term.line[y][x], usecurattr);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl -0x4(%rbp), %edi
addl 0x14f47(%rip), %edi     # 0x20d78
movl -0x8(%rbp), %esi
addl 0x14f3e(%rip), %esi     # 0x20d78
movl -0xc(%rbp), %edx
addl 0x14f35(%rip), %edx     # 0x20d78
movl -0x10(%rbp), %ecx
addl 0x14f2c(%rip), %ecx     # 0x20d78
callq 0x6400
cmpl $0x0, %eax
je 0xbe5b
callq 0x6820
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0xbec3
movq 0x14f18(%rip), %rax     # 0x20d88
movslq -0x1c(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0xbeb6
movq 0x11058(%rip), %rax     # 0x1cee8
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x18(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x9170
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xbe81
jmp 0xbeb8
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xbe61
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tscrolldown
void
tscrolldown(int top, int n)
{
	int i, bot = term.bot;
	Line temp;

	if (n <= 0)
		return;
	n = MIN(n, bot-top+1);

	tsetdirt(top, bot-n);
	tclearregion(0, bot-n+1, term.col-1, bot, 1);

	for (i = bot; i >= top+n; i--) {
		temp = term.line[i];
		term.line[i] = term.line[i-n];
		term.line[i-n] = temp;
	}

	if (sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN))
		selscroll(top, bot, n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl 0x14be4(%rip), %eax     # 0x20db8
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jg 0xc1e2
jmp 0xc2de
movl -0x8(%rbp), %eax
movl -0x10(%rbp), %ecx
subl -0x4(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0xc1fa
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xc206
movl -0x10(%rbp), %eax
subl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %edi
movl -0x10(%rbp), %esi
subl -0x8(%rbp), %esi
callq 0x61f0
movl -0x10(%rbp), %esi
subl -0x8(%rbp), %esi
addl $0x1, %esi
movl 0x10cbb(%rip), %edx     # 0x1cee4
subl $0x1, %edx
movl -0x10(%rbp), %ecx
xorl %edi, %edi
movl $0x1, %r8d
callq 0xbe10
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x4(%rbp), %ecx
addl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jl 0xc2a8
movq 0x10c92(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq 0x10c7f(%rip), %rax     # 0x1cee8
movl -0xc(%rbp), %ecx
subl -0x8(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10c6b(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq 0x10c58(%rip), %rax     # 0x1cee8
movl -0xc(%rbp), %ecx
subl -0x8(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xc242
cmpl $-0x1, 0x10c1d(%rip)    # 0x1cecc
je 0xc2de
movl 0x10c25(%rip), %eax     # 0x1cedc
movl 0x14aff(%rip), %ecx     # 0x20dbc
andl $0x4, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xc2de
movl -0x4(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0xcda0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tdeletechar
void
tdeletechar(int n)
{
	int src, dst, size;
	Line line;

	if (n <= 0)
		return;
	dst = term.c.x;
	src = MIN(term.c.x + n, term.col);
	size = term.col - src;
	if (size > 0) { /* otherwise src would point beyond the array
	                   https://stackoverflow.com/questions/29844298 */
		line = term.line[term.c.y];
		memmove(&line[dst], &line[src], size * sizeof(Glyph));
	}
	tclearregion(dst + size, term.c.y, term.col - 1, term.c.y, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jg 0xc8a6
jmp 0xc956
movl 0x144f4(%rip), %eax     # 0x20da0
movl %eax, -0xc(%rbp)
movl 0x144eb(%rip), %eax     # 0x20da0
addl -0x4(%rbp), %eax
cmpl 0x10626(%rip), %eax     # 0x1cee4
jge 0xc8ce
movl 0x144da(%rip), %eax     # 0x20da0
addl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xc8d7
movl 0x10610(%rip), %eax     # 0x1cee4
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x8(%rbp)
movl 0x10601(%rip), %eax     # 0x1cee4
subl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0xc930
movq 0x105f2(%rip), %rax     # 0x1cee8
movslq 0x144a7(%rip), %rcx     # 0x20da4
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x8(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
callq 0x5510
movl -0xc(%rbp), %edi
addl -0x10(%rbp), %edi
movl 0x14468(%rip), %esi     # 0x20da4
movl 0x105a2(%rip), %edx     # 0x1cee4
subl $0x1, %edx
movl 0x14459(%rip), %ecx     # 0x20da4
movl $0x1, %r8d
callq 0xbe10
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)