LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/print_lib.c
// Function: print_section
int print_section(FILE *in, uint32_t size)
{
  struct coff_header_t coff_header;
  struct coff_optional_header_t optional_header;
  struct coff_section_header_t section_header;
  long marker = ftell(in);
  int n;

  int result = read_coff_header(in, &coff_header);

  if (result != 0)
  {
    return result;
  }

  print_coff_header(&coff_header);

  if (coff_header.optional_header_size != 0)
  {
    read_coff_optional_header(in, &optional_header);
    print_coff_optional_header(&optional_header);
  }

  for (n = 0; n < coff_header.section_count; n++)
  {
    read_coff_section_header(in, &section_header);
    print_coff_section_header(&section_header);
    print_raw(in, marker + section_header.file_offset_section_data, section_header.size);
  }

#if 0
  long total = ftell(in) - marker;

  if (total != size)
  {
    printf("Error: Bad archive members size %ld vs %d.\n", total, size);
    return -1;
  }
#endif

  fseek(in, marker + size, SEEK_SET);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x10c0
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1365
movl %eax, %r15d
testl %eax, %eax
jne 0x1d9d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1593
cmpw $0x0, 0x18(%r15)
je 0x1d4d
leaq 0x58(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13e1
movq %r15, %rdi
callq 0x162e
movzwl 0x12(%rsp), %r12d
testl %r12d, %r12d
je 0x1d88
leaq 0x28(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1457
movq %r15, %rdi
callq 0x16d8
movl 0x40(%rsp), %edx
movl 0x44(%rsp), %esi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x1b94
decl %r12d
jne 0x1d5d
movl %ebp, %eax
addq %rax, %r14
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x10f0
movl %r15d, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/print_lib.c
// Function: main
int main(int argc, char *argv[])
{
  FILE *in;

  printf("\nprint_lib (March 24, 2023)\n");
  printf("Copyright 2023 - Michael Kohn  http://www.mikekohn.net/\n\n");

  if (argc != 2)
  {
    printf("Usage: print_lib <filename>\n");
    exit(0);
  }

  in = fopen(argv[1], "rb");

  if (in == NULL)
  {
    printf("Could not open input file %s for reading.\n", argv[1]);
    exit(1);
  }

  read_lib(in);

  fclose(in);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3656(%rip), %rdi      # 0x55ae
callq 0x1060
leaq 0x3666(%rip), %rdi      # 0x55ca
callq 0x1060
cmpl $0x2, %ebp
jne 0x1f9d
movq 0x8(%rbx), %rdi
leaq 0x35a3(%rip), %rsi      # 0x551c
callq 0x1100
testq %rax, %rax
je 0x1fb0
movq %rax, %r14
movq %rax, %rdi
callq 0x1db0
movq %r14, %rdi
callq 0x1080
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x365f(%rip), %rdi      # 0x5603
callq 0x1060
xorl %edi, %edi
callq 0x1130
movq 0x8(%rbx), %rsi
leaq 0x3564(%rip), %rdi      # 0x551f
xorl %eax, %eax
callq 0x1090
movl $0x1, %edi
callq 0x1130
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/demangle.c
// Function: demangle
int demangle(const char *name, char *demangled, int length)
{
  if (name[0] != '?')
  {
    snprintf(demangled, length, "%s", name);
    return -1;
  }

  char temp[length];
  char params[length];
  char return_type[length];

  temp[0] = 0;
  params[0] = 0;
  return_type[0] = 0;

  int offset = demangle_name(name + 1, temp, params, return_type, 0, length);
  demangled[length - 1] = 0;
  if (offset < length) { demangled[offset] = 0; }

  snprintf(demangled, length, "%s %s%s", return_type, temp, params);

  return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r8
movq %rdi, %rcx
cmpb $0x3f, (%rdi)
jne 0x2074
movq %rsp, -0x30(%rbp)
movl %r14d, %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
movq %rsp, %r13
subq %rax, %r13
movq %r13, %rsp
xorl %eax, %eax
movb %al, (%r15)
movb %al, (%r12)
movb %al, (%r13)
incq %rcx
movq %rcx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r8, %rbx
movl %r14d, %r8d
callq 0x209e
movq %rbx, %rdi
movl %eax, %ebx
movslq %r14d, %rsi
xorl %eax, %eax
movb %al, -0x1(%rdi,%rsi)
cmpl %r14d, %ebx
jge 0x2057
movslq %ebx, %rax
movb $0x0, (%rdi,%rax)
leaq 0x367e(%rip), %rdx      # 0x56dc
movq %r13, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x10a0
movq -0x30(%rbp), %rsp
jmp 0x208d
movslq %r14d, %rsi
leaq 0x3663(%rip), %rdx      # 0x56e1
movq %r8, %rdi
xorl %eax, %eax
callq 0x10a0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/demangle.c
// Function: demangle_insert_name
static int demangle_insert_name(
  const char *name,
  char *demangled,
  int offset,
  int length)
{
  while (offset < length)
  {
    if (*name == 0 || *name == '@') { break; }

    if (*name == '?')
    {
      switch (name[1])
      {
        case '0': break;
        case '1': demangled[offset++] = '~'; break;
        case '2':
          offset = demangle_append("operator new ", demangled, offset, length);
          break;
        case '3':
          offset = demangle_append("operator delete ", demangled, offset, length);
          break;
        // FIXME: Add the rest of these.
        default: break;
      }

      name += 2;
      continue;
    }

    demangled[offset++] = *name;
    name++;
  }

  if (offset < length) { demangled[offset] = 0; }

  return offset;
}

// Assembly:
movl %edx, %eax
cmpl %ecx, %edx
jge 0x242c
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
leal -0x1(%rcx), %edx
movslq %edx, %r8
leaq 0x3397(%rip), %r9       # 0x56f3
leaq 0x3382(%rip), %r10      # 0x56e5
movzbl (%rdi), %r11d
cmpl $0x3f, %r11d
je 0x239b
movslq %eax, %rbx
testl %r11d, %r11d
je 0x2422
cmpl $0x40, %r11d
je 0x2422
incl %eax
movb %r11b, (%rsi,%rbx)
movl $0x1, %r11d
addq %r11, %rdi
cmpl %ecx, %eax
jl 0x2363
jmp 0x2426
movzbl 0x1(%rdi), %ebx
movl $0x2, %r11d
cmpl $0x33, %ebx
je 0x23ef
cmpl $0x32, %ebx
je 0x23bf
cmpl $0x31, %ebx
jne 0x238f
movslq %eax, %rbx
incl %eax
movb $0x7e, (%rsi,%rbx)
jmp 0x238f
cmpl %eax, %edx
jle 0x238f
movslq %eax, %rbx
incq %rbx
movb $0x6f, %bpl
movq %r10, %r14
movb %bpl, -0x1(%rsi,%rbx)
movb (%r14), %bpl
incl %eax
testb %bpl, %bpl
je 0x238f
leaq 0x1(%rbx), %r15
incq %r14
cmpq %r8, %rbx
movq %r15, %rbx
jl 0x23cf
jmp 0x238f
cmpl %eax, %edx
jle 0x238f
movslq %eax, %rbx
incq %rbx
movb $0x6f, %bpl
movq %r9, %r14
movb %bpl, -0x1(%rsi,%rbx)
movb (%r14), %bpl
incl %eax
testb %bpl, %bpl
je 0x238f
leaq 0x1(%rbx), %r15
incq %r14
cmpq %r8, %rbx
movq %r15, %rbx
jl 0x23ff
jmp 0x238f
movb $0x0, (%rsi,%rbx)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/fileio.c
// Function: read_chars
int read_chars(FILE *in, char *s, int count)
{
  int t;

  for (t = 0; t < count; t++)
  {
    s[t] = getc(in);
  }

  s[t] = 0;

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testl %edx, %edx
jle 0x2560
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1150
movb %al, (%rbx,%r12)
incq %r12
cmpq %r12, %r15
jne 0x254a
jmp 0x2563
xorl %r15d, %r15d
movb $0x0, (%rbx,%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/fileio.c
// Function: read_chars_bin
int read_chars_bin(FILE *in, uint8_t *s, int count)
{
  int t;

  for (t = 0; t < count; t++)
  {
    s[t] = getc(in);
  }

  return 0;
}

// Assembly:
testl %edx, %edx
jle 0x25ad
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1150
movb %al, (%rbx,%r12)
incq %r12
cmpq %r12, %r15
jne 0x258e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/fileio.c
// Function: print_string
int print_string(FILE *in, int addr)
{
  int marker;
  int ch;

  marker = ftell(in);
  fseek(in, addr, SEEK_SET);

  while (1)
  {
    ch = getc(in);
    if (ch == EOF || ch == 0) { break; }

    printf("%c",ch);
  }

  fseek(in, marker, SEEK_SET);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x10c0
movq %rax, %r14
movslq %ebp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10f0
movq %rbx, %rdi
callq 0x1150
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2659
movl %eax, %edi
callq 0x1040
movq %rbx, %rdi
callq 0x1150
movl %eax, %ecx
incl %ecx
cmpl $0x1, %ecx
ja 0x2641
movslq %r14d, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10f0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/pdb.c
// Function: read_pdb_header
int read_pdb_header(struct pdb_header_t *pdb_header, FILE *in)
{
  uint8_t magic_2[] = { 0x1a, 0x44, 0x53, 0x00, 0x00, 0x00 };
  int n;

  for (n = 0; n < sizeof(pdb_header->magic); n++)
  {
    pdb_header->magic[n] = getc(in);

    if (pdb_header->magic[n] == '\r') { pdb_header->magic[n] = 0; }
    if (pdb_header->magic[n] == '\n') { break; }
  }

  if (n == sizeof(pdb_header->magic)) { return -1; }

  for (n = 0; n < 6; n++)
  {
    pdb_header->magic_2[n] = getc(in);
    if (pdb_header->magic_2[n] != magic_2[n]) { return -1; }
  }

  pdb_header->block_size = read_uint32(in);
  pdb_header->free_block_map = read_uint32(in);
  pdb_header->number_of_blocks = read_uint32(in);
  pdb_header->number_of_dir_bytes = read_uint32(in);
  pdb_header->reserved = read_uint32(in);
  pdb_header->block_map_address = read_uint32(in);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq $-0x50, %r15
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x1150
cmpb $0xd, %al
cmovel %ebp, %eax
movb %al, 0x50(%rbx,%r15)
cmpb $0xa, %al
je 0x27b1
incq %r15
jne 0x278f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x282b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x282b
xorl %r15d, %r15d
leaq 0x3063(%rip), %r12      # 0x5828
movq %r14, %rdi
callq 0x1150
movb %al, 0x50(%rbx,%r15)
movsbl %al, %eax
movzbl (%r15,%r12), %ecx
cmpl %ecx, %eax
jne 0x282b
incq %r15
cmpq $0x6, %r15
jne 0x27c5
movq %r14, %rdi
callq 0x24ca
movl %eax, 0x58(%rbx)
movq %r14, %rdi
callq 0x24ca
movl %eax, 0x5c(%rbx)
movq %r14, %rdi
callq 0x24ca
movl %eax, 0x60(%rbx)
movq %r14, %rdi
callq 0x24ca
movl %eax, 0x64(%rbx)
movq %r14, %rdi
callq 0x24ca
movl %eax, 0x68(%rbx)
movq %r14, %rdi
callq 0x24ca
movl %eax, 0x6c(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/pdb.c
// Function: read_pdb_names
int read_pdb_names(
  struct pdb_dir_t *pdb_dir,
  struct pdb_header_t *pdb_header,
  FILE *in)
{
  const int index = pdb_dir->names_index;
  const int length = pdb_dir->stream_sizes[index];

  if (index == 0)
  {
    printf("Error: No /names stream found.\n");
    return -1;
  }

  read_data(pdb_dir, index, pdb_header->block_size, in);
  pdb_dir->names = (uint8_t *)malloc(length);
  memcpy(pdb_dir->names, pdb_dir->heap, length);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movslq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0x2a91
movq %rdx, %rcx
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
movslq (%rdx,%rsi,4), %r14
movl 0x58(%rax), %edx
callq 0x2aaa
movq %r14, %rdi
callq 0x10e0
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x10d0
xorl %eax, %eax
jmp 0x2aa2
leaq 0x3dcc(%rip), %rdi      # 0x6864
callq 0x1060
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/pdb.c
// Function: read_data
static void read_data(
  struct pdb_dir_t *pdb_dir,
  int index,
  int block_size,
  FILE *in)
{
  long marker = ftell(in);
  uint32_t *blocks = get_blocks(pdb_dir, index);
  int block_count = calc_block_count(pdb_dir->stream_sizes[index]);
  int n, offset = 0, length;

  for (n = 0; n < block_count; n++)
  {
    fseek(in, *blocks * block_size, SEEK_SET);
    length = fread(pdb_dir->heap + offset, 4096, 1, in);

    if (length == 0) { printf("Error: fread() 0 bytes.\n"); }

    offset += 4096;
    blocks++;
  }

  fseek(in, marker, SEEK_SET);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, 0xc(%rsp)
movl %esi, %r12d
movq %rdi, %r14
movq %rcx, %rdi
callq 0x10c0
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
movq 0x8(%r14), %rax
testl %r12d, %r12d
jle 0x2afe
movl %r12d, %ecx
movl $0xfff, %edx            # imm = 0xFFF
xorl %esi, %esi
movl (%rax,%rsi,4), %edi
addl %edx, %edi
shrl $0xc, %edi
addl %edi, %r13d
incq %rsi
cmpq %rsi, %rcx
jne 0x2ae8
movl %r13d, %r13d
movslq %r12d, %rcx
movl $0xfff, %r15d           # imm = 0xFFF
addl (%rax,%rcx,4), %r15d
cmpl $0x1000, %r15d          # imm = 0x1000
jb 0x2b71
shlq $0x2, %r13
addq 0x10(%r14), %r13
shrl $0xc, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
movl (%r13,%r12,4), %esi
imull 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10f0
movq 0x18(%r14), %rdi
addq %rbp, %rdi
movl $0x1000, %esi           # imm = 0x1000
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1070
testl %eax, %eax
jne 0x2b62
leaq 0x3d26(%rip), %rdi      # 0x6883
callq 0x1060
addq $0x1000, %rbp           # imm = 0x1000
incq %r12
cmpl %r12d, %r15d
jne 0x2b25
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/pdb.c
// Function: print_pdb_header
void print_pdb_header(struct pdb_header_t *pdb_header)
{
  printf(" -------- PDB header -------\n");
  printf("              magic: %s\n", pdb_header->magic);
  printf("             magic2: %02x %02x %02x %02x %02x %02x\n",
    pdb_header->magic_2[0],
    pdb_header->magic_2[1],
    pdb_header->magic_2[2],
    pdb_header->magic_2[3],
    pdb_header->magic_2[4],
    pdb_header->magic_2[5]);
  printf("         block_size: %d\n", pdb_header->block_size);
  printf("     free_block_map: %d\n", pdb_header->free_block_map);
  printf("         num_blocks: %d\n", pdb_header->number_of_blocks);
  printf("      num_dir_bytes: %d\n", pdb_header->number_of_dir_bytes);
  printf("           reserved: %d\n", pdb_header->reserved);
  printf("  block_map_address: %d\n", pdb_header->block_map_address);
  printf("\n");
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x3cfe(%rip), %rdi      # 0x689b
callq 0x1060
leaq 0x2c85(%rip), %rdi      # 0x582e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
movsbl 0x50(%rbx), %esi
movsbl 0x51(%rbx), %edx
movsbl 0x52(%rbx), %ecx
movsbl 0x53(%rbx), %r8d
movsbl 0x54(%rbx), %r9d
movsbl 0x55(%rbx), %eax
movl %eax, (%rsp)
leaq 0x2c70(%rip), %rdi      # 0x5847
xorl %eax, %eax
callq 0x1090
movl 0x58(%rbx), %esi
leaq 0x2c93(%rip), %rdi      # 0x587b
xorl %eax, %eax
callq 0x1090
movl 0x5c(%rbx), %esi
leaq 0x2c9b(%rip), %rdi      # 0x5894
xorl %eax, %eax
callq 0x1090
movl 0x60(%rbx), %esi
leaq 0x2ca3(%rip), %rdi      # 0x58ad
xorl %eax, %eax
callq 0x1090
movl 0x64(%rbx), %esi
leaq 0x2cab(%rip), %rdi      # 0x58c6
xorl %eax, %eax
callq 0x1090
movl 0x68(%rbx), %esi
leaq 0x2cb3(%rip), %rdi      # 0x58df
xorl %eax, %eax
callq 0x1090
movl 0x6c(%rbx), %esi
leaq 0x2cbb(%rip), %rdi      # 0x58f8
xorl %eax, %eax
callq 0x1090
movl $0xa, %edi
addq $0x10, %rsp
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/pdb.c
// Function: print_pdb_dir
void print_pdb_dir(struct pdb_dir_t *pdb_dir)
{
  int ptr = 0;
  int n, i;

  printf(" -- PDB Directory --\n");
  printf("   stream_count: %d\n", pdb_dir->stream_count);
  printf("  stream_blocks:\n");

  for (n = 0; n < pdb_dir->stream_count; n++)
  {
    int count = calc_block_count(pdb_dir->stream_sizes[n]);

    printf("    %d: %6d {", n, pdb_dir->stream_sizes[n]);

    for (i = 0; i < count; i++)
    {
      printf(" %d", pdb_dir->stream_blocks[ptr++]);
    }

    printf(" }\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3c50(%rip), %rdi      # 0x68b8
callq 0x1060
movl (%rbx), %esi
leaq 0x2c9b(%rip), %rdi      # 0x5911
xorl %eax, %eax
callq 0x1090
leaq 0x3c49(%rip), %rdi      # 0x68cd
callq 0x1060
cmpl $0x0, (%rbx)
je 0x2d25
leaq 0x2c8d(%rip), %r15      # 0x5926
leaq 0x3d0a(%rip), %rbp      # 0x69aa
leaq 0x2c8d(%rip), %r12      # 0x5934
xorl %r13d, %r13d
movl $0x0, 0x4(%rsp)
movq 0x8(%rbx), %rax
movl (%rax,%r13,4), %edx
leal 0xfff(%rdx), %r14d
movq %r15, %rdi
movl %r13d, %esi
xorl %eax, %eax
callq 0x1090
cmpl $0x1000, %r14d          # imm = 0x1000
jb 0x2d13
shrl $0xc, %r14d
movslq 0x4(%rsp), %r15
negl %r14d
xorl %ebp, %ebp
movq 0x10(%rbx), %rax
movl (%rax,%r15,4), %esi
incq %r15
movq %r12, %rdi
xorl %eax, %eax
callq 0x1090
decl %ebp
cmpl %ebp, %r14d
jne 0x2ce5
subl %ebp, 0x4(%rsp)
leaq 0x2c1a(%rip), %r15      # 0x5926
leaq 0x3c97(%rip), %rbp      # 0x69aa
movq %rbp, %rdi
callq 0x1060
incq %r13
movl (%rbx), %eax
cmpq %rax, %r13
jb 0x2cb2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/pdb.c
// Function: dump_pdb_stream
void dump_pdb_stream(
  struct pdb_dir_t *pdb_dir,
  struct pdb_header_t *pdb_header,
  FILE *in,
  int index,
  const char *filename)
{
  read_data(pdb_dir, index, pdb_header->block_size, in);

  uint8_t *data = pdb_dir->heap;

  FILE *fp = fopen(filename, "wb");
  fwrite(data, pdb_dir->stream_sizes[index], 1, fp);
  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %rcx
movq %rdi, %r14
movl 0x58(%rsi), %edx
movl %ebp, %esi
callq 0x2aaa
movq 0x18(%r14), %r15
leaq 0x280a(%rip), %rsi      # 0x6861
movq %rbx, %rdi
callq 0x1100
movq %rax, %rbx
movq 0x8(%r14), %rax
movslq %ebp, %rcx
movl (%rax,%rcx,4), %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1140
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/cirocosta[P]stress/src/file-watcher.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };
	int fd;

	setbuf(stdout, NULL);
	stress_parse_args(argc, argv, &args);

	_STRESS_MUST_P((fd = inotify_init()) >= 0,
	               "inotify_init",
	               "couldn't initialize inotify");

	create_files_and_watch(args.n, fd);
	stress_wait_until_signalized();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x2008, %edx           # imm = 0x2008
movq %r14, %rdi
xorl %esi, %esi
callq 0x10e0
movq 0x20f1(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x10c0
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1bf9
callq 0x1130
testl %eax, %eax
js 0x1f15
movl 0x8(%rsp), %edi
movl %eax, %esi
callq 0x11f0
callq 0x1d22
xorl %eax, %eax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r14
popq %rbp
retq
callq 0x19a4
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/1105.c
// Function: main
int
xmain(int argc, char *argv[])
{
	memset(&cpu, 0, sizeof(KD11B));
	memset(&bus, 0, sizeof(Bus));
	cpu.bus = &bus;
	busadddev(&bus, &membusdev);
	busadddev(&bus, &kebusdev);

	ARGBEGIN{
	}ARGEND;

	if(argc < 0)
		usage();

	loadmem("mem.txt");

	reset(&cpu);

	ttyopen(&cpu.tty);

#ifdef AUTODIAG
	if(rundiag(&cpu, "maindec/ZKAAA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKABA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKACA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKADA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAEA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAFA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAGA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAHA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAIA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAJA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAKA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKALA0.BIN")) return 0;
	if(rundiag(&cpu, "maindec/ZKAMA0.BIN")) return 0;
//	if(rundiag(&cpu, "maindec/maindec-11-d0nc.pb.bin")) return 0;
	printf("passed all diagnostics\n");
		return 0;
#endif

	cpu.r[7] = 0200;
//	cpu.sw = 0104000;
	run(&cpu);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0xc9f5(%rip), %rdi      # 0xe1e0
movl $0xe8, %edx
xorl %esi, %esi
callq 0x10e0
xorps %xmm0, %xmm0
movups %xmm0, 0xcacf(%rip)     # 0xe2d0
leaq 0xcac0(%rip), %rax      # 0xe2c8
movq %rax, 0xc9f9(%rip)      # 0xe208
leaq 0x6922(%rip), %rax      # 0x8138
movq %rax, 0xcaab(%rip)      # 0xe2c8
movq $0x0, 0x6910(%rip) # 0x8138
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x1828
leaq 0x693e(%rip), %rax      # 0x8178
movq %rax, (%rcx)
movq $0x0, 0x6930(%rip) # 0x8178
movq 0xc989(%rip), %rdi      # 0xe1d8
testq %rdi, %rdi
jne 0x185e
movq (%rbx), %rdi
movq %rdi, 0xc97a(%rip)      # 0xe1d8
leal -0x1(%r14), %ecx
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x18b8
addq $0x8, %rbx
movl %ecx, %eax
cmpb $0x2d, (%rdx)
jne 0x18ad
leaq 0x1(%rdx), %rcx
movzbl 0x1(%rdx), %esi
cmpl $0x2d, %esi
je 0x1889
testl %esi, %esi
jne 0x188f
jmp 0x18ad
cmpb $0x0, 0x2(%rdx)
je 0x18b1
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x188f
leal -0x1(%rax), %ecx
movq 0x8(%rbx), %rdx
addq $0x8, %rbx
movl %eax, %r14d
testq %rdx, %rdx
jne 0x186f
jmp 0x18b8
movl %eax, %ecx
jmp 0x18b8
addl $-0x2, %r14d
movl %r14d, %ecx
testl %ecx, %ecx
js 0x18fe
leaq 0x376a(%rip), %rdi      # 0x502d
callq 0x1429
leaq 0xc911(%rip), %rbx      # 0xe1e0
movq %rbx, %rdi
callq 0x19d0
leaq 0xc9be(%rip), %rdi      # 0xe29c
callq 0x3cab
movw $0x80, 0xc902(%rip)     # 0xe1ee
movq %rbx, %rdi
callq 0x327e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1240
nop
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/kd11b.c
// Function: fetchop
static int
fetchop(KD11B *cpu, int t, int m, int b, int pse)
{
	int r;
	r = m&7;
	if((m&070) == 0)
		cpu->r[t] = cpu->r[r];
	else{
		if(dati(cpu, b, pse)) return 1;
		cpu->r[t] = cpu->bus->data;
		if(b && cpu->ba&1) cpu->r[t] = cpu->r[t]>>8;
	}
	if(b) cpu->r[t] = sxt(cpu->r[t]);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
testb $0x38, %dl
je 0x3207
movq %rbx, %rdi
movl %ebp, %esi
movl %r8d, %edx
callq 0x1a23
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x3229
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movl %r14d, %r14d
movw %ax, (%rbx,%r14,2)
testl %ebp, %ebp
je 0x3227
testb $0x1, 0x22(%rbx)
je 0x321a
movzwl %ax, %eax
shrl $0x8, %eax
movw %ax, (%rbx,%r14,2)
jmp 0x321a
andl $0x7, %edx
movzwl (%rbx,%rdx,2), %eax
movl %r14d, %r14d
movw %ax, (%rbx,%r14,2)
testl %ebp, %ebp
je 0x3227
movzbl %al, %edi
callq 0x1424
movw %ax, (%rbx,%r14,2)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/asc16.c
// Function: asc16_load
int asc16_load(asc16_t *asc16, const char *filename)
{
	FILE *pf;
	int size;

	pf = fopen(filename, "rb");
	if (pf == NULL)
		return -1;

	size = file_readall(pf, &asc16->data);
	
	fclose(pf);

	if (size == -1)
		return -1;

	asc16->size = size;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r14
leaq 0x3472(%rip), %rsi      # 0x5004
movq %rax, %rdi
callq 0x1150
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1bd3
movq %rax, %r15
movq %rax, %rdi
callq 0x1100
movq %rax, %r13
cmpl $-0x1, %r13d
je 0x1bcb
movq %r15, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1130
testl %eax, %eax
je 0x1be4
movq %r15, %rdi
callq 0x1090
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x1100
movq %rax, %r12
cmpl $-0x1, %r12d
je 0x1bcb
movslq %r13d, %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x1130
testl %eax, %eax
jne 0x1bcb
movslq %r12d, %rbp
movq %rbp, %rdi
callq 0x1110
testq %rax, %rax
je 0x1bcb
movq %rax, %r13
movl $0x1, %esi
movq %rax, %rdi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x1080
cmpq %rbp, %rax
jne 0x1c44
movq %r13, (%r14)
movq %r15, %rdi
callq 0x1090
movl %r12d, 0x8(%r14)
xorl %ebx, %ebx
jmp 0x1bd3
movq %r13, %rdi
callq 0x1030
jmp 0x1bcb
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/asc16.c
// Function: asc16_gylph_print
void asc16_gylph_print(char *d)
{
	int i, j;
	for (j = 0; j < ASC16_GYLPH_HEIGHT; j++, d++) {
		for (i = 0; i < ASC16_GYLPH_WIDTH; i++) {
			if (asc16_is_setpixel(d, i))
				printf("*");
			else
				printf(" ");
		}
		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
movzbl (%rbx), %eax
movl %ebp, %ecx
shll %cl, %eax
movl $0x20, %edi
testb %al, %al
jns 0x1c72
movl $0x2a, %edi
callq 0x1040
incl %ebp
cmpl $0x8, %ebp
jne 0x1c5d
movl $0xa, %edi
callq 0x1040
incl %r14d
incq %rbx
cmpl $0x10, %r14d
jne 0x1c5b
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: free_draw_state
static void free_draw_state(draw_state_t *st)
{
	dlitem_t *curr, *next;
	rbnil_t *nil;

	if (st) {
		free(st->rows);
		dllist_foreach(&st->nils, curr, next, rbnil_t, nil, dlentry) {
			dllist_remove(curr);
			if (rbnode_is_left(&nil->base.rbentry))
				nil->base.rbentry.parent->left = rbnode_nil;
			else if (rbnode_is_right(&nil->base.rbentry))
				nil->base.rbentry.parent->right = rbnode_nil;
			free_nil(nil);
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2377
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1030
movq 0x30(%rbx), %r14
addq $0x30, %rbx
cmpq %rbx, %r14
je 0x2370
movq %r14, %rax
leaq -0x40(%r14), %rdi
movq (%r14), %r14
movq 0x8(%rax), %rcx
movq %r14, (%rcx)
movq %rcx, 0x8(%r14)
movq -0x20(%rax), %rax
cmpq %rdi, 0x10(%rax)
je 0x235e
cmpq %rdi, 0x18(%rax)
jne 0x2369
addq $0x18, %rax
jmp 0x2362
addq $0x10, %rax
movq $0x0, (%rax)
callq 0x1030
jmp 0x232e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_init
int bitmap_init(bitmap_t *bitmap, int w, int h, color_t bg)
{
	int i;
	bitmap->w = w;
	bitmap->h = h;

	bitmap->colors = malloc(w * h * sizeof(color_t));
	if (bitmap->colors == NULL)
		return -1;
	for (i = 0; i < w * h; i++) {
		bitmap->colors[i] = bg;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %ebx
movl %edx, %r14d
movq %rdi, %r15
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
imull %esi, %r14d
movslq %r14d, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x249d
testl %r14d, %r14d
jle 0x2499
movl %r14d, %ecx
addl $0x3, %r14d
andl $-0x4, %r14d
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x2c40(%rip), %xmm1     # 0x5010
movdqa 0x2c48(%rip), %xmm2     # 0x5020
xorl %ecx, %ecx
movdqa 0x2c4e(%rip), %xmm3     # 0x5030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x2c4e(%rip), %xmm5     # 0x5040
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x2429
movl %ebx, (%rax,%rcx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x243b
movl %ebx, 0x4(%rax,%rcx,4)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0x2476
movl %ebx, 0x8(%rax,%rcx,4)
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x2484
movl %ebx, 0xc(%rax,%rcx,4)
addq $0x4, %rcx
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
cmpq %rcx, %r14
jne 0x23f2
xorl %eax, %eax
jmp 0x24a2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_draw_point
int bitmap_draw_point(bitmap_t *bitmap, int x, int y, color_t c)
{
	int i = x + y * bitmap->w;
	if (i >= 0 && i < (bitmap->w * bitmap->h)) {
		bitmap->colors[i] = c;
		return 0;
	}
	else {
		errno = ERANGE;
		return -1;
	}
}

// Assembly:
movl (%rdi), %eax
imull %eax, %edx
addl %esi, %edx
js 0x24d4
imull 0x4(%rdi), %eax
cmpl %eax, %edx
jge 0x24d4
movq 0x8(%rdi), %rax
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
xorl %eax, %eax
retq
pushq %rax
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_draw_line
int bitmap_draw_line(bitmap_t *bitmap, int x1, int y1, int x2, int y2, color_t color)
{
	int ix, iy, cx, cy, n2dy, n2dydx, d;
	int dx, dy, yy;
	int r = 0;
	
	dx = abs(x2 - x1);
	dy = abs(y2 - y1);
	yy = 0;

	if (dx < dy) {
		yy = 1;
		swap_int(&x1, &y1);
		swap_int(&x2, &y2);
		swap_int(&dx, &dy);
	}

	ix = (x2 - x1) > 0 ? 1 : -1;
	iy = (y2 - y1) > 0 ? 1 : -1;
	cx = x1;
	cy = y1;
	n2dy = dy * 2;
	n2dydx = (dy - dx) * 2;
	d = dy * 2 - dx;

	if (yy) { /* ����ֱ���� x ���ļнǴ��� 45 �� */
		while (cx != x2) {
			if (d < 0) {
				d += n2dy;
			}
			else {
				cy += iy;
				d += n2dydx;
			}
			if (bitmap_draw_point(bitmap, cy, cx, color) != 0)
				r = -1;
			cx += ix;
		}
	}
	else { /* ����ֱ���� x ���ļн�С�� 45 �� */
		while (cx != x2) {
			if (d < 0) {
				d += n2dy;
			}
			else {
				cy += iy;
				d += n2dydx;
			}
			if (bitmap_draw_point(bitmap, cx, cy, color) != 0)
				r = -1;
			cx += ix;
		}
	}

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movl %esi, %ebp
movl %ecx, %esi
subl %ebp, %esi
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
movq %rdi, %r14
movl %r8d, %edi
subl %edx, %edi
movl %edi, %esi
negl %esi
cmovsl %edi, %esi
cmpl %esi, %eax
jae 0x252a
movl %edx, %r15d
movl %r8d, %r9d
movl %esi, %edx
movl %eax, %r13d
jmp 0x253a
movl %ebp, %r15d
movl %edx, %ebp
movl %ecx, %r9d
movl %r8d, %ecx
movl %eax, %edx
movl %esi, %r13d
xorl %edi, %edi
cmpl %r15d, %r9d
setg %dil
xorl %r8d, %r8d
cmpl %ebp, %ecx
setg %r8b
leal (,%r13,2), %ebx
subl %edx, %r13d
addl %r13d, %r13d
movl %ebx, 0x14(%rsp)
subl %edx, %ebx
leal -0x1(,%rdi,2), %ecx
movl %ecx, 0x10(%rsp)
leal -0x1(,%r8,2), %ecx
movl %ecx, 0xc(%rsp)
cmpl %esi, %eax
movl %r9d, 0x8(%rsp)
jae 0x25eb
cmpl %r9d, %r15d
je 0x25f0
xorl %eax, %eax
movl %ebp, %ecx
testl %ebx, %ebx
movl 0xc(%rsp), %ebp
movl $0x0, %edx
cmovsl %edx, %ebp
movl %r13d, %r12d
cmovsl 0x14(%rsp), %r12d
addl %ecx, %ebp
movl (%r14), %edx
movl %edx, %ecx
imull %r15d, %ecx
addl %ebp, %ecx
js 0x25c7
imull 0x4(%r14), %edx
cmpl %edx, %ecx
jge 0x25c7
movq 0x8(%r14), %rdx
movl %ecx, %ecx
movl 0x4(%rsp), %esi
movl %esi, (%rdx,%rcx,4)
jmp 0x25dc
callq 0x1060
movl 0x8(%rsp), %r9d
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addl %r12d, %ebx
addl 0x10(%rsp), %r15d
cmpl %r15d, %r9d
jne 0x2587
jmp 0x2658
cmpl %r9d, %r15d
jne 0x25f4
xorl %eax, %eax
jmp 0x2658
xorl %eax, %eax
movl %ebp, %ecx
testl %ebx, %ebx
movl 0xc(%rsp), %ebp
movl $0x0, %edx
cmovsl %edx, %ebp
movl %r13d, %r12d
cmovsl 0x14(%rsp), %r12d
addl %ecx, %ebp
movl (%r14), %edx
movl %edx, %ecx
imull %ebp, %ecx
addl %r15d, %ecx
js 0x2636
imull 0x4(%r14), %edx
cmpl %edx, %ecx
jge 0x2636
movq 0x8(%r14), %rdx
movl %ecx, %ecx
movl 0x4(%rsp), %esi
movl %esi, (%rdx,%rcx,4)
jmp 0x264b
callq 0x1060
movl 0x8(%rsp), %r9d
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addl %r12d, %ebx
addl 0x10(%rsp), %r15d
cmpl %r15d, %r9d
jne 0x25f6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_draw_circle
int bitmap_draw_circle(bitmap_t *bitmap, int xc, int yc, int r, int fill, color_t c)
{
	int x = 0, y = r, yi, d;
	int rc = 0;

	/* ����Բ��ͼƬ�ɼ������⣬ֱ���˳� */
	if (xc + r < 0 || xc - r >= bitmap->w ||
		yc + r < 0 || yc - r >= bitmap->h) {
		errno = ERANGE;
		return -1;
	}

	d = 3 - 2 * r;

	if (fill) {
		/* �������䣨��ʵ��Բ��*/
		while (x <= y) {
			for (yi = x; yi <= y; yi++) {
				if (draw_circle_8(bitmap, xc, yc, x, yi, c) != 0)
					rc = -1;
			}

			if (d < 0) {
				d = d + 4 * x + 6;
			}
			else {
				d = d + 4 * (x - y) + 10;
				y--;
			}
			x++;
		}
	}
	else {
		/* ���������䣨������Բ��*/
		while (x <= y) {
			if (draw_circle_8(bitmap, xc, yc, x, y, c) != 0)
				rc = -1;

			if (d < 0) {
				d = d + 4 * x + 6;
			}
			else {
				d = d + 4 * (x - y) + 10;
				y--;
			}
			x++;
		}
	}

	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %eax
addl %esi, %eax
js 0x274f
movl %ecx, %ebp
movl %esi, %eax
subl %ecx, %eax
cmpl (%rdi), %eax
setge %al
addl %edx, %ecx
sets %cl
orb %al, %cl
jne 0x274f
movl %edx, %eax
subl %ebp, %eax
cmpl 0x4(%rdi), %eax
jge 0x274f
movl $0x3, %ebx
subl %ebp, %ebx
subl %ebp, %ebx
testl %r8d, %r8d
movl %r9d, 0x4(%rsp)
movl %edx, (%rsp)
movl %esi, %r12d
movq %rdi, %r15
je 0x2772
testl %ebp, %ebp
js 0x27e8
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %rbx, 0x8(%rsp)
cmpl %r14d, %ebp
movq %rbp, %rax
movl %r14d, %ebp
movq %rax, 0x10(%rsp)
cmovgl %eax, %ebp
incl %ebp
movl %r14d, %ebx
movq %r15, %rdi
movl %r12d, %esi
movl (%rsp), %edx
movl %r14d, %ecx
movl %ebx, %r8d
movl 0x4(%rsp), %r9d
callq 0x27f0
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %r13d
incl %ebx
cmpl %ebx, %ebp
jne 0x26ed
movq 0x8(%rsp), %rbx
testl %ebx, %ebx
js 0x2735
movl %r14d, %eax
movq 0x10(%rsp), %rbp
subl %ebp, %eax
leal (%rbx,%rax,4), %ebx
addl $0xa, %ebx
decl %ebp
jmp 0x2741
leal (%rbx,%r14,4), %ebx
addl $0x6, %ebx
movq 0x10(%rsp), %rbp
leal 0x1(%r14), %eax
cmpl %ebp, %r14d
movl %eax, %r14d
jl 0x26d2
jmp 0x2760
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
js 0x27e8
xorl %r13d, %r13d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x6, %r8d
xorl %r14d, %r14d
movl %r8d, 0x8(%rsp)
incl %ecx
movl %ecx, 0x10(%rsp)
movl %ebp, %r8d
callq 0x27f0
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
testl %ebx, %ebx
js 0x27bb
movl %r14d, %ecx
subl %ebp, %ecx
leal (%rbx,%rcx,4), %ebx
addl $0xa, %ebx
decl %ebp
movl 0x8(%rsp), %r8d
jmp 0x27c3
movl 0x8(%rsp), %r8d
addl %r8d, %ebx
orl %eax, %r13d
incl %r14d
addl $0x4, %r8d
movl 0x10(%rsp), %ecx
cmpl %ebp, %ecx
movl 0x4(%rsp), %r9d
movl (%rsp), %edx
movl %r12d, %esi
movq %r15, %rdi
jl 0x2787
jmp 0x2760
xorl %r13d, %r13d
jmp 0x2760
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_draw_rect
int bitmap_draw_rect(bitmap_t *bitmap, int x0, int y0, int x1, int y1, int fill, color_t color)
{
	int x, y;
	int r = 0;
	if (fill) {
		for (y = y0; y < y1; y++) {
			for (x = x0; x <= x1; x++) {
				if (bitmap_draw_point(bitmap, x, y, color) != 0)
					r = -1;
			}
		}
	}
	else {
		for (x = x0; x <= x1; x++) {
			if (bitmap_draw_point(bitmap, x, y0, color) != 0)
				r = -1;
			if (bitmap_draw_point(bitmap, x, y1, color) != 0)
				r = -1;
		}
		for (y = y0; y < y1; y++) {
			if (bitmap_draw_point(bitmap, x0, y, color) != 0)
				r = -1;
			if (bitmap_draw_point(bitmap, x1, y, color) != 0)
				r = -1;
		}
	}

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %ebp
movq %rdi, %r12
movl 0x50(%rsp), %r13d
testl %r9d, %r9d
movl %r8d, 0xc(%rsp)
movl %esi, 0x10(%rsp)
je 0x2a89
xorl %eax, %eax
cmpl %ebx, %ebp
jge 0x2b90
leal 0x1(%r14), %r15d
xorl %eax, %eax
movq %r14, %rbx
movl 0x10(%rsp), %ecx
cmpl %r14d, %ecx
jg 0x2a79
movl %ecx, %r14d
movl (%r12), %edx
movl %ebp, %ecx
imull %edx, %ecx
addl %r14d, %ecx
js 0x2a61
imull 0x4(%r12), %edx
cmpl %edx, %ecx
jge 0x2a61
movq 0x8(%r12), %rdx
movl %ecx, %ecx
movl %r13d, (%rdx,%rcx,4)
jmp 0x2a71
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %r14d
cmpl %r14d, %r15d
jne 0x2a3c
incl %ebp
cmpl 0xc(%rsp), %ebp
movq %rbx, %r14
jne 0x2a2d
jmp 0x2b90
xorl %eax, %eax
cmpl %r14d, %esi
jg 0x2b17
leal 0x1(%r14), %eax
movl %eax, 0x14(%rsp)
xorl %eax, %eax
movl 0x10(%rsp), %r15d
movl (%r12), %edx
movl %edx, %ecx
imull %ebp, %ecx
addl %r15d, %ecx
js 0x2ac8
imull 0x4(%r12), %edx
cmpl %edx, %ecx
jge 0x2ac8
movq 0x8(%r12), %rdx
movl %ecx, %ecx
movl %r13d, (%rdx,%rcx,4)
jmp 0x2ad8
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl (%r12), %edx
movl %edx, %ecx
imull %ebx, %ecx
addl %r15d, %ecx
js 0x2afd
imull 0x4(%r12), %edx
cmpl %edx, %ecx
jge 0x2afd
movq 0x8(%r12), %rdx
movl %ecx, %ecx
movl %r13d, (%rdx,%rcx,4)
jmp 0x2b0d
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %r15d
cmpl %r15d, 0x14(%rsp)
jne 0x2aa3
cmpl %ebx, %ebp
jge 0x2b90
movl (%r12), %edx
movl %edx, %ecx
imull %ebp, %ecx
addl 0x10(%rsp), %ecx
js 0x2b41
imull 0x4(%r12), %edx
cmpl %edx, %ecx
jge 0x2b41
movq 0x8(%r12), %rdx
movl %ecx, %ecx
movl %r13d, (%rdx,%rcx,4)
jmp 0x2b51
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl 0xc(%rsp), %ebx
movl (%r12), %edx
movl %edx, %ecx
imull %ebp, %ecx
addl %r14d, %ecx
js 0x2b7a
imull 0x4(%r12), %edx
cmpl %edx, %ecx
jge 0x2b7a
movq 0x8(%r12), %rdx
movl %ecx, %ecx
movl %r13d, (%rdx,%rcx,4)
jmp 0x2b8a
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %ebp
cmpl %ebp, %ebx
jne 0x2b1b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_draw_char
int bitmap_draw_char(bitmap_t *bitmap, int ch, int x, int y, color_t c, asc16_t *asc16)
{
	int i, j, r = 0;
	char *d;
	d = asc16_gylph_data(asc16, ch);
	for (j = 0; j < ASC16_GYLPH_HEIGHT; j++, d++) {
		for (i = 0; i < ASC16_GYLPH_WIDTH; i++) {
			if (asc16_is_setpixel(d, i))
				if (bitmap_draw_point(bitmap, x + i, y + j, c) != 0)
					r = -1;
		}
	}
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, 0x4(%rsp)
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %r15
shll $0x4, %esi
movslq %esi, %r13
addq (%r9), %r13
xorl %eax, %eax
xorl %ebx, %ebx
xorl %r12d, %r12d
movzbl (%r13), %edx
movl %r12d, %ecx
shll %cl, %edx
testb %dl, %dl
jns 0x2c0d
movl (%r15), %edx
movl %ebp, %ecx
imull %edx, %ecx
leal (%r14,%r12), %esi
addl %esi, %ecx
js 0x2bfd
imull 0x4(%r15), %edx
cmpl %edx, %ecx
jge 0x2bfd
movq 0x8(%r15), %rdx
movl %ecx, %ecx
movl 0x4(%rsp), %esi
movl %esi, (%rdx,%rcx,4)
jmp 0x2c0d
callq 0x1060
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %r12d
cmpl $0x8, %r12d
jne 0x2bc7
incl %ebx
incq %r13
incl %ebp
cmpl $0x10, %ebx
jne 0x2bc4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_draw_string
int bitmap_draw_string(bitmap_t *bitmap, char *str, int x, int y, color_t c, asc16_t *asc16)
{
	int r = 0;
	while (*str) {
		if (bitmap_draw_char(bitmap, *str, x, y, c, asc16) != 0)
			r = -1;
		x += ASC16_ADVANCE;
		str++;
	}
	return r;
}

// Assembly:
movb (%rsi), %al
testb %al, %al
je 0x2ca2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movl %r8d, %r14d
movl %ecx, %r13d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
incq %r12
xorl %edx, %edx
movl %edx, 0x4(%rsp)
movsbl %al, %esi
movq %rbx, %rdi
movl %r15d, %edx
movl %r13d, %ecx
movl %r14d, %r8d
movq %rbp, %r9
callq 0x2b9f
movl 0x4(%rsp), %edx
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %edx
addl $0x8, %r15d
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x2c59
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ca4
xorl %edx, %edx
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: bitmap_save
int bitmap_save(bitmap_t *bitmap, const char *filename)
{
	FILE *pf;
	int r;

	pf = fopen(filename, "wb");
	if (pf == NULL)
		return -1;

	r = bitmap_print(bitmap, pf);

	fclose(pf);

	return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x2131(%rip), %rsi      # 0x5050
movq %rax, %rdi
callq 0x1150
testq %rax, %rax
je 0x2f48
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2ca7
movl %eax, %ebx
movq %r14, %rdi
callq 0x1090
movl %ebx, %eax
jmp 0x2f4d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/bitmap.c
// Function: move_x_fixup
static void move_x_fixup(draw_state_t *st, rbpoint_t *point)
{
	rbnode_t *n;
	rbpoint_t *m;
	dllist_t *list;
	int x;
	n = rbnode_is_nil(point->rbentry.left) ?
		point->rbentry.right :
		point->rbentry.left;
	if (!rbnode_is_nil(n)) {
		m = container_of(n, rbpoint_t, rbentry);
		if (m->x < point->x - 1) {
			x = point->x - 1 - m->x;
			m->x += x;
			list = st->rows + m->y;
			while (m->dlentry.next != &list->head) {
				m = container_of(m->dlentry.next, rbpoint_t, dlentry);
				m->x += x;
				move_x_fixup(st, m);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rax
testq %rax, %rax
jne 0x2f71
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x2faa
movl 0x38(%rsi), %ecx
decl %ecx
movl %ecx, %ebp
subl 0x38(%rax), %ebp
jle 0x2faa
movl %ecx, 0x38(%rax)
movslq 0x3c(%rax), %r14
shlq $0x4, %r14
addq 0x20(%rbx), %r14
movq 0x28(%rax), %r15
cmpq %r14, %r15
je 0x2faa
leaq -0x28(%r15), %rsi
addl %ebp, 0x10(%r15)
movq %rbx, %rdi
callq 0x2f55
movq (%r15), %r15
jmp 0x2f90
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/test.c
// Function: insert
static void insert(int v)
{
	rbpoint_t *point;

	if (v < 0) {
		printf("insert %d error: require positive integer.\n", v);
		return;
	}

	point = malloc(sizeof(rbpoint_t));
	if (point == NULL) {
		printf("insert %d error: alloc.\n", v);
		return;
	}
	memset(point, 0, sizeof(rbpoint_t));
	point->rbentry.key = itop(v);
	if (rbtree_insert(&tree, &point->rbentry) == 0) {
		printf("insert %d.\n", v);
		entries++;
	}
	else {
		printf("insert %d error: exist.\n", v);
	}
}

// Assembly:
pushq %rbx
movl %edi, %ebx
testl %edi, %edi
js 0x395e
movl $0x1, %edi
movl $0x40, %esi
callq 0x10d0
testq %rax, %rax
je 0x3967
movl %ebx, %ecx
movq %rcx, (%rax)
leaq 0x478f(%rip), %rdi      # 0x80d8
movq %rax, %rsi
callq 0x128c
testl %eax, %eax
je 0x3978
leaq 0x17dc(%rip), %rdi      # 0x5138
jmp 0x396e
leaq 0x1782(%rip), %rdi      # 0x50e7
jmp 0x396e
leaq 0x17a5(%rip), %rdi      # 0x5113
movl %ebx, %esi
xorl %eax, %eax
popq %rbx
jmp 0x10b0
leaq 0x17ad(%rip), %rdi      # 0x512c
movl %ebx, %esi
xorl %eax, %eax
callq 0x10b0
incl 0x4802(%rip)            # 0x8190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/test.c
// Function: delete
static void delete(int v)
{
	rbnode_t *n;
	rbpoint_t *point;
	n = rbtree_lookup(&tree, itop(v));
	if (n == NULL) {
		printf("%d not exist.\n", v);
	}
	else {
		point = container_of(n, rbpoint_t, rbentry);
		rbtree_remove(&tree, n);
		printf("delete %d\n", ptoi(n->key));
		free_point(point);
		entries--;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl %edi, %esi
leaq 0x473a(%rip), %rdi      # 0x80d8
callq 0x14e8
testq %rax, %rax
je 0x39df
movq %rax, %rbx
leaq 0x4726(%rip), %rdi      # 0x80d8
movq %rax, %rsi
callq 0x1524
movl (%rbx), %esi
leaq 0x179d(%rip), %rdi      # 0x5160
xorl %eax, %eax
callq 0x10b0
movq %rbx, %rdi
callq 0x1030
decl 0x47b8(%rip)            # 0x8190
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x176b(%rip), %rdi      # 0x5151
movl %ebp, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/test.c
// Function: lookup
static void lookup(int v)
{
	rbnode_t *n;
	n = rbtree_lookup(&tree, itop(v));
	if (n == NULL) {
		printf("%d not exist.\n", v);
	}
	else {
		print_node(&tree, n, NULL);
	}
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl %edi, %esi
leaq 0x46d7(%rip), %rdi      # 0x80d8
callq 0x14e8
testq %rax, %rax
je 0x3a14
movq %rax, %rsi
popq %rbx
jmp 0x3df8
leaq 0x1736(%rip), %rdi      # 0x5151
movl %ebx, %esi
xorl %eax, %eax
popq %rbx
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]rbtree/test/test.c
// Function: do_print
static void do_print(const char *opt)
{
	printf("parent node color   dir    x    y\n");
	if (opt == NULL)
		rbtree_foreach_print(&tree, print_node, NULL);
	else if (strcmp("pre", opt) == 0)
		rbtree_foreach_preorder(&tree, print_node, NULL);
	else if (strcmp("in", opt) == 0)
		rbtree_foreach_inorder(&tree, print_node, NULL);
	else if (strcmp("post", opt) == 0)
		rbtree_foreach_postorder(&tree, print_node, NULL);
	else {
		if (strlen(opt) != 0) {
			printf("warning: unknow print option \"%s\", print in default mode.\n", opt);
		}
		rbtree_foreach_print(&tree, print_node, NULL);
	}

	printf("%d entries.\n", entries);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1dc6(%rip), %rdi      # 0x57f8
callq 0x1070
testq %rbx, %rbx
je 0x3a95
leaq 0x1642(%rip), %rdi      # 0x5085
movq %rbx, %rsi
callq 0x10e0
testl %eax, %eax
je 0x3aac
movzbl (%rbx), %ebp
movl %ebp, %eax
subl $0x69, %eax
jne 0x3a66
movzbl 0x1(%rbx), %eax
subl $0x6e, %eax
jne 0x3a66
movzbl 0x2(%rbx), %eax
negl %eax
testl %eax, %eax
je 0x3ac3
leaq 0x1616(%rip), %rdi      # 0x5089
movq %rbx, %rsi
callq 0x10e0
testl %eax, %eax
je 0x3ada
testb %bpl, %bpl
je 0x3a95
leaq 0x1717(%rip), %rdi      # 0x51a2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10b0
leaq 0x463c(%rip), %rdi      # 0x80d8
leaq 0x355(%rip), %rsi       # 0x3df8
xorl %edx, %edx
callq 0x1a39
jmp 0x3aef
leaq 0x4625(%rip), %rdi      # 0x80d8
leaq 0x33e(%rip), %rsi       # 0x3df8
xorl %edx, %edx
callq 0x18fb
jmp 0x3aef
leaq 0x460e(%rip), %rdi      # 0x80d8
leaq 0x327(%rip), %rsi       # 0x3df8
xorl %edx, %edx
callq 0x1963
jmp 0x3aef
leaq 0x45f7(%rip), %rdi      # 0x80d8
leaq 0x310(%rip), %rsi       # 0x3df8
xorl %edx, %edx
callq 0x19cb
movl 0x469b(%rip), %esi      # 0x8190
leaq 0x177f(%rip), %rdi      # 0x527b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10b0