LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/norx6441v2/ref/norx.c
// Function: norx_aead_encrypt
void norx_aead_encrypt(
  unsigned char *c, size_t *clen,
  const unsigned char *a, size_t alen,
  const unsigned char *m, size_t mlen,
  const unsigned char *z, size_t zlen,
  const unsigned char *nonce,
  const unsigned char *key
)
{
    norx_state_t state;
    norx_init(state, key, nonce);
    norx_absorb_data(state, a, alen, HEADER_TAG);
    norx_encrypt_data(state, c, m, mlen);
    norx_absorb_data(state, z, zlen, TRAILER_TAG);
    norx_finalise(state, c + mlen);
    *clen = mlen + BYTES(NORX_T);
    burn(state, 0, sizeof(norx_state_t));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movq 0x148(%rsp), %r12
vpmovsxbq 0xaca(%rip), %ymm0 # 0x2088
xorl %eax, %eax
vpbroadcastq 0xab7(%rip), %ymm1 # 0x2080
vmovdqu %ymm0, 0x10(%rsp,%rax,8)
addq $0x4, %rax
vpaddq %ymm1, %ymm0, %ymm0
cmpq $0x10, %rax
jne 0x15c9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
vzeroupper
callq 0x1972
movq %r14, %rdi
callq 0x1972
movq 0x140(%rsp), %rax
vmovups (%rax), %xmm0
vmovaps %xmm0, (%r14)
vmovups (%r12), %ymm0
vmovups %ymm0, 0x20(%r14)
vmovups 0x60(%r14), %ymm0
vxorps 0xa00(%rip), %ymm0, %ymm0 # 0x2020
vmovups %ymm0, 0x60(%r14)
movl $0x4, %r12d
movq %r14, %rdi
vzeroupper
callq 0x1972
decq %r12
jne 0x162c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x1060
movq %r14, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
movq %rbx, %rcx
callq 0x1080
movq %r14, %rdi
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movl $0x4, %ecx
callq 0x1060
xorb $0x8, 0x78(%r14)
movl $0x4, %r12d
movq %r14, %rdi
callq 0x1972
decq %r12
jne 0x168e
movl $0x4, %r12d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1972
decq %r12
jne 0x16a6
leaq 0x10(%rsp), %r12
vmovups (%r12), %ymm0
vmovups 0x20(%r12), %ymm1
vmovups 0x40(%r12), %ymm2
leaq 0x90(%rsp), %rdi
vmovups %ymm2, 0x40(%rdi)
vmovups %ymm1, 0x20(%rdi)
vmovups %ymm0, (%rdi)
vmovups %ymm0, (%r15,%rbx)
movq 0x2719(%rip), %rax      # 0x3e08
movl $0x60, %edx
xorl %esi, %esi
vzeroupper
callq *%rax
movq 0x2706(%rip), %rax      # 0x3e08
movl $0x80, %edx
movq %r12, %rdi
xorl %esi, %esi
callq *%rax
addq $0x20, %rbx
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
movq 0x26e7(%rip), %rax      # 0x3e08
movl $0x80, %edx
movq %r12, %rdi
xorl %esi, %esi
callq *%rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pyk[P]simple-nn/deps/pcg/src/pcg-advance-128.c
// Function: pcg_advance_lcg_128
pcg128_t pcg_advance_lcg_128(pcg128_t state, pcg128_t delta, pcg128_t cur_mult,
                             pcg128_t cur_plus)
{
    pcg128_t acc_mult = 1u;
    pcg128_t acc_plus = 0u;
    while (delta > 0) {
        if (delta & 1) {
            acc_mult *= cur_mult;
            acc_plus = acc_plus * cur_mult + cur_plus;
        }
        cur_plus = (cur_mult + 1) * cur_plus;
        cur_mult *= cur_mult;
        delta /= 2;
    }
    return acc_mult * state + acc_plus;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, -0x10(%rsp)
movq %rdi, -0x8(%rsp)
movq %rdx, %rax
orq %rcx, %rax
je 0x1b23
movq %r8, %rbx
movq %rdx, %r10
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rbp
movl $0x1, %esi
xorl %r8d, %r8d
xorl %r15d, %r15d
movl $0x1, %r11d
xorl %r12d, %r12d
testb $0x1, %r10b
je 0x1ac1
movq %r11, %rax
mulq %rbx
movq %rax, %r14
imulq %r9, %r11
addq %rdx, %r11
imulq %rbx, %r12
movq %r8, %rax
mulq %rbx
addq %r11, %r12
imulq %r9, %r8
addq %rdx, %r8
imulq %rbx, %r15
addq %r8, %r15
addq %rbp, %rax
adcq %rdi, %r15
movq %r14, %r11
movq %rax, %r8
movq %rbx, %rax
addq $0x1, %rax
movq %r9, %r13
adcq $0x0, %r13
imulq %rax, %rdi
mulq %rbp
addq %rdi, %rdx
imulq %rbp, %r13
addq %rdx, %r13
imulq %rbx, %r9
movq %rax, %r14
movq %rbx, %rax
mulq %rbx
addq %r9, %rdx
movq %rcx, %rbx
shldq $0x3f, %r10, %rbx
addq %rdx, %r9
movq %rcx, %rdx
shrq %rdx
cmpq %r10, %rsi
movl $0x0, %edi
sbbq %rcx, %rdi
movq %r14, %rbp
movq %r13, %rdi
movq %rbx, %r10
movq %rdx, %rcx
movq %rax, %rbx
jb 0x1a84
jmp 0x1b32
movl $0x1, %r11d
xorl %r12d, %r12d
xorl %r8d, %r8d
xorl %r15d, %r15d
movq -0x10(%rsp), %rsi
imulq %r11, %rsi
movq %r11, %rax
movq -0x8(%rsp), %rcx
mulq %rcx
addq %rsi, %rdx
imulq %rcx, %r12
addq %r12, %rdx
addq %r8, %rax
adcq %r15, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: csidump
void
csidump(void)
{
	size_t i;
	uint c;

	fprintf(stderr, "ESC[");
	for (i = 0; i < csiescseq.len; i++) {
		c = csiescseq.buf[i] & 0xff;
		if (isprint(c)) {
			putc(c, stderr);
		} else if (c == '\n') {
			fprintf(stderr, "(\\n)");
		} else if (c == '\r') {
			fprintf(stderr, "(\\r)");
		} else if (c == 0x1b) {
			fprintf(stderr, "(\\e)");
		} else {
			fprintf(stderr, "(%02x)", c);
		}
	}
	putc('\n', stderr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x1150e(%rip), %r13     # 0x17ff0
movq (%r13), %rcx
leaq 0xaf05(%rip), %rdi      # 0x119f2
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x6940
cmpq $0x0, 0x18b00(%rip)     # 0x1f600
je 0x6b93
callq 0x6460
movq %rax, %rbx
leaq 0x188eb(%rip), %rbp     # 0x1f400
pushq $0x4
popq %r15
pushq $0x1
popq %r12
xorl %r14d, %r14d
movzbl (%r14,%rbp), %edx
movq (%rbx), %rax
testb $0x40, 0x1(%rax,%rdx,2)
movq (%r13), %rcx
je 0x6b4b
movl %edx, %edi
movq %rcx, %rsi
callq 0x6620
incq %r14
cmpq 0x18ab9(%rip), %r14     # 0x1f600
jb 0x6b20
jmp 0x6b93
cmpl $0x1b, %edx
je 0x6b6c
cmpl $0xd, %edx
je 0x6b63
cmpl $0xa, %edx
jne 0x6b80
leaq 0xae52(%rip), %rdi      # 0x119b3
jmp 0x6b73
leaq 0xae4e(%rip), %rdi      # 0x119b8
jmp 0x6b73
leaq 0xae4a(%rip), %rdi      # 0x119bd
movq %r15, %rsi
movq %r12, %rdx
callq 0x6940
jmp 0x6b3d
movq %rcx, %rdi
leaq 0xae38(%rip), %rsi      # 0x119c2
xorl %eax, %eax
callq 0x69c0
jmp 0x6b3d
movq (%r13), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6620
// File: /workspace/github_c_makefile_star2_O3/odknt[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:
movl %edi, %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xd800, %eax           # imm = 0xD800
movl $0xfffd, %eax           # imm = 0xFFFD
movl %edi, %ecx
cmovel %eax, %ecx
cmpl $0x110000, %edi         # imm = 0x110000
cmovael %eax, %ecx
xorl %eax, %eax
leaq 0xa2f4(%rip), %rdx      # 0x114b0
movq %rax, %rdi
incq %rax
cmpl 0x4(%rdx,%rdi,4), %ecx
ja 0x71bc
cmpq $0x4, %rax
jbe 0x71d1
xorl %eax, %eax
retq
cmpq $0x1, %rax
je 0x71f1
leaq -0x1(%rax), %rdx
movl %ecx, %edi
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, (%rsi,%rdx)
shrl $0x6, %ecx
decq %rdx
jne 0x71db
leaq 0xa28c(%rip), %rdx      # 0x11484
leaq 0xa28a(%rip), %rdi      # 0x11489
movzbl (%rax,%rdi), %edi
notl %edi
andl %ecx, %edi
orb (%rax,%rdx), %dil
movb %dil, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[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
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebx
movl %edi, %ebp
cmpl $-0x1, 0x121f2(%rip)    # 0x1942c
je 0x7261
movl $0x0, 0x121ca(%rip)     # 0x19410
movl $0xffffffff, 0x121dc(%rip) # imm = 0xFFFFFFFF
movl 0x121ca(%rip), %edi     # 0x19420
movl 0x121cc(%rip), %esi     # 0x19428
callq 0x73fb
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x1219e(%rip)     # 0x19410
movl 0x1609c(%rip), %eax     # 0x1d314
shrl $0x2, %eax
andl $0x1, %eax
movl %eax, 0x121b8(%rip)     # 0x1943c
movl %r14d, 0x1218d(%rip)    # 0x19418
movl %ebp, 0x1219b(%rip)     # 0x1942c
movl %ebp, 0x1219d(%rip)     # 0x19434
movl %ebx, 0x12193(%rip)     # 0x19430
movl %ebx, 0x12195(%rip)     # 0x19438
callq 0x72ff
cmpl $0x0, 0x12169(%rip)     # 0x19418
je 0x72bb
movl $0x2, 0x12155(%rip)     # 0x19410
movl 0x1215f(%rip), %edi     # 0x19420
movl 0x12161(%rip), %esi     # 0x19428
popq %rbx
popq %r14
popq %rbp
jmp 0x73fb
// File: /workspace/github_c_makefile_star2_O3/odknt[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:
cmpl $-0x1, 0x12155(%rip)    # 0x1942c
je 0x72fe
movl $0x0, 0x1212d(%rip)     # 0x19410
movl $0xffffffff, 0x1213f(%rip) # imm = 0xFFFFFFFF
movl 0x1212d(%rip), %edi     # 0x19420
movl 0x1212f(%rip), %esi     # 0x19428
jmp 0x73fb
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: selnormalize
void
selnormalize(void)
{
	int i;

	if (sel.type == SEL_REGULAR && sel.ob.y != sel.oe.y) {
		sel.nb.x = sel.ob.y < sel.oe.y ? sel.ob.x : sel.oe.x;
		sel.ne.x = sel.ob.y < sel.oe.y ? sel.oe.x : sel.ob.x;
	} else {
		sel.nb.x = MIN(sel.ob.x, sel.oe.x);
		sel.ne.x = MAX(sel.ob.x, sel.oe.x);
	}
	sel.nb.y = MIN(sel.ob.y, sel.oe.y);
	sel.ne.y = MAX(sel.ob.y, sel.oe.y);

	selsnap(&sel.nb.x, &sel.nb.y, -1);
	selsnap(&sel.ne.x, &sel.ne.y, +1);

	/* expand selection over line breaks */
	if (sel.type == SEL_RECTANGULAR)
		return;
	i = tlinelen(sel.nb.y);
	if (i < sel.nb.x)
		sel.nb.x = i;
	if (tlinelen(sel.ne.y) <= sel.ne.x)
		sel.ne.x = term.col - 1;
}

// Assembly:
cmpl $0x1, 0x1210e(%rip)     # 0x19414
setne %dl
movl 0x12121(%rip), %eax     # 0x19430
movl 0x12123(%rip), %ecx     # 0x19438
cmpl %ecx, %eax
sete %sil
orb %dl, %sil
je 0x733e
movl 0x12106(%rip), %esi     # 0x1942c
movl 0x12108(%rip), %edx     # 0x19434
cmpl %edx, %esi
movl %edx, %edi
cmovll %esi, %edi
movl %edi, 0x120e3(%rip)     # 0x1941c
cmovgl %esi, %edx
jmp 0x735a
cmpl %ecx, %eax
movl 0x120e6(%rip), %edx     # 0x1942c
movl 0x120e8(%rip), %esi     # 0x19434
movl %esi, %edi
cmovll %edx, %edi
movl %edi, 0x120c5(%rip)     # 0x1941c
cmovll %esi, %edx
pushq %r14
pushq %rbx
pushq %rax
movl %edx, 0x120c0(%rip)     # 0x19424
leaq 0x120b9(%rip), %rbx     # 0x19424
cmpl %ecx, %eax
movl %ecx, %edx
cmovll %eax, %edx
movl %edx, 0x120a8(%rip)     # 0x19420
leaq 0x120a1(%rip), %rsi     # 0x19420
cmovgl %eax, %ecx
movl %ecx, 0x120a0(%rip)     # 0x19428
leaq 0x12099(%rip), %r14     # 0x19428
leaq 0x12086(%rip), %rdi     # 0x1941c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x9825
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x9825
cmpl $0x2, 0x1205d(%rip)     # 0x19414
je 0x73f3
movl 0x12061(%rip), %edi     # 0x19420
callq 0x793d
cmpl 0x12052(%rip), %eax     # 0x1941c
jge 0x73d2
movl %eax, 0x1204a(%rip)     # 0x1941c
movl 0x12050(%rip), %edi     # 0x19428
callq 0x793d
cmpl 0x12041(%rip), %eax     # 0x19424
jg 0x73f3
movl 0x12059(%rip), %eax     # 0x19444
decl %eax
movl %eax, 0x12031(%rip)     # 0x19424
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tsetdirt
void
tsetdirt(int top, int bot)
{
	int i;

	LIMIT(top, 0, term.row-1);
	LIMIT(bot, 0, term.row-1);

	for (i = top; i <= bot; i++)
		term.dirty[i] = 1;
}

// Assembly:
xorl %ecx, %ecx
movl $0x0, %eax
testl %edi, %edi
js 0x7413
movl 0x12034(%rip), %eax     # 0x19440
decl %eax
cmpl %edi, %eax
cmovgel %edi, %eax
testl %esi, %esi
js 0x7424
movl 0x12023(%rip), %ecx     # 0x19440
decl %ecx
cmpl %esi, %ecx
cmovgel %esi, %ecx
subl %eax, %ecx
jl 0x7530
movq 0x15ead(%rip), %rdx     # 0x1d2e0
movslq %eax, %rsi
leaq 0x4(%rcx), %rax
andq $-0x4, %rax
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rdx,%rsi,4), %rcx
addq $0xc, %rcx
xorl %edx, %edx
movdqa 0x9bb6(%rip), %xmm1     # 0x11010
movdqa 0x9bbe(%rip), %xmm2     # 0x11020
movdqa 0x9bc6(%rip), %xmm3     # 0x11030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x74bd
movl $0x1, -0xc(%rcx,%rdx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x74d4
movl $0x1, -0x8(%rcx,%rdx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x7511
movl $0x1, -0x4(%rcx,%rdx,4)
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x7523
movl $0x1, (%rcx,%rdx,4)
addq $0x4, %rdx
cmpq %rdx, %rax
jne 0x7472
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl 0x11ecd(%rip), %eax     # 0x19410
testl %eax, %eax
je 0x7631
movl %ecx, %ebx
testl %ecx, %ecx
sete %cl
cmpl $0x1, %eax
setne %al
orb %cl, %al
jne 0x759a
cmpl $-0x1, 0x11ec9(%rip)    # 0x1942c
je 0x7631
movl $0x0, 0x11e9d(%rip)     # 0x19410
movl $0xffffffff, 0x11eaf(%rip) # imm = 0xFFFFFFFF
movl 0x11e9d(%rip), %edi     # 0x19420
movl 0x11e9f(%rip), %esi     # 0x19428
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x73fb
movl %edx, %ebp
movl 0x11e7d(%rip), %r14d    # 0x19420
movl 0x11e7e(%rip), %r15d    # 0x19428
movl 0x11e63(%rip), %r12d    # 0x19414
movsd 0x11e7b(%rip), %xmm0    # 0x19434
movaps %xmm0, (%rsp)
movl %edi, 0x11e71(%rip)     # 0x19434
movl %esi, 0x11e6f(%rip)     # 0x19438
callq 0x72ff
movl %ebp, 0x11e40(%rip)     # 0x19414
movq 0x11e58(%rip), %xmm0    # 0x19434
pcmpeqd (%rsp), %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
movmskpd %xmm0, %eax
cmpl $0x3, %eax
jne 0x75fd
cmpl %ebp, %r12d
jne 0x75fd
cmpl $0x1, 0x11e15(%rip)     # 0x19410
jne 0x7622
movl 0x11e1d(%rip), %eax     # 0x19420
cmpl %r14d, %eax
cmovll %eax, %r14d
movl 0x11e18(%rip), %eax     # 0x19428
cmpl %r15d, %eax
cmovgl %eax, %r15d
movl %r14d, %edi
movl %r15d, %esi
callq 0x73fb
xorl %eax, %eax
testl %ebx, %ebx
sete %al
addl %eax, %eax
movl %eax, 0x11ddf(%rip)     # 0x19410
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: selected
int
selected(int x, int y)
{
	if (sel.mode == SEL_EMPTY || sel.ob.x == -1 ||
			sel.alt != IS_SET(MODE_ALTSCREEN))
		return 0;

	if (sel.type == SEL_RECTANGULAR)
		return BETWEEN(y, sel.nb.y, sel.ne.y)
		    && BETWEEN(x, sel.nb.x, sel.ne.x);

	return BETWEEN(y, sel.nb.y, sel.ne.y)
	    && (y != sel.nb.y || x >= sel.nb.x)
	    && (y != sel.ne.y || x <= sel.ne.x);
}

// Assembly:
xorl %eax, %eax
cmpl $0x1, 0x11dc9(%rip)     # 0x19410
je 0x76b4
cmpl $-0x1, 0x11ddc(%rip)    # 0x1942c
je 0x76b4
movl 0x11de4(%rip), %eax     # 0x1943c
btl $0x2, 0x15cb4(%rip)     # 0x1d314
sbbl $0x0, %eax
jne 0x76b2
movl 0x11db5(%rip), %ecx     # 0x19420
cmpl %esi, %ecx
setg %r8b
movl 0x11db1(%rip), %eax     # 0x19428
cmpl %esi, %eax
setl %dl
orb %r8b, %dl
cmpl $0x2, 0x11d8e(%rip)     # 0x19414
jne 0x76a2
testb %dl, %dl
jne 0x76b2
cmpl %edi, 0x11d8a(%rip)     # 0x1941c
setle %cl
cmpl %edi, 0x11d89(%rip)     # 0x19424
setge %al
andb %cl, %al
jmp 0x76b4
testb %dl, %dl
jne 0x76b2
cmpl %esi, %ecx
jne 0x76b8
cmpl %edi, 0x11d6c(%rip)     # 0x1941c
jle 0x76b8
xorl %eax, %eax
movzbl %al, %eax
retq
cmpl %esi, %eax
setne %cl
cmpl %edi, 0x11d61(%rip)     # 0x19424
setge %al
orb %cl, %al
jmp 0x76b4
// File: /workspace/github_c_makefile_star2_O3/odknt[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:
movl 0x11b01(%rip), %eax     # 0x19444
movslq %eax, %r8
movl 0x15990(%rip), %ecx     # 0x1d2dc
movl %edi, %esi
leaq 0x11aeb(%rip), %rdx     # 0x19440
subl %ecx, %esi
jge 0x7999
movl 0x15978(%rip), %r9d     # 0x1d2d8
addl %esi, %r9d
addl $0x7d1, %r9d            # imm = 0x7D1
movslq %r9d, %r9
imulq $0x10624dd3, %r9, %r10  # imm = 0x10624DD3
movq %r10, %r11
shrq $0x3f, %r11
sarq $0x27, %r10
addl %r11d, %r10d
imull $0x7d0, %r10d, %r10d    # imm = 0x7D0
subl %r10d, %r9d
movslq %r9d, %r9
leaq (%rdx,%r9,8), %r9
addq $0x18, %r9
jmp 0x79a7
movslq %esi, %r9
shlq $0x3, %r9
addq 0x11aa1(%rip), %r9      # 0x19448
movq (%r9), %r9
movq %r8, %r10
shlq $0x4, %r10
testb $0x1, -0xb(%r9,%r10)
sete %r9b
testl %r8d, %r8d
setg %r8b
andb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x7a38
movslq %esi, %r8
shlq $0x3, %r8
addq 0x11a6f(%rip), %r8      # 0x19448
movl 0x158f8(%rip), %r9d     # 0x1d2d8
addl %r9d, %esi
addl $0x7d1, %esi            # imm = 0x7D1
movslq %esi, %rsi
imulq $0x10624dd3, %rsi, %r9  # imm = 0x10624DD3
movq %r9, %r10
shrq $0x3f, %r10
sarq $0x27, %r9
addl %r10d, %r9d
imull $0x7d0, %r9d, %r9d      # imm = 0x7D0
subl %r9d, %esi
cmpl %ecx, %edi
movslq %esi, %rcx
leaq 0x18(%rdx,%rcx,8), %rcx
cmovgeq %r8, %rcx
movq (%rcx), %rcx
addq $-0x10, %rcx
movl %eax, %edx
shlq $0x4, %rdx
cmpl $0x20, (%rcx,%rdx)
jne 0x7a38
leal -0x1(%rax), %edx
cmpl $0x1, %eax
movl %edx, %eax
jg 0x7a20
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[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)
		return;
	cleanup();

	if (WIFEXITED(stat) && WEXITSTATUS(stat))
		fprintf(stderr, "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 %rbx
subq $0x10, %rsp
movl 0x15472(%rip), %edi     # 0x1d348
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
callq 0x6650
movl 0x1545d(%rip), %ebx     # 0x1d348
testl %eax, %eax
js 0x7f33
cmpl %eax, %ebx
je 0x7ef9
addq $0x10, %rsp
popq %rbx
retq
callq 0x9c33
movl 0xc(%rsp), %edx
movl %edx, %esi
andl $0x7f, %esi
jne 0x7f52
shrl $0x8, %edx
andl $0xff, %edx
je 0x7f2c
movq 0x100d5(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x98cd(%rip), %rsi      # 0x117f2
xorl %eax, %eax
callq 0x69c0
xorl %edi, %edi
callq 0x6280
callq 0x66e0
movl (%rax), %edi
callq 0x6570
leaq 0x988c(%rip), %rdi      # 0x117d2
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x70a6
movl %esi, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x7f2c
leaq 0x98a5(%rip), %rdi      # 0x1180f
xorl %eax, %eax
callq 0x70a6
// File: /workspace/github_c_makefile_star2_O3/odknt[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 = 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 += 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);
		if (term.scr > 0 && term.scr < HISTSIZE-1)
			term.scr++;
		return ret;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x153c9(%rip), %edi     # 0x1d344
movslq 0x173ce(%rip), %rax     # 0x1f350
leaq 0x153c7(%rip), %rsi     # 0x1d350
addq %rax, %rsi
movl $0x2000, %edx           # imm = 0x2000
subq %rax, %rdx
callq 0x6210
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x800c
testl %ebx, %ebx
je 0x8029
movl 0x173a1(%rip), %esi     # 0x1f350
addl %ebx, %esi
movl %esi, 0x17399(%rip)     # 0x1f350
leaq 0x15392(%rip), %r14     # 0x1d350
movq %r14, %rdi
xorl %edx, %edx
callq 0x8030
movl 0x17382(%rip), %ecx     # 0x1f350
subl %eax, %ecx
movl %ecx, 0x1737a(%rip)     # 0x1f350
jle 0x7fe8
movslq %eax, %rsi
addq %r14, %rsi
movl %ecx, %edx
movq %r14, %rdi
callq 0x6630
movl 0x152ee(%rip), %eax     # 0x1d2dc
leal -0x1(%rax), %ecx
cmpl $0x7cd, %ecx            # imm = 0x7CD
ja 0x8001
incl %eax
movl %eax, 0x152db(%rip)     # 0x1d2dc
movslq %ebx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x66e0
movl (%rax), %edi
callq 0x6570
leaq 0x9647(%rip), %rdi      # 0x11666
movq %rax, %rsi
xorl %eax, %eax
callq 0x70a6
xorl %edi, %edi
callq 0x61b0
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: twrite
int
twrite(const char *buf, int buflen, int show_ctrl)
{
	int charsize;
	Rune u;
	int n;

	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 (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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x8114
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
xorl %ebx, %ebx
movslq %ebx, %rdi
addq %r15, %rdi
testb $0x40, 0x152ba(%rip)    # 0x1d314
jne 0x806d
movzbl (%rdi), %r12d
movl %r12d, 0x4(%rsp)
movl $0x1, %r13d
jmp 0x8090
movl %r14d, %eax
subl %ebx, %eax
movslq %eax, %rdx
leaq 0x4(%rsp), %rsi
callq 0x9d4c
movq %rax, %r13
testl %r13d, %r13d
je 0x8116
movl 0x4(%rsp), %r12d
testl %ebp, %ebp
je 0x80fe
cmpl $0x20, %r12d
setae %al
cmpl $0x7f, %r12d
setne %cl
movl %r12d, %edx
andl $-0x20, %edx
cmpl $0x80, %edx
setne %dl
andb %cl, %dl
testb %al, %dl
jne 0x80fe
cmpl $0x80, %r12d
jae 0x80e1
cmpl $0xd, %r12d
ja 0x80d1
movl $0x2600, %eax           # imm = 0x2600
btl %r12d, %eax
jb 0x80fe
xorl $0x40, %r12d
movl %r12d, 0x4(%rsp)
movl $0x5e, %edi
jmp 0x80f9
andl $0x7f, %r12d
movl %r12d, 0x4(%rsp)
movl $0x5e, %edi
callq 0x9e69
movl $0x5b, %edi
callq 0x9e69
movl %r12d, %edi
callq 0x9e69
addl %r13d, %ebx
cmpl %r14d, %ebx
jl 0x804d
jmp 0x8116
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: ttywrite
void
ttywrite(const char *s, size_t n, int may_echo)
{
	const char *next;
	Arg arg = (Arg) { .i = term.scr };

	kscrolldown(&arg);

	if (may_echo && IS_SET(MODE_ECHO))
		twrite(s, n, 1);

	if (!IS_SET(MODE_CRLF)) {
		ttywriteraw(s, n);
		return;
	}

	/* This is similar to how the kernel handles ONLCR for ttys */
	while (n > 0) {
		if (*s == '\r') {
			next = s + 1;
			ttywriteraw("\r\n", 2);
		} else {
			next = memchr(s, '\r', n);
			DEFAULT(next, s + n);
			ttywriteraw(s, next - s);
		}
		n -= next - s;
		s = next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1519b(%rip), %eax     # 0x1d2dc
leaq 0x8(%rsp), %rdi
movl %eax, (%rdi)
callq 0x81f5
testl %ebp, %ebp
sete %cl
movl 0x151bc(%rip), %eax     # 0x1d314
testb $0x10, %al
sete %dl
orb %cl, %dl
jne 0x8176
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
callq 0x8030
movl 0x1519e(%rip), %eax     # 0x1d314
testb $0x8, %al
jne 0x8191
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8341
testq %rbx, %rbx
je 0x81e8
leaq 0x94e7(%rip), %r15      # 0x11684
cmpb $0xd, (%r14)
jne 0x81b1
leaq 0x1(%r14), %r12
movl $0x2, %esi
movq %r15, %rdi
jmp 0x81d5
movq %r14, %rdi
movl $0xd, %esi
movq %rbx, %rdx
callq 0x6130
leaq (%r14,%rbx), %r12
testq %rax, %rax
cmovneq %rax, %r12
movq %r12, %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x8341
movq %r14, %rax
movq %r12, %r14
addq %rax, %rbx
subq %r12, %rbx
jne 0x819d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: kscrolldown
void
kscrolldown(const Arg* a)
{
	int n = a->i;

	if (n < 0)
		n = term.row + n;

	if (n > term.scr)
		n = term.scr;

	if (term.scr > 0) {
		term.scr -= n;
		selscroll(0, -n);
		tfulldirt();
	}
}

// Assembly:
movl 0x150e1(%rip), %eax     # 0x1d2dc
testl %eax, %eax
jle 0x8340
pushq %rbx
movl (%rdi), %ecx
movl %ecx, %esi
sarl $0x1f, %esi
andl 0x1122f(%rip), %esi     # 0x19440
addl %ecx, %esi
cmpl %eax, %esi
cmovgel %eax, %esi
subl %esi, %eax
movl %eax, 0x150bc(%rip)     # 0x1d2dc
negl %esi
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x8c64
movl 0x1120f(%rip), %eax     # 0x19440
decl %eax
movl %eax, %ecx
sarl $0x1f, %ecx
andl %eax, %ecx
movq 0x1509f(%rip), %rdx     # 0x1d2e0
movslq %ecx, %rcx
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
leaq 0x4(%rsi), %rax
andq $-0x4, %rax
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rdx,%rcx,4), %rcx
addq $0xc, %rcx
movdqa 0x8da3(%rip), %xmm1     # 0x11010
movdqa 0x8dab(%rip), %xmm2     # 0x11020
movdqa 0x8db3(%rip), %xmm3     # 0x11030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rbx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x82cf
movl $0x1, -0xc(%rcx,%rbx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x82e5
movl $0x1, -0x8(%rcx,%rbx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edx
testb $0x1, %dl
je 0x8321
movl $0x1, -0x4(%rcx,%rbx,4)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x8332
movl $0x1, (%rcx,%rbx,4)
addq $0x4, %rbx
cmpq %rbx, %rax
jne 0x8285
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: ttyresize
void
ttyresize(int tw, int th)
{
	struct winsize w;

	w.ws_row = term.row;
	w.ws_col = term.col;
	w.ws_xpixel = tw;
	w.ws_ypixel = th;
	if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0)
		fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno));
}

// Assembly:
pushq %rax
movq 0x10f0e(%rip), %xmm0    # 0x19440
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movq %rsp, %rdx
movd %xmm0, (%rdx)
movw %di, 0x4(%rdx)
movw %si, 0x6(%rdx)
movl 0x14df8(%rip), %edi     # 0x1d344
movl $0x5414, %esi           # imm = 0x5414
xorl %eax, %eax
callq 0x6110
testl %eax, %eax
js 0x855e
popq %rax
retq
callq 0x6be8
jmp 0x855c
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tattrset
int
tattrset(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)
				return 1;
		}
	}

	return 0;
}

// Assembly:
movl 0x10ec5(%rip), %eax     # 0x19440
cmpl $0x2, %eax
jl 0x85c1
decl %eax
movl 0x10ebc(%rip), %ecx     # 0x19444
leal -0x1(%rcx), %edx
movq 0x10eb6(%rip), %rsi     # 0x19448
shlq $0x4, %rdx
xorl %r8d, %r8d
cmpl $0x2, %ecx
jl 0x85b9
movq (%rsi,%r8,8), %r9
xorl %r10d, %r10d
movzwl 0x4(%r9,%r10), %r11d
testl %edi, %r11d
jne 0x85c4
addq $0x10, %r10
cmpq %r10, %rdx
jne 0x85a5
incq %r8
cmpq %rax, %r8
jne 0x8599
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[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) {
				tsetdirt(i, i);
				break;
			}
		}
	}
}

// Assembly:
movl 0x10e70(%rip), %eax     # 0x19440
cmpl $0x2, %eax
jl 0x863f
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0x10e63(%rip), %ecx     # 0x19444
xorl %r14d, %r14d
cmpl $0x2, %ecx
jl 0x862a
leal -0x1(%rcx), %edx
movq 0x10e55(%rip), %rsi     # 0x19448
movq (%rsi,%r14,8), %rsi
shlq $0x4, %rdx
xorl %edi, %edi
movzwl 0x4(%rsi,%rdi), %r8d
testl %ebx, %r8d
jne 0x8613
addq $0x10, %rdi
cmpq %rdi, %rdx
jne 0x85fd
jmp 0x862a
movl %r14d, %edi
movl %r14d, %esi
callq 0x73fb
movl 0x10e20(%rip), %ecx     # 0x19444
movl 0x10e16(%rip), %eax     # 0x19440
incq %r14
leal -0x1(%rax), %edx
movslq %edx, %rdx
cmpq %rdx, %r14
jl 0x85e4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: treset
void
treset(void)
{
	uint i;

	term.c = (TCursor){{
		.mode = ATTR_NULL,
		.fg = defaultfg,
		.bg = defaultbg
	}, .x = 0, .y = 0, .state = CURSOR_DEFAULT};

	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.bot = term.row - 1;
	term.mode = MODE_WRAP|MODE_UTF8;
	memset(term.trantbl, CS_USA, sizeof(term.trantbl));
	term.charset = 0;

	for (i = 0; i < 2; i++) {
		tmoveto(0, 0);
		tcursor(CURSOR_SAVE);
		tclearregion(0, 0, term.col-1, term.row-1);
		tswapscreen();
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xfaa8(%rip), %rax      # 0x185ac
movl (%rax), %eax
leaq 0xfaa3(%rip), %rcx      # 0x185b0
movl (%rcx), %ecx
movl $0x0, 0x147cf(%rip)     # 0x1d2e8
movw $0x0, 0x147ca(%rip)     # 0x1d2ec
movl %eax, 0x147c8(%rip)     # 0x1d2f0
movl %ecx, 0x147c6(%rip)     # 0x1d2f4
movq $0x0, 0x147bf(%rip) # 0x1d2f8
movb $0x0, 0x147c0(%rip)     # 0x1d300
movq 0x147e1(%rip), %rdi     # 0x1d328
movslq 0x108f6(%rip), %rdx     # 0x19444
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x60b0
leaq 0xfa48(%rip), %rax      # 0x185a8
movl (%rax), %ecx
cmpl 0x108dc(%rip), %ecx     # 0x19444
jae 0x8b84
movq 0x147b7(%rip), %rdx     # 0x1d328
movl %ecx, %esi
movl $0x1, (%rdx,%rsi,4)
addl (%rax), %ecx
cmpl 0x108c2(%rip), %ecx     # 0x19444
jb 0x8b71
movl $0x0, 0x1477e(%rip)     # 0x1d30c
movl 0x108ac(%rip), %eax     # 0x19440
decl %eax
movl %eax, 0x14774(%rip)     # 0x1d310
movl $0x41, 0x1476e(%rip)    # 0x1d314
movq $0x3030303, 0x1476b(%rip) # imm = 0x3030303
movb $0x1, %bpl
leaq 0x16aa5(%rip), %rbx     # 0x1f660
movb 0x1473f(%rip), %dl      # 0x1d300
movl 0x10879(%rip), %ecx     # 0x19440
movl %edx, %eax
andb $-0x2, %al
movb %al, 0x1472f(%rip)      # 0x1d300
decl %ecx
movl %ecx, %esi
movl $0x0, %eax
testb $0x2, %dl
je 0x8beb
movl 0x1472b(%rip), %esi     # 0x1d310
movl 0x14721(%rip), %eax     # 0x1d30c
movl 0x10853(%rip), %edx     # 0x19444
decl %edx
movl %esi, %edi
sarl $0x1f, %edi
andl %esi, %edi
movl %edx, %esi
sarl $0x1f, %esi
andl %edx, %esi
testl %eax, %eax
cmovgl %eax, %edi
movl %esi, 0x146ec(%rip)     # 0x1d2f8
movl %edi, 0x146ea(%rip)     # 0x1d2fc
movl 0x146fc(%rip), %eax     # 0x1d314
shrl $0x2, %eax
andl $0x1, %eax
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rax, %rsi
movups 0x146b8(%rip), %xmm0    # 0x1d2e8
movups %xmm0, (%rbx,%rsi)
movups 0x146b9(%rip), %xmm0    # 0x1d2f4
movups %xmm0, 0xc(%rbx,%rsi)
xorl %edi, %edi
xorl %esi, %esi
callq 0x91c0
callq 0x932e
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x8bbb
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: selscroll
void
selscroll(int orig, int n)
{
	if (sel.ob.x == -1)
		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:
cmpl $-0x1, 0x107c1(%rip)    # 0x1942c
je 0x8d07
movl %esi, %eax
movl %edi, %ecx
movl 0x107a5(%rip), %edi     # 0x19420
cmpl %ecx, %edi
setge %sil
movl 0x14689(%rip), %edx     # 0x1d310
cmpl %edx, %edi
setle %r8b
andb %sil, %r8b
movl 0x10792(%rip), %esi     # 0x19428
cmpl %ecx, %esi
setl %cl
cmpl %edx, %esi
setg %r9b
orb %cl, %r9b
cmpb %r9b, %r8b
je 0x8cee
testb %r8b, %r8b
je 0x8d07
movl 0x1077c(%rip), %ecx     # 0x19430
addl %eax, %ecx
movl %ecx, 0x10774(%rip)     # 0x19430
addl 0x10776(%rip), %eax     # 0x19438
movl %eax, 0x10770(%rip)     # 0x19438
movl 0x1463d(%rip), %r8d     # 0x1d30c
cmpl %r8d, %ecx
jl 0x8cee
cmpl %edx, %ecx
setg %cl
cmpl %r8d, %eax
setl %r8b
cmpl %edx, %eax
setg %al
orb %cl, %al
orb %r8b, %al
cmpb $0x1, %al
jne 0x8d08
movl $0x0, 0x10718(%rip)     # 0x19410
movl $0xffffffff, 0x1072a(%rip) # imm = 0xFFFFFFFF
jmp 0x73fb
retq
jmp 0x72ff
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: kscrollup
void
kscrollup(const Arg* a)
{
	int n = a->i;

	if (n < 0)
		n = term.row + n;

	if (term.scr <= HISTSIZE-n) {
		term.scr += n;
		selscroll(0, n);
		tfulldirt();
	}
}

// Assembly:
movl (%rdi), %eax
movl %eax, %esi
sarl $0x1f, %esi
andl 0x10726(%rip), %esi     # 0x19440
addl %eax, %esi
movl 0x145ba(%rip), %eax     # 0x1d2dc
movl $0x7d0, %ecx            # imm = 0x7D0
subl %esi, %ecx
cmpl %ecx, %eax
jg 0x8e58
pushq %rbx
addl %esi, %eax
movl %eax, 0x145a2(%rip)     # 0x1d2dc
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x8c64
movl 0x106f7(%rip), %eax     # 0x19440
decl %eax
movl %eax, %ecx
sarl $0x1f, %ecx
andl %eax, %ecx
movq 0x14587(%rip), %rdx     # 0x1d2e0
movslq %ecx, %rcx
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
leaq 0x4(%rsi), %rax
andq $-0x4, %rax
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rdx,%rcx,4), %rcx
addq $0xc, %rcx
movdqa 0x828b(%rip), %xmm1     # 0x11010
movdqa 0x8293(%rip), %xmm2     # 0x11020
movdqa 0x829b(%rip), %xmm3     # 0x11030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rbx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x8de7
movl $0x1, -0xc(%rcx,%rbx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x8dfd
movl $0x1, -0x8(%rcx,%rbx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edx
testb $0x1, %dl
je 0x8e39
movl $0x1, -0x4(%rcx,%rbx,4)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x8e4a
movl $0x1, (%rcx,%rbx,4)
addq $0x4, %rbx
cmpq %rbx, %rax
jne 0x8d9d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: iso14755
void
iso14755(const Arg *arg)
{
	FILE *p;
	char *us, *e, codepoint[9], uc[UTF_SIZ];
	unsigned long utf32;

	if (!(p = popen(ISO14755CMD, "r")))
		return;

	us = fgets(codepoint, sizeof(codepoint), p);
	pclose(p);

	if (!us || *us == '\0' || *us == '-' || strlen(us) > 7)
		return;
	if ((utf32 = strtoul(us, &e, 16)) == ULONG_MAX ||
	    (*e != '\n' && *e != '\0'))
		return;

	ttywrite(uc, utf8encode(utf32, uc), 1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x8669(%rip), %rdi      # 0x116c8
leaq 0x92e2(%rip), %rsi      # 0x12348
callq 0x6a00
testq %rax, %rax
je 0x90f8
movq %rax, %r14
leaq 0xf(%rsp), %rdi
movl $0x9, %esi
movq %rax, %rdx
callq 0x6320
movq %rax, %rbx
movq %r14, %rdi
callq 0x6440
testq %rbx, %rbx
je 0x90f8
movzbl (%rbx), %eax
testl %eax, %eax
je 0x90f8
cmpl $0x2d, %eax
je 0x90f8
movq %rbx, %rdi
callq 0x6410
cmpq $0x7, %rax
ja 0x90f8
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x10, %edx
callq 0x6a10
cmpq $-0x1, %rax
je 0x90f8
movq (%rsp), %rcx
movzbl (%rcx), %ecx
cmpl $0xa, %ecx
je 0x90d9
testl %ecx, %ecx
jne 0x90f8
leaq 0xb(%rsp), %rbx
movl %eax, %edi
movq %rbx, %rsi
callq 0x7194
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x8127
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tmoveto
void
tmoveto(int x, int y)
{
	int miny, maxy;

	if (term.c.state & CURSOR_ORIGIN) {
		miny = term.top;
		maxy = term.bot;
	} else {
		miny = 0;
		maxy = term.row - 1;
	}
	term.c.state &= ~CURSOR_WRAPNEXT;
	term.c.x = LIMIT(x, 0, term.col-1);
	term.c.y = LIMIT(y, miny, maxy);
}

// Assembly:
movb 0x141a5(%rip), %dl      # 0x1d300
movl 0x141ab(%rip), %eax     # 0x1d30c
movl 0x141a9(%rip), %ecx     # 0x1d310
movl 0x102d2(%rip), %r8d     # 0x19440
movl %edx, %r9d
andb $-0x2, %r9b
movb %r9b, 0x14184(%rip)     # 0x1d300
xorl %r9d, %r9d
movl $0x0, %r10d
testl %edi, %edi
js 0x919a
movl 0x102b4(%rip), %r10d    # 0x19444
decl %r10d
cmpl %edi, %r10d
cmovgel %edi, %r10d
decl %r8d
testb $0x2, %dl
cmovel %r8d, %ecx
cmovel %r9d, %eax
movl %r10d, 0x14149(%rip)    # 0x1d2f8
cmpl %esi, %ecx
cmovgel %esi, %ecx
cmpl %esi, %eax
cmovgl %eax, %ecx
movl %ecx, 0x1413d(%rip)     # 0x1d2fc
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tclearregion
void
tclearregion(int x1, int y1, int x2, int y2)
{
	int x, y, temp;
	Glyph *gp;

	if (x1 > x2)
		temp = x1, x1 = x2, x2 = temp;
	if (y1 > y2)
		temp = y1, y1 = y2, y2 = temp;

	LIMIT(x1, 0, term.col-1);
	LIMIT(x2, 0, term.col-1);
	LIMIT(y1, 0, term.row-1);
	LIMIT(y2, 0, term.row-1);

	for (y = y1; y <= y2; y++) {
		term.dirty[y] = 1;
		for (x = x1; x <= x2; x++) {
			gp = &term.line[y][x];
			if (selected(x, y))
				selclear();
			gp->fg = term.c.attr.fg;
			gp->bg = term.c.attr.bg;
			gp->mode = 0;
			gp->u = ' ';
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl %edx, %edi
movl %edx, %r8d
cmovgl %edi, %r8d
cmovll %edi, %edx
cmpl %ecx, %esi
movl %ecx, %eax
cmovll %esi, %eax
cmovgl %esi, %ecx
movq $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
testl %edx, %edx
js 0x920a
movl 0x10245(%rip), %esi     # 0x19444
decl %esi
cmpl %esi, %edx
cmovll %edx, %esi
movl %esi, 0x4(%rsp)
testl %r8d, %r8d
js 0x9223
movl 0x1022f(%rip), %edx     # 0x19444
decl %edx
cmpl %edx, %r8d
cmovll %r8d, %edx
movq %rdx, 0x8(%rsp)
movl $0x0, (%rsp)
movl $0x0, %edx
testl %eax, %eax
js 0x9240
movl 0x10207(%rip), %edx     # 0x19440
decl %edx
cmpl %edx, %eax
cmovll %eax, %edx
testl %ecx, %ecx
js 0x9254
movl 0x101f6(%rip), %eax     # 0x19440
decl %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, (%rsp)
cmpl (%rsp), %edx
jg 0x931f
movslq 0x4(%rsp), %rcx
movq 0x8(%rsp), %rax
leal 0x1(%rax), %r13d
movslq %edx, %rbx
incl (%rsp)
shlq $0x4, %rcx
orq $0x8, %rcx
movq %rcx, 0x10(%rsp)
movq 0x1405b(%rip), %rax     # 0x1d2e0
movl $0x1, (%rax,%rbx,4)
movl 0x4(%rsp), %eax
cmpl 0x8(%rsp), %eax
jg 0x9313
movq 0x101ab(%rip), %r12     # 0x19448
movq 0x10(%rsp), %r14
movl 0x4(%rsp), %ebp
movq (%r12,%rbx,8), %r15
movl %ebp, %edi
movl %ebx, %esi
callq 0x763e
testl %eax, %eax
je 0x92ec
cmpl $-0x1, 0x1016e(%rip)    # 0x1942c
je 0x92ec
movl $0x0, 0x10146(%rip)     # 0x19410
movl $0xffffffff, 0x10158(%rip) # imm = 0xFFFFFFFF
movl 0x10146(%rip), %edi     # 0x19420
movl 0x10148(%rip), %esi     # 0x19428
callq 0x73fb
movq 0x1015c(%rip), %r12     # 0x19448
movq 0x13ffd(%rip), %rax     # 0x1d2f0
movq %rax, (%r15,%r14)
movw $0x0, -0x4(%r15,%r14)
movl $0x20, -0x8(%r15,%r14)
incl %ebp
addq $0x10, %r14
cmpl %ebp, %r13d
jne 0x92a6
incq %rbx
cmpl %ebx, (%rsp)
jne 0x927e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tswapscreen
void
tswapscreen(void)
{
	Line *tmp = term.line;

	term.line = term.alt;
	term.alt = tmp;
	term.mode ^= MODE_ALTSCREEN;
	tfulldirt();
}

// Assembly:
movdqu 0x10112(%rip), %xmm0    # 0x19448
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x10105(%rip)    # 0x19448
xorb $0x4, 0x13fca(%rip)     # 0x1d314
movl 0x100f0(%rip), %eax     # 0x19440
decl %eax
movl %eax, %ecx
sarl $0x1f, %ecx
andl %eax, %ecx
movq 0x13f80(%rip), %rdx     # 0x1d2e0
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
movslq %ecx, %rcx
leaq 0x4(%rsi), %rax
andq $-0x4, %rax
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rdx,%rcx,4), %rcx
addq $0xc, %rcx
xorl %edx, %edx
movdqa 0x7c82(%rip), %xmm1     # 0x11010
movdqa 0x7c8a(%rip), %xmm2     # 0x11020
movdqa 0x7c92(%rip), %xmm3     # 0x11030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x93f1
movl $0x1, -0xc(%rcx,%rdx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x9408
movl $0x1, -0x8(%rcx,%rdx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x9445
movl $0x1, -0x4(%rcx,%rdx,4)
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x9457
movl $0x1, (%rcx,%rdx,4)
addq $0x4, %rdx
cmpq %rdx, %rax
jne 0x93a6
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tcursor
void
tcursor(int mode)
{
	static TCursor c[2];
	int alt = IS_SET(MODE_ALTSCREEN);

	if (mode == CURSOR_SAVE) {
		c[alt] = term.c;
	} else if (mode == CURSOR_LOAD) {
		term.c = c[alt];
		tmoveto(c[alt].x, c[alt].y);
	}
}

// Assembly:
movl 0x13ea9(%rip), %ecx     # 0x1d314
shrl $0x2, %ecx
andl $0x1, %ecx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rdx
leaq 0x161e0(%rip), %rax     # 0x1f660
addq %rcx, %rax
addq %rdx, %rax
testl %edi, %edi
je 0x94aa
movups (%rax), %xmm0
movups 0xc(%rax), %xmm1
movups %xmm1, 0x13e5c(%rip)    # 0x1d2f4
movups %xmm0, 0x13e49(%rip)    # 0x1d2e8
movl 0x10(%rax), %edi
movl 0x14(%rax), %esi
jmp 0x9155
movups 0x13e43(%rip), %xmm0    # 0x1d2f4
movups %xmm0, 0xc(%rax)
movups 0x13e2c(%rip), %xmm0    # 0x1d2e8
movups %xmm0, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: cleanup
void
cleanup()
{
	int i;
	close(cmdfd);
	for (i = 0; i < ncleanfunc; i++)
		cleanfuncs[i]();
	free(cleanfuncs);
}

// Assembly:
pushq %rbx
movl 0x1370a(%rip), %edi     # 0x1d344
callq 0x60f0
cmpl $0x0, 0x136fa(%rip)     # 0x1d340
jle 0x9c65
xorl %ebx, %ebx
movq 0x136e7(%rip), %rcx     # 0x1d338
xorl %eax, %eax
callq *(%rcx,%rbx,8)
incq %rbx
movslq 0x136e0(%rip), %rax     # 0x1d340
cmpq %rax, %rbx
jl 0x9c4a
movq 0x136cc(%rip), %rdi     # 0x1d338
popq %rbx
jmp 0x63d0
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tprinter
void
tprinter(char *s, size_t len)
{
	if (iofd != -1 && xwrite(iofd, s, len) < 0) {
		perror("Error writing to output file");
		close(iofd);
		iofd = -1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0xe8f1(%rip), %ebp      # 0x18570
cmpl $-0x1, %ebp
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x9cb7
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %r15
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x69d0
testq %rax, %rax
js 0x9cc2
addq %rax, %r14
subq %rax, %r15
jne 0x9c98
testq %rbx, %rbx
js 0x9cc2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x6c73
jmp 0x9cb7
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tdumpline
void
tdumpline(int n)
{
	char buf[UTF_SIZ];
	const Glyph *bp, *end;

	bp = &term.line[n][0];
	end = &bp[MIN(tlinelen(n), term.col) - 1];
	if (bp != end || bp->u != ' ') {
		for ( ; bp <= end; ++bp)
			tprinter(buf, utf8encode(bp->u, buf));
	}
	tprinter("\n", 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0xf76f(%rip), %rax      # 0x19448
movslq %edi, %rdi
movq (%rax,%rdi,8), %r14
callq 0x793d
movl 0xf759(%rip), %ecx      # 0x19444
cmpl %ecx, %eax
cmovll %eax, %ecx
movslq %ecx, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %r15
addq $-0x10, %r15
cmpq %r15, %r14
je 0x9d08
jbe 0x9d0e
jmp 0x9d32
cmpl $0x20, (%r14)
je 0x9d32
leaq 0xc(%rsp), %rbx
movl (%r14), %edi
movq %rbx, %rsi
callq 0x7194
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9c72
addq $0x10, %r14
cmpq %r15, %r14
jbe 0x9d13
leaq 0x794c(%rip), %rdi      # 0x11685
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x9c72
// File: /workspace/github_c_makefile_star2_O3/odknt[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:
movl $0xfffd, (%rsi)         # imm = 0xFFFD
testq %rdx, %rdx
je 0x9d9f
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzbl (%rdi), %ebx
xorl %r8d, %r8d
leaq 0x771d(%rip), %r10      # 0x11489
leaq 0x7711(%rip), %r11      # 0x11484
xorl %ecx, %ecx
movzbl (%rcx,%r10), %r9d
movl %r9d, %eax
andl %ebx, %eax
movzbl (%rcx,%r11), %ebp
cmpl %ebp, %eax
je 0x9da2
incq %rcx
addq $0x4, %r8
cmpq $0x5, %rcx
jne 0x9d75
movl $0x1, %eax
jmp 0x9e60
xorl %eax, %eax
retq
leaq -0x1(%rcx), %r14
movl $0x1, %eax
cmpq $0x3, %r14
ja 0x9e60
notl %r9d
andl %ebx, %r9d
cmpq $0x1, %rdx
sete %al
cmpq $0x2, %rcx
setae %bl
setb %bpl
orb %al, %bpl
jne 0x9e21
movl $0x1, %eax
movzbl (%rdi,%rax), %ebx
xorl %r14d, %r14d
movzbl (%r14,%r10), %ebp
movl %ebp, %r15d
andl %ebx, %r15d
movzbl (%r14,%r11), %r12d
cmpl %r12d, %r15d
je 0x9dfe
incq %r14
cmpq $0x5, %r14
jne 0x9dde
jmp 0x9e60
testq %r14, %r14
jne 0x9e60
notl %ebp
andl %ebx, %ebp
shll $0x6, %r9d
orl %ebp, %r9d
incq %rax
cmpq %rcx, %rax
setb %bl
cmpq %rdx, %rax
jae 0x9e21
cmpq %rcx, %rax
jb 0x9dd7
testb %bl, %bl
je 0x9e29
xorl %eax, %eax
jmp 0x9e60
movl %r9d, (%rsi)
leaq 0x765d(%rip), %rax      # 0x11490
cmpl %r9d, (%r8,%rax)
jbe 0x9e41
movl $0xfffd, (%rsi)         # imm = 0xFFFD
jmp 0x9e5d
movl %r9d, %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xd800, %eax           # imm = 0xD800
je 0x9e39
leaq 0x7659(%rip), %rax      # 0x114b0
cmpl (%r8,%rax), %r9d
ja 0x9e39
movq %rcx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tdectest
void
tdectest(char c)
{
	int x, y;

	if (c == '8') { /* DEC screen alignment test. */
		for (x = 0; x < term.col; ++x) {
			for (y = 0; y < term.row; ++y)
				tsetchar('E', &term.c.attr, x, y);
		}
	}
}

// Assembly:
cmpb $0x38, %dil
sete %cl
movl 0xe83f(%rip), %eax      # 0x19444
testl %eax, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xac4e
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movl 0xe824(%rip), %ecx      # 0x19440
testl %ecx, %ecx
jle 0xac42
xorl %ebp, %ebp
movl $0x45, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0xaeff
incl %ebp
movl 0xe808(%rip), %ecx      # 0x19440
cmpl %ecx, %ebp
jl 0xac22
movl 0xe802(%rip), %eax      # 0x19444
incl %ebx
cmpl %eax, %ebx
jl 0xac1c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/odknt[P]st/st.c
// Function: tnewline
void
tnewline(int first_col)
{
	int y = term.c.y;

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl 0x12437(%rip), %ebx     # 0x1d2fc
cmpl 0x12445(%rip), %ebx     # 0x1d310
jne 0xaee4
movl 0x12439(%rip), %edi     # 0x1d30c
movl $0x1, %esi
movl $0x1, %edx
callq 0xb925
jmp 0xaee6
incl %ebx
xorl %edi, %edi
testl %ebp, %ebp
jne 0xaef2
movl 0x12406(%rip), %edi     # 0x1d2f8
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9155