LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_getsecname
char * iniparser_getsecname(dictionary * d, int n)
{
    int i ;
    int foundsec ;

    if (d==NULL || n<0) return NULL ;
    foundsec=0 ;
    for (i=0 ; i<d->size ; i++) {
        if (d->key[i]==NULL)
            continue ;
        if (strchr(d->key[i], ':')==NULL) {
            foundsec++ ;
            if (foundsec>n)
                break ;
        }
    }
    if (foundsec<=n) {
        return NULL ;
    }
    return d->key[i] ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testl %esi, %esi
sets %cl
xorl %r14d, %r14d
orb %al, %cl
jne 0x565b
movl %esi, %ebp
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
testl %r12d, %r12d
cmovlel %r14d, %r12d
pushq $0x3a
popq %r15
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x5644
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x563f
movl %r15d, %esi
callq 0x20b0
testq %rax, %rax
jne 0x563f
leal 0x1(%r14), %eax
cmpl %ebp, %r14d
jge 0x566d
movl %eax, %r14d
incq %r13
jmp 0x5614
movl %r14d, %eax
cmpl %ebp, %eax
jle 0x5658
movq 0x10(%rbx), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %r14
jmp 0x565b
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %r12d
jmp 0x5647
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_dump
static void dictionary_dump(dictionary *d, FILE *f)
{
    int i;

    if (d==NULL || f==NULL) return;

    for (i=0; i<d->size; i++) {
        if (d->key[i] == NULL)
            continue ;
        if (d->val[i] != NULL) {
            fprintf(f, "[%s]=[%s]\n", d->key[i], d->val[i]);
        } else {
            fprintf(f, "[%s]=UNDEF\n", d->key[i]);
        }
    }

    return;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x56ec
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3c9f(%rip), %r15      # 0x9337
leaq 0x3c8d(%rip), %r12      # 0x932c
xorl %r13d, %r13d
movslq 0x4(%r14), %rax
cmpq %rax, %r13
jge 0x56e3
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rdx
testq %rdx, %rdx
je 0x56de
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
testq %rcx, %rcx
je 0x56d4
movq %r12, %rsi
xorl %eax, %eax
callq 0x22d0
jmp 0x56de
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d0
incq %r13
jmp 0x56a2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_dump_ini
void iniparser_dump_ini(dictionary * d, FILE * f)
{
    int     i, j ;
    char    keym[ASCIILINESZ+1];
    int     nsec ;
    char *  secname ;
    int     seclen ;

    if (d==NULL || f==NULL) return ;

    nsec = iniparser_getnsec(d);
    if (nsec<1) {
        /* No section in file: dump all keys as they are */
        for (i=0 ; i<d->size ; i++) {
            if (d->key[i]==NULL)
                continue ;
            fprintf(f, "%s = %s\n", d->key[i], d->val[i]);
        }
        return ;
    }
    for (i=0 ; i<nsec ; i++) {
        secname = iniparser_getsecname(d, i) ;
        seclen  = (int)strlen(secname);
        fprintf(f, "\n[%s]\n", secname);
        snprintf(keym, ASCIILINESZ+1, "%s:", secname);
        for (j=0 ; j<d->size ; j++) {
            if (d->key[j]==NULL)
                continue ;
            if (!strncmp(d->key[j], keym, seclen+1)) {
                fprintf(f,
                        "%-30s = %s\n",
                        d->key[j]+seclen+1,
                        d->val[j] ? d->val[j] : "");
            }
        }
    }
    fprintf(f, "\n");
    return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
testq %rdi, %rdi
sete %al
movq %rsi, (%rsp)
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x5724
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r14
callq 0x5588
movl %eax, 0x8(%rsp)
testl %eax, %eax
jle 0x5822
leaq 0x10(%rsp), %r13
xorl %esi, %esi
cmpl 0x8(%rsp), %esi
je 0x5805
movq %r14, %rdi
movl %esi, 0xc(%rsp)
callq 0x55e0
movq %rax, %r15
movq %rax, %rdi
callq 0x20d0
movq %rax, %r12
movq (%rsp), %rdi
leaq 0x3b6b(%rip), %rsi      # 0x92d9
movq %r15, %rdx
xorl %eax, %eax
callq 0x22d0
movl $0x401, %esi            # imm = 0x401
movq %r13, %rdi
leaq 0x3b59(%rip), %rdx      # 0x92e0
movq %r15, %rcx
xorl %eax, %eax
callq 0x2320
leal 0x1(%r12), %eax
movslq %eax, %rbp
movslq %r12d, %r12
xorl %ebx, %ebx
movslq 0x4(%r14), %rax
cmpq %rax, %rbx
jge 0x57fa
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %r15
testq %r15, %r15
je 0x57f5
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x20f0
testl %eax, %eax
jne 0x57f5
leaq (%r15,%r12), %rdx
incq %rdx
movq 0x8(%r14), %rax
movq (%rax,%rbx,8), %rcx
testq %rcx, %rcx
leaq 0x2dfb(%rip), %rax      # 0x85da
cmoveq %rax, %rcx
movq (%rsp), %rdi
leaq 0x3af6(%rip), %rsi      # 0x92e4
xorl %eax, %eax
callq 0x22d0
incq %rbx
jmp 0x579e
movl 0xc(%rsp), %esi
incl %esi
jmp 0x573f
pushq $0xa
popq %rdi
movq (%rsp), %rsi
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2280
leaq 0x3aa7(%rip), %r15      # 0x92d0
xorl %ebx, %ebx
movslq 0x4(%r14), %rax
cmpq %rax, %rbx
jge 0x5712
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rdx
testq %rdx, %rdx
je 0x585b
movq 0x8(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq (%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d0
incq %rbx
jmp 0x582b
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_getstring
char * iniparser_getstring(dictionary * d, char * key, char * def)
{
    char * lc_key ;
    char * sval ;

    if (d==NULL || key==NULL)
        return def ;

    lc_key = strdup(strlwc(key));
    sval = dictionary_get(d, lc_key, def);
    free(lc_key);
    return sval ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x58f0
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5902
movq %rax, %rdi
callq 0x2350
movq %rax, %r15
movq %rax, %rdi
callq 0x5fbe
movl %eax, %ebp
movl 0x4(%r14), %r13d
xorl %r12d, %r12d
testl %r13d, %r13d
cmovlel %r12d, %r13d
cmpq %r12, %r13
je 0x58e8
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x58db
movq 0x18(%r14), %rcx
cmpl (%rcx,%r12,4), %ebp
jne 0x58db
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x22b0
testl %eax, %eax
je 0x58e0
incq %r12
jmp 0x58b3
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rbx
movq %r15, %rdi
callq 0x2250
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: strlwc(char*)
static char * strlwc(char * s)
{
    static char l[ASCIILINESZ+1];
    int i ;

    if (s==NULL) return NULL ;
    memset(l, 0, ASCIILINESZ+1);
    i=0 ;
    while (s[i] && i<ASCIILINESZ) {
        l[i] = (char)tolower((int)s[i]);
        i++ ;
    }
    l[ASCIILINESZ]=(char)0;
    return l ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x5953
movq %rdi, %r14
leaq 0xefea(%rip), %rbx      # 0x14900
xorl %r15d, %r15d
movl $0x401, %edx            # imm = 0x401
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
cmpq $0x3ff, %r15            # imm = 0x3FF
ja 0x594a
movb (%r14,%r15), %al
testb %al, %al
je 0x594a
movsbl %al, %edi
callq 0x22e0
movb %al, (%r15,%rbx)
incq %r15
jmp 0x5928
movb $0x0, 0xf3af(%rip)      # 0x14d00
jmp 0x5955
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_getboolean
int iniparser_getboolean(dictionary * d, char * key, int notfound)
{
    char    *   c ;
    int         ret ;

    c = iniparser_getstring(d, key, INI_INVALID_KEY);
    if (c==INI_INVALID_KEY) return notfound ;
    if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') {
        ret = 1 ;
    } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') {
        ret = 0 ;
    } else {
        ret = notfound ;
    }
    return ret;
}

// Assembly:
pushq %rbx
movl %edx, %ebx
pushq $-0x1
popq %rdx
callq 0x5867
cmpq $-0x1, %rax
je 0x59ed
movzbl (%rax), %ecx
pushq $0x1
popq %rax
leal -0x30(%rcx), %edx
cmpl $0x3e, %edx
ja 0x59e3
movabsq $0x4040000040400001, %rsi # imm = 0x4040000040400001
btq %rdx, %rsi
jae 0x59d3
xorl %eax, %eax
jmp 0x59ef
movabsq $0x21000000002, %rsi    # imm = 0x21000000002
btq %rdx, %rsi
jb 0x59ef
cmpl $0x74, %ecx
je 0x59ef
cmpl $0x79, %ecx
je 0x59ef
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_add_entry(_dictionary_*, char*, char*, char*)
static void iniparser_add_entry(
    dictionary * d,
    char * sec,
    char * key,
    char * val)
{
    char longkey[2*ASCIILINESZ+1];

    /* Make a key as section:keyword */
    if (key!=NULL) {
        snprintf(longkey, 2*ASCIILINESZ+1, "%s:%s", sec, key);
    } else {
        strlcpy(longkey, sec, 2*ASCIILINESZ+1);
    }

    /* Add (key,val) to dictionary */
    dictionary_set(d, longkey, val);
    return ;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rcx, %rbx
movq %rsi, %rcx
movq %rdi, %r14
testq %rdx, %rdx
je 0x5ec7
movq %rdx, %r8
leaq 0x348d(%rip), %rdx      # 0x9343
movq %rsp, %rdi
movl $0x801, %esi            # imm = 0x801
xorl %eax, %eax
callq 0x2320
jmp 0x5ed7
movq %rsp, %rdi
movl $0x801, %edx            # imm = 0x801
movq %rcx, %rsi
callq 0x553a
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5a31
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: strcrop(char*)
static char * strcrop(char * s)
{
    static char l[ASCIILINESZ+1];
    char * last ;

    if (s==NULL) return NULL ;
    memset(l, 0, ASCIILINESZ+1);
    strlcpy(l, s, ASCIILINESZ+1);
    last = l + strlen(l);
    while (last > l) {
        if (!isspace((int)*(last-1)))
            break ;
        last -- ;
    }
    *last = (char)0;
    return l ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x5f51
movq %rdi, %r14
leaq 0xee0c(%rip), %rbx      # 0x14d10
movl $0x401, %edx            # imm = 0x401
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
movl $0x401, %edx            # imm = 0x401
movq %rbx, %rdi
movq %r14, %rsi
callq 0x553a
movq %rbx, %rdi
callq 0x20d0
movq %rax, %r14
addq %rbx, %r14
movq %r14, %r15
cmpq %rbx, %r14
jbe 0x5f4b
leaq -0x1(%r15), %r14
movsbl -0x1(%r15), %edi
callq 0x2040
testl %eax, %eax
jne 0x5f31
movb $0x0, (%r15)
jmp 0x5f53
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_free
static void dictionary_del(dictionary * d)
{
    int     i ;

    if (d==NULL) return ;
    for (i=0 ; i<d->size ; i++) {
        if (d->key[i]!=NULL)
            free(d->key[i]);
        if (d->val[i]!=NULL)
            free(d->val[i]);
    }
    free(d->val);
    free(d->key);
    free(d->hash);
    free(d);

    return;
}

// Assembly:
testq %rdi, %rdi
je 0x5fbd
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jge 0x5f93
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2250
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2250
incq %r14
jmp 0x5f6b
movq 0x8(%rbx), %rdi
callq 0x2250
movq 0x10(%rbx), %rdi
callq 0x2250
movq 0x18(%rbx), %rdi
callq 0x2250
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2250
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: dictionary_hash(char*)
static unsigned dictionary_hash(char * key)
{
    int         len ;
    unsigned    hash ;
    int         i ;

    len = strlen(key);
    for (hash=0, i=0 ; i<len ; i++) {
        hash += (unsigned)key[i] ;
        hash += (hash<<10);
        hash ^= (hash>>6) ;
    }
    hash += (hash <<3);
    hash ^= (hash >>11);
    hash += (hash <<15);
    return hash ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x20d0
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
xorl %edx, %edx
cmpq %rcx, %rax
je 0x5fed
movsbl (%rbx,%rcx), %esi
addl %esi, %edx
imull $0x401, %edx, %esi      # imm = 0x401
movl %esi, %edx
shrl $0x6, %edx
xorl %esi, %edx
incq %rcx
jmp 0x5fd0
leal (%rdx,%rdx,8), %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
imull $0x8001, %ecx, %eax     # imm = 0x8001
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: mem_double(void*, int)
static void * mem_double(void * ptr, int size)
{
    void *newptr;

    newptr = calloc(2*size, 1);
    memcpy(newptr, ptr, size);
    free(ptr);
    return newptr ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leal (%rbx,%rbx), %eax
movslq %eax, %rdi
pushq $0x1
popq %rsi
callq 0x2150
movq %rax, %r15
movslq %ebx, %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x2250
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/repeaterutil.cpp
// Function: getAddrPartsFromString(char*)
addrParts getAddrPartsFromString(char *ipString)
{
    addrParts addr; 
    char tmpBuf[MY_TMP_BUF_LEN + 1];
    int ipVal[4] = {255,255,255,255};
    char *p;
    char *start;
    long value;
    int ii;
    
    strlcpy(tmpBuf, ipString, MY_TMP_BUF_LEN + 1);
    strlcat(tmpBuf, ".", MY_TMP_BUF_LEN + 1);
    start = tmpBuf;
    
    for(ii = 0; ii < 4; ii++) {
        p = strchr(start, '.');
        if (p != NULL) {
            *p = '\0';
            
            value = strtol(start, NULL, 10);
            
            if ((value < 0) || (value > 255)) 
                ipVal[ii] = 255;
            else
                ipVal[ii] = value;

            start = p;
            start++;
        }
        else {
            ipVal[ii] = 255;
        }
    }
    
    addr.a = ipVal[0];
    addr.b = ipVal[1];
    addr.c = ipVal[2];
    addr.d = ipVal[3];
    
    return addr;    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rsi
movaps 0x316d(%rip), %xmm0     # 0x9500
movaps %xmm0, (%rsp)
leaq 0x10(%rsp), %rbx
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
callq 0x553a
leaq 0x3160(%rip), %rsi      # 0x9510
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
callq 0x54d8
xorl %r12d, %r12d
pushq $0x2e
popq %rbp
pushq $0xa
popq %r14
movl $0xff, %r13d
cmpq $0x4, %r12
je 0x6415
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
testq %rax, %rax
je 0x6408
movq %rax, %r15
movb $0x0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x22c0
cmpq %r13, %rax
cmovaeq %r13, %rax
movl %eax, (%rsp,%r12,4)
incq %r15
movq %r15, %rbx
jmp 0x6410
movl $0xff, (%rsp,%r12,4)
incq %r12
jmp 0x63cd
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/qian-jiahong[P]uvncrep017-ws/repeaterevents.cpp
// Function: handleRepeaterEvents()
void handleRepeaterEvents(void)
{
    pid_t pid;
    
    if (0 == eventProc) {
        //Event posting process is not running, create one if events in fifo
        if (!isFifoEmpty()) {
            //fork doEvent
            pid = fork();
            if (-1 == pid) {
                //fork failed. This is so unfair. Exit and blame Linus ;-)
                fatal(LEVEL_0, "handleRepeaterEvents(): fork() failed. Linus, this is *so* unfair\n");
            }
            else if (0 == pid) {
                //child code
                debug(LEVEL_3, "handleRepeaterEvents(): in child process, starting doEventWork()\n");
                exit(doEventWork());
            }
            else {
                //parent code
                //Store child pid to variable eventProc so we can
                //properly clean up after child has exited
                eventProc = pid;
                
                //Clean parent process' fifo
                clearFifo();
            }
        }
    }
    else {
        //Event-sending process is running, check if run has ended
        cleanUpAfterEventProc();
    }
}

// Assembly:
pushq %rax
movl 0x1d857(%rip), %edi     # 0x23d40
testl %edi, %edi
je 0x6517
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x2180
testl %eax, %eax
jle 0x6549
leaq 0x32b9(%rip), %rsi      # 0x97bb
pushq $0x3
popq %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x247c
andl $0x0, 0x1d82b(%rip)     # 0x23d40
jmp 0x6549
cmpl $0x0, 0xedba(%rip)      # 0x152d8
je 0x6549
callq 0x2070
cmpl $-0x1, %eax
je 0x654b
testl %eax, %eax
je 0x655c
andl $0x0, 0xed9b(%rip)      # 0x152d0
andl $0x0, 0xed98(%rip)      # 0x152d4
movl %eax, 0x1d7fe(%rip)     # 0x23d40
andl $0x0, 0xed8f(%rip)      # 0x152d8
popq %rax
retq
leaq 0x2fc0(%rip), %rsi      # 0x9512
xorl %edi, %edi
xorl %eax, %eax
popq %rcx
jmp 0x25b4
leaq 0x2ff2(%rip), %rsi      # 0x9555
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x247c
callq 0x6579
xorl %edi, %edi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH03_StringsVectorsAndArrays/examples/string_io2.cc
// Function: main
int main()
{
	string s1, s2;

	cin >> s1 >> s2; // read first input into s1, second into s2
	cout << s1 << s2 << endl; // write both strings

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movq 0x2dd4(%rip), %rdi      # 0x3fe0
leaq -0x48(%rbp), %rsi
callq 0x1070
leaq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x1070
movq 0x2da8(%rip), %rdi      # 0x3fd0
leaq -0x48(%rbp), %rsi
callq 0x1060
leaq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1040
leaq -0x28(%rbp), %rdi
callq 0x1030
leaq -0x48(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x1030
leaq -0x48(%rbp), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/main.cpp
// Function: main
int main()
{
	lexAnalysis(); 
      
    bool t=GrammarAnalysis();

	cout<<"语法分析结果:";
	if(t)
	  cout<<"Success!"<<endl;
	else 
	  cout<<"Failed!"<<endl;
	  
	semantics();
	cout<<"语义翻译结束!"<<endl; 
    print();
	cout<<"翻译结果写入到out.c成功!"<<endl;  
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x439b
callq 0xafc8
movl %eax, %ebp
movq 0xfddd(%rip), %rbx      # 0x13fd0
leaq 0x9e92(%rip), %rsi      # 0xe08c
movq %rbx, %rdi
callq 0x21d0
leaq 0x9e97(%rip), %rax      # 0xe0a0
leaq 0x9e99(%rip), %rsi      # 0xe0a9
testb %bpl, %bpl
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
callq 0x5fe0
leaq 0x9e7e(%rip), %rsi      # 0xe0b1
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
callq 0x415c
leaq 0x9e76(%rip), %rsi      # 0xe0c5
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/lex.cpp
// Function: judgeKeyword(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int judgeKeyword(string str)
{
	//注意大小写不敏感,将所有的都转化为小写 
	transform(str.begin(),str.end(),str.begin(), ::tolower);
	for(int i=0;i<24;i++)
	   if(str==keyword[i])
	      return i;   
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x54d9
movsbl (%r14,%r12), %edi
callq 0x2280
movb %al, (%r14,%r12)
incq %r12
jmp 0x54c1
leaq 0xf030(%rip), %r14      # 0x14510
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
cmpq $0x18, %r15
je 0x5507
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f9f
testb %al, %al
jne 0x5504
incq %r15
addq $0x20, %r14
jmp 0x54e6
movl %r15d, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: program_body(int)
void program_body(int k)
{
	TreeNode tNode= tree.node[k];
    if (lookahead(k) == 5)//5是declarations
    {
        declarations(tree.node[k].child[0]);

        subprogram_declarations(tree.node[k].child[1]);
        
        code[currentLine++].append("int main()\n");
		code[currentLine++].append("{\n");
		
        compound_statement(tree.node[k].child[2]);
        code[currentLine++].append("return 0;\n");
        code[currentLine++].append("}\n");
        
    }
    else
        cout<<"program_body error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xadfbe(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xa562
movl %r14d, %edi
callq 0x603d
cmpl $0x5, %eax
jne 0x61ae
movl 0x4(%rbx), %edi
callq 0x6f19
movl 0x8(%rbx), %edi
callq 0x6fec
movslq 0xa846b(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa8462(%rip)     # 0xae580
shlq $0x5, %rdi
leaq 0xa77d7(%rip), %r14     # 0xad900
addq %r14, %rdi
leaq 0x8547(%rip), %rsi      # 0xe67a
callq 0x2350
movslq 0xa8441(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa8438(%rip)     # 0xae580
shlq $0x5, %rdi
addq %r14, %rdi
leaq 0x8582(%rip), %rsi      # 0xe6d8
callq 0x2350
movl 0xc(%rbx), %edi
callq 0x7030
movslq 0xa8416(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa840d(%rip)     # 0xae580
shlq $0x5, %rdi
addq %r14, %rdi
leaq 0x8505(%rip), %rsi      # 0xe686
callq 0x2350
movslq 0xa83f3(%rip), %rax     # 0xae580
leal 0x1(%rax), %ecx
movl %ecx, 0xa83ea(%rip)     # 0xae580
shlq $0x5, %rax
addq %rax, %r14
leaq 0x84ed(%rip), %rsi      # 0xe691
movq %r14, %rdi
callq 0x2350
jmp 0x61c9
movq 0xde1b(%rip), %rdi      # 0x13fd0
leaq 0x84d8(%rip), %rsi      # 0xe694
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rsp, %rdi
callq 0xa600
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: enterMain(int, int)
void enterMain(int position, int type)//将新id添加到主符号表
{
    if (isDefined(position) == 1) {
        cout<<"double defined when enterMain"<<endl;
    }
    else
    {
        //新建一个Tuple
        Tuple newTuple;
        
        //初始化Tuple
        newTuple.name = tree.node[position].value;
        newTuple.type = type;
        newTuple.demension = demension;

        newTuple.declareRow = tree.node[position].row;

        if (isArray == 1)
        {
            newTuple.isArray = 1;
            demension = 0;//目前只用在数组判断了
        }
        
        mainTable.push_back(newTuple);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movl %edi, %ebp
callq 0x6ab8
cmpl $0x1, %eax
jne 0x6562
movq 0xda8c(%rip), %rdi      # 0x13fd0
leaq 0x8771(%rip), %rsi      # 0xecbc
callq 0x21d0
movq %rax, %rdi
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
andq $0x0, 0x30(%rax)
movslq %ebp, %rax
imulq $0xa8, %rax, %r14
leaq 0xadb08(%rip), %r15     # 0xb4098
leaq (%r15,%r14), %rsi
addq $0x88, %rsi
leaq 0x8(%rsp), %rdi
callq 0x2110
leaq (%r15,%r14), %rax
addq $0x8, %rax
movl %ebx, 0x28(%rsp)
movl 0xa7345(%rip), %ecx     # 0xad8fc
movl %ecx, 0x2c(%rsp)
movl 0xa4(%rax), %eax
movl %eax, 0x30(%rsp)
cmpl $0x1, 0xa732c(%rip)     # 0xad8f8
jne 0x65dd
movl $0x1, 0x50(%rsp)
andl $0x0, 0xa731f(%rip)     # 0xad8fc
leaq 0xa72ac(%rip), %rdi     # 0xad890
leaq 0x8(%rsp), %rsi
callq 0xa692
leaq 0x8(%rsp), %rdi
callq 0xa6be
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa6be
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: declarations(int)
void declarations(int k)
{
	TreeNode tNode= tree.node[k]; 
	TreeNode childNode;
	
    if (lookahead(k) == 107)//107是var
    {
        declaration(tree.node[k].child[1]);
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"declarations error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xad164(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0xa562
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movl %r14d, %edi
callq 0x603d
cmpl $0x6a, %eax
je 0x6fa8
cmpl $0x6b, %eax
jne 0x6f8d
movl 0x8(%rbx), %edi
callq 0x7100
jmp 0x6fa8
movq 0xd03c(%rip), %rdi      # 0x13fd0
leaq 0x776c(%rip), %rsi      # 0xe707
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: subprogram_declarations(int)
void subprogram_declarations(int k)
{
    if (lookahead(k) == 11)//11是subprogram_declarations1
    {
        subprogram_declarations1(tree.node[k].child[0]);
    }
    else
        cout<<"subprogram_declarations error!"<<endl;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x603d
cmpl $0xb, %eax
jne 0x7014
movslq %ebx, %rax
imulq $0xa8, %rax, %rax
leaq 0xad08e(%rip), %rcx     # 0xb4098
movl 0xc(%rcx,%rax), %edi
popq %rbx
jmp 0x7745
movq 0xcfb5(%rip), %rdi      # 0x13fd0
leaq 0x76da(%rip), %rsi      # 0xe6fc
callq 0x21d0
movq %rax, %rdi
popq %rbx
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: compound_statement(int)
void compound_statement(int k)
{
	TreeNode tNode= tree.node[k];
    if(lookahead(k) == 121)//121是begin
    {
    	code[currentLine].append("\n");
		currentLine++;
        optional_statements(tree.node[k].child[1]);
        code[currentLine].append("\n");
		currentLine++;
    }
    else
        cout<<"compound_statement error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xad04d(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xa562
movl %r14d, %edi
callq 0x603d
cmpl $0x79, %eax
jne 0x70bf
movslq 0xa750e(%rip), %rdi     # 0xae580
shlq $0x5, %rdi
leaq 0xa6883(%rip), %r14     # 0xad900
addq %r14, %rdi
leaq 0x75fd(%rip), %rsi      # 0xe684
callq 0x2350
incl 0xa74ee(%rip)           # 0xae580
movl 0x8(%rbx), %edi
callq 0x812e
movslq 0xa74df(%rip), %rax     # 0xae580
shlq $0x5, %rax
addq %rax, %r14
leaq 0x75d5(%rip), %rsi      # 0xe684
movq %r14, %rdi
callq 0x2350
incl 0xa74c3(%rip)           # 0xae580
jmp 0x70da
movq 0xcf0a(%rip), %rdi      # 0x13fd0
leaq 0x772e(%rip), %rsi      # 0xe7fb
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rsp, %rdi
callq 0xa600
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: declaration(int)
void declaration(int k)
{
	TreeNode tNode= tree.node[k];
    if (lookahead(k) == 2)//2是identifier_list
    {
        int idType = type(tree.node[k].child[2]);//获取此声明的类型
        code[currentLine].append(" " );
        identifier_list(idType, tree.node[k].child[0], 1);
        code[currentLine++].append(";\n");
        declaration1(tree.node[k].child[4]);
    }
    else
        cout<<"declaration error!"<<endl;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xacf7c(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xa562
movl %r14d, %edi
callq 0x603d
cmpl $0x2, %eax
jne 0x71a6
movl 0xc(%rbx), %edi
callq 0x71ee
movl %eax, %ebp
movslq 0xa7431(%rip), %rdi     # 0xae580
shlq $0x5, %rdi
leaq 0xa67a6(%rip), %r14     # 0xad900
addq %r14, %rdi
leaq 0x745d(%rip), %rsi      # 0xe5c1
callq 0x2350
movl 0x4(%rbx), %esi
pushq $0x1
popq %rdx
movl %ebp, %edi
callq 0x61ef
movslq 0xa7403(%rip), %rax     # 0xae580
leal 0x1(%rax), %ecx
movl %ecx, 0xa73fa(%rip)     # 0xae580
shlq $0x5, %rax
addq %rax, %r14
leaq 0x7940(%rip), %rsi      # 0xead4
movq %r14, %rdi
callq 0x2350
movl 0x14(%rbx), %edi
callq 0x752b
jmp 0x71c1
movq 0xce23(%rip), %rdi      # 0x13fd0
leaq 0x7592(%rip), %rsi      # 0xe746
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xa600
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x71d9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: declaration1(int)
void declaration1(int k)
{
    if (lookahead(k) == 2)//2是identifier_list
    {
        int idType = type(tree.node[k].child[2]);//获取此声明的类型
        code[currentLine].append(" " );
        identifier_list(idType, tree.node[k].child[0], 1);
        code[currentLine++].append(";\n");
        declaration1(tree.node[k].child[4]);
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"declaration' error!"<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %r15d
leaq 0xacb58(%rip), %r12     # 0xb4098
leaq 0xa63b9(%rip), %r13     # 0xad900
pushq $0x1
popq %rbp
leaq 0x7583(%rip), %r14      # 0xead4
movl %r15d, %edi
callq 0x603d
cmpl $0x2, %eax
jne 0x75c4
movslq %r15d, %rax
imulq $0xa8, %rax, %rbx
movl 0x14(%r12,%rbx), %edi
callq 0x71ee
movl %eax, %r15d
movslq 0xa7004(%rip), %rdi     # 0xae580
shlq $0x5, %rdi
addq %r13, %rdi
leaq 0x7037(%rip), %rsi      # 0xe5c1
callq 0x2350
movl 0xc(%r12,%rbx), %esi
movl %r15d, %edi
movl %ebp, %edx
callq 0x61ef
movslq 0xa6fdb(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa6fd2(%rip)     # 0xae580
shlq $0x5, %rdi
addq %r13, %rdi
movq %r14, %rsi
callq 0x2350
movl 0x1c(%r12,%rbx), %r15d
jmp 0x7551
cmpl $0x6a, %eax
jne 0x75d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xc9f1(%rip), %rdi      # 0x13fd0
leaq 0x70c2(%rip), %rsi      # 0xe6a8
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: standard_type(int)
int standard_type(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
    if (lookahead(k) == 116)//int
    {
    	code[currentLine].append("int");
        return 1;
    }
    else if(lookahead(k) == 117)//real
    {
    	code[currentLine].append("float");
        return 2;
    }
    else if(lookahead(k) == 118)//bool
    {
    	code[currentLine].append("boolean");
        return 3;
    }
    else if(lookahead(k) == 119)//num
    {
        return -1;
    }
    else
    {
        cout<<"standard_type error!"<<endl;
        return -1;
    }
}

// Assembly:
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movslq %edi, %rbx
imulq $0xa8, %rbx, %rax
leaq 0xaca7e(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
leaq 0xa8(%rsp), %rdi
callq 0xa562
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movl %ebx, %edi
callq 0x603d
pushq $-0x1
popq %rbx
addl $-0x74, %eax
cmpl $0x3, %eax
ja 0x76ea
leaq 0x6ec7(%rip), %rcx      # 0xe538
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq 0xa6eff(%rip), %rax     # 0xae580
shlq $0x5, %rax
leaq 0xa6274(%rip), %rdi     # 0xad900
addq %rax, %rdi
leaq 0x7047(%rip), %rsi      # 0xe6dd
callq 0x2350
pushq $0x1
jmp 0x76e7
movslq 0xa6eda(%rip), %rax     # 0xae580
shlq $0x5, %rax
leaq 0xa624f(%rip), %rdi     # 0xad900
addq %rax, %rdi
leaq 0x7026(%rip), %rsi      # 0xe6e1
callq 0x2350
pushq $0x2
jmp 0x76e7
movslq 0xa6eb5(%rip), %rax     # 0xae580
shlq $0x5, %rax
leaq 0xa622a(%rip), %rdi     # 0xad900
addq %rax, %rdi
leaq 0x6934(%rip), %rsi      # 0xe014
callq 0x2350
pushq $0x3
popq %rbx
jmp 0x7705
movq 0xc8df(%rip), %rdi      # 0x13fd0
leaq 0x6fef(%rip), %rsi      # 0xe6e7
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rsp, %rdi
callq 0xa600
leaq 0xa8(%rsp), %rdi
callq 0xa600
movl %ebx, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa600
leaq 0xa8(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: subprogram_declarations1(int)
void subprogram_declarations1(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
    if (lookahead(k) == 12)//12是subprogram_declaration
    {
        subprogram_declaration(tree.node[k].child[0]);
        currentLine++;
        subprogram_declarations1(tree.node[k].child[2]);
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"subprogram_declarations' error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xac938(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0xa562
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movl %r14d, %edi
callq 0x603d
cmpl $0x6a, %eax
je 0x77e2
cmpl $0xc, %eax
jne 0x77c7
movl 0x4(%rbx), %edi
callq 0x7826
incl 0xa6dc3(%rip)           # 0xae580
movl 0xc(%rbx), %edi
callq 0x7745
jmp 0x77e2
movq 0xc802(%rip), %rdi      # 0x13fd0
leaq 0x6f46(%rip), %rsi      # 0xe71b
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: subprogram_declaration(int)
void subprogram_declaration(int k)
{
	TreeNode tNode= tree.node[k];
    if (lookahead(k) == 13)//13是subprogram_head
    {
        subprogram_head(tree.node[k].child[0]);
        code[currentLine++].append("{\n");
        declarations(tree.node[k].child[1]);
        
        compound_statement(tree.node[k].child[2]);
        code[currentLine++].append("}\n");
        
        if (currentTable != "main") {
            currentTable = "main";
        }
    }
    else
        cout<<"subprogram_declaration error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xac857(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xa562
movl %r14d, %edi
callq 0x603d
cmpl $0xd, %eax
jne 0x78f9
movl 0x4(%rbx), %edi
callq 0x793a
movslq 0xa6d0c(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa6d03(%rip)     # 0xae580
shlq $0x5, %rdi
leaq 0xa6078(%rip), %r14     # 0xad900
addq %r14, %rdi
leaq 0x6e46(%rip), %rsi      # 0xe6d8
callq 0x2350
movl 0x8(%rbx), %edi
callq 0x6f19
movl 0xc(%rbx), %edi
callq 0x7030
movslq 0xa6cd2(%rip), %rax     # 0xae580
leal 0x1(%rax), %ecx
movl %ecx, 0xa6cc9(%rip)     # 0xae580
shlq $0x5, %rax
addq %rax, %r14
leaq 0x6dcc(%rip), %rsi      # 0xe691
movq %r14, %rdi
callq 0x2350
leaq 0xa6004(%rip), %rdi     # 0xad8d8
leaq 0x6ca5(%rip), %rsi      # 0xe580
callq 0xa61d
testb %al, %al
je 0x7914
leaq 0xa5fed(%rip), %rdi     # 0xad8d8
leaq 0x6c8e(%rip), %rsi      # 0xe580
callq 0x2360
jmp 0x7914
movq 0xc6d0(%rip), %rdi      # 0x13fd0
leaq 0x6e34(%rip), %rsi      # 0xe73b
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rsp, %rdi
callq 0xa600
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: mkTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void mkTable(string tableName, int type, int returnType)//建立子符号表
{
    //新建一个subTableItem
    subTableItem newItem;
    
    //初始化subTableItem
    newItem.name = tableName;
    newItem.type = type;
    newItem.returnType = returnType;
    newItem.isValid = 1;//此表设为有效
    
    //将subTableItem插入符号表序列
    subTable.push_back(newItem);
    
    //修改当前符号表
    currentTable = tableName;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rax)
movaps %xmm0, -0x30(%rax)
movaps %xmm0, -0x40(%rax)
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rbx, %rsi
callq 0x2110
movq %rsp, %rsi
movl %r14d, 0x54(%rsi)
movl %ebp, 0x58(%rsi)
movb $0x1, 0x50(%rsi)
leaq 0xa5af3(%rip), %rdi     # 0xad8a8
callq 0xa646
leaq 0xa5b17(%rip), %rdi     # 0xad8d8
movq %rbx, %rsi
callq 0x2110
movq %rsp, %rdi
callq 0xa672
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa672
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: arguments(int)
void arguments(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
	
    if (lookahead(k) == 102)//102是(
    {
    	//code[currentLine].append("(");
        parameter_lists(tree.node[k].child[1]);
        //code[currentLine].append(")");
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"arguments error"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xac290(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0xa562
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movl %r14d, %edi
callq 0x603d
cmpl $0x6a, %eax
je 0x7e7c
cmpl $0x66, %eax
jne 0x7e61
movl 0x8(%rbx), %edi
callq 0x7ec0
jmp 0x7e7c
movq 0xc168(%rip), %rdi      # 0x13fd0
leaq 0x6939(%rip), %rsi      # 0xe7a8
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: parameter_lists(int)
void parameter_lists(int k)
{
    if (lookahead(k) == 17)//17是parameter_list
    {
        parameter_list(tree.node[k].child[0]);
        
        parameter_lists1(tree.node[k].child[1]);
    }
    else
        cout<<"parameter_lists error"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x603d
cmpl $0x11, %eax
jne 0x7efc
movslq %ebx, %rax
imulq $0xa8, %rax, %rbx
leaq 0xac1b7(%rip), %r14     # 0xb4098
movl 0xc(%r14,%rbx), %edi
callq 0x7f1e
movl 0x10(%r14,%rbx), %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8053
movq 0xc0cd(%rip), %rdi      # 0x13fd0
leaq 0x68ae(%rip), %rsi      # 0xe7b8
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: parameter_list(int)
void parameter_list(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
	
    int idType;
    
    if(lookahead(k) == 107)//107是var
    {
        idType = type(tree.node[k].child[3]);
		code[currentLine].append(" ");
        identifier_list(idType, tree.node[k].child[1], 2);
    }
    else if(lookahead(k) == 2)//2是identifier_list
    {
        idType = type(tree.node[k].child[2]);
        code[currentLine].append(" ");
        identifier_list(idType, tree.node[k].child[0], 2);
    }
    else
        cout<<"parameter_list error!"<<endl;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xac15e(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
leaq 0xa8(%rsp), %rdi
movq %rbx, %rsi
callq 0xa562
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movl %r14d, %edi
callq 0x603d
cmpl $0x2, %eax
je 0x7fba
cmpl $0x6b, %eax
jne 0x7ff7
movl 0x10(%rbx), %edi
callq 0x71ee
movl %eax, %ebp
movslq 0xa65e6(%rip), %rax     # 0xae580
shlq $0x5, %rax
leaq 0xa595b(%rip), %rdi     # 0xad900
addq %rax, %rdi
leaq 0x6612(%rip), %rsi      # 0xe5c1
callq 0x2350
addq $0x8, %rbx
jmp 0x7fe9
movl 0xc(%rbx), %edi
callq 0x71ee
movl %eax, %ebp
movslq 0xa65b5(%rip), %rax     # 0xae580
shlq $0x5, %rax
leaq 0xa592a(%rip), %rdi     # 0xad900
addq %rax, %rdi
leaq 0x65e1(%rip), %rsi      # 0xe5c1
callq 0x2350
addq $0x4, %rbx
movl (%rbx), %esi
pushq $0x2
popq %rdx
movl %ebp, %edi
callq 0x61ef
jmp 0x8012
movq 0xbfd2(%rip), %rdi      # 0x13fd0
leaq 0x67e0(%rip), %rsi      # 0xe7e5
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rsp, %rdi
callq 0xa600
leaq 0xa8(%rsp), %rdi
callq 0xa600
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa600
leaq 0xa8(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: parameter_lists1(int)
void parameter_lists1(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
    if (lookahead(k) == 104)//104是;
    {
        parameter_list(tree.node[k].child[1]);
        
        parameter_lists1(tree.node[k].child[2]);
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"parameter_lists' error"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %r14
imulq $0xa8, %r14, %rax
leaq 0xac02a(%rip), %rcx     # 0xb4098
leaq (%rcx,%rax), %rbx
addq $0x8, %rbx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0xa562
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movl %r14d, %edi
callq 0x603d
cmpl $0x6a, %eax
je 0x80ea
cmpl $0x68, %eax
jne 0x80cf
movl 0x8(%rbx), %edi
callq 0x7f1e
movl 0xc(%rbx), %edi
callq 0x8053
jmp 0x80ea
movq 0xbefa(%rip), %rdi      # 0x13fd0
leaq 0x66f1(%rip), %rsi      # 0xe7ce
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa600
leaq 0xb0(%rsp), %rdi
callq 0xa600
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: optional_statements(int)
void optional_statements(int k)
{
    if(lookahead(k) == 20)//20是statement_list
    {
        statement_list(tree.node[k].child[0]);
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"optional_statements error!"<<endl;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x603d
cmpl $0x6a, %eax
je 0x815b
cmpl $0x14, %eax
jne 0x815d
movslq %ebx, %rax
imulq $0xa8, %rax, %rax
leaq 0xabf47(%rip), %rcx     # 0xb4098
movl 0xc(%rcx,%rax), %edi
popq %rbx
jmp 0x8179
popq %rbx
retq
movq 0xbe6c(%rip), %rdi      # 0x13fd0
leaq 0x66aa(%rip), %rsi      # 0xe815
callq 0x21d0
movq %rax, %rdi
popq %rbx
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: statement_list(int)
void statement_list(int k)
{
    if(lookahead(k) == 22)//22是statement
    {
        statement(tree.node[k].child[0]);
    
        statement_list1(tree.node[k].child[1]);
    }
    else
        cout<<"statement_list error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x603d
cmpl $0x16, %eax
jne 0x81b5
movslq %ebx, %rax
imulq $0xa8, %rax, %rbx
leaq 0xabefe(%rip), %r14     # 0xb4098
movl 0xc(%r14,%rbx), %edi
callq 0x81d7
movl 0x10(%r14,%rbx), %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x85ec
movq 0xbe14(%rip), %rdi      # 0x13fd0
leaq 0x666d(%rip), %rsi      # 0xe830
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: statement_list1(int)
void statement_list1(int k)
{
    if(lookahead(k) == 104)//104是;
    {
        statement(tree.node[k].child[1]);
        
        statement_list1(tree.node[k].child[2]);
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"statement_list' error!"<<endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xaba9f(%rip), %r14     # 0xb4098
movl %ebx, %edi
callq 0x603d
cmpl $0x68, %eax
jne 0x8620
movslq %ebx, %rax
imulq $0xa8, %rax, %rbx
movl 0x10(%r14,%rbx), %edi
callq 0x81d7
movl 0x14(%r14,%rbx), %ebx
jmp 0x85f9
cmpl $0x6a, %eax
jne 0x862d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xb99c(%rip), %rdi      # 0x13fd0
leaq 0x620b(%rip), %rsi      # 0xe846
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/zhengwangsun[P]pas2c/semantics.cpp
// Function: expression(int, int)
int expression(int k,int useFlag)
{
    if(lookahead(k) == 31)//31是simple_expr
    {
        int flag1 = simple_expression(tree.node[k].child[0]); //
        
        int flag2 = expression1(tree.node[k].child[1]);
        
        if (flag1 >= flag2)//类型转换，低转高
        { 
        	if(useFlag==2)
            {
        		code[currentLine].insert(0,"printf(\"%d\",");
        		code[currentLine++].append(");\n");
        	}
            if(flag2 == 0)
                return flag1;
            else
                return 3;
    	}
		else if (flag2 >= flag1)//
        {
        	if(useFlag==2){
        		code[currentLine].insert(0,"printf(\"%f\",");
        		code[currentLine++].append(");\n");
        	}
            if(flag1 == 0)
                return flag2;
            else
                return 3;
		}
        else
        {
            cout<<"type not match where expression"<<endl;
            return -1;
        }
    }
    else
    {
        cout<<"expression error!"<<endl;
        return -1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movl %edi, %ebx
callq 0x603d
cmpl $0x1f, %eax
jne 0x89e4
movslq %ebx, %rax
imulq $0xa8, %rax, %r15
leaq 0xab726(%rip), %r12     # 0xb4098
movl 0xc(%r12,%r15), %edi
callq 0x9080
movl %eax, %ebx
movl 0x10(%r12,%r15), %edi
callq 0x9183
movl %eax, %ebp
cmpl %eax, %ebx
jge 0x8a04
cmpl $0x2, %r14d
jne 0x89da
movslq 0xa5be5(%rip), %rdi     # 0xae580
shlq $0x5, %rdi
leaq 0xa4f5a(%rip), %r14     # 0xad900
addq %r14, %rdi
leaq 0x6127(%rip), %rdx      # 0xead7
xorl %esi, %esi
callq 0x2060
movslq 0xa5bc2(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa5bb9(%rip)     # 0xae580
shlq $0x5, %rdi
addq %r14, %rdi
leaq 0x60fe(%rip), %rsi      # 0xead3
callq 0x2350
testl %ebx, %ebx
pushq $0x3
popq %rax
cmovel %ebp, %eax
jmp 0x8a58
movq 0xb5e5(%rip), %rdi      # 0x13fd0
leaq 0x614f(%rip), %rsi      # 0xeb41
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
pushq $-0x1
popq %rax
jmp 0x8a58
cmpl $0x2, %r14d
jne 0x8a50
movslq 0xa5b6f(%rip), %rdi     # 0xae580
shlq $0x5, %rdi
leaq 0xa4ee4(%rip), %r14     # 0xad900
addq %r14, %rdi
leaq 0x60a0(%rip), %rdx      # 0xeac6
xorl %esi, %esi
callq 0x2060
movslq 0xa5b4c(%rip), %rdi     # 0xae580
leal 0x1(%rdi), %eax
movl %eax, 0xa5b43(%rip)     # 0xae580
shlq $0x5, %rdi
addq %r14, %rdi
leaq 0x6088(%rip), %rsi      # 0xead3
callq 0x2350
testl %ebp, %ebp
pushq $0x3
popq %rax
cmovel %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq