LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/util/stack.gen.c
// Function: int_stack_push
void TYPED(stack_push)(TYPED(stack)* ps, TYPE value)
{
    /*
    fprintf(stderr, "Pushing: ");
    TYPED(print)(value,stderr);
    fprintf(stderr, "\n");
    */
    if(ps->size > 100){
        fprintf(stderr,"stack size exceeded limit!\n");
        exit(1);
    }
    ps->top = TYPED(get_stack_node)(value, ps->top);
    (ps->size)++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x65, 0x8(%rdi)
jge 0x3c52
movq %rdi, %rbx
movq (%rdi), %rax
movl %esi, %edi
movq %rax, %rsi
callq 0x3b98
movq %rax, (%rbx)
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x1039f(%rip), %rax     # 0x13ff8
movq (%rax), %rcx
leaq 0x93cc(%rip), %rdi      # 0xd02f
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x31c0
pushq $0x1
popq %rdi
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/util/stack.gen.c
// Function: int_stack_print
void TYPED(stack_print)(TYPED(stack)* ps, FILE* fp)
{
    fprintf(fp, "[");
    TYPED(stack_node)* p = ps->top;
    if(p != NULL)
    {
        TYPED(print)(p->value, fp);
        p = p->next;
        while(p != NULL)
        {
            fprintf(fp, ", ");
            TYPED(print)(p->value, fp);
            p = p->next;
        }
    }
    fprintf(fp, "]\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x5b
popq %rdi
callq 0x3100
movq (%r14), %r13
testq %r13, %r13
je 0x3cd1
leaq 0xa16e(%rip), %r14      # 0xde0f
pushq $0x2
popq %r15
pushq $0x1
popq %r12
movl (%r13), %edi
movq %rbx, %rsi
callq 0x3d89
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x3cd1
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x31c0
jmp 0x3ca9
leaq 0x9373(%rip), %rdi      # 0xd04b
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31c0
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/util/stack.gen.c
// Function: int_stack_top
TYPE TYPED(stack_top)(TYPED(stack)* ps)
{
    if(ps->size == 0)
        fprintf(stderr, "top called on empty stack\n");
    else
        return ps->top->value;
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
je 0x3d00
movq (%rdi), %rax
movl (%rax), %eax
retq
pushq %rbp
movq %rsp, %rbp
movq 0x102ed(%rip), %rax     # 0x13ff8
movq (%rax), %rcx
leaq 0x9339(%rip), %rdi      # 0xd04e
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x31c0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/util/stack.gen.c
// Function: int_stack_pop
TYPE TYPED(stack_pop)(TYPED(stack)* ps)
{
    if(ps->size == 0)
        fprintf(stderr, "pop called on empty stack\n");
    else
    {
        TYPED(stack_node)* tmp = ps->top;
        ps->top = tmp->next;
        TYPE v = tmp->value;
        free(tmp);
        (ps->size)--;
        /*
        fprintf(stderr, "Popping: ");
        TYPED(print)(v, stderr);
        fprintf(stderr, "\n");
        */
        return v;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x0, 0x8(%rdi)
je 0x3d4f
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
movl (%rdi), %r14d
callq 0x3030
decl 0x8(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x102a2(%rip), %rax     # 0x13ff8
movq (%rax), %rcx
leaq 0x9309(%rip), %rdi      # 0xd069
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x31c0
jmp 0x3d47
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: precompute_cclass
void precompute_cclass(cclass_t* cclass)
// find character class of each character and store it in cclass
{
    int i;
    for(i=0; i < (1 << sizeof(char)); ++i)
        cclass[i] = C_REST;

    for(i='a'; i<='z'; ++i) cclass[i] = C_ALPHA;
    for(i='A'; i<='Z'; ++i) cclass[i] = C_ALPHA;
    cclass['e'] = C_E; cclass['E'] = C_E;
    cclass['_'] = C_UNSC;

    for(i='0'; i<='9'; ++i) cclass[i] = C_DIG;

    cclass[' '] = C_WS;  cclass['\t'] = C_WS; cclass['\r'] = C_WS;
    cclass['\0'] = C_EOF; cclass['\n'] = C_NL;

    cclass['('] = C_SCO; cclass[')'] = C_SCO;
    cclass['['] = C_SCO; cclass[']'] = C_SCO;
    cclass[','] = C_SCO; cclass[';'] = C_SCO;
    cclass['/'] = C_SCO;

    cclass['+'] = C_PM; cclass['-'] = C_PM;
    cclass['='] = C_EQ; cclass['!'] = C_EXCL;
    cclass['<'] = C_LT; cclass['>'] = C_GT;
    cclass['.'] = C_DOT;
    cclass['*'] = C_STAR;
    cclass[':'] = C_COLON;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x4(%rdi)
movabsq $0x61, %rax
cmpq $0x7b, %rax
je 0x3dc8
movl $0x1, (%rdi,%rax,4)
incq %rax
jmp 0x3db6
movabsq $0x41, %rax
cmpq $0x5b, %rax
je 0x3de4
movl $0x1, (%rdi,%rax,4)
incq %rax
jmp 0x3dd2
movl $0x2, %eax
movl %eax, 0x194(%rdi)
movl %eax, 0x114(%rdi)
movl $0x3, 0x17c(%rdi)
movabsq $0x30, %rax
cmpq $0x3a, %rax
je 0x3e1b
movl $0x4, (%rdi,%rax,4)
incq %rax
jmp 0x3e09
movabsq $0xa00000005, %rax      # imm = 0xA00000005
movq %rax, 0x80(%rdi)
movabsq $0x600000005, %rax      # imm = 0x600000005
movq %rax, 0x24(%rdi)
movl $0x5, 0x34(%rdi)
movl $0x10, (%rdi)
movabsq $0x700000007, %rax      # imm = 0x700000007
movq %rax, 0xa0(%rdi)
movl $0x7, %eax
movl %eax, 0x16c(%rdi)
movl %eax, 0x174(%rdi)
movl %eax, 0xb0(%rdi)
movl %eax, 0xbc(%rdi)
movabsq $0xb00000008, %rax      # imm = 0xB00000008
movq %rax, 0xb4(%rdi)
movabsq $0x90000000e, %rax      # imm = 0x90000000E
movq %rax, 0xf0(%rdi)
movl $0xf, 0xf8(%rdi)
movabsq $0x80000000c, %rax      # imm = 0x80000000C
movq %rax, 0xa8(%rdi)
movabsq $0x70000000d, %rax      # imm = 0x70000000D
movq %rax, 0xe8(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: precompute_final_states
void precompute_final_states(bool* is_final)
{
    static state_t final_states[] = {S_ID, S_I1, S_R1, S_R2, S_STAR, S_DOT2, S_COLON,
        S_LT, S_LT2, S_LT3, S_GT, S_GT2, S_GT3};

    int i, num_final_states = sizeof(final_states) / sizeof(state_t);
    for(i=0; i < NUM_STATES; ++i)
        is_final[i] = false;
    for(i=0; i < num_final_states; ++i)
        is_final[final_states[i]] = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpq $0x16, %rax
je 0x3eda
movb $0x0, (%rdi,%rax)
incq %rax
jmp 0x3ecb
xorl %eax, %eax
leaq 0x924d(%rip), %rcx      # 0xd130
cmpq $0x34, %rax
je 0x3ef6
movl (%rax,%rcx), %edx
movb $0x1, (%rdi,%rdx)
addq $0x4, %rax
jmp 0x3ee3
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: init_lexer
void init_lexer()
{
    precompute_cclass(pc_cclass);
    precompute_final_states(is_final);
    precompute_dfa();
    precompute_token_hmap();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x112ed(%rip), %rdi     # 0x15960
callq 0x3da4
leaq 0x10cd1(%rip), %rdi     # 0x15350
callq 0x3ec5
callq 0x3ef8
popq %rbp
jmp 0x4243
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: get_cclass
cclass_t get_cclass(char ch)
{
    if(ch == '\0')
        return C_EOF;
    else if(ch < 0 || ch > 127)
        return C_REST;
    else
        return pc_cclass[(int)ch];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testb %dil, %dil
je 0x46ba
js 0x46c1
movslq %edi, %rax
leaq 0x112ab(%rip), %rcx     # 0x15960
movl (%rcx,%rax,4), %eax
jmp 0x46c3
movl $0x10, %eax
jmp 0x46c3
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: get_character
char get_character(FILE* fp)
{
    char ch;
    //static char fmt_str[] = "input: \'%c\' (%d)\n";
    if(input_ptr == NULL || *input_ptr == '\0')
    {
        int read = fread(input_buffer, sizeof(char), INPUT_BUFSIZE-1, fp);
        input_buffer[read] = '\0';
        input_ptr = input_buffer;
        if(read == 0)
        {
            //fprintf(stderr, fmt_str, '\0', 0);
            return '\0';
        }
    }
    ch = *(input_ptr++);
    //fprintf(stderr, fmt_str, ch, (int)ch);
    return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rcx
movq 0x1148b(%rip), %rbx     # 0x15b60
testq %rbx, %rbx
je 0x46e0
movb (%rbx), %al
testb %al, %al
jne 0x470c
leaq 0x11489(%rip), %rbx     # 0x15b70
pushq $0x1
popq %rsi
pushq $0x63
popq %rdx
movq %rbx, %rdi
callq 0x3080
cltq
movb $0x0, (%rax,%rbx)
movq %rbx, 0x1145e(%rip)     # 0x15b60
testl %eax, %eax
je 0x4718
movb 0x11464(%rip), %al      # 0x15b70
incq %rbx
movq %rbx, 0x1144a(%rip)     # 0x15b60
jmp 0x471a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: put_character
void put_character(FILE * fp, char ch)
{
    if(output_ptr == OUTPUT_BUFSIZE-1)
    {
        fwrite(output_buffer, sizeof(char), OUTPUT_BUFSIZE, fp);
        output_ptr = -1;
        //output_buffer[OUTPUT_BUFFER] = '\0';
        memset(output_buffer, '\0', OUTPUT_BUFSIZE);
    }
    output_ptr ++;
    output_buffer[output_ptr] = ch;
    if(ch == '\0')
        fwrite(output_buffer, sizeof(char), output_ptr+1, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl 0xff6c(%rip), %eax      # 0x146a0
cmpl $0x63, %eax
jne 0x4785
leaq 0x114a0(%rip), %rdi     # 0x15be0
pushq $0x1
popq %rsi
pushq $0x64
popq %rdx
movq %rbx, %rcx
callq 0x31c0
xorps %xmm0, %xmm0
movaps %xmm0, 0x11488(%rip)    # 0x15be0
movaps %xmm0, 0x11491(%rip)    # 0x15bf0
movaps %xmm0, 0x1149a(%rip)    # 0x15c00
movaps %xmm0, 0x114a3(%rip)    # 0x15c10
movaps %xmm0, 0x114ac(%rip)    # 0x15c20
movaps %xmm0, 0x114b5(%rip)    # 0x15c30
andl $0x0, 0x114be(%rip)     # 0x15c40
pushq $-0x1
popq %rax
movslq %eax, %rcx
leaq 0x1(%rcx), %rdx
movl %edx, 0xff0e(%rip)      # 0x146a0
leaq 0x11447(%rip), %rdx     # 0x15be0
movb %r14b, 0x1(%rcx,%rdx)
testb %r14b, %r14b
je 0x47a8
popq %rbx
popq %r14
popq %rbp
retq
addl $0x2, %eax
movslq %eax, %rdx
leaq 0x1142b(%rip), %rdi     # 0x15be0
pushq $0x1
popq %rsi
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x31c0
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: predict_token_from_char
tok_t predict_token_from_char(char ch)
{
    switch(ch)
    {
    case '+': return T_PLUS;
    case '-': return T_MINUS;
    case '(': return T_BO;
    case ')': return T_BC;
    case '[': return T_SQBO;
    case ']': return T_SQBC;
    case ',': return T_COMMA;
    case ';': return T_SEMICOL;
    case '/': return T_DIV;

    case '=': return T_EQ;
    case '!': return T_NE;
    case ':': return T_ASSIGNOP;
    case '<': return T_LE;
    case '>': return T_GE;
    default: return T_ERR;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal -0x21(%rdi), %eax
cmpl $0x1d, %eax
ja 0x47e7
leaq 0x88b9(%rip), %rcx      # 0xd090
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2c, %eax
jmp 0x484e
cmpl $0x5b, %edi
je 0x4849
cmpl $0x5d, %edi
jne 0x47f8
movl $0x39, %eax
jmp 0x484e
xorl %eax, %eax
jmp 0x484e
movl $0x28, %eax
jmp 0x484e
movl $0x26, %eax
jmp 0x484e
movl $0x24, %eax
jmp 0x484e
movl $0x35, %eax
jmp 0x484e
movl $0x37, %eax
jmp 0x484e
movl $0x23, %eax
jmp 0x484e
movl $0x2b, %eax
jmp 0x484e
movl $0x36, %eax
jmp 0x484e
movl $0x33, %eax
jmp 0x484e
movl $0x34, %eax
jmp 0x484e
movl $0x2a, %eax
jmp 0x484e
movl $0x38, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: init_dfa
void init_dfa(Dfa* pdfa)
{
    pdfa->s = S_START;
    pdfa->line = 1;
    pdfa->col = 1;
    pdfa->lexeme = buff1;
    pdfa->trunc = false;
    buff1[0] = '\0';
    pdfa->size = 0;
    pdfa->error_count = 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, (%rdi)
movl $0x1, 0x8(%rdi)
leaq 0x1110e(%rip), %rax     # 0x15c50
movq %rax, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x1c(%rdi)
movb %al, 0x110ff(%rip)      # 0x15c50
andl $0x0, 0x18(%rdi)
andl $0x0, 0x20(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: init_token
void init_token(Token* ptok)
{
    ptok->line = 0;
    ptok->col = 0;
    ptok->lexeme = buff2;
    buff2[0] = '\0';
    ptok->size = 0;
    ptok->dyn_lexeme = false;
    ptok->tid = T_ERR;
    ptok->f = 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $0x0, (%rdi)
leaq 0x11106(%rip), %rax     # 0x15c70
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x110fa(%rip)      # 0x15c70
andq $0x0, 0x14(%rdi)
movb %al, 0x10(%rdi)
andl $0x0, 0x1c(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: post_process
void post_process(Dfa* pdfa, Token* ptok)
{
    if((ptok->tid) == T_ID)
    {
        ptok->tid = token_check(ptok->lexeme);
        if((ptok->tid) == T_ID && (ptok->size) > 8)
            print_lex_error(LERR_LONG_ID, pdfa, ptok);
        if((ptok->tid) == T_ID && ptok->lexeme[0] == '_')
            print_lex_error(LERR_ID_UNSC, pdfa, ptok);
        ptok->f = 0.0;
    }
    else if(ptok->tid == T_NUM)
        ptok->i = atoi(ptok->lexeme);
    else if(ptok->tid == T_RNUM)
        ptok->f = atof(ptok->lexeme);
    else
        ptok->f = 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl 0x18(%rsi), %eax
cmpl $0x4, %eax
je 0x4c1b
cmpl $0x3, %eax
je 0x4c0d
cmpl $0x2, %eax
jne 0x4c07
movq %rdi, %r14
movq 0x8(%rbx), %rdi
callq 0x4b84
movl %eax, 0x18(%rbx)
cmpl $0x2, %eax
jne 0x4c07
cmpl $0x9, 0x14(%rbx)
jl 0x4bf0
pushq $0x6
popq %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x486b
cmpl $0x2, 0x18(%rbx)
jne 0x4c07
movq 0x8(%rbx), %rax
cmpb $0x5f, (%rax)
jne 0x4c07
pushq $0x4
popq %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x486b
andl $0x0, 0x1c(%rbx)
jmp 0x4c2d
movq 0x8(%rbx), %rdi
callq 0x3180
movl %eax, 0x1c(%rbx)
jmp 0x4c2d
movq 0x8(%rbx), %rdi
callq 0x3090
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: tick_dfa
bool tick_dfa(char ch, Dfa* pdfa, Token* ptok, bool debug)
// return true if token is ready
{
    cclass_t cclass = get_cclass(ch);
    state_t s2 = state_table[pdfa->s][cclass];
    action_t a = action_table[pdfa->s][cclass];
    execute_action(a, ch, pdfa, ptok);
    if(debug)
        fprintf(stderr, "\t%s %c %s %s\n", STATE_STRS[pdfa->s], ch, STATE_STRS[s2], ACTION_STRS[a]);
    pdfa->s = s2;
    (pdfa->col)++;
    return (a == A_TOKS || a == A_TOKF || a == A_TOKN || a == A_ERR);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rcx
movq %rsi, %rbx
testb %dil, %dil
je 0x4c5f
js 0x4c64
movslq %edi, %rax
leaq 0x10d06(%rip), %rdx     # 0x15960
movl (%rdx,%rax,4), %eax
jmp 0x4c66
pushq $0x10
popq %rax
jmp 0x4c66
xorl %eax, %eax
movl (%rbx), %edx
imulq $0x44, %rdx, %rdx
leaq 0x100fd(%rip), %rsi     # 0x14d70
addq %rdx, %rsi
movl (%rsi,%rax,4), %r13d
leaq 0x106ef(%rip), %rsi     # 0x15370
addq %rdx, %rsi
movl (%rsi,%rax,4), %r15d
movsbl %dil, %r12d
movl %r15d, %edi
movl %r12d, %esi
movq %rbx, %rdx
callq 0x48d4
testb %r14b, %r14b
jne 0x4cbf
movl %r13d, (%rbx)
incl 0x8(%rbx)
andl $-0x4, %r15d
cmpl $0x4, %r15d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xf332(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
movl (%rbx), %eax
leaq 0xf91e(%rip), %rcx      # 0x145f0
movq (%rcx,%rax,8), %rdx
movq (%rcx,%r13,8), %r8
leaq 0xf8cf(%rip), %rax      # 0x145b0
movq (%rax,%r15,8), %r9
leaq 0x8982(%rip), %rsi      # 0xd66e
movl %r12d, %ecx
xorl %eax, %eax
callq 0x3130
jmp 0x4c9f
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: get_token
void get_token(FILE* fp, Dfa* pdfa, Token* ptok, bool debug)
{
    while(true)
    {
        char ch = get_character(fp);
        if(ch == '\0')
        {
            ptok->line = pdfa->line;
            ptok->col = pdfa->col;
            ptok->lexeme[0] = '\0';
            ptok->size = 0;
            ptok->tid = T_EOF;
            break;
        }
        else if(tick_dfa(ch, pdfa, ptok, debug))
        {
            post_process(pdfa, ptok);
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movzbl %cl, %r12d
movq %r15, %rdi
callq 0x46c5
testb %al, %al
je 0x4d44
movsbl %al, %edi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x4c32
testb %al, %al
je 0x4d10
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4ba6
movl 0x4(%r14), %eax
movl %eax, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rbx)
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x14(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: print_token
void print_token(const Token* ptok, FILE* fp)
{
    fprintf(fp, "%2d %2d %s %s", ptok->line, ptok->col, TOK_STRS[ptok->tid], ptok->lexeme);
    if(ptok->tid == T_NUM)
        fprintf(fp, " %d\n", ptok->i);
    else if(ptok->tid == T_RNUM)
        fprintf(fp, " %lf\n", ptok->f);
    else
        fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edx
movl 0x4(%rdi), %ecx
movslq 0x18(%rdi), %rax
leaq 0xf3f4(%rip), %rsi      # 0x14180
movq (%rsi,%rax,8), %r8
movq 0x8(%rdi), %r9
leaq 0x88e1(%rip), %rsi      # 0xd67c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
movl 0x18(%r14), %eax
cmpl $0x4, %eax
je 0x4dcc
cmpl $0x3, %eax
jne 0x4de7
movl 0x1c(%r14), %edx
leaq 0x891c(%rip), %rsi      # 0xd6da
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3130
cvtss2sd 0x1c(%r14), %xmm0
leaq 0x92e6(%rip), %rsi      # 0xe0bf
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
jmp 0x3130
pushq $0xa
popq %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/lexer.c
// Function: print_source_without_comments
void print_source_without_comments(FILE * ifp, FILE * ofp){
    int state = 0;
    char ch = get_character(ifp);
    int bch;
    int transition_mat[][4] = {{0,1},{0,2},{2,3},{2,0}};
    int action_mat[][4] = {{1,0},{2,0},{0,0},{0,0}};
    while(ch != '\0'){
        if(ch == '*') bch = 1;
        else bch = 0;
        if(action_mat[state][bch] == 0);
        else if(action_mat[state][bch] == 1) put_character(ofp, ch);
        else if(action_mat[state][bch] == 2){
            put_character(ofp, '*');
            put_character(ofp, ch);
        }
        state = transition_mat[state][bch];
        ch = get_character(ifp);
    }
    put_character(ofp,ch);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x46c5
movl %eax, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x40(%rbp)
pushq $0x1
popq %rax
movl %eax, -0x6c(%rbp)
pushq $0x2
popq %rcx
movl %ecx, -0x5c(%rbp)
movabsq $0x300000002, %rdx      # imm = 0x300000002
movq %rdx, -0x50(%rbp)
movl %ecx, -0x40(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movl %eax, -0xb0(%rbp)
movl %ecx, -0xa0(%rbp)
xorl %r12d, %r12d
pushq $0x1
popq %r13
cmpb $0x2a, %r15b
je 0x529c
movzbl %r15b, %eax
testl %eax, %eax
je 0x52eb
xorl %r13d, %r13d
movslq %r12d, %r12
shlq $0x4, %r12
leaq (%r12,%rbp), %rax
addq $-0xb0, %rax
movl (%rax,%r13,4), %eax
cmpl $0x1, %eax
je 0x52c6
cmpl $0x2, %eax
jne 0x52d2
movq %rbx, %rdi
pushq $0x2a
popq %rsi
callq 0x4721
movsbl %r15b, %esi
movq %rbx, %rdi
callq 0x4721
leaq (%r12,%rbp), %rax
addq $-0x70, %rax
movl (%rax,%r13,4), %r12d
movq %r14, %rdi
callq 0x46c5
movl %eax, %r15d
jmp 0x5287
movq %rbx, %rdi
xorl %esi, %esi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4721
nop
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: get_nt_id
int get_nt_id(gsymb_t s){
    if(s < 0)
        fprintf(stderr, "get_nt_id: got -ve input %d.\n", s);
    else if(s < (int)NUM_TOKENS)
        fprintf(stderr, "get_nt_id: got terminal input %d.\n", s);
    else if(s >= (int)NUM_GS)
        fprintf(stderr, "get_nt_id: got too big input %d.\n", s);
    else
        return s - NUM_TOKENS;
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
cmpl $0x39, %edi
jbe 0x5338
cmpl $0x70, %eax
jae 0x534b
addl $-0x3a, %eax
popq %rbp
retq
movq 0xecb9(%rip), %rcx      # 0x13ff8
movq (%rcx), %rdi
leaq 0x83e7(%rip), %rsi      # 0xd730
jmp 0x535c
movq 0xeca6(%rip), %rcx      # 0x13ff8
movq (%rcx), %rdi
leaq 0x83f7(%rip), %rsi      # 0xd753
movl %eax, %edx
xorl %eax, %eax
callq 0x3130
pushq $-0x1
popq %rax
jmp 0x5336
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: init_symbol
void init_symbol(Symbol * symb){
    symb->line = 0;
    symb->col = 0;
    symb->lexeme = NULL;
    symb->sid = T_ERR;
    symb->f = 0.0;
    symb->rule_num = -1;
    symb->tree = symb->next = symb->driver = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
orl $-0x1, 0x18(%rdi)
movups %xmm0, 0x20(%rdi)
andq $0x0, 0x30(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: copy_symbol
void copy_symbol(Symbol* symb, const Token* tok)
{
    symb->line = tok->line;
    symb->col = tok->col;
    symb->sid = tok->tid;
    symb->f = tok->f;
    symb->tree = symb->next = symb->driver = NULL;
    int sid = symb->sid;
    if(sid == T_ERR || sid == T_EOF) {
        symb->lexeme = NULL;
        fprintf(stderr, "copy_symbol: Bad token type assigned to a symbol\n");
    }
    else if(sid == T_ID) {
        pch_int_hmap_node* pnode = pch_int_hmap_insert(&intern_table, tok->lexeme, intern_counter);
        if(pnode->key == tok->lexeme) {
            // this means the lexeme wasn't already present in intern_table
            symb->lexeme = malloc(sizeof(char) * (tok->size + 1));
            strcpy(symb->lexeme, tok->lexeme);
            pnode->key = symb->lexeme;
            intern_counter++;
            //fprintf(stderr, "new insert %p(\"%s\"): %d\n", pnode->key, pnode->key, pnode->value);
        }
        else {
            symb->lexeme = (char*)pnode->key;
            //fprintf(stderr, "already present %p(\"%s\"): %d\n", pnode->key, pnode->key, pnode->value);
        }
    }
    else if(sid == T_NUM || sid == T_RNUM) {
        symb->lexeme = NULL;
    }
    else {
        symb->lexeme = TOK_STRS2[sid];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, (%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rdi)
movslq 0x18(%rsi), %rax
movl %eax, 0x10(%rdi)
movss 0x1c(%rsi), %xmm0
andq $0x0, 0x30(%rdi)
movss %xmm0, 0x14(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
cmpq $0x1, %rax
jbe 0x546d
cmpl $0x2, %eax
jne 0x5446
movq %rsi, %r14
movq 0x8(%rsi), %rsi
movl 0x10894(%rip), %edx     # 0x15c94
leaq 0x10891(%rip), %rdi     # 0x15c98
callq 0x3490
movq %rax, %r15
movq 0x8(%rax), %rax
movq 0x8(%r14), %r12
cmpq %r12, %rax
jne 0x5460
movslq 0x14(%r14), %rdi
incq %rdi
callq 0x3140
movq %rax, %r14
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movq %r12, %rsi
callq 0x3060
movq %r14, 0x8(%r15)
incl 0x10850(%rip)           # 0x15c94
jmp 0x5464
leal -0x3(%rax), %ecx
cmpl $0x1, %ecx
ja 0x5455
andq $0x0, 0x8(%rbx)
jmp 0x5464
leaq 0xeef4(%rip), %rcx      # 0x14350
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, 0x8(%rbx)
movq 0xeb7f(%rip), %rax      # 0x13ff8
movq (%rax), %rcx
leaq 0x82f2(%rip), %rdi      # 0xd775
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31c0
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: make_symbol
Symbol * make_symbol(gsymb_t sid){
    Symbol * ret = (Symbol*)malloc(sizeof(Symbol));
    init_symbol(ret);
    ret->sid = sid;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x40
popq %rdi
callq 0x3140
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rax)
movups %xmm0, (%rax)
orl $-0x1, 0x18(%rax)
andq $0x0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movl %ebx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: get_successor
parse_tree_node * get_successor(const parse_tree_node * curr){
    while(curr != NULL && curr->next_sibling == NULL)
        curr = curr->parent;
    if(curr != NULL)
        return curr->next_sibling;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x54e0
movq 0x20(%rdi), %rax
testq %rax, %rax
jne 0x54e2
movq 0x8(%rdi), %rdi
jmp 0x54cc
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: get_gsymb_id
gsymb_t get_gsymb_id(const char* str)
{
    pch_int_hmap_node* hmap_n = pch_int_hmap_query(&gsymb_ht, str);
    if(hmap_n == NULL)
    {
        fprintf(stderr, "Unrecognized grammar symbol %s\n", str);
        return GS_LAST;
    }
    return hmap_n->value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xffa6(%rip), %rdi      # 0x15cb0
movq %rbx, %rsi
callq 0x33ef
testq %rax, %rax
je 0x5d21
movl 0x10(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0xe2d0(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
leaq 0x7c47(%rip), %rsi      # 0xd979
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3130
pushq $0x70
popq %rax
jmp 0x5d1a
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: getRuleNode
RuleNode* getRuleNode(gsymb_t sid)
{
    RuleNode* n = malloc(sizeof(RuleNode));
    n->value = sid;
    n->next = NULL;
    n->first = unset_bitset;
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x18
popq %rdi
callq 0x3140
movl %ebx, 0x8(%rax)
andq $0x0, (%rax)
orq $-0x1, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: init_parser
gsymb_t init_parser()
{
    init_lexer();

    parser_error_count = 0;

    init_gsymb_ht();
    pch_int_hmap_init(&intern_table, 50, true);
    char str[100];
    FILE* gfp = fopen("data/grammar.txt", "r");
    fscanf(gfp, "%s", str);
    gsymb_t start_symb = get_gsymb_id(str);
    //fprintf(stderr, "start_symbol = %s\n", GS_STRS[start_symb]);
    num_rules = read_grammar(gfp);
    fclose(gfp);

    int i;
    for(i=0; i < NUM_NONTERMS; ++i)
    {
        first[i] = unset_bitset;
        follow[i] = empty_bitset;
    }

    update_follow(start_symb);

    for(int i=0; i<NUM_NONTERMS; i++)
        for(int j=0; j<NUM_TOKENS; j++)
            pt[i][j] = -1;

    bool is_ll1 = make_parse_table();
    //char pt_fname[] = "data/parse_table.txt";
    //read_parse_table(pt_fname);

    if(!is_ll1)
        fprintf(stderr, "The grammar is not LL1\n");

    return start_symb;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x4668
andl $0x0, 0x1095a(%rip)     # 0x168d0
callq 0x54f9
leaq 0xfd16(%rip), %rdi      # 0x15c98
pushq $0x32
popq %rsi
pushq $0x1
popq %rdx
callq 0x334d
leaq 0x7a35(%rip), %rdi      # 0xd9c9
leaq 0x78b4(%rip), %rsi      # 0xd84f
callq 0x3160
movq %rax, %r14
leaq 0x8cae(%rip), %rsi      # 0xec58
leaq -0x80(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3070
movq %rbx, %rdi
callq 0x5cfa
movl %eax, %ebx
movq %r14, %rdi
callq 0x5d64
movl %eax, 0x10901(%rip)     # 0x168d4
movq %r14, %rdi
callq 0x30a0
leaq 0x108fe(%rip), %rax     # 0x168e0
leaq 0x10aa7(%rip), %rcx     # 0x16a90
cmpq $0x1b0, %r15            # imm = 0x1B0
je 0x6002
orq $-0x1, (%r15,%rax)
andq $0x0, (%r15,%rcx)
addq $0x8, %r15
jmp 0x5fe9
movl %ebx, %edi
callq 0x6068
leaq 0x10c30(%rip), %rax     # 0x16c40
xorl %ecx, %ecx
cmpq $0x36, %rcx
je 0x6034
xorl %edx, %edx
cmpq $0x3a, %rdx
je 0x6029
orl $-0x1, (%rax,%rdx,4)
incq %rdx
jmp 0x601a
incq %rcx
addq $0xe8, %rax
jmp 0x6012
callq 0x64cd
testb %al, %al
je 0x604a
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xdfa7(%rip), %rax      # 0x13ff8
movq (%rax), %rcx
leaq 0x797f(%rip), %rdi      # 0xd9da
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
callq 0x31c0
jmp 0x603d
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: update_follow
void update_follow(gsymb_t start_symb)
{
    follow[get_nt_id(start_symb)] = bitset_singleton(T_EOF);
    follow_changed = true;
    while(follow_changed)
    {
        follow_changed = false;
        int i;
        for(i=0; i<num_rules; ++i)
            update_follow_helper(i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x5323
cltq
leaq 0x10a14(%rip), %rcx     # 0x16a90
movq $0x2, (%rcx,%rax,8)
movb $0x1, 0xfc05(%rip)      # 0x15c90
movb $0x1, %al
testb $0x1, %al
je 0x60b5
movb $0x0, 0xfbf8(%rip)      # 0x15c90
xorl %ebx, %ebx
cmpl 0x10834(%rip), %ebx     # 0x168d4
jge 0x60ad
movl %ebx, %edi
callq 0x6257
incl %ebx
jmp 0x609a
movb 0xfbdd(%rip), %al       # 0x15c90
jmp 0x608d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: destroy_rules
void destroy_rules()
{
    int i;
    for(i=0; i < NUM_RULES; ++i)
    {
        rules[i].tail = NULL;
        RuleNode *p = rules[i].head, *todel = NULL;
        rules[i].head = NULL;
        while(p != NULL)
        {
            todel = p;
            p = p->next;
            todel->next = NULL;
            free(todel);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0xfea1(%rip), %r14      # 0x15f70
cmpq $0x64, %rbx
je 0x60fe
imulq $0x18, %rbx, %rax
movq 0x8(%rax,%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax,%r14)
testq %rdi, %rdi
je 0x60f9
movq (%rdi), %r15
callq 0x3030
movq %r15, %rdi
jmp 0x60e7
incq %rbx
jmp 0x60cf
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: destroy_parser
void destroy_parser(bool destroy_intern_table)
{
    destroy_lexer();
    pch_int_hmap_clear(&gsymb_ht);
    destroy_rules();
    if(destroy_intern_table) {
        pch_int_hmap_clear(&intern_table);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %eax, %eax
callq 0x468f
leaq 0xfb91(%rip), %rdi      # 0x15cb0
callq 0x338a
callq 0x60bc
testl %ebx, %ebx
je 0x613f
leaq 0xfb64(%rip), %rdi      # 0x15c98
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x338a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: get_first_symb
bitset_t get_first_symb(gsymb_t sid)
// get first set of a symbol
{
    if(sid < 0 || sid >= NUM_GS)
    {
        fprintf(stderr, "get_first_nt: Invalid sid %d\n", sid);
        return empty_bitset;
    }
    else if(sid < (int)NUM_TOKENS)
        return bitset_singleton(sid);
    else
    {
        int ntid = get_nt_id(sid);
        if(first[ntid] == unset_bitset)
        {
            int i;
            first[ntid] = empty_bitset;
            for(i=rule_begin[ntid]; i < rule_end[ntid]; ++i)
                first[ntid] |= get_first_str(rules[i].head);
        }
        return first[ntid];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ecx
cmpl $0x70, %edi
jae 0x61eb
cmpl $0x39, %ecx
ja 0x616c
pushq $0x1
popq %rbx
shlq %cl, %rbx
jmp 0x6187
movl %ecx, %edi
callq 0x5323
movslq %eax, %r14
leaq 0x10763(%rip), %r15     # 0x168e0
movq (%r15,%r14,8), %rbx
cmpq $-0x1, %rbx
je 0x6199
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, (%r15,%r14,8)
leaq 0xfb2b(%rip), %rax      # 0x15cd0
movslq (%rax,%r14,4), %r12
imulq $0x18, %r12, %rax
leaq 0xfdbc(%rip), %rcx      # 0x15f70
leaq (%rax,%rcx), %r13
addq $0x8, %r13
xorl %ebx, %ebx
leaq 0xfbeb(%rip), %rax      # 0x15db0
movslq (%rax,%r14,4), %rax
cmpq %rax, %r12
jge 0x6187
movq (%r13), %rdi
callq 0x620c
movq %rax, %rbx
orq (%r15,%r14,8), %rbx
movq %rbx, (%r15,%r14,8)
incq %r12
addq $0x18, %r13
jmp 0x61be
movq 0xde06(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
leaq 0x77f6(%rip), %rsi      # 0xd9f2
xorl %ebx, %ebx
movl %ecx, %edx
xorl %eax, %eax
callq 0x3130
jmp 0x6187
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: get_first_str
bitset_t get_first_str(RuleNode* node)
// get first set of a linked list string starting at node
{
    if(node == NULL)
        return bitset_singleton(T_EOF);

    if(node->first == unset_bitset)
    {
        int sid = node->value;
        bitset_t s = get_first_symb(sid);
        if(bitset_has(s, T_EOF))
            s = bitset_remove(s, T_EOF) | get_first_str(node->next);
        node->first = s;
    }
    return node->first;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x624b
movq %rdi, %rbx
movq 0x10(%rdi), %r14
cmpq $-0x1, %r14
jne 0x624f
movl 0x8(%rbx), %edi
callq 0x6146
movq %rax, %r14
testb $0x2, %r14b
je 0x6245
andq $-0x3, %r14
movq (%rbx), %rdi
callq 0x620c
orq %rax, %r14
movq %r14, 0x10(%rbx)
jmp 0x624f
pushq $0x2
popq %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: update_follow_helper
void update_follow_helper(int rule_no)
// update follow using rule number i
{
    RuleNode* n = rules[rule_no].head;
    for(; n != NULL; n = n->next)
    {
        gsymb_t sid = n->value;
        if(sid >= (int)NUM_TOKENS)
        {
            int ntid = get_nt_id(sid);
            bitset_t s = get_first_str(n->next);
            bitset_t new_follow = bitset_remove(s, T_EOF) | follow[ntid];
            if(follow[ntid] != new_follow)
            {
                follow_changed = true;
                follow[ntid] = new_follow;
            }
            if(bitset_has(s, T_EOF))
            {
                bitset_t s3 = follow[get_nt_id(rules[rule_no].lhs)];
                new_follow = s3 | follow[ntid];
                if(new_follow != follow[ntid])
                {
                    follow_changed = true;
                    follow[ntid] = new_follow;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %edi, %rax
imulq $0x18, %rax, %rax
leaq 0xfd00(%rip), %rcx      # 0x15f70
leaq (%rcx,%rax), %r14
leaq (%rax,%rcx), %r15
addq $0x8, %r15
leaq 0x1080d(%rip), %r12     # 0x16a90
movq (%r15), %r15
testq %r15, %r15
je 0x62ef
movl 0x8(%r15), %edi
cmpl $0x3a, %edi
jb 0x6283
callq 0x5323
movl %eax, %ebx
movq (%r15), %rdi
callq 0x620c
movq %rax, %rcx
andq $-0x3, %rcx
movslq %ebx, %rbx
movq (%r12,%rbx,8), %rdx
orq %rdx, %rcx
cmpq %rcx, %rdx
je 0x62c4
movb $0x1, 0xf9d0(%rip)      # 0x15c90
movq %rcx, (%r12,%rbx,8)
testb $0x2, %al
je 0x6283
movl (%r14), %edi
callq 0x5323
cltq
movq (%r12,%rbx,8), %rcx
movq (%r12,%rax,8), %rax
orq %rcx, %rax
cmpq %rcx, %rax
je 0x6283
movb $0x1, 0xf9a7(%rip)      # 0x15c90
movq %rax, (%r12,%rbx,8)
jmp 0x6283
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: print_bitset
void print_bitset(bitset_t s, FILE* fp)
{
    if(s == unset_bitset)
        fprintf(fp, "{unset}\n");
    else
    {
        int i;
        fprintf(fp, "{");
        //fprintf(fp, "%llu {", s);
        bool first = true;
        for(i=0; i < NUM_TOKENS; ++i)
            if(bitset_has(s, i))
            {
                if(!first)
                    fprintf(fp, ", ");
                else
                    first = false;
                //fprintf(fp, "%s(%d)", GS_STRS[i], i);
                fprintf(fp, "%s", GS_STRS[i]);
            }
        fprintf(fp, "}\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $-0x1, %rdi
je 0x6370
movq %rdi, %r14
pushq $0x7b
popq %rdi
movq %rbx, %rsi
callq 0x3100
movb $0x1, %al
xorl %r15d, %r15d
leaq 0xe427(%rip), %r12      # 0x14750
pushq $0x1
popq %r13
cmpq $0x3a, %r15
je 0x6365
btq %r15, %r14
jae 0x6360
testb $0x1, %al
jne 0x6352
leaq 0x7acb(%rip), %rdi      # 0xde0f
pushq $0x2
popq %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x31c0
movq (%r12,%r15,8), %rdi
movq %rbx, %rsi
callq 0x30e0
xorl %eax, %eax
incq %r15
jmp 0x632d
leaq 0x76aa(%rip), %rdi      # 0xda16
pushq $0x2
jmp 0x6379
leaq 0x7699(%rip), %rdi      # 0xda10
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31c0
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: print_firsts
void print_firsts(FILE* fp)
{
    int i;
    for(i=0; i < NUM_NONTERMS; ++i)
    {
        fprintf(fp, "%s: ", GS_STRS[NUM_TOKENS + i]);
        print_bitset(get_first_symb(NUM_TOKENS + i), fp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xe3a8(%rip), %r15      # 0x14750
leaq 0x766a(%rip), %r14      # 0xda19
xorl %r12d, %r12d
cmpq $0x36, %r12
je 0x63e7
movq 0x1d0(%r15,%r12,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x3130
leal 0x3a(%r12), %edi
callq 0x6146
movq %rax, %rdi
movq %rbx, %rsi
callq 0x62f8
incq %r12
jmp 0x63b2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: print_follows
void print_follows(FILE* fp)
{
    int i;
    for(i=0; i < NUM_NONTERMS; ++i)
    {
        fprintf(fp, "%s: ", GS_STRS[NUM_TOKENS + i]);
        print_bitset(follow[i], fp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xe348(%rip), %r15      # 0x14750
leaq 0x760a(%rip), %r14      # 0xda19
leaq 0x1067a(%rip), %r12     # 0x16a90
xorl %r13d, %r13d
cmpq $0x1b0, %r13            # imm = 0x1B0
je 0x644a
movq 0x1d0(%r15,%r13), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x3130
movq (%r13,%r12), %rdi
movq %rbx, %rsi
callq 0x62f8
addq $0x8, %r13
jmp 0x6419
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: print_parse_table
void print_parse_table()
{
    for(int i=0; i<NUM_NONTERMS; i++)
        for(int j=0; j<NUM_TOKENS; j++)
            if(pt[i][j] != -1)
                printf("pt[%s][%s] = %d\n", GS_STRS[i+NUM_TOKENS], GS_STRS[j], pt[i][j]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x107d2(%rip), %r14     # 0x16c40
leaq 0xe2db(%rip), %r15      # 0x14750
leaq 0x75a2(%rip), %rbx      # 0xda1e
xorl %r12d, %r12d
cmpq $0x36, %r12
je 0x64be
xorl %r13d, %r13d
cmpq $0x3a, %r13
je 0x64b2
movl (%r14,%r13,4), %ecx
cmpl $-0x1, %ecx
je 0x64ad
movq 0x1d0(%r15,%r12,8), %rsi
movq (%r15,%r13,8), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30b0
incq %r13
jmp 0x6488
incq %r12
addq $0xe8, %r14
jmp 0x647f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: make_parse_table
bool make_parse_table()
{
    int i;
    tok_t j;
    bool is_ll1 = true;
    for(i=0; i < num_rules; ++i)
    {
        int ntid = get_nt_id(rules[i].lhs);
        bitset_t fa = get_first_str(rules[i].head);
        bitset_t terms;
        if(bitset_has(fa, T_EOF))
            terms = follow[ntid] | bitset_remove(fa, T_EOF);
        else
            terms = fa;
        for(j=0; j < NUM_TOKENS; ++j)
            if(bitset_has(terms, j))
            {
                if(pt[ntid][j] != -1)
                    is_ll1 = false;
                pt[ntid][j] = i;
            }
    }
    return is_ll1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bl
xorl %r15d, %r15d
leaq 0x10759(%rip), %r13     # 0x16c40
movslq 0x103e6(%rip), %rax     # 0x168d4
cmpq %rax, %r15
jge 0x6566
imulq $0x18, %r15, %r12
leaq 0xfa72(%rip), %rax      # 0x15f70
movl (%r12,%rax), %edi
callq 0x5323
movl %eax, %r14d
leaq 0xfa5f(%rip), %rax      # 0x15f70
movq 0x8(%r12,%rax), %rdi
callq 0x620c
movslq %r14d, %rcx
testb $0x2, %al
je 0x6531
andq $-0x3, %rax
leaq 0x10563(%rip), %rdx     # 0x16a90
orq (%rdx,%rcx,8), %rax
imulq $0xe8, %rcx, %rcx
xorl %edx, %edx
cmpq $0x3a, %rdx
je 0x6561
btq %rdx, %rax
jae 0x655c
leaq (%rcx,%rdx,4), %rsi
cmpl $-0x1, (%r13,%rsi)
sete %dil
andb %dil, %bl
movl %r15d, (%r13,%rsi)
incq %rdx
jmp 0x653a
incq %r15
jmp 0x64e7
andb $0x1, %bl
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_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: read_parse_table
void read_parse_table(const char* file_name){
    FILE * fp = fopen(file_name, "r");
    if(fp == NULL){
        fprintf(stderr, "File %s not found\n", file_name);
        return;
    }

    char nt_str[100];
    char t_str[100];
    int rule_no;
    while(fscanf(fp, "%s %s %d", nt_str, t_str, &rule_no) != EOF){
        int nt_id = get_nt_id(get_gsymb_id(nt_str));
        int t_id = get_gsymb_id(t_str);
        pt[nt_id][t_id] = rule_no;
    }
    fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r14
leaq 0x72b7(%rip), %rsi      # 0xd84f
callq 0x3160
testq %rax, %rax
je 0x662c
movq %rax, %rbx
leaq -0x100(%rbp), %r15
leaq -0x90(%rbp), %r12
leaq -0x2c(%rbp), %r13
movq %rbx, %rdi
leaq 0x747d(%rip), %rsi      # 0xda42
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x3070
cmpl $-0x1, %eax
je 0x6612
movq %r15, %rdi
callq 0x5cfa
movl %eax, %edi
callq 0x5323
movl %eax, %r14d
movq %r12, %rdi
callq 0x5cfa
movl -0x2c(%rbp), %ecx
movslq %r14d, %rdx
cltq
imulq $0xe8, %rdx, %rdx
leaq 0x10636(%rip), %rsi     # 0x16c40
addq %rsi, %rdx
movl %ecx, (%rdx,%rax,4)
jmp 0x65bb
movq %rbx, %rdi
callq 0x30a0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd9c5(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
leaq 0x73f2(%rip), %rsi      # 0xda2f
movq %r14, %rdx
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3130
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: handle_parse_error_1
parse_tree_node* handle_parse_error_1(const Token* ptok, int_stack* pst, parse_tree_node* tn)
// handle case where top of stack is a terminal and it doesn't match lookahead
{
    parser_error_count++;
    gsymb_t cur_st_top = int_stack_top(pst);
    static char err_msg[50];
    sprintf(err_msg, "Got %s instead of %s.", GS_STRS[ptok->tid], GS_STRS[cur_st_top]);
    print_error("parse", ERROR, 1, ptok->line, ptok->col, ptok->lexeme, NULL, err_msg);
    int_stack_pop(pst);
    return get_successor(tn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
incl 0x1025e(%rip)           # 0x168d0
movq %rsi, %rdi
callq 0x3cf4
movslq 0x18(%r15), %rcx
leaq 0xe0cb(%rip), %rsi      # 0x14750
movq (%rsi,%rcx,8), %rdx
movl %eax, %eax
movq (%rsi,%rax,8), %rcx
leaq 0x1369a(%rip), %r12     # 0x19d30
leaq 0x73ae(%rip), %rsi      # 0xda4b
movq %r12, %rdi
xorl %eax, %eax
callq 0x31a0
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movq 0x8(%r15), %r9
leaq 0x73a8(%rip), %rdi      # 0xda61
pushq $0x1
popq %rdx
xorl %esi, %esi
pushq %r12
pushq $0x0
callq 0x873c
popq %rax
popq %rcx
movq %r14, %rdi
callq 0x3d22
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x54c8
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: handle_parse_error_2
parse_tree_node* handle_parse_error_2(const Token* ptok, int_stack* pst, parse_tree_node* tn)
// handle case where there is no entry in parse table
{
    parser_error_count++;
    static char err_msg[50];
    sprintf(err_msg, "Token \'%s\' isn't expected here.", GS_STRS[ptok->tid]);
    print_error("parse", ERROR, 2, ptok->line, ptok->col, ptok->lexeme, NULL, err_msg);
    int_stack_pop(pst);
    return get_first_child_or_successor(tn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
incl 0x101d8(%rip)           # 0x168d0
movq %rdi, %r15
movslq 0x18(%rdi), %rax
leaq 0xe04a(%rip), %rcx      # 0x14750
movq (%rcx,%rax,8), %rdx
leaq 0x1365f(%rip), %r12     # 0x19d70
leaq 0x734f(%rip), %rsi      # 0xda67
movq %r12, %rdi
xorl %eax, %eax
callq 0x31a0
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movq 0x8(%r15), %r9
leaq 0x732d(%rip), %rdi      # 0xda61
pushq $0x2
popq %rdx
xorl %esi, %esi
pushq %r12
pushq $0x0
callq 0x873c
popq %rax
popq %rcx
movq %r14, %rdi
callq 0x3d22
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x54e4
// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/parser.c
// Function: print_node_sub
void print_node_sub(const parse_tree_node* root, FILE* fp)
{
    /*
    if(root == NULL)
        fprintf(fp, "print_node: NULL\n");
    else
        fprintf(fp, "print_node: %p %s\n", root, GS_STRS[root->value->tid]);
    */
    Symbol* s = root->value;
    char empty[] = "----";
    char* lexeme = (s->lexeme == NULL ? empty : s->lexeme);
    if((int)(s->sid) < NUM_TOKENS)
        fprintf(fp, "%20s %2d %20s ", lexeme, s->line, GS_STRS[s->sid]);
    else
        fprintf(fp, "%20s %2s %20s ", empty, "--", empty);

    if(s->sid == T_NUM)
        fprintf(fp, "%20d ", s->i);
    else if(s->sid == T_RNUM)
        fprintf(fp, "%20lf ", s->f);
    else
        fprintf(fp, "%20s ", empty);

    if(root->parent == NULL)
        fprintf(fp, "%20s ", empty);
    else
        fprintf(fp, "%20s ", GS_STRS[root->parent->value->sid]);

    if(root->first_child == NULL)
        fprintf(fp, "yes ");
    else
        fprintf(fp, " no ");

    fprintf(fp, "%20s\n", GS_STRS[s->sid]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movb $0x0, -0x1c(%rbp)
movl $0x2d2d2d2d, -0x20(%rbp) # imm = 0x2D2D2D2D
movslq 0x10(%r15), %rax
cmpq $0x39, %rax
jg 0x69b6
movq 0x8(%r15), %rcx
testq %rcx, %rcx
leaq -0x20(%rbp), %rdx
cmovneq %rcx, %rdx
movl (%r15), %ecx
leaq 0xddb1(%rip), %rsi      # 0x14750
movq (%rsi,%rax,8), %r8
leaq 0x711e(%rip), %rsi      # 0xdac8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
jmp 0x69d5
leaq 0x711a(%rip), %rsi      # 0xdad7
leaq 0x7101(%rip), %rcx      # 0xdac5
leaq -0x20(%rbp), %rdx
movq %rbx, %rdi
movq %rdx, %r8
xorl %eax, %eax
callq 0x3130
movl 0x10(%r15), %eax
cmpl $0x4, %eax
je 0x69fa
cmpl $0x3, %eax
jne 0x6a13
movl 0x14(%r15), %edx
leaq 0x70f8(%rip), %rsi      # 0xdae6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
jmp 0x6a28
cvtss2sd 0x14(%r15), %xmm0
leaq 0x70e5(%rip), %rsi      # 0xdaec
movq %rbx, %rdi
movb $0x1, %al
callq 0x3130
jmp 0x6a28
leaq 0x70b7(%rip), %rsi      # 0xdad1
leaq -0x20(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x6a4c
movq (%rax), %rax
movslq 0x10(%rax), %rax
leaq 0xdd11(%rip), %rcx      # 0x14750
movq (%rcx,%rax,8), %rdx
leaq 0x7087(%rip), %rsi      # 0xdad1
jmp 0x6a57
leaq 0x707e(%rip), %rsi      # 0xdad1
leaq -0x20(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
cmpq $0x0, 0x10(%r14)
leaq 0x7086(%rip), %rax      # 0xdaf3
leaq 0x7084(%rip), %rdi      # 0xdaf8
cmoveq %rax, %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x31c0
movslq 0x10(%r15), %rax
leaq 0xdcbf(%rip), %rcx      # 0x14750
movq (%rcx,%rax,8), %rdx
leaq 0x7061(%rip), %rsi      # 0xdafd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq