LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
xorl %ebx, %ebx
cmpl (%rsi), %eax
jne 0x3cc1
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x1, %eax
jne 0x3c93
movl 0x14(%r15), %eax
cmpl 0x14(%r14), %eax
jne 0x3cc1
movl 0x10(%r15), %r12d
cmpl 0x10(%r14), %r12d
jne 0x3cc1
testl %r12d, %r12d
setg %bpl
jle 0x3c93
movq 0x18(%r15), %rax
movq (%rax), %rdi
movq 0x18(%r14), %rax
movq (%rax), %rsi
callq 0x1080
testl %eax, %eax
jne 0x3c8e
leaq -0x1(%r12), %rbp
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x3c93
movq 0x20(%r15,%r13,8), %rax
movq (%rax), %rdi
movq 0x20(%r14,%r13,8), %rax
movq (%rax), %rsi
callq 0x1080
incq %r13
testl %eax, %eax
je 0x3c66
cmpq %r12, %r13
setb %bpl
testb %bpl, %bpl
jne 0x3cc1
movq 0x418(%r15), %rax
movq 0x418(%r14), %rcx
movq (%rcx), %r14
movq (%rax), %r15
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
movl %eax, %edx
orb %cl, %dl
testb $0x1, %dl
je 0x3cd2
andb %cl, %al
movzbl %al, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rax
movl (%rax), %edx
movq (%r14), %rcx
cmpl (%rcx), %edx
jne 0x3cc1
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq 0x10(%rcx), %rax
movq (%rax), %rsi
callq 0x1080
testl %eax, %eax
jne 0x3cc1
movq 0x8(%r14), %r14
movq 0x8(%r15), %r15
testq %r14, %r14
sete %cl
testq %r15, %r15
sete %al
je 0x3cbc
testq %r14, %r14
jne 0x3cd2
jmp 0x3cbc
// File: /workspace/github_c_makefile_star2_O1/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), %rax
movb (%rax), %dl
movl $0x0, %r14d
testb %dl, %dl
je 0x3d6a
incq %rax
xorl %esi, %esi
movl $0xcccb8521, %ecx       # imm = 0xCCCB8521
movzbl %dl, %edx
movl %esi, %r14d
shll $0x8, %r14d
addl %esi, %r14d
addl %edx, %r14d
movq %r14, %rdx
imulq %rcx, %rdx
shrq $0x2f, %rdx
imull $0xa001, %edx, %edx     # imm = 0xA001
subl %edx, %r14d
movb (%rax), %dl
incq %rax
movl %r14d, %esi
testb %dl, %dl
jne 0x3d3a
movl $0xa001, %ebp           # imm = 0xA001
leaq 0x734a(%rip), %r15      # 0xb0c0
movl %r14d, %r14d
movq (%r15,%r14,8), %r13
testq %r13, %r13
je 0x3ddb
movq 0x8(%r13), %rdi
movq 0x8(%rbx), %r12
movq %r12, %rsi
callq 0x1080
testl %eax, %eax
jne 0x3dc2
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3c00
testl %eax, %eax
jne 0x3ddf
leaq 0x4084(%rip), %rdi      # 0x7e30
movl $0x75, %esi
leaq 0x4085(%rip), %rdx      # 0x7e3d
movq %r12, %rcx
xorl %eax, %eax
callq 0x140c
incl %r14d
cmpl $0xa001, %r14d          # imm = 0xA001
movl $0x0, %eax
cmovel %eax, %r14d
decl %ebp
jne 0x3d76
jmp 0x3ddf
movq %rbx, (%r15,%r14,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movb (%rdi), %dl
xorl %ebp, %ebp
movl $0x0, %r14d
testb %dl, %dl
je 0x3e45
leaq 0x1(%rbx), %rax
xorl %esi, %esi
movl $0xcccb8521, %ecx       # imm = 0xCCCB8521
movzbl %dl, %edx
movl %esi, %r14d
shll $0x8, %r14d
addl %esi, %r14d
addl %edx, %r14d
movq %r14, %rdx
imulq %rcx, %rdx
shrq $0x2f, %rdx
imull $0xa001, %edx, %edx     # imm = 0xA001
subl %edx, %r14d
movb (%rax), %dl
incq %rax
movl %r14d, %esi
testb %dl, %dl
jne 0x3e15
movl $0xffff5fff, %r15d      # imm = 0xFFFF5FFF
leaq 0x726e(%rip), %r12      # 0xb0c0
movl %r14d, %r13d
movq (%r12,%r13,8), %rax
testq %rax, %rax
je 0x3ecf
movq 0x8(%rax), %rdi
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
je 0x3e83
incl %r14d
cmpl $0xa001, %r14d          # imm = 0xA001
cmovel %ebp, %r14d
incl %r15d
jne 0x3e52
jmp 0x3ecf
movq $0x0, (%r12,%r13,8)
movl %r15d, %eax
addl $0xa001, %eax           # imm = 0xA001
jae 0x3ecf
negl %r15d
movl $0xcccb8521, %ebx       # imm = 0xCCCB8521
incl %r14d
movq %r14, %rax
imulq %rbx, %rax
shrq $0x2f, %rax
imull $0xa001, %eax, %eax     # imm = 0xA001
subl %eax, %r14d
movq (%r12,%r14,8), %rdi
testq %rdi, %rdi
je 0x3ecf
movq $0x0, (%r12,%r14,8)
callq 0x3d12
decl %r15d
jne 0x3e9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movb (%rdi), %dl
xorl %r15d, %r15d
movl $0x0, %r12d
testb %dl, %dl
je 0x3f36
leaq 0x1(%rbx), %rax
xorl %esi, %esi
movl $0xcccb8521, %ecx       # imm = 0xCCCB8521
movzbl %dl, %edx
movl %esi, %r12d
shll $0x8, %r12d
addl %esi, %r12d
addl %edx, %r12d
movq %r12, %rdx
imulq %rcx, %rdx
shrq $0x2f, %rdx
imull $0xa001, %edx, %edx     # imm = 0xA001
subl %edx, %r12d
movb (%rax), %dl
incq %rax
movl %r12d, %esi
testb %dl, %dl
jne 0x3f06
movl $0xa001, %ebp           # imm = 0xA001
leaq 0x717e(%rip), %r13      # 0xb0c0
movl %r12d, %eax
movq (%r13,%rax,8), %r14
testq %r14, %r14
je 0x3f71
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
je 0x3f74
incl %r12d
cmpl $0xa001, %r12d          # imm = 0xA001
cmovel %r15d, %r12d
decl %ebp
jne 0x3f42
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_O1/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 0x3f97
cmpl $0x0, 0x10(%rsi)
je 0x3f9b
movl %ebx, %eax
popq %rbx
retq
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x3ede
testq %rax, %rax
je 0x3f97
cmpl $0x0, 0x420(%rax)
jne 0x3f97
xorl %ebx, %ebx
cmpl $0x0, (%rax)
sete %bl
jmp 0x3f97
// File: /workspace/github_c_makefile_star2_O1/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 0x3fd6
movq %rsi, %r14
cmpl $0x0, 0x10(%rsi)
je 0x3fe0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x3ede
testq %rax, %rax
je 0x3fd6
cmpl $0x0, 0x420(%rax)
jne 0x3fd6
cmpl $0x1, (%rax)
jne 0x3fd6
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3fd6
movq (%rax), %rcx
movl (%rcx), %ecx
addl $-0x3b, %ecx
cmpl $0x1, %ecx
ja 0x401e
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x3fd6
movq (%rax), %rax
xorl %ebx, %ebx
cmpl $0x7, (%rax)
sete %bl
jmp 0x3fd6
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0x420(%rsi)
callq 0x3ad0
movq %rax, %r15
movq 0x418(%rbx), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x4469
movq (%r12), %r13
movl $0x18, %edi
callq 0x10b0
movq %r13, (%rax)
leaq 0x8(%rax), %rcx
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq 0x8(%r15), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r15)
movq 0x8(%r12), %r12
jmp 0x442e
movq %r15, %rdi
callq 0x4a4c
movq %r14, %rdi
movq %rax, %rsi
callq 0x402b
movl $0x0, 0x420(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5429
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x50ac
movq (%rax), %rcx
cmpl $0x35, (%rcx)
jne 0x50ac
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x5064
movl %eax, %ebp
movq (%r14), %rax
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x5064
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_O1/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 $0x27, %ecx
jg 0x50db
cmpl $0xe, %ecx
je 0x50f5
cmpl $0x11, %ecx
jne 0x50fc
movq 0x8(%rax), %rax
movq %rax, (%rdi)
callq 0x4e6c
negl %eax
jmp 0x5117
cmpl $0x28, %ecx
je 0x5102
cmpl $0x34, %ecx
jne 0x50fc
movq 0x8(%rax), %rax
movq %rax, (%rdi)
callq 0x4e6c
notl %eax
jmp 0x5117
movq 0x8(%rax), %rax
movq %rax, (%rdi)
popq %rax
jmp 0x4e6c
movq 0x8(%rax), %rax
movq %rax, (%rdi)
callq 0x4e6c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r14
callq 0x50b3
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x5189
movl $0x2a00000, %ebp        # imm = 0x2A00000
movq (%rax), %rcx
movl (%rcx), %r15d
cmpl $0x19, %r15d
ja 0x5189
btl %r15d, %ebp
jae 0x5189
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x50b3
movl %eax, %ecx
cmpl $0x19, %r15d
je 0x517a
cmpl $0x17, %r15d
je 0x5171
cmpl $0x15, %r15d
jne 0x5181
imull %ecx, %ebx
jmp 0x5181
movl %ebx, %eax
cltd
idivl %ecx
movl %eax, %ebx
jmp 0x5181
movl %ebx, %eax
cltd
idivl %ecx
movl %edx, %ebx
movq (%r14), %rax
testq %rax, %rax
jne 0x5137
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5119
movl %eax, %r14d
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x51ee
movq (%rcx), %rax
movl (%rax), %ebp
cmpl $0x11, %ebp
je 0x51bc
cmpl $0xe, %ebp
jne 0x51ee
movq 0x8(%rcx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x5119
movl %eax, %ecx
leal -0x11(%r14), %eax
cmpl $0x11, %ecx
cmovnel %r14d, %eax
addl %r14d, %ecx
cmpl $0xe, %ebp
cmovel %ecx, %eax
movq (%rbx), %rcx
movl %eax, %r14d
testq %rcx, %rcx
jne 0x51ad
jmp 0x51f1
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r14
callq 0x5196
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x5240
movq (%rax), %rcx
movl (%rcx), %ebp
cmpl $0x31, %ebp
je 0x521b
cmpl $0x2b, %ebp
jne 0x5240
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x5196
cmpl $0x31, %ebp
je 0x523a
cmpl $0x2b, %ebp
jne 0x5204
movl %eax, %ecx
shll %cl, %ebx
jmp 0x5204
movl %eax, %ecx
sarl %cl, %ebx
jmp 0x5204
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x51f6
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x52d2
movabsq $0x9240000000000, %r14  # imm = 0x9240000000000
leaq 0x2a8e(%rip), %r15      # 0x7d00
movq (%rax), %rcx
movl (%rcx), %r12d
cmpq $0x33, %r12
ja 0x52d2
btq %r12, %r14
jae 0x52d2
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x51f6
addl $-0x2a, %r12d
cmpl $0x9, %r12d
ja 0x52ca
movslq (%r15,%r12,4), %rcx
addq %r15, %rcx
jmpq *%rcx
xorl %ecx, %ecx
cmpl %eax, %ebp
setl %cl
jmp 0x52c8
xorl %ecx, %ecx
cmpl %eax, %ebp
setg %cl
jmp 0x52c8
xorl %ecx, %ecx
cmpl %eax, %ebp
setle %cl
jmp 0x52c8
xorl %ecx, %ecx
cmpl %eax, %ebp
setge %cl
movl %ecx, %ebp
movq (%rbx), %rax
testq %rax, %rax
jne 0x5272
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5247
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x532b
movq (%rax), %rcx
movl (%rcx), %r14d
cmpl $0x29, %r14d
je 0x5305
cmpl $0x27, %r14d
jne 0x532b
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x5247
cmpl $0x29, %r14d
je 0x5320
cmpl $0x27, %r14d
jne 0x52eb
xorl %ecx, %ecx
cmpl %eax, %ebp
sete %cl
movl %ecx, %ebp
jmp 0x52eb
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x52dd
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x5363
movq (%rax), %rcx
cmpl $0x1e, (%rcx)
jne 0x5363
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x52dd
andl %eax, %ebx
jmp 0x5340
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x5332
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x539e
movq (%rax), %rcx
cmpl $0x24, (%rcx)
jne 0x539e
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x5332
xorl %eax, %ebx
jmp 0x537b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x536d
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x53d9
movq (%rax), %rcx
cmpl $0x21, (%rcx)
jne 0x53d9
movq 0x8(%rax), %rax
movq %rax, (%r14)
movq %r14, %rdi
callq 0x536d
orl %eax, %ebx
jmp 0x53b6
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53a8
movl %eax, %ebp
movq (%rbx), %rax
testq %rax, %rax
je 0x5420
movq (%rax), %rcx
cmpl $0x1f, (%rcx)
jne 0x5420
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x53a8
testl %ebp, %ebp
setne %cl
testl %eax, %eax
setne %al
andb %cl, %al
movzbl %al, %ebp
jmp 0x53f0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53e3
movl %eax, %ebp
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x546a
movq (%rcx), %rax
cmpl $0x22, (%rax)
jne 0x546a
movq 0x8(%rcx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x53e3
movl %eax, %ecx
xorl %eax, %eax
orl %ecx, %ebp
setne %al
movq (%rbx), %rcx
movl %eax, %ebp
testq %rcx, %rcx
jne 0x543e
jmp 0x546c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %rax, (%rdi)
movq (%rax), %rcx
cmpl $0x3c, (%rcx)
jne 0x548c
movq 0x8(%rax), %rax
movq %rax, (%rdi)
pushq %rbx
movq (%rdi), %rbx
movq (%rbx), %rax
movl (%rax), %eax
cmpl $0x1, %eax
je 0x554e
cmpl $0x7, %eax
jne 0x54fb
movq 0x8(%rbx), %rax
movq %rax, (%rdi)
movq (%rax), %rcx
cmpl $0x3c, (%rcx)
jne 0x54b9
movq 0x8(%rax), %rax
movq %rax, (%rdi)
movq (%rdi), %rbx
movq (%rbx), %rax
cmpl $0x1, (%rax)
jne 0x5529
movq 0x8(%rbx), %rax
movq %rax, (%rdi)
movq (%rax), %rax
cmpl $0x8, (%rax)
je 0x554e
movl $0x100, %ecx            # imm = 0x100
addq 0x5b01(%rip), %rcx      # 0xafe0
leaq 0x294a(%rip), %rdi      # 0x7e30
leaq 0x2a24(%rip), %rdx      # 0x7f11
movl $0x31c, %esi            # imm = 0x31C
xorl %eax, %eax
callq 0x140c
jmp 0x554e
leaq 0x1ede(%rip), %r8       # 0x73e0
leaq 0x20(%r8), %rcx
addq $0x100, %r8             # imm = 0x100
leaq 0x291c(%rip), %rdi      # 0x7e30
leaq 0x29f0(%rip), %rdx      # 0x7f0b
movl $0x322, %esi            # imm = 0x322
xorl %eax, %eax
callq 0x140c
jmp 0x554e
leaq 0x1eb0(%rip), %rcx      # 0x73e0
addq $0x20, %rcx
leaq 0x28f5(%rip), %rdi      # 0x7e30
leaq 0x29cf(%rip), %rdx      # 0x7f11
movl $0x31f, %esi            # imm = 0x31F
xorl %eax, %eax
callq 0x140c
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x258b(%rip), %r14      # 0x7f37
leaq 0x2589(%rip), %r15      # 0x7f3c
leaq 0x2587(%rip), %r12      # 0x7f41
cmpl $0x0, 0x10(%rbx)
jne 0x59d7
movq (%rbx), %rdi
callq 0x21c1
movslq 0x10(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rbx)
movq %rax, 0x8(%rbx,%rcx,8)
movq 0x8(%rbx), %rax
cmpl $0x3e, (%rax)
je 0x5ad6
cmpl $0x0, 0x10(%rbx)
jne 0x5a01
movq (%rbx), %rdi
callq 0x21c1
movslq 0x10(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rbx)
movq %rax, 0x8(%rbx,%rcx,8)
movq 0x8(%rbx), %rax
cmpl $0x39, (%rax)
jne 0x5a39
movq %rbx, %rdi
callq 0x4ce7
movq %rbx, %rdi
callq 0x4db5
movq %rbx, %rdi
callq 0x6689
testl %eax, %eax
je 0x5ab8
movq %rbx, %rdi
callq 0x4ce7
cmpl $0x3b, (%rax)
jne 0x5a2a
jmp 0x5a58
movq %rbx, %rdi
callq 0x4ce7
cmpl $0x3b, (%rax)
jne 0x5a39
jmp 0x59ba
movq %rbx, %rdi
callq 0x4ce7
cmpl $0x3b, (%rax)
jne 0x5a4b
movq %rbx, %rdi
callq 0x599a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4d53
testl %eax, %eax
jne 0x5a4b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4d53
testl %eax, %eax
je 0x5a93
movq %rbx, %rdi
callq 0x4ce7
cmpl $0x3b, (%rax)
jne 0x5a7e
movq %rbx, %rdi
callq 0x599a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4d53
testl %eax, %eax
je 0x59ba
movq %rbx, %rdi
callq 0x4ce7
cmpl $0x3b, (%rax)
jne 0x5aa6
jmp 0x59ba
movq %rbx, %rdi
callq 0x66c7
testl %eax, %eax
jne 0x5ad6
movq %rbx, %rdi
callq 0x4ce7
cmpl $0x3b, (%rax)
jne 0x5ac4
jmp 0x59ba
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4ce7
movq %rax, %rdi
callq 0x1e5a
movq %rbx, %rdi
callq 0x4db5
movq %rbx, %rdi
callq 0x5553
movl %eax, %ebp
movq %rbx, %rdi
testl %eax, %eax
je 0x5b15
callq 0x575b
jmp 0x5b1a
callq 0x599a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4ce7
movq %rax, %rdi
callq 0x1e5a
movq %rbx, %rdi
callq 0x4db5
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4dda
movq %rax, %r14
movq %rbx, %rdi
movl $0x3b, %esi
callq 0x4dda
movq %rax, %rdi
callq 0x1e5a
movq 0x10(%r14), %rax
movq (%rax), %rdi
callq 0x3ede
movq %rax, %r14
movq %rbx, %rdi
testq %rax, %rax
je 0x5b82
callq 0x575b
jmp 0x5b87
callq 0x599a
xorl %eax, %eax
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4ce7
movq %rax, %rdi
callq 0x1e5a
movq %r14, %rdi
callq 0x4db5
movq %r14, %rdi
callq 0x5553
movl %eax, %ebp
testl %ebx, %ebx
setne %al
testl %ebp, %ebp
sete %cl
movq %r14, %rdi
orb %al, %cl
je 0x5c4b
callq 0x599a
jmp 0x5c50
callq 0x575b
xorl %eax, %eax
orl %ebp, %ebx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2260(%rip), %rsi      # 0x7f44
callq 0x4d53
testl %eax, %eax
je 0x5cf7
movq %rbx, %rdi
callq 0x5ae2
jmp 0x5d33
leaq 0x222c(%rip), %rsi      # 0x7f2a
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x5d14
movq %rbx, %rdi
callq 0x5b23
jmp 0x5d33
leaq 0x2215(%rip), %rsi      # 0x7f30
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x5dc4
movq %rbx, %rdi
callq 0x5b97
movl %eax, %ebp
leaq 0x21fb(%rip), %rsi      # 0x7f37
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x5d6a
leaq 0x21e8(%rip), %r14      # 0x7f37
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5c0b
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4d53
testl %eax, %eax
jne 0x5d4f
leaq 0x21cb(%rip), %rsi      # 0x7f3c
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x5d87
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5c5c
leaq 0x21b3(%rip), %rsi      # 0x7f41
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x5da6
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5ca7
leaq 0x2083(%rip), %rdi      # 0x7e30
leaq 0x2193(%rip), %rdx      # 0x7f47
movl $0x3ac, %esi            # imm = 0x3AC
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x140c
jmp 0x5d35
// File: /workspace/github_c_makefile_star2_O1/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 0x1243(%rip), %rsi      # 0x7014
callq 0x10d0
testq %rax, %rax
je 0x5dea
movq %rax, %rdi
callq 0x1040
movl $0x1, %eax
jmp 0x5dec
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
leaq 0x1f27(%rip), %rsi      # 0x7d30
movq %rsp, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x10a0
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x19e8
movq %rax, %r15
movq %r12, %rax
shlq $0x6, %rax
leaq (%rsp,%rax), %rsi
movq %r15, %rdi
callq 0x1a93
cmpl $0x3, 0x8(%rbx)
jl 0x5e61
movl $0x1, %r13d
movq (%rbx), %rax
movzbl (%rax,%r13), %esi
movq %r15, %rdi
callq 0x1a19
incq %r13
movslq 0x8(%rbx), %rax
decq %rax
cmpq %rax, %r13
jl 0x5e42
movq (%r15), %rdi
callq 0x5dc9
movl %eax, %ebp
testl %eax, %eax
je 0x5e74
movq %r15, %r14
jmp 0x5e7c
movq %r15, %rdi
callq 0x1af8
testl %ebp, %ebp
jne 0x5e8c
incq %r12
cmpq $0x4, %r12
jne 0x5e19
xorl %r14d, %r14d
movq %r14, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5ec6
testl %ecx, %ecx
jne 0x5ec8
jmp 0x5ecd
movl %eax, %ebp
incq %rax
jmp 0x5eb6
xorl %eax, %eax
callq 0x19e8
movq %rax, %r15
testl %ebp, %ebp
jle 0x5f03
movl %ebp, %r12d
xorl %r13d, %r13d
movzbl (%r14,%r13), %esi
movq %r15, %rdi
callq 0x1a19
incq %r13
cmpq %r13, %r12
jne 0x5ee1
movq %r15, %rdi
movl $0x2f, %esi
callq 0x1a19
xorl %eax, %eax
callq 0x19e8
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x1ac2
cmpl $0x3, 0x8(%rbx)
jl 0x5f43
movl $0x1, %r15d
movq (%rbx), %rax
movzbl (%rax,%r15), %esi
movq %r14, %rdi
callq 0x1a19
incq %r15
movslq 0x8(%rbx), %rax
decq %rax
cmpq %rax, %r15
jl 0x5f24
movq (%r14), %rdi
callq 0x5dc9
testl %eax, %eax
je 0x5f61
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1af8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5dee
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
jne 0x5fa4
movq (%rbx), %rdi
callq 0x21c1
movslq 0x10(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rbx)
movq %rax, 0x8(%rbx,%rcx,8)
movq 0x8(%rbx), %rax
cmpl $0x0, (%rax)
je 0x5fc9
leaq 0x1e7c(%rip), %rdi      # 0x7e30
leaq 0x1faa(%rip), %rdx      # 0x7f65
movl $0x3f7, %esi            # imm = 0x3F7
xorl %eax, %eax
callq 0x140c
jmp 0x5fd4
movq %rbx, %rdi
callq 0x4ce7
movq %rax, %r14
movq %rbx, %rdi
movl $0x3b, %esi
callq 0x4dda
movq %rax, %rdi
callq 0x1e5a
movl (%r14), %eax
testl %eax, %eax
jne 0x6027
movq 0x10(%r14), %rdi
movq (%rdi), %rcx
cmpb $0x3c, (%rcx)
jne 0x6006
callq 0x5dee
movq %rax, %r15
jmp 0x6027
testl %eax, %eax
jne 0x6027
movq 0x10(%r14), %rdi
movq (%rdi), %rax
cmpb $0x22, (%rax)
jne 0x6027
movq (%rbx), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x5ea1
jmp 0x6001
testq %r15, %r15
jne 0x6046
leaq 0x1dfd(%rip), %rdi      # 0x7e30
leaq 0x1f65(%rip), %rdx      # 0x7f9f
movl $0x403, %esi            # imm = 0x403
xorl %eax, %eax
callq 0x140c
movq (%r15), %rdi
callq 0x606f
movq (%rax), %rcx
testq %rcx, %rcx
je 0x6069
movq 0x18(%rbx), %rdx
movq 0x8(%rdx), %rsi
movq %rcx, (%rsi)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rdx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1b10
movq %rsp, %rbx
movq %rax, (%rbx)
movl $0x0, 0x10(%rbx)
callq 0x3ad0
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x575b
movq %rbx, %rdi
movl $0x3e, %esi
callq 0x4d19
testl %eax, %eax
jne 0x6125
leaq 0x1e88(%rip), %rsi      # 0x7f37
movq %rsp, %rdi
callq 0x4d53
testl %eax, %eax
je 0x60d0
leaq 0x1d6e(%rip), %rdi      # 0x7e30
leaq 0x201e(%rip), %rdx      # 0x80e7
movl $0x504, %esi            # imm = 0x504
jmp 0x611e
leaq 0x1e65(%rip), %rsi      # 0x7f3c
movq %rsp, %rdi
callq 0x4d53
testl %eax, %eax
je 0x60f8
leaq 0x1d46(%rip), %rdi      # 0x7e30
leaq 0x2019(%rip), %rdx      # 0x810a
movl $0x506, %esi            # imm = 0x506
jmp 0x611e
leaq 0x1e42(%rip), %rsi      # 0x7f41
movq %rsp, %rdi
callq 0x4d53
testl %eax, %eax
je 0x6125
leaq 0x1d1e(%rip), %rdi      # 0x7e30
leaq 0x2014(%rip), %rdx      # 0x812d
movl $0x508, %esi            # imm = 0x508
xorl %eax, %eax
callq 0x140c
movq 0x18(%rsp), %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: check_parameter
int check_parameter(struct macro_entry *macro, struct pp_token *token) {
  int parameter_size = macro->parameter_size;
  if(macro->parameter_ellipsis) parameter_size++;

  if(token->type == PP_IDENT) {
    for(int i = 0; i < parameter_size; i++) {
      if(strcmp(token->text->head, macro->parameters[i]->head) == 0) {
        return 1;
      }
    }
  }

  return 0;
}

// Assembly:
movl 0x10(%rdi), %ecx
cmpl $0x1, 0x14(%rdi)
sbbl $-0x1, %ecx
xorl %eax, %eax
cmpl $0x1, (%rsi)
jne 0x618d
testl %ecx, %ecx
jle 0x618d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq (%rax), %r14
movl %ecx, %r15d
xorl %r12d, %r12d
movq 0x18(%rbx,%r12,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1080
testl %eax, %eax
je 0x617d
incq %r12
cmpq %r12, %r15
jne 0x615d
xorl %eax, %eax
jmp 0x6182
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: check_stringify_operator
int check_stringify_operator(struct macro_entry *macro) {
  struct pp_list *list = macro->replacement_list;

  for(struct pp_node *node = list->head; node != NULL; node = node->next) {
    if(node->token->type == PP_SHARP) {
      struct pp_node *target = node->next;

      if(target == NULL) return 0;
      if(target->token->type == PP_SPACE) target = target->next;
      if(!check_parameter(macro, target->token)) return 0;

      node = target;
    }
  }

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x418(%rdi), %rax
movq (%rax), %r14
testq %r14, %r14
sete %bpl
je 0x61f5
movq %rdi, %rbx
movq (%r14), %rax
cmpl $0x39, (%rax)
jne 0x61e8
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x61e2
movq (%r15), %rax
cmpl $0x3c, (%rax)
jne 0x61c8
movq 0x8(%r15), %r15
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x6130
testl %eax, %eax
setne %al
jne 0x61dd
movq %r14, %r15
movq %r15, %r14
jmp 0x61e4
xorl %eax, %eax
testb %al, %al
je 0x61f5
movq 0x8(%r14), %r14
testq %r14, %r14
sete %bpl
jne 0x61ab
movzbl %bpl, %eax
andl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: check_concat_operator
int check_concat_operator(struct macro_entry *macro) {
  struct pp_list *list = macro->replacement_list;

  for(struct pp_node *node = list->head; node != NULL; node = node->next) {
    if(node->token->type == PP_CONCAT) {
      if(node == list->head) return 0;
      if(node->next == NULL) return 0;
    }
  }

  return 1;
}

// Assembly:
movq 0x418(%rdi), %rcx
movq (%rcx), %rdx
testq %rdx, %rdx
sete %al
je 0x6233
movq (%rdx), %rsi
cmpl $0x3a, (%rsi)
jne 0x622d
cmpq (%rcx), %rdx
je 0x6233
cmpq $0x0, 0x8(%rdx)
je 0x6233
movq 0x8(%rdx), %rdx
jmp 0x6211
movzbl %al, %eax
andl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: parse_text_line
void parse_text_line(struct preprocessor *pp) {
  struct pp_list *text = allocate_pp_list();

  while(1) {
    struct pp_token *token = read_pp_token(pp);
    append_pp_list(text, token);
    if(token->type == PP_NEW_LINE) {
      struct pp_token *next = peek_pp_token(pp);
      if(next->type == PP_SHARP || next->type == PP_NONE) {
        break;
      }
    }
  }

  struct pp_list *replaced = scan_macro(pp, text);
  concat_pp_list(pp->list, replaced);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3ad0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ce7
movq %rax, %r15
movl $0x18, %edi
callq 0x10b0
movq %r15, (%rax)
leaq 0x8(%rax), %rcx
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq 0x8(%r14), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r14)
cmpl $0x3b, (%r15)
jne 0x6657
cmpl $0x0, 0x10(%rbx)
jne 0x6638
movq (%rbx), %rdi
callq 0x21c1
movslq 0x10(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rbx)
movq %rax, 0x8(%rbx,%rcx,8)
movq 0x8(%rbx), %rax
movl (%rax), %edx
movl $0x3, %eax
xorl %ecx, %ecx
cmpl $0x39, %edx
je 0x6653
cmpl $0x3e, %edx
je 0x6653
xorl %eax, %eax
movb $0x1, %cl
testb %cl, %cl
je 0x6659
xorl %eax, %eax
testl %eax, %eax
je 0x65df
movq %rbx, %rdi
movq %r14, %rsi
callq 0x402b
movq (%rax), %rcx
testq %rcx, %rcx
je 0x6683
movq 0x18(%rbx), %rdx
movq 0x8(%rdx), %rsi
movq %rcx, (%rsi)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rdx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: check_if_section
int check_if_section(struct preprocessor *pp) {
  if(check_keyword(pp, "if")) return 1;
  if(check_keyword(pp, "ifdef")) return 1;
  if(check_keyword(pp, "ifndef")) return 1;
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x18b0(%rip), %rsi      # 0x7f44
callq 0x4d53
testl %eax, %eax
jne 0x66b0
leaq 0x1886(%rip), %rsi      # 0x7f2a
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x66b7
movl $0x1, %eax
popq %rbx
retq
leaq 0x1872(%rip), %rsi      # 0x7f30
movq %rbx, %rdi
popq %rbx
jmp 0x4d53
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: check_group_end
int check_group_end(struct preprocessor *pp) {
  if(check_keyword(pp, "elif")) return 1;
  if(check_keyword(pp, "else")) return 1;
  if(check_keyword(pp, "endif")) return 1;
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1865(%rip), %rsi      # 0x7f37
callq 0x4d53
testl %eax, %eax
jne 0x66ee
leaq 0x185a(%rip), %rsi      # 0x7f3c
movq %rbx, %rdi
callq 0x4d53
testl %eax, %eax
je 0x66f5
movl $0x1, %eax
popq %rbx
retq
leaq 0x1845(%rip), %rsi      # 0x7f41
movq %rbx, %rdi
popq %rbx
jmp 0x4d53
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/preprocess.c
// Function: preprocess
struct pp_list *preprocess(unsigned char *file) {
  struct macro_entry *arch = allocate_macro_entry();
  arch->identifier = "__x86_64__";
  insert_macro_table(arch);

  struct pp_list *list = parse_preprocessing_file(file);

  for(int i = 0; i < MACRO_TABLE_SIZE; i++) {
    if(macro_table[i] != NULL) {
      free_macro_entry(macro_table[i]);
    }
  }

  return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3b76
leaq 0x1a22(%rip), %rcx      # 0x8151
movq %rcx, 0x8(%rax)
movq %rax, %rdi
callq 0x3d12
movq %rbx, %rdi
callq 0x606f
movq %rax, %rbx
xorl %r15d, %r15d
leaq 0x4970(%rip), %r12      # 0xb0c0
movq (%r15,%r12), %r14
testq %r14, %r14
je 0x676d
movq 0x418(%r14), %rdi
callq 0x3af2
movq %r14, %rdi
callq 0x1030
addq $0x8, %r15
cmpq $0x50008, %r15          # imm = 0x50008
jne 0x6750
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/ShinyaKato[P]skcc/main.c
// Function: main
int main(int argc, char **argv) {
  if(argc < 2) {
    error("usage: skcc [source file name]");
  }

  char *file = argv[1];
  struct pp_list *list = preprocess(file);

  /* for(struct pp_node *node = list->head; node != NULL; node = node->next) { */
  /*   struct pp_token *token = node->token; */
  /*   printf("(%d, %s)", token->type, token->name); */
  /*   if(token->type != PP_NEW_LINE && token->type != PP_SPACE && token->type != PP_NONE) { */
  /*     printf(" %s", token->text->head); */
  /*   } */
  /*   printf("\n"); */
  /* } */

  for(struct pp_node *node = list->head; node != NULL; node = node->next) {
    struct pp_token *token = node->token;
    printf("%s", token->text->head);
  }

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x1, %edi
jg 0x67b2
leaq 0x19bd(%rip), %rdi      # 0x815c
leaq 0x19bd(%rip), %rdx      # 0x8163
movl $0x5, %esi
xorl %eax, %eax
callq 0x140c
movq 0x8(%rbx), %rdi
callq 0x6718
movq (%rax), %r14
testq %r14, %r14
je 0x67e7
leaq 0x19b8(%rip), %rbx      # 0x8182
movq (%r14), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1050
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x67ca
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/orangeduck[P]mpc/examples/line_reader.c
// Function: main
int main(int argc, char **argv) {
  
  const char *input = 
    "abcHVwufvyuevuy3y436782\n"
    "\n"
    "\n"
    "rehre\n"
    "rew\n"
    "-ql.;qa\n"
    "eg";
		
  mpc_parser_t* Line = mpc_many(
    mpcf_strfold, 
    mpc_apply(mpc_re("[^\\n]*(\\n|$)"), read_line));
  
  mpc_result_t r;

  (void)argc; (void)argv;

  mpc_parse("input", input, Line, &r);
  printf("\nParsed String: %s", (char*)r.output);
  free(r.output);
  
  mpc_delete(Line);
  
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x9d0c(%rip), %rdi      # 0xb033
callq 0x4ffa
leaq 0x61(%rip), %rsi        # 0x1394
movq %rax, %rdi
callq 0x38bc
leaq 0x2ef3(%rip), %rdi      # 0x4235
movq %rax, %rsi
callq 0x3cd2
movq %rax, %rbx
leaq 0xa0ef(%rip), %rdi      # 0xb443
leaq 0x9ca9(%rip), %rsi      # 0xb004
movq %rsp, %r14
movq %rax, %rdx
movq %r14, %rcx
callq 0x28e5
movq (%r14), %rsi
leaq 0x9ccd(%rip), %rdi      # 0xb040
xorl %eax, %eax
callq 0x10b0
movq (%r14), %rdi
callq 0x1220
movq %rbx, %rdi
callq 0x2d96
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq