LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/utf8.c
// Function: utf8_encode
int utf8_encode(int c, char *buf) {
	if(c < 0x80) {
		buf[0] = c;
		return 1;
	} else if(c < 0x800) {
		buf[0] = 192 + c / 64;
		buf[1] = 128 + c % 64;
		return 2;
	} else if(c - 0xd800u < 0x800) {
	} else if(c < 0x10000) {
		buf[0] = 224 + c / 4096;
		buf[1] = 128 + c / 64 % 64;
		buf[2] = 128 + c % 64;
		return 3;
	} else if (c<0x110000) {
		buf[0] = 240+c/262144;
		buf[1] = 128+c/4096%64;
		buf[2] = 128+c/64%64;
		buf[3] = 128+c%64;
		return 4;
	}

	buf[0] = c;
	return 1;
}

// Assembly:
cmpl $0x7f, %edi
jg 0x2660
movb %dil, (%rsi)
pushq $0x1
jmp 0x267f
movl %edi, %eax
cmpl $0x7ff, %edi            # imm = 0x7FF
ja 0x2681
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x1(%rsi)
pushq $0x2
popq %rax
retq
andl $0x7ffff800, %eax       # imm = 0x7FFFF800
cmpl $0xd800, %eax           # imm = 0xD800
je 0x2659
cmpl $0xffff, %edi           # imm = 0xFFFF
ja 0x26ba
movl %edi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rsi)
movl %edi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x2(%rsi)
pushq $0x3
jmp 0x267f
cmpl $0x10ffff, %edi         # imm = 0x10FFFF
ja 0x2659
movl %edi, %eax
shrl $0x12, %eax
orb $-0x10, %al
movb %al, (%rsi)
movl %edi, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %edi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x3(%rsi)
pushq $0x4
jmp 0x267f
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/utf8.c
// Function: utf8_fgetc
int utf8_fgetc(FILE *f) {
	int state = 0;
	int codepoint = 0;
	int b = 0;
	while((b = fgetc(f)) != EOF) {
		if(state == 0) {
			if (b < 0x80) {  // Single-byte (ASCII)
				return b;
			} else if ((b & 0xE0) == 0xC0) {  // Start of 2-byte sequence
				codepoint = b & 0x1F;
				state = 1;
			} else if ((b & 0xF0) == 0xE0) {  // Start of 3-byte sequence
				codepoint = b & 0x0F;
				state = 2;
			} else if ((b & 0xF8) == 0xF0) {  // Start of 4-byte sequence
				codepoint = b & 0x07;
				state = 3;
			} else {
				return -2;
			}
		} else {
			if((b & 0xC0) == 0x80) {  // Valid continuation byte
				codepoint = (codepoint << 6) | (b & 0x3F);
				state--;  // Move to the next expected byte or finish
				if(state == 0)
					return codepoint;
			} else {
				return -2;
			}
		}
	}
	return EOF;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
pushq $0x1
popq %r14
pushq $0x2
popq %r13
pushq $0x3
popq %r15
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1080
cmpl $-0x1, %eax
je 0x27da
testl %r12d, %r12d
je 0x2782
movl %eax, %ecx
andl $0xc0, %ecx
cmpl $0x80, %ecx
jne 0x27de
shll $0x6, %ebp
andl $0x3f, %eax
orl %eax, %ebp
decl %r12d
jne 0x2751
jmp 0x27e1
cmpl $0x80, %eax
jl 0x27f2
movl %eax, %ecx
andl $0xe0, %ecx
cmpl $0xc0, %ecx
jne 0x27a3
andl $0x1f, %eax
movl %r14d, %r12d
movl %eax, %ebp
jmp 0x2751
movl %eax, %ecx
andl $0xf0, %ecx
cmpl $0xe0, %ecx
jne 0x27bd
andl $0xf, %eax
movl %r13d, %r12d
movl %eax, %ebp
jmp 0x2751
movl %eax, %ecx
andl $0xf8, %ecx
cmpl $0xf0, %ecx
jne 0x27de
andl $0x7, %eax
movl %r15d, %r12d
movl %eax, %ebp
jmp 0x2751
pushq $-0x1
jmp 0x27e0
pushq $-0x2
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
jmp 0x27e1
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/joltikeq6464v13/ref/encrypt.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;
    joltik_aead_encrypt(ad, adlen, m, mlen, k, npub, c, &outlen);
    *clen = outlen;
    (void)nsec;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %r11
movq %r8, %r10
movq %rsi, %rbx
movq %rdi, %rax
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %r9
movq %rsp, %r14
andq $0x0, (%r14)
movq %r10, %rdi
movq %r11, %rsi
pushq %r14
pushq %rax
callq 0x1110
popq %rax
popq %rcx
movq (%r14), %rax
movq %rax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/joltikeq6464v13/ref/tweakableBC.c
// Function: multi
uint8_t multi (uint8_t x, uint8_t alpha) {
  if( 1 == alpha ) return x;
  if( 2 == alpha ) return mul2[x];
  if( 4 == alpha ) return mul4[x];

  printf("Incorrect alpha (%d) passed to the function g in the tweakey schedule. Exiting...\n", alpha); exit(2);
}

// Assembly:
cmpl $0x1, %esi
je 0x19af
cmpl $0x2, %esi
je 0x19a0
cmpl $0x4, %esi
jne 0x19b2
leaq 0x1692(%rip), %rax      # 0x3030
jmp 0x19a7
leaq 0x1679(%rip), %rax      # 0x3020
movzbl %dil, %ecx
movb (%rax,%rcx), %dil
movl %edi, %eax
retq
pushq %rax
movzbl %sil, %esi
leaq 0x1692(%rip), %rdi      # 0x3050
xorl %eax, %eax
callq 0x1040
pushq $0x2
popq %rdi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/joltikeq6464v13/ref/tweakableBC.c
// Function: G
uint64_t G (uint64_t tweakey, uint8_t alpha) {
  uint64_t i;
  uint64_t shift;
  uint8_t tmp;
  for(i=0; i<16; i++) {
    shift=4ULL*i;

    tmp=(tweakey>>shift)&0xf;
    tweakey&=0xffffffffffffffffULL^(0xfULL<<shift);

    tmp=multi(tmp, alpha);
    tweakey^=((uint64_t)tmp)<<shift;
  }

  return tweakey;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rax
xorl %r14d, %r14d
pushq $0xf
popq %r15
movzbl %sil, %ebx
cmpq $0x40, %r14
je 0x1a13
shrxq %r14, %rax, %rdi
shlxq %r14, %r15, %rcx
andnq %rax, %rcx, %r12
andl $0xf, %edi
movl %ebx, %esi
callq 0x10b0
movzbl %al, %eax
shlxq %r14, %rax, %rax
xorq %r12, %rax
addq $0x4, %r14
jmp 0x19e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/joltikeq6464v13/ref/tweakableBC.c
// Function: H
uint64_t H(uint64_t tweakey) {

  uint64_t i;
  uint64_t shiftIn;
  uint64_t shiftOut;
  uint64_t res=0;
  for (i=0; i<16; i++) {
    shiftIn=60ULL-4ULL*i;
    shiftOut=60ULL-4ULL*perm[i];
    res^=((tweakey>>shiftIn)&0xf)<<shiftOut;
  }
 return res;
}

// Assembly:
pushq $0x3c
popq %rcx
leaq 0x1617(%rip), %rdx      # 0x3040
xorl %eax, %eax
cmpq $-0x4, %rcx
je 0x1a57
movb (%rdx), %sil
shlb $0x2, %sil
movb $0x3c, %r8b
subb %sil, %r8b
shrxq %rcx, %rdi, %rsi
andl $0xf, %esi
shlxq %r8, %rsi, %rsi
xorq %rsi, %rax
addq $-0x4, %rcx
incq %rdx
jmp 0x1a2b
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/joltikeq6464v13/ref/tweakableBC.c
// Function: joltikKeySetupDec128
int joltikKeySetupDec128(uint64_t* rtweakey, 
                        const uint8_t* Tweakey,
                        int no_tweakeys)
{

    int i;
    int j;
    int Nr;
    uint64_t temp;

    uint64_t s;

    uint32_t s0;
    uint32_t s1;
    uint32_t s2;
    uint32_t s3;
    uint32_t s4;
    uint32_t s5;
    uint32_t s6;
    uint32_t s7;    

    /* Produce the round tweakeys used for the encryption */
    Nr=joltikKeySetupEnc128 (rtweakey, Tweakey, no_tweakeys);

    /* invert their order */
    for (i = 0, j = Nr; i < j; ++i, --j) {
        temp = rtweakey[i];
        rtweakey[i] = rtweakey[j];
        rtweakey[j] = temp;
    }


    /* apply the inverse MixColumn transform to all round keys but the first and the last */
    for (i = 1; i <= Nr; i++) {

        s=rtweakey[i];
        s0 = (s>>56ULL)&0xff;
        s1 = (s>>48ULL)&0xff;
        s2 = (s>>40ULL)&0xff;
        s3 = (s>>32ULL)&0xff;
        s4 = (s>>24ULL)&0xff;
        s5 = (s>>16ULL)&0xff;
        s6 = (s>> 8ULL)&0xff;
        s7 = (s>> 0ULL)&0xff;

        s  = (((uint64_t)(TmcH[s0]^TmcL[s1]))<<48ULL) ^ 
             (((uint64_t)(TmcH[s2]^TmcL[s3]))<<32ULL) ^ 
             (((uint64_t)(TmcH[s4]^TmcL[s5]))<<16ULL) ^ 
             (((uint64_t)(TmcH[s6]^TmcL[s7]))<< 0ULL);

        rtweakey[i]=s;
    }
    return Nr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x10e0
movl %eax, %eax
xorl %ecx, %ecx
movq %rax, %rdx
cmpq %rdx, %rcx
jge 0x1c98
movq (%rbx,%rcx,8), %rsi
movq (%rbx,%rdx,8), %rdi
movq %rdi, (%rbx,%rcx,8)
movq %rsi, (%rbx,%rdx,8)
incq %rcx
decq %rdx
jmp 0x1c7b
xorl %ecx, %ecx
movl $0xff, %edx
leaq 0x155a(%rip), %rsi      # 0x3200
leaq 0x1953(%rip), %rdi      # 0x3600
cmpq %rcx, %rax
je 0x1d44
movq 0x8(%rbx,%rcx,8), %r8
movq %r8, %r10
shrq $0x38, %r10
movq %r8, %r11
shrq $0x30, %r11
andl %edx, %r11d
movq %r8, %r14
shrq $0x28, %r14
andl %edx, %r14d
movq %r8, %r15
shrq $0x20, %r15
andl %edx, %r15d
movl %r8d, %r9d
andl %edx, %r9d
movl (%rdi,%r11,4), %r11d
xorl (%rsi,%r10,4), %r11d
shlq $0x30, %r11
movl (%rdi,%r15,4), %r10d
xorl (%rsi,%r14,4), %r10d
shlq $0x20, %r10
xorq %r11, %r10
movl %r8d, %r11d
shrl $0x18, %r11d
movl %r8d, %r14d
shrl $0xe, %r14d
andl $0x3fc, %r14d           # imm = 0x3FC
movl (%r14,%rdi), %r14d
xorl (%rsi,%r11,4), %r14d
shlq $0x10, %r14
shrl $0x8, %r8d
andl %edx, %r8d
movl (%rdi,%r9,4), %r9d
xorl (%rsi,%r8,4), %r9d
xorq %r14, %r9
xorq %r10, %r9
movq %r9, 0x8(%rbx,%rcx,8)
incq %rcx
jmp 0x1cad
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: begin_block
static void
begin_block(struct xpack_compressor *c)
{
	memset(&c->freqs, 0, sizeof(c->freqs));
	c->num_literals = 0;
	c->num_matches = 0;
	c->num_extra_bytes = 0;
	init_block_split_stats(&c->split_stats);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x28, %rdi
movl $0x5e0, %edx            # imm = 0x5E0
xorl %esi, %esi
callq 0x1040
andq $0x0, 0x3224(%rbx)
andl $0x0, 0x322c(%rbx)
pushq $-0xa
popq %rax
testq %rax, %rax
je 0x287d
andl $0x0, 0x630(%rbx,%rax,4)
andl $0x0, 0x658(%rbx,%rax,4)
incq %rax
jmp 0x2863
andq $0x0, 0x658(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: record_explicit_offset
static void
record_explicit_offset(struct xpack_compressor *c, struct match *match,
		       u32 offset)
{
	unsigned offset_log2 = bsr32(offset);
	unsigned offset_sym = NUM_REPS + offset_log2;

	match->offset_sym = offset_sym;
	c->freqs.offset[offset_sym]++;
	match->extra_offset_bits = offset - ((u32)1 << offset_log2);
	if (offset_log2 >= NUM_ALIGNED_BITS)
		c->freqs.aligned[offset & (ALIGNED_ALPHABET_SIZE - 1)]++;
}

// Assembly:
bsrl %edx, %ecx
movl %ecx, %eax
xorl $-0x20, %eax
addl $0x23, %eax
movb %al, 0x2(%rsi)
incl 0x568(%rdi,%rax,4)
pushq $-0x1
popq %rax
shll %cl, %eax
addl %edx, %eax
movl %eax, 0x4(%rsi)
cmpl $0x3, %ecx
jb 0x28b5
andl $0x7, %edx
incl 0x5e8(%rdi,%rdx,4)
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: record_litrunlen
static void
record_litrunlen(struct xpack_compressor *c, struct match *match, u32 litrunlen)
{
	unsigned litrunlen_sym;

	if (litrunlen >= LITRUNLEN_ALPHABET_SIZE - 1) {
		u32 v = litrunlen - (LITRUNLEN_ALPHABET_SIZE - 1);
		if (v < 0xFF) {
			c->extra_bytes[c->num_extra_bytes++] = v;
		} else {
			v -= 0xFF;
			c->extra_bytes[c->num_extra_bytes++] = 0xFF;
			c->extra_bytes[c->num_extra_bytes++] = (u8)(v >> 0);
			c->extra_bytes[c->num_extra_bytes++] = (u8)(v >> 8);
			c->extra_bytes[c->num_extra_bytes++] = (u8)(v >> 16);
		}
		litrunlen_sym = LITRUNLEN_ALPHABET_SIZE - 1;
	} else {
		litrunlen_sym = litrunlen;
	}

	match->litrunlen_sym = litrunlen_sym;
	c->freqs.litrunlen[litrunlen_sym]++;
}

// Assembly:
cmpl $0xf, %edx
jb 0x291b
leal -0xf(%rdx), %r8d
movl 0x322c(%rdi), %eax
leal 0x1(%rax), %ecx
cmpl $0xff, %r8d
jb 0x2906
pushq %rbx
addl $0xfffffef2, %edx       # imm = 0xFFFFFEF2
movb $-0x1, 0x171798(%rdi,%rax)
leal 0x2(%rax), %ebx
movl %ecx, %ecx
movb %dl, 0x171798(%rdi,%rcx)
leal 0x3(%rax), %r8d
movb %dh, 0x171798(%rdi,%rbx)
shrl $0x10, %edx
addl $0x4, %eax
movl %eax, %ecx
movl %r8d, %eax
movl %edx, %r8d
popq %rbx
movl %ecx, 0x322c(%rdi)
movl %eax, %eax
movb %r8b, 0x171798(%rdi,%rax)
movl $0xf, %edx
movb %dl, (%rsi)
movl %edx, %eax
incl 0x428(%rdi,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: record_length
static void
record_length(struct xpack_compressor *c, struct match *match, u32 length)
{
	unsigned length_sym;

	length -= MIN_MATCH_LEN;

	if (length >= LENGTH_ALPHABET_SIZE - 1) {
		u32 v = length - (LENGTH_ALPHABET_SIZE - 1);
		if (v < 0xFF) {
			c->extra_bytes[c->num_extra_bytes++] = v;
		} else {
			v -= 0xFF;
			c->extra_bytes[c->num_extra_bytes++] = 0xFF;
			c->extra_bytes[c->num_extra_bytes++] = (u8)(v >> 0);
			c->extra_bytes[c->num_extra_bytes++] = (u8)(v >> 8);
			c->extra_bytes[c->num_extra_bytes++] = (u8)(v >> 16);
		}
		length_sym = LENGTH_ALPHABET_SIZE - 1;
	} else {
		length_sym = length;
	}

	match->length_sym = length_sym;
	c->freqs.length[length_sym]++;
}

// Assembly:
leal -0x2(%rdx), %eax
cmpl $0x3f, %eax
jb 0x298f
leal -0x41(%rdx), %r8d
movl 0x322c(%rdi), %eax
leal 0x1(%rax), %ecx
cmpl $0xff, %r8d
jb 0x297a
pushq %rbx
addl $0xfffffec0, %edx       # imm = 0xFFFFFEC0
movb $-0x1, 0x171798(%rdi,%rax)
leal 0x2(%rax), %ebx
movl %ecx, %ecx
movb %dl, 0x171798(%rdi,%rcx)
leal 0x3(%rax), %r8d
movb %dh, 0x171798(%rdi,%rbx)
shrl $0x10, %edx
addl $0x4, %eax
movl %eax, %ecx
movl %r8d, %eax
movl %edx, %r8d
popq %rbx
movl %ecx, 0x322c(%rdi)
movl %eax, %eax
movb %r8b, 0x171798(%rdi,%rax)
movl $0x3f, %eax
movb %al, 0x1(%rsi)
movl %eax, %eax
incl 0x468(%rdi,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: do_end_block_check
static bool
do_end_block_check(struct block_split_stats *stats, u32 block_size)
{
	int i;

	if (stats->num_observations > 0) {

		/* Note: to avoid slow divisions, we do not divide by
		 * 'num_observations', but rather do all math with the numbers
		 * multiplied by 'num_observations'.  */
		u32 total_delta = 0;
		for (i = 0; i < NUM_OBSERVATION_TYPES; i++) {
			u32 expected = stats->observations[i] * stats->num_new_observations;
			u32 actual = stats->new_observations[i] * stats->num_observations;
			u32 delta = (actual > expected) ? actual - expected :
							  expected - actual;
			total_delta += delta;
		}

		/* Ready to end the block? */
		if (total_delta + (block_size >> 12) * stats->num_observations >=
		    200 * stats->num_observations)
			return true;
	}

	for (i = 0; i < NUM_OBSERVATION_TYPES; i++) {
		stats->num_observations += stats->new_observations[i];
		stats->observations[i] += stats->new_observations[i];
		stats->new_observations[i] = 0;
	}
	stats->num_new_observations = 0;
	return false;
}

// Assembly:
movl 0x54(%rdi), %eax
testl %eax, %eax
je 0x35a4
pushq $-0x28
popq %rdx
movl 0x50(%rdi), %r8d
xorl %ecx, %ecx
testq %rdx, %rdx
je 0x3590
movl 0x50(%rdi,%rdx), %r9d
imull %r8d, %r9d
movl 0x28(%rdi,%rdx), %r10d
imull %eax, %r10d
movl %r9d, %r11d
subl %r10d, %r11d
negl %r11d
subl %r10d, %r9d
cmovbl %r11d, %r9d
addl %r9d, %ecx
addq $0x4, %rdx
jmp 0x3560
shrl $0xc, %esi
imull %eax, %esi
addl %esi, %ecx
imull $0xc8, %eax, %edx
movb $0x1, %al
cmpl %edx, %ecx
jae 0x35cc
pushq $-0x28
popq %rax
testq %rax, %rax
je 0x35c6
movl 0x28(%rdi,%rax), %ecx
addl %ecx, 0x54(%rdi)
movl 0x28(%rdi,%rax), %ecx
addl %ecx, 0x50(%rdi,%rax)
andl $0x0, 0x28(%rdi,%rax)
addq $0x4, %rax
jmp 0x35a7
andl $0x0, 0x50(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: header_ostream_write_bits
static void
header_ostream_write_bits(struct header_ostream *os,
			  machine_word_t bits, unsigned num_bits)
{
	/*
	 * We only flush 'bitbuf' when it completely fills up.  This improves
	 * performance.
	 */
	os->bitbuf |= bits << os->bitcount;
	os->bitcount += num_bits;
	if (os->bitcount >= WORDBITS) {
		if (os->end - os->next >= WORDBYTES) {
			put_unaligned_leword(os->bitbuf, os->next);
			os->next += WORDBYTES;
		} else {
			os->next = os->end;
		}
		os->bitcount -= WORDBITS;
		os->bitbuf = bits >> (num_bits - os->bitcount);
	}
}

// Assembly:
movl 0x8(%rdi), %ecx
movq %rsi, %rax
shlq %cl, %rax
orq (%rdi), %rax
movq %rax, (%rdi)
addl %edx, %ecx
movl %ecx, 0x8(%rdi)
cmpl $0x40, %ecx
jb 0x3618
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
movq %r9, %r10
subq %r8, %r10
cmpq $0x8, %r10
jl 0x3604
movq %rax, (%r8)
addq $0x8, %r8
movq %r8, %r9
movq %r9, 0x18(%rdi)
addl $-0x40, %ecx
movl %ecx, 0x8(%rdi)
subl %ecx, %edx
movl %edx, %ecx
shrq %cl, %rsi
movq %rsi, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/ebiggers[P]xpack/lib/xpack_compress.c
// Function: choose_state_counts
static unsigned
choose_state_counts(const u32 freqs[], unsigned alphabet_size,
		    unsigned max_log2_num_states, u16 state_counts[])
{
	u32 total_freq = 0;
	unsigned num_used_syms = 0;
	unsigned log2_num_states;
	unsigned sym;

	/* Compute the total frequency and the number of used symbols. */
	for (sym = 0; sym < alphabet_size; sym++) {
		if (freqs[sym] != 0) {
			num_used_syms++;
			total_freq += freqs[sym];
		}
	}

	/*
	 * If no symbols from this alphabet were used, then output a code that
	 * contains an arbitrary unused symbol.
	 */
	if (total_freq == 0) {
		state_counts[0] = 1;
		for (sym = 1; sym < alphabet_size; sym++)
			state_counts[sym] = 0;
		return 0;
	}

	/* Select the number of states to use. */
	log2_num_states = select_log2_num_states(total_freq, num_used_syms,
						 max_log2_num_states);

	/* Decide how many states to assign to each symbol. */
	compute_state_counts(freqs, total_freq, state_counts,
			     alphabet_size, log2_num_states);

	return log2_num_states;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r8
movl %esi, %r9d
xorl %ecx, %ecx
xorl %ebx, %ebx
xorl %eax, %eax
cmpq %rcx, %r9
je 0x3642
movl (%rdi,%rcx,4), %esi
addl %esi, %ebx
cmpl $0x1, %esi
sbbl $-0x1, %eax
incq %rcx
jmp 0x362d
testl %ebx, %ebx
je 0x36ef
movl $0x1, %r10d
movl %r10d, %esi
movl %edx, %ecx
shll %cl, %esi
movl %ebx, %ecx
shrl $0x2, %ecx
cmpl %ecx, %esi
cmovbl %esi, %ecx
cmpl %eax, %ecx
cmovbel %eax, %ecx
leal -0x1(%rcx), %eax
bsrl %eax, %esi
xorl $-0x20, %esi
addl $0x21, %esi
xorl %r11d, %r11d
cmpl $0x2, %ecx
cmovbl %r11d, %esi
movl %esi, %ecx
shll %cl, %r10d
movl $0x80000000, %eax       # imm = 0x80000000
xorl %edx, %edx
divl %ebx
movl $0x1e, %ecx
subl %esi, %ecx
xorl %edx, %edx
xorl %ebx, %ebx
cmpq %r11, %r9
je 0x36da
movl (%rdi,%r11,4), %ebp
movl %ebp, %r14d
imull %eax, %r14d
shrl %cl, %r14d
incl %r14d
movl %r14d, %r15d
shrl %r15d
xorl %r12d, %r12d
testl %ebp, %ebp
setne %r12b
cmpl $0x2, %r14d
cmovael %r15d, %r12d
movw %r12w, (%r8,%r11,2)
subl %r12d, %r10d
cmpl %ebx, %r12d
cmoval %r11d, %edx
cmoval %r12d, %ebx
incq %r11
jmp 0x3695
movl %r10d, %eax
negl %eax
shrl $0x2, %ebx
cmpl %eax, %ebx
jle 0x371c
movl %edx, %eax
addw %r10w, (%r8,%rax,2)
jmp 0x3711
movw $0x1, (%r8)
movabsq $0x1, %rax
cmpq %r9, %rax
jae 0x370f
andw $0x0, (%r8,%rax,2)
incq %rax
jmp 0x36ff
xorl %esi, %esi
movl %esi, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %ecx
testl %eax, %eax
je 0x3711
xorl %edx, %edx
cmpq %rdx, %r9
je 0x3758
movzwl (%r8,%rdx,2), %edi
cmpl $0x2, %edi
jb 0x3751
leal -0x1(%rdi), %r10d
shrl %cl, %r10d
cmpl %eax, %r10d
cmovael %eax, %r10d
subl %r10d, %edi
movw %di, (%r8,%rdx,2)
subl %r10d, %eax
je 0x3756
incq %rdx
jmp 0x3727
xorl %eax, %eax
decl %ecx
jmp 0x3721
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_draw.c
// Function: calcpointsI
void calcpointsI(dc, method, index, g, pl)
     DCp dc;
     Methodp method;
     int index;
     Genericp g, pl;
{
  int i;
  float xpoff, ypoff, prx, pry, prz, dx, dy;
  Coord2dp new;
  Coord3dp old;

  old = dc->s->object+index;
  new = dc->points+index;
  dx = pl->x - dc->pos.x;
  dy = pl->y - dc->pos.y;
  for (i=0; i<method->num; i++, old++, new++) {
      xpoff = old->x - dx;
      ypoff = old->y - dy;
      prx =  xpoff * pl->ca + ypoff * pl->sa;
      pry = -xpoff * pl->sa + ypoff * pl->ca;
      if (pry < 10.0)
        pry = 10.0;
      prz = old->z + dc->pos.z;
      new->x = 500 + prx / pry * 450;
      new->y = 260 - prz / pry * 450;
    }
}

// Assembly:
movq (%rdi), %rcx
movslq %edx, %rdx
imulq $0x6, %rdx, %rax
addq (%rcx), %rax
leaq (%rdi,%rdx,4), %rcx
addq $0x10, %rcx
movss 0x100(%rdi), %xmm0
movss 0x104(%rdi), %xmm1
subss 0xc(%r8), %xmm0
movl (%rsi), %edx
subss 0x10(%r8), %xmm1
xorl %esi, %esi
movss 0x88db(%rip), %xmm2     # 0xd004
movaps 0x88e0(%rip), %xmm3     # 0xd010
movaps 0x88e9(%rip), %xmm4     # 0xd020
movsd 0x88f1(%rip), %xmm5     # 0xd030
cmpl %edx, %esi
jge 0x47e0
movswl (%rax), %r9d
cvtsi2ss %r9d, %xmm6
movswl 0x2(%rax), %r9d
cvtsi2ss %r9d, %xmm7
addss %xmm0, %xmm6
addss %xmm1, %xmm7
movss 0x24(%r8), %xmm8
movss 0x28(%r8), %xmm9
movaps %xmm7, %xmm10
mulss %xmm9, %xmm10
movaps %xmm6, %xmm11
mulss %xmm8, %xmm11
addss %xmm10, %xmm11
mulss %xmm8, %xmm7
mulss %xmm9, %xmm6
movswl 0x4(%rax), %r9d
cvtsi2ss %r9d, %xmm8
subss %xmm6, %xmm7
movaps %xmm2, %xmm6
addss 0x108(%rdi), %xmm8
maxss %xmm7, %xmm6
xorps %xmm3, %xmm8
unpcklps %xmm8, %xmm11           # xmm11 = xmm11[0],xmm8[0],xmm11[1],xmm8[1]
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
divps %xmm6, %xmm11
mulps %xmm4, %xmm11
addps %xmm5, %xmm11
cvttps2dq %xmm11, %xmm6
pshuflw $0xe8, %xmm6, %xmm6     # xmm6 = xmm6[0,2,2,3,4,5,6,7]
movd %xmm6, (%rcx,%rsi,4)
addq $0x6, %rax
incq %rsi
jmp 0x473f
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_draw.c
// Function: calcpointsII
void calcpointsII(dc, method, index, g, pl)
     DCp dc;
     Methodp method;
     int index;
     Genericp g, pl;
{
  int i;
  float csa, ssa, dx, dy, xn, yn, cn, sn, prx, pry, prz, rx, ry;
  Coord2dp new;
  Coord3dp old;

  old = dc->s->object+index;
  new = dc->points+index;

  csa = cos(g->azm);
  ssa = sin(g->azm);
  dx = pl->x - dc->pos.x;
  dy = pl->y - dc->pos.y;
  xn =  dx * csa + dy * ssa;
  yn = -dx * ssa + dy * csa;
  cn = pl->ca * csa + pl->sa * ssa;
  sn = pl->sa * csa - ssa * pl->ca;
  for (i=0; i<method->num; i++, old++, new++) {
    rx =  old->x - xn;
    ry =  old->y - yn;
    prx =  rx * cn + ry * sn;
    pry = -rx * sn + ry * cn;
    if (pry < 10.0)
      pry = 10.0;
    prz = old->z + dc->pos.z;
    new->x = 500 + prx / pry * 450;
    new->y = 260 - prz / pry * 450;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdi, %rbx
movq (%rdi), %rax
movslq %edx, %rcx
imulq $0x6, %rcx, %r13
addq (%rax), %r13
movq %rsi, %r14
leaq (%rdi,%rcx,4), %rbp
addq $0x10, %rbp
cvtss2sd 0x20(%r12), %xmm0
callq 0x41e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
cvtss2sd 0x20(%r12), %xmm0
callq 0x45a0
cvtsd2ss %xmm0, %xmm4
movss 0xc(%r15), %xmm2
movss 0x10(%r15), %xmm0
subss 0x100(%rbx), %xmm2
subss 0x104(%rbx), %xmm0
movaps %xmm0, %xmm3
mulss %xmm4, %xmm3
movaps %xmm2, %xmm1
movss 0x4(%rsp), %xmm5
mulss %xmm5, %xmm1
addss %xmm3, %xmm1
mulss %xmm5, %xmm0
movaps %xmm5, %xmm6
mulss %xmm4, %xmm2
subss %xmm2, %xmm0
movss 0x24(%r15), %xmm2
movss 0x28(%r15), %xmm3
movaps %xmm3, %xmm5
mulss %xmm4, %xmm5
mulss %xmm2, %xmm4
mulss %xmm6, %xmm2
addss %xmm5, %xmm2
mulss %xmm6, %xmm3
subss %xmm4, %xmm3
movl (%r14), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movss 0x8755(%rip), %xmm4     # 0xd004
movaps 0x875a(%rip), %xmm5     # 0xd010
movaps 0x8763(%rip), %xmm6     # 0xd020
movsd 0x876b(%rip), %xmm7     # 0xd030
cmpl %ecx, %eax
je 0x4964
movswl (%r13), %edx
cvtsi2ss %edx, %xmm8
subss %xmm1, %xmm8
movswl 0x2(%r13), %edx
cvtsi2ss %edx, %xmm9
subss %xmm0, %xmm9
movaps %xmm3, %xmm10
mulss %xmm9, %xmm10
movaps %xmm8, %xmm11
mulss %xmm2, %xmm11
addss %xmm10, %xmm11
mulss %xmm2, %xmm9
mulss %xmm3, %xmm8
movswl 0x4(%r13), %edx
cvtsi2ss %edx, %xmm10
subss %xmm8, %xmm9
movaps %xmm4, %xmm8
addss 0x108(%rbx), %xmm10
maxss %xmm9, %xmm8
xorps %xmm5, %xmm10
unpcklps %xmm10, %xmm11          # xmm11 = xmm11[0],xmm10[0],xmm11[1],xmm10[1]
shufps $0x0, %xmm8, %xmm8      # xmm8 = xmm8[0,0,0,0]
divps %xmm8, %xmm11
mulps %xmm6, %xmm11
addps %xmm7, %xmm11
cvttps2dq %xmm11, %xmm8
pshuflw $0xe8, %xmm8, %xmm8     # xmm8 = xmm8[0,2,2,3,4,5,6,7]
movd %xmm8, (%rbp,%rcx,4)
addq $0x6, %r13
incq %rcx
jmp 0x48c5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_draw.c
// Function: calcpointsIII
void calcpointsIII(dc, method, index, g, pl)
     DCp dc;
     Methodp method;
     int index;
     Genericp g, pl;
{
  int i;
  float temp, dx, dy, xn, yn, cn, sn, prx, pry, prz, rx, ry;
  Coord2dp new;
  Coord3dp old;

  old = dc->s->object+index;
  new = dc->points+index;
  temp = dc->cta;
  dc->cta = dc->cta * method->vars[0] - dc->sta * method->vars[1];
  dc->sta = dc->sta * method->vars[0] + temp * method->vars[1];
  dx = pl->x - dc->pos.x;
  dy = pl->y - dc->pos.y;
  xn =  dx * dc->cta + dy * dc->sta;
  yn = -dx * dc->sta + dy * dc->cta;
  cn = pl->ca * dc->cta + pl->sa * dc->sta;
  sn = pl->sa * dc->cta - pl->ca * dc->sta;
  for (i=0; i<method->num; i++, old++, new++) {
    rx =  old->x - xn;
    ry =  old->y - yn;
    prx =  rx * cn + ry * sn;
    pry = -rx * sn + ry * cn;
    if (pry < 10.0)
      pry = 10.0;
    prz = old->z + dc->pos.z;
    new->x = 500 + prx / pry * 450;
    new->y = 260 - prz / pry * 450;
  }
}

// Assembly:
movq (%rdi), %rcx
movslq %edx, %rdx
imulq $0x6, %rdx, %rax
addq (%rcx), %rax
leaq (%rdi,%rdx,4), %rcx
addq $0x10, %rcx
movss 0x118(%rdi), %xmm1
movq 0x10(%rsi), %rdx
movss 0x11c(%rdi), %xmm4
movss 0x4(%rdx), %xmm2
mulss %xmm4, %xmm2
movss (%rdx), %xmm0
mulss %xmm1, %xmm0
subss %xmm2, %xmm0
movss %xmm0, 0x118(%rdi)
mulss 0x4(%rdx), %xmm1
mulss (%rdx), %xmm4
addss %xmm1, %xmm4
movss %xmm4, 0x11c(%rdi)
movss 0xc(%r8), %xmm3
movss 0x10(%r8), %xmm1
subss 0x100(%rdi), %xmm3
subss 0x104(%rdi), %xmm1
movaps %xmm4, %xmm5
mulss %xmm1, %xmm5
movaps %xmm3, %xmm2
mulss %xmm0, %xmm2
addss %xmm5, %xmm2
mulss %xmm0, %xmm1
mulss %xmm4, %xmm3
subss %xmm3, %xmm1
movss 0x24(%r8), %xmm3
movss 0x28(%r8), %xmm5
movaps %xmm4, %xmm6
mulss %xmm5, %xmm6
mulss %xmm3, %xmm4
mulss %xmm0, %xmm3
addss %xmm6, %xmm3
mulss %xmm5, %xmm0
subss %xmm4, %xmm0
movl (%rsi), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
movss 0x85c4(%rip), %xmm4     # 0xd004
movaps 0x85c9(%rip), %xmm5     # 0xd010
movaps 0x85d2(%rip), %xmm6     # 0xd020
movsd 0x85da(%rip), %xmm7     # 0xd030
cmpl %esi, %edx
je 0x4af3
movswl (%rax), %r8d
cvtsi2ss %r8d, %xmm8
subss %xmm2, %xmm8
movswl 0x2(%rax), %r8d
cvtsi2ss %r8d, %xmm9
subss %xmm1, %xmm9
movaps %xmm0, %xmm10
mulss %xmm9, %xmm10
movaps %xmm8, %xmm11
mulss %xmm3, %xmm11
addss %xmm10, %xmm11
mulss %xmm3, %xmm9
mulss %xmm0, %xmm8
movswl 0x4(%rax), %r8d
cvtsi2ss %r8d, %xmm10
subss %xmm8, %xmm9
movaps %xmm4, %xmm8
addss 0x108(%rdi), %xmm10
maxss %xmm9, %xmm8
xorps %xmm5, %xmm10
unpcklps %xmm10, %xmm11          # xmm11 = xmm11[0],xmm10[0],xmm11[1],xmm10[1]
shufps $0x0, %xmm8, %xmm8      # xmm8 = xmm8[0,0,0,0]
divps %xmm8, %xmm11
mulps %xmm6, %xmm11
addps %xmm7, %xmm11
cvttps2dq %xmm11, %xmm8
pshuflw $0xe8, %xmm8, %xmm8     # xmm8 = xmm8[0,2,2,3,4,5,6,7]
movd %xmm8, (%rcx,%rsi,4)
addq $0x6, %rax
incq %rsi
jmp 0x4a56
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_draw.c
// Function: displayobject
void displayobject(dc)
     DCp dc;
{
  Coord2dp point;
  int *i;

  point=dc->points;
  for (i=dc->s->pnum; *i; i++) {
    polyline(point, *i);
    point += *i;
  }
  for (i=dc->s->mnum; *i; i++) {
    multiline(point, *i>>1);
    point += *i;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq (%rdi), %rax
movq 0x8(%rax), %r15
movl (%r15), %esi
testl %esi, %esi
je 0x4d47
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a34
movslq (%r15), %rax
leaq (%rbx,%rax,4), %rbx
addq $0x4, %r15
jmp 0x4d29
movq (%r14), %rax
movq 0x10(%rax), %r14
movl (%r14), %esi
testl %esi, %esi
je 0x4d6e
sarl %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6abd
movslq (%r14), %rax
leaq (%rbx,%rax,4), %rbx
addq $0x4, %r14
jmp 0x4d4e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: setmonomap
void setmonomap()
{
  int i;

  cmap = dcmap;
  pixels = (Pixel*) malloc(2 * sizeof(Pixel));
  opt->cpi[COLOR_BG] = 0;
  pixels[0] = BlackPixelOfScreen(screen);
  opt->cpi[COLOR_FG] = 1;
  pixels[1] = WhitePixelOfScreen(screen);
  opt->fading_colors = 1;
  for (i=2; i<MAX_COLORS; i++)
    opt->cpi[i] = 1;
  cw = cr = 2;
}

// Assembly:
pushq %rax
movq 0xda56(%rip), %rax      # 0x13648
movq %rax, 0xda57(%rip)      # 0x13650
pushq $0x10
popq %rdi
callq 0x4190
movq %rax, 0xda18(%rip)      # 0x13620
leaq 0xd981(%rip), %rcx      # 0x13590
movq (%rcx), %rcx
andl $0x0, 0xf0(%rcx)
movq 0xda38(%rip), %rdx      # 0x13658
movq 0x60(%rdx), %rsi
movq %rsi, (%rax)
pushq $0x1
popq %rsi
movl %esi, 0xf4(%rcx)
movq 0x58(%rdx), %rdx
movq %rdx, 0x8(%rax)
movl %esi, 0x148(%rcx)
xorl %eax, %eax
cmpq $0x11, %rax
je 0x5c56
movl $0x1, 0xf8(%rcx,%rax,4)
incq %rax
jmp 0x5c40
pushq $0x2
popq %rax
movl %eax, 0xda01(%rip)      # 0x13660
movl %eax, 0xd9ff(%rip)      # 0x13664
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: createfadedcolors
void createfadedcolors()
{
  XColor color;
  int i, j;
  float factor;
  int num = 0;

  if (fcnames != NULL)
    free(fcnames);
  fcnames =
    (Colorname *) malloc(ufc*opt->fading_colors*sizeof(Colorname));
  for (i=LF_COLOR; i>LN_COLOR; i--)
    if (opt->cpi[i] == i) {
      XParseColor(d, dcmap, bases[i].name, &color);
      sprintf(fcnames[num++].name, "#%04x%04x%04x",
              color.red, color.green, color.blue);
      for (j=1; j<opt->fading_colors; j++) {
        factor = 1.0 - 0.5*j/(opt->fading_colors-1);
        sprintf(fcnames[num++].name, "#%04x%04x%04x",
                (int) (factor*color.red), (int) (factor*color.green),
                (int) (factor*color.blue));
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0xd9b4(%rip), %rdi      # 0x13630
callq 0x4250
movslq 0xd9e0(%rip), %rax      # 0x13668
leaq 0xd901(%rip), %r15      # 0x13590
movq (%r15), %r13
movslq 0x148(%r13), %rcx
imulq %rax, %rcx
imulq $0xe, %rcx, %rdi
callq 0x4190
movq %rax, 0xd983(%rip)      # 0x13630
pushq $0x12
popq %r12
leaq 0x7510(%rip), %r14      # 0xd1c8
xorl %ebx, %ebx
cmpq $0xc, %r12
jb 0x5dbc
movl 0xf0(%r13,%r12,4), %eax
cmpq %rax, %r12
jne 0x5db4
movq 0xd95c(%rip), %rdi      # 0x13638
movq 0xd965(%rip), %rsi      # 0x13648
imulq $0xe, %r12, %rdx
addq 0xd93a(%rip), %rdx      # 0x13628
leaq 0x8(%rsp), %rcx
callq 0x4490
movl %ebx, 0x4(%rsp)
movslq %ebx, %rax
imulq $0xe, %rax, %rbx
movq 0xd926(%rip), %rdi      # 0x13630
addq %rbx, %rdi
movzwl 0x10(%rsp), %edx
movzwl 0x12(%rsp), %ecx
movzwl 0x14(%rsp), %r8d
movq %r14, %rsi
xorl %eax, %eax
callq 0x42e0
addq $0xe, %rbx
pushq $0x1
popq %rbp
movq (%r15), %r13
movl 0x148(%r13), %eax
cmpl %eax, %ebp
jge 0x5dae
cvtsi2sd %ebp, %xmm0
mulsd 0x73a8(%rip), %xmm0     # 0xd0f0
decl %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
addsd 0x739e(%rip), %xmm0     # 0xd0f8
cvtsd2ss %xmm0, %xmm0
movzwl 0x10(%rsp), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %edx
movzwl 0x12(%rsp), %eax
cvtsi2ss %eax, %xmm1
movq 0xd8b1(%rip), %rdi      # 0x13630
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movzwl 0x14(%rsp), %eax
cvtsi2ss %eax, %xmm1
addq %rbx, %rdi
mulss %xmm0, %xmm1
cvttss2si %xmm1, %r8d
movq %r14, %rsi
xorl %eax, %eax
callq 0x42e0
incl %ebp
addq $0xe, %rbx
jmp 0x5d2e
movl 0x4(%rsp), %ebx
addl %ebp, %ebx
decq %r12
jmp 0x5cba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: setcoloroptvalues
void setcoloroptvalues()
{
  int i;
  int num = 0;

  for (i=L_COLOR; i>=0; i--)
    if (opt->cpi[i] == i) {
      opt->cpi[i] = num;
      if (i>LN_COLOR)
        num += opt->fading_colors;
      else
        num++;
    }
    else
      opt->cpi[i] = opt->cpi[opt->cpi[i]];
}

// Assembly:
leaq 0xd7be(%rip), %rax      # 0x13590
movq (%rax), %rax
xorl %ecx, %ecx
pushq $0x12
popq %rdx
testl %edx, %edx
js 0x5e16
movl %edx, %esi
movslq 0xf0(%rax,%rsi,4), %rdi
cmpl %edi, %edx
jne 0x5e00
movl %ecx, 0xf0(%rax,%rsi,4)
cmpl $0xc, %edx
jb 0x5e10
addl 0x148(%rax), %ecx
jmp 0x5e12
movl 0xf0(%rax,%rdi,4), %edi
movl %edi, 0xf0(%rax,%rsi,4)
jmp 0x5e12
incl %ecx
decl %edx
jmp 0x5dda
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: standardizecolors
void standardizecolors(v)
     Visual* v;
{
  XColor color;
  int i;
  int num = 0;

  if (bases != NULL)
    free(bases);
  bases = (Colorname *) malloc(MAX_COLORS*sizeof(Colorname));
  for (i=0; i<MAX_COLORS; i++) {
    XParseColor(d, dcmap, opt->cname[i], &color);
    if (v->class == StaticGray || v->class == GrayScale)
      color.red = color.green = color.blue = color.red > color.green ?
        (color.red > color.blue ? color.red : color.blue) :
          (color.green > color.blue ? color.green : color.blue);
    sprintf(bases[num++].name,
            "#%04x%04x%04x", color.red, color.green, color.blue);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xd7f9(%rip), %rdi      # 0x13628
callq 0x4250
movl $0x10a, %edi            # imm = 0x10A
callq 0x4190
movq %rax, 0xd7e3(%rip)      # 0x13628
pushq $0xb
popq %r12
leaq 0xd740(%rip), %r13      # 0x13590
leaq 0x8(%rsp), %r14
leaq 0x736c(%rip), %r15      # 0xd1c8
xorl %ebp, %ebp
cmpq $0x1e, %r12
je 0x5edd
movq 0xd7cd(%rip), %rdi      # 0x13638
movq 0xd7d6(%rip), %rsi      # 0x13648
movq (%r13), %rax
movq (%rax,%r12,8), %rdx
movq %r14, %rcx
callq 0x4490
cmpl $0x1, 0x10(%rbx)
movzwl 0x10(%rsp), %ecx
movzwl 0x12(%rsp), %eax
movzwl 0x14(%rsp), %esi
ja 0x5eb6
cmpw %ax, %cx
cmoval %ecx, %eax
cmpw %si, %ax
cmovbel %esi, %eax
movw %ax, 0x14(%rsp)
movw %ax, 0x12(%rsp)
movw %ax, 0x10(%rsp)
movl %eax, %esi
movl %eax, %ecx
movq 0xd76b(%rip), %rdi      # 0x13628
addq %rbp, %rdi
movzwl %cx, %edx
movzwl %ax, %ecx
movzwl %si, %r8d
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %r12
addq $0xe, %rbp
jmp 0x5e5e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: writecolormap
int writecolormap(status)
     Bool* status;
{
  int i, j;
  XColor color;
  int ind = 0;
  int num = 0;

  *status = True;
  if (pixels != NULL)
    free(pixels);
  pixels = (Pixel*) calloc(cw, sizeof(Pixel));
  for (i=L_COLOR; *status && i>=0; i--)
    if (opt->cpi[i] == i)
      if (opt->fading_colors < 2 || i<FF_COLOR) {
        XParseColor(d, cmap, bases[i].name, &color);
        if (XAllocColor(d, cmap, &color))
          pixels[num++] = color.pixel;
        else
          *status = False;
      }
      else
        for (j=0; *status && j<opt->fading_colors; j++) {
          XParseColor(d, cmap, fcnames[ind++].name, &color);
          if (XAllocColor(d, cmap, &color))
            pixels[num++] = color.pixel;
          else
            *status = False;
        }
  return num;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, (%rdi)
movq 0xd716(%rip), %rdi      # 0x13620
callq 0x4250
movslq 0xd74e(%rip), %rdi      # 0x13664
pushq $0x8
popq %rsi
callq 0x44e0
movq %rax, 0xd6fb(%rip)      # 0x13620
xorl %r15d, %r15d
pushq $0x12
popq %r12
leaq 0x8(%rsp), %r14
xorl %ebp, %ebp
cmpl $0x0, (%rbx)
je 0x606f
testl %r12d, %r12d
js 0x606f
leaq 0xd644(%rip), %rax      # 0x13590
movq (%rax), %rcx
movl %r12d, %eax
cmpl %r12d, 0xf0(%rcx,%rax,4)
jne 0x6067
cmpl $0x2, 0x148(%rcx)
setl %cl
cmpl $0xc, %r12d
setb %dl
orb %cl, %dl
je 0x5fce
movq 0xd6bc(%rip), %rdi      # 0x13638
movq 0xd6cd(%rip), %rsi      # 0x13650
imulq $0xe, %rax, %rdx
addq 0xd69a(%rip), %rdx      # 0x13628
movq %r14, %rcx
callq 0x4490
movq 0xd69b(%rip), %rdi      # 0x13638
movq 0xd6ac(%rip), %rsi      # 0x13650
movq %r14, %rdx
callq 0x4500
testl %eax, %eax
je 0x6064
movq 0x8(%rsp), %rax
movq 0xd660(%rip), %rcx      # 0x13620
movslq %ebp, %rdx
incl %ebp
movq %rax, (%rcx,%rdx,8)
jmp 0x6067
movl %r15d, 0x4(%rsp)
movslq %r15d, %rax
imulq $0xe, %rax, %r13
xorl %r15d, %r15d
pushq $0x1
popq %rax
testl %eax, %eax
je 0x6058
leaq 0xd5a5(%rip), %rax      # 0x13590
movq (%rax), %rax
cmpl 0x148(%rax), %r15d
jge 0x6058
movq 0xd63a(%rip), %rdi      # 0x13638
movq 0xd64b(%rip), %rsi      # 0x13650
movq 0xd624(%rip), %rdx      # 0x13630
addq %r13, %rdx
movq %r14, %rcx
callq 0x4490
movq 0xd61a(%rip), %rdi      # 0x13638
movq 0xd62b(%rip), %rsi      # 0x13650
movq %r14, %rdx
callq 0x4500
testl %eax, %eax
je 0x604a
movq 0x8(%rsp), %rax
movq 0xd5e3(%rip), %rcx      # 0x13620
movslq %ebp, %rdx
incl %ebp
movq %rax, (%rcx,%rdx,8)
movl (%rbx), %eax
jmp 0x604f
andl $0x0, (%rbx)
xorl %eax, %eax
incl %r15d
addq $0xe, %r13
jmp 0x5fe0
movl 0x4(%rsp), %eax
addl %r15d, %eax
movl %eax, %r15d
jmp 0x6067
andl $0x0, (%rbx)
decl %r12d
jmp 0x5f33
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: countcolors
void countcolors()
{
  int i, j;

  ufc = unfc = 0;
  if (opt->mono) {
    cr = cw = unfc = 2;
    return;
  }
  for (i=L_COLOR; i>=0; i--) {
    for (j=L_COLOR; j>i && strcmp(bases[i].name,bases[j].name); j--);
    opt->cpi[i] = j;
    if (i == j)
      if (opt->fading_colors==1 || i<FF_COLOR)
        unfc++;
      else
        ufc++;
  }
  cw = unfc+ufc*opt->fading_colors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andl $0x0, 0xd5da(%rip)      # 0x1366c
andl $0x0, 0xd5cf(%rip)      # 0x13668
leaq 0xd4f0(%rip), %rax      # 0x13590
movq (%rax), %r14
xorl %eax, %eax
cmpl %eax, 0x13c(%r14)
je 0x60c8
pushq $0x2
popq %rax
movl %eax, 0xd5b5(%rip)      # 0x1366c
movl %eax, 0xd5a7(%rip)      # 0x13664
movl %eax, 0xd59d(%rip)      # 0x13660
jmp 0x6156
pushq $0x12
popq %r13
testl %r13d, %r13d
js 0x613c
movq 0xd550(%rip), %r15      # 0x13628
movl %r13d, %r12d
imulq $0xe, %r12, %rbx
addq %r15, %rbx
pushq $0x12
popq %rbp
cmpl %r13d, %ebp
jle 0x6103
movl %ebp, %eax
imulq $0xe, %rax, %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4450
testl %eax, %eax
je 0x6106
decl %ebp
jmp 0x60e5
movl %r13d, %ebp
movl %ebp, 0xf0(%r14,%r12,4)
cmpl %ebp, %r13d
jne 0x6137
cmpl $0x1, 0x148(%r14)
leaq 0xd546(%rip), %rax      # 0x13668
leaq 0xd543(%rip), %rcx      # 0x1366c
cmoveq %rcx, %rax
cmpl $0xc, %r13d
cmovlq %rcx, %rax
incl (%rax)
decl %r13d
jmp 0x60cc
movl 0x148(%r14), %eax
imull 0xd51e(%rip), %eax      # 0x13668
addl 0xd51c(%rip), %eax      # 0x1366c
movl %eax, 0xd50e(%rip)      # 0x13664
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: reducecolors
void reducecolors()
{
  int i, firstcolor, lastcolor;
  static int attempt = 0;
  static int groupings[][2] = {
    F1_COLOR, L1_COLOR, F2_COLOR, L2_COLOR, F3_COLOR, L3_COLOR,
    F4_COLOR, L4_COLOR, F5_COLOR, L5_COLOR, F6_COLOR, L6_COLOR,
    F7_COLOR, L7_COLOR, F8_COLOR, L8_COLOR, F9_COLOR, L9_COLOR };

  while (cw > cr) {
    switch(attempt++) {
    case 0:                     /* reduce # of fading colors */
      opt->fading_colors = (cr-unfc)/ufc;
      if (opt->fading_colors < 1)
        opt->fading_colors = 1;
      break;
    case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9:
      /* now start combining color groups */
      firstcolor = groupings[attempt-1][0];
      lastcolor = groupings[attempt-1][1];
      for (i=lastcolor; i>firstcolor; i--)
        strcpy(bases[i].name, bases[firstcolor].name);
      break;
    case 10:
      opt->mono = True;
      break;
    }
    countcolors();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0xd4f9(%rip), %r15d     # 0x13670
leaq 0x7002(%rip), %rbx      # 0xd180
movl 0xd4dc(%rip), %eax      # 0x13660
cmpl %eax, 0xd4da(%rip)      # 0x13664
jle 0x6229
movl %r15d, %ecx
leal 0x1(%rcx), %r15d
movl %r15d, 0xd4d2(%rip)     # 0x13670
leal -0x1(%rcx), %edx
cmpl $0x9, %edx
jae 0x61da
movl %ecx, %eax
movslq (%rbx,%rax,8), %r12
movslq 0x4(%rbx,%rax,8), %r13
imulq $0xe, %r13, %rbp
imulq $0xe, %r12, %r14
cmpq %r12, %r13
jle 0x621f
movq 0xd463(%rip), %rsi      # 0x13628
leaq (%rsi,%rbp), %rdi
addq %r14, %rsi
callq 0x4480
decq %r13
addq $-0xe, %rbp
jmp 0x61b9
cmpl $0xa, %ecx
je 0x620b
testl %ecx, %ecx
jne 0x621f
subl 0xd483(%rip), %eax      # 0x1366c
cltd
idivl 0xd478(%rip)            # 0x13668
leaq 0xd399(%rip), %rcx      # 0x13590
movq (%rcx), %rcx
cmpl $0x2, %eax
pushq $0x1
popq %rdx
cmovll %edx, %eax
movl %eax, 0x148(%rcx)
jmp 0x621f
leaq 0xd37e(%rip), %rax      # 0x13590
movq (%rax), %rax
movl $0x1, 0x13c(%rax)
callq 0x6080
jmp 0x617e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: gprinit
void gprinit ()
{
  XEvent ev;

  XSelectInput(d, w, ExposureMask|PointerMotionMask|ButtonPressMask
               |ButtonReleaseMask|KeyPressMask|StructureNotifyMask);
  XMapRaised(d, w);
  XWindowEvent(d, w, StructureNotifyMask, &ev);
  grabpointer();
}

// Assembly:
subq $0xc8, %rsp
movq 0xd208(%rip), %rdi      # 0x13638
movq 0xd209(%rip), %rsi      # 0x13640
movl $0x2804d, %edx          # imm = 0x2804D
callq 0x43f0
movq 0xd1f0(%rip), %rdi      # 0x13638
movq 0xd1f1(%rip), %rsi      # 0x13640
callq 0x4570
movq 0xd1dd(%rip), %rdi      # 0x13638
movq 0xd1de(%rip), %rsi      # 0x13640
leaq 0x8(%rsp), %rcx
movl $0x20000, %edx          # imm = 0x20000
callq 0x4350
callq 0x5b9c
addq $0xc8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: buildpixmaps
void buildpixmaps()
{
  int i;

  for (i=0; i<NUMPIXMAPS; i++)
    bmaps[i].p =
      XCreatePixmapFromBitmapData(d, w, bmaps[i].bits,
                                  bmaps[i].width, bmaps[i].height,
                                  pixels[opt->cpi[bmaps[i].color]],
                                  pixels[opt->cpi[COLOR_BG]],
                                  depth);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
pushq $0x18
popq %rbx
leaq 0xc15b(%rip), %r14      # 0x12840
leaq 0xcea4(%rip), %r15      # 0x13590
cmpq $0xb8, %rbx
je 0x6752
movq 0xcf3c(%rip), %rdi      # 0x13638
movq 0xcf3d(%rip), %rsi      # 0x13640
movq -0x10(%rbx,%r14), %rdx
movl -0x18(%rbx,%r14), %ecx
movl -0x14(%rbx,%r14), %r8d
movq 0xcf07(%rip), %rax      # 0x13620
movq (%r15), %r10
movl (%rbx,%r14), %r9d
movslq 0xf0(%r10,%r9,4), %r9
movq (%rax,%r9,8), %r9
movslq 0xf0(%r10), %r10
movl 0xcf3a(%rip), %r11d     # 0x13674
pushq %r11
pushq (%rax,%r10,8)
callq 0x42d0
popq %rcx
popq %rdx
movq %rax, -0x8(%rbx,%r14)
addq $0x20, %rbx
jmp 0x66ec
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: polyline
void polyline(points, number)
     XPoint *points;
     int number;
{
  int i;
  XPoint p[number]; // This is a GCC extension, use malloc otherwise
  for (i = 0; i < number; i++)
    {
      p[i].x = (points[i].x-XOFF)*XM/XD;
      p[i].y = (points[i].y-YOFF)*XM/XD;
    }
  XDrawLines(d, w, DrawGC, p, number, CoordModeOrigin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %r8d
movl %esi, %eax
movq %rsp, %rcx
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %rcx
movq %rcx, %rsp
xorl %esi, %esi
testl %r8d, %r8d
movl $0x0, %r9d
cmovgl %r8d, %r9d
movl $0xfffffea2, %r10d      # imm = 0xFFFFFEA2
pushq $0xa
popq %r11
cmpq %rsi, %r9
je 0x6a9b
movswl (%rdi,%rsi,4), %eax
imull $0x7, %eax, %eax
addl %r10d, %eax
cltd
idivl %r11d
movw %ax, (%rcx,%rsi,4)
movswl 0x2(%rdi,%rsi,4), %eax
imull $0x7, %eax, %eax
addl %r10d, %eax
cltd
idivl %r11d
movw %ax, 0x2(%rcx,%rsi,4)
incq %rsi
jmp 0x6a6b
movq 0xcb96(%rip), %rdi      # 0x13638
movq 0xcb97(%rip), %rsi      # 0x13640
movq 0xcbd8(%rip), %rdx      # 0x13688
xorl %r9d, %r9d
callq 0x4300
movq %rbp, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: multiline
void multiline(segments, number)
     XSegment *segments;
     int number;
{
  int i;
  XSegment seg[number]; // This is a GCC extension, use malloc otherwise
  for (i = 0; i < number; i++)
    {
      seg[i].x1 = (segments[i].x1-XOFF)*XM/XD;
      seg[i].x2 = (segments[i].x2-XOFF)*XM/XD;
      seg[i].y1 = (segments[i].y1-YOFF)*XM/XD;
      seg[i].y2 = (segments[i].y2-YOFF)*XM/XD;
    }
  XDrawSegments (d, w, DrawGC, seg, number);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %r8d
movl %esi, %eax
movq %rsp, %rcx
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %rcx
movq %rcx, %rsp
xorl %esi, %esi
testl %r8d, %r8d
movl $0x0, %r9d
cmovgl %r8d, %r9d
movl $0xfffffea2, %r10d      # imm = 0xFFFFFEA2
pushq $0xa
popq %r11
cmpq %rsi, %r9
je 0x6b4c
movswl (%rdi,%rsi,8), %eax
imull $0x7, %eax, %eax
addl %r10d, %eax
cltd
idivl %r11d
movw %ax, (%rcx,%rsi,8)
movswl 0x4(%rdi,%rsi,8), %eax
imull $0x7, %eax, %eax
addl %r10d, %eax
cltd
idivl %r11d
movw %ax, 0x4(%rcx,%rsi,8)
movswl 0x2(%rdi,%rsi,8), %eax
imull $0x7, %eax, %eax
addl %r10d, %eax
cltd
idivl %r11d
movw %ax, 0x2(%rcx,%rsi,8)
movswl 0x6(%rdi,%rsi,8), %eax
imull $0x7, %eax, %eax
addl %r10d, %eax
cltd
idivl %r11d
movw %ax, 0x6(%rcx,%rsi,8)
incq %rsi
jmp 0x6af4
movq 0xcae5(%rip), %rdi      # 0x13638
movq 0xcae6(%rip), %rsi      # 0x13640
movq 0xcb27(%rip), %rdx      # 0x13688
callq 0x4070
movq %rbp, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: gprsetclippingactive
void gprsetclippingactive(flag)
     Bool flag;
{
  if (flag) {
    XSetClipRectangles (d, DrawGC, 0, 0, &clipr, 1, YXBanded);
    XSetClipRectangles (d, EraseGC, 0, 0, &clipr, 1, YXBanded);
  } else {
    XSetClipMask (d, DrawGC, None);
    XSetClipMask (d, EraseGC, None);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %eax
movq 0xc971(%rip), %rdi      # 0x13638
movq 0xc9ba(%rip), %rsi      # 0x13688
testl %eax, %eax
je 0x6d1d
pushq $0x3
popq %r14
movl %r14d, (%rsp)
leaq 0xc9cf(%rip), %rbx      # 0x136b0
pushq $0x1
popq %rbp
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x4530
movq 0xc93e(%rip), %rdi      # 0x13638
movq 0xc997(%rip), %rsi      # 0x13698
movl %r14d, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x4530
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %edx, %edx
callq 0x4120
movq 0xc90d(%rip), %rdi      # 0x13638
movq 0xc966(%rip), %rsi      # 0x13698
xorl %edx, %edx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4120
// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: gprsetclipwindow
void gprsetclipwindow(window)
     Window_t *window;
{
  clipr.x = (window->base.x-XOFF)*XM/XD;
  clipr.y = (window->base.y-YOFF)*XM/XD;
  clipr.width = window->size.x*XM/XD;
  clipr.height =  window->size.y*YM/YD;
}

// Assembly:
imull $0x7, (%rdi), %eax
movl $0xfffffea2, %ecx       # imm = 0xFFFFFEA2
addl %ecx, %eax
pushq $0xa
popq %rsi
cltd
idivl %esi
movw %ax, 0xc4fb(%rip)       # 0x136b0
imull $0x7, 0x4(%rdi), %eax
addl %ecx, %eax
cltd
idivl %esi
movw %ax, 0xc4ed(%rip)       # 0x136b2
imull $0x7, 0x8(%rdi), %eax
xorl %edx, %edx
divl %esi
movw %ax, 0xc4e0(%rip)       # 0x136b4
imull $0x7, 0xc(%rdi), %eax
xorl %edx, %edx
divl %esi
movw %ax, 0xc4d3(%rip)       # 0x136b6
retq