LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/trumabrat[P]GrandProjet/Struct_Liste.c
// Function: desalloue
void desalloue(ListeEntier *L){
  Cell_entier *cour,*prec;
  cour=*L;
  while(cour!=NULL){
    prec=cour;
    cour=cour->suiv;
    free(prec);
  }
  *L=NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3451
movq 0x8(%rdi), %r14
callq 0x1030
movq %r14, %rdi
testq %r14, %r14
jne 0x3440
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/trumabrat[P]GrandProjet/Struct_Liste.c
// Function: afficher_liste_entier
void afficher_liste_entier(ListeEntier* L){
  if(!L) printf("L est null!\n");
  ListeEntier tmp = *L;
  printf("[");
  while(tmp){
    printf("%d, ", tmp->u);
    tmp = tmp->suiv;
  }
  printf("]\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x3478
leaq 0x1091(%rip), %rdi      # 0x4504
callq 0x1070
movq (%rbx), %r14
movl $0x5b, %edi
callq 0x1040
testq %r14, %r14
je 0x34a7
leaq 0x106e(%rip), %rbx      # 0x44ff
movl (%r14), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10a0
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x3491
leaq 0x1062(%rip), %rdi      # 0x4510
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./lexer.c
// Function: remove_comments
int remove_comments(char *B,int forward){   //remove comments from a char array

    while(!((B[forward] == '*') && (B[forward+1] == '*'))){
        forward++;
        if(B[forward] == '\n'){
            lineno++;
        }
    }
    return forward;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xaf0f(%rip), %ecx      # 0xd2f0
movslq %esi, %rax
movb (%rdi,%rax), %dl
cmpb $0x2a, %dl
jne 0x23f3
cmpb $0x2a, 0x1(%rdi,%rax)
je 0x2409
movb 0x1(%rdi,%rax), %dl
incq %rax
cmpb $0xa, %dl
jne 0x23e7
incl %ecx
movl %ecx, 0xaee9(%rip)      # 0xd2f0
jmp 0x23e7
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./lexer.c
// Function: reloadBuff
FILE* reloadBuff(){    //reload the buffer
    fseek( fp1, 0, SEEK_CUR);
    fp1 = getstream(fp1);
    B[3998] = '~';
    return fp1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x174c2(%rip), %rdi     # 0x198d8
xorl %esi, %esi
movl $0x1, %edx
callq 0x2160
movq 0x174af(%rip), %rdi     # 0x198d8
callq 0x243e
movq %rax, 0x174a3(%rip)     # 0x198d8
movb $0x7e, 0x18442(%rip)    # 0x1a87e
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./lexer.c
// Function: getstream
FILE* getstream(FILE *fp){  //the input stream method, reads bufflen data into buffer B and returns file with advanced pointer 
	int i;
    int bufflen = 4000;
    buffer_flush(B);
	if(fp == NULL){
		printf("Invalid File name..\n");
		exit(0);
	}
	//flushing the buffer
    for(i = 0; i < bufflen; i++)
        B[i] = '\0';

	if(fread(B,(size_t)bufflen,1,fp)){
        return fp;
	}
	//printf("(%s)\n",B);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x17491(%rip), %rdi     # 0x198e0
movl $0xfa0, %edx            # imm = 0xFA0
xorl %esi, %esi
callq 0x20f0
testq %rbx, %rbx
je 0x2497
leaq 0x17479(%rip), %r14     # 0x198e0
movl $0xfa0, %edx            # imm = 0xFA0
movq %r14, %rdi
xorl %esi, %esi
callq 0x20f0
movl $0xfa0, %esi            # imm = 0xFA0
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2080
testq %rax, %rax
cmovneq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x836f(%rip), %rdi      # 0xa80d
callq 0x2070
xorl %edi, %edi
callq 0x21c0
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./lexer.c
// Function: removeComments
void removeComments(char *testcaseFile){ //used to remove comments from testcasefile and print clean code in cleanfile

    FILE *f1 = fopen(testcaseFile, "r+");
    if(f1==NULL){
        printf("ERROR OPENING FILE\n");
        return;
    }
    //FILE *f2 = fopen(cleanFile, "w+");
    
    char c;

    while(!feof(f1)){

        c = fgetc(f1);
        if(c=='$')
            break;

        if(c=='*'){
            if(c = fgetc(f1)== '*'){

                while(!((c = fgetc(f1) == '*') && (c = fgetc(f1)== '*')))
                    continue;
                c = fgetc(f1);
                
            }}
 
        fputc(c, stdout);

        }

fclose(f1);
//fclose(f2);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x6ee7(%rip), %rsi      # 0x939f
callq 0x2170
testq %rax, %rax
je 0x2548
movq %rax, %rbx
movq %rax, %rdi
callq 0x2140
testl %eax, %eax
jne 0x253c
movq 0xab04(%rip), %r14      # 0xcfe0
movq %rbx, %rdi
callq 0x2100
cmpb $0x2a, %al
je 0x24f2
movzbl %al, %ecx
cmpl $0x24, %ecx
jne 0x2525
jmp 0x253c
movq %rbx, %rdi
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x2a, %ecx
jne 0x2525
movq %rbx, %rdi
callq 0x2100
cmpl $0x2a, %eax
jne 0x2503
movq %rbx, %rdi
callq 0x2100
cmpl $0x2a, %eax
jne 0x2503
movq %rbx, %rdi
callq 0x2100
movsbl %al, %edi
movq (%r14), %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x2140
testl %eax, %eax
je 0x24dc
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2090
leaq 0x82d2(%rip), %rdi      # 0xa821
popq %rbx
popq %r14
popq %rbp
jmp 0x2070
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: size_of
int size_of(int *a){ 
    int i=0;
    int count = 0;
    while(a[i]!=-1){
        i++;
        count++;
    }                       //to compute size of an array, given -1 as end-marker
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, (%rdi)
je 0x3045
xorl %eax, %eax
cmpl $-0x1, 0x4(%rdi,%rax,4)
leaq 0x1(%rax), %rax
jne 0x3038
jmp 0x3047
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: presentIn
int presentIn(int *a, int b){

    int i = 0, flag = 0;
    for(i = 0; a[i]!=0; i++){
        if(a[i]==b)
            flag = 1;
    }
    return flag;            //if b is in array a

}

// Assembly:
movl (%rdi), %ecx
testl %ecx, %ecx
je 0x306f
pushq %rbp
movq %rsp, %rbp
addq $0x4, %rdi
xorl %eax, %eax
movl $0x1, %edx
cmpl %esi, %ecx
cmovel %edx, %eax
movl (%rdi), %ecx
addq $0x4, %rdi
testl %ecx, %ecx
jne 0x305e
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: epsInFirst
int epsInFirst(int alpha, int first[][11]){         //if epsilon is part of first set
    int i = 0;
    for(i=0; i < 11; i++){
        if(first[alpha][i] == EPLS)
            return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edi, %rax
imulq $0x2c, %rax, %rax
addq %rsi, %rax
xorl %ecx, %ecx
cmpl $0x6d, (%rax,%rcx,4)
je 0x30d9
incq %rcx
cmpq $0xb, %rcx
jne 0x30c6
xorl %eax, %eax
jmp 0x30de
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: findfirst
void findfirst(int result[150], int n, int G[][14]){  //find first set of a given non-terminal
int i, k, j = 0, l;

if(n > 51)
    result[0] = n;

else{

for(i = 0; i < 94; i++)
    if(G[i][0] == n){

        
        if (G[i][1] > 51)
            {if(!presentIn(result, G[i][1])){
                    result[j++] = G[i][1];
                }}

        else{
        for(k = 1; k < size_of(G[i]); k++){
            int flag = 0;
            int subresult[150] = {0};

            findfirst(subresult, G[i][k], G);

            for(l = 0; subresult[l]!=0; l++){
                if(subresult[l] == 109)
                    flag = 1;
                else
                if(!presentIn(result, subresult[l])){
                    result[j++] = subresult[l];
                }
                
            }
            
            if(flag!=1)
                break;



        }
            }


    }}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %r15
cmpl $0x33, %esi
jle 0x3104
movl %esi, (%r15)
jmp 0x326f
leaq 0x4(%rdx), %rax
movq %rax, -0x38(%rbp)
leaq 0x4(%r15), %r9
xorl %eax, %eax
movl $0x1, %r14d
movabsq $0x100000000, %rdi      # imm = 0x100000000
xorl %r13d, %r13d
movq %rdx, -0x40(%rbp)
movl %esi, -0x2c(%rbp)
movq %r9, -0x58(%rbp)
movq %rax, -0x50(%rbp)
imulq $0x38, %rax, %r8
cmpl %esi, (%rdx,%r8)
jne 0x3252
addq %rdx, %r8
movl 0x4(%r8), %eax
cmpl $0x33, %eax
jle 0x3181
movl (%r15), %ecx
testl %ecx, %ecx
je 0x3172
xorl %edx, %edx
movq %r9, %rsi
cmpl %eax, %ecx
cmovel %r14d, %edx
movl (%rsi), %ecx
addq $0x4, %rsi
testl %ecx, %ecx
jne 0x315a
testl %edx, %edx
jne 0x3252
movslq %r13d, %rcx
incl %r13d
movl %eax, (%r15,%rcx,4)
jmp 0x3252
movl $0x1, %ebx
movq %r8, -0x60(%rbp)
cmpl $-0x1, (%r8)
je 0x31a8
movq -0x38(%rbp), %rcx
xorl %eax, %eax
addq %rdi, %rax
cmpl $-0x1, (%rcx)
leaq 0x4(%rcx), %rcx
jne 0x3196
sarq $0x20, %rax
jmp 0x31aa
xorl %eax, %eax
cmpq %rax, %rbx
jge 0x3252
movq %rbx, -0x48(%rbp)
movq %r8, %rbx
xorl %r12d, %r12d
movl $0x258, %edx            # imm = 0x258
leaq -0x2c0(%rbp), %rdi
xorl %esi, %esi
callq 0x20f0
movq -0x48(%rbp), %rax
movl (%rbx,%rax,4), %esi
movq -0x48(%rbp), %rbx
leaq -0x2c0(%rbp), %rdi
movq -0x40(%rbp), %rdx
callq 0x30e0
movq -0x58(%rbp), %r9
xorl %eax, %eax
movl -0x2c0(%rbp,%r12,4), %ecx
cmpl $0x6d, %ecx
je 0x322e
testl %ecx, %ecx
je 0x3238
movl (%r15), %edx
testl %edx, %edx
je 0x3222
xorl %esi, %esi
movq %r9, %rdi
cmpl %ecx, %edx
cmovel %r14d, %esi
movl (%rdi), %edx
addq $0x4, %rdi
testl %edx, %edx
jne 0x320e
testl %esi, %esi
jne 0x3233
movslq %r13d, %rdx
incl %r13d
movl %ecx, (%r15,%rdx,4)
jmp 0x3233
movl $0x1, %eax
incq %r12
jmp 0x31f1
incq %rbx
cmpl $0x1, %eax
movabsq $0x100000000, %rdi      # imm = 0x100000000
movq -0x60(%rbp), %r8
je 0x318a
movq -0x50(%rbp), %rax
incq %rax
addq $0x38, -0x38(%rbp)
cmpq $0x5e, %rax
movl -0x2c(%rbp), %esi
movq -0x40(%rbp), %rdx
jne 0x3130
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: search
parsetree search(parsetree root, int a){       //search a node with value a in parsetree with root as its root 
    parsetree temp;

    if(root == NULL)
        return NULL;
    else if((root->value == a) && !root->isVisited){
        return root;
    }
    else if((temp=search(root->child, a))!=NULL)
        return temp;
    else if ((temp = search(root->right, a))!=NULL)
        return temp;
    else
        return NULL;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3509
movl %esi, %r14d
movq %rdi, %rbx
cmpl %r14d, 0x8(%rbx)
jne 0x34ef
cmpl $0x0, 0x3c(%rbx)
je 0x3510
movq 0x18(%rbx), %rdi
movl %r14d, %esi
callq 0x34d1
testq %rax, %rax
jne 0x350d
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
jne 0x34e3
xorl %ebx, %ebx
jmp 0x3510
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: insert
void insert(parsetree x, int rule, int G[][14], node* Lex){ //to insert a node in the parsetree

    int *r = G[rule-1];
    int i = 1;
    parsetree temp, temp2, right, left;

    x->isVisited = 1;
    x->rule = rule;

    while(r[i]!=-1){
        int j;
        temp = (parsetree) malloc(sizeof (struct Parse_Tree));
        temp->Lex = createnode();
        temp->Lex->tk->line = Lex->tk->line;
        temp->generated = 0;
        //temp->Lex = (node *) malloc sizeof(node);
        //temp->Lex->tk = (tokenInfo *) malloc sizeof (tokenInfo);
        temp->value =  r[i];
        
        if(r[i] > NON_TERMINALS)
        {
            temp->isleaf = 1;
            //temp->Lex = getNextToken();
        }
        else
            {
                //temp->Lex = NULL;
                temp->isleaf = 0;
            }
        temp->left = NULL;
        temp->right = NULL;
        temp->child = NULL;
        temp->parent = x;
        //temp->Lex = Lex;
        temp->isVisited = 0;

        if(x->child==NULL)
            x->child = temp;
        else                            //if x has children already
        {
            temp2 = x->child;
            while(temp2->right!=NULL)
            {
                right = temp2->right;
                temp2 = right;

            }

            temp2->right = temp;
            temp->left = temp2;
             
        }


        i++;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq %esi, %rsi
imulq $0x38, %rsi, %rax
movl $0x1, 0x3c(%rdi)
movq %rdi, -0x30(%rbp)
movl %esi, 0xc(%rdi)
movq %rdx, -0x40(%rbp)
movl -0x34(%rdx,%rax), %r14d
cmpl $-0x1, %r14d
je 0x3617
addq %rax, -0x40(%rbp)
movq (%rcx), %rax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %r13
movl 0x3c(%rax), %eax
movl %eax, -0x34(%rbp)
movl $0x1, %ebx
movl $0x40, %edi
callq 0x2150
movq %rax, %r15
movl $0x8, %edi
callq 0x2150
movq %rax, %r12
movl $0x40, %edi
callq 0x2150
movq %rax, (%r12)
movq %r12, (%r15)
movl -0x34(%rbp), %ecx
movl %ecx, 0x3c(%rax)
xorl %ecx, %ecx
movl %ecx, 0x10(%r15)
movl %r14d, 0x8(%r15)
xorl %eax, %eax
cmpl $0x34, %r14d
setge %al
movl %eax, 0x38(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movq $0x0, 0x28(%r15)
movq -0x30(%rbp), %rax
movq %rax, 0x30(%r15)
movl %ecx, 0x3c(%r15)
movq %r13, %rax
testq %r13, %r13
je 0x35f6
movq %rax, %rcx
movq 0x28(%rax), %rax
testq %rax, %rax
jne 0x35e0
movq %r15, 0x28(%rcx)
movq %rcx, 0x20(%r15)
jmp 0x3601
movq -0x30(%rbp), %rax
movq %r15, 0x18(%rax)
movq %r15, %r13
movq -0x40(%rbp), %rax
movl -0x34(%rax,%rbx,4), %r14d
incq %rbx
cmpl $-0x1, %r14d
jne 0x3574
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: pop
int pop(){                  //pop functionality for stack
    int temp = stack[top];
    stack[top] = -1;
    top--;
    return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0xc404(%rip), %rcx      # 0xfc60
leaq 0x1702d(%rip), %rdx     # 0x1a890
movl (%rdx,%rcx,4), %eax
movl $0xffffffff, (%rdx,%rcx,4) # imm = 0xFFFFFFFF
decl %ecx
movl %ecx, 0xc3eb(%rip)      # 0xfc60
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: printstack
void printstack(){          //print all elements of the stack
    int i;
    for(i=0;i<STACK_SIZE;i++){
        if(stack[i] == -1){
            break;
        }
        printf("%s ",terms[stack[i]]);
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x17007(%rip), %r14     # 0x1a890
leaq 0x91f0(%rip), %r15      # 0xca80
leaq 0x5cb4(%rip), %rbx      # 0x954b
xorl %r12d, %r12d
movslq (%r12,%r14), %rax
cmpq $-0x1, %rax
je 0x38bf
movq (%r15,%rax,8), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20b0
addq $0x4, %r12
cmpq $0xc8, %r12
jne 0x389a
movl $0xa, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: Print_parsing_table
void Print_parsing_table(int table[][TERMINALS]){ //to print the parsing table
    int i;
    int j;
    for(i=0;i<NON_TERMINALS;i++){
        for(j=0;j<TERMINALS;j++){
            if(table[i][j] == -1){
                printf("_ ");
            }else{
                printf("%d ",table[i][j]);
            }
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5c66(%rip), %r14      # 0x954f
leaq 0x5c62(%rip), %r15      # 0x9552
xorl %r12d, %r12d
xorl %r13d, %r13d
movl (%rbx,%r13,4), %esi
cmpl $-0x1, %esi
je 0x390b
movq %r15, %rdi
xorl %eax, %eax
callq 0x20b0
jmp 0x3915
movq %r14, %rdi
xorl %eax, %eax
callq 0x20b0
incq %r13
cmpq $0x3a, %r13
jne 0x38f6
movl $0xa, %edi
callq 0x2040
incq %r12
addq $0xe8, %rbx
cmpq $0x33, %r12
jne 0x38f3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: pullup
parsetree pullup(parsetree head){
    if(head->left==NULL){
        head->child->right = head->right;
        if(head->right!=NULL)
            head->right->left = head->child;
        head->parent->child = head->child;
        head->child->parent = head->parent;
        parsetree temp = head->child;
        free(head);
        return temp;

    }
    else
    {
        head->left->right = head->child;
        head->child->left = head->left;
        head->child->right = head->right;
        if(head->right!=NULL)
            head->right->left = head->child;
        head->child->parent = head->parent;
        parsetree temp = head->child;
        free(head);
        return temp;
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x39fc
movq 0x18(%rdi), %rbx
movq %rbx, 0x28(%rax)
movq %rax, 0x20(%rbx)
movq 0x28(%rdi), %rax
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x39f6
movq %rbx, 0x20(%rax)
movq 0x30(%rdi), %rax
jmp 0x3a1d
movq 0x18(%rdi), %rcx
movq 0x28(%rdi), %rax
movq %rax, 0x28(%rcx)
testq %rax, %rax
je 0x3a11
movq %rcx, 0x20(%rax)
movq 0x30(%rdi), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rdi), %rbx
movq %rax, 0x30(%rbx)
callq 0x2030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: countNodes
void countNodes(parsetree head, int *count){

    if(head==NULL)
        return;
    countNodes(head->child, count);

    count[0]++;
    // printf("%d\n", count[0]);


    countNodes(head->right, count); 



}

// Assembly:
testq %rdi, %rdi
je 0x3b7f
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x3b52
incl (%rbx)
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x3b64
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: ComputeFirstAndFollowSets
void ComputeFirstAndFollowSets(int G[][14], int first[][11], int follow [][15]){ //Compute the first and follow Sets, given Grammar
    int i, j;
    for(i = 1; i < 52; i++){
        //printf("%d - ", i);
        int result[1024] = {0};
        findfirst(result, i, G);
        for(j = 0; result[j]!=0; j++){
             first[i][j] = result[j];

        }

        first[i][j] = -1;

    }

    for(i = 1; i < 52; i++){
        //printf("%d - ", i);
        int result[1024] = {0};
        findfollow(result, i, G);
        for(j = 0; result[j]!=0; j++){
             
             if(result[j]==-1)
                follow[i][j] = 0;
             else{
                follow[i][j] = result[j];
             }
    }

        follow[i][j] = -1;

    }



}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, -0x30(%rbp)
leaq 0x2c(%rsi), %r13
movl $0x1, %r12d
movl $0x1000, %edx           # imm = 0x1000
leaq -0x1030(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x20f0
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x30e0
movl -0x1030(%rbp), %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x3ded
movl %ecx, (%r13,%rax,4)
movl -0x102c(%rbp,%rax,4), %ecx
incq %rax
jmp 0x3dd8
imulq $0x2c, %r12, %rcx
addq -0x30(%rbp), %rcx
movl $0xffffffff, (%rcx,%rax,4) # imm = 0xFFFFFFFF
incq %r12
addq $0x2c, %r13
cmpq $0x34, %r12
jne 0x3dac
addq $0x3c, %rbx
movl $0x1, %r15d
leaq -0x1030(%rbp), %r12
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rdi
xorl %esi, %esi
callq 0x20f0
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x3281
xorl %eax, %eax
movl -0x1030(%rbp,%rax), %ecx
xorl %edx, %edx
cmpl $-0x1, %ecx
je 0x3e4d
testl %ecx, %ecx
je 0x3e56
movl %ecx, %edx
movl %edx, (%rbx,%rax)
addq $0x4, %rax
jmp 0x3e39
movl $0xffffffff, (%rbx,%rax) # imm = 0xFFFFFFFF
incq %r15
addq $0x3c, %rbx
cmpq $0x34, %r15
jne 0x3e1a
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: addLexeme
void addLexeme(parsetree head, node* Lex){

    if(head==NULL){
        return;
    }
    else{
    addLexeme(head->child, Lex);

    /*if(head->value > NON_TERMINALS && head->value!=109){
        if(strcmp(Lex->tk->token,"COMMENTMARK")==0){
            Lex = getNextToken();
        }
        if(strcmp(Lex->tk->value,"declare")==0 && head->value!=59){
            Lex = getNextToken();
        }
        head->Lex = Lex;
        printf("%s\n", terms[head->value]);
        Lex = getNextToken();
    }*/
    if(head->isleaf == 1 && head->value!=109 ){
        
        // head->Lex->tk->line = lineno[pop1];
        strcpy(head->Lex->tk->value,arra[popl++]);
         
        //printf("%s     -     %s\n",terms[head->value],head->Lex->tk->value);
    }
    addLexeme(head->right, Lex);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x40ab
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbc19(%rip), %r15      # 0xfc70
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x403b
cmpl $0x1, 0x38(%r14)
jne 0x4098
cmpl $0x6d, 0x8(%r14)
je 0x4098
movq (%r14), %rax
movq (%rax), %rdi
addq $0x1e, %rdi
movslq 0x168d6(%rip), %rax     # 0x1a958
leal 0x1(%rax), %ecx
movl %ecx, 0x168cd(%rip)     # 0x1a958
leaq (%rax,%rax,4), %rax
leaq (%r15,%rax,8), %rsi
callq 0x2060
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x4057
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./parser.c
// Function: populateLexemes
void populateLexemes(parsetree head, char *filename){



    /*FILE* fp = fopen("testcase5.txt","r");
    rewind(fp);
    fseek( fp, 0, SEEK_SET);
    fp = getstream(fp);*/
 
           node* Lex = getNextToken();                  //Call method in lexer
                    int i = 1;
                    int j = 0;
                    while(strcmp(Lex->tk->value,"$")!=0){

                         //if(strcmp(Lex->tk->value, "**")!=0)
                         // lineno[j] = Lex->tk->value;
                         strcpy(arra[j++],Lex->tk->value);

                         //printf("%s \n", arra[j-1]);
                //printf("%d. token = %s, value = %s, line = %d\n", i++,Lex->tk->token, Lex->tk->value, Lex->tk->line);   //print tokens to console
                        free(Lex);
                        node* Lex = getNextToken();
                    }               //Call method in lexer
    addLexeme(head, Lex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xbbb0(%rip), %r14      # 0xfc70
callq 0x2558
movq %rax, %r15
movq (%r15), %rsi
cmpb $0x24, 0x1e(%rsi)
jne 0x40d7
cmpb $0x0, 0x1f(%rsi)
je 0x40f6
addq $0x1e, %rsi
movq %r14, %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2030
callq 0x2558
addq $0x28, %r14
jmp 0x40c8
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x403b
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./symboltable.h
// Function: hash
int hash(char *key)
{
    int value = 0;
    int i;
    for (i = 0; i < strlen(key); i++)
         value += (int)key[i];
    return (value % SIZE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20a0
testq %rax, %rax
je 0x46fa
xorl %ecx, %ecx
xorl %edx, %edx
movsbl (%rbx,%rcx), %esi
addl %esi, %edx
incq %rcx
cmpq %rcx, %rax
jne 0x46cb
movslq %edx, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
jmp 0x46fc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./functionsymboltable.h
// Function: hash_insert_func
int hash_insert_func(char *key,char* input_parameters,char* output_parameters)
{
    int h = hash(key);
    struct funcNode* it = create_func_node(key,input_parameters,output_parameters);
    if (it == NULL){
        return 0;
    }
    while(functable->table[h]->next != NULL){
        h++;
    }
    functable->table[h]->next = it;
    strcpy(arr[funcnum++], key);
    return h;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x20a0
xorl %r12d, %r12d
testq %rax, %rax
je 0x4757
xorl %ecx, %ecx
movsbl (%rbx,%rcx), %edx
addl %edx, %r12d
incq %rcx
cmpq %rcx, %rax
jne 0x4726
movslq %r12d, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x465f
testq %rax, %rax
je 0x47be
leal -0x1(%r12), %r14d
shlq $0x3, %r12
addq 0x19026(%rip), %r12     # 0x1d7a0
movq (%r12), %rcx
incl %r14d
addq $0x8, %r12
cmpq $0x0, 0xe8(%rcx)
jne 0x477a
movq %rax, 0xe8(%rcx)
movslq 0x18ffb(%rip), %rax     # 0x1d798
leal 0x1(%rax), %ecx
movl %ecx, 0x18ff2(%rip)     # 0x1d798
imulq $0x64, %rax, %rax
leaq 0x18fff(%rip), %rdi     # 0x1d7b0
addq %rax, %rdi
movq %rbx, %rsi
callq 0x2060
jmp 0x47c1
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./functionsymboltable.h
// Function: get_func_hash_value
int get_func_hash_value(char* functionname){
    int h = hash(functionname);
    while(functable->table[h]->next != NULL){
        if(strcmp(functable->table[h]->next->name,functionname) == 0){
            return h;
        }
        h++;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x20a0
xorl %r15d, %r15d
testq %rax, %rax
je 0x481b
xorl %ecx, %ecx
movsbl (%rbx,%rcx), %edx
addl %edx, %r15d
incq %rcx
cmpq %rcx, %rax
jne 0x47ea
movslq %r15d, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %r15
movq 0x18f7e(%rip), %r12     # 0x1d7a0
movq (%r12,%r15,8), %rax
movq 0xe8(%rax), %rdi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x4858
movq %rbx, %rsi
callq 0x2120
testl %eax, %eax
je 0x4855
movq 0x8(%r12,%r15,8), %rax
incq %r15
movq 0xe8(%rax), %rdi
jmp 0x4833
movl %r15d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./functionsymboltable.h
// Function: get_Func_input_type
void get_Func_input_type(char* functionname){
    int i;
    fnode* it;
    char inputtype[1000] = {'\0'};
    int j=1;
    for(i=0;i<SIZE;i++){
        if(functable->table[i]->next != NULL && ((int)(functable->table[i]->next->name) < 100000000)){
            if(strcmp(functable->table[i]->next->name,functionname) == 0){
                strcpy(inputtype, functable->table[i]->next->input);
                printf("I am    %s    module and input parameters are..\n",functable->table[i]->next->name);
                    char *token;
                    token = strtok(functable->table[i]->next->input, ";");
                    while( token != NULL ) {
                       printf( "%d. %s\n", j++,token );
                       token = strtok(NULL, ";");
                    }
                // return functable->table[i]->next->input;
            }
        }
        // return "";
    }
    // return inputtype;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, -0x30(%rbp)
movl $0x1, %r13d
leaq 0x4b30(%rip), %r15      # 0x93b9
leaq 0x4e34(%rip), %r12      # 0x96c4
xorl %ebx, %ebx
movq 0x18f07(%rip), %rax     # 0x1d7a0
movq (%rax,%rbx,8), %rax
movq 0xe8(%rax), %r14
testq %r14, %r14
sete %al
cmpl $0x5f5e100, %r14d       # imm = 0x5F5E100
setge %cl
orb %al, %cl
jne 0x48c8
movq %r14, %rdi
movq -0x30(%rbp), %rsi
callq 0x2120
testl %eax, %eax
je 0x48d9
movl %r13d, %r14d
incq %rbx
movl %r14d, %r13d
cmpq $0x14, %rbx
jne 0x4892
jmp 0x4935
leaq 0x4db3(%rip), %rdi      # 0x9693
movq %r14, %rsi
xorl %eax, %eax
callq 0x20b0
movq 0x18eaf(%rip), %rax     # 0x1d7a0
movq (%rax,%rbx,8), %rax
movq 0xe8(%rax), %rdi
addq $0x1e, %rdi
movq %r15, %rsi
callq 0x2180
testq %rax, %rax
je 0x48c8
leal 0x1(%r13), %r14d
movq %r12, %rdi
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x20b0
xorl %edi, %edi
movq %r15, %rsi
callq 0x2180
movl %r14d, %r13d
testq %rax, %rax
jne 0x490d
jmp 0x48cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./functionsymboltable.h
// Function: get_Func_output_type
void get_Func_output_type(char* functionname){
    int i;
    fnode* it;
    int j=1;
    char outputtype[1000] = {'\0'};
    for(i=0;i<SIZE;i++){
        if(functable->table[i]->next != NULL && ((int)(functable->table[i]->next->name) < 100000000)){
            if(strcmp(functable->table[i]->next->name,functionname) == 0){
                strcpy(outputtype, functable->table[i]->next->output);
                printf("I am    %s    module and output parameters are..\n",functable->table[i]->next->name);
                    char *token;
                    token = strtok(functable->table[i]->next->output, ";");
                    while( token != NULL ) {
                       printf( "%d. %s\n", j++,token );
                       token = strtok(NULL, ";");
                    }
                    // return functable->table[i]->next->output;
            }
        }
    }

    // return "";
    // return outputtype;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, -0x30(%rbp)
movl $0x1, %r13d
leaq 0x4a56(%rip), %r15      # 0x93b9
leaq 0x4d5a(%rip), %r12      # 0x96c4
xorl %ebx, %ebx
movq 0x18e2d(%rip), %rax     # 0x1d7a0
movq (%rax,%rbx,8), %rax
movq 0xe8(%rax), %r14
testq %r14, %r14
sete %al
cmpl $0x5f5e100, %r14d       # imm = 0x5F5E100
setge %cl
orb %al, %cl
jne 0x49a2
movq %r14, %rdi
movq -0x30(%rbp), %rsi
callq 0x2120
testl %eax, %eax
je 0x49b3
movl %r13d, %r14d
incq %rbx
movl %r14d, %r13d
cmpq $0x14, %rbx
jne 0x496c
jmp 0x4a13
leaq 0x4d12(%rip), %rdi      # 0x96cc
movq %r14, %rsi
xorl %eax, %eax
callq 0x20b0
movq 0x18dd5(%rip), %rax     # 0x1d7a0
movq (%rax,%rbx,8), %rax
movq 0xe8(%rax), %rdi
movl $0x82, %eax
addq %rax, %rdi
movq %r15, %rsi
callq 0x2180
testq %rax, %rax
je 0x49a2
leal 0x1(%r13), %r14d
movq %r12, %rdi
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x20b0
xorl %edi, %edi
movq %r15, %rsi
callq 0x2180
movl %r14d, %r13d
testq %rax, %rax
jne 0x49eb
jmp 0x49a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./functionsymboltable.h
// Function: check_func_present
int check_func_present(char* functionname){
    int i;
    fnode* it;
    int j=1;
    for(i=0;i<SIZE;i++){
        if(functable->table[i]->next != NULL && ((int)(functable->table[i]->next->name) < 100000000)){
            if(strcmp(functable->table[i]->next->name,functionname) == 0){
               return 1;
            }
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18c39(%rip), %r14     # 0x1d7a0
xorl %r15d, %r15d
movq (%r14,%r15,8), %rax
movq 0xe8(%rax), %rdi
testq %rdi, %rdi
sete %al
cmpl $0x5f5e100, %edi        # imm = 0x5F5E100
setge %cl
orb %al, %cl
jne 0x4b94
movq %rbx, %rsi
callq 0x2120
testl %eax, %eax
je 0x4ba1
incq %r15
cmpq $0x14, %r15
jne 0x4b6a
xorl %eax, %eax
jmp 0x4ba6
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./functionsymboltable.h
// Function: directfunctionpointer
fnode* directfunctionpointer(char* functionname){
    int i;
    fnode* it;
    int j=1;
    for(i=0;i<SIZE;i++){
        if(functable->table[i]->next != NULL && ((int)(functable->table[i]->next->name) < 100000000)){
            if(strcmp(functable->table[i]->next->name,functionname) == 0){
               return functable->table[i]->next;
            }
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18bda(%rip), %r15     # 0x1d7a0
xorl %r12d, %r12d
movq (%r15,%r12,8), %rax
movq 0xe8(%rax), %r14
testq %r14, %r14
sete %al
cmpl $0x5f5e100, %r14d       # imm = 0x5F5E100
setge %cl
orb %al, %cl
jne 0x4bf7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2120
testl %eax, %eax
je 0x4c03
incq %r12
cmpq $0x14, %r12
jne 0x4bc9
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: display
void display(char* functionname){
    int i;
    int j = get_func_hash_value(functionname);
      
    for(i=0;i<SIZE;i++){
        pNode* it  = ht->functable[j]->table[i]->next;

        if(it !=NULL && strcmp(it->name,"")!= 0){

            if(strncmp(ht->functable[j]->table[i]->next->type,"ARRAY",5)==0)
                printf("%-3d %-20s %-22s %-20s %-5d %-6d\n",(sequencenumber++),ht->functable[j]->table[i]->next->name,"ARRAY",ht->functable[j]->table[i]->next->scope,ht->functable[j]->table[i]->next->width,offseter);
           
            else
                printf("%-3d %-20s %-22s %-20s %-5d %-6d\n",(sequencenumber++),ht->functable[j]->table[i]->next->name,ht->functable[j]->table[i]->next->type,ht->functable[j]->table[i]->next->scope,ht->functable[j]->table[i]->next->width,offseter);
            offseter += ht->functable[j]->table[i]->next->width;
            //printf("%d.\t%s\t\t%s\t\t%s\t\t%s\t\t%d\n",(sequencenumber++),ht->functable[j]->table[i]->next->name,ht->functable[j]->table[i]->next->type,ht->functable[j]->table[i]->next->ifnumvalue,ht->functable[j]->table[i]->next->scope,ht->functable[j]->table[i]->next->offset); 
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x47cd
movslq %eax, %r13
movq 0x1b04b(%rip), %rax     # 0x1fec8
leaq 0x4483(%rip), %rbx      # 0x9307
xorl %r14d, %r14d
movq (%rax,%r13,8), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x50(%rcx), %r15
testq %r15, %r15
je 0x4f08
cmpb $0x0, (%r15)
je 0x4f08
leaq 0x37(%r15), %r12
movl $0x5, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2050
movl 0x149f8(%rip), %esi     # 0x198b0
leal 0x1(%rsi), %ecx
leaq 0x28(%r15), %r8
testl %eax, %eax
movl %ecx, 0x149e9(%rip)     # 0x198b0
movl 0x4c(%r15), %r9d
movl 0x1afef(%rip), %eax     # 0x1fec0
cmoveq %rbx, %r12
movl %eax, (%rsp)
leaq 0x4826(%rip), %rdi      # 0x9705
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x20b0
movq 0x1afd5(%rip), %rax     # 0x1fec8
movq (%rax,%r13,8), %rcx
movq (%rcx,%r14,8), %rcx
movq 0x50(%rcx), %rcx
movl 0x4c(%rcx), %ecx
addl %ecx, 0x1afb8(%rip)     # 0x1fec0
incq %r14
cmpq $0x14, %r14
jne 0x4e87
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: displaySymbolTable
void displaySymbolTable(){
    int i;
    printf("\t\t\t\t Symbol Table\n");
    printf("%-3s %-20s %-22s %-20s %5s %6s\n","No.","Identifier name","Type", "Module Scope","Width","Offset");
      
    for(i=0; i<funcnum; i++)
        display(arr[i]);

    //assert(0);


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x591f(%rip), %rdi      # 0xa855
callq 0x2070
leaq 0x482c(%rip), %rax      # 0x976e
movq %rax, (%rsp)
leaq 0x47da(%rip), %rdi      # 0x9727
leaq 0x47f3(%rip), %rsi      # 0x9747
leaq 0x47f0(%rip), %rdx      # 0x974b
leaq 0x5733(%rip), %rcx      # 0xa695
leaq 0x47f2(%rip), %r8       # 0x975b
leaq 0x47f8(%rip), %r9       # 0x9768
xorl %eax, %eax
callq 0x20b0
cmpl $0x0, 0x1881a(%rip)     # 0x1d798
jle 0x4fa5
leaq 0x18829(%rip), %rbx     # 0x1d7b0
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x4e60
incq %r14
movslq 0x187fc(%rip), %rax     # 0x1d798
addq $0x64, %rbx
cmpq %rax, %r14
jl 0x4f8a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: checksymbolpresent
int checksymbolpresent(char* key,char* functionname){
    int j = get_func_hash_value(functionname);
    int h = hash(key);
    if(ht->functable[j]->table[h]==NULL){
        return 0;
    }
    while(ht->functable[j]->table[h]->next != NULL){
        if(strcmp(key,ht->functable[j]->table[h]->next->name) == 0){
            return 1;
        }
        h++;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x47cd
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20a0
xorl %ecx, %ecx
testq %rax, %rax
je 0x5007
xorl %edx, %edx
movsbl (%rbx,%rdx), %esi
addl %esi, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x4fd7
movslq %ecx, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %rcx
movq 0x1aeba(%rip), %rax     # 0x1fec8
movslq %r14d, %rdx
movq (%rax,%rdx,8), %rax
movq (%rax,%rcx,8), %rdx
xorl %r14d, %r14d
testq %rdx, %rdx
je 0x5056
movq 0x50(%rdx), %rsi
testq %rsi, %rsi
je 0x5056
leaq (%rax,%rcx,8), %r15
addq $0x8, %r15
movq %rbx, %rdi
callq 0x2120
testl %eax, %eax
je 0x5050
movq (%r15), %rax
movq 0x50(%rax), %rsi
addq $0x8, %r15
testq %rsi, %rsi
jne 0x5032
jmp 0x5056
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: getoffset
int getoffset(char* key,char* functionname){
    int j = get_func_hash_value(functionname);
    int h = hash(key);
    while(ht->functable[j]->table[h]->next != NULL){
        if(strcmp(key,ht->functable[j]->table[h]->next->name) == 0){
            return ht->functable[j]->table[h]->next->offset;
        }
        h++;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x47cd
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20a0
xorl %ecx, %ecx
testq %rax, %rax
je 0x50be
xorl %edx, %edx
movsbl (%rbx,%rdx), %esi
addl %esi, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x508e
movslq %ecx, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %rcx
movq 0x1ae03(%rip), %rax     # 0x1fec8
movslq %r14d, %rdx
movq (%rax,%rdx,8), %rax
movq (%rax,%rcx,8), %rdx
movq 0x50(%rdx), %r15
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x510d
leaq (%rax,%rcx,8), %r12
addq $0x8, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
testl %eax, %eax
je 0x5109
movq (%r12), %rax
movq 0x50(%rax), %r15
addq $0x8, %r12
testq %r15, %r15
jne 0x50e7
jmp 0x510d
movl 0x48(%r15), %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: gettype
char* gettype(char* key,char* functionname){
    int j = get_func_hash_value(functionname);
    int h = hash(key);
    while(ht->functable[j]->table[h]->next != NULL){
        if(strcmp(key,ht->functable[j]->table[h]->next->name) == 0){
            return ht->functable[j]->table[h]->next->type;
        }
        h++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x47cd
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20a0
xorl %ecx, %ecx
testq %rax, %rax
je 0x5173
xorl %edx, %edx
movsbl (%rbx,%rdx), %esi
addl %esi, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x5143
movslq %ecx, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %rcx
movq 0x1ad4e(%rip), %rax     # 0x1fec8
movslq %r14d, %rdx
movq (%rax,%rdx,8), %rax
movq (%rax,%rcx,8), %rdx
movq 0x50(%rdx), %r15
testq %r15, %r15
je 0x51bb
leaq (%rax,%rcx,8), %r12
addq $0x8, %r12
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
testl %eax, %eax
je 0x51c0
movq (%r12), %rax
movq 0x50(%rax), %r15
addq $0x8, %r12
testq %r15, %r15
jne 0x5199
jmp 0x51c7
xorl %r14d, %r14d
jmp 0x51c7
addq $0x37, %r15
movq %r15, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: automateoffset
void automateoffset(char* functionname){
    int i;
    int j = get_func_hash_value(functionname);
    int offset = 0;
    for(i=0;i<SIZE;i++){
        pNode* it  = ht->functable[j]->table[i]->next;
        if(it !=NULL && strcmp(it->name,"")!= 0){
            if(strcmp(ht->functable[j]->table[i]->next->type,"INTEGER") ==0){
            	offset += 4;
            }
            if(strcmp(ht->functable[j]->table[i]->next->type,"REAL") ==0){
            	offset += 8;
            }
            if(strcmp(ht->functable[j]->table[i]->next->type,"STRING") ==0){
            	offset += strlen(ht->functable[j]->table[i]->next->name);
            }
            if(strcmp(ht->functable[j]->table[i]->next->type,"ARRAY") ==0){
            	offset += 0;
            }
         	ht->functable[j]->table[i]->next->offset = offset;   
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x47cd
movq 0x1acdb(%rip), %rcx     # 0x1fec8
cltq
movq (%rcx,%rax,8), %rcx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %rcx, -0x30(%rbp)
movq (%rcx,%r14,8), %rax
movq 0x50(%rax), %r12
testq %r12, %r12
je 0x526f
cmpb $0x0, (%r12)
je 0x526f
leaq 0x37(%r12), %r13
movq %r13, %rdi
leaq 0x489c(%rip), %rsi      # 0x9abc
callq 0x2120
leal 0x4(%r15), %ebx
testl %eax, %eax
cmovnel %r15d, %ebx
movq %r13, %rdi
leaq 0x488d(%rip), %rsi      # 0x9ac6
callq 0x2120
leal 0x8(%rbx), %r15d
testl %eax, %eax
cmovnel %ebx, %r15d
movq %r13, %rdi
leaq 0x44ac(%rip), %rsi      # 0x96fe
callq 0x2120
testl %eax, %eax
jne 0x5266
movq %r12, %rdi
callq 0x20a0
addl %eax, %r15d
movl %r15d, 0x48(%r12)
movq -0x30(%rbp), %rcx
incq %r14
cmpq $0x14, %r14
jne 0x51fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./tokensymboltable.h
// Function: getdirectpointer
pNode* getdirectpointer(char* key,char* functionname){
	int j = get_func_hash_value(functionname);
    int h = hash(key);
    while(ht->functable[j]->table[h]->next != NULL){
        if(strcmp(key,ht->functable[j]->table[h]->next->name) == 0){
            return ht->functable[j]->table[h]->next;
        }
        h++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x47cd
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20a0
xorl %ecx, %ecx
testq %rax, %rax
je 0x52e0
xorl %edx, %edx
movsbl (%rbx,%rdx), %esi
addl %esi, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x52b0
movslq %ecx, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %rcx
movq 0x1abe1(%rip), %rax     # 0x1fec8
movslq %r14d, %rdx
movq (%rax,%rdx,8), %rax
movq (%rax,%rcx,8), %rdx
movq 0x50(%rdx), %r14
testq %r14, %r14
je 0x5322
leaq (%rax,%rcx,8), %r15
addq $0x8, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2120
testl %eax, %eax
je 0x5325
movq (%r15), %rax
movq 0x50(%rax), %r14
addq $0x8, %r15
testq %r14, %r14
jne 0x5303
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Gaurang18[P]Compiler-Project-BITS-Pilani/./symboltable.c
// Function: createsymboltable
void createsymboltable(){
        functable = (struct func_hash_table*)malloc(sizeof(struct func_hash_table*));
        int i;
        char *t = "";
        char *inp = "";
        char *output = "";
        for (i = 0;i < SIZE;i++) {
            functable->table[i] = create_func_node(t,inp,output);
        }
        ht = (struct hash_of_hash_tables*)malloc(sizeof(struct hash_of_hash_tables));
        int j;
        for (j = 0 ; j < HASHSIZE ; j++) {
                ht->functable[j] = create_table();
                for ( i = 0 ; i < SIZE ; ++i ) {
                    char *key = "";
                    char* functionname = "";
                    char* type = "";
                    char* ifnumvalue = "";
                    ht->functable[j]->table[i] = create_node(key,type,functionname,ifnumvalue);
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x8, %edi
callq 0x2150
movq %rax, 0x17e65(%rip)     # 0x1d7a0
xorl %r14d, %r14d
leaq 0x4309(%rip), %rbx      # 0x9c4e
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x465f
movq 0x17e46(%rip), %rcx     # 0x1d7a0
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq $0x14, %r14
jne 0x5945
movl $0xa0, %edi
callq 0x2150
movq %rax, 0x1a550(%rip)     # 0x1fec8
xorl %r14d, %r14d
leaq 0x42cc(%rip), %rbx      # 0x9c4e
movl $0xa0, %edi
callq 0x2150
movq 0x1a535(%rip), %rcx     # 0x1fec8
movq %rax, (%rcx,%r14,8)
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rbx, %rcx
callq 0x45ef
movq 0x1a516(%rip), %rcx     # 0x1fec8
movq (%rcx,%r14,8), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq $0x14, %r15
jne 0x599a
incq %r14
cmpq $0x14, %r14
jne 0x5982
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq