LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: StrNCaseCmp
int StrNCaseCmp(const char *a, const char *b, unsigned int n)
{
   unsigned int i,l,m;

   l = strlen(a);
   m = strlen(b);

   for (i=0 ; i < n && i <= l && i <= m ; ++i)
   {
      if (toupper(a[i]) < toupper(b[i])) return -1;
      if (toupper(a[i]) > toupper(b[i])) return  1;
   }
   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1040
movq %rax, %r12
movq %r14, %rdi
callq 0x1040
testl %ebx, %ebx
je 0x131b
movq %rax, %r13
callq 0x1030
movq (%rax), %rcx
xorl %edx, %edx
movsbq (%r15,%rdx), %rax
movsbq (%r14,%rdx), %rsi
movl (%rcx,%rsi,4), %esi
cmpl %esi, (%rcx,%rax,4)
jl 0x131f
jg 0x1326
leaq 0x1(%rdx), %rsi
xorl %eax, %eax
cmpl %ebx, %esi
jae 0x132b
cmpl %r12d, %edx
jae 0x132b
cmpl %r13d, %edx
movq %rsi, %rdx
jb 0x12ee
jmp 0x132b
xorl %eax, %eax
jmp 0x132b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x132b
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: IsEquate
int IsEquate(void)
{
   char *e;
   char *p;
   e = strchr(Line,'=');
   if (e)
   {
      p = strchr(Line,';');
      if (p && p < e) return -1; // '=' after comment character
      p = strchr(Line,'*');
      if (p && p < e) return -1; // ignore * = syntax for PC setting
      return e-Line;
   }
   return -1; // no equate character found
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x5170(%rip), %rdi      # 0x64b0
movl $0x3d, %esi
callq 0x1050
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x13a6
movq %rax, %r14
leaq 0x5152(%rip), %rdi      # 0x64b0
movl $0x3b, %esi
callq 0x1050
testq %rax, %rax
setne %cl
cmpq %r14, %rax
setb %al
testb %al, %cl
jne 0x13a6
leaq 0x5131(%rip), %rdi      # 0x64b0
movl $0x2a, %esi
callq 0x1050
testq %rax, %rax
setne %cl
cmpq %r14, %rax
setb %al
testb %al, %cl
jne 0x13a6
leaq 0x5110(%rip), %rax      # 0x64b0
subl %eax, %r14d
movl %r14d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: IsInstruction
int IsInstruction(int *l)
{
   int i,j,ll;
   char c;

   if (Line[0] == '*') return -1;
   if (Line[0] == ';') return -1;
   ll = strlen(Line);
   if (ll < 4) return -1;
   *l = 0;
   for (j=0 ; j < ll-3 ; ++j)
   {
      if (Line[j] == ';') return -1;
      if (Line[j] == '"') return -1;
      if (Line[j] ==  39) return -1;
      if (j > 0)
      {
         c = Line[j-1];
         if (c != ' ') continue;
      }
      for (i = 0 ; i < (int) DIMOP ; ++i)
      {
         *l = strlen(Mat[i].Mne);
         if (strlen(Line+j) >= (size_t) *l)
         {
            if (!StrNCaseCmp(Line+j,Mat[i].Mne,*l)
            && Line[j+ *l] <= ' ') return j;
         }
      }
   }
   return -1; // No mnemonic
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movzbl 0x50ee(%rip), %eax      # 0x64b0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2a, %eax
je 0x14ba
cmpl $0x3b, %eax
je 0x14ba
movq %rdi, %r14
leaq 0x50cd(%rip), %rdi      # 0x64b0
callq 0x1040
movq %rax, %rcx
cmpl $0x4, %ecx
jl 0x14ba
movl $0x0, (%r14)
addl $-0x3, %ecx
xorl %ebx, %ebx
movq %rcx, (%rsp)
leaq 0x50a5(%rip), %rax      # 0x64b0
movzbl (%rbx,%rax), %eax
cmpq $0x3b, %rax
ja 0x1429
movabsq $0x800008400000000, %rdx # imm = 0x800008400000000
btq %rax, %rdx
jb 0x14b3
testq %rbx, %rbx
je 0x143c
leaq 0x507b(%rip), %rax      # 0x64b0
cmpb $0x20, -0x1(%rbx,%rax)
jne 0x14a3
leaq 0x506d(%rip), %rax      # 0x64b0
leaq (%rax,%rbx), %r13
xorl %r15d, %r15d
leaq 0x2c4f(%rip), %rax      # 0x40a0
leaq (%rax,%r15), %r12
movq %r12, %rdi
callq 0x1040
movq %rax, %rbp
movl %ebp, (%r14)
movq %r13, %rdi
callq 0x1040
movslq %ebp, %rcx
cmpq %rcx, %rax
jb 0x1496
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x12bc
testl %eax, %eax
jne 0x1496
addl %ebx, %ebp
movslq %ebp, %rax
leaq 0x5020(%rip), %rcx      # 0x64b0
cmpb $0x21, (%rax,%rcx)
jl 0x14ba
addq $0x28, %r15
cmpq $0x2300, %r15           # imm = 0x2300
jne 0x144a
incq %rbx
movq (%rsp), %rcx
cmpq %rcx, %rbx
jne 0x1404
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x14ba
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: IsPseudo
int IsPseudo(int *l)
{
   int i,j,ll;
   char c;

   if (Line[0] == '*') return -1;
   if (Line[0] == ';') return -1;
   ll = strlen(Line);
   if (ll < 4) return -1;
   *l = 0;
   for (j=0 ; j < ll-3 ; ++j)
   {
      if (Line[j] == ';') return -1;
      if (Line[j] == '"') return -1;
      if (Line[j] ==  39) return -1;
      if (j > 0)
      {
         c = Line[j-1];
         if (c != ' ') continue;
      }
      for (i = 0 ; i < PSEUDOS ; ++i)
      {
         *l = strlen(PseudoTab[i]);
         if (strlen(Line+j) >= (size_t) *l)
         {
            if (!StrNCaseCmp(Line+j,PseudoTab[i],*l)
            && Line[j+ *l] <= ' ') return j;
         }
      }
   }
   return -1; // No pseudo
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movzbl 0x4fd3(%rip), %eax      # 0x64b0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2a, %eax
je 0x15d5
cmpl $0x3b, %eax
je 0x15d5
movq %rdi, %r14
leaq 0x4fb2(%rip), %rdi      # 0x64b0
callq 0x1040
movq %rax, %rcx
cmpl $0x4, %ecx
jl 0x15d5
movl $0x0, (%r14)
addl $-0x3, %ecx
xorl %ebx, %ebx
movq %rcx, (%rsp)
leaq 0x4f8a(%rip), %rax      # 0x64b0
movzbl (%rbx,%rax), %eax
cmpq $0x3b, %rax
ja 0x1544
movabsq $0x800008400000000, %rdx # imm = 0x800008400000000
btq %rax, %rdx
jb 0x15ce
testq %rbx, %rbx
je 0x1557
leaq 0x4f60(%rip), %rax      # 0x64b0
cmpb $0x20, -0x1(%rbx,%rax)
jne 0x15be
leaq 0x4f52(%rip), %rax      # 0x64b0
leaq (%rax,%rbx), %r13
xorl %r15d, %r15d
leaq 0x4e34(%rip), %rax      # 0x63a0
movq (%r15,%rax), %r12
movq %r12, %rdi
callq 0x1040
movq %rax, %rbp
movl %ebp, (%r14)
movq %r13, %rdi
callq 0x1040
movslq %ebp, %rcx
cmpq %rcx, %rax
jb 0x15b1
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x12bc
testl %eax, %eax
jne 0x15b1
addl %ebx, %ebp
movslq %ebp, %rax
leaq 0x4f05(%rip), %rcx      # 0x64b0
cmpb $0x21, (%rax,%rcx)
jl 0x15d5
addq $0x8, %r15
cmpq $0xf8, %r15
jne 0x1565
incq %rbx
movq (%rsp), %rcx
cmpq %rcx, %rbx
jne 0x151f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x15d5
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: Usage
void Usage(void)
{
   fprintf(stderr,"Usage: form9 [options] <in >out\n");
   fprintf(stderr,"Options:\n");
   fprintf(stderr,"   -l print mnemonics in lower case\n");
   fprintf(stderr,"   -u print mnemonics in upper case\n");
   fprintf(stderr,"   -o print pseudos   in lower case\n");
   fprintf(stderr,"   -p print pseudos   in upper case\n");
   fprintf(stderr,"   -m col   mnemonic/pseudo  column ( 8)\n");
   fprintf(stderr,"   -a col   argument/operand column (16)\n");
   fprintf(stderr,"   -e col   equate column           (16)\n");
   fprintf(stderr,"   -c col  code line comment column (32)\n");
   exit(1);
}

// Assembly:
pushq %rbx
movq 0x2a0a(%rip), %rbx      # 0x3ff8
movq (%rbx), %rcx
leaq 0xab3(%rip), %rdi       # 0x20ab
movl $0x20, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xabb(%rip), %rdi       # 0x20cc
movl $0x9, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xaac(%rip), %rdi       # 0x20d6
movl $0x24, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xab8(%rip), %rdi       # 0x20fb
movl $0x24, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xac4(%rip), %rdi       # 0x2120
movl $0x24, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xad0(%rip), %rdi       # 0x2145
movl $0x24, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xadc(%rip), %rdi       # 0x216a
movl $0x29, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xaed(%rip), %rdi       # 0x2194
movl $0x29, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xafe(%rip), %rdi       # 0x21be
movl $0x29, %esi
movl $0x1, %edx
callq 0x10e0
movq (%rbx), %rcx
leaq 0xb0f(%rip), %rdi       # 0x21e8
movl $0x29, %esi
movl $0x1, %edx
callq 0x10e0
movl $0x1, %edi
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: MoveLine
int MoveLine(int i, int col)
{
   int l;
   if (col >= 0)
   {
      l = strlen(Line)-i+1;
      if (col > i)
      {
         memmove(Line+col,Line+i,l);
         memset(Line+i,' ',col-i);
         return col; // moved to this column
      }
      while (col < i)
      {
         if (i > 0 && Line[i-1] != ' ') break;
         if (i > 1 && Line[i-2] != ' ') break;
         --i;
         memmove(Line+i,Line+i+1,l);
      }
      return i; // moved to this column
   }
   return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %r14d
testl %esi, %esi
js 0x178f
movl %esi, %ebx
leaq 0x4d9f(%rip), %r15      # 0x64b0
movq %r15, %rdi
callq 0x1040
subl %r14d, %eax
incl %eax
movl %ebx, %ebp
subl %r14d, %ebp
jle 0x1750
movslq %r14d, %r14
movl %ebx, %edi
addq %r15, %rdi
addq %r15, %r14
movslq %eax, %rdx
movq %r14, %rsi
callq 0x10b0
movslq %ebp, %rdx
movq %r14, %rdi
movl $0x20, %esi
callq 0x1070
movl %ebx, %r14d
jmp 0x178f
jge 0x178f
movslq %eax, %r12
leal -0x1(%r14), %r13d
cmpb $0x20, (%r13,%r15)
jne 0x178f
cmpl $0x2, %r14d
jl 0x1772
leal -0x2(%r14), %eax
cmpb $0x20, (%rax,%r15)
jne 0x178f
leaq (%r15,%r13), %rdi
leaq (%r15,%r13), %rsi
incq %rsi
movq %r12, %rdx
callq 0x10b0
movl %r13d, %r14d
cmpl %ebx, %r13d
jg 0x1755
jmp 0x174b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: MoveOperand
void MoveOperand(int i)
{
   int l;
   if (ocol >= 0)
   {
      while (Line[i] == ' ') ++i;
      l = strlen(Line)-i+1;
      if (ocol > i)
      {
         memmove(Line+ocol,Line+i,l);
         memset(Line+i,' ',ocol-i);
      }
      while (ocol < i)
      {
         if (Line[i-1] != ' ') break;
         if (i > 1 && Line[i-2] != ' ') break;
         --i;
         memmove(Line+i,Line+i+1,l);
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x28de(%rip), %r12      # 0x4094
testq %r12, %r12
js 0x188b
movl %edi, %r14d
movslq %edi, %r13
xorl %ebp, %ebp
leaq 0x4ce2(%rip), %rax      # 0x64b0
movq %r13, %rcx
addq %rbp, %rcx
incq %rbp
cmpb $0x20, (%rax,%rcx)
je 0x17ce
leal -0x1(%r14), %r15d
addq %rbp, %r15
leaq 0x4cc5(%rip), %rbx      # 0x64b0
movq %rbx, %rdi
callq 0x1040
movq %r14, %rcx
negl %r14d
addq %rax, %r14
subq %rbp, %r14
addq $0x2, %r14
cmpl %r15d, %r12d
jle 0x1846
leaq (%rbx,%r12), %rdi
leaq (%rbx,%r13), %rax
leaq (%rax,%rbp), %rsi
decq %rsi
movq %rsi, 0x10(%rsp)
movslq %r14d, %rdx
movq %rcx, 0x8(%rsp)
callq 0x10b0
movl %r12d, %eax
subl 0x8(%rsp), %eax
subl %ebp, %eax
incl %eax
movslq %eax, %rdx
movq 0x10(%rsp), %rdi
movl $0x20, %esi
callq 0x1070
cmpl %r15d, %r12d
jge 0x188b
leaq -0x1(,%rbp), %rsi
addq %r13, %rsi
movslq %r14d, %r14
cmpb $0x20, -0x1(%rsi,%rbx)
jne 0x188b
cmpq $0x2, %rsi
jl 0x186d
cmpb $0x20, -0x2(%rsi,%rbx)
jne 0x188b
leaq -0x1(%rsi), %r15
leaq (%rsi,%rbx), %rdi
decq %rdi
addq %rbx, %rsi
movq %r14, %rdx
callq 0x10b0
movq %r15, %rsi
cmpq %r12, %r15
jg 0x1859
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Edilbert[P]BS9/form9.c
// Function: MoveComment
void MoveComment(int i)
{
   char *p;
   int j;

   p = strchr(Line+i,';');
   if (!p) p = strchr(Line+i,'*');
   if (p)
   {
      j = p - Line;
      if (p[1] != ' ') MoveLine(j+1,j+2);
      MoveLine(j,ccol);
   }
}

// Assembly:
pushq %rbx
movslq %edi, %rax
leaq 0x4c0b(%rip), %rbx      # 0x64b0
addq %rax, %rbx
movq %rbx, %rdi
movl $0x3b, %esi
callq 0x1050
testq %rax, %rax
jne 0x18c7
movq %rbx, %rdi
movl $0x2a, %esi
callq 0x1050
testq %rax, %rax
je 0x18f6
leaq 0x4bdd(%rip), %rcx      # 0x64b0
movl %eax, %ebx
subl %ecx, %ebx
cmpb $0x20, 0x1(%rax)
je 0x18e8
leal 0x1(%rbx), %edi
leal 0x2(%rbx), %esi
callq 0x16f2
movl 0x27ae(%rip), %esi      # 0x409c
movl %ebx, %edi
popq %rbx
jmp 0x16f2
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/fileloader.c
// Function: free_buffer
void free_buffer(arraylist_t *buffer) {
    line_t *line = NULL;

    if(!buffer) return;

    for(size_t i = 0; i < buffer->size; i++) {
        line = get_line(buffer, i);
        free(line->line);
        free(line->source);
        free(line);
    }
    arraylist_free(buffer, 0);
}

// Assembly:
testq %rdi, %rdi
je 0x2af3
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x2ae4
xorl %r15d, %r15d
testl %r15d, %r15d
js 0x2abf
movl %r15d, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %rbx, %rdi
callq 0x6c76
movq %rax, %r14
jmp 0x2ac2
xorl %r14d, %r14d
movq (%r14), %rdi
callq 0x2030
movq 0x8(%r14), %rdi
callq 0x2030
movq %r14, %rdi
callq 0x2030
incq %r15
cmpq 0x8(%rbx), %r15
jb 0x2aa4
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x6d0a
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/test.c
// Function: test_variable_declaration_parsing
static void test_variable_declaration_parsing(char *line) {
	arraylist_t *list = NULL;

	printf("%sInput: %s\"%s\"%s\n", COLOR_BLUE, COLOR_YELLOW, line, FORMAT_RESET);
	list = get_variables_from_declaration(0, line);
	if(list != NULL) {
		printf("%sOutput: %s\n", COLOR_BLUE, FORMAT_RESET);
		print_variables(list, 0);
		field_list_free(list);
	} else
		printf("%sOutput: %sNULL%s\n", COLOR_BLUE, COLOR_RED, FORMAT_RESET);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x861d(%rip), %rdi      # 0xd426
leaq 0x8629(%rip), %rsi      # 0xd439
leaq 0x8208(%rip), %rdx      # 0xd01f
leaq 0x8207(%rip), %r8       # 0xd025
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20d0
xorl %edi, %edi
movq %rbx, %rsi
callq 0x8888
testq %rax, %rax
je 0x4e69
movq %rax, %rbx
leaq 0x85fe(%rip), %rdi      # 0xd43f
leaq 0x85f1(%rip), %rsi      # 0xd439
leaq 0x81d6(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4e8d
movq %rbx, %rdi
popq %rbx
jmp 0x6899
leaq 0x85dd(%rip), %rdi      # 0xd44d
leaq 0x85c2(%rip), %rsi      # 0xd439
leaq 0x819b(%rip), %rdx      # 0xd019
leaq 0x81a0(%rip), %rcx      # 0xd025
xorl %eax, %eax
popq %rbx
jmp 0x20d0
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/test.c
// Function: print_variables
static void print_variables(arraylist_t *variables, unsigned int tabs) {
	field_t *variable = NULL;
	if(variables != NULL) {
		for(unsigned int i = 0 ; i < variables->size ; i++) {
			variable = arraylist_get(variables, i);

			for(unsigned int j = 0 ; j < tabs ; j++)
				printf("\t");

			printf(" %s%2d:  %sName:       %s%s\n",
				COLOR_MAGENTA, i,
				COLOR_CYAN, FORMAT_RESET, variable->name);

			for(unsigned int j = 0 ; j < tabs ; j++)
				printf("\t");
			printf("      %sType:       %s%s\n", COLOR_CYAN, FORMAT_RESET, variable->type.name);

			for(unsigned int j = 0 ; j < tabs ; j++)
				printf("\t");
			printf("      %sIs pointer: %s%d\n", COLOR_CYAN, FORMAT_RESET, variable->type.is_pointer);
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0x4f8a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x4f7c
movl %esi, %r13d
leaq 0x816c(%rip), %rbp      # 0xd025
xorl %esi, %esi
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x6c76
movq %rax, %r12
movl %r13d, %ebx
testl %r13d, %r13d
je 0x4edf
movl $0x9, %edi
callq 0x2040
decl %ebx
jne 0x4ed1
movq (%r12), %r9
leaq 0x8577(%rip), %rdi      # 0xd461
leaq 0x858d(%rip), %rsi      # 0xd47e
movl %r15d, %edx
leaq 0x8589(%rip), %rcx      # 0xd484
movq %rbp, %r8
xorl %eax, %eax
callq 0x20d0
movl %r13d, %ebx
testl %r13d, %r13d
je 0x4f1b
movl $0x9, %edi
callq 0x2040
decl %ebx
jne 0x4f0d
movq 0x10(%r12), %rcx
leaq 0x8563(%rip), %rdi      # 0xd48a
leaq 0x8556(%rip), %rsi      # 0xd484
movq %rbp, %rdx
xorl %eax, %eax
callq 0x20d0
movl %r13d, %ebx
testl %r13d, %r13d
je 0x4f4e
movl $0x9, %edi
callq 0x2040
decl %ebx
jne 0x4f40
movsbl 0x18(%r12), %ecx
leaq 0x8549(%rip), %rdi      # 0xd4a4
leaq 0x8522(%rip), %rsi      # 0xd484
movq %rbp, %rdx
xorl %eax, %eax
callq 0x20d0
incl %r15d
movq %r15, %rsi
cmpq %r15, 0x8(%r14)
ja 0x4ebe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/test.c
// Function: test_function_declaration_parsing
static void test_function_declaration_parsing(char *line) {
	function_t *function = get_function_from_declaration(0, line);

	printf("%sInput: %s\"%s\"%s\n", COLOR_BLUE, COLOR_YELLOW, line, FORMAT_RESET);
	if(function != NULL) {
		printf("%sOutput: %s\n", COLOR_BLUE, FORMAT_RESET);
		print_function(function, 0);
		function_free(function);
	} else
		printf("%sOutput: %sNULL%s\n", COLOR_BLUE, COLOR_RED, FORMAT_RESET);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0xab6f
movq %rax, %rbx
leaq 0x8480(%rip), %rdi      # 0xd426
leaq 0x848c(%rip), %rsi      # 0xd439
leaq 0x806b(%rip), %rdx      # 0xd01f
leaq 0x806a(%rip), %r8       # 0xd025
movq %r14, %rcx
xorl %eax, %eax
callq 0x20d0
testq %rbx, %rbx
je 0x4fff
leaq 0x846e(%rip), %rdi      # 0xd43f
leaq 0x8461(%rip), %rsi      # 0xd439
leaq 0x8046(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5029
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb661
leaq 0x8447(%rip), %rdi      # 0xd44d
leaq 0x842c(%rip), %rsi      # 0xd439
leaq 0x8005(%rip), %rdx      # 0xd019
leaq 0x800a(%rip), %rcx      # 0xd025
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20d0
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/test.c
// Function: print_function
static void print_function(function_t *function, unsigned int tabs) {
	if(function != NULL) {
		for(unsigned int j = 0 ; j < tabs ; j++)
			printf("\t");
		printf("      %sName:         %s%s\n", COLOR_CYAN, FORMAT_RESET, function->name);

		for(unsigned int j = 0 ; j < tabs ; j++)
			printf("\t");
		printf("      %sIs prototype: %s%d\n", COLOR_CYAN, FORMAT_RESET, function->is_prototype);

		for(unsigned int j = 0 ; j < tabs ; j++)
			printf("\t");
		printf("      %sType:         %s%s\n", COLOR_CYAN, FORMAT_RESET, function->return_type.name);

		for(unsigned int j = 0 ; j < tabs ; j++)
			printf("\t");
		printf("      %sIs pointer:   %s%d\n", COLOR_CYAN, FORMAT_RESET, function->return_type.is_pointer);

		for(unsigned int j = 0 ; j < tabs ; j++)
			printf("\t");
		printf("      %sParameters:   %s", COLOR_CYAN, FORMAT_RESET);
		if(function->params->size == 0) {
			printf("%sNone%s\n", COLOR_RED, FORMAT_RESET);
		} else {
			printf("\n");
			print_variables(function->params, tabs + 1);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x5162
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
je 0x504f
movl %ebx, %ebp
movl $0x9, %edi
callq 0x2040
decl %ebp
jne 0x5041
movq (%r14), %rcx
leaq 0x8583(%rip), %rdi      # 0xd5dc
leaq 0x8424(%rip), %rsi      # 0xd484
leaq 0x7fbe(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
testl %ebx, %ebx
je 0x5082
movl %ebx, %ebp
movl $0x9, %edi
callq 0x2040
decl %ebp
jne 0x5074
movzbl 0x18(%r14), %ecx
leaq 0x856a(%rip), %rdi      # 0xd5f8
leaq 0x83ef(%rip), %rsi      # 0xd484
leaq 0x7f89(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
testl %ebx, %ebx
je 0x50b7
movl %ebx, %ebp
movl $0x9, %edi
callq 0x2040
decl %ebp
jne 0x50a9
movq 0x8(%r14), %rcx
leaq 0x8552(%rip), %rdi      # 0xd614
leaq 0x83bb(%rip), %rsi      # 0xd484
leaq 0x7f55(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
testl %ebx, %ebx
je 0x50eb
movl %ebx, %ebp
movl $0x9, %edi
callq 0x2040
decl %ebp
jne 0x50dd
movsbl 0x10(%r14), %ecx
leaq 0x8539(%rip), %rdi      # 0xd630
leaq 0x8386(%rip), %rsi      # 0xd484
leaq 0x7f20(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
testl %ebx, %ebx
je 0x5120
movl %ebx, %ebp
movl $0x9, %edi
callq 0x2040
decl %ebp
jne 0x5112
leaq 0x8525(%rip), %rdi      # 0xd64c
leaq 0x8356(%rip), %rsi      # 0xd484
leaq 0x7ef0(%rip), %rdx      # 0xd025
xorl %eax, %eax
callq 0x20d0
movq 0x20(%r14), %rax
cmpq $0x0, 0x8(%rax)
je 0x5167
movl $0xa, %edi
callq 0x2040
movq 0x20(%r14), %rdi
incl %ebx
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x4e8d
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x84f7(%rip), %rdi      # 0xd665
leaq 0x7ea4(%rip), %rsi      # 0xd019
leaq 0x7ea9(%rip), %rdx      # 0xd025
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/display.c
// Function: print_message
void print_message(char *file, int line_index, char *line, const char *message, const char *type, const char *color) {
	if(line == NULL)
		printf("%s[%s]%s At %s%s:%d%s: %s\n", color, type, FORMAT_RESET, COLOR_CYAN_BOLD, file, line_index, FORMAT_RESET, message);
	else
		printf("%s[%s]%s At %s%s:%d%s: %s\n  %s\n", color, type, FORMAT_RESET, COLOR_CYAN_BOLD, file, line_index, FORMAT_RESET, message, line);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movq %r8, %r14
movq %rcx, %r11
movl %esi, %r10d
movq %rdi, %r9
testq %rdx, %rdx
je 0x57f6
movq %rdx, %rbx
leaq 0x7848(%rip), %rcx      # 0xd025
leaq 0x8f39(%rip), %rdi      # 0xe71d
leaq 0x809b(%rip), %r8       # 0xd886
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
pushq %rbx
jmp 0x5817
subq $0x8, %rsp
leaq 0x7824(%rip), %rcx      # 0xd025
leaq 0x8efa(%rip), %rdi      # 0xe702
leaq 0x8077(%rip), %r8       # 0xd886
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
pushq %r11
pushq %rcx
pushq %r10
callq 0x20d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: exclude_conf_file
void exclude_conf_file(arraylist_t *conf, char *name){
    if(strlen(name) <= 0) return;

    rule_t *e;

    e = malloc(sizeof(rule_t));
    e->name = malloc(sizeof(char) * 1048);

    strcpy(e->name, "conf_inc_");
    strcat(e->name, name);

    e->enable = 1;
    e->value = 0;
    arraylist_add(conf, e);
}

// Assembly:
cmpb $0x0, (%rsi)
je 0x5a96
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2140
movq %rax, %r15
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, (%r15)
movabsq $0x636e695f666e6f63, %rcx # imm = 0x636E695F666E6F63
movq %rcx, (%rax)
movw $0x5f, 0x8(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2180
movq $0x1, 0x8(%r15)
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x6b96
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: find_rule_index
int find_rule_index(arraylist_t *conf, char *name){
    if(strlen(name) <= 0) return -2;

    for(size_t i = 0; i < conf->size; i++){
        if(strcmp(name, ((rule_t*)(conf->array[i]))->name) == 0){
            return i;
        }
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x0, (%rsi)
je 0x5ada
movq 0x8(%rdi), %r15
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x5ae4
movq %rsi, %r14
movq (%rdi), %r13
xorl %r12d, %r12d
movq (%r13,%r12,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x2120
testl %eax, %eax
je 0x5ae1
incq %r12
cmpq %r12, %r15
jne 0x5abc
jmp 0x5ae4
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
jmp 0x5ae4
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: exclude_file
void exclude_file(FILE *src, arraylist_t *conf){
    if(src == NULL) return;
    char *line;
    int found;
    char *tmp;
    char *get;
    rule_t *e;

    line = malloc(sizeof(char) * 1048);
    tmp = malloc(sizeof(char) * 1048);

    get = fgets(line, 1048, src);
    if(get == NULL) { //Unexpected EOF reached
        free(line);
        free(tmp);
        return;
    }

    while(!is_whitespace(line[0]) && line[0] != '#'){
        strcpy(tmp, "exfile_");
        if(line[1] == ' '){
            strcat(tmp, line+2);
        }else{
            strcat(tmp, line+1);
        }
        strformat(tmp, 1048);

        found = find_rule_index(conf, tmp);
        if(found == -1 ){
            e = malloc(sizeof(rule_t));
            e->name = malloc(sizeof(char) * 1048);
            strcpy(e->name, tmp);
            e->value = 0;
            e->enable = 0;
            arraylist_add(conf, e);
        }
        get = fgets(line, 1048, src);
        if(get == NULL) break;
    }
    free(line);
    free(tmp);
}

// Assembly:
testq %rdi, %rdi
je 0x5e0b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %r14
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, %r15
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, %r12
movq %r15, %rdi
movl $0x418, %esi            # imm = 0x418
movq %r14, %rdx
callq 0x2110
testq %rax, %rax
je 0x5ded
leaq 0x1(%r15), %rbp
movq %r15, %rbx
addq $0x2, %rbx
movq %rbx, (%rsp)
movsbl (%r15), %edi
callq 0x7ed1
testb %al, %al
jne 0x5ded
cmpb $0x23, (%r15)
je 0x5ded
cmpb $0x20, (%rbp)
movabsq $0x5f656c69667865, %rax # imm = 0x5F656C69667865
movq %rax, (%r12)
movq %rbp, %rsi
cmoveq %rbx, %rsi
movq %r12, %rdi
callq 0x2180
movl $0x418, %esi            # imm = 0x418
movq %r12, %rdi
callq 0x8124
movq %r13, %rdi
movq %r12, %rsi
callq 0x5a97
cmpl $-0x1, %eax
jne 0x5dd4
movl $0x10, %edi
callq 0x2140
movq %r14, %rbx
movq %r13, %r14
movq %rax, %r13
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, (%r13)
movq %rax, %rdi
movq %r12, %rsi
callq 0x2080
movq $0x0, 0x8(%r13)
movq %r14, %rdi
movq %r13, %rsi
movq %r14, %r13
movq %rbx, %r14
movq (%rsp), %rbx
callq 0x6b96
movq %r15, %rdi
movl $0x418, %esi            # imm = 0x418
movq %r14, %rdx
callq 0x2110
testq %rax, %rax
jne 0x5d32
movq %r15, %rdi
callq 0x2030
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: recursive_activation
void recursive_activation(FILE *src, arraylist_t *conf){
    if(src == NULL) return;

    char *line;
    char *get; //fgets return
    int found;
    int enable;
    enable = 0;
    rule_t *e;

    line = malloc(sizeof(char) * 1048);

    get = fgets(line, 1048, src);
    if(get == NULL) { //Unexpected EOF reached
        free(line);
        return;
    }
    if(!is_whitespace(line[0]) && line[0] != '#'){

        found = find_rule_index(conf, "recursive");

        if(strstr(line, "true")){
            enable = 1;
        }
        if(strstr(line, "false")){
            enable = 0;
        }

        if(found >= 0){
            ((rule_t*)(conf->array[found]))->enable= enable;
        }else if(found == -1){
            e = malloc(sizeof(rule_t));

            e->name = malloc(sizeof(char) * 1048);

            strcpy(e->name, "recursive");
            e->value = 0;
            e->enable = enable;
            arraylist_add(conf, e);
        }
    }
    free(line);
}

// Assembly:
testq %rdi, %rdi
je 0x5eb8
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, %rbx
movq %rax, %rdi
movl $0x418, %esi            # imm = 0x418
movq %r15, %rdx
callq 0x2110
testq %rax, %rax
je 0x5f02
movsbl (%rbx), %edi
callq 0x7ed1
testb %al, %al
jne 0x5f02
cmpb $0x23, (%rbx)
je 0x5f02
leaq 0x88fe(%rip), %rsi      # 0xe767
movq %r14, %rdi
callq 0x5a97
movl %eax, %ebp
leaq 0x88f7(%rip), %rsi      # 0xe771
movq %rbx, %rdi
callq 0x21c0
testq %rax, %rax
setne %r15b
leaq 0x88e6(%rip), %rsi      # 0xe776
movq %rbx, %rdi
callq 0x21c0
testq %rax, %rax
sete %al
andb %r15b, %al
movzbl %al, %r12d
testl %ebp, %ebp
js 0x5eb9
movq (%r14), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
movl %r12d, 0x8(%rax)
jmp 0x5f02
retq
cmpl $-0x1, %ebp
jne 0x5f02
movl $0x10, %edi
callq 0x2140
movq %rax, %r15
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, (%r15)
movabsq $0x7669737275636572, %rcx # imm = 0x7669737275636572
movq %rcx, (%rax)
movw $0x65, 0x8(%rax)
movl $0x0, 0xc(%r15)
movl %r12d, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6b96
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: get_rule
rule_t *get_rule(arraylist_t *conf, char *name){
    if(conf == NULL || strlen(name) <= 0) return NULL;
    int index = find_rule_index(conf, name);
    if(index >= 0) return ((rule_t*)(arraylist_get(conf, (unsigned int)index)));
    return NULL;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x5f66
cmpb $0x0, (%rsi)
je 0x5f66
movq %rdi, %rbx
callq 0x5a97
testl %eax, %eax
js 0x5f66
movl %eax, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x6c76
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: exclude_filepath
void exclude_filepath(arraylist_t *conf, char *filepath){
    if(strlen(filepath) <= 0) return;

    rule_t *e;

    e = malloc(sizeof(rule_t));
    e->name = malloc(sizeof(char) * 1048);

    strcpy(e->name, "incfilepath_");
    strcat(e->name, filepath);

    e->enable = 1;
    e->value = 0;
    arraylist_add(conf, e);
}

// Assembly:
cmpb $0x0, (%rsi)
je 0x5fd2
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2140
movq %rax, %r15
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, (%r15)
movabsq $0x70656c6966636e69, %rcx # imm = 0x70656C6966636E69
movq %rcx, (%rax)
movabsq $0x5f68746170656c, %rcx # imm = 0x5F68746170656C
movq %rcx, 0x5(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2180
movq $0x1, 0x8(%r15)
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x6b96
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: is_excluded
int is_excluded(arraylist_t *conf, char *path) {
    char *name;
    name = malloc(sizeof(char) * 1048);

    strcpy(name, "exfile_");
    strcat(name, path);
    if(get_rule(conf, name) == NULL) {
        free(name);
        return 0;
    } else {
        free(name);
        return 1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x418, %edi            # imm = 0x418
callq 0x2140
movq %rax, %r15
movabsq $0x5f656c69667865, %rax # imm = 0x5F656C69667865
movq %rax, (%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2180
movq %r14, %rdi
movq %r15, %rsi
callq 0x5f44
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
movq %r15, %rdi
callq 0x2030
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/conf.c
// Function: free_conf
void free_conf(arraylist_t *conf) {
    if(!conf) return;
    for(size_t i = 0; i < conf->size; i++){
        free(((rule_t*)(arraylist_get(conf,i)))->name);
        free(conf->array[i]);
    }
    arraylist_free(conf, 0);
}

// Assembly:
testq %rdi, %rdi
je 0x6075
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x6064
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c76
movq (%rax), %rdi
callq 0x2030
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
cmpq 0x8(%rbx), %r14
jb 0x603c
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6d0a
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: field_init
field_t *field_init(char *name, char *type, char type_is_pointer, int line_index) {
	field_t *field = malloc(sizeof(field_t));

	if(field != NULL) {
		field->name            = name;
		field->type.name       = type;
		field->type.is_pointer = type_is_pointer;
		field->type.is_literal = 0;
		field->line            = line_index;
		field->is_param        = 0;
		field->value           = NULL;
	}
	return field;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x28, %edi
callq 0x2140
testq %rax, %rax
je 0x60ce
movq %r15, (%rax)
movq %r14, 0x10(%rax)
movb %bpl, 0x18(%rax)
xorl %ecx, %ecx
movb %cl, 0x19(%rax)
movl %ebx, 0x20(%rax)
movb %cl, 0x24(%rax)
movq $0x0, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: scope_init
scope_t *scope_init(scope_t *parent) {
	scope_t *scope = malloc(sizeof(scope_t));

	if(scope != NULL) {
		scope->parent    = parent;
		scope->children  = linkedlist_init();
		scope->variables = arraylist_init(10);
		scope->functions = arraylist_init(10);
		scope->from_line = -1;
		scope->to_line   = -1;
		scope->from_char = -1;
		scope->to_char   = -1;
	}

	return scope;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x30, %edi
callq 0x2140
movq %rax, %rbx
testq %rax, %rax
je 0x6125
movq %r14, (%rbx)
xorl %eax, %eax
callq 0x8cf4
movq %rax, 0x8(%rbx)
movl $0xa, %edi
callq 0x6ac8
movq %rax, 0x18(%rbx)
movl $0xa, %edi
callq 0x6ac8
movq %rax, 0x10(%rbx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: is_in_child_scope
scope_t *is_in_child_scope(scope_t *scope, int line) {
	scope_t *child;
	node_t * current = scope->children->head;
	if(current != NULL) {
		do {
			child = (scope_t*) current->val;
			if(line >= child->from_line && line <= child->to_line)
				return child;
		} while ((current = current->next) != NULL);
	}

	return NULL;
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x6150
movq (%rcx), %rax
cmpl %esi, 0x20(%rax)
jg 0x614a
cmpl %esi, 0x28(%rax)
jge 0x6152
movq 0x8(%rcx), %rcx
jmp 0x6138
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: parse_scope_content
static void parse_scope_content(arraylist_t *file, scope_t *scope) {
	char *line;
	arraylist_t *variables;

	for(int i = scope->from_line ; i <= scope->to_line ; i++) {
		if(is_in_child_scope(scope, i)) continue; //Ignore lines inside child scopes
		line = (char*) arraylist_get(file, i);
		variables = get_variables_from_declaration(i,line);
		if(variables != NULL) {
			arraylist_add_all(scope->variables, variables);
			arraylist_free(variables, 0);
			variables = NULL;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq 0x20(%rsi), %r15
cmpl 0x28(%rsi), %r15d
jg 0x671e
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x66da
movq (%rax), %rcx
movslq 0x20(%rcx), %rdx
cmpq %rdx, %r15
jl 0x66ca
movslq 0x28(%rcx), %rdx
cmpq %rdx, %r15
jle 0x66d5
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x66b5
xorl %ecx, %ecx
testq %rcx, %rcx
jne 0x670e
movq %r14, %rdi
movq %r15, %rsi
callq 0x6c76
movl %r15d, %edi
movq %rax, %rsi
callq 0x8888
testq %rax, %rax
je 0x670e
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x6c40
movq %r12, %rdi
xorl %esi, %esi
callq 0x6d0a
leaq 0x1(%r15), %rax
movslq 0x28(%rbx), %rcx
cmpq %rcx, %r15
movq %rax, %r15
jl 0x66a8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: scope_free
void scope_free(scope_t *scope) {
	node_t * current;

	//Don't free parent !
	
	//Recursively free children
	current = scope->children->head;
	while (current != NULL) {
		scope_free(current->val);
		current->val = NULL;
		current = current->next;
	}
	linkedlist_free(scope->children);

	//Free functions
	for(size_t i = 0 ; i < scope->functions->size; i++) {
		function_free(scope->functions->array[i]);
		scope->functions->array[i] = NULL;
	}
	arraylist_free(scope->functions, 1);

	//Free variables
	field_list_free(scope->variables);

	free(scope);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x6753
movq (%r14), %rdi
callq 0x672a
movq $0x0, (%r14)
movq 0x8(%r14), %r14
jmp 0x6739
movq 0x8(%rbx), %rdi
callq 0x8f05
movq 0x10(%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x6792
xorl %r14d, %r14d
movq (%rdi), %rax
movq (%rax,%r14,8), %rdi
callq 0xb661
movq 0x10(%rbx), %rax
movq (%rax), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
movq 0x10(%rbx), %rdi
cmpq 0x8(%rdi), %r14
jb 0x676a
movl $0x1, %esi
callq 0x6d0a
movq 0x18(%rbx), %rdi
callq 0x6899
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: type_exists
unsigned char type_exists(char *type) {
	static const char *known_types[] = {"char","short","int","unsigned","signed","long","signed","float","double","size_t","void"};
	for(unsigned i = 0 ; i < 11 ; i++)
		if(!strcmp(type, known_types[i]))
			return 1;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x80dd(%rip), %rsi      # 0xe906
callq 0x2120
testl %eax, %eax
je 0x6865
xorl %ecx, %ecx
leaq 0x801d(%rip), %r14      # 0xe858
movq %rcx, %r15
cmpq $0xa, %rcx
je 0x685c
movslq 0x4(%r14,%r15,4), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x2120
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0x683b
cmpq $0xa, %r15
setb %al
jmp 0x6867
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: field_free
void field_free(field_t *field) {
	free(field->name);
	if(field->value != NULL) {
		free(field->value);
	}
	free(field->type.name);
	free(field);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2030
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6887
callq 0x2030
movq 0x10(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: field_list_free
void field_list_free(arraylist_t *list) {
	field_t *field = NULL;
	for(unsigned int i = 0 ; i < list->size ; i++) {
		field = arraylist_get(list, i);
		field_free(field);
	}
	arraylist_free(list, 0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x68c7
movl $0x1, %ebp
xorl %esi, %esi
movq %rbx, %rdi
callq 0x6c76
movq %rax, %rdi
callq 0x686d
movl %ebp, %esi
incl %ebp
cmpq %rsi, 0x8(%rbx)
ja 0x68ad
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6d0a
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: function_list_free
void function_list_free(arraylist_t *list) {
	function_t *function = NULL;
	for(unsigned int i = 0 ; i < list->size ; i++) {
		function = arraylist_get(list, i);
		function_free(function);
	}
	arraylist_free(list, 0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x6905
movl $0x1, %ebp
xorl %esi, %esi
movq %rbx, %rdi
callq 0x6c76
movq %rax, %rdi
callq 0xb661
movl %ebp, %esi
incl %ebp
cmpq %rsi, 0x8(%rbx)
ja 0x68eb
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6d0a
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: find_function
function_t *find_function(scope_t *scope, char *name, unsigned char allow_prototypes) {
	scope_t *root = get_root_scope(scope);
	function_t *function = NULL;
	for(size_t i = 0 ; i < root->functions->size ; i++) {
		function = arraylist_get(root->functions, i);
		if(!strcmp(name, function->name) && (allow_prototypes || !function->is_prototype))
			return function;
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r13
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x6941
movq 0x10(%r13), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x698d
xorl %r15d, %r15d
movq %r15, %rsi
callq 0x6c76
movq %rax, %r12
movq (%rax), %rsi
movq %r14, %rdi
callq 0x2120
testl %eax, %eax
jne 0x6980
testb %bl, %bl
jne 0x6990
cmpb $0x0, 0x18(%r12)
je 0x6990
incq %r15
movq 0x10(%r13), %rdi
cmpq 0x8(%rdi), %r15
jb 0x695a
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: find_variable
field_t *find_variable(scope_t *scope, char *name) {
	field_t *variable = NULL;

	while(scope != NULL) {
		for(size_t i = 0 ; i < scope->variables->size ; i++) {
			variable = arraylist_get(scope->variables, i);
			if(!strcmp(name, variable->name))
				return variable;
		}
		scope = scope->parent;
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6a21
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%r14), %rdi
cmpq $0x0, 0x8(%rdi)
setne %bpl
je 0x6a14
xorl %esi, %esi
callq 0x6c76
movq %rax, %r12
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x2120
testl %eax, %eax
je 0x6a11
movl $0x1, %r12d
movq 0x18(%r14), %rdi
cmpq 0x8(%rdi), %r12
setb %bpl
jae 0x6a14
movq %r12, %rsi
callq 0x6c76
movq %rax, %r13
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x2120
incq %r12
testl %eax, %eax
jne 0x69e1
movq %r13, %r15
jmp 0x6a14
movq %r12, %r15
testb %bpl, %bpl
jne 0x6a24
movq (%r14), %r14
testq %r14, %r14
jne 0x69b3
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/scopetree.c
// Function: find_function_prototype
function_t *find_function_prototype(scope_t *root_scope, char *name) {

	arraylist_t *functions = root_scope->functions;
	function_t *prototype  = NULL;

	for(size_t j = 0 ; j < functions->size ; j++) {
		prototype = arraylist_get(functions, j);
		if(prototype->is_prototype && !strcmp(prototype->name, name)) {
			return prototype;
		}
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r14
cmpq $0x0, 0x8(%r14)
je 0x6a7b
movq %rsi, %rbx
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x6c76
cmpb $0x0, 0x18(%rax)
je 0x6a72
movq %rax, %r12
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2120
testl %eax, %eax
je 0x6a7e
incq %r15
cmpq 0x8(%r14), %r15
jb 0x6a4f
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/arraylist.c
// Function: arraylist_init
arraylist_t *arraylist_init(unsigned int initial_capacity) {
	arraylist_t *list = malloc(sizeof(arraylist_t));
	
	if(list != NULL) {
		list->size = 0;
		list->capacity = initial_capacity;
		list->array = malloc(list->capacity * sizeof(void*));
		if(list->array == NULL) {
			free(list);
			list = NULL;
		} else {
			arraylist_set_null(list);
		}
	}
	return list;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x18, %edi
callq 0x2140
testq %rax, %rax
je 0x6b1e
movq %rax, %rbx
movq $0x0, 0x8(%rax)
movl %ebp, %r14d
movq %r14, 0x10(%rax)
shlq $0x3, %r14
movq %r14, %rdi
callq 0x2140
movq %rax, (%rbx)
testq %rax, %rax
je 0x6b16
testl %ebp, %ebp
je 0x6b20
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20f0
jmp 0x6b20
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/arraylist.c
// Function: arraylist_copy
arraylist_t *arraylist_copy(arraylist_t *list) {
	arraylist_t *copy = malloc(sizeof(arraylist_t));

	if(copy != NULL) {
		copy->size = list->size; 
		copy->capacity = list->capacity;
		copy->array = malloc(copy->capacity * sizeof(void*));
		if(copy->array == NULL) {
			free(copy);
			copy = NULL;
		} else {
			for(size_t i = 0 ; i < list->capacity ; i++)
				copy->array[i] = list->array[i];
		}
	}
	return copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x2140
testq %rax, %rax
je 0x6b8b
movq %rax, %rbx
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %r15
movq %r15, 0x10(%rbx)
leaq (,%r15,8), %rdi
callq 0x2140
movq %rax, (%rbx)
testq %rax, %rax
je 0x6b83
testq %r15, %r15
je 0x6b8d
movq (%r14), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq %rsi, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x6b71
jmp 0x6b8d
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/arraylist.c
// Function: arraylist_remove
void *arraylist_remove(arraylist_t *list, size_t index) {
	void *value = arraylist_get(list, index);
	size_t num_moved;

	if(value == NULL) return NULL;

	num_moved = list->size - index;
	if(num_moved > 0) {
		for(size_t i = 1 ; i <= num_moved ; i++) {
			list->array[index + i - 1] = list->array[index + i];
		}
	}
	list->array[--(list->size)] = NULL;
	return value;
}

// Assembly:
movq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
jbe 0x6c99
movq (%rdi), %rax
movq (%rax,%rsi,8), %rax
jmp 0x6c9b
xorl %eax, %eax
testq %rax, %rax
je 0x6cdf
movq %rcx, %rdx
subq %rsi, %rdx
je 0x6cca
leaq 0x8(,%rsi,8), %rsi
xorl %r8d, %r8d
movq (%rdi), %r9
addq %rsi, %r9
movq (%r9,%r8,8), %r10
movq %r10, -0x8(%r9,%r8,8)
incq %r8
cmpq %rdx, %r8
jb 0x6cb3
movq (%rdi), %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, 0x8(%rdi)
movq $0x0, -0x8(%rdx,%rcx,8)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/arraylist.c
// Function: arraylist_index_of
size_t arraylist_index_of(arraylist_t *list, void *value) {
	for(size_t i = 0 ; i < list->size ; i++) {
		if(value == list->array[i]) {
			return i;
		}
	}
	return -1;
}

// Assembly:
movq 0x8(%rdi), %rcx
movq $-0x1, %rax
testq %rcx, %rcx
je 0x6d05
movq (%rdi), %rdi
xorl %edx, %edx
cmpq %rsi, (%rdi,%rdx,8)
je 0x6d06
incq %rdx
cmpq %rdx, %rcx
jne 0x6cf7
retq
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/arraylist.c
// Function: arraylist_free
void arraylist_free(arraylist_t *list, unsigned char free_content) {
	if(free_content) {
		for(size_t i = 0 ; i < list->size ; i++) {
			if(list->array[i] != NULL)
				free(list->array[i]);
		}
	}
	free(list->array);
	free(list);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x6d39
cmpq $0x0, 0x8(%rbx)
je 0x6d39
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x6d30
callq 0x2030
incq %r14
cmpq 0x8(%rbx), %r14
jb 0x6d1f
movq (%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/System-Glitch[P]ESGILinter-C/src/parsing_operations.c
// Function: parse_operand
static type_t parse_operand(char *operand, int line_index, scope_t *scope, messages_t *messages) {

	type_t type = parse_operation(operand, line_index, scope, messages);

	if(!strcmp(type.name, "NULL")) {
		free(type.name);
		type = parse_expression(operand, line_index, scope, messages);
	}

	return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r12
callq 0x7020
movq %rax, %r15
movq %rdx, %r13
leaq 0x6e7d(%rip), %rsi      # 0xe8c0
movq %rax, %rdi
callq 0x2120
testl %eax, %eax
jne 0x7a6d
movq %r15, %rdi
callq 0x2030
movq %r12, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xb680
movq %rax, %r15
movq %rdx, %r13
movq %r15, %rax
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq