LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/file.c
// Function: splice_line
struct utf8c splice_line(struct source *src) {
  for(; src->splice_queue_size < 3; src->splice_queue_size++) {
    src->splice_queue[src->splice_queue_size] = replace_trigraph(src);
    if(src->splice_queue[src->splice_queue_size].bytes == 0) {
      break;
    }
  }

  if(src->splice_queue_size == 0) {
    return ueof;
  }

  if(src->splice_queue_size >= 2) {
    if(src->splice_queue[0].sequence[0] == '\\') {
      if(src->splice_queue[1].sequence[0] == '\n') {
        if(src->splice_queue_size == 2) {
          error("end of the source file requires new line indicator.\n");
        }
        src->splice_queue_size = 0;
        return src->splice_queue[2];
      }
    }
  }

  struct utf8c uc = src->splice_queue[0];
  src->splice_queue_size--;
  for(int i = 0; i < src->splice_queue_size; i++) {
    src->splice_queue[i] = src->splice_queue[i + 1];
  }
  return uc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x44(%rdi), %r14
movl 0x40(%rdi), %ecx
cmpl $0x2, %ecx
jg 0x1878
movslq %ecx, %rax
imulq $0xc, %rax, %r15
movq %rbx, %rdi
callq 0x1757
movq %rax, (%r14,%r15)
movb %dl, 0x8(%r14,%r15)
movslq 0x40(%rbx), %rcx
imulq $0xc, %rcx, %rax
cmpl $0x0, (%r14,%rax)
je 0x186f
incl %ecx
movl %ecx, 0x40(%rbx)
jmp 0x183c
testl %ecx, %ecx
je 0x18e6
cmpl $0x2, %ecx
jl 0x18af
cmpb $0x5c, 0x48(%rbx)
jne 0x18af
cmpb $0xa, 0x54(%rbx)
jne 0x18af
cmpl $0x2, %ecx
jne 0x18a1
leaq 0x479a(%rip), %rdi      # 0x602a
leaq 0x47c7(%rip), %rdx      # 0x605e
pushq $0x6b
popq %rsi
xorl %eax, %eax
callq 0x1252
andl $0x0, 0x40(%rbx)
leaq 0x5c(%rbx), %rax
addq $0x64, %rbx
jmp 0x18f1
movq 0x44(%rbx), %rax
movb 0x4c(%rbx), %dl
decl %ecx
movl %ecx, 0x40(%rbx)
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
imulq $0xc, %rcx, %rcx
addq $0x50, %rbx
cmpq %rsi, %rcx
je 0x18f6
movl 0x8(%rbx,%rsi), %edi
movl %edi, -0x4(%rbx,%rsi)
movq (%rbx,%rsi), %rdi
movq %rdi, -0xc(%rbx,%rsi)
addq $0xc, %rsi
jmp 0x18ca
leaq 0x87a3(%rip), %rax      # 0xa090
leaq 0x8(%rax), %rbx
movq (%rax), %rax
movb (%rbx), %dl
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/string.c
// Function: allocate_string
struct string *allocate_string() {
  const int INIT_SIZE = 4;

  struct string *str = (struct string *) malloc(sizeof(struct string));
  str->head = (unsigned char *) malloc(sizeof(unsigned char) * (INIT_SIZE + 1));
  str->size = 0;
  str->alloc_size = INIT_SIZE;
  str->head[0] = '\0';

