LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: doubleheap_free
void
doubleheap_free(struct doubleheap * H)
{

	/* Behave consistently with free(NULL). */
	if (H == NULL)
		return;

	doublelist_free(H->elems);
	free(H);
}

// Assembly:
testq %rdi, %rdi
je 0x2470
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x25a1
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/datastruct/doubleheap.c
// Function: swap
static void
swap(DOUBLELIST elems, size_t i, size_t j)
{
	double tmp;

	/* Swap the elements. */
	tmp = *doublelist_get(elems, i);
	*doublelist_get(elems, i) = *doublelist_get(elems, j);
	*doublelist_get(elems, j) = tmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x8, %edx
callq 0x27a1
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27a1
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x27a1
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27a1
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: read_input
void * read_input(void *nothing)
{
	int c;

	while(1)
	{
		if( (c = getchar()) == 0 )
		{
			printf("End of input. Bye\n");
			exit(1);
		}

		pthread_mutex_lock(&mutex);
		if(c != '\n')
		{
			global_input = c;
			while( getchar() != '\n');
		}
		pthread_cond_signal(&input_cond);
		pthread_mutex_unlock(&mutex);
	}
	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x1080
testl %eax, %eax
je 0x1291
movl %eax, %ebp
leaq 0x2e6e(%rip), %rbx      # 0x40c0
leaq 0x2e8f(%rip), %r14      # 0x40e8
movq %rbx, %rdi
callq 0x1110
cmpl $0xa, %ebp
je 0x1276
movl %ebp, 0x2e4c(%rip)      # 0x40b8
callq 0x1080
cmpl $0xa, %eax
jne 0x126c
movq %r14, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x10a0
callq 0x1080
movl %eax, %ebp
testl %eax, %eax
jne 0x1259
leaq 0xf37(%rip), %rdi       # 0x21cf
callq 0x1030
movl $0x1, %edi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: all_the_same
int all_the_same(int dice[])
{
	int i;
	for(i = 0; i < DICE_COUNT-1; i++)
		if(dice[i] != dice[i+1])
			break;

	if(i != DICE_COUNT-1)	// dice are not the same.
		return 0;
	else
		return 1;
}

// Assembly:
xorl %eax, %eax
cmpq $0x2, %rax
je 0x12c3
movl (%rdi,%rax,4), %edx
leaq 0x1(%rax), %rcx
cmpl 0x4(%rdi,%rax,4), %edx
movq %rcx, %rax
je 0x12a9
decl %ecx
jmp 0x12c8
movl $0x2, %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
sete %al
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: display
void display(int dice[], int life, int point, int level)
{
	int i;
	system("clear");
	printf("+---+---+---+\n");
	for(i = 0; i < DICE_COUNT; i++)
		printf("| %d ", dice[i]);
	printf("|\n");
	printf("+---+---+---+\n");
	printf("[LIFE LEFT: %d]\t[POINTS: %2d]\t[LEVEL: %2d]\t[B/S/N]? ", life-1, point, level+1);
	fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
leaq 0xd17(%rip), %rdi       # 0x2004
callq 0x1040
leaq 0xeea(%rip), %rdi       # 0x21e3
callq 0x1030
leaq 0xd05(%rip), %r12       # 0x200a
xorl %r13d, %r13d
movl (%r15,%r13,4), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1050
incq %r13
cmpq $0x3, %r13
jne 0x1308
leaq 0xebb(%rip), %rdi       # 0x21e1
callq 0x1030
leaq 0xeb1(%rip), %rdi       # 0x21e3
callq 0x1030
decl %r14d
incl %ebx
leaq 0xccd(%rip), %rdi       # 0x2010
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1050
movq 0x2c88(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: wait_for_input
int wait_for_input(int level)
{
	int wait_ret, input, timeout;
	struct timespec t;

	timeout = TIMEOUT_INIT - level;
	if(timeout < TIMEOUT_MIN)
		timeout = TIMEOUT_MIN;

	t.tv_sec = time(NULL) + timeout;
	t.tv_nsec = 0;

	pthread_mutex_lock(&mutex);

		if(global_input == 0)
		{
			wait_ret = pthread_cond_timedwait(&input_cond, &mutex, &t);
			if(wait_ret == ETIMEDOUT)
			{
				input = 0;
				sleep(1);
			}
			else
			{
				input = global_input;
			}
		}
		else
			input = global_input;

		global_input = 0;

	pthread_mutex_unlock(&mutex);

	return input;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x8, %eax
subl %edi, %eax
cmpl $0x3, %eax
movl $0x2, %ebx
cmovgel %eax, %ebx
xorl %edi, %edi
callq 0x1090
addq %rax, %rbx
movq %rbx, (%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x2d1d(%rip), %rdi      # 0x40c0
callq 0x1110
movl 0x2d0a(%rip), %ebx      # 0x40b8
testl %ebx, %ebx
jne 0x13e1
leaq 0x2d2f(%rip), %rdi      # 0x40e8
leaq 0x2d00(%rip), %rsi      # 0x40c0
movq %rsp, %rdx
callq 0x10d0
cmpl $0x6e, %eax
jne 0x13db
movl $0x1, %edi
callq 0x1100
xorl %ebx, %ebx
jmp 0x13e1
movl 0x2cd7(%rip), %ebx      # 0x40b8
movl $0x0, 0x2ccd(%rip)      # 0x40b8
leaq 0x2cce(%rip), %rdi      # 0x40c0
callq 0x10a0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: game_play
void *game_play(void *nothing)
{
	int i, input, sum, life = LIFE_INIT, point = 0, level = 0;
	int dice[DICE_COUNT];

	srand(time(NULL));
	while(1)
	{
		for(i = 0; i < DICE_COUNT; i++)
			dice[i] = rand() % 6 + 1;

		display(dice, life, point, level);
		input = wait_for_input(level);

		if(input == 0)	// 0 - means no input until timeout.
		{
			life--;
			printf("\nTIMEOUT\n");
		}
		else	// has an input.
		{
			if(input != 'B' && input != 'b' &&
			   input != 's' && input != 'S' &&
			   input != 'n' && input != 'N')
			{
				life--;
				printf("WRONG\n");
			}
			else
			{
				if(input == 'B')
					input = 'b';
				if(input == 'S')
					input = 's';
				if(input == 'N')
					input = 'n';

				for(i = 0, sum = 0; i < DICE_COUNT; i++)
					sum += dice[i];

				if((IS_BIG(sum) && input != 'b') ||
				   (IS_SMALL(sum) && input != 's') ||
				   (all_the_same(dice) && input != 'n') )
				{
					life--;
					printf("WRONG\n");
				}
				else
				{
					point++;
					printf("CORRECT\n");
				}
			}
		}

		if(life == 0)
		{
			printf("End of game. Bye\n");
			exit(0);
		}

		if(point > 0 && point % 10 == 0)
			level++;

		usleep(500000);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x1090
movl %eax, %edi
callq 0x1060
movl $0x3, %ebp
leaq 0xc(%rsp), %r14
movabsq $0x2100100021001, %r12  # imm = 0x2100100021001
xorl %r15d, %r15d
xorl %r13d, %r13d
callq 0x1120
cltq
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %ecx, %eax
incl %eax
movl %eax, 0xc(%rsp,%r13,4)
incq %r13
cmpq $0x3, %r13
jne 0x1437
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x12d1
movl %r15d, %edi
callq 0x136e
leal -0x42(%rax), %ecx
cmpl $0x31, %ecx
ja 0x150f
btq %rcx, %r12
jae 0x150f
cmpl $0x42, %eax
movl $0x62, %ecx
cmovel %ecx, %eax
cmpl $0x53, %eax
movl $0x73, %ecx
cmovel %ecx, %eax
xorl %edx, %edx
xorl %ecx, %ecx
addl 0xc(%rsp,%rdx,4), %ecx
incq %rdx
cmpq $0x3, %rdx
jne 0x14ae
cmpl $0x4e, %eax
movl $0x6e, %edx
cmovel %edx, %eax
cmpl $0x62, %eax
je 0x14d0
cmpl $0xa, %ecx
jg 0x151e
cmpl $0x73, %eax
je 0x14da
cmpl $0xb, %ecx
jl 0x151e
xorl %edx, %edx
movq %rdx, %rcx
cmpq $0x2, %rdx
je 0x14f3
movl 0xc(%rsp,%rcx,4), %esi
leaq 0x1(%rcx), %rdx
cmpl 0x10(%rsp,%rcx,4), %esi
je 0x14dc
cmpq $0x2, %rcx
setne %cl
cmpl $0x6e, %eax
sete %al
orb %cl, %al
je 0x151e
incl %ebx
leaq 0xce4(%rip), %rdi       # 0x21f1
jmp 0x1527
testl %eax, %eax
jne 0x151e
decl %ebp
leaq 0xce3(%rip), %rdi       # 0x21ff
jmp 0x1527
decl %ebp
leaq 0xcd2(%rip), %rdi       # 0x21f9
callq 0x1030
testl %ebp, %ebp
je 0x155d
testl %ebx, %ebx
setg %al
imull $0xcccccccd, %ebx, %ecx # imm = 0xCCCCCCCD
rorl %ecx
cmpl $0x1999999a, %ecx       # imm = 0x1999999A
setb %cl
andb %al, %cl
movzbl %cl, %eax
addl %eax, %r15d
movl $0x7a120, %edi          # imm = 0x7A120
callq 0x1130
jmp 0x1434
leaq 0xca4(%rip), %rdi       # 0x2208
callq 0x1030
xorl %edi, %edi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/7-Threading/pthread_game.c
// Function: main
int main(void)
{
	pthread_t tid1, tid2;
	display_intro();
	pthread_create(&tid1, NULL, read_input, NULL);
	pthread_create(&tid2, NULL, game_play, NULL);
	pthread_join(tid1, NULL);
	pthread_join(tid2, NULL);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0x1570
leaq -0x37d(%rip), %rdx      # 0x123c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x10c0
leaq -0x1d2(%rip), %rdx      # 0x13ff
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x10c0
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x10f0
movq (%r14), %rdi
xorl %esi, %esi
callq 0x10f0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/lock2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		struct flock lck;

		lck.l_type = F_WRLCK;
		lck.l_whence = SEEK_SET;
		lck.l_start = 0;
		lck.l_len = 1;
		assert(fcntl(fd, F_SETLKW, &lck) == 0);

		lck.l_type = F_UNLCK;
		lck.l_whence = SEEK_SET;
		lck.l_start = 0;
		lck.l_len = 1;
		assert(fcntl(fd, F_SETLKW, &lck) == 0);

		(*iterations) += 2;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x24cb(%rip), %rdi      # 0x4180
movl $0x2, %esi
xorl %eax, %eax
callq 0x1220
testl %eax, %eax
js 0x1d78
movl %eax, %ebp
movq %rsp, %rdx
movl $0x1, (%rdx)
movq $0x0, 0x8(%rdx)
movq $0x1, 0x10(%rdx)
movl %eax, %edi
movl $0x7, %esi
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1d59
movq %rsp, %r14
movl $0x2, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl $0x7, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1d97
addq $0x2, (%rbx)
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl $0x7, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
je 0x1cf9
leaq 0x599(%rip), %rdi       # 0x22f9
leaq 0x524(%rip), %rsi       # 0x228b
leaq 0x558(%rip), %rcx       # 0x22c6
movl $0x1d, %edx
callq 0x1140
leaq 0x53f(%rip), %rdi       # 0x22be
leaq 0x505(%rip), %rsi       # 0x228b
leaq 0x539(%rip), %rcx       # 0x22c6
movl $0x14, %edx
callq 0x1140
leaq 0x55b(%rip), %rdi       # 0x22f9
leaq 0x4e6(%rip), %rsi       # 0x228b
leaq 0x51a(%rip), %rcx       # 0x22c6
movl $0x23, %edx
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/2mg.cc
// Function: parse_opt(int, char*, argp_state*)
static error_t parse_opt(int key, char *arg, struct argp_state *state) {
  struct arguments *arguments = static_cast<struct arguments *>(state->input);
  switch (key) {
    case 'l':
      arguments->list = true;
      break;
    case ARGP_KEY_ARG:
      if (state->arg_num >= 1) {
        argp_usage(state);
      }
      arguments->diskimage = arg;
      break;
    case ARGP_KEY_END:
      if (state->arg_num < 1) {
        argp_usage(state);
      }
      break;
    default:
      return ARGP_ERR_UNKNOWN;
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdx), %r14
testl %edi, %edi
je 0x67cd
cmpl $0x1000001, %edi        # imm = 0x1000001
je 0x67bb
movl $0x7, %ebx
cmpl $0x6c, %edi
jne 0x67e3
movb $0x1, 0x8(%r14)
jmp 0x67e1
xorl %ebx, %ebx
cmpl $0x0, 0x20(%rdx)
jne 0x67e3
movq %rdx, %rdi
callq 0x52c0
jmp 0x67e3
movq %rsi, %rbx
cmpl $0x0, 0x20(%rdx)
je 0x67de
movq %rdx, %rdi
callq 0x52c0
movq %rbx, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/2mg.cc
// Function: readFilename[abi:cxx11](std::shared_ptr<TheHandle>, int)
static std::string readFilename(Handle h, int len) {
  static const char *digits = "0123456789abcdef";
  std::string r;
  for (int i = 0; i < len; i++) {
    uint8_t ch = h->r8();
    if (isalnum(ch) || ch == '_' || ch == '.' || ch == ' ') {
      r += static_cast<char>(ch);
    } else {
      r += 'x';
      uint8_t hi = ch >> 4;
      uint8_t lo = ch & 0xf;
      r += digits[hi];
      r += digits[lo];
    }
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %edx, %edx
jle 0x68a5
movl %edx, %ebp
movq %rsi, %r14
movabsq $-0x7fffffffffffbfff, %r13 # imm = 0x8000000000004001
movq (%r14), %rdi
callq 0x7348
movl %eax, %r12d
movzbl %al, %r15d
movl %r15d, %edi
callq 0x51d0
testl %eax, %eax
jne 0x6853
leal -0x20(%r15), %eax
cmpl $0x3f, %eax
ja 0x6865
btq %rax, %r13
jae 0x6865
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x5160
decl %ebp
jne 0x6829
jmp 0x68a5
movq %rbx, %rdi
movl $0x78, %esi
callq 0x5160
movl %r15d, %eax
shrl $0x4, %eax
leaq 0x1843(%rip), %rcx      # 0x80c2
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x5160
andl $0xf, %r15d
leaq 0x182c(%rip), %rax      # 0x80c2
movsbl (%r15,%rax), %esi
movq %rbx, %rdi
callq 0x5160
jmp 0x685f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x68b9
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x68d4
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5340
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/2mg.cc
// Function: printDateTime(unsigned short, unsigned short)
static void printDateTime(uint16_t date, uint16_t time) {
  std::cout << std::setfill('0')
            << std::setw(2) << ((date >> 9) & 0x7f) << "-"
            << std::setw(2) << ((date >> 5) & 0xf) << "-"
            << std::setw(2) << (date & 0x1f) << " "
            << std::setw(2) << ((time >> 8) & 0x1f) << ":"
            << std::setw(2) << (time & 0x3f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movq 0x63f4(%rip), %r14      # 0xcfd0
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x6c0e
movq %r15, %rdi
movl $0x20, %esi
callq 0x5180
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq (%r14), %rax
movq -0x18(%rax), %rax
movl $0x2, %r12d
movq %r12, 0x10(%r14,%rax)
movzwl %bp, %ebp
movl %ebp, %esi
shrl $0x9, %esi
movq %r14, %rdi
callq 0x5310
movq %rax, %r14
leaq 0x14f1(%rip), %r15      # 0x8133
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
movl %ebp, %esi
shrl $0x5, %esi
andl $0xf, %esi
movq %r14, %rdi
callq 0x5310
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
andl $0x1f, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x5310
movq %rax, %r14
leaq 0x1430(%rip), %rsi      # 0x80d4
movl $0x1, %edx
movq %rax, %rdi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
movzwl %bx, %ebx
movl %ebx, %esi
shrl $0x8, %esi
andl $0x1f, %esi
movq %r14, %rdi
callq 0x5310
movq %rax, %r14
leaq 0x145b(%rip), %rsi      # 0x8135
movl $0x1, %edx
movq %rax, %rdi
callq 0x5200
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
andl $0x3f, %ebx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5310
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/2mg.cc
// Function: dumpSapling(std::shared_ptr<TheHandle>, unsigned int, std::ostream&)
static void dumpSapling(Handle h, uint32_t len, std::ostream &f) {
  auto index = h->tell();
  while (len > 0) {
    h->seek(index);
    uint16_t blockid = h->r8();
    h->skip(255);
    blockid |= h->r8() << 8;
    uint32_t blen = std::min<uint32_t>(512, len);
    if (blockid && (blockid + 1) * 512 <= h->length) {
      h->seek(blockid * 512);
      dumpSeedling(h, blen, f);
    } else {
      f.seekp(blen, std::ios::cur);
    }
    len -= blen;
    index++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x72a6
testl %ebp, %ebp
je 0x6df0
movq %rax, %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x7476
movq (%r14), %rdi
callq 0x7348
movl %eax, %r12d
movq (%r14), %rdi
movl $0xff, %esi
callq 0x7480
movq (%r14), %rdi
callq 0x7348
movzbl %al, %ecx
shll $0x8, %ecx
movzbl %r12b, %eax
movl $0x200, %edx            # imm = 0x200
cmpl %edx, %ebp
movl $0x200, %ebx            # imm = 0x200
cmovbl %ebp, %ebx
orw %cx, %ax
movl %ebx, %r12d
je 0x6d8f
movzwl %ax, %eax
shll $0x9, %eax
leal 0x200(%rax), %ecx
movq (%r14), %rdi
cmpq %rcx, (%rdi)
jge 0x6da2
movq (%rsp), %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x5190
jmp 0x6de5
movl %eax, %esi
callq 0x7476
movq (%r14), %rdi
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x6dcc
movq 0x620c(%rip), %rax      # 0xcfc8
cmpb $0x0, (%rax)
je 0x6dc7
incl 0x8(%r13)
jmp 0x6dcc
lock
incl 0x8(%r13)
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x7486
testq %r13, %r13
je 0x6de5
movq %r13, %rdi
callq 0x6fa6
incq %r15
subl %ebx, %ebp
jne 0x6d2f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r13, %r13
je 0x6e0f
movq %r13, %rdi
callq 0x6fa6
movq %rbx, %rdi
callq 0x5340
nop
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/handle.cc
// Function: TheHandle::TheHandle(char const*)
TheHandle::TheHandle(const char *filename) {
  data = pos = nullptr;
  std::ifstream f(filename, std::ios::in | std::ios::binary | std::ios::ate);
  if (!f.is_open()) {
    return;
  }
  length = f.tellg();
  data = new uint8_t[length];
  f.seekg(0, std::ios::beg);
  f.read(reinterpret_cast<char*>(data), length);
  f.close();
  pos = data;
}

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x8(%rsp), %rdi
movl $0xe, %edx
callq 0x5360
leaq 0x80(%rsp), %rdi
callq 0x5060
testb %al, %al
je 0x7213
leaq 0x8(%rsp), %rdi
callq 0x5320
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x5030
leaq 0x8(%rbx), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5240
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5210
leaq 0x8(%rsp), %rdi
callq 0x5050
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5080
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
jmp 0x7228
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x5340
nop
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/handle.cc
// Function: TheHandle::TheHandle(std::vector<unsigned char, std::allocator<unsigned char>> const&)
TheHandle::TheHandle(const std::vector<uint8_t> &data) {
  length = data.size();
  this->data = new uint8_t[length];
  std::copy(data.begin(), data.end(), this->data);
  pos = this->data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
movq %rdi, (%rbx)
callq 0x5030
movq %rax, %r14
movq %rax, 0x8(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
je 0x7273
movq %r14, %rdi
callq 0x52d0
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/handle.cc
// Function: TheHandle::r32()
uint32_t TheHandle::r32() {
  uint32_t r = *pos++;
  r |= *pos++ << 8;
  r |= *pos++ << 16;
  r |= *pos++ << 24;
  return r;
}

// Assembly:
movq 0x10(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rdi)
movzbl (%rax), %ecx
leaq 0x2(%rax), %rdx
movq %rdx, 0x10(%rdi)
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
leaq 0x3(%rax), %rcx
movq %rcx, 0x10(%rdi)
movzbl 0x2(%rax), %ecx
shll $0x10, %ecx
orl %edx, %ecx
leaq 0x4(%rax), %rdx
movq %rdx, 0x10(%rdi)
movzbl 0x3(%rax), %eax
shll $0x18, %eax
orl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/handle.cc
// Function: TheHandle::r24()
uint32_t TheHandle::r24() {
  uint32_t r = *pos++;
  r |= *pos++ << 8;
  r |= *pos++ << 16;
  return r;
}

// Assembly:
movq 0x10(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rdi)
movzbl (%rax), %ecx
leaq 0x2(%rax), %rdx
movq %rdx, 0x10(%rdi)
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
leaq 0x3(%rax), %rcx
movq %rcx, 0x10(%rdi)
movzbl 0x2(%rax), %eax
shll $0x10, %eax
orl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/handle.cc
// Function: TheHandle::rs[abi:cxx11]()
std::string TheHandle::rs() {
  std::string r;
  uint8_t len = *pos++;
  for (auto i = 0; i < len; i++) {
    r += static_cast<char>(*pos++);
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x10(%rsi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rsi)
movzbl (%rax), %ebp
testl %ebp, %ebp
je 0x73a6
movq %rsi, %r14
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5160
decl %ebp
jne 0x738b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x73ca
movq (%r15), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5340
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/handle.cc
// Function: TheHandle::read[abi:cxx11](int)
std::string TheHandle::read(int32_t len) {
  std::string r;
  for (auto i = 0; i < len; i++) {
    r += static_cast<char>(*pos++);
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %edx, %edx
jle 0x7413
movl %edx, %ebp
movq %rsi, %r14
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5160
decl %ebp
jne 0x73f8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7437
movq (%r15), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5340
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes128otrpv2/ref/OTR.c
// Function: Setup
int Setup(const uint8 *skey)
{
	uint8 cst[16] = {0};

	KeySchedule(KeyLen, ENC, skey);
	Encryption(KeyLen, cst, J);
	mul2(J, J2); 
	mul2(J2, Q); /* Q = 4J */
	return SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rdx
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %rbx
vmovaps %xmm0, (%rbx)
movl $0x80, %edi
xorl %esi, %esi
callq 0x1090
movq 0x3da4(%rip), %r14      # 0x4fc8
movl $0x80, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1100
vmovdqa (%r14), %xmm0
movzbl (%r14), %eax
movw $0x7fff, %cx            # imm = 0x7FFF
kmovd %ecx, %k1
vmovdqu8 0x1(%r14), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpbroadcastd 0x1d9f(%rip), %xmm2 # 0x3000
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movq 0x3d81(%rip), %rcx      # 0x4ff0
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
movb 0xf(%r14), %dl
addb %dl, %dl
leaq 0x1ebb(%rip), %rsi      # 0x3140
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
movzbl (%rcx), %eax
vmovdqa (%rcx), %xmm0
vmovdqu8 0x1(%rcx), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movq 0x3cfd(%rip), %rcx      # 0x4fb0
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
addb %dl, %dl
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/big5enc.c
// Function: read_big5
static void read_big5(charset_spec const *charset, long int input_chr,
		      charset_state *state,
		      void (*emit)(void *ctx, long int output), void *emitctx)
{
    UNUSEDARG(charset);

    /*
     * For reading Big5, state->s0 simply contains the single
     * stored lead byte when we are half way through a double-byte
     * character, or 0 if we aren't.
     */

    if (state->s0 == 0) {
	if (input_chr >= 0xA1 && input_chr <= 0xFE) {
	    /*
	     * Lead byte. Just store it.
	     */
	    state->s0 = input_chr;
	} else {
	    /*
	     * Anything else we pass straight through unchanged.
	     */
	    emit(emitctx, input_chr);
	}
    } else {
	/*
	 * We have a stored lead byte. We expect a valid followup
	 * byte.
	 */
	if ((input_chr >= 0x40 && input_chr <= 0x7E) ||
	    (input_chr >= 0xA1 && input_chr <= 0xFE)) {
	    emit(emitctx, big5_to_unicode(state->s0 - 0xA1, input_chr - 0x40));
	} else {
	    emit(emitctx, ERROR);
	}
	state->s0 = 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rdx, %rbx
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x6564
leaq -0x40(%rsi), %rax
cmpq $0x3f, %rax
setae %r8b
leaq -0xa1(%rsi), %rax
cmpq $0x5e, %rax
setae %dl
movl $0xffff, %eax           # imm = 0xFFFF
testb %dl, %r8b
jne 0x6553
addl $0xffffff5f, %edi       # imm = 0xFFFFFF5F
addl $-0x40, %esi
movq %rcx, %r15
callq 0x65f8
movq %r15, %rcx
movq %r14, %rdi
movq %rax, %rsi
callq *%rcx
movq $0x0, (%rbx)
jmp 0x6574
leaq -0xa1(%rsi), %rax
cmpq $0x5d, %rax
ja 0x657a
movq %rsi, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/big5enc.c
// Function: write_big5
static int write_big5(charset_spec const *charset, long int input_chr,
		      charset_state *state,
		      void (*emit)(void *ctx, long int output), void *emitctx)
{
    UNUSEDARG(charset);
    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    } else {
	int r, c;
	if (unicode_to_big5(input_chr, &r, &c)) {
	    emit(emitctx, r + 0xA1);
	    emit(emitctx, c + 0x40);
	    return TRUE;
	} else {
	    return FALSE;
	}
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x65eb
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x65aa
movq %r14, %rdi
callq *%rbx
jmp 0x65eb
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x665f
testl %eax, %eax
je 0x65e9
movslq 0xc(%rsp), %rsi
addq $0xa1, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq *%rbx
movl $0x1, %ebp
jmp 0x65eb
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/big5set.c
// Function: unicode_to_big5
int unicode_to_big5(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(big5_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = big5_backward[k].r;
	cc = big5_backward[k].c;
	uu = big5_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x3587, %r9d           # imm = 0x3587
leaq 0xdbbc(%rip), %rcx      # 0x14230
leaq 0x4f65(%rip), %r8       # 0xb5e0
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
imulq $0x17e, %r11, %r14      # imm = 0x17E
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x66b5
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x66b7
jle 0x66ca
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x667b
xorl %eax, %eax
jmp 0x66d4
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/cns11643.c
// Function: cns11643_to_unicode
long int cns11643_to_unicode(int p, int r, int c)
{
    assert(p >= 0 && p < 7);
    assert(r >= 0 && r < 94);
    assert(c >= 0 && c < 94);
    return cns11643_forward((p*94+r)*94+c);
}

// Assembly:
pushq %rax
cmpl $0x7, %edi
jae 0x671a
cmpl $0x5e, %esi
jae 0x6739
cmpl $0x5e, %edx
jae 0x6758
imull $0x5e, %edi, %eax
addl %esi, %eax
imull $0x5e, %eax, %ecx
addl %edx, %ecx
leaq 0x146a7(%rip), %rax     # 0x1ada0
movzwl (%rax,%rcx,2), %edx
movl %ecx, %eax
shrl $0x4, %eax
leaq 0x4a637(%rip), %rsi     # 0x50d40
movl (%rsi,%rax,4), %eax
addl %ecx, %ecx
shrl %cl, %eax
andl $0x3, %eax
shll $0x10, %eax
orl %edx, %eax
popq %rcx
retq
leaq 0x1461d(%rip), %rdi     # 0x1ad3e
leaq 0x14626(%rip), %rsi     # 0x1ad4e
leaq 0x1462a(%rip), %rcx     # 0x1ad59
movl $0x32d9, %edx           # imm = 0x32D9
callq 0x6060
leaq 0x4e54(%rip), %rdi      # 0xb594
leaq 0x14607(%rip), %rsi     # 0x1ad4e
leaq 0x1460b(%rip), %rcx     # 0x1ad59
movl $0x32da, %edx           # imm = 0x32DA
callq 0x6060
leaq 0x14622(%rip), %rdi     # 0x1ad81
leaq 0x145e8(%rip), %rsi     # 0x1ad4e
leaq 0x145ec(%rip), %rcx     # 0x1ad59
movl $0x32db, %edx           # imm = 0x32DB
callq 0x6060
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/cns11643.c
// Function: unicode_to_cns11643
int unicode_to_cns11643(long int unicode, int *p, int *r, int *c)
{
    int index, pp, rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(cns11643_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	index = cns11643_backward[k];
	uu = cns11643_forward(index);
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    cc = index % 94;
	    rr = index / 94;
	    pp = rr / 94;
	    rr %= 94;
	    *p = pp;
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rax
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0xbe2e, %r14d          # imm = 0xBE2E
leaq 0x3294b(%rip), %r9      # 0x390e0
leaq 0x14604(%rip), %r10     # 0x1ada0
leaq 0x4a59d(%rip), %r11     # 0x50d40
leal (%r14,%r8), %ecx
movl %ecx, %ebp
shrl $0x1f, %ebp
addl %ecx, %ebp
sarl %ebp
movslq %ebp, %rcx
movzwl (%r9,%rcx,2), %ebx
leal (%rbx,%rbx), %ecx
movzwl (%rcx,%r10), %r15d
movl %ebx, %r12d
shrl $0x4, %r12d
movl (%r11,%r12,4), %r12d
shrl %cl, %r12d
andl $0x3, %r12d
shll $0x10, %r12d
orl %r15d, %r12d
cmpq %rdi, %r12
jge 0x67e6
movl %ebp, %r8d
movl %r14d, %ebp
jmp 0x67e8
jle 0x67f9
movl %ebp, %ecx
subl %r8d, %ecx
movl %ebp, %r14d
cmpl $0x1, %ecx
jg 0x67a3
xorl %eax, %eax
jmp 0x6835
movl %ebx, %ecx
imulq $0x2b93106, %rcx, %rdi  # imm = 0x2B93106
shrq $0x20, %rdi
imull $0x5e, %edi, %r8d
subl %r8d, %ebx
imulq $0x76abc, %rcx, %rcx    # imm = 0x76ABC
shrq $0x20, %rcx
imulq $0x2b93106, %rdi, %r8   # imm = 0x2B93106
shrq $0x20, %r8
imull $0x5e, %r8d, %r8d
subl %r8d, %edi
movl %ecx, (%rsi)
movl %edi, (%rdx)
movl %ebx, (%rax)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/cp949.c
// Function: write_cp949
static int write_cp949(charset_spec const *charset, long int input_chr,
		       charset_state *state,
		       void (*emit)(void *ctx, long int output),
		       void *emitctx)
{
    UNUSEDARG(charset);
    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    } else {
	int r, c;
	if (unicode_to_cp949(input_chr, &r, &c)) {
	    emit(emitctx, r + 0x80);
	    emit(emitctx, c + 0x40);
	    return TRUE;
	} else {
	    return FALSE;
	}
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x690b
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x68cd
movq %r14, %rdi
callq *%rbx
jmp 0x690b
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x9277
testl %eax, %eax
je 0x6909
movslq 0xc(%rsp), %rsi
subq $-0x80, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq %r14, %rdi
callq *%rbx
movl $0x1, %ebp
jmp 0x690b
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: write_euc
static int write_euc(charset_spec const *charset, long int input_chr,
		     charset_state *state,
		     void (*emit)(void *ctx, long int output), void *emitctx)
{
    struct euc const *euc = (struct euc *)charset->data;
    unsigned long c;
    int cset, len;

    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    /* ASCII is the easy bit, and is always the same. */
    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    }

    c = euc->from_ucs(input_chr);
    if (!c) {
	return FALSE;
    }

    cset = c >> 28;
    len = euc->nchars[cset-1];
    c &= 0xFFFFFF;

    if (cset > 1)
	emit(emitctx, 0x8C + cset);    /* SS2/SS3 */

    while (len--)
	emit(emitctx, (c >> (8*len)) & 0xFF);
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x6adb
movq %r8, %r15
movq %rcx, %r14
cmpq $0x7f, %rsi
jg 0x6a51
movq %r15, %rdi
callq *%r14
jmp 0x6adb
movq 0x18(%rdi), %rbx
movq %rsi, %rdi
callq *0x18(%rbx)
testq %rax, %rax
je 0x6ad9
movq %rax, %r12
movq %rax, %rsi
shrq $0x1c, %rsi
movq %rsi, %rax
shlq $0x20, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rax, %rcx
sarq $0x1e, %rcx
movl (%rbx,%rcx), %ebx
cmpl $0x2, %esi
jl 0x6a96
addl $0x8c, %esi
movq %r15, %rdi
callq *%r14
testq %rbx, %rbx
je 0x6adb
andl $0xffffff, %r12d        # imm = 0xFFFFFF
leaq -0x8(,%rbx,8), %rbp
decq %rbx
movq %rbx, %r13
movl %ebp, %ecx
andb $-0x8, %cl
movq %r12, %rax
shrq %cl, %rax
movzbl %al, %esi
movq %r15, %rdi
callq *%r14
decq %r13
addq $-0x8, %rbp
testl %ebx, %ebx
movq %r13, %rbx
jne 0x6ab0
movl $0x1, %ebp
jmp 0x6adb
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: euc_cn_to_ucs
static long int euc_cn_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return gb2312_to_unicode(((state >> 8) & 0xFF) - 0xA1,
				       ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;
    }
}

// Assembly:
movq %rdi, %rax
andq $-0x10000000, %rax      # imm = 0xF0000000
cmpq $0x10000000, %rax       # imm = 0x10000000
jne 0x6b1a
movq %rdi, %rsi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x6dbc
movl $0xffff, %eax           # imm = 0xFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: euc_kr_to_ucs
static long int euc_kr_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return ksx1001_to_unicode(((state >> 8) & 0xFF) - 0xA1,
				       ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;
    }
}

// Assembly:
movq %rdi, %rax
andq $-0x10000000, %rax      # imm = 0xF0000000
cmpq $0x10000000, %rax       # imm = 0x10000000
jne 0x6b88
movq %rdi, %rsi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x92f1
movl $0xffff, %eax           # imm = 0xFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: euc_jp_to_ucs
static long int euc_jp_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return jisx0208_to_unicode(((state >> 8) & 0xFF) - 0xA1,
					 ((state     ) & 0xFF) - 0xA1);
      case 2:
	/*
	 * This is the top half of JIS X 0201. That means A1-DF map
	 * to FF61-FF9F, and nothing else is valid.
	 */
	{
	    int c = state & 0xFF;
	    if (c >= 0xA1 && c <= 0xDF)
		return c + (0xFF61 - 0xA1);
	    else
		return ERROR;
	}
	/* (no break needed since all control paths have returned) */
      case 3: return jisx0212_to_unicode(((state >> 8) & 0xFF) - 0xA1,
					 ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;	       /* placate optimisers */
    }
}

// Assembly:
movq %rdi, %rsi
movq %rdi, %rcx
shrq $0x1c, %rcx
cmpq $0x3, %rcx
je 0x6c21
cmpq $0x2, %rcx
je 0x6c05
movl $0xffff, %eax           # imm = 0xFFFF
cmpq $0x1, %rcx
jne 0x6c20
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x904c
movzbl %sil, %ecx
leal -0xa1(%rcx), %eax
addl $0xfec0, %ecx           # imm = 0xFEC0
cmpl $0x3f, %eax
movl $0xffff, %eax           # imm = 0xFFFF
cmovbl %ecx, %eax
retq
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x912c
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: euc_jp_from_ucs
static unsigned long euc_jp_from_ucs(long int ucs)
{
    int r, c;
    if (ucs >= 0xFF61 && ucs <= 0xFF9F)
	return 0x20000000 | (ucs - (0xFF61 - 0xA1));
    else if (unicode_to_jisx0208(ucs, &r, &c))
	return 0x10000000 | ((r+0xA1) << 8) | (c+0xA1);
    else if (unicode_to_jisx0212(ucs, &r, &c))
	return 0x30000000 | ((r+0xA1) << 8) | (c+0xA1);
    else
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0xff61(%rdi), %rax
cmpq $0x3e, %rax
ja 0x6c5b
addq $0x1fff0140, %rbx       # imm = 0x1FFF0140
jmp 0x6cd7
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x90b0
testl %eax, %eax
je 0x6c98
movl 0xc(%rsp), %eax
shll $0x8, %eax
addl $0xa100, %eax           # imm = 0xA100
movslq 0x8(%rsp), %rcx
addq $0xa1, %rcx
movslq %eax, %rbx
orq %rcx, %rbx
orq $0x10000000, %rbx       # imm = 0x10000000
jmp 0x6cd7
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x9190
testl %eax, %eax
je 0x6cd5
movl 0xc(%rsp), %eax
shll $0x8, %eax
addl $0xa100, %eax           # imm = 0xA100
movslq 0x8(%rsp), %rcx
addq $0xa1, %rcx
movslq %eax, %rbx
orq %rcx, %rbx
orq $0x30000000, %rbx       # imm = 0x30000000
jmp 0x6cd7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: euc_tw_to_ucs
static long int euc_tw_to_ucs(unsigned long state)
{
    int plane;
    switch (state >> 28) {
      case 1: return cns11643_to_unicode(0, ((state >> 8) & 0xFF) - 0xA1,
					    ((state     ) & 0xFF) - 0xA1);
      case 2:
	plane = ((state >> 8) & 0xFF) - 0xA1;
	if (plane >= 7) return ERROR;
	return cns11643_to_unicode(plane, ((state >> 8) & 0xFF) - 0xA1,
					  ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;
    }
}

// Assembly:
movq %rdi, %rdx
movq %rdi, %rax
shrq $0x1c, %rax
cmpq $0x2, %rax
je 0x6d14
cmpq $0x1, %rax
jne 0x6d1f
movl %edx, %esi
shrl $0x8, %esi
movl $0xff, %eax
andl %eax, %esi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %esi
andl %eax, %edx
addl %ecx, %edx
xorl %edi, %edi
jmp 0x66d8
movzbl %dh, %edi
cmpl $0xa7, %edi
jbe 0x6d25
movl $0xffff, %eax           # imm = 0xFFFF
retq
movl $0xffffff5f, %eax       # imm = 0xFFFFFF5F
addl %eax, %edi
movzbl %dl, %edx
addl %eax, %edx
movl %edi, %esi
jmp 0x66d8
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/euc.c
// Function: euc_tw_from_ucs
static unsigned long euc_tw_from_ucs(long int ucs)
{
    int p, r, c;
    if (unicode_to_cns11643(ucs, &p, &r, &c)) {
	if (p == 0)
	    return 0x10000000 | ((r+0xA1) << 8) | (c+0xA1);
	else
	    return 0x20000000 |
		((p + 0xA1) << 16) | ((r+0xA1) << 8) | (c+0xA1);
    } else
	return 0;
}

// Assembly:
subq $0x18, %rsp
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x6777
testl %eax, %eax
je 0x6d8d
movl 0x14(%rsp), %eax
testl %eax, %eax
je 0x6d91
shll $0x10, %eax
addl $0xa10000, %eax         # imm = 0xA10000
movl 0x10(%rsp), %ecx
shll $0x8, %ecx
addl $0xa100, %ecx           # imm = 0xA100
orl %eax, %ecx
movslq 0xc(%rsp), %rdx
addq $0xa1, %rdx
movslq %ecx, %rax
orq %rdx, %rax
orq $0x20000000, %rax       # imm = 0x20000000
jmp 0x6db4
xorl %eax, %eax
jmp 0x6db4
movl 0x10(%rsp), %eax
shll $0x8, %eax
addl $0xa100, %eax           # imm = 0xA100
movslq 0xc(%rsp), %rcx
addq $0xa1, %rcx
cltq
orq %rcx, %rax
orq $0x10000000, %rax       # imm = 0x10000000
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/gb2312.c
// Function: unicode_to_gb2312
int unicode_to_gb2312(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(gb2312_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = gb2312_backward[k].r;
	cc = gb2312_backward[k].c;
	uu = gb2312_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1d15, %r9d           # imm = 0x1D15
leaq 0x520bb(%rip), %rcx     # 0x58ef0
leaq 0x4dba4(%rip), %r8      # 0x549e0
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
imulq $0xbc, %r11, %r14
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x6e76
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x6e78
jle 0x6e8b
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x6e3c
xorl %eax, %eax
jmp 0x6e95
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/hz.c
// Function: write_hz
static int write_hz(charset_spec const *charset, long int input_chr,
		    charset_state *state,
		    void (*emit)(void *ctx, long int output), void *emitctx)
{
    int desired_state, r, c;

    UNUSEDARG(charset);

    /*
     * Analyse the input char.
     */
    if (input_chr < 0x80) {
	desired_state = 0;
	c = input_chr;
    } else if (unicode_to_gb2312(input_chr, &r, &c)) {
	desired_state = 1;
    } else {
	return FALSE;
    }

    if (state->s0 != (unsigned)desired_state) {
	emit(emitctx, '~');
	emit(emitctx, desired_state ? '{' : '}');
	state->s0 = desired_state;
    }

    if (input_chr < 0)
	return TRUE;		       /* special case: just reset state */

    if (state->s0) {
	/*
	 * GB mode.
	 */
	emit(emitctx, 0x21 + r);
	emit(emitctx, 0x21 + c);
    } else {
	emit(emitctx, c);
    }
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
cmpq $0x7f, %rsi
jg 0x6fa8
movl %r12d, (%rsp)
xorl %r13d, %r13d
jmp 0x6fc2
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
movq %r12, %rdi
callq 0x6e20
movl $0x1, %r13d
testl %eax, %eax
je 0x7021
cmpq %r13, (%r15)
je 0x6fee
xorl %ebp, %ebp
cmpq $0x80, %r12
setl %bpl
movl $0x7e, %esi
movq %r14, %rdi
callq *%rbx
leaq 0x7b(,%rbp,2), %rsi
movq %r14, %rdi
callq *%rbx
movq %r13, (%r15)
movl $0x1, %ebp
testq %r12, %r12
js 0x7023
cmpq $0x0, (%r15)
je 0x7014
movslq 0x4(%rsp), %rsi
addq $0x21, %rsi
movq %r14, %rdi
callq *%rbx
movl (%rsp), %eax
addl $0x21, %eax
jmp 0x7017
movl (%rsp), %eax
movslq %eax, %rsi
movq %r14, %rdi
callq *%rbx
jmp 0x7023
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/iso2022.c
// Function: emacs_big5_1_to_unicode
static long int emacs_big5_1_to_unicode(int r, int c)
{
    unsigned long s;
    s = r * 94 + c;
    r = s / 157;
    c = s % 157;
    if (c >= 64) c += 34; /* Skip over the gap */
    return big5_to_unicode(r, c);
}

// Assembly:
imull $0x5e, %edi, %eax
addl %esi, %eax
movslq %eax, %rcx
movabsq $0x342da7f2f4960343, %rdx # imm = 0x342DA7F2F4960343
movq %rcx, %rax
mulq %rdx
movq %rdx, %rdi
shrq $0x5, %rdi
imulq $0x9d, %rdi, %rax
subq %rax, %rcx
leal 0x22(%rcx), %esi
cmpq $0x40, %rcx
cmovbl %ecx, %esi
jmp 0x65f8
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/iso2022.c
// Function: unicode_to_emacs_big5
static int unicode_to_emacs_big5(long int unicode, int *p, int *r, int *c)
{
    int rr, cc, s;
    if (!unicode_to_big5(unicode, &rr, &cc))
	return 0;
    if (cc >= 64) {
	cc -= 34;
	assert(cc >= 64);
    }
    s = rr * 157 + cc;
    if (s >= 40*157) {
	*p = 2;
	s -= 40*157;
    } else {
	*p = 1;
    }
    *r = s / 94;
    *c = s % 94;
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x665f
testl %eax, %eax
je 0x7126
movl 0x8(%rsp), %eax
cmpl $0x40, %eax
jl 0x7105
leal -0x22(%rax), %ecx
movl %ecx, 0x8(%rsp)
cmpl $0x61, %eax
jle 0x7163
imull $0x9d, 0xc(%rsp), %eax
addl 0x8(%rsp), %eax
cmpl $0x1888, %eax           # imm = 0x1888
jl 0x712a
movl $0x2, (%r15)
addl $0xffffe778, %eax       # imm = 0xFFFFE778
jmp 0x7131
xorl %eax, %eax
jmp 0x7159
movl $0x1, (%r15)
cltq
imulq $-0x51b3bea3, %rax, %rcx # imm = 0xAE4C415D
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
movl %ecx, (%r14)
imull $0x5e, %ecx, %ecx
subl %ecx, %eax
movl %eax, (%rbx)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x55896(%rip), %rdi     # 0x5ca00
leaq 0x55898(%rip), %rsi     # 0x5ca09
leaq 0x5589b(%rip), %rcx     # 0x5ca13
movl $0xfa, %edx
callq 0x6060
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/iso2022.c
// Function: emacs_big5_2_to_unicode
static long int emacs_big5_2_to_unicode(int r, int c)
{
    unsigned long s;
    s = r * 94 + c;
    r = s / 157 + 40;
    c = s % 157;
    if (c >= 64) c += 34; /* Skip over the gap */
    return big5_to_unicode(r, c);
}

// Assembly:
imull $0x5e, %edi, %eax
addl %esi, %eax
movslq %eax, %rcx
movabsq $0x342da7f2f4960343, %rdx # imm = 0x342DA7F2F4960343
movq %rcx, %rax
mulq %rdx
shrq $0x5, %rdx
imulq $0x9d, %rdx, %rax
subq %rax, %rcx
leal 0x22(%rcx), %esi
cmpq $0x40, %rcx
cmovbl %ecx, %esi
leal 0x28(%rdx), %edi
jmp 0x65f8
// File: /workspace/github_c_makefile_star2_O1/mloar[P]charset/iso2022.c
// Function: designate
static void designate(charset_state *state, int container,
		      int type, int ibyte, int fbyte)
{
    unsigned long i;

    assert(container >= 0 && container <= 3);
    assert(type == S4 || type == S6 || type == M4 || type == M6);

    for (i = 0; i < lenof(iso2022_subcharsets); i++) {
	if (iso2022_subcharsets[i].type == type &&
	    iso2022_subcharsets[i].i == ibyte &&
	    iso2022_subcharsets[i].f == fbyte) {
	    state->s1 &= ~(0x7fL << (container * 7));
	    state->s1 |= (i << (container * 7));
	    return;
	}
    }
    /*
     * If we don't find the charset, invoke the empty one, so we
     * output ERROR rather than garbage.
     */
    designate(state, container, type, 0, '~');
}

// Assembly:
pushq %rax
leaq 0x9f016(%rip), %rax     # 0xa7292
cmpl $0x4, %esi
jae 0x82e4
cmpl $0x3, %edx
ja 0x8303
movq %rax, %r10
xorl %r9d, %r9d
movsbl -0x2(%r10), %r11d
cmpl %edx, %r11d
jne 0x82a9
movsbl -0x1(%r10), %r11d
cmpl %ecx, %r11d
jne 0x82a9
movsbl (%r10), %r11d
cmpl %r8d, %r11d
je 0x82c0
incq %r9
addq $0x28, %r10
cmpq $0x26, %r9
jne 0x828c
movl $0x7e, %r8d
xorl %ecx, %ecx
jmp 0x827c
leal (,%rsi,8), %ecx
subl %esi, %ecx
movl $0x7f, %eax
shlq %cl, %rax
notq %rax
shlq %cl, %r9
andq 0x8(%rdi), %rax
orq %rax, %r9
movq %r9, 0x8(%rdi)
popq %rax
retq
leaq 0x5475d(%rip), %rdi     # 0x5ca48
leaq 0x54717(%rip), %rsi     # 0x5ca09
leaq 0x54770(%rip), %rcx     # 0x5ca69
movl $0x149, %edx            # imm = 0x149
callq 0x6060
leaq 0x54793(%rip), %rdi     # 0x5ca9d
leaq 0x546f8(%rip), %rsi     # 0x5ca09
leaq 0x54751(%rip), %rcx     # 0x5ca69
movl $0x14a, %edx            # imm = 0x14A
callq 0x6060