LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_09/scdu.c
// Function: main
int main(int argc, char *argv[ ])
{
	bool do_decrypt = false;
	int errflg = 0;
	char *module = NULL, *text;
	func_t crypt, decrypt;
	int c, n;

	/* Parse the command line */
	while ((c = getopt(argc, argv, ":hdf:")) != -1) {
		switch(c) {
		case 'h':
			usage(argv[0], EXIT_SUCCESS);

		case 'd':
			do_decrypt = true;
			break;

		case 'f':
			module = optarg;
			break;

		case ':':       /* missing operand? */
			fprintf(stderr,
				"option -%c requires an operand\n",
				optopt);
			errflg++;
			break;

		case '?':	/* invalid option? */
			fprintf(stderr,
				"unrecognized option: '-%c'\n",

				optopt);
			errflg++;
		}
	}
	if (errflg)
		usage(argv[0], EXIT_FAILURE);
	if (optind == argc) {
		fprintf(stderr, "no input text\n");
		exit(EXIT_FAILURE);
	}
	text = argv[optind];

	/* Load standard or external function within a module */
	load_funcs(module, &crypt, &decrypt);

	/* Do the job */
	n = strlen(text);
	if (do_decrypt)
		decrypt(text, n);
	else
		crypt(text, n);

	/* Print the result */
	printf("%*s\n", n, text);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorl %r13d, %r13d
leaq 0xd54(%rip), %r15       # 0x20a2
xorl %r14d, %r14d
xorl %r12d, %r12d
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1080
cmpl $-0x1, %eax
je 0x13da
cmpl $0x64, %eax
je 0x1390
cmpl $0x66, %eax
je 0x1384
cmpl $0x3a, %eax
je 0x13b1
cmpl $0x3f, %eax
je 0x1395
cmpl $0x68, %eax
jne 0x1354
jmp 0x144a
movq 0x2c45(%rip), %rax      # 0x3fd0
movq (%rax), %r14
jmp 0x1354
movb $0x1, %r13b
jmp 0x1354
movq 0x2c5c(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x2c3a(%rip), %rax      # 0x3fe0
movl (%rax), %edx
leaq 0xd19(%rip), %rsi       # 0x20c8
jmp 0x13cb
movq 0x2c40(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x2c1e(%rip), %rax      # 0x3fe0
movl (%rax), %edx
leaq 0xcdd(%rip), %rsi       # 0x20a8
xorl %eax, %eax
callq 0x1070
incl %r12d
jmp 0x1354
testl %r12d, %r12d
jne 0x1454
movq 0x2be2(%rip), %rax      # 0x3fc8
movslq (%rax), %rax
cmpl %ebp, %eax
je 0x145f
movq (%rbx,%rax,8), %rbx
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x123c
movq %rbx, %rdi
callq 0x1040
movslq %eax, %r14
testb $0x1, %r13b
cmovneq %r12, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq *(%r15)
leaq 0xcc7(%rip), %rdi       # 0x20f3
movl %r14d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x130c
movq (%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x130c
movq 0x2b92(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xc74(%rip), %rdi       # 0x20e4
pushq $0xe
popq %rsi
pushq $0x1
popq %rdx
callq 0x10b0
pushq $0x1
popq %rdi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: read_minidump_header
int read_minidump_header(struct minidump_header_t *minidump_header, FILE *in)
{
  read_chars(in, minidump_header->magic1, 4);
  read_chars_bin(in, minidump_header->magic2, 2);
  minidump_header->version = read_uint16(in);
  minidump_header->num_streams = read_uint32(in);
  minidump_header->ofs_streams = read_uint32(in);
  minidump_header->checksum = read_uint32(in);
  minidump_header->timestamp = read_uint32(in);
  minidump_header->flags = read_uint64(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x4
popq %rdx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x17ce
leaq 0x4(%rbx), %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x1810
movq %r14, %rdi
callq 0x17a8
movw %ax, 0x6(%rbx)
movq %r14, %rdi
callq 0x1766
movl %eax, 0x8(%rbx)
movq %r14, %rdi
callq 0x1766
movl %eax, 0xc(%rbx)
movq %r14, %rdi
callq 0x1766
movl %eax, 0x10(%rbx)
movq %r14, %rdi
callq 0x1766
movl %eax, 0x14(%rbx)
movq %r14, %rdi
callq 0x16cc
movq %rax, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: read_minidump_dir
int read_minidump_dir(struct minidump_dir_t *minidump_dir, FILE *in)
{
  minidump_dir->stream_type = read_uint32(in);
  minidump_dir->len_data = read_uint32(in);
  minidump_dir->ofs_data = read_uint32(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1766
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x1766
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x1766
movl %eax, 0x8(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_header
void print_minidump_header(struct minidump_header_t *minidump_header)
{
  printf(" -------- MiniDump header -------\n");
  printf("     magic1: %.4s\n", minidump_header->magic1);
  printf("     magic2: 0x%02x 0x%02x\n", minidump_header->magic2[0],
                                         minidump_header->magic2[1]);
  printf("    version: %d\n", minidump_header->version);
  printf("num_streams: %d\n", minidump_header->num_streams);
  printf("ofs_streams: %d\n", minidump_header->ofs_streams);
  printf("   checksum: %d\n", minidump_header->checksum);
  printf("  timestamp: %d\n", minidump_header->timestamp);
  printf("      flags: 0x%lx\n", minidump_header->flags);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3af0(%rip), %rdi      # 0x55aa
callq 0x1040
leaq 0x2852(%rip), %rdi      # 0x4318
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1060
movzbl 0x4(%rbx), %esi
movzbl 0x5(%rbx), %edx
leaq 0x284c(%rip), %rdi      # 0x432b
xorl %eax, %eax
callq 0x1060
movzwl 0x6(%rbx), %esi
leaq 0x2856(%rip), %rdi      # 0x4347
xorl %eax, %eax
callq 0x1060
movl 0x8(%rbx), %esi
leaq 0x2856(%rip), %rdi      # 0x4358
xorl %eax, %eax
callq 0x1060
movl 0xc(%rbx), %esi
leaq 0x2856(%rip), %rdi      # 0x4369
xorl %eax, %eax
callq 0x1060
movl 0x10(%rbx), %esi
leaq 0x2856(%rip), %rdi      # 0x437a
xorl %eax, %eax
callq 0x1060
movl 0x14(%rbx), %esi
leaq 0x2856(%rip), %rdi      # 0x438b
xorl %eax, %eax
callq 0x1060
movq 0x18(%rbx), %rsi
leaq 0x2855(%rip), %rdi      # 0x439c
xorl %eax, %eax
popq %rbx
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_dir
void print_minidump_dir(struct minidump_dir_t *minidump_dir, int index)
{
  printf(" -------- MiniDump dir %d -------\n", index);
  printf("stream_type: %d (%s)\n",
    minidump_dir->stream_type,
    get_minidump_stream_type(minidump_dir->stream_type));
  printf("   len_data: %u\n", minidump_dir->len_data);
  printf("   ofs_data: %u\n", minidump_dir->ofs_data);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2854(%rip), %rdi      # 0x43b0
xorl %eax, %eax
callq 0x1060
movl (%rbx), %ebp
movl %ebp, %edi
callq 0x32e8
leaq 0x2860(%rip), %rdi      # 0x43d3
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1060
movl 0x4(%rbx), %esi
leaq 0x2860(%rip), %rdi      # 0x43e9
xorl %eax, %eax
callq 0x1060
movl 0x8(%rbx), %esi
leaq 0x2860(%rip), %rdi      # 0x43fa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_string
static void print_minidump_string(FILE *in, uint32_t offset)
{
  uint32_t n;

  if (offset == 0)
  {
    printf("length=0\n");
    return;
  }

  long marker = ftell(in);
  fseek(in, offset, SEEK_SET);

  uint32_t length = read_uint32(in);

  printf(",length=%d\n", length);

  for (n = 0; n < length; n += 2)
  {
    uint16_t c = read_uint16(in);

    putchar(c);
  }

  fseek(in, marker, SEEK_SET);

  printf("\n");
}

// Assembly:
testl %esi, %esi
je 0x29cc
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1090
movq %rax, %r14
movl %ebp, %esi
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10b0
movq %rbx, %rdi
callq 0x1766
movl %eax, %ebp
leaq 0x2ac1(%rip), %rdi      # 0x544a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
cmpl %ebp, %r15d
jae 0x29ad
movq %rbx, %rdi
callq 0x17a8
movzwl %ax, %edi
callq 0x1030
addl $0x2, %r15d
jmp 0x2992
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x10b0
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
leaq 0x2c60(%rip), %rdi      # 0x5633
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_memory_list
void print_minidump_memory_list(FILE *in)
{
  uint32_t number_of_memory_ranges = read_uint32(in);
  uint64_t start_of_memory_range = read_uint64(in);
  uint32_t data_size = read_uint32(in);
  uint64_t relative_virtual_address = read_uint64(in);

  printf("   number_of_memory_ranges: %u\n", number_of_memory_ranges);
  printf("     start_of_memory_range: 0x%lx\n", start_of_memory_range);
  printf("                 data_size: %d\n", data_size);
  printf("  relative_virtual_address: 0x%lx\n", relative_virtual_address);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1766
movl %eax, %ebp
movq %rbx, %rdi
callq 0x16cc
movq %rax, %r14
movq %rbx, %rdi
callq 0x1766
movl %eax, %r15d
movq %rbx, %rdi
callq 0x16cc
movq %rax, %rbx
leaq 0x1b98(%rip), %rdi      # 0x45a9
movl %ebp, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x1ba8(%rip), %rdi      # 0x45c9
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x1bba(%rip), %rdi      # 0x45ec
movl %r15d, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x1bc9(%rip), %rdi      # 0x460c
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_exception
void print_minidump_exception(FILE *in)
{
  uint32_t n;

  printf("         thread_id: %d\n", read_uint32(in));
  printf("            unused: %d\n", read_uint32(in));
  printf("    exception_code: 0x%08x\n", read_uint32(in));
  printf("   exception_flags: 0x%08x\n", read_uint32(in));
  printf("  exception_record: 0x%" PRIx64 "\n", read_uint64(in));
  printf(" exception_address: 0x%" PRIx64 "\n", read_uint64(in));

  uint32_t number_parameters = read_uint32(in);
  printf("  number_paramters: %d\n", number_parameters);
  printf("            unused: %d\n", read_uint32(in));
  printf("       information:\n");

  for (n = 0; n < number_parameters; n++)
  {
    printf("      ---- %d ----\n", n);
    printf("            thread_id: %d\n", read_uint32(in));
    printf("    excpetion_pointer: %d\n", read_uint32(in));
    printf("      client_pointers: %d\n", read_uint32(in));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1766
leaq 0x1bd6(%rip), %rdi      # 0x480f
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1b09(%rip), %r14      # 0x475a
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1b06(%rip), %rdi      # 0x4772
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1b0a(%rip), %rdi      # 0x478e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16cc
leaq 0x1b0e(%rip), %rdi      # 0x47aa
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16cc
leaq 0x1b10(%rip), %rdi      # 0x47c5
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movl %eax, %ebp
leaq 0x1b10(%rip), %rdi      # 0x47e0
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x2966(%rip), %rdi      # 0x565a
callq 0x1040
leaq 0x1b0c(%rip), %r15      # 0x480c
leaq 0x1b20(%rip), %r12      # 0x4827
leaq 0x1b34(%rip), %r13      # 0x4842
xorl %r14d, %r14d
cmpl %r14d, %ebp
je 0x2d68
leaq 0x1adb(%rip), %rdi      # 0x47f8
movl %r14d, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movq %r15, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movq %r12, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
incl %r14d
jmp 0x2d11
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_system_info
void print_minidump_system_info(FILE *in)
{
  uint16_t cpu_arch = read_uint16(in);
  const char *cpu_arch_str = "???";

  switch (cpu_arch)
  {
    case 9: cpu_arch_str = "x64"; break;
    case 5: cpu_arch_str = "ARM"; break;
    case 6: cpu_arch_str = "Itanium"; break;
    case 0: cpu_arch_str = "x86"; break;
    case 0xffff: cpu_arch_str = "Unknown"; break;
  }

  printf("\n");
  printf("         cpu_arch: %u (%s)\n", cpu_arch, cpu_arch_str);
  printf("        cpu_level: %u\n", read_uint16(in));
  printf("     cpu_revision: %u\n", read_uint16(in));
  printf("         num_cpus: %u\n", read_uint8(in));
  printf("          os_type: %u\n", read_uint8(in));
  printf("     os_ver_major: %u\n", read_uint32(in));
  printf("     os_ver_minor: %u\n", read_uint32(in));
  printf("         os_build: %u\n", read_uint32(in));
  printf("      os_platform: %u\n", read_uint32(in));

  uint32_t ofs_service_pack = read_uint32(in);

  printf(" ofs_service_pack: %u", ofs_service_pack);
  print_minidump_string(in, ofs_service_pack);

  printf("    os_suite_mask: %u\n", read_uint16(in));
  printf("        reserved2: %u\n", read_uint16(in));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x17a8
movl %eax, %ecx
incl %ecx
cmpw $0xa, %cx
ja 0x2da0
movzwl %cx, %ecx
leaq 0x28d9(%rip), %rdx      # 0x5670
movslq (%rdx,%rcx,4), %r14
addq %rdx, %r14
jmp 0x2da7
leaq 0x1ab6(%rip), %r14      # 0x485d
movzwl %ax, %ebp
pushq $0xa
popq %rdi
callq 0x1030
leaq 0x1ac4(%rip), %rdi      # 0x487d
movl %ebp, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17a8
leaq 0x1ac5(%rip), %rdi      # 0x4899
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17a8
leaq 0x1ac4(%rip), %rdi      # 0x48b0
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17c9
leaq 0x1ac3(%rip), %rdi      # 0x48c7
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17c9
leaq 0x1ac2(%rip), %rdi      # 0x48de
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1ac1(%rip), %rdi      # 0x48f5
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1ac0(%rip), %rdi      # 0x490c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1abf(%rip), %rdi      # 0x4923
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1abe(%rip), %rdi      # 0x493a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movl %eax, %ebp
leaq 0x1abb(%rip), %rdi      # 0x4951
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2951
movq %rbx, %rdi
callq 0x17a8
leaq 0x1aaf(%rip), %rdi      # 0x4967
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17a8
leaq 0x1aae(%rip), %rdi      # 0x497e
movl %eax, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_memory64_list
void print_minidump_memory64_list(FILE *in, struct memory_print_t *memory_print)
{
  uint64_t number_of_memory_ranges = read_uint64(in);
  uint64_t offset = read_uint64(in);
  uint64_t n;

  printf("\n");
  printf("  num_memory_ranges: %" PRId64 "\n", number_of_memory_ranges);
  printf("             offset: 0x%" PRIx64 "\n", offset);

  for (n = 0; n < number_of_memory_ranges; n++)
  {
    uint64_t start = read_uint64(in);
    uint64_t size = read_uint64(in);
    char mark = ' ';

    if (memory_print->start >= start &&
        memory_print->start < start + size)
    {
      memory_print->file_offset = offset + (memory_print->start - start);
      memory_print->region_start = start;
      memory_print->region_end = start + size - 1;
      mark = '*';
    }

    printf("         %c  0x%08" PRIx64 ": size=%" PRId64 "\n", mark, start, size);

    offset += size;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x16cc
movq %rax, %r15
movq %r14, %rdi
callq 0x16cc
movq %rax, %r12
pushq $0xa
popq %rdi
callq 0x1030
leaq 0x1a85(%rip), %rdi      # 0x4995
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x1a8e(%rip), %rdi      # 0x49af
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
subq $0x1, %r15
jb 0x2f91
movq %r14, %rdi
callq 0x16cc
movq %rax, %rbp
movq %r14, %rdi
callq 0x16cc
movq %rax, %r13
movq 0x8(%rbx), %rax
pushq $0x20
popq %rsi
cmpq %rbp, %rax
jb 0x2f78
movq %r13, %rcx
addq %rbp, %rcx
cmpq %rcx, %rax
jae 0x2f78
movq %r12, %rdx
subq %rbp, %rdx
addq %rax, %rdx
movq %rdx, (%rbx)
movq %rbp, 0x20(%rbx)
decq %rcx
movq %rcx, 0x28(%rbx)
pushq $0x2a
popq %rsi
leaq 0x1a4c(%rip), %rdi      # 0x49cb
movq %rbp, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1060
addq %r13, %r12
jmp 0x2f2b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_misc_info
void print_minidump_misc_info(FILE *in)
{
  printf("\n");
  printf("           len_info: %u\n", read_uint32(in));
  printf("             flags1: %u\n", read_uint32(in));
  printf("         process_id: %u\n", read_uint32(in));
  printf("process_create_time: %u\n", read_uint32(in));
  printf("  process_user_time: %u\n", read_uint32(in));
  printf("process_kernel_time: %u\n", read_uint32(in));
  printf("        cpu_max_mhz: %u\n", read_uint32(in));
  printf("        cpu_cur_mhz: %u\n", read_uint32(in));
  printf("      cpu_limit_mhz: %u\n", read_uint32(in));
  printf(" cpu_max_idle_state: %u\n", read_uint32(in));
  printf(" cpu_cur_idle_state: %u\n", read_uint32(in));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0xa
popq %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1766
leaq 0x19d1(%rip), %rdi      # 0x4b6a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d2(%rip), %rdi      # 0x4b83
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d3(%rip), %rdi      # 0x4b9c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d4(%rip), %rdi      # 0x4bb5
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d5(%rip), %rdi      # 0x4bce
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d6(%rip), %rdi      # 0x4be7
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d7(%rip), %rdi      # 0x4c00
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d8(%rip), %rdi      # 0x4c19
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19d9(%rip), %rdi      # 0x4c32
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19da(%rip), %rdi      # 0x4c4b
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19db(%rip), %rdi      # 0x4c64
movl %eax, %esi
xorl %eax, %eax
popq %rbx
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_thread_info_list
void print_minidump_thread_info_list(FILE *in)
{
  printf("\n");
  printf("     size_of_header: %u\n", read_uint32(in));
  printf("      size_of_entry: %u\n", read_uint32(in));
  printf("  number_of_entries: %u\n", read_uint32(in));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0xa
popq %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1766
leaq 0x173d(%rip), %rdi      # 0x49eb
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19b7(%rip), %rdi      # 0x4c7d
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x19b8(%rip), %rdi      # 0x4c96
movl %eax, %esi
xorl %eax, %eax
popq %rbx
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_core_cfuns_ext
void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
    (void) regprefix;
    while (cfuns->name) {
        Janet fun = janet_wrap_cfunction(cfuns->cfun);
        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
        cfuns++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movabsq $-0x1800000000000, %r13 # imm = 0xFFFE800000000000
movabsq $-0x5800000000000, %rbp # imm = 0xFFFA800000000000
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x16ede
movq 0x8(%rbx), %r12
orq %r13, %r12
callq 0x18251
orq %rbp, %rax
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x15f5f
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
movq 0x18(%rbx), %rcx
movl 0x20(%rbx), %r8d
movq %r14, %rdx
callq 0x29984
addq $0x28, %rbx
jmp 0x16e9c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/corelib.c
// Function: janet_core_env
JanetTable *janet_core_env(JanetTable *replacements) {
    /* Memoize core env, ignoring replacements the second time around. */
    if (NULL != janet_vm.core_env) {
        return janet_vm.core_env;
    }

    JanetTable *dict = janet_core_lookup_table(replacements);

    /* Unmarshal bytecode */
    Janet marsh_out = janet_unmarshal(
                          janet_core_image,
                          janet_core_image_size,
                          0,
                          dict,
                          NULL);

    /* Memoize */
    janet_gcroot(marsh_out);
    JanetTable *env = janet_unwrap_table(marsh_out);
    janet_vm.core_env = env;

    /* Invert image dict manually here. We can't do this in boot.janet as it
     * breaks deterministic builds */
    Janet lidv, midv;
    lidv = midv = janet_wrap_nil();
    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
    JanetTable *lid = janet_unwrap_table(lidv);
    JanetTable *mid = janet_unwrap_table(midv);
    for (int32_t i = 0; i < lid->capacity; i++) {
        const JanetKV *kv = lid->data + i;
        if (!janet_checktype(kv->key, JANET_NIL)) {
            janet_table_put(mid, kv->value, kv->key);
        }
    }

    return env;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %fs:0x0, %rax
movq -0x1ad0(%rax), %rcx
testq %rcx, %rcx
jne 0x213aa
leaq -0x1ae0(%rax), %rbx
movabsq $-0x77fffffffffff, %r13 # imm = 0xFFF8800000000001
movq %r14, %rdi
callq 0x213bc
movq 0x9b4bc(%rip), %rdi     # 0xbc798
movq 0x9b4bd(%rip), %rsi     # 0xbc7a0
xorl %ebp, %ebp
xorl %edx, %edx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x214de
movq %rax, %r15
movq %rax, %rdi
callq 0x21583
movabsq $0x7fffffffffff, %r14   # imm = 0x7FFFFFFFFFFF
andq %r14, %r15
movq %r15, 0x10(%rbx)
leaq 0x8(%rsp), %rbx
movq %r13, (%rbx)
leaq 0x10(%rsp), %r12
movq %r13, (%r12)
leaq 0x7a53c(%rip), %rdi     # 0x9b862
callq 0x18251
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x21623
leaq 0x7a532(%rip), %rdi     # 0x9b872
callq 0x18251
movq %r15, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x21623
movq (%r12), %r12
andq %r14, %r12
andq (%rbx), %r14
pushq $0x8
popq %r15
movabsq $-0x800000000000, %rbx  # imm = 0xFFFF800000000000
decq %r13
movslq 0x14(%r12), %rax
cmpq %rax, %rbp
jge 0x213a6
movq 0x20(%r12), %rax
movq -0x8(%rax,%r15), %rdx
movq %rdx, %rcx
andq %rbx, %rcx
cmpq %r13, %rcx
je 0x2139d
movq (%rax,%r15), %rsi
movq %r14, %rdi
callq 0x15f5f
incq %rbp
addq $0x10, %r15
jmp 0x21372
movq (%rsp), %rcx
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/ev.c
// Function: janet_stream_getter
static int janet_stream_getter(void *p, Janet key, Janet *out) {
    JanetStream *stream = (JanetStream *)p;
    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
    const JanetMethod *stream_methods = stream->methods;
    return janet_getmethod(janet_unwrap_keyword(key), stream_methods, out);
}

// Assembly:
movq %rsi, %rax
shrq $0x2f, %rax
cmpl $0x1fff6, %eax          # imm = 0x1FFF6
jne 0x2341d
movq 0x20(%rdi), %rax
movabsq $0x7fffffffffff, %rcx   # imm = 0x7FFFFFFFFFFF
andq %rcx, %rsi
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1b096
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/inttypes.c
// Function: janet_is_int
JanetIntType janet_is_int(Janet x) {
    if (!janet_checktype(x, JANET_ABSTRACT)) return JANET_INT_NONE;
    const JanetAbstractType *at = janet_abstract_type(janet_unwrap_abstract(x));
    return (at == &janet_s64_type) ? JANET_INT_S64 :
           ((at == &janet_u64_type) ? JANET_INT_U64 :
            JANET_INT_NONE);
}

// Assembly:
movq %rdi, %rcx
shrq $0x2f, %rcx
xorl %eax, %eax
cmpl $0x1fffe, %ecx          # imm = 0x1FFFE
jne 0x2b8a5
movabsq $0x7fffffffffff, %rax   # imm = 0x7FFFFFFFFFFF
andq %rax, %rdi
movq -0x10(%rdi), %rax
xorl %ecx, %ecx
cmpq 0x90735(%rip), %rax     # 0xbbfc8
sete %cl
addl %ecx, %ecx
cmpq 0x90731(%rip), %rax     # 0xbbfd0
pushq $0x1
popq %rax
cmovnel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/util.c
// Function: janet_core_def_sm
void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
    (void) sf;
    (void) sl;
    (void) p;
    Janet key = janet_csymbolv(name);
    janet_table_put(env, key, x);
    if (janet_checktype(x, JANET_CFUNCTION)) {
        janet_registry_put(janet_unwrap_cfunction(x), name, NULL, NULL, 0);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x18251
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
orq %rax, %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x15f5f
movq %r14, %rax
shrq $0x2f, %rax
cmpl $0x1fffd, %eax          # imm = 0x1FFFD
jne 0x2cc96
movabsq $0x7fffffffffff, %rax   # imm = 0x7FFFFFFFFFFF
andq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x29984
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/specials.c
// Function: janetc_unquote
static JanetSlot janetc_unquote(JanetFopts opts, int32_t argn, const Janet *argv) {
    (void) argn;
    (void) argv;
    janetc_cerror(opts.compiler, "cannot use unquote here");
    return janetc_cslot(janet_wrap_nil());
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rsp), %rdi
leaq 0x57c4b(%rip), %rsi     # 0xa0019
callq 0x1c278
orl $-0x1, 0x8(%rbx)
movabsq $-0x77fffffffffff, %rax # imm = 0xFFF8800000000001
movq %rax, (%rbx)
movabsq $0x10002ffffffff, %rax  # imm = 0x10002FFFFFFFF
movq %rax, 0xc(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: janet_line_getter
Janet janet_line_getter(int32_t argc, Janet *argv) {
    janet_arity(argc, 0, 3);
    const char *str = (argc >= 1) ? (const char *) janet_getstring(argv, 0) : "";
    JanetBuffer *buf = (argc >= 2) ? janet_getbuffer(argv, 1) : janet_buffer(10);
    gbl_complete_env = (argc >= 3) ? janet_gettable(argv, 2) : NULL;
    janet_line_get(str, buf);
    gbl_complete_env = NULL;

    Janet result;
    if (gbl_cancel_current_repl_form) {
        gbl_cancel_current_repl_form = 0;

        /* Signal that the user bailed out of the current form */
        result = janet_ckeywordv("cancel");
    } else {
        result = janet_wrap_buffer(buf);
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %ebp
pushq $0x3
popq %rdx
xorl %esi, %esi
callq 0x16513
testl %ebp, %ebp
jle 0x4a6bb
movq %r15, %rdi
xorl %esi, %esi
callq 0x19e5e
movq %rax, %rbx
cmpl $0x1, %ebp
je 0x4a6c2
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x192ba
movq %rax, %r14
cmpl $0x3, %ebp
jb 0x4a6cd
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0x1b194
movq %rax, %r15
jmp 0x4a6d0
leaq 0x55e86(%rip), %rbx     # 0xa0548
pushq $0xa
popq %rdi
callq 0x18d96
movq %rax, %r14
xorl %r15d, %r15d
movq %fs:0x0, %rax
movq %rax, %r12
movq %rax, %r13
movq %r15, -0x1790(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a760
andq $0x0, -0x1790(%r13)
movq %r12, %rax
cmpl $0x0, -0x1788(%r12)
je 0x4a740
leaq -0x1788(%rax), %rax
andl $0x0, (%rax)
leaq 0x55c8e(%rip), %rdi     # 0xa03a9
callq 0x18251
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1824a
movabsq $-0x2800000000000, %rsi # imm = 0xFFFD800000000000
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16065
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: janet_line_deinit
void janet_line_deinit() {
    int i;
    norawmode();
    for (i = 0; i < gbl_history_count; i++)
        janet_free(gbl_history[i]);
    gbl_historyi = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x4b9fd
movq %fs:0x0, %rax
movq %rax, %rbx
movslq -0x1784(%rax), %r14
leaq -0x1780(%rax), %r15
xorl %r12d, %r12d
cmpq %r14, %r12
jge 0x4b9ea
movq (%r15,%r12,8), %rdi
callq 0x150b0
incq %r12
jmp 0x4b9d7
andl $0x0, -0x1460(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: rawmode
static int rawmode(void) {
    struct termios t;
    if (!isatty(STDIN_FILENO)) goto fatal;
    if (tcgetattr(STDIN_FILENO, &gbl_termios_start) == -1) goto fatal;
    t = gbl_termios_start;
    t.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
    t.c_cflag |= (CS8);
    t.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
    t.c_cc[VMIN] = 1;
    t.c_cc[VTIME] = 0;
    if (tcsetattr(STDIN_FILENO, TCSADRAIN, &t) < 0) goto fatal;
    gbl_israwmode = 1;
    return 0;
fatal:
    errno = ENOTTY;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
xorl %edi, %edi
callq 0x151c0
testl %eax, %eax
je 0x4bc86
movq %fs:0x0, %rax
movq %rax, %rbx
leaq -0x104c(%rax), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x15980
cmpl $-0x1, %eax
je 0x4bc86
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups 0x2c(%r14), %xmm3
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movups %xmm3, 0x2c(%rdx)
andl $0xfffffacd, (%rdx)     # imm = 0xFFFFFACD
movaps %xmm2, 0x20(%rdx)
orb $0x30, 0x8(%rdx)
andl $0xffff7ff4, 0xc(%rdx)  # imm = 0xFFFF7FF4
movw $0x100, 0x16(%rdx)      # imm = 0x100
xorl %ebp, %ebp
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x15990
testl %eax, %eax
js 0x4bc86
movl $0x1, -0x1050(%rbx)
jmp 0x4bc94
callq 0x15120
movl $0x19, (%rax)
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: getcols
static int getcols(void) {
#ifdef _WIN32
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
    return (int)(csbi.srWindow.Right - csbi.srWindow.Left + 1);
#else
    struct winsize ws;
    if (ioctl(1, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) {
        int start, cols;
        start = curpos();
        if (start == -1) goto failed;
        if (write_console("\x1b[999C", 6) != 6) goto failed;
        cols = curpos();
        if (cols == -1) goto failed;
        if (cols > start) {
            char seq[32];
            snprintf(seq, 32, "\x1b[%dD", cols - start);
            if (write_console(seq, strlen(seq)) == -1) {
                exit(1);
            }
        }
        return cols;
    } else {
        return ws.ws_col;
    }
failed:
    return 80;
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
pushq $0x1
popq %rdi
leaq 0x8(%rsp), %rbx
movl $0x5413, %esi           # imm = 0x5413
movq %rbx, %rdx
xorl %eax, %eax
callq 0x15410
cmpl $-0x1, %eax
sete %cl
movzwl 0x2(%rbx), %eax
testw %ax, %ax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x4bd43
callq 0x4c3dd
pushq $0x50
popq %rbp
cmpl $-0x1, %eax
je 0x4bd46
movl %eax, %r14d
leaq 0x5481b(%rip), %rdi     # 0xa0507
pushq $0x6
popq %rsi
callq 0x4bd59
cmpq $0x6, %rax
jne 0x4bd46
callq 0x4c3dd
cmpl $-0x1, %eax
je 0x4bd46
movl %eax, %ebx
movl %eax, %ecx
subl %r14d, %ecx
jle 0x4bd3f
leaq 0x547fa(%rip), %rdx     # 0xa050e
leaq 0x10(%rsp), %r14
pushq $0x20
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x15390
movq %r14, %rdi
callq 0x15310
movq %r14, %rdi
movq %rax, %rsi
callq 0x4bd59
cmpq $-0x1, %rax
je 0x4bd51
movl %ebx, %ebp
jmp 0x4bd46
movzwl %ax, %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x15aa0
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: insert
static int insert(char c, int draw) {
    if (gbl_len < JANET_LINE_MAX - 1) {
        if (gbl_len == gbl_pos) {
            gbl_buf[gbl_pos++] = c;
            gbl_buf[++gbl_len] = '\0';
            if (draw) {
                if (gbl_plen + gbl_len < gbl_cols) {
                    /* Avoid a full update of the line in the
                     * trivial case. */
                    if (write_console(&c, 1) == -1) return -1;
                } else {
                    refresh();
                }
            }
        } else {
            memmove(gbl_buf + gbl_pos + 1, gbl_buf + gbl_pos, gbl_len - gbl_pos);
            gbl_buf[gbl_pos++] = c;
            gbl_buf[++gbl_len] = '\0';
            if (draw) refresh();
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movl %edi, %ebp
movb %bpl, 0xb(%rsp)
movq %fs:0x0, %rax
movslq -0x145c(%rax), %r15
cmpq $0x3fe, %r15            # imm = 0x3FE
jg 0x4be59
leaq -0x145c(%rax), %rsi
leaq -0x1010(%rax), %r12
movslq (%r12), %rbx
leaq -0x1450(%rax), %r13
cmpl %ebx, %r15d
jne 0x4be0a
leaq 0x1(%r15), %rdx
movl %edx, (%r12)
movb %bpl, (%r13,%r15)
movl %edx, (%rsi)
movb $0x0, 0x1(%r13,%r15)
testl %r14d, %r14d
je 0x4be59
addl -0x1aec(%rax), %edx
cmpl -0x1af0(%rax), %edx
jge 0x4be54
leaq 0xb(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x4bd59
cmpq $-0x1, %rax
jne 0x4be59
pushq $-0x1
popq %rax
jmp 0x4be5b
movq %rsi, 0x10(%rsp)
leaq (%rbx,%r13), %rsi
movl %r14d, 0xc(%rsp)
leaq (%rbx,%r13), %r14
incq %r14
movl %r15d, %eax
subl %ebx, %eax
movslq %eax, %rdx
movq %r14, %rdi
callq 0x15950
leal 0x1(%rbx), %eax
movl %eax, (%r12)
movb %bpl, -0x1(%r14)
movq %r15, %rax
incq %rax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movb $0x0, 0x1(%r13,%r15)
cmpl $0x0, 0xc(%rsp)
je 0x4be59
callq 0x4be6a
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: refresh
static void refresh(void) {
    char seq[64];
    JanetBuffer b;

    /* Keep cursor position on screen */
    char *_buf = gbl_buf;
    int _len = gbl_len;
    int _pos = gbl_pos;
    while ((gbl_plen + _pos) >= gbl_cols) {
        _buf++;
        _len--;
        _pos--;
    }
    while ((gbl_plen + _len) > gbl_cols) {
        _len--;
    }

    janet_buffer_init(&b, 0);
    /* Cursor to left edge, gbl_prompt and buffer */
    janet_buffer_push_u8(&b, '\r');
    janet_buffer_push_cstring(&b, gbl_prompt);
    janet_buffer_push_bytes(&b, (uint8_t *) _buf, _len);
    /* Erase to right */
    janet_buffer_push_cstring(&b, "\x1b[0K");
    /* Move cursor to original position. */
    snprintf(seq, 64, "\r\x1b[%dC", (int)(_pos + gbl_plen));
    janet_buffer_push_cstring(&b, seq);
    if (write_console((char *) b.data, b.count) == -1) {
        exit(1);
    }
    janet_buffer_deinit(&b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %fs:0x0, %rax
movq %rax, %r14
leaq -0x1450(%rax), %rbx
movq %rax, %rcx
movl -0x1010(%rax), %esi
leaq -0x1aec(%rax), %r12
movl (%r12), %edx
movl -0x1af0(%rax), %eax
movl -0x145c(%rcx), %ebp
addl %edx, %ebp
movl %esi, %r13d
negl %r13d
addl %edx, %esi
cmpl %eax, %esi
jl 0x4bec8
incq %rbx
decl %ebp
incl %r13d
decl %esi
jmp 0x4beb8
cmpl %ebp, %eax
cmovll %eax, %ebp
subl %edx, %ebp
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x18cb1
pushq $0xd
popq %rsi
movq %r15, %rdi
callq 0x18fe8
movq -0x1af8(%r14), %rsi
movq %r15, %rdi
callq 0x18f85
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x18fab
leaq 0x54615(%rip), %rsi     # 0xa051f
movq %r15, %rdi
callq 0x18f85
movl (%r12), %ecx
subl %r13d, %ecx
leaq 0x54604(%rip), %rdx     # 0xa0524
leaq 0x20(%rsp), %rbx
pushq $0x40
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x15390
movq %r15, %rdi
movq %rbx, %rsi
callq 0x18f85
movq 0x18(%r15), %rdi
movslq 0x10(%r15), %rsi
callq 0x4bd59
cmpq $-0x1, %rax
je 0x4bf67
movq %rsp, %rdi
callq 0x18d86
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x15aa0
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: clearlines
static void clearlines(void) {
    for (int i = 0; i < gbl_lines_below; i++) {
        fprintf(stderr, "\x1b[1B\x1b[999D\x1b[K");
    }
    if (gbl_lines_below) {
        fprintf(stderr, "\x1b[%dA\x1b[999D", gbl_lines_below);
        fflush(stderr);
        gbl_lines_below = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %fs:0x0, %rax
leaq -0x100c(%rax), %r12
xorl %ebp, %ebp
movq 0x70030(%rip), %r13     # 0xbbff0
leaq 0x54564(%rip), %rbx     # 0xa052b
pushq $0xd
popq %r14
pushq $0x1
popq %r15
movl (%r12), %edx
cmpl %edx, %ebp
jge 0x4bfed
movq (%r13), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x15ac0
incl %ebp
jmp 0x4bfcf
testl %edx, %edx
jne 0x4c000
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rdi
leaq 0x5452e(%rip), %rsi     # 0xa0539
xorl %eax, %eax
callq 0x15600
movq (%r13), %rdi
callq 0x15790
andl $0x0, (%r12)
jmp 0x4bff1
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: kdelete
static void kdelete(int draw) {
    if (gbl_pos != gbl_len) {
        memmove(gbl_buf + gbl_pos, gbl_buf + gbl_pos + 1, gbl_len - gbl_pos);
        gbl_buf[--gbl_len] = '\0';
        if (draw) refresh();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq %fs:0x0, %rax
movslq -0x1010(%rax), %rdx
movslq -0x145c(%rax), %r15
cmpl %edx, %r15d
je 0x4c09d
leaq -0x145c(%rax), %r12
movq %rax, %r14
leaq (%rax,%rdx), %rdi
addq $-0x1450, %rdi          # imm = 0xEBB0
leaq (%rax,%rdx), %rsi
addq $-0x144f, %rsi          # imm = 0xEBB1
movl %r15d, %eax
subl %edx, %eax
movslq %eax, %rdx
callq 0x15950
leaq -0x1(%r15), %rax
movl %eax, (%r12)
movb $0x0, -0x1451(%r14,%r15)
testl %ebx, %ebx
je 0x4c09d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4be6a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: kbackspace
static void kbackspace(int draw) {
    if (gbl_pos > 0) {
        memmove(gbl_buf + gbl_pos - 1, gbl_buf + gbl_pos, gbl_len - gbl_pos);
        gbl_pos--;
        gbl_buf[--gbl_len] = '\0';
        if (draw) refresh();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq %fs:0x0, %rax
movslq -0x1010(%rax), %r12
testq %r12, %r12
jle 0x4c162
leaq -0x1010(%rax), %r13
movq %rax, %r14
leaq (%rax,%r12), %rsi
addq $-0x1450, %rsi          # imm = 0xEBB0
leaq -0x1451(%rax,%r12), %rdi
movq %rax, %r15
movslq -0x145c(%rax), %rbp
movq %rbp, %rdx
subq %r12, %rdx
callq 0x15950
leal -0x1(%r12), %eax
movl %eax, (%r13)
leaq -0x1(%rbp), %rax
movl %eax, -0x145c(%r15)
movb $0x0, -0x1451(%r14,%rbp)
testl %ebx, %ebx
je 0x4c162
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4be6a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: historymove
static void historymove(int delta) {
    if (gbl_history_count > 1) {
        janet_free(gbl_history[gbl_historyi]);
        gbl_history[gbl_historyi] = sdup(gbl_buf);

        gbl_historyi += delta;
        if (gbl_historyi < 0) {
            gbl_historyi = 0;
        } else if (gbl_historyi >= gbl_history_count) {
            gbl_historyi = gbl_history_count - 1;
        }
        strncpy(gbl_buf, gbl_history[gbl_historyi], JANET_LINE_MAX - 1);
        gbl_pos = gbl_len = (int) strlen(gbl_buf);
        gbl_buf[gbl_len] = '\0';

        refresh();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
movq %fs:0x0, %rax
cmpl $0x2, -0x1784(%rax)
jl 0x4c1fe
movq %rax, %rbx
movq %rax, %r12
movq %rax, %r13
leaq -0x1780(%rax), %rax
movq %rax, (%rsp)
movq %rbx, %rax
movq %rax, %r15
movslq -0x1460(%rax), %rax
movq -0x1780(%r13,%rax,8), %rdi
callq 0x150b0
leaq -0x1450(%rbx), %r14
movq %r14, %rdi
callq 0x4c47a
movslq -0x1460(%r15), %rcx
movq %rax, -0x1780(%r13,%rcx,8)
addl %ecx, %ebp
movl %ebp, -0x1460(%r15)
js 0x4c20d
leaq -0x1784(%r12), %rax
movl (%rax), %eax
cmpl %eax, %ebp
jl 0x4c218
decl %eax
movl %eax, %ebp
jmp 0x4c20f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
leaq -0x1460(%r15), %rax
movl %ebp, (%rax)
movslq %ebp, %rax
movq (%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rdi
callq 0x15150
movq %r14, %rdi
callq 0x15310
movq %rax, %rcx
movl %ecx, -0x145c(%rbx)
movl %ecx, -0x1010(%rbx)
movslq %ecx, %rax
movb $0x0, (%r14,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4be6a
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: kbackspacew
static void kbackspacew(void) {
    while (gbl_pos && isspace(gbl_buf[gbl_pos - 1])) {
        kbackspace(0);
    }
    while (gbl_pos && !isspace(gbl_buf[gbl_pos - 1])) {
        kbackspace(0);
    }
    refresh();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %fs:0x0, %rax
leaq -0x1010(%rax), %rbx
leaq -0x1450(%rax), %r14
movslq (%rbx), %r15
testq %r15, %r15
je 0x4c2c9
callq 0x15c60
movq (%rax), %rax
movsbq -0x1(%r15,%r14), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4c2c9
xorl %edi, %edi
callq 0x4c0d7
jmp 0x4c281
callq 0x15c60
movq (%rax), %rax
movslq %r15d, %rcx
movsbq -0x1(%rcx,%r14), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x4c2ce
xorl %edi, %edi
callq 0x4c0d7
movl (%rbx), %r15d
testl %r15d, %r15d
jne 0x4c2a7
popq %rbx
popq %r14
popq %r15
jmp 0x4be6a
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: krightw
static void krightw(void) {
    while (gbl_pos != gbl_len && isspace(gbl_buf[gbl_pos])) {
        gbl_pos++;
    }
    while (gbl_pos != gbl_len && !isspace(gbl_buf[gbl_pos])) {
        gbl_pos++;
    }
    refresh();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %fs:0x0, %rax
leaq -0x1010(%rax), %rbx
movslq -0x145c(%rax), %r14
movslq (%rbx), %r12
leaq -0x1450(%rax), %r15
cmpq %r12, %r14
je 0x4c32c
callq 0x15c60
movq (%rax), %rax
movsbq (%r15,%r12), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4c32c
leal 0x1(%r12), %eax
incq %r12
movl %eax, (%rbx)
jmp 0x4c307
movslq %r12d, %r13
leal 0x1(%r12), %ebp
cmpq %r13, %r14
je 0x4c356
callq 0x15c60
movq (%rax), %rax
movsbq (%r15,%r13), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x4c356
incq %r13
movl %ebp, (%rbx)
incl %ebp
jmp 0x4c334
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4be6a
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: kleftw
static void kleftw(void) {
    while (gbl_pos > 0 && isspace(gbl_buf[gbl_pos - 1])) {
        gbl_pos--;
    }
    while (gbl_pos > 0 && !isspace(gbl_buf[gbl_pos - 1])) {
        gbl_pos--;
    }
    refresh();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %fs:0x0, %rax
leaq -0x1010(%rax), %rbx
movl (%rbx), %r14d
leaq -0x1450(%rax), %r15
testl %r14d, %r14d
jle 0x4c3ce
callq 0x15c60
movq (%rax), %rax
leal -0x1(%r14), %ecx
movsbq (%r15,%rcx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x4c3ce
decq %r14
movl %r14d, (%rbx)
jmp 0x4c38b
callq 0x15c60
movq (%rax), %rax
leal -0x1(%r14), %ecx
movsbq (%r15,%rcx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x4c3d3
decq %r14
movl %r14d, (%rbx)
testl %r14d, %r14d
jg 0x4c3b0
popq %rbx
popq %r14
popq %r15
jmp 0x4be6a
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: curpos
static int curpos(void) {
    char buf[32];
    int cols, rows;
    unsigned int i = 0;
    if (write_console("\x1b[6n", 4) != 4) return -1;
    while (i < sizeof(buf) - 1) {
        if (read_console(buf + i, 1) != 1) break;
        if (buf[i] == 'R') break;
        i++;
    }
    buf[i] = '\0';
    if (buf[0] != 27 || buf[1] != '[') return -1;
    if (sscanf(buf + 2, "%d;%d", &rows, &cols) != 2) return -1;
    return cols;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x54127(%rip), %rdi     # 0xa0514
pushq $0x4
popq %rsi
callq 0x4bd59
pushq $-0x1
popq %rbx
cmpq $0x4, %rax
jne 0x4c46e
xorl %eax, %eax
pushq $0x1
popq %r14
movq %rax, %r15
cmpq $0x1f, %rax
je 0x4c42f
leaq (%rsp,%r15), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x4bd67
cmpq $0x1, %rax
jne 0x4c42f
leaq 0x1(%r15), %rax
cmpb $0x52, 0x10(%rsp,%r15)
jne 0x4c404
movb $0x0, 0x10(%rsp,%r15)
cmpb $0x1b, 0x10(%rsp)
jne 0x4c46e
cmpb $0x5b, 0x11(%rsp)
jne 0x4c46e
leaq 0x12(%rsp), %rdi
leaq 0x540ca(%rip), %rsi     # 0xa0519
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x157c0
cmpl $0x2, %eax
jne 0x4c46b
movl 0x8(%rsp), %ebx
jmp 0x4c46e
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: sdup
static char *sdup(const char *s) {
    size_t len = strlen(s) + 1;
    char *mem = janet_malloc(len);
    if (!mem) {
        return NULL;
    }
    return memcpy(mem, s, len);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x15310
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0x15780
testq %rax, %rax
je 0x4c4ae
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15690
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/build/c/shell.c
// Function: get_symprefix
static JanetByteView get_symprefix(void) {
    /* Calculate current partial symbol. Maybe we could actually hook up the Janet
     * parser here...*/
    int i;
    JanetByteView ret;
    ret.len = 0;
    for (i = gbl_pos - 1; i >= 0; i--) {
        uint8_t c = (uint8_t) gbl_buf[i];
        if (!is_symbol_char_gen(c)) break;
        ret.len++;
    }
    /* Will be const for duration of match checking */
    ret.bytes = (const uint8_t *)(gbl_buf + i + 1);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %fs:0x0, %rax
movl -0x1010(%rax), %r14d
leaq -0x1450(%rax), %r15
movl %r14d, %ebp
sarl $0x1f, %ebp
andl %r14d, %ebp
decl %ebp
movq %r14, %r12
decq %r12
xorl %ecx, %ecx
movq %rcx, %rbx
testl %r14d, %r14d
jle 0x4c5ab
leal (%r12,%rbx), %eax
movzbl (%r15,%rax), %edi
callq 0x4c4b6
decl %r14d
leaq -0x1(%rbx), %rcx
testl %eax, %eax
jne 0x4c588
jmp 0x4c5ae
movl %ebp, %r14d
movslq %r14d, %rax
addq %r15, %rax
incq %rax
negl %ebx
movl %ebx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq