LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/evilwombat[P]gopro-fw-tools/h4-section-patch.c
// Function: write_word_le
static void write_word_le(unsigned char *buf, int offset, uint32_t word)
{
	buf[offset+0] = word >> 0;
	buf[offset+1] = word >> 8;
	buf[offset+2] = word >> 16;
	buf[offset+3] = word >> 24;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0x0, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
shrl $0x10, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
shrl $0x18, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/evilwombat[P]gopro-fw-tools/h4-section-patch.c
// Function: save_file
static int save_file(const char *output_name, int size, unsigned char *buf)
{
	FILE *ofd;
	int ret;
	ofd = fopen(output_name, "wb+");
	if (!ofd) {
		printf("Could not write to %s\n", output_name);
		return -1;
	}
	ret = fwrite(buf, size, 1, ofd);
	fclose(ofd);

	return ret == 1 ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1e2e(%rip), %rsi      # 0x3f4c
callq 0x10d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2149
movq -0x10(%rbp), %rsi
leaq 0x1e17(%rip), %rdi      # 0x3f50
movb $0x0, %al
callq 0x1060
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x217e
movq -0x20(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0x10f0
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1050
movl -0x2c(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/evilwombat[P]gopro-fw-tools/crc32.c
// Function: update_crc
static unsigned long update_crc(unsigned long crc,
                unsigned char *buf, int len)
{
	unsigned long c = crc ^ 0xffffffffL;
	int n;

	if (!crc_table_computed)
		make_crc_table();
	for (n = 0; n < len; n++) {
		c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
	}
	return c ^ 0xffffffffL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
xorq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, 0x3eb4(%rip)      # 0x60a0
jne 0x21f3
callq 0x2260
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2241
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rdx
movzbl (%rax,%rdx), %eax
xorq %rax, %rcx
andq $0xff, %rcx
leaq 0x3e8d(%rip), %rax      # 0x60b0
movq (%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
shrq $0x8, %rcx
xorq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x21fa
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
xorq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/evilwombat[P]gopro-fw-tools/crc32.c
// Function: make_crc_table
static void make_crc_table(void)
{
	unsigned long c;

	int n, k;
	for (n = 0; n < 256; n++) {
		c = (unsigned long) n;
		for (k = 0; k < 8; k++) {
			if (c & 1) {
				c = 0xedb88320L ^ (c >> 1);
			} else {
				c = c >> 1;
			}
		}
		crc_table[n] = c;
	}
	crc_table_computed = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0x22e7
movslq -0xc(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x8, -0x10(%rbp)
jge 0x22c9
movq -0x8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x22b1
movq -0x8(%rbp), %rax
shrq %rax
movabsq $0xedb88320, %rcx       # imm = 0xEDB88320
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x22bc
movq -0x8(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
jmp 0x22be
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2283
movq -0x8(%rbp), %rdx
movslq -0xc(%rbp), %rcx
leaq 0x3dd8(%rip), %rax      # 0x60b0
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x226b
movl $0x1, 0x3daf(%rip)      # 0x60a0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ryuichiueda[P]glueutils/src/flip12.c
// Function: usage
void usage(void){
	fputs("flip12: flip stdout and stderr\n", stderr);
	fputs("usage: flip12 <command> [args]\n", stderr);
	fputs("\nCopyright (C) 2021 Ryuichi Ueda\n", stderr);
	fputs("Released under the MIT License.\n", stderr);
	fputs("https://github.com/ryuichiueda/glueutils\n", stderr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x2e4d(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe4f(%rip), %rdi       # 0x2004
callq 0x1060
movq 0x2e37(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe59(%rip), %rdi       # 0x2024
callq 0x1060
movq 0x2e21(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe63(%rip), %rdi       # 0x2044
callq 0x1060
movq 0x2e0b(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe6f(%rip), %rdi       # 0x2066
callq 0x1060
movq 0x2df5(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xe7a(%rip), %rdi       # 0x2087
callq 0x1060
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ryuichiueda[P]glueutils/src/flip12.c
// Function: main
int main(int argc, char * argv[])
{
	if(argc < 2){
		usage();
		exit(1);
	}

	trydup2(1, 3);
	trydup2(2, 1);
	trydup2(3, 2);

	return - execvp(argv[1], &argv[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x129b
callq 0x11a0
movl $0x1, %edi
callq 0x1080
movl $0x1, %edi
movl $0x3, %esi
callq 0x1220
movl $0x2, %edi
movl $0x1, %esi
callq 0x1220
movl $0x3, %edi
movl $0x2, %esi
callq 0x1220
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1070
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: tinsync
int
tinsync(uint timeout)
{
    struct timespec now;
    if (su && !clock_gettime(CLOCK_MONOTONIC, &now)
           && TIMEDIFF(now, sutv) >= timeout)
        su = 0;
    return su;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, 0x1779e(%rip)     # 0x1e280
je 0x6b4c
movl $0x1, %edi
leaq -0x18(%rbp), %rsi
callq 0x6130
cmpl $0x0, %eax
jne 0x6b4c
movq 0x1778a(%rip), %rdx     # 0x1e288
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rdx, %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
cvtsi2sd %rcx, %xmm0
movq 0x17774(%rip), %rcx     # 0x1e290
subq %rcx, %rax
cvtsi2sd %rax, %xmm1
movsd 0xf4dc(%rip), %xmm2     # 0x16008
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movl -0x4(%rbp), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6b4c
movl $0x0, 0x17734(%rip)     # 0x1e280
movl 0x1772e(%rip), %eax     # 0x1e280
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: die
void
die(const char *errstr, ...)
{
    va_list ap;

    va_start(ap, errstr);
    vfprintf(stderr, errstr, ap);
    va_end(ap);
    exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x6be5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x143b9(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x6300
leaq -0x20(%rbp), %rax
movl $0x1, %edi
callq 0x6190
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: utf8encode
size_t
utf8encode(Rune u, char *c)
{
    size_t len, i;

    len = utf8validate(&u, 0);
    if (len > UTF_SIZ)
        return 0;

    for (i = len - 1; i != 0; --i) {
        c[i] = utf8encodebyte(u, 0);
        u >>= 6;
    }
    c[0] = utf8encodebyte(u, len);

    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0xc(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6da0
movq %rax, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jbe 0x6d31
movq $0x0, -0x8(%rbp)
jmp 0x6d90
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x6d74
movl -0xc(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x6e30
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0xc(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x6d3d
movl -0xc(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x6e30
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: utf8validate
size_t
utf8validate(Rune *u, size_t i)
{
    if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
        *u = UTF_INVALID;
    for (i = 1; *u > utfmax[i]; ++i)
        ;

    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq 0xf959(%rip), %rax      # 0x16710
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
ja 0x6df1
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
leaq 0xf95d(%rip), %rcx      # 0x16730
cmpl (%rcx,%rdx,4), %eax
ja 0x6df1
movq -0x8(%rbp), %rcx
movl $0xd800, %eax           # imm = 0xD800
cmpl (%rcx), %eax
ja 0x6dfb
movq -0x8(%rbp), %rax
cmpl $0xdfff, (%rax)         # imm = 0xDFFF
ja 0x6dfb
movq -0x8(%rbp), %rax
movl $0xfffd, (%rax)         # imm = 0xFFFD
movq $0x1, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
leaq 0xf91c(%rip), %rcx      # 0x16730
cmpl (%rcx,%rdx,4), %eax
jbe 0x6e29
jmp 0x6e1b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6e03
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: selstart
void
selstart(int col, int row, int snap)
{
    selclear();
    sel.mode = SEL_EMPTY;
    sel.type = SEL_REGULAR;
    sel.alt = IS_SET(MODE_ALTSCREEN);
    sel.snap = snap;
    sel.oe.x = sel.ob.x = col;
    sel.oe.y = sel.ob.y = row;
    selnormalize();

    if (sel.snap != 0)
        sel.mode = SEL_READY;
    tsetdirt(sel.nb.y, sel.ne.y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
callq 0x6f40
movl $0x1, 0x173d8(%rip)     # 0x1e298
movl $0x1, 0x173d2(%rip)     # 0x1e29c
movl 0x183ec(%rip), %eax     # 0x1f2bc
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x173e0(%rip)     # 0x1e2c4
movl -0xc(%rbp), %eax
movl %eax, 0x173b3(%rip)     # 0x1e2a0
movl -0x4(%rbp), %eax
movl %eax, 0x173be(%rip)     # 0x1e2b4
movl %eax, 0x173c0(%rip)     # 0x1e2bc
movl -0x8(%rbp), %eax
movl %eax, 0x173b3(%rip)     # 0x1e2b8
movl %eax, 0x173b5(%rip)     # 0x1e2c0
callq 0x6f80
cmpl $0x0, 0x17389(%rip)     # 0x1e2a0
je 0x6f23
movl $0x2, 0x17375(%rip)     # 0x1e298
movl 0x1737f(%rip), %edi     # 0x1e2a8
movl 0x17381(%rip), %esi     # 0x1e2b0
callq 0x7130
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: selclear
void
selclear(void)
{
    if (sel.ob.x == -1)
        return;
    sel.mode = SEL_IDLE;
    sel.ob.x = -1;
    tsetdirt(sel.nb.y, sel.ne.y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, 0x17369(%rip)    # 0x1e2b4
jne 0x6f4f
jmp 0x6f74
movl $0x0, 0x1733f(%rip)     # 0x1e298
movl $0xffffffff, 0x17351(%rip) # imm = 0xFFFFFFFF
movl 0x1733f(%rip), %edi     # 0x1e2a8
movl 0x17341(%rip), %esi     # 0x1e2b0
callq 0x7130
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: selextend
void
selextend(int col, int row, int type, int done)
{
    int oldey, oldex, oldsby, oldsey, oldtype;

    if (sel.mode == SEL_IDLE)
        return;
    if (done && sel.mode == SEL_EMPTY) {
        selclear();
        return;
    }

    oldey = sel.oe.y;
    oldex = sel.oe.x;
    oldsby = sel.nb.y;
    oldsey = sel.ne.y;
    oldtype = sel.type;

    sel.oe.x = col;
    sel.oe.y = row;
    selnormalize();
    sel.type = type;

    if (oldey != sel.oe.y || oldex != sel.oe.x || oldtype != sel.type || sel.mode == SEL_EMPTY)
        tsetdirt(MIN(sel.nb.y, oldsby), MAX(sel.ne.y, oldsey));

    sel.mode = done ? SEL_IDLE : SEL_READY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
cmpl $0x0, 0x1708d(%rip)     # 0x1e298
jne 0x7212
jmp 0x7301
cmpl $0x0, -0x10(%rbp)
je 0x722b
cmpl $0x1, 0x17079(%rip)     # 0x1e298
jne 0x722b
callq 0x6f40
jmp 0x7301
movl 0x1708f(%rip), %eax     # 0x1e2c0
movl %eax, -0x14(%rbp)
movl 0x17082(%rip), %eax     # 0x1e2bc
movl %eax, -0x18(%rbp)
movl 0x17065(%rip), %eax     # 0x1e2a8
movl %eax, -0x1c(%rbp)
movl 0x17064(%rip), %eax     # 0x1e2b0
movl %eax, -0x20(%rbp)
movl 0x17047(%rip), %eax     # 0x1e29c
movl %eax, -0x24(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0x1705b(%rip)     # 0x1e2bc
movl -0x8(%rbp), %eax
movl %eax, 0x17056(%rip)     # 0x1e2c0
callq 0x6f80
movl -0xc(%rbp), %eax
movl %eax, 0x17024(%rip)     # 0x1e29c
movl -0x14(%rbp), %eax
cmpl 0x1703f(%rip), %eax     # 0x1e2c0
jne 0x72a2
movl -0x18(%rbp), %eax
cmpl 0x17030(%rip), %eax     # 0x1e2bc
jne 0x72a2
movl -0x24(%rbp), %eax
cmpl 0x17005(%rip), %eax     # 0x1e29c
jne 0x72a2
cmpl $0x1, 0x16ff8(%rip)     # 0x1e298
jne 0x72eb
movl 0x17000(%rip), %eax     # 0x1e2a8
cmpl -0x1c(%rbp), %eax
jge 0x72b8
movl 0x16ff5(%rip), %eax     # 0x1e2a8
movl %eax, -0x28(%rbp)
jmp 0x72be
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl 0x16fe6(%rip), %eax     # 0x1e2b0
cmpl -0x20(%rbp), %eax
jge 0x72d7
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x72e0
movl 0x16fd3(%rip), %eax     # 0x1e2b0
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
callq 0x7130
movl -0x10(%rbp), %edx
movl $0x2, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0x16f97(%rip)     # 0x1e298
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: tlinelen
int
tlinelen(int y)
{
    int i = term.col;

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

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

    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl 0x16b3f(%rip), %eax     # 0x1e2cc
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x17aeb(%rip), %eax     # 0x1f284
jge 0x77cf
movl -0x8(%rbp), %eax
addl 0x17adc(%rip), %eax     # 0x1f280
subl 0x17ada(%rip), %eax     # 0x1f284
addl $0x1f4, %eax            # imm = 0x1F4
addl $0x1, %eax
movl $0x1f4, %ecx            # imm = 0x1F4
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x16b04(%rip), %rax     # 0x1e2c8
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x77ea
movq 0x16afa(%rip), %rax     # 0x1e2d0
movl -0x8(%rbp), %ecx
subl 0x17aa5(%rip), %ecx     # 0x1f284
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 $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x7817
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x78b8
jmp 0x7819
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0x19(%rbp)
jle 0x789b
movl -0x8(%rbp), %eax
cmpl 0x17a57(%rip), %eax     # 0x1f284
jge 0x7863
movl -0x8(%rbp), %eax
addl 0x17a48(%rip), %eax     # 0x1f280
subl 0x17a46(%rip), %eax     # 0x1f284
addl $0x1f4, %eax            # imm = 0x1F4
addl $0x1, %eax
movl $0x1f4, %ecx            # imm = 0x1F4
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x16a70(%rip), %rax     # 0x1e2c8
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0x787e
movq 0x16a66(%rip), %rax     # 0x1e2d0
movl -0x8(%rbp), %ecx
subl 0x17a11(%rip), %ecx     # 0x1f284
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 0x78a4
jmp 0x78b2
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7819
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: stty
void
stty(char **args)
{
    char cmd[_POSIX_ARG_MAX], **p, *q, *s;
    size_t n, siz;

    if ((n = strlen(stty_args)) > sizeof(cmd)-1)
        die("incorrect stty parameters\n");
    memcpy(cmd, stty_args, n);
    q = cmd + n;
    siz = sizeof(cmd) - n;
    for (p = args; p && (s = *p); ++p) {
        if ((n = strlen(s)) > siz-1)
            die("stty parameter length too long\n");
        *q++ = ' ';
        memcpy(q, s, n);
        q += n;
        siz -= n + 1;
    }
	*q = '\0';
	if (system(cmd) != 0)
		perror("Couldn't call stty");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x8(%rbp)
leaq 0x13c4a(%rip), %rax     # 0x1b790
movq (%rax), %rdi
callq 0x6390
movq %rax, -0x1030(%rbp)
cmpq $0xfff, %rax            # imm = 0xFFF
jbe 0x7b6b
leaq 0xeeb1(%rip), %rdi      # 0x16a15
movb $0x0, %al
callq 0x6bb0
leaq -0x1010(%rbp), %rdi
leaq 0x13c17(%rip), %rax     # 0x1b790
movq (%rax), %rsi
movq -0x1030(%rbp), %rdx
callq 0x6930
leaq -0x1010(%rbp), %rax
addq -0x1030(%rbp), %rax
movq %rax, -0x1020(%rbp)
movl $0x1000, %eax           # imm = 0x1000
subq -0x1030(%rbp), %rax
movq %rax, -0x1038(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1018(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x1018(%rbp)
movb %al, -0x1039(%rbp)
je 0x7beb
movq -0x1018(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1028(%rbp)
cmpq $0x0, %rax
setne %al
movb %al, -0x1039(%rbp)
movb -0x1039(%rbp), %al
testb $0x1, %al
jne 0x7bfa
jmp 0x7ca5
movq -0x1028(%rbp), %rdi
callq 0x6390
movq %rax, -0x1030(%rbp)
movq -0x1038(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x7c2b
leaq 0xee0c(%rip), %rdi      # 0x16a30
movb $0x0, %al
callq 0x6bb0
movq -0x1020(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x1020(%rbp)
movb $0x20, (%rax)
movq -0x1020(%rbp), %rdi
movq -0x1028(%rbp), %rsi
movq -0x1030(%rbp), %rdx
callq 0x6930
movq -0x1030(%rbp), %rax
addq -0x1020(%rbp), %rax
movq %rax, -0x1020(%rbp)
movq -0x1030(%rbp), %rcx
addq $0x1, %rcx
movq -0x1038(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x1038(%rbp)
movq -0x1018(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x1018(%rbp)
jmp 0x7bbb
movq -0x1020(%rbp), %rax
movb $0x0, (%rax)
leaq -0x1010(%rbp), %rdi
callq 0x6220
cmpl $0x0, %eax
je 0x7ccc
leaq 0xed89(%rip), %rdi      # 0x16a50
callq 0x68c0
addq $0x1040, %rsp           # imm = 0x1040
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: ttyread
size_t
ttyread(void)
{
	static char buf[BUFSIZ];
	static int buflen = 0;
	int ret, written;

	/* append read bytes to unprocessed bytes */
	ret = twrite_aborted ? 1 : read(cmdfd, buf+buflen, LEN(buf)-buflen);

	switch (ret) {
	case 0:
		exit(0);
	case -1:
		die("couldn't read from shell: %s\n", strerror(errno));
	default:
		buflen += twrite_aborted ? 0 : ret;
		written = twrite(buf, buflen, 0);
		buflen -= written;
		/* keep any incomplete UTF-8 byte sequence for the next call */
		if (buflen > 0)
			memmove(buf, buf + written, buflen);
		return ret;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpl $0x0, 0x17279(%rip)     # 0x1f2e8
je 0x807c
movl $0x1, %eax
movq %rax, -0x10(%rbp)
jmp 0x80ab
movl 0x1725e(%rip), %edi     # 0x1f2e0
movslq 0x19267(%rip), %rax     # 0x212f0
leaq 0x17260(%rip), %rsi     # 0x1f2f0
addq %rax, %rsi
movslq 0x19256(%rip), %rax     # 0x212f0
movl $0x2000, %edx           # imm = 0x2000
subq %rax, %rdx
callq 0x61e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $-0x1, %eax
je 0x80cf
jmp 0x80bf
movl -0x14(%rbp), %eax
testl %eax, %eax
jne 0x80ec
jmp 0x80c8
xorl %edi, %edi
callq 0x6190
callq 0x65d0
movl (%rax), %edi
callq 0x6470
movq %rax, %rsi
leaq 0xe803(%rip), %rdi      # 0x168e8
movb $0x0, %al
callq 0x6bb0
cmpl $0x0, 0x171f5(%rip)     # 0x1f2e8
je 0x80fc
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0x8102
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl 0x191e5(%rip), %eax     # 0x212f0
movl %eax, 0x191df(%rip)     # 0x212f0
movl 0x191d9(%rip), %esi     # 0x212f0
leaq 0x171d2(%rip), %rdi     # 0x1f2f0
xorl %edx, %edx
callq 0x8170
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %ecx
movl 0x191bf(%rip), %eax     # 0x212f0
subl %ecx, %eax
movl %eax, 0x191b7(%rip)     # 0x212f0
cmpl $0x0, 0x191b0(%rip)     # 0x212f0
jle 0x8163
movslq -0x8(%rbp), %rax
leaq 0x171a3(%rip), %rsi     # 0x1f2f0
addq %rax, %rsi
movslq 0x19199(%rip), %rdx     # 0x212f0
leaq 0x17192(%rip), %rdi     # 0x1f2f0
callq 0x6540
movslq -0x4(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: twrite
int
twrite(const char *buf, int buflen, int show_ctrl)
{
	int charsize;
	Rune u;
	int n;

	int su0 = su;
	twrite_aborted = 0;

	for (n = 0; n < buflen; n += charsize) {
		if (IS_SET(MODE_UTF8)) {
			/* process a complete utf8 char */
			charsize = utf8decode(buf + n, &u, buflen - n);
			if (charsize == 0)
				break;
		} else {
			u = buf[n] & 0xFF;
			charsize = 1;
		}
		if (su0 && !su) {
			twrite_aborted = 1;
			break;  // ESU - allow rendering before a new BSU
		}
		if (show_ctrl && ISCONTROL(u)) {
			if (u & 0x80) {
				u &= 0x7f;
				tputc('^');
				tputc('[');
			} else if (u != '\n' && u != '\r' && u != '\t') {
				u ^= 0x40;
				tputc('^');
			}
		}
		tputc(u);
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl 0x160f8(%rip), %eax     # 0x1e280
movl %eax, -0x20(%rbp)
movl $0x0, 0x17153(%rip)     # 0x1f2e8
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x82b3
movl 0x1710e(%rip), %eax     # 0x1f2bc
andl $0x40, %eax
cmpl $0x0, %eax
je 0x81e3
movq -0x8(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movl -0xc(%rbp), %eax
subl -0x1c(%rbp), %eax
movslq %eax, %rdx
leaq -0x18(%rbp), %rsi
callq 0xaf00
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x81e1
jmp 0x82b3
jmp 0x81fe
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x18(%rbp)
movl $0x1, -0x14(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x821c
cmpl $0x0, 0x16075(%rip)     # 0x1e280
jne 0x821c
movl $0x1, 0x170d1(%rip)     # 0x1f2e8
jmp 0x82b3
cmpl $0x0, -0x10(%rbp)
je 0x829d
xorl %eax, %eax
cmpl -0x18(%rbp), %eax
ja 0x822f
cmpl $0x1f, -0x18(%rbp)
jbe 0x8248
cmpl $0x7f, -0x18(%rbp)
je 0x8248
movl $0x80, %eax
cmpl -0x18(%rbp), %eax
ja 0x829d
cmpl $0x9f, -0x18(%rbp)
ja 0x829d
movl -0x18(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8274
movl -0x18(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x18(%rbp)
movl $0x5e, %edi
callq 0xb6c0
movl $0x5b, %edi
callq 0xb6c0
jmp 0x829b
cmpl $0xa, -0x18(%rbp)
je 0x8299
cmpl $0xd, -0x18(%rbp)
je 0x8299
cmpl $0x9, -0x18(%rbp)
je 0x8299
movl -0x18(%rbp), %eax
xorl $0x40, %eax
movl %eax, -0x18(%rbp)
movl $0x5e, %edi
callq 0xb6c0
jmp 0x829b
jmp 0x829d
movl -0x18(%rbp), %edi
callq 0xb6c0
movl -0x14(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x819c
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: selscroll
void
selscroll(int orig, int n)
{
	if (sel.ob.x == -1 || sel.alt != IS_SET(MODE_ALTSCREEN))
		return;

	if (BETWEEN(sel.nb.y, orig, term.bot) != BETWEEN(sel.ne.y, orig, term.bot)) {
		selclear();
	} else if (BETWEEN(sel.nb.y, orig, term.bot)) {
		sel.ob.y += n;
		sel.oe.y += n;
		if (sel.ob.y < term.top || sel.ob.y > term.bot ||
		    sel.oe.y < term.top || sel.oe.y > term.bot) {
			selclear();
		} else {
			selnormalize();
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $-0x1, 0x1521f(%rip)    # 0x1e2b4
je 0x90b6
movl 0x15227(%rip), %eax     # 0x1e2c4
movl 0x16219(%rip), %ecx     # 0x1f2bc
andl $0x4, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x90bb
jmp 0x91a0
movl -0x4(%rbp), %ecx
xorl %eax, %eax
cmpl 0x151e2(%rip), %ecx     # 0x1e2a8
movb %al, -0x9(%rbp)
jg 0x90dd
movl 0x151d7(%rip), %eax     # 0x1e2a8
cmpl 0x161e1(%rip), %eax     # 0x1f2b8
setle %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
xorl %eax, %eax
cmpl 0x151bd(%rip), %ecx     # 0x1e2b0
movb %al, -0xa(%rbp)
jg 0x910a
movl 0x151b2(%rip), %eax     # 0x1e2b0
cmpl 0x161b4(%rip), %eax     # 0x1f2b8
setle %al
movb %al, -0xa(%rbp)
movl -0x10(%rbp), %eax
movb -0xa(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x9121
callq 0x6f40
jmp 0x91a0
movl -0x4(%rbp), %eax
cmpl 0x1517e(%rip), %eax     # 0x1e2a8
jg 0x919e
movl 0x15176(%rip), %eax     # 0x1e2a8
cmpl 0x16180(%rip), %eax     # 0x1f2b8
jg 0x919e
movl -0x8(%rbp), %eax
addl 0x15175(%rip), %eax     # 0x1e2b8
movl %eax, 0x1516f(%rip)     # 0x1e2b8
movl -0x8(%rbp), %eax
addl 0x1516e(%rip), %eax     # 0x1e2c0
movl %eax, 0x15168(%rip)     # 0x1e2c0
movl 0x1515a(%rip), %eax     # 0x1e2b8
cmpl 0x16150(%rip), %eax     # 0x1f2b4
jl 0x9190
movl 0x1514c(%rip), %eax     # 0x1e2b8
cmpl 0x16146(%rip), %eax     # 0x1f2b8
jg 0x9190
movl 0x15146(%rip), %eax     # 0x1e2c0
cmpl 0x16134(%rip), %eax     # 0x1f2b4
jl 0x9190
movl 0x15138(%rip), %eax     # 0x1e2c0
cmpl 0x1612a(%rip), %eax     # 0x1f2b8
jle 0x9197
callq 0x6f40
jmp 0x919c
callq 0x6f80
jmp 0x919e
jmp 0x91a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: osc4_color_response
void
osc4_color_response(int num)
{
	int n;
	char buf[32];
	unsigned char r, g, b;

	if (xgetcolor(num, &r, &g, &b)) {
		fprintf(stderr, "erresc: failed to fetch osc4 color %d\n", num);
		return;
	}

	n = snprintf(buf, sizeof buf, "\033]4;%d;rgb:%02x%02x/%02x%02x/%02x%02x\007",
		     num, r, r, g, g, b, b);

	ttywrite(buf, n, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x58, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %edi
leaq -0x31(%rbp), %rsi
leaq -0x32(%rbp), %rdx
leaq -0x33(%rbp), %rcx
callq 0xf1c0
cmpl $0x0, %eax
je 0x9272
movq 0x11d94(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0xd6be(%rip), %rsi      # 0x16927
movb $0x0, %al
callq 0x68e0
jmp 0x92ce
leaq -0x30(%rbp), %rdi
movl -0xc(%rbp), %ecx
movzbl -0x31(%rbp), %r8d
movzbl -0x31(%rbp), %r9d
movzbl -0x32(%rbp), %ebx
movzbl -0x32(%rbp), %r11d
movzbl -0x33(%rbp), %r10d
movzbl -0x33(%rbp), %eax
movl $0x20, %esi
leaq 0xd6ad(%rip), %rdx      # 0x1694e
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x60b0
movl %eax, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
movslq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x82c0
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: osc_color_response
void
osc_color_response(int index, int num)
{
	int n;
	char buf[32];
	unsigned char r, g, b;

	if (xgetcolor(index, &r, &g, &b)) {
		fprintf(stderr, "erresc: failed to fetch osc color %d\n", index);
		return;
	}

	n = snprintf(buf, sizeof buf, "\033]%d;rgb:%02x%02x/%02x%02x/%02x%02x\007",
		     num, r, r, g, g, b, b);

	ttywrite(buf, n, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl -0xc(%rbp), %edi
leaq -0x41(%rbp), %rsi
leaq -0x42(%rbp), %rdx
leaq -0x43(%rbp), %rcx
callq 0xf1c0
cmpl $0x0, %eax
je 0x9325
movq 0x11ce1(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0xd659(%rip), %rsi      # 0x16975
movb $0x0, %al
callq 0x68e0
jmp 0x9381
leaq -0x40(%rbp), %rdi
movl -0x10(%rbp), %ecx
movzbl -0x41(%rbp), %r8d
movzbl -0x41(%rbp), %r9d
movzbl -0x42(%rbp), %ebx
movzbl -0x42(%rbp), %r11d
movzbl -0x43(%rbp), %r10d
movzbl -0x43(%rbp), %eax
movl $0x20, %esi
leaq 0xd647(%rip), %rdx      # 0x1699b
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x60b0
movl %eax, -0x14(%rbp)
leaq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movl $0x1, %edx
callq 0x82c0
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: tsetcolor
void
tsetcolor( int row, int start, int end, uint32_t fg, uint32_t bg )
{
	int i = start;
	for( ; i < end; ++i )
	{
		term.line[row][i].fg = fg;
		term.line[row][i].bg = bg;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xa8cd
movl -0x10(%rbp), %ecx
movq 0x13a44(%rip), %rax     # 0x1e2d0
movslq -0x4(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq 0x13a24(%rip), %rax     # 0x1e2d0
movslq -0x4(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xa87a
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: findlastany
char *
findlastany(char *str, const char** find, size_t len)
{
	char* found = NULL;
	int i = 0;
	for(found = str + strlen(str) - 1; found >= str; --found) {
		for(i = 0; i < len; i++) {
			if(strncmp(found, find[i], strlen(find[i])) == 0) {
				return found;
			}
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6390
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jb 0xa996
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xa986
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6390
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0x61f0
cmpl $0x0, %eax
jne 0xa979
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa99e
jmp 0xa97b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa927
jmp 0xa988
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa916
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: select_or_drawcursor
void select_or_drawcursor(int selectsearch_mode, int type) {
	int done = 0;

	if ( selectsearch_mode & 1 ) {
		selextend(term.c.x, term.c.y, type, done);
		xsetsel(getsel());
	}
	else
		xdrawcursor(term.c.x, term.c.y, term.line[term.c.y][term.c.x],
			    term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xacc9
movl 0x145fa(%rip), %edi     # 0x1f2a0
movl 0x145f8(%rip), %esi     # 0x1f2a4
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x71f0
callq 0x7430
movq %rax, %rdi
callq 0xee00
jmp 0xad52
movl 0x145d1(%rip), %edi     # 0x1f2a0
movl 0x145cf(%rip), %esi     # 0x1f2a4
movq 0x135f4(%rip), %rax     # 0x1e2d0
movslq 0x145c1(%rip), %rcx     # 0x1f2a4
movq (%rax,%rcx,8), %rcx
movslq 0x145b2(%rip), %rax     # 0x1f2a0
shlq $0x4, %rax
addq %rax, %rcx
movl 0x145b0(%rip), %r8d     # 0x1f2ac
movl 0x145ad(%rip), %r9d     # 0x1f2b0
movq 0x135c6(%rip), %rax     # 0x1e2d0
movslq 0x1459f(%rip), %rdx     # 0x1f2b0
movq (%rax,%rdx,8), %rax
movslq 0x14590(%rip), %rdx     # 0x1f2ac
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
movq (%rax), %r10
movq %r10, -0x20(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rax
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0xf320
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: search
void search(int selectsearch_mode, Rune *target, int ptarget, int incr, int type, TCursor *cu) {
	Rune *r;
	int i, bound = (term.col * cu->y + cu->x) * (incr > 0) + incr;

	for (i = term.col * term.c.y + term.c.x + incr; i != bound; i += incr) {
		for (r = target; r - target < ptarget; r++) {
			if ( *r == term.line[(i + r - target) / term.col][(i + r - target) % term.col].u ) {
				if ( r - target == ptarget - 1 )     break;
			} else {
				r = NULL;
				break;
			}
		}
		if ( r != NULL )    break;
	}

	if ( i != bound ) {
		term.c.y = i / term.col, term.c.x = i % term.col;
		select_or_drawcursor(selectsearch_mode, type);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl 0x13549(%rip), %eax     # 0x1e2cc
movq -0x28(%rbp), %rcx
imull 0x14(%rcx), %eax
movq -0x28(%rbp), %rcx
addl 0x10(%rcx), %eax
cmpl $0x0, -0x18(%rbp)
setg %cl
andb $0x1, %cl
movzbl %cl, %ecx
imull %ecx, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
movl 0x1351e(%rip), %eax     # 0x1e2cc
imull 0x144ef(%rip), %eax     # 0x1f2a4
addl 0x144e5(%rip), %eax     # 0x1f2a0
addl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
je 0xaec5
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jge 0xaeac
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq 0x134cf(%rip), %rax     # 0x1e2d0
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movslq 0x134a4(%rip), %rcx     # 0x1e2cc
cqto
idivq %rcx
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq (%rax,%rcx,8), %rcx
movl -0x34(%rbp), %edx
movq -0x30(%rbp), %rax
movslq %edx, %rdx
shlq $0x2, %rdx
addq %rdx, %rax
movq -0x10(%rbp), %rdx
subq %rdx, %rax
sarq $0x2, %rax
movslq 0x13471(%rip), %rsi     # 0x1e2cc
cqto
idivq %rsi
movl -0x3c(%rbp), %eax
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0xae8f
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jne 0xae8d
jmp 0xaeac
jmp 0xae99
movq $0x0, -0x30(%rbp)
jmp 0xaeac
jmp 0xae9b
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
jmp 0xadd5
cmpq $0x0, -0x30(%rbp)
je 0xaeb5
jmp 0xaec5
jmp 0xaeb7
movl -0x18(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xadc1
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
je 0xaef8
movl -0x34(%rbp), %eax
cltd
idivl 0x133f5(%rip)           # 0x1e2cc
movl %eax, 0x143c7(%rip)     # 0x1f2a4
movl -0x34(%rbp), %eax
cltd
idivl 0x133e5(%rip)           # 0x1e2cc
movl %edx, 0x143b3(%rip)     # 0x1f2a0
movl -0x4(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0xac80
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: utf8decode
size_t
utf8decode(const char *c, Rune *u, size_t clen)
{
    size_t i, j, len, type;
    Rune udecoded;

    *u = UTF_INVALID;
    if (!clen)
        return 0;
    udecoded = utf8decodebyte(c[0], &len);
    if (!BETWEEN(len, 1, UTF_SIZ))
        return 1;
    for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
        udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
        if (type != 0)
            return j;
    }
    if (j < len)
        return 0;
    *u = udecoded;
    utf8validate(u, len);

    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl $0xfffd, (%rax)         # imm = 0xFFFD
cmpq $0x0, -0x20(%rbp)
jne 0xaf32
movq $0x0, -0x8(%rbp)
jmp 0xb021
movq -0x10(%rbp), %rax
leaq -0x38(%rbp), %rsi
movsbl (%rax), %edi
callq 0xece0
movl %eax, -0x44(%rbp)
movl $0x1, %eax
cmpq -0x38(%rbp), %rax
ja 0xaf57
cmpq $0x4, -0x38(%rbp)
jbe 0xaf64
movq $0x1, -0x8(%rbp)
jmp 0xb021
movq $0x1, -0x28(%rbp)
movq $0x1, -0x30(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0xaf91
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
setb %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0xaf9a
jmp 0xafef
movl -0x44(%rbp), %eax
shll $0x6, %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %rsi
movsbl (%rax,%rcx), %edi
callq 0xece0
movl %eax, %ecx
movl -0x4c(%rbp), %eax
orl %ecx, %eax
movl %eax, -0x44(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xafd3
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb021
jmp 0xafd5
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xaf74
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xb003
movq $0x0, -0x8(%rbp)
jmp 0xb021
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x6da0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: xwrite
ssize_t
xwrite(int fd, const char *s, size_t len)
{
    size_t aux = len;
    ssize_t r;

    while (len > 0) {
        r = write(fd, s, len);
        if (r < 0)
            return r;
        len -= r;
        s += r;
    }

    return aux;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0xb5d4
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6900
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jge 0xb5b7
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb5dc
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xb58b
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: csiparse
void
csiparse(void)
{
	char *p = csiescseq.buf, *np;
	long int v;
	int sep = ';'; /* colon or semi-colon, but not both */

	csiescseq.narg = 0;
	if (*p == '?') {
		csiescseq.priv = 1;
		p++;
	}

	csiescseq.buf[csiescseq.len] = '\0';
	while (p < csiescseq.buf+csiescseq.len) {
		np = NULL;
		v = strtol(p, &np, 10);
		if (np == p)
			v = 0;
		if (v == LONG_MAX || v == LONG_MIN)
			v = -1;
		csiescseq.arg[csiescseq.narg++] = v;
		p = np;
		if (sep == ';' && *p == ':')
			sep = ':'; /* allow override to colon once */
		if (*p != sep || csiescseq.narg == ESC_ARG_SIZ)
			break;
		p++;
	}
	csiescseq.mode[0] = *p++;
	csiescseq.mode[1] = (p < csiescseq.buf+csiescseq.len) ? *p : '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x15741(%rip), %rax     # 0x21500
movq %rax, -0x8(%rbp)
movl $0x3b, -0x1c(%rbp)
movl $0x0, 0x15978(%rip)     # 0x2174c
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
jne 0xbdf3
movb $0x1, 0x15921(%rip)     # 0x21708
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq 0x15906(%rip), %rcx     # 0x21700
leaq 0x156ff(%rip), %rax     # 0x21500
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
leaq 0x156f0(%rip), %rcx     # 0x21500
addq 0x158e9(%rip), %rcx     # 0x21700
cmpq %rcx, %rax
jae 0xbee9
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl $0xa, %edx
callq 0x64d0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0xbe50
movq $0x0, -0x18(%rbp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x18(%rbp)
je 0xbe70
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x18(%rbp)
jne 0xbe78
movq $-0x1, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %edx
movl 0x158c8(%rip), %eax     # 0x2174c
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x158bd(%rip)     # 0x2174c
movslq %eax, %rcx
leaq 0x15667(%rip), %rax     # 0x21500
movl %edx, 0x20c(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
cmpl $0x3b, -0x1c(%rbp)
jne 0xbec1
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xbec1
movl $0x3a, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0xbed6
cmpl $0x10, 0x15878(%rip)    # 0x2174c
jne 0xbed8
jmp 0xbee9
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xbe05
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %al
movb %al, 0x15850(%rip)      # 0x21750
movq -0x8(%rbp), %rax
leaq 0x155f5(%rip), %rcx     # 0x21500
addq 0x157ee(%rip), %rcx     # 0x21700
cmpq %rcx, %rax
jae 0xbf23
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0xbf2a
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0xbf2a
movl -0x20(%rbp), %eax
movb %al, 0x1581e(%rip)      # 0x21751
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/st.c
// Function: tscrolldown
void
tscrolldown(int orig, int n, int copyhist)
{
	int i;
	Line temp;

	LIMIT(n, 0, term.bot-orig+1);

	if (copyhist) {
		term.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;
		temp = term.hist[term.histi];
		term.hist[term.histi] = term.line[term.bot];
		term.line[term.bot] = temp;
	}

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

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

	if (term.scr == 0)
		selscroll(orig, n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0xdf3e
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0xdf6e
movl -0x8(%rbp), %eax
movl 0x11371(%rip), %ecx     # 0x1f2b8
subl -0x4(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0xdf62
movl 0x11361(%rip), %eax     # 0x1f2b8
subl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xdf68
movl -0x8(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xdfe8
movl 0x11300(%rip), %eax     # 0x1f280
subl $0x1, %eax
addl $0x1f4, %eax            # imm = 0x1F4
movl $0x1f4, %ecx            # imm = 0x1F4
cltd
idivl %ecx
movl %edx, 0x112ea(%rip)     # 0x1f280
movslq 0x112e3(%rip), %rcx     # 0x1f280
leaq 0x10324(%rip), %rax     # 0x1e2c8
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq 0x1031c(%rip), %rax     # 0x1e2d0
movslq 0x112fd(%rip), %rcx     # 0x1f2b8
movq (%rax,%rcx,8), %rdx
movslq 0x112ba(%rip), %rcx     # 0x1f280
leaq 0x102fb(%rip), %rax     # 0x1e2c8
movq %rdx, 0x18(%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq 0x102f3(%rip), %rax     # 0x1e2d0
movslq 0x112d4(%rip), %rcx     # 0x1f2b8
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %edi
movl 0x112c7(%rip), %esi     # 0x1f2b8
subl -0x8(%rbp), %esi
callq 0x7130
movl 0x112b9(%rip), %esi     # 0x1f2b8
subl -0x8(%rbp), %esi
addl $0x1, %esi
movl 0x102c1(%rip), %edx     # 0x1e2cc
subl $0x1, %edx
movl 0x112a4(%rip), %ecx     # 0x1f2b8
xorl %edi, %edi
callq 0x9e90
movl 0x11297(%rip), %eax     # 0x1f2b8
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl -0x4(%rbp), %ecx
addl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jl 0xe08a
movq 0x10298(%rip), %rax     # 0x1e2d0
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq 0x10285(%rip), %rax     # 0x1e2d0
movl -0x10(%rbp), %ecx
subl -0x8(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10271(%rip), %rax     # 0x1e2d0
movslq -0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq 0x1025e(%rip), %rax     # 0x1e2d0
movl -0x10(%rbp), %ecx
subl -0x8(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xe024
cmpl $0x0, 0x111f3(%rip)     # 0x1f284
jne 0xe09e
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x9080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mrdotx[P]st/x.c
// Function: xloadcolor
int
xloadcolor(int i, const char *name, Color *ncolor)
{
	XRenderColor color = { .alpha = 0xffff };

	if (!name) {
		if (BETWEEN(i, 16, 255)) { /* 256 color */
			if (i < 6*6*6+16) { /* same colors as xterm */
				color.red   = sixd_to_16bit( ((i-16)/36)%6 );
				color.green = sixd_to_16bit( ((i-16)/6) %6 );
				color.blue  = sixd_to_16bit( ((i-16)/1) %6 );
			} else { /* greyscale */
				color.red = 0x0808 + 0x0a0a * (i - (6*6*6+16));
				color.green = color.blue = color.red;
			}
			return XftColorAllocValue(xw.dpy, xw.vis,
			                          xw.cmap, &color, ncolor);
		} else
			name = colorname[i];
	}

	return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x7efe(%rip), %rax      # 0x16f98
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xf191
movl $0x10, %eax
cmpl -0x8(%rbp), %eax
jg 0xf17c
cmpl $0xff, -0x8(%rbp)
jg 0xf17c
cmpl $0xe8, -0x8(%rbp)
jge 0xf132
movl -0x8(%rbp), %eax
subl $0x10, %eax
movl $0x24, %ecx
cltd
idivl %ecx
movl $0x6, %ecx
cltd
idivl %ecx
movl %edx, %edi
callq 0x125e0
movw %ax, -0x20(%rbp)
movl -0x8(%rbp), %eax
subl $0x10, %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl $0x6, %ecx
cltd
idivl %ecx
movl %edx, %edi
callq 0x125e0
movw %ax, -0x1e(%rbp)
movl -0x8(%rbp), %eax
subl $0x10, %eax
movl $0x1, %ecx
cltd
idivl %ecx
movl $0x6, %ecx
cltd
idivl %ecx
movl %edx, %edi
callq 0x125e0
movw %ax, -0x1c(%rbp)
jmp 0xf155
movl -0x8(%rbp), %eax
subl $0xe8, %eax
imull $0xa0a, %eax, %eax      # imm = 0xA0A
addl $0x808, %eax            # imm = 0x808
movw %ax, -0x20(%rbp)
movw -0x20(%rbp), %ax
movw %ax, -0x1c(%rbp)
movw %ax, -0x1e(%rbp)
movq 0x12754(%rip), %rdi     # 0x218b0
movq 0x127c5(%rip), %rsi     # 0x21928
movq 0x1274e(%rip), %rdx     # 0x218b8
movq -0x18(%rbp), %r8
leaq -0x20(%rbp), %rcx
callq 0x6740
movl %eax, -0x4(%rbp)
jmp 0xf1b6
movslq -0x8(%rbp), %rcx
leaq 0xc679(%rip), %rax      # 0x1b800
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
jmp 0xf191
movq 0x12718(%rip), %rdi     # 0x218b0
movq 0x12789(%rip), %rsi     # 0x21928
movq 0x12712(%rip), %rdx     # 0x218b8
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
callq 0x6530
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop