LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/eridanhq[P]miraclelib/miraclelib.c
// Function: on_tx
void on_tx(void *mapped_base)
{
	int pwr_supp_reg;
	// Check state of power supplies
	pwr_supp_reg = read_reg_tx(36,mapped_base);
	if (pwr_supp_reg == 14)
	{
		write_reg_tx(66,32767,mapped_base); // signal gain max
	}
	else
	{
		printf("Supplies not in proper condition\n");
	}

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x24, (%rdi)
movl $0xfa, %edi
callq 0x1130
cmpl $0xe, (%rbx)
jne 0x1b9e
movl $0x80000042, (%rbx)     # imm = 0x80000042
movl $0x7fff, 0xcc(%rbx)     # imm = 0x7FFF
popq %rbx
retq
leaq 0x6f5(%rip), %rdi       # 0x229a
popq %rbx
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/eridanhq[P]miraclelib/miraclelib.c
// Function: set_freq_tx
void set_freq_tx(double fLO_in, void *mapped_base)
{
	int tab_line, fLO_mhz;
	char cmd_buff[50];
	uint64_t fLO;

	fLO = (uint64_t) fLO_in;

	if (fLO > 3700e6) // if input freq is too high, set to 3000
	{
		printf("Freq is too large, calibrating to 3700\n");
		fLO = 3700e6;
	}
	else if (fLO < 600e6) // if input freq is too low, set to 200
	{
		printf("Freq is too small, calibrating to 600\n");
		fLO = 600e6;
	}
	fLO_mhz = (int) (fLO/1e6);
	tab_line = (fLO_mhz+12)/25-24; // calculate line in air param matrix 

	//printf("fLO_mhz: %d\n", fLO_mhz);
	//printf("tab_line: %d\n", tab_line);

	write_reg_tx(64, tab_line, mapped_base); // calibrate
	ad9173_freq(fLO, mapped_base);

	//printf("A=0x%" PRIx64 "\n", A);
	sprintf(cmd_buff, "echo %lf > FLO", fLO_in);
	system(cmd_buff);
	return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0xdc898500, %r14d      # imm = 0xDC898500
cvttsd2si %xmm0, %rax
movq %rax, %rcx
movapd %xmm0, (%rsp)
subsd 0x45c(%rip), %xmm0      # 0x2078
cvttsd2si %xmm0, %rdi
sarq $0x3f, %rcx
andq %rcx, %rdi
orq %rax, %rdi
cmpq %r14, %rdi
jbe 0x1c39
leaq 0x6aa(%rip), %rdi       # 0x22e1
jmp 0x1c4f
cmpq $0x23c345ff, %rdi       # imm = 0x23C345FF
ja 0x1c57
movl $0x23c34600, %r14d      # imm = 0x23C34600
leaq 0x66c(%rip), %rdi       # 0x22bb
callq 0x1060
movq %r14, %rdi
xorps %xmm0, %xmm0
cvtsi2sd %rdi, %xmm0
divsd 0x419(%rip), %xmm0      # 0x2080
cvttsd2si %xmm0, %eax
addl $0xc, %eax
cltq
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
sarq $0x23, %rcx
shrq $0x3f, %rax
addl %ecx, %eax
addl $-0x18, %eax
movl $0x80000040, (%rbx)     # imm = 0x80000040
movl %eax, 0xcc(%rbx)
movq %rbx, %rsi
callq 0x186d
leaq 0x4ff(%rip), %rsi       # 0x21a1
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movaps (%rsp), %xmm0
movb $0x1, %al
callq 0x1110
movq %rbx, %rdi
callq 0x1090
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/norx6441v2/ref/caesar.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c, unsigned long long *clen,
    const unsigned char *m, unsigned long long mlen,
    const unsigned char *ad, unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    size_t outlen = 0;
    norx_aead_encrypt(c, &outlen, ad, adlen, m, mlen, NULL, 0, npub, k);
    *clen = outlen;
    (void)nsec; /* avoid warning */
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rax
movq %rdx, %r10
movq %rsi, %rbx
vmovups 0x48(%rsp), %xmm0
leaq 0x20(%rsp), %r14
movq $0x0, (%r14)
vmovups %xmm0, 0x10(%rsp)
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, (%rsp)
movq %r14, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %r10, %r8
movq %rax, %r9
callq 0x1030
movq (%r14), %rax
movq %rax, (%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/norx6441v2/ref/caesar.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m, unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c, unsigned long long clen,
    const unsigned char *ad, unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    size_t outlen = 0;
    int result = norx_aead_decrypt(m, &outlen, ad, adlen, c, clen, NULL, 0, npub, k);
    *mlen = outlen;
    (void)nsec; /* avoid warning */
    return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %r9, %rdx
movq %r8, %r9
movq %rcx, %r8
movq %rsi, %rbx
movq 0x40(%rsp), %rcx
vmovups 0x48(%rsp), %xmm0
leaq 0x20(%rsp), %r14
movq $0x0, (%r14)
vmovups %xmm0, 0x10(%rsp)
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, (%rsp)
movq %r14, %rsi
callq 0x1050
movq (%r14), %rcx
movq %rcx, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/norx6441v2/ref/norx.c
// Function: norx_absorb_data
void norx_absorb_data(norx_state_t state, const unsigned char * in, size_t inlen, tag_t tag)
{
    if (inlen > 0)
    {
        while (inlen >= BYTES(NORX_R))
        {
            norx_absorb_block(state, in, tag);
            #if defined(NORX_DEBUG)
            printf("Absorb block\n");
            norx_debug(state, in, BYTES(NORX_R), NULL, 0);
            #endif
            inlen -= BYTES(NORX_R);
            in += BYTES(NORX_R);
        }
        norx_absorb_lastblock(state, in, inlen, tag);
        #if defined(NORX_DEBUG)
        printf("Absorb lastblock\n");
        norx_debug(state, in, inlen, NULL, 0);
        #endif
    }
}

// Assembly:
testq %rdx, %rdx
je 0x1316
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, %r13d
cmpq $0x60, %rdx
jb 0x12a0
xorq %r13, 0x78(%rbx)
movl $0x4, %r12d
movq %rbx, %rdi
callq 0x1972
decq %r12
jne 0x1272
xorl %eax, %eax
movq (%r15,%rax,8), %rcx
xorq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0xc, %rax
jne 0x1281
addq $-0x60, %r14
addq $0x60, %r15
cmpq $0x5f, %r14
ja 0x1268
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %r12
vmovups %ymm0, 0x40(%r12)
vmovups %ymm0, 0x20(%r12)
vmovups %ymm0, (%r12)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
vzeroupper
callq 0x10b0
movb $0x1, (%rsp,%r14)
orb $-0x80, 0x5f(%r12)
xorq %r13, 0x78(%rbx)
movl $0x4, %r14d
movq %rbx, %rdi
callq 0x1972
decq %r14
jne 0x12e1
xorl %eax, %eax
vmovups (%rbx,%rax,8), %ymm0
vxorps (%rsp,%rax,8), %ymm0, %ymm0
vmovups %ymm0, (%rbx,%rax,8)
addq $0x4, %rax
cmpq $0xc, %rax
jne 0x12f0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/norx6441v2/ref/norx.c
// Function: norx_encrypt_data
void norx_encrypt_data(norx_state_t state, unsigned char *out, const unsigned char * in, size_t inlen)
{
    if (inlen > 0)
    {
        while (inlen >= BYTES(NORX_R))
        {
            norx_encrypt_block(state, out, in);
            #if defined(NORX_DEBUG)
            printf("Encrypt block\n");
            norx_debug(state, in, BYTES(NORX_R), out, BYTES(NORX_R));
            #endif
            inlen -= BYTES(NORX_R);
            in    += BYTES(NORX_R);
            out   += BYTES(NORX_R);
        }
        norx_encrypt_lastblock(state, out, in, inlen);
        #if defined(NORX_DEBUG)
        printf("Encrypt lastblock\n");
        norx_debug(state, in, inlen, out, inlen);
        #endif
    }
}

// Assembly:
testq %rcx, %rcx
je 0x1412
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x60, %rcx
jb 0x1387
xorb $0x2, 0x78(%r15)
movl $0x4, %r13d
movq %r15, %rdi
callq 0x1972
decq %r13
jne 0x134d
xorl %eax, %eax
movq (%r15,%rax,8), %rcx
xorq (%r12,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
movq %rcx, (%r14,%rax,8)
incq %rax
cmpq $0xc, %rax
jne 0x135c
addq $-0x60, %rbx
addq $0x60, %r12
addq $0x60, %r14
cmpq $0x5f, %rbx
ja 0x1342
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %r13
vmovups %ymm0, 0x40(%r13)
vmovups %ymm0, 0x20(%r13)
vmovups %ymm0, (%r13)
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
vzeroupper
callq 0x10b0
movb $0x1, (%rsp,%rbx)
orb $-0x80, 0x5f(%r13)
xorb $0x2, 0x78(%r15)
movl $0x4, %r12d
movq %r15, %rdi
callq 0x1972
decq %r12
jne 0x13c5
xorl %eax, %eax
vmovups (%r15,%rax,8), %ymm0
vxorps (%rsp,%rax,8), %ymm0, %ymm0
vmovups %ymm0, (%r15,%rax,8)
vmovups %ymm0, (%rsp,%rax,8)
addq $0x4, %rax
cmpq $0xc, %rax
jne 0x13d4
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
vzeroupper
callq 0x10b0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/norx6441v2/ref/norx.c
// Function: norx_decrypt_data
void norx_decrypt_data(norx_state_t state, unsigned char *out, const unsigned char * in, size_t inlen)
{
    if (inlen > 0)
    {
        while (inlen >= BYTES(NORX_R))
        {
            norx_decrypt_block(state, out, in);
            #if defined(NORX_DEBUG)
            printf("Decrypt block\n");
            norx_debug(state, in, BYTES(NORX_R), out, BYTES(NORX_R));
            #endif
            inlen -= BYTES(NORX_R);
            in    += BYTES(NORX_R);
            out   += BYTES(NORX_R);
        }
        norx_decrypt_lastblock(state, out, in, inlen);
        #if defined(NORX_DEBUG)
        printf("Decrypt lastblock\n");
        norx_debug(state, in, inlen, out, inlen);
        #endif
    }
}

// Assembly:
testq %rcx, %rcx
je 0x1531
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x60, %rcx
jb 0x1483
xorb $0x2, 0x78(%r15)
movl $0x4, %r13d
movq %r15, %rdi
callq 0x1972
decq %r13
jne 0x1446
xorl %eax, %eax
movq (%r12,%rax,8), %rcx
movq (%r15,%rax,8), %rdx
xorq %rcx, %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, (%r15,%rax,8)
incq %rax
cmpq $0xc, %rax
jne 0x1455
addq $-0x60, %rbx
addq $0x60, %r12
addq $0x60, %r14
cmpq $0x5f, %rbx
ja 0x143b
xorb $0x2, 0x78(%r15)
movl $0x4, %r13d
movq %r15, %rdi
callq 0x1972
decq %r13
jne 0x148e
vmovups (%r15), %ymm0
vmovups 0x20(%r15), %ymm1
vmovups 0x40(%r15), %ymm2
movq %rsp, %r13
vmovups %ymm2, 0x40(%r13)
vmovups %ymm1, 0x20(%r13)
vmovups %ymm0, (%r13)
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
vzeroupper
callq 0x10b0
xorb $0x1, (%rsp,%rbx)
xorb $-0x80, 0x5f(%r13)
xorl %eax, %eax
vmovups (%rsp,%rax,8), %ymm0
vxorps (%r15,%rax,8), %ymm0, %ymm1
vmovups %ymm1, (%rsp,%rax,8)
vmovups %ymm0, (%r15,%rax,8)
addq $0x4, %rax
cmpq $0xc, %rax
jne 0x14dd
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
vzeroupper
callq 0x10b0
movq 0x28f0(%rip), %rax      # 0x3e08
movl $0x60, %edx
movq %r15, %rdi
xorl %esi, %esi
callq *%rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xa8a(%rip), %ymm0 # 0x2048
xorl %eax, %eax
vpbroadcastq 0xa77(%rip), %ymm1 # 0x2040
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_O1/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 0x1b7b
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 0x1b19
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 0x1adc
jmp 0x1b8a
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
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x104ee(%rip), %r13     # 0x16ff0
movq (%r13), %rcx
leaq 0x9eb9(%rip), %rdi      # 0x109c6
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x6960
cmpq $0x0, 0x17af0(%rip)     # 0x1e610
je 0x6bb3
callq 0x6460
movq %rax, %rbx
leaq 0x178db(%rip), %rbp     # 0x1e410
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 0x6b6b
movl %edx, %edi
movq %rcx, %rsi
callq 0x6620
incq %r14
cmpq 0x17aa9(%rip), %r14     # 0x1e610
jb 0x6b40
jmp 0x6bb3
cmpl $0x1b, %edx
je 0x6b8c
cmpl $0xd, %edx
je 0x6b83
cmpl $0xa, %edx
jne 0x6ba0
leaq 0x9e06(%rip), %rdi      # 0x10987
jmp 0x6b93
leaq 0x9e02(%rip), %rdi      # 0x1098c
jmp 0x6b93
leaq 0x9dfe(%rip), %rdi      # 0x10991
movq %r15, %rsi
movq %r12, %rdx
callq 0x6960
jmp 0x6b5d
movq %rcx, %rdi
leaq 0x9dec(%rip), %rsi      # 0x10996
xorl %eax, %eax
callq 0x69e0
jmp 0x6b5d
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_O1/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 0x92a4(%rip), %rdx      # 0x10480
movq %rax, %rdi
incq %rax
cmpl 0x4(%rdx,%rdi,4), %ecx
ja 0x71dc
cmpq $0x4, %rax
jbe 0x71f1
xorl %eax, %eax
retq
cmpq $0x1, %rax
je 0x7211
leaq -0x1(%rax), %rdx
movl %ecx, %edi
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, (%rsi,%rdx)
shrl $0x6, %ecx
decq %rdx
jne 0x71fb
leaq 0x923c(%rip), %rdx      # 0x10454
leaq 0x923a(%rip), %rdi      # 0x10459
movzbl (%rax,%rdi), %edi
notl %edi
andl %ecx, %edi
orb (%rax,%rdx), %dil
movb %dil, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x111e2(%rip)    # 0x1843c
je 0x7281
movl $0x0, 0x111ba(%rip)     # 0x18420
movl $0xffffffff, 0x111cc(%rip) # imm = 0xFFFFFFFF
movl 0x111ba(%rip), %edi     # 0x18430
movl 0x111bc(%rip), %esi     # 0x18438
callq 0x741b
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x1118e(%rip)     # 0x18420
movl 0x1508c(%rip), %eax     # 0x1c324
shrl $0x2, %eax
andl $0x1, %eax
movl %eax, 0x111a8(%rip)     # 0x1844c
movl %r14d, 0x1117d(%rip)    # 0x18428
movl %ebp, 0x1118b(%rip)     # 0x1843c
movl %ebp, 0x1118d(%rip)     # 0x18444
movl %ebx, 0x11183(%rip)     # 0x18440
movl %ebx, 0x11185(%rip)     # 0x18448
callq 0x731f
cmpl $0x0, 0x11159(%rip)     # 0x18428
je 0x72db
movl $0x2, 0x11145(%rip)     # 0x18420
movl 0x1114f(%rip), %edi     # 0x18430
movl 0x11151(%rip), %esi     # 0x18438
popq %rbx
popq %r14
popq %rbp
jmp 0x741b
// File: /workspace/github_c_makefile_star2_O1/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, 0x11145(%rip)    # 0x1843c
je 0x731e
movl $0x0, 0x1111d(%rip)     # 0x18420
movl $0xffffffff, 0x1112f(%rip) # imm = 0xFFFFFFFF
movl 0x1111d(%rip), %edi     # 0x18430
movl 0x1111f(%rip), %esi     # 0x18438
jmp 0x741b
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x110fe(%rip)     # 0x18424
jne 0x7336
movl 0x1111a(%rip), %eax     # 0x18448
cmpl %eax, 0x1110c(%rip)     # 0x18440
jne 0x7354
movl 0x11100(%rip), %ecx     # 0x1843c
movl 0x11102(%rip), %eax     # 0x18444
cmpl %eax, %ecx
movl %eax, %edx
cmovll %ecx, %edx
movl %edx, 0x110dd(%rip)     # 0x1842c
cmovgl %ecx, %eax
jmp 0x736e
movl 0x110e2(%rip), %eax     # 0x1843c
movl 0x110e4(%rip), %ecx     # 0x18444
movl %ecx, %edx
cmovll %eax, %edx
movl %edx, 0x110c1(%rip)     # 0x1842c
cmovll %ecx, %eax
pushq %r14
pushq %rbx
pushq %rax
movl %eax, 0x110bc(%rip)     # 0x18434
leaq 0x110b5(%rip), %rbx     # 0x18434
movl 0x110bb(%rip), %eax     # 0x18440
movl 0x110bd(%rip), %ecx     # 0x18448
cmpl %ecx, %eax
movl %ecx, %edx
cmovll %eax, %edx
movl %edx, 0x11098(%rip)     # 0x18430
leaq 0x11091(%rip), %rsi     # 0x18430
cmovgl %eax, %ecx
movl %ecx, 0x11090(%rip)     # 0x18438
leaq 0x11089(%rip), %r14     # 0x18438
leaq 0x11076(%rip), %rdi     # 0x1842c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x93b4
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x93b4
cmpl $0x2, 0x1104d(%rip)     # 0x18424
je 0x7413
movl 0x11051(%rip), %edi     # 0x18430
callq 0x785d
cmpl 0x11042(%rip), %eax     # 0x1842c
jge 0x73f2
movl %eax, 0x1103a(%rip)     # 0x1842c
movl 0x11040(%rip), %edi     # 0x18438
callq 0x785d
cmpl 0x11031(%rip), %eax     # 0x18434
jg 0x7413
movl 0x11049(%rip), %eax     # 0x18454
decl %eax
movl %eax, 0x11021(%rip)     # 0x18434
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %eax, %eax
movl $0x0, %ecx
testl %edi, %edi
js 0x7433
movl 0x11024(%rip), %ecx     # 0x18450
decl %ecx
cmpl %edi, %ecx
cmovgel %edi, %ecx
testl %esi, %esi
js 0x7444
movl 0x11013(%rip), %eax     # 0x18450
decl %eax
cmpl %esi, %eax
cmovgel %esi, %eax
cmpl %eax, %ecx
jg 0x746a
movslq %ecx, %rdx
shlq $0x2, %rdx
addq 0x14e9a(%rip), %rdx     # 0x1c2f0
subl %ecx, %eax
incl %eax
xorl %ecx, %ecx
movl $0x1, (%rdx,%rcx,4)
incq %rcx
cmpl %ecx, %eax
jne 0x745c
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x10fa4(%rip), %eax     # 0x18420
testl %eax, %eax
je 0x7569
movl %ecx, %ebx
testl %ecx, %ecx
sete %cl
cmpl $0x1, %eax
setne %al
orb %cl, %al
jne 0x74d5
cmpl $-0x1, 0x10fa0(%rip)    # 0x1843c
je 0x7569
movl $0x0, 0x10f74(%rip)     # 0x18420
movl $0xffffffff, 0x10f86(%rip) # imm = 0xFFFFFFFF
movl 0x10f74(%rip), %edi     # 0x18430
movl 0x10f76(%rip), %esi     # 0x18438
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x741b
movl %edx, %ebp
movl 0x10f6a(%rip), %r12d    # 0x18448
movl 0x10f5f(%rip), %r13d    # 0x18444
movl 0x10f44(%rip), %r14d    # 0x18430
movl 0x10f45(%rip), %r15d    # 0x18438
movl 0x10f2b(%rip), %eax     # 0x18424
movl %eax, 0x4(%rsp)
movl %edi, 0x10f41(%rip)     # 0x18444
movl %esi, 0x10f3f(%rip)     # 0x18448
callq 0x731f
movl %ebp, 0x10f10(%rip)     # 0x18424
cmpl 0x10f2d(%rip), %r12d    # 0x18448
jne 0x7535
cmpl 0x10f20(%rip), %r13d    # 0x18444
jne 0x7535
cmpl %ebp, 0x4(%rsp)
jne 0x7535
cmpl $0x1, 0x10eed(%rip)     # 0x18420
jne 0x755a
movl 0x10ef5(%rip), %eax     # 0x18430
cmpl %r14d, %eax
cmovll %eax, %r14d
movl 0x10ef0(%rip), %eax     # 0x18438
cmpl %r15d, %eax
cmovgl %eax, %r15d
movl %r14d, %edi
movl %r15d, %esi
callq 0x741b
xorl %eax, %eax
testl %ebx, %ebx
sete %al
addl %eax, %eax
movl %eax, 0x10eb7(%rip)     # 0x18420
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x10e9f(%rip)     # 0x18420
je 0x75ee
cmpl $-0x1, 0x10eb2(%rip)    # 0x1843c
je 0x75ee
movl 0x10eba(%rip), %eax     # 0x1844c
btl $0x2, 0x14d8a(%rip)     # 0x1c324
sbbl $0x0, %eax
jne 0x75ec
movl 0x10e8b(%rip), %ecx     # 0x18430
cmpl %esi, %ecx
setg %r8b
movl 0x10e87(%rip), %eax     # 0x18438
cmpl %esi, %eax
setl %dl
orb %r8b, %dl
cmpl $0x2, 0x10e64(%rip)     # 0x18424
jne 0x75dc
testb %dl, %dl
jne 0x75ec
cmpl %edi, 0x10e60(%rip)     # 0x1842c
setle %cl
cmpl %edi, 0x10e5f(%rip)     # 0x18434
setge %al
andb %cl, %al
jmp 0x75ee
testb %dl, %dl
jne 0x75ec
cmpl %esi, %ecx
jne 0x75f2
cmpl %edi, 0x10e42(%rip)     # 0x1842c
jle 0x75f2
xorl %eax, %eax
movzbl %al, %eax
retq
cmpl %esi, %eax
setne %cl
cmpl %edi, 0x10e37(%rip)     # 0x18434
setge %al
orb %cl, %al
jmp 0x75ee
// File: /workspace/github_c_makefile_star2_O1/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 0x10bf1(%rip), %eax     # 0x18454
movslq %eax, %r8
movl 0x14a80(%rip), %ecx     # 0x1c2ec
movl %edi, %esi
leaq 0x10bdb(%rip), %rdx     # 0x18450
subl %ecx, %esi
jge 0x78b9
movl 0x14a68(%rip), %r9d     # 0x1c2e8
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 0x78c7
movslq %esi, %r9
shlq $0x3, %r9
addq 0x10b91(%rip), %r9      # 0x18458
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 0x7958
movslq %esi, %r8
shlq $0x3, %r8
addq 0x10b5f(%rip), %r8      # 0x18458
movl 0x149e8(%rip), %r9d     # 0x1c2e8
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 0x7958
leal -0x1(%rax), %edx
cmpl $0x1, %eax
movl %edx, %eax
jg 0x7940
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1455d(%rip), %edi     # 0x1c358
leaq 0xc(%rsp), %rsi
movl $0x1, %edx
callq 0x6650
movl 0x14548(%rip), %ebx     # 0x1c358
testl %eax, %eax
js 0x7e77
cmpl %eax, %ebx
je 0x7e1e
addq $0x10, %rsp
popq %rbx
retq
callq 0x97a2
movl 0xc(%rsp), %edx
movl %edx, %esi
andl $0x7f, %esi
jne 0x7e58
shrl $0x8, %edx
andl $0xff, %edx
je 0x7e58
movq 0xf1b0(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x897a(%rip), %rsi      # 0x107c4
xorl %eax, %eax
callq 0x69e0
xorl %edi, %edi
callq 0x6280
movl %esi, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x7e51
leaq 0x8971(%rip), %rdi      # 0x107e1
xorl %eax, %eax
callq 0x70c6
callq 0x66e0
movl (%rax), %edi
callq 0x6570
leaq 0x891a(%rip), %rdi      # 0x107a4
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x70c6
// File: /workspace/github_c_makefile_star2_O1/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 0x144b4(%rip), %edi     # 0x1c354
movslq 0x164b9(%rip), %rax     # 0x1e360
leaq 0x144b2(%rip), %rsi     # 0x1c360
addq %rax, %rsi
movl $0x2000, %edx           # imm = 0x2000
subq %rax, %rdx
callq 0x6210
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x7f31
testl %ebx, %ebx
je 0x7f4e
movl 0x1648c(%rip), %esi     # 0x1e360
addl %ebx, %esi
movl %esi, 0x16484(%rip)     # 0x1e360
leaq 0x1447d(%rip), %r14     # 0x1c360
movq %r14, %rdi
xorl %edx, %edx
callq 0x7f55
movl 0x1646d(%rip), %ecx     # 0x1e360
subl %eax, %ecx
movl %ecx, 0x16465(%rip)     # 0x1e360
jle 0x7f0d
movslq %eax, %rsi
addq %r14, %rsi
movl %ecx, %edx
movq %r14, %rdi
callq 0x6630
movl 0x143d9(%rip), %eax     # 0x1c2ec
leal -0x1(%rax), %ecx
cmpl $0x7cd, %ecx            # imm = 0x7CD
ja 0x7f26
incl %eax
movl %eax, 0x143c6(%rip)     # 0x1c2ec
movslq %ebx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x66e0
movl (%rax), %edi
callq 0x6570
leaq 0x86f4(%rip), %rdi      # 0x10638
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c6
xorl %edi, %edi
callq 0x61b0
// File: /workspace/github_c_makefile_star2_O1/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 0x8032
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
xorl %ebx, %ebx
leaq 0x4(%rsp), %r12
movslq %ebx, %rdi
addq %r15, %rdi
testb $0x40, 0x143a0(%rip)    # 0x1c324
jne 0x7f95
movzbl (%rdi), %eax
movl %eax, 0x4(%rsp)
movl $0x1, %r13d
jmp 0x7fb1
movl %r14d, %eax
subl %ebx, %eax
movslq %eax, %rdx
movq %r12, %rsi
callq 0x98c0
movq %rax, %r13
testl %r13d, %r13d
je 0x8034
testl %ebp, %ebp
je 0x801b
movl 0x4(%rsp), %eax
cmpl $0x20, %eax
setae %cl
cmpl $0x7f, %eax
setne %dl
movl %eax, %esi
andl $-0x20, %esi
cmpl $0x80, %esi
setne %sil
andb %dl, %sil
testb %cl, %sil
jne 0x801b
cmpl $0x80, %eax
jae 0x8000
cmpl $0xd, %eax
ja 0x7ff2
movl $0x2600, %ecx           # imm = 0x2600
btl %eax, %ecx
jb 0x801b
xorl $0x40, %eax
movl %eax, 0x4(%rsp)
movl $0x5e, %edi
jmp 0x8016
andl $0x7f, %eax
movl %eax, 0x4(%rsp)
movl $0x5e, %edi
callq 0x99e0
movl $0x5b, %edi
callq 0x99e0
movl 0x4(%rsp), %edi
callq 0x99e0
addl %r13d, %ebx
cmpl %r14d, %ebx
jl 0x7f77
jmp 0x8034
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_O1/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 0x1428d(%rip), %eax     # 0x1c2ec
leaq 0x8(%rsp), %rdi
movl %eax, (%rdi)
callq 0x8108
testl %ebp, %ebp
je 0x8087
testb $0x10, 0x142ae(%rip)    # 0x1c324
je 0x8087
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
callq 0x7f55
testb $0x8, 0x14296(%rip)     # 0x1c324
jne 0x80a7
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x816f
testq %rbx, %rbx
je 0x80fb
leaq 0x85a3(%rip), %r15      # 0x10656
cmpb $0xd, (%r14)
jne 0x80c7
leaq 0x1(%r14), %r12
movl $0x2, %esi
movq %r15, %rdi
jmp 0x80eb
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 0x816f
addq %r14, %rbx
movq %r12, %r14
subq %r12, %rbx
jne 0x80b3
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x141de(%rip), %eax     # 0x1c2ec
testl %eax, %eax
jle 0x816e
pushq %rbx
movl (%rdi), %ecx
movl %ecx, %esi
sarl $0x1f, %esi
andl 0x10330(%rip), %esi     # 0x18450
addl %ecx, %esi
cmpl %eax, %esi
cmovgel %eax, %esi
subl %esi, %eax
movl %eax, 0x141bd(%rip)     # 0x1c2ec
negl %esi
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x8a71
movl 0x10310(%rip), %edx     # 0x18450
decl %edx
movl %edx, %eax
sarl $0x1f, %eax
andl %edx, %eax
cltq
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
incl %ecx
shlq $0x2, %rax
addq 0x14191(%rip), %rax     # 0x1c2f0
movl $0x1, (%rax,%rbx,4)
incq %rbx
cmpl %ebx, %ecx
jne 0x815f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl 0x10110(%rip), %eax     # 0x18450
movq %rsp, %rdx
movw %ax, (%rdx)
movzwl 0x10107(%rip), %eax     # 0x18454
movw %ax, 0x2(%rdx)
movw %di, 0x4(%rdx)
movw %si, 0x6(%rdx)
movl 0x13ff5(%rip), %edi     # 0x1c354
movl $0x5414, %esi           # imm = 0x5414
xorl %eax, %eax
callq 0x6110
testl %eax, %eax
js 0x8371
popq %rax
retq
callq 0x6c08
jmp 0x836f
// File: /workspace/github_c_makefile_star2_O1/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 0x100c2(%rip), %eax     # 0x18450
cmpl $0x2, %eax
jl 0x83d4
decl %eax
movl 0x100b9(%rip), %ecx     # 0x18454
leal -0x1(%rcx), %edx
movq 0x100b3(%rip), %rsi     # 0x18458
shlq $0x4, %rdx
xorl %r8d, %r8d
cmpl $0x2, %ecx
jl 0x83cc
movq (%rsi,%r8,8), %r9
xorl %r10d, %r10d
movzwl 0x4(%r9,%r10), %r11d
testl %edi, %r11d
jne 0x83d7
addq $0x10, %r10
cmpq %r10, %rdx
jne 0x83b8
incq %r8
cmpq %rax, %r8
jne 0x83ac
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x2, 0x1006c(%rip)     # 0x18450
jl 0x8445
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r14d, %r14d
movl 0x1005f(%rip), %eax     # 0x18454
cmpl $0x2, %eax
jl 0x842c
decl %eax
movq 0x10055(%rip), %rcx     # 0x18458
movq (%rcx,%r14,8), %rcx
shlq $0x4, %rax
xorl %edx, %edx
movzwl 0x4(%rcx,%rdx), %esi
testl %ebx, %esi
jne 0x8421
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x840d
jmp 0x842c
movl %r14d, %edi
movl %r14d, %esi
callq 0x741b
incq %r14
movslq 0x1001a(%rip), %rax     # 0x18450
decq %rax
cmpq %rax, %r14
jl 0x83ef
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
leaq 0xeca9(%rip), %rax      # 0x175bc
movl (%rax), %eax
leaq 0xeca4(%rip), %rcx      # 0x175c0
movl (%rcx), %ecx
movl $0x0, 0x139d0(%rip)     # 0x1c2f8
movw $0x0, 0x139cb(%rip)     # 0x1c2fc
movl %eax, 0x139c9(%rip)     # 0x1c300
movl %ecx, 0x139c7(%rip)     # 0x1c304
movq $0x0, 0x139c0(%rip) # 0x1c308
movb $0x0, 0x139c1(%rip)     # 0x1c310
movq 0x139e2(%rip), %rdi     # 0x1c338
movslq 0xfaf7(%rip), %rdx      # 0x18454
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x60b0
leaq 0xec49(%rip), %rax      # 0x175b8
movl (%rax), %ecx
cmpl 0xfadd(%rip), %ecx      # 0x18454
jae 0x8993
movq 0x139b8(%rip), %rdx     # 0x1c338
movl %ecx, %esi
movl $0x1, (%rdx,%rsi,4)
addl (%rax), %ecx
cmpl 0xfac3(%rip), %ecx      # 0x18454
jb 0x8980
movl $0x0, 0x1397f(%rip)     # 0x1c31c
movl 0xfaad(%rip), %eax      # 0x18450
decl %eax
movl %eax, 0x13975(%rip)     # 0x1c320
movl $0x41, 0x1396f(%rip)    # 0x1c324
movq $0x3030303, 0x1396c(%rip) # imm = 0x3030303
movl $0x1, %ebx
leaq 0x15ca4(%rip), %r14     # 0x1e670
movb 0x1393e(%rip), %dl      # 0x1c310
movl 0xfa78(%rip), %ecx      # 0x18450
movl %edx, %eax
andb $-0x2, %al
movb %al, 0x1392e(%rip)      # 0x1c310
decl %ecx
movl %ecx, %esi
movl $0x0, %eax
testb $0x2, %dl
je 0x89fc
movl 0x1392a(%rip), %esi     # 0x1c320
movl 0x13920(%rip), %eax     # 0x1c31c
movl 0xfa52(%rip), %edx      # 0x18454
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, 0x138eb(%rip)     # 0x1c308
movl %edi, 0x138e9(%rip)     # 0x1c30c
movl 0x138fb(%rip), %eax     # 0x1c324
shrl $0x2, %eax
andl $0x1, %eax
leaq (%rax,%rax,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rax, %rsi
movups 0x138b7(%rip), %xmm0    # 0x1c2f8
movups %xmm0, (%r14,%rsi)
movups 0x138b7(%rip), %xmm0    # 0x1c304
movups %xmm0, 0xc(%r14,%rsi)
xorl %edi, %edi
xorl %esi, %esi
callq 0x8f20
callq 0x908e
decl %ebx
je 0x89cc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0xf9c4(%rip)     # 0x1843c
je 0x8b23
movl %esi, %eax
movl %edi, %ecx
movl 0xf9a8(%rip), %edi      # 0x18430
cmpl %ecx, %edi
setge %sil
movl 0x1388c(%rip), %edx     # 0x1c320
cmpl %edx, %edi
setle %r8b
andb %sil, %r8b
movl 0xf995(%rip), %esi      # 0x18438
cmpl %ecx, %esi
setl %r9b
cmpl %edx, %esi
setg %r10b
orb %r9b, %r10b
cmpb %r10b, %r8b
je 0x8b0a
cmpl %edx, %edi
setle %r8b
cmpl %ecx, %edi
setge %cl
andb %r8b, %cl
cmpb $0x1, %cl
jne 0x8b23
movl 0xf970(%rip), %ecx      # 0x18440
addl %eax, %ecx
movl %ecx, 0xf968(%rip)      # 0x18440
addl 0xf96a(%rip), %eax      # 0x18448
movl %eax, 0xf964(%rip)      # 0x18448
movl 0x13831(%rip), %r8d     # 0x1c31c
cmpl %r8d, %ecx
jl 0x8b0a
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 0x8b24
movl $0x0, 0xf90c(%rip)      # 0x18420
movl $0xffffffff, 0xf91e(%rip) # imm = 0xFFFFFFFF
jmp 0x741b
retq
jmp 0x731f
// File: /workspace/github_c_makefile_star2_O1/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 0xf91a(%rip), %esi      # 0x18450
addl %eax, %esi
movl 0x137ae(%rip), %eax     # 0x1c2ec
movl $0x7d0, %ecx            # imm = 0x7D0
subl %esi, %ecx
cmpl %ecx, %eax
jg 0x8b8f
pushq %rbx
addl %esi, %eax
movl %eax, 0x1379a(%rip)     # 0x1c2ec
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x8a71
movl 0xf8ef(%rip), %edx      # 0x18450
decl %edx
movl %edx, %eax
sarl $0x1f, %eax
andl %edx, %eax
cltq
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
incl %ecx
shlq $0x2, %rax
addq 0x13770(%rip), %rax     # 0x1c2f0
movl $0x1, (%rax,%rbx,4)
incq %rbx
cmpl %ebx, %ecx
jne 0x8b80
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x78db(%rip), %rdi      # 0x1069a
leaq 0x8562(%rip), %rsi      # 0x11328
callq 0x6a20
testq %rax, %rax
je 0x8e58
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 0x8e58
movzbl (%rbx), %eax
testl %eax, %eax
je 0x8e58
cmpl $0x2d, %eax
je 0x8e58
movq %rbx, %rdi
callq 0x6410
cmpq $0x7, %rax
ja 0x8e58
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x10, %edx
callq 0x6a30
cmpq $-0x1, %rax
je 0x8e58
movq (%rsp), %rcx
movzbl (%rcx), %ecx
cmpl $0xa, %ecx
je 0x8e39
testl %ecx, %ecx
jne 0x8e58
leaq 0xb(%rsp), %rbx
movl %eax, %edi
movq %rbx, %rsi
callq 0x71b4
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x8045
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x13455(%rip), %dl      # 0x1c310
movl 0x1345b(%rip), %eax     # 0x1c31c
movl 0x13459(%rip), %ecx     # 0x1c320
movl 0xf582(%rip), %r8d      # 0x18450
movl %edx, %r9d
andb $-0x2, %r9b
movb %r9b, 0x13434(%rip)     # 0x1c310
xorl %r9d, %r9d
movl $0x0, %r10d
testl %edi, %edi
js 0x8efa
movl 0xf564(%rip), %r10d     # 0x18454
decl %r10d
cmpl %edi, %r10d
cmovgel %edi, %r10d
decl %r8d
testb $0x2, %dl
cmovel %r8d, %ecx
cmovel %r9d, %eax
movl %r10d, 0x133f9(%rip)    # 0x1c308
cmpl %esi, %ecx
cmovgel %esi, %ecx
cmpl %esi, %eax
cmovgl %eax, %ecx
movl %ecx, 0x133ed(%rip)     # 0x1c30c
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r15d
testl %edx, %edx
js 0x8f68
movl 0xf4f6(%rip), %r15d     # 0x18454
decl %r15d
cmpl %r15d, %edx
cmovll %edx, %r15d
testl %r8d, %r8d
js 0x8f81
movl 0xf4e1(%rip), %edx      # 0x18454
decl %edx
cmpl %edx, %r8d
cmovll %r8d, %edx
movq %rdx, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, %edx
testl %eax, %eax
js 0x8f9f
movl 0xf4b8(%rip), %edx      # 0x18450
decl %edx
cmpl %edx, %eax
cmovll %eax, %edx
testl %ecx, %ecx
js 0x8fb4
movl 0xf4a7(%rip), %eax      # 0x18450
decl %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x4(%rsp)
cmpl 0x4(%rsp), %edx
jg 0x907f
movslq %r15d, %rcx
movq 0x8(%rsp), %rax
leal 0x1(%rax), %r13d
movslq %edx, %rbx
incl 0x4(%rsp)
shlq $0x4, %rcx
orq $0xc, %rcx
movq %rcx, 0x10(%rsp)
movq 0x1330b(%rip), %rax     # 0x1c2f0
movl $0x1, (%rax,%rbx,4)
cmpl 0x8(%rsp), %r15d
jg 0x9072
movq 0x10(%rsp), %r14
movl %r15d, %ebp
movq 0xf456(%rip), %rax      # 0x18458
movq (%rax,%rbx,8), %r12
movl %ebp, %edi
movl %ebx, %esi
callq 0x7578
testl %eax, %eax
je 0x9041
cmpl $-0x1, 0xf422(%rip)     # 0x1843c
je 0x9041
movl $0x0, 0xf3fa(%rip)      # 0x18420
movl $0xffffffff, 0xf40c(%rip) # imm = 0xFFFFFFFF
movl 0xf3fa(%rip), %edi      # 0x18430
movl 0xf3fc(%rip), %esi      # 0x18438
callq 0x741b
movl 0x132b9(%rip), %eax     # 0x1c300
movl %eax, -0x4(%r12,%r14)
movl 0x132b2(%rip), %eax     # 0x1c304
movl %eax, (%r12,%r14)
movw $0x0, -0x8(%r12,%r14)
movl $0x20, -0xc(%r12,%r14)
incl %ebp
addq $0x10, %r14
cmpl %ebp, %r13d
jne 0x8ffb
incq %rbx
cmpl %ebx, 0x4(%rsp)
jne 0x8fde
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0xf3c3(%rip), %rax      # 0x18458
movq 0xf3c4(%rip), %rcx      # 0x18460
movq %rcx, 0xf3b5(%rip)      # 0x18458
movq %rax, 0xf3b6(%rip)      # 0x18460
xorb $0x4, 0x13273(%rip)     # 0x1c324
movl 0xf399(%rip), %edx      # 0x18450
decl %edx
movl %edx, %eax
sarl $0x1f, %eax
andl %edx, %eax
cltq
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
incl %ecx
shlq $0x2, %rax
addq 0x1321a(%rip), %rax     # 0x1c2f0
xorl %edx, %edx
movl $0x1, (%rax,%rdx,4)
incq %rdx
cmpl %edx, %ecx
jne 0x90d8
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x13237(%rip), %ecx     # 0x1c324
shrl $0x2, %ecx
andl $0x1, %ecx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rdx
leaq 0x1556e(%rip), %rax     # 0x1e670
addq %rcx, %rax
addq %rdx, %rax
testl %edi, %edi
je 0x912c
movups (%rax), %xmm0
movups 0xc(%rax), %xmm1
movups %xmm1, 0x131ea(%rip)    # 0x1c304
movups %xmm0, 0x131d7(%rip)    # 0x1c2f8
movl 0x10(%rax), %edi
movl 0x14(%rax), %esi
jmp 0x8eb5
movups 0x131d1(%rip), %xmm0    # 0x1c304
movups %xmm0, 0xc(%rax)
movups 0x131ba(%rip), %xmm0    # 0x1c2f8
movups %xmm0, (%rax)
retq