  return str;
}

// Assembly:
pushq %rbx
pushq $0x10
popq %rdi
callq 0x10b0
movq %rax, %rbx
pushq $0x5
popq %rdi
callq 0x10b0
movq %rax, (%rbx)
movabsq $0x400000000, %rcx      # imm = 0x400000000
movq %rcx, 0x8(%rbx)
movb $0x0, (%rax)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/string.c
// Function: append_string
void append_string(struct string *str, unsigned char c) {
  if(str->size >= str->alloc_size) {
    int new_size = str->alloc_size * 2;
    unsigned char *t = (unsigned char *) malloc(sizeof(unsigned char) * (new_size + 1));
    for(int i = 0; i < str->size; i++) t[i] = str->head[i];

    free(str->head);

    str->head = t;
    str->alloc_size = new_size;
  }

  str->head[str->size++] = c;
  str->head[str->size] = '\0';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl 0x8(%rdi), %r15d
movslq 0xc(%rdi), %r12
cmpl %r12d, %r15d
jge 0x1950
movq (%rbx), %r14
jmp 0x1990
leaq 0x1(,%r12,2), %rdi
addq %r12, %r12
callq 0x10b0
movq %rax, %r14
xorl %eax, %eax
testl %r15d, %r15d
cmovlel %eax, %r15d
movq (%rbx), %rdi
cmpq %rax, %r15
je 0x1980
movb (%rdi,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
jmp 0x196f
callq 0x1030
movq %r14, (%rbx)
movl %r12d, 0xc(%rbx)
movl 0x8(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x8(%rbx)
movslq %r15d, %rax
movb %bpl, (%r14,%rax)
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
movb $0x0, (%rax,%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/lex.c
// Function: allocate_pp_token_lexer
struct pp_token_lexer *allocate_pp_token_lexer(const unsigned char *file) {
  const int INIT_SIZE = 64;

  struct pp_token_lexer *lexer = (struct pp_token_lexer *) malloc(sizeof(struct pp_token_lexer));
  if(lexer == NULL) {
    perror("malloc");
    exit(1);
  }

  lexer->src = allocate_source(file);
  lexer->comment_queue_size = 0;
  lexer->queue = (struct utf8c *) malloc(sizeof(struct utf8c) * INIT_SIZE);
  lexer->queue_head = 0;
  lexer->queue_size = 0;
  lexer->queue_allocate_size = INIT_SIZE;
  lexer->context = CTX_NL;

  while(1) {
    struct utf8c uc = remove_comment(lexer);
    unsigned char c = uc.sequence[0];
    if(!(c == ' ' || c == '\t' || c == '\v' || c == '\f' || c == '\n')) {
      push_char_queue(lexer, uc);
      break;
    }
  }

  return lexer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x40
popq %rdi
callq 0x10b0
testq %rax, %rax
je 0x1ace
movq %rax, %rbx
movq %r14, %rdi
callq 0x1650
movq %rax, (%rbx)
andl $0x0, 0x8(%rbx)
movl $0x300, %edi            # imm = 0x300
callq 0x10b0
movq %rax, 0x28(%rbx)
movaps 0x4649(%rip), %xmm0     # 0x60b0
movups %xmm0, 0x30(%rbx)
movabsq $0xfd00000000, %r14     # imm = 0xFD00000000
movabsq $0x900000000, %r15      # imm = 0x900000000
movabsq $0x100001400, %r12      # imm = 0x100001400
movq %rbx, %rdi
callq 0x1ae2
movq %rax, %rcx
andq %r14, %rcx
cmpq %r15, %rcx
je 0x1a89
movq %rax, %rcx
shrq $0x20, %rcx
cmpb $0x20, %cl
ja 0x1ab1
movzbl %cl, %ecx
btq %rcx, %r12
jb 0x1a89
movzbl %dl, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1c6b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x51eb(%rip), %rdi      # 0x6cc0
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/lex.c
// Function: push_char_queue
void push_char_queue(struct pp_token_lexer *lexer, struct utf8c uc) {
  if(lexer->queue_size >= lexer->queue_allocate_size) {
    struct utf8c *t = (struct utf8c *) malloc(sizeof(struct utf8c) * lexer->queue_allocate_size * 2);
    if(t == NULL) {
      perror("malloc");
      exit(1);
    }
    for(int i = 0; i < lexer->queue_size; i++) {
      t[i] = lexer->queue[(lexer->queue_head + i) % lexer->queue_allocate_size];
    }
    lexer->queue = t;
    lexer->queue_head = 0;
    lexer->queue_allocate_size *= 2;
  }
  lexer->queue[(lexer->queue_head + lexer->queue_size) % lexer->queue_allocate_size] = uc;
  lexer->queue_size++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0x34(%rdi), %r12d
movl 0x38(%rdi), %ebp
cmpl %ebp, %r12d
jge 0x1c91
movq 0x28(%r14), %rcx
movl 0x30(%r14), %eax
jmp 0x1cf9
movslq %ebp, %rax
imulq $0x18, %rax, %rdi
callq 0x10b0
testq %rax, %rax
je 0x1d1b
movq %rax, %rcx
xorl %esi, %esi
testl %r12d, %r12d
movl $0x0, %edi
cmovgl %r12d, %edi
movq %rax, %r8
cmpq %rsi, %rdi
je 0x1ce8
movq 0x28(%r14), %r9
movl 0x30(%r14), %eax
addl %esi, %eax
cltd
idivl %ebp
movslq %edx, %rax
imulq $0xc, %rax, %rax
movl 0x8(%r9,%rax), %edx
movl %edx, 0x8(%r8)
movq (%r9,%rax), %rax
movq %rax, (%r8)
incq %rsi
addq $0xc, %r8
jmp 0x1cb6
movq %rcx, 0x28(%r14)
andl $0x0, 0x30(%r14)
addl %ebp, %ebp
movl %ebp, 0x38(%r14)
xorl %eax, %eax
addl %r12d, %eax
cltd
idivl %ebp
movslq %edx, %rax
imulq $0xc, %rax, %rax
movq %r15, (%rcx,%rax)
movb %bl, 0x8(%rcx,%rax)
incl 0x34(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f9e(%rip), %rdi      # 0x6cc0
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/lex.c
// Function: allocate_pp_token
struct pp_token *allocate_pp_token() {
  struct pp_token *token = (struct pp_token *) malloc(sizeof(struct pp_token));
  if(token == NULL) {
    perror("malloc");
    exit(1);
  }
  token->text = allocate_string();
  return token;
}

// Assembly:
pushq %rbx
pushq $0x20
popq %rdi
callq 0x10b0
testq %rax, %rax
je 0x1d50
movq %rax, %rbx
xorl %eax, %eax
callq 0x1904
movq %rax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x4f69(%rip), %rdi      # 0x6cc0
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/lex.c
// Function: pop_char_queue
struct utf8c pop_char_queue(struct pp_token_lexer *lexer) {
  if(lexer->queue_size == 0) {
    error("internal: lexer character queue is empty\n");
  }

  struct utf8c uc = lexer->queue[lexer->queue_head];
  lexer->queue_head++;
  lexer->queue_head %= lexer->queue_allocate_size;
  lexer->queue_size--;
  return uc;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x34(%rdi), %edi
testl %edi, %edi
jne 0x1dc0
leaq 0x4f1d(%rip), %rdi      # 0x6cc7
leaq 0x4f8a(%rip), %rdx      # 0x6d3b
movl $0x9f, %esi
xorl %eax, %eax
callq 0x1252
movl 0x34(%rbx), %edi
movq 0x28(%rbx), %rax
movslq 0x30(%rbx), %rdx
imulq $0xc, %rdx, %rsi
movq (%rax,%rsi), %rcx
movb 0x8(%rax,%rsi), %sil
leal 0x1(%rdx), %eax
cltd
idivl 0x38(%rbx)
movl %edx, 0x30(%rbx)
decl %edi
movl %edi, 0x34(%rbx)
movq %rcx, %rax
movl %esi, %edx
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: allocate_pp_list
struct pp_list *allocate_pp_list() {
  struct pp_list *list = (struct pp_list *) malloc(sizeof(struct pp_list));
  if(list == NULL) {
    perror("malloc");
    exit(1);
  }
  list->head = NULL;
  list->tail = &(list->head);
  return list;
}

// Assembly:
pushq %rax
pushq $0x10
popq %rdi
callq 0x10b0
testq %rax, %rax
je 0x3274
andq $0x0, (%rax)
movq %rax, 0x8(%rax)
popq %rcx
retq
leaq 0x3a45(%rip), %rdi      # 0x6cc0
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: free_pp_list
void free_pp_list(struct pp_list *list) {
  struct pp_node *node = list->head;
  while(node != NULL) {
    struct pp_node *next = node->next;
    free(node);
    node = next;
  }
  free(list);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x32a5
movq 0x8(%rdi), %r14
callq 0x1030
movq %r14, %rdi
jmp 0x3292
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: append_pp_list
void append_pp_list(struct pp_list *list, struct pp_token *token) {
  struct pp_node *node = (struct pp_node *) malloc(sizeof(struct pp_node));
  node->token = token;
  node->next = NULL;
  node->skip = 0;
  *(list->tail) = node;
  list->tail = &(node->next);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x10b0
movq %rbx, (%rax)
andq $0x0, 0x8(%rax)
andl $0x0, 0x10(%rax)
leaq 0x8(%rax), %rcx
movq 0x8(%r14), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: allocate_macro_entry
struct macro_entry *allocate_macro_entry() {
  struct macro_entry *macro = (struct macro_entry *) malloc(sizeof(struct macro_entry));
  if(macro == NULL) {
    perror("malloc");
    exit(1);
  }
  macro->replacement_list = allocate_pp_list();
  macro->expanded = 0;
  return macro;
}

// Assembly:
pushq %rbx
movl $0x428, %edi            # imm = 0x428
callq 0x10b0
testq %rax, %rax
je 0x332c
movq %rax, %rbx
callq 0x325c
movq %rax, 0x418(%rbx)
andl $0x0, 0x420(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x398d(%rip), %rdi      # 0x6cc0
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: ident_hash
int ident_hash(const unsigned char *ident) {
  const int BASE = 257;
  int h = 0;
  for(int i = 0; ident[i] != '\0'; i++) {
    h = (h * BASE + ident[i]) % MACRO_TABLE_SIZE;
  }
  return h;
}

// Assembly:
xorl %edx, %edx
movl $0xa001, %ecx           # imm = 0xA001
movzbl (%rdi), %esi
testl %esi, %esi
je 0x3378
imull $0x101, %edx, %eax      # imm = 0x101
addl %esi, %eax
xorl %edx, %edx
divl %ecx
incq %rdi
jmp 0x3360
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: compare_macro
int compare_macro(const struct macro_entry *macro1, const struct macro_entry *macro2) {
  if(macro1->type != macro2->type) {
    return 0;
  }

  if(macro1->type == MACRO_FUNCTION) {
    if(macro1->parameter_ellipsis != macro2->parameter_ellipsis) return 0;
    if(macro1->parameter_size != macro2->parameter_size) return 0;
    for(int i = 0; i < macro1->parameter_size; i++) {
      if(strcmp(macro1->parameters[i]->head, macro2->parameters[i]->head) != 0) return 0;
    }
  }

  struct pp_node *node1 = macro1->replacement_list->head;
  struct pp_node *node2 = macro2->replacement_list->head;
  while(1) {
    if(node1 == NULL || node2 == NULL) {
      if(node1 == NULL && node2 == NULL) break;
      return 0;
    }
    if(node1->token->type != node2->token->type) return 0;
    if(strcmp(node1->token->text->head, node2->token->text->head) != 0) return 0;
    node1 = node1->next;
    node2 = node2->next;
  }

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl (%rdi), %eax
xorl %ebx, %ebx
cmpl (%rsi), %eax
jne 0x3439
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x1, %eax
jne 0x33e6
movl 0x14(%r15), %eax
cmpl 0x14(%r14), %eax
jne 0x3439
movl 0x10(%r15), %r12d
cmpl 0x10(%r14), %r12d
jne 0x3439
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x33e6
movq 0x18(%r15,%r13,8), %rax
movq (%rax), %rdi
movq 0x18(%r14,%r13,8), %rax
movq (%rax), %rsi
callq 0x1080
incq %r13
testl %eax, %eax
je 0x33c1
xorl %ebx, %ebx
jmp 0x3439
movq 0x418(%r15), %r15
movq 0x418(%r14), %r14
movq (%r14), %r14
movq (%r15), %r15
testq %r15, %r15
je 0x3431
testq %r14, %r14
je 0x3431
movq (%r15), %rax
movl (%rax), %edx
movq (%r14), %rcx
cmpl (%rcx), %edx
jne 0x3439
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq 0x10(%rcx), %rax
movq (%rax), %rsi
callq 0x1080
testl %eax, %eax
jne 0x3439
addq $0x8, %r15
addq $0x8, %r14
jmp 0x33f4
xorl %ebx, %ebx
orq %r14, %r15
sete %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: insert_macro_table
void insert_macro_table(struct macro_entry *macro) {
  int h1 = ident_hash(macro->identifier);
  for(int i = 0, h = h1; i < MACRO_TABLE_SIZE; i++, h = (h + 1) % MACRO_TABLE_SIZE) {
    if(macro_table[h] == NULL) {
      macro_table[h] = macro;
      break;
    } else {
      if(strcmp(macro_table[h]->identifier, macro->identifier) == 0) {
        if(compare_macro(macro_table[h], macro)) {
          break;
        } else {
          error("duplicated macro definition: %s\n", macro->identifier);
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x3359
movl %eax, %ebp
movl $0xa001, %r15d          # imm = 0xA001
leaq 0x6c45(%rip), %r12      # 0xa0b0
subl $0x1, %r15d
jb 0x34d0
movl %ebp, %eax
movq (%r12,%rax,8), %r14
testq %r14, %r14
je 0x34cc
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %r13
movq %r13, %rsi
callq 0x1080
testl %eax, %eax
jne 0x34ba
movq %r14, %rdi
movq %rbx, %rsi
callq 0x337b
testl %eax, %eax
jne 0x34d0
leaq 0x3a6a(%rip), %rdi      # 0x6f10
pushq $0x75
popq %rsi
leaq 0x3a6d(%rip), %rdx      # 0x6f1d
movq %r13, %rcx
xorl %eax, %eax
callq 0x1252
incl %ebp
cmpl $0xa001, %ebp           # imm = 0xA001
movl $0x0, %eax
cmovel %eax, %ebp
jmp 0x346b
movq %rbx, (%r12,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: delete_macro_table
void delete_macro_table(const unsigned char *identifier) {
  int h1 = ident_hash(identifier);
  for(int i = 0, h = h1; i < MACRO_TABLE_SIZE; i++, h = (h + 1) % MACRO_TABLE_SIZE) {
    if(macro_table[h] == NULL) break;
    if(strcmp(macro_table[h]->identifier, identifier) == 0) {
      macro_table[h] = NULL;
      h = (h + 1) % MACRO_TABLE_SIZE;
      for(int j = i; j < MACRO_TABLE_SIZE; j++, h = (h + 1) % MACRO_TABLE_SIZE) {
        if(macro_table[h] == NULL) break;
        struct macro_entry *t = macro_table[h];
        macro_table[h] = NULL;
        insert_macro_table(t);
      }
      break;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3359
movl %eax, %ebx
movl $0xa001, %ebp           # imm = 0xA001
leaq 0x6bb0(%rip), %r15      # 0xa0b0
movl $0xa001, %r13d          # imm = 0xA001
subl $0x1, %r13d
jb 0x356f
movl %ebx, %r12d
movq (%r15,%r12,8), %rax
testq %rax, %rax
je 0x356f
movq 0x8(%rax), %rdi
movq %r14, %rsi
callq 0x1080
testl %eax, %eax
je 0x353d
incl %ebx
cmpl $0xa001, %ebx           # imm = 0xA001
movl $0x0, %eax
cmovel %eax, %ebx
movl %r13d, %ebp
jmp 0x3506
andq $0x0, (%r15,%r12,8)
movl $0xa001, %r14d          # imm = 0xA001
incl %ebx
movl %ebx, %eax
xorl %edx, %edx
divl %r14d
subl $0x1, %ebp
jb 0x356f
movl %edx, %ebx
movl %edx, %eax
movq (%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x356f
andq $0x0, (%r15,%rax,8)
callq 0x3445
jmp 0x3548
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: search_macro_table
struct macro_entry *search_macro_table(const unsigned char *identifier) {
  int h1 = ident_hash(identifier);
  for(int i = 0, h = h1; i < MACRO_TABLE_SIZE; i++, h = (h + 1) % MACRO_TABLE_SIZE) {
    if(macro_table[h] == NULL) break;
    if(strcmp(macro_table[h]->identifier, identifier) == 0) {
      return macro_table[h];
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3359
movl %eax, %ebp
movl $0xa001, %r15d          # imm = 0xA001
xorl %r12d, %r12d
leaq 0x6b0d(%rip), %r13      # 0xa0b0
subl $0x1, %r15d
jb 0x35d3
movl %ebp, %eax
movq (%r13,%rax,8), %r14
testq %r14, %r14
je 0x35d3
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
je 0x35d6
incl %ebp
cmpl $0xa001, %ebp           # imm = 0xA001
cmovel %r12d, %ebp
jmp 0x35a3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: check_object_macro_invocation
int check_object_macro_invocation(struct preprocessor *pp, struct pp_node *node) {
  if(node->token->type != PP_IDENT) return 0;
  if(node->skip) return 0;

  struct macro_entry *macro = search_macro_table(node->token->text->head);
  return macro != NULL && !macro->expanded && macro->type == MACRO_OBJECT;
}

// Assembly:
pushq %rbx
movq (%rsi), %rax
xorl %ebx, %ebx
cmpl $0x1, (%rax)
jne 0x35f9
cmpl $0x0, 0x10(%rsi)
je 0x35fd
movl %ebx, %eax
popq %rbx
retq
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x357e
testq %rax, %rax
je 0x35f9
cmpl $0x0, 0x420(%rax)
jne 0x35f9
xorl %ebx, %ebx
cmpl $0x0, (%rax)
sete %bl
jmp 0x35f9
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: check_function_macro_invocation
int check_function_macro_invocation(struct preprocessor *pp, struct pp_node *node) {
  if(node->token->type != PP_IDENT) return 0;
  if(node->skip) return 0;

  struct macro_entry *macro = search_macro_table(node->token->text->head);
  if(macro == NULL || macro->expanded || macro->type != MACRO_FUNCTION) {
    return 0;
  }

  struct pp_node *current = node->next;
  if(current == NULL) {
    return 0;
  }
  if(current->token->type == PP_NEW_LINE || current->token->type == PP_SPACE) {
    current = current->next;
    if(current == NULL) return 0;
  }
  if(current->token->type != PP_LPAREN) return 0;

  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rsi), %rax
xorl %ebx, %ebx
cmpl $0x1, (%rax)
jne 0x3638
movq %rsi, %r14
cmpl $0x0, 0x10(%rsi)
je 0x3642
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x357e
testq %rax, %rax
je 0x3638
cmpl $0x0, 0x420(%rax)
jne 0x3638
cmpl $0x1, (%rax)
jne 0x3638
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3638
movq (%rax), %rcx
movl (%rcx), %ecx
leal -0x3b(%rcx), %edx
cmpl $0x1, %edx
ja 0x3685
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x3638
movq (%rax), %rax
movl (%rax), %ecx
xorl %ebx, %ebx
cmpl $0x7, %ecx
sete %bl
jmp 0x3638
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: object_macro_invocation
struct pp_list *object_macro_invocation(struct preprocessor *pp, struct macro_entry *macro) {
  macro->expanded = 1;

  struct pp_list *list = allocate_pp_list();
  for(struct pp_node *node = macro->replacement_list->head; node != NULL; node = node->next) {
    append_pp_list(list, node->token);
  }

  struct pp_list *concat_list = concat_macro_token(list);
  struct pp_list *result = scan_macro(pp, concat_list);

  macro->expanded = 0;
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0x420(%rsi)
callq 0x325c
movq %rax, %r15
movq 0x418(%rbx), %r12
movq (%r12), %r12
testq %r12, %r12
je 0x3985
movq (%r12), %rsi
movq %r15, %rdi
callq 0x32b4
addq $0x8, %r12
jmp 0x396a
movq %r15, %rdi
callq 0x3d96
movq %r14, %rdi
movq %rax, %rsi
callq 0x368f
andl $0x0, 0x420(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: conditional_expression
int conditional_expression(struct pp_node **node) {
  int result = logical_or_expression(node);
  if((*node) && (*node)->token->type == PP_QUESTION) {
    *node = (*node)->next;
    int left = conditional_expression(node);
    *node = (*node)->next;
    int right = conditional_expression(node);
    result = result ? left : right;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x4609
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x42ad
movq (%rax), %rcx
cmpl $0x35, (%rcx)
jne 0x42ad
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x4265
movl %eax, %ebp
movq (%r14), %rax
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x4265
testl %ebx, %ebx
cmovnel %ebp, %eax
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: unary_expression
int unary_expression(struct pp_node **node) {
  if((*node)->token->type == PP_PLUS) {
    *node = (*node)->next;
    return +primary_expression(node);
  } else if((*node)->token->type == PP_MINUS) {
    *node = (*node)->next;
    return -primary_expression(node);
  } else if((*node)->token->type == PP_TILDE) {
    *node = (*node)->next;
    return ~primary_expression(node);
  } else if((*node)->token->type == PP_NOT) {
    *node = (*node)->next;
    return !primary_expression(node);
  }
  return primary_expression(node);
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq (%rax), %rcx
movl (%rcx), %ecx
cmpl $0x34, %ecx
je 0x4305
cmpl $0x11, %ecx
je 0x42de
cmpl $0x28, %ecx
je 0x42ee
cmpl $0xe, %ecx
jne 0x42d8
movq 0x8(%rax), %rax
movq %rax, (%rdi)
popq %rax
jmp 0x40f5
movq 0x8(%rax), %rax
movq %rax, (%rdi)
callq 0x40f5
negl %eax
jmp 0x4313
movq 0x8(%rax), %rax
movq %rax, (%rdi)
callq 0x40f5
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
jmp 0x4313
movq 0x8(%rax), %rax
movq %rax, (%rdi)
callq 0x40f5
notl %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: multiplicative_expression
int multiplicative_expression(struct pp_node **node) {
  int result = unary_expression(node);
  while((*node) && ((*node)->token->type == PP_MUL || (*node)->token->type == PP_DIV || (*node)->token->type == PP_MOD)) {
    enum pp_token_type type = (*node)->token->type;
    *node = (*node)->next;
    int value = unary_expression(node);
    if(type == PP_MUL) {
      result = result * value;
    } else if(type == PP_DIV) {
      result = result / value;
    } else if(type == PP_MOD) {
      result = result % value;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x42b4
movl %eax, %ebp
movl $0x2a00000, %r14d       # imm = 0x2A00000
movq (%rbx), %rax
testq %rax, %rax
je 0x4380
movq (%rax), %rcx
movl (%rcx), %r15d
cmpl $0x19, %r15d
ja 0x4380
btl %r15d, %r14d
jae 0x4380
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x42b4
movl %eax, %ecx
cmpl $0x19, %r15d
je 0x436e
cmpl $0x17, %r15d
je 0x4377
cmpl $0x15, %r15d
jne 0x432c
imull %ecx, %ebp
jmp 0x432c
movl %ebp, %eax
cltd
idivl %ecx
movl %edx, %ebp
jmp 0x432c
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %ebp
jmp 0x432c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: additive_expression
int additive_expression(struct pp_node **node) {
  int result = multiplicative_expression(node);
  while((*node) && ((*node)->token->type == PP_PLUS || (*node)->token->type == PP_MINUS)) {
    enum pp_token_type type = (*node)->token->type;
    *node = (*node)->next;
    int value = multiplicative_expression(node);
    if(type == PP_PLUS) {
      result = result + value;
    } else if(value == PP_MINUS) {
      result = result - value;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x4315
movl %eax, %r14d
movq (%rbx), %rax
testq %rax, %rax
je 0x43dc
movq (%rax), %rcx
movl (%rcx), %ebp
cmpl $0x11, %ebp
je 0x43b3
cmpl $0xe, %ebp
jne 0x43dc
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x4315
leal (%rax,%r14), %ecx
leal -0x11(%r14), %edx
cmpl $0x11, %eax
cmovnel %r14d, %edx
cmpl $0xe, %ebp
cmovel %ecx, %edx
movl %edx, %r14d
jmp 0x439c
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: shift_expression
int shift_expression(struct pp_node **node) {
  int result = additive_expression(node);
  while((*node) && ((*node)->token->type == PP_LSHIFT || (*node)->token->type == PP_RSHIFT)) {
    enum pp_token_type type = (*node)->token->type;
    *node = (*node)->next;
    int value = additive_expression(node);
    if(type == PP_LSHIFT) {
      result = result << value;
    } else if(type == PP_RSHIFT) {
      result = result >> value;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x438d
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x4433
movq (%rax), %rcx
movl (%rcx), %r14d
cmpl $0x31, %r14d
je 0x440c
cmpl $0x2b, %r14d
jne 0x4433
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x438d
cmpl $0x31, %r14d
je 0x442d
cmpl $0x2b, %r14d
jne 0x43f2
movl %eax, %ecx
shll %cl, %ebp
jmp 0x43f2
movl %eax, %ecx
sarl %cl, %ebp
jmp 0x43f2
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: relational_expression
int relational_expression(struct pp_node **node) {
  int result = shift_expression(node);
  while((*node) && ((*node)->token->type == PP_LT || (*node)->token->type == PP_GT || (*node)->token->type == PP_LTE || (*node)->token->type == PP_GTE)) {
    enum pp_token_type type = (*node)->token->type;
    *node = (*node)->next;
    int value = shift_expression(node);
    if(type == PP_LT) {
      result = result < value;
    } else if(type == PP_GT) {
      result = result > value;
    } else if(type == PP_LTE) {
      result = result <= value;
    } else if(type == PP_GTE) {
      result = result >= value;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x43e4
movl %eax, %ebp
movabsq $0x9240000000000, %r14  # imm = 0x9240000000000
leaq 0x2983(%rip), %r15      # 0x6de0
movq (%rbx), %rax
testq %rax, %rax
je 0x44b8
movq (%rax), %rcx
movl (%rcx), %r12d
cmpq $0x33, %r12
ja 0x44b8
btq %r12, %r14
jae 0x44b8
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x43e4
addl $-0x2a, %r12d
cmpl $0x9, %r12d
ja 0x445d
movslq (%r15,%r12,4), %rcx
addq %r15, %rcx
jmpq *%rcx
cmpl %eax, %ebp
setl %al
jmp 0x44b3
cmpl %eax, %ebp
setg %al
jmp 0x44b3
cmpl %eax, %ebp
setge %al
jmp 0x44b3
cmpl %eax, %ebp
setle %al
movzbl %al, %ebp
jmp 0x445d
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: equality_expression
int equality_expression(struct pp_node **node) {
  int result = relational_expression(node);
  while((*node) && ((*node)->token->type == PP_EQ || (*node)->token->type == PP_NEQ)) {
    enum pp_token_type type = (*node)->token->type;
    *node = (*node)->next;
    int value = relational_expression(node);
    if(type == PP_EQ) {
      result = result == value;
    } else if(type == PP_NEQ) {
      result = result == value;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x443a
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x4511
movq (%rax), %rcx
movl (%rcx), %r14d
cmpl $0x29, %r14d
je 0x44eb
cmpl $0x27, %r14d
jne 0x4511
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x443a
cmpl $0x29, %r14d
je 0x4506
cmpl $0x27, %r14d
jne 0x44d1
xorl %ecx, %ecx
cmpl %eax, %ebp
sete %cl
movl %ecx, %ebp
jmp 0x44d1
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: and_expression
int and_expression(struct pp_node **node) {
  int result = equality_expression(node);
  while((*node) && (*node)->token->type == PP_AND) {
    *node = (*node)->next;
    int value = equality_expression(node);
    result = result & value;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x44c3
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x4548
movq (%rax), %rcx
cmpl $0x1e, (%rcx)
jne 0x4548
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x44c3
andl %eax, %ebp
jmp 0x4525
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: exclusive_or_expression
int exclusive_or_expression(struct pp_node **node) {
  int result = and_expression(node);
  while((*node) && (*node)->token->type == PP_XOR) {
    *node = (*node)->next;
    int value = and_expression(node);
    result = result ^ value;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4518
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x4581
movq (%rax), %rcx
cmpl $0x24, (%rcx)
jne 0x4581
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x4518
xorl %eax, %ebp
jmp 0x455e
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: inclusive_or_expression
int inclusive_or_expression(struct pp_node **node) {
  int result = exclusive_or_expression(node);
  while((*node) && (*node)->token->type == PP_OR) {
    *node = (*node)->next;
    int value = exclusive_or_expression(node);
    result = result | value;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4551
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x45ba
movq (%rax), %rcx
cmpl $0x21, (%rcx)
jne 0x45ba
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x4551
orl %eax, %ebp
jmp 0x4597
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: logical_and_expression
int logical_and_expression(struct pp_node **node) {
  int result = inclusive_or_expression(node);
  while((*node) && (*node)->token->type == PP_LAND) {
    *node = (*node)->next;
    int value = inclusive_or_expression(node);
    result = result && value;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x458a
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x4600
movq (%rax), %rcx
cmpl $0x1f, (%rcx)
jne 0x4600
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x458a
testl %ebp, %ebp
setne %cl
testl %eax, %eax
setne %al
andb %cl, %al
movzbl %al, %ebp
jmp 0x45d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: logical_or_expression
int logical_or_expression(struct pp_node **node) {
  int result = logical_and_expression(node);
  while((*node) && (*node)->token->type == PP_LOR) {
    *node = (*node)->next;
    int value = logical_and_expression(node);
    result = result || value;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x45c3
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x4640
movq (%rax), %rcx
cmpl $0x22, (%rcx)
jne 0x4640
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x45c3
xorl %ecx, %ecx
orl %eax, %ebp
setne %cl
movl %ecx, %ebp
jmp 0x4616
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: check_defined_operator
struct pp_node *check_defined_operator(struct pp_node **node) {
  struct pp_node *ident;

  *node = (*node)->next;
  if((*node)->token->type == PP_SPACE) {
    *node = (*node)->next;
  }

  if((*node)->token->type == PP_IDENT) {
    ident = *node;
  } else if((*node)->token->type == PP_LPAREN) {
    *node = (*node)->next;
    if((*node)->token->type == PP_SPACE) {
      *node = (*node)->next;
    }

    if((*node)->token->type == PP_IDENT) {
      ident = *node;
      *node = (*node)->next;

      if((*node)->token->type != PP_RPAREN) {
        error("%s is expected.\n", pp_token_name[PP_RPAREN]);
      }
    } else {
      error("%s is expected.\n", pp_token_name[PP_IDENT]);
    }
  } else {
    error("%s or %s is expected.\n", pp_token_name[PP_IDENT], pp_token_name[PP_RPAREN]);
  }

  return ident;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rbx
movq %rbx, (%rdi)
movq (%rbx), %rax
movl (%rax), %eax
cmpl $0x3c, %eax
jne 0x466a
movq 0x8(%rbx), %rbx
movq %rbx, (%rdi)
movq (%rbx), %rax
movl (%rax), %eax
cmpl $0x1, %eax
je 0x4724
cmpl $0x7, %eax
jne 0x46d1
movq 0x8(%rbx), %rbx
movq %rbx, (%rdi)
movq (%rbx), %rax
movl (%rax), %eax
cmpl $0x3c, %eax
jne 0x4695
movq 0x8(%rbx), %rbx
movq %rbx, (%rdi)
movq (%rbx), %rax
movl (%rax), %eax
cmpl $0x1, %eax
jne 0x46ff
movq 0x8(%rbx), %rax
movq %rax, (%rdi)
movq (%rax), %rax
cmpl $0x8, (%rax)
je 0x4724
movl $0x100, %ecx            # imm = 0x100
addq 0x592b(%rip), %rcx      # 0x9fe0
leaq 0x2854(%rip), %rdi      # 0x6f10
leaq 0x292e(%rip), %rdx      # 0x6ff1
movl $0x31c, %esi            # imm = 0x31C
xorl %eax, %eax
callq 0x1252
jmp 0x4724
leaq 0x1de8(%rip), %r8       # 0x64c0
leaq 0x20(%r8), %rcx
addq $0x100, %r8             # imm = 0x100
leaq 0x2826(%rip), %rdi      # 0x6f10
leaq 0x28fa(%rip), %rdx      # 0x6feb
movl $0x322, %esi            # imm = 0x322
xorl %eax, %eax
callq 0x1252
jmp 0x4724
leaq 0x1dba(%rip), %rcx      # 0x64c0
addq $0x20, %rcx
leaq 0x27ff(%rip), %rdi      # 0x6f10
leaq 0x28d9(%rip), %rdx      # 0x6ff1
movl $0x31f, %esi            # imm = 0x31F
xorl %eax, %eax
callq 0x1252
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: skip_group
void skip_group(struct preprocessor *pp) {
  while(peek_pp_token(pp)->type != PP_NONE) {
    if(peek_pp_token(pp)->type == PP_SHARP) {
      read_pp_token_with_space(pp);

      if(check_if_section(pp)) {
        skip_line(pp);
        skip_group(pp);
        while(check_keyword(pp, "elif")) {
          skip_line(pp);
          skip_group(pp);
        }
        if(check_keyword(pp, "else")) {
          skip_line(pp);
          skip_group(pp);
        }
        if(check_keyword(pp, "endif")) {
          skip_line(pp);
        }
      } else if(check_group_end(pp)) {
        break;
      } else {
        skip_line(pp);
      }
    } else {
      skip_line(pp);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2585(%rip), %r14      # 0x7017
leaq 0x2583(%rip), %r15      # 0x701c
leaq 0x2581(%rip), %r12      # 0x7021
movq %rbx, %rdi
callq 0x3fa6
cmpl $0x3e, (%rax)
je 0x4b3d
movq %rbx, %rdi
callq 0x3fa6
cmpl $0x39, (%rax)
jne 0x4b30
movq %rbx, %rdi
callq 0x40b9
movq %rbx, %rdi
callq 0x54d6
testl %eax, %eax
je 0x4b24
movq %rbx, %rdi
callq 0x554e
movq %rbx, %rdi
callq 0x4a80
movq %rbx, %rdi
movq %r14, %rsi
callq 0x400e
testl %eax, %eax
jne 0x4ad2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x400e
testl %eax, %eax
je 0x4b10
movq %rbx, %rdi
callq 0x554e
movq %rbx, %rdi
callq 0x4a80
movq %rbx, %rdi
movq %r12, %rsi
callq 0x400e
testl %eax, %eax
jne 0x4b30
jmp 0x4aa0
movq %rbx, %rdi
callq 0x5512
testl %eax, %eax
jne 0x4b3d
movq %rbx, %rdi
callq 0x554e
jmp 0x4aa0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: if_directive
int if_directive(struct preprocessor *pp) {
  skip_pp_token_with_space(pp);

  int control = if_control(pp);
  conditional_include(pp, control);

  return control;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x40db
movq %rbx, %rdi
callq 0x4729
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x48c0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: ifdef_directive
int ifdef_directive(struct preprocessor *pp) {
  skip_pp_token_with_space(pp);

  struct pp_token *ident = expect_pp_token(pp, PP_IDENT);
  discard_new_line(pp);

  struct macro_entry *macro = search_macro_table(ident->text->head);
  int control = macro != NULL;
  conditional_include(pp, control);

  return control;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x40db
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x4065
movq %rax, %r14
movq %rbx, %rdi
callq 0x40a7
movq 0x10(%r14), %rax
movq (%rax), %rdi
callq 0x357e
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
movq %rbx, %rdi
movl %ebp, %esi
callq 0x48c0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: elif_directive
int elif_directive(struct preprocessor *pp, int skip) {
  skip_pp_token_with_space(pp);

  int control = if_control(pp);
  conditional_include(pp, !skip && control);

  return skip || control;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x40db
movq %r14, %rdi
callq 0x4729
movl %eax, %ebp
testl %ebx, %ebx
sete %al
testl %ebp, %ebp
setne %cl
andb %al, %cl
movzbl %cl, %esi
movq %r14, %rdi
callq 0x48c0
xorl %eax, %eax
orl %ebp, %ebx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: if_section
void if_section(struct preprocessor *pp) {
  int skip;

  if(check_keyword(pp, "if")) {
    skip = if_directive(pp);
  } else if(check_keyword(pp, "ifdef")) {
    skip = ifdef_directive(pp);
  } else if(check_keyword(pp, "ifndef")) {
    skip = ifndef_directive(pp);
  }

  while(check_keyword(pp, "elif")) {
    skip = elif_directive(pp, skip);
  }

  if(check_keyword(pp, "else")) {
    else_directive(pp, skip);
  }

  if(check_keyword(pp, "endif")) {
    endif_directive(pp);
  } else {
    error("#endif directive is missing.\n");
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x239b(%rip), %rsi      # 0x7024
callq 0x400e
testl %eax, %eax
je 0x4c9c
movq %rbx, %rdi
callq 0x4b49
jmp 0x4cd8
leaq 0x2367(%rip), %rsi      # 0x700a
movq %rbx, %rdi
callq 0x400e
testl %eax, %eax
je 0x4cb9
movq %rbx, %rdi
callq 0x4b71
jmp 0x4cd8
leaq 0x2350(%rip), %rsi      # 0x7010
movq %rbx, %rdi
callq 0x400e
testl %eax, %eax
je 0x4d58
movq %rbx, %rdi
callq 0x4bb9
movl %eax, %ebp
leaq 0x2336(%rip), %r14      # 0x7017
movq %rbx, %rdi
movq %r14, %rsi
callq 0x400e
testl %eax, %eax
je 0x4cfe
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4c01
movl %eax, %ebp
jmp 0x4ce1
leaq 0x2317(%rip), %rsi      # 0x701c
movq %rbx, %rdi
callq 0x400e
testl %eax, %eax
je 0x4d1b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4c3c
leaq 0x22ff(%rip), %rsi      # 0x7021
movq %rbx, %rdi
callq 0x400e
testl %eax, %eax
je 0x4d3a
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4c69
leaq 0x21cf(%rip), %rdi      # 0x6f10
leaq 0x22df(%rip), %rdx      # 0x7027
movl $0x3ac, %esi            # imm = 0x3AC
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1252
jmp 0x4cda
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: try_fopen
int try_fopen(char *file) {
  FILE *fp = fopen(file, "r");

  if(fp == NULL) return 0;

  fclose(fp);
  return 1;
}

// Assembly:
pushq %rax
leaq 0x12b2(%rip), %rsi      # 0x6014
callq 0x10c0
testq %rax, %rax
je 0x4d79
movq %rax, %rdi
callq 0x1040
pushq $0x1
popq %rax
jmp 0x4d7b
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: search_header_file
struct string *search_header_file(struct string *text) {
  char location[4][64] = {
    "/usr/lib/gcc/x86_64-linux-gnu/7/include/",
    "/usr/include/",
    "/usr/include/linux/",
    "/usr/include/x86_64-linux-gnu/"
  };

  for(int k = 0; k < 4; k++) {
    struct string *path = allocate_string();
    write_string(path, location[k]);
    for(int i = 1; i < text->size - 1; i++) {
      append_string(path, text->head[i]);
    }

    if(try_fopen(path->head)) return path;

    free_string(path);
  }

  // failed to search header file
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x2079(%rip), %rsi      # 0x6e10
movq %rsp, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x10a0
pushq $0x1
popq %r15
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x4e0b
xorl %eax, %eax
callq 0x1904
movq %rax, %r14
movq %r12, %rax
shlq $0x6, %rax
leaq (%rsp,%rax), %rsi
movq %r14, %rdi
callq 0x19b2
movq %r15, %r13
movslq 0x8(%rbx), %rax
decq %rax
cmpq %rax, %r13
jge 0x4df2
movq (%rbx), %rax
movzbl (%rax,%r13), %esi
movq %r14, %rdi
callq 0x1931
incq %r13
jmp 0x4dd1
movq (%r14), %rdi
callq 0x4d5a
testl %eax, %eax
jne 0x4e0e
movq %r14, %rdi
callq 0x1a0c
incq %r12
jmp 0x4dab
xorl %r14d, %r14d
movq %r14, %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: search_named_source_file
struct string *search_named_source_file(struct string *text, const char *current_file) {
  int last_slash = 0;
  for(int i = 0; current_file[i]; i++) {
    if(current_file[i] == '/') {
      last_slash = i;
    }
  }

  struct string *dir = allocate_string();
  if(last_slash > 0) {
    for(int i = 0; i < last_slash; i++) {
      append_string(dir, current_file[i]);
    }
    append_string(dir, '/');
  }

  struct string *path = allocate_string();
  concat_string(path, dir);
  for(int i = 1; i < text->size - 1; i++) {
    append_string(path, text->head[i]);
  }

  if(try_fopen(path->head)) {
    return path;
  }

  free_string(path);

  // reprocess as if header file was read
  return search_header_file(text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
xorl %ebp, %ebp
movzbl (%r14,%rax), %ecx
cmpl $0x2f, %ecx
je 0x4e47
testl %ecx, %ecx
jne 0x4e49
jmp 0x4e4e
movl %eax, %ebp
incq %rax
jmp 0x4e37
xorl %eax, %eax
callq 0x1904
movq %rax, %r15
testl %ebp, %ebp
jle 0x4e84
movl %ebp, %r12d
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x4e79
movzbl (%r14,%r13), %esi
movq %r15, %rdi
callq 0x1931
incq %r13
jmp 0x4e62
pushq $0x2f
popq %rsi
movq %r15, %rdi
callq 0x1931
xorl %eax, %eax
callq 0x1904
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x19da
pushq $0x1
popq %r15
movslq 0x8(%rbx), %rax
decq %rax
cmpq %rax, %r15
jge 0x4ebe
movq (%rbx), %rax
movzbl (%rax,%r15), %esi
movq %r14, %rdi
callq 0x1931
incq %r15
jmp 0x4e9d
movq (%r14), %rdi
callq 0x4d5a
testl %eax, %eax
je 0x4edc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1a0c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d7d
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: include_directive
void include_directive(struct preprocessor *pp) {
  struct pp_token *header;
  if(peek_pp_token(pp)->type == PP_H_NAME) {
    header = read_pp_token(pp);
  } else {
    error("macro-replaced include directive is not implemented yet.\n");
  }
  discard_new_line(pp);

  struct string *path;
  if(header->type == PP_H_NAME && header->text->head[0] == '<') {
    path = search_header_file(header->text);
  } else if(header->type == PP_H_NAME && header->text->head[0] == '"') {
    path = search_named_source_file(header->text, pp->lexer->src->file);
  }

  if(path == NULL) {
    error("failed to search include file\n");
  }

  struct pp_list *list = parse_preprocessing_file(path->head);
  concat_pp_list(pp->list, list);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3fa6
cmpl $0x0, (%rax)
je 0x4f27
leaq 0x1ffe(%rip), %rdi      # 0x6f10
leaq 0x212c(%rip), %rdx      # 0x7045
movl $0x3f7, %esi            # imm = 0x3F7
xorl %eax, %eax
callq 0x1252
jmp 0x4f32
movq %rbx, %rdi
callq 0x3fcd
movq %rax, %r14
movq %rbx, %rdi
callq 0x40a7
cmpl $0x0, (%r14)
jne 0x4f9a
movq 0x10(%r14), %rdi
movq (%rdi), %rax
movzbl (%rax), %eax
cmpl $0x22, %eax
jne 0x4f60
movq (%rbx), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4e22
jmp 0x4f6a
cmpl $0x3c, %eax
jne 0x4f9a
callq 0x4d7d
testq %rax, %rax
je 0x4f9a
movq (%rax), %rdi
callq 0x4fb4
movq (%rax), %rcx
testq %rcx, %rcx
je 0x4f92
movq 0x18(%rbx), %rdx
movq 0x8(%rdx), %rsi
movq %rcx, (%rsi)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1f6f(%rip), %rdi      # 0x6f10
leaq 0x20d7(%rip), %rdx      # 0x707f
movl $0x403, %esi            # imm = 0x403
xorl %eax, %eax
callq 0x1252
// File: /workspace/github_c_makefile_star2_O2/ShinyaKato[P]skcc/preprocess.c
// Function: parse_preprocessing_file
struct pp_list *parse_preprocessing_file(unsigned char *file) {
  struct preprocessor pp;
  pp.lexer = allocate_pp_token_lexer(file);
  pp.token_queue_size = 0;
  pp.list = allocate_pp_list();

  group(&pp);

  if(!check_pp_token(&pp, PP_NONE)) {
    if(check_keyword(&pp, "elif")) {
      error("invalid #elif directive appeared.\n");
    } else if(check_keyword(&pp, "else")) {
      error("invalid #else directive appeared.\n");
    } else if(check_keyword(&pp, "endif")) {
      error("invalid #endif directive appeared.\n");
    }
  }

  return pp.list;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
callq 0x1a24
movq %rsp, %rbx
movq %rax, (%rbx)
andl $0x0, 0x10(%rbx)
callq 0x325c
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x48cd
pushq $0x3e
popq %rsi
movq %rbx, %rdi
callq 0x3ffb
testl %eax, %eax
jne 0x5065
leaq 0x2028(%rip), %rsi      # 0x7017
movq %rsp, %rdi
callq 0x400e
testl %eax, %eax
je 0x5010
leaq 0x1f0e(%rip), %rdi      # 0x6f10
leaq 0x21be(%rip), %rdx      # 0x71c7
movl $0x504, %esi            # imm = 0x504
jmp 0x505e
leaq 0x2005(%rip), %rsi      # 0x701c
movq %rsp, %rdi
callq 0x400e
testl %eax, %eax
je 0x5038
leaq 0x1ee6(%rip), %rdi      # 0x6f10
leaq 0x21b9(%rip), %rdx      # 0x71ea
movl $0x506, %esi            # imm = 0x506
jmp 0x505e
leaq 0x1fe2(%rip), %rsi      # 0x7021
movq %rsp, %rdi
callq 0x400e
testl %eax, %eax
je 0x5065
leaq 0x1ebe(%rip), %rdi      # 0x6f10
leaq 0x21b4(%rip), %rdx      # 0x720d
movl $0x508, %esi            # imm = 0x508
xorl %eax, %eax
callq 0x1252
movq 0x18(%rsp), %rax
addq $0x20, %rsp
popq %rbx
retq