LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/repeater.cpp
// Function: forkRepeater(int, int, long)
static void forkRepeater(int serverSocket, int viewerSocket, long idCode)
{
    pid_t pid;

    //fork repeater
    pid = fork();
    if (-1 == pid) {
        //fork failed. This is so unfair. Exit and blame Linus ;-)
        fatal(LEVEL_0, "forkRepeater(): fork() failed. Linus, this is *so* unfair.\n");
    }
    else if (0 == pid) {
        //child code
        debug(LEVEL_3, "forkRepeater(): in child process, starting doRepeater(%d, %d)\n", serverSocket, viewerSocket);
        exit(doRepeater(serverSocket, viewerSocket));
    }
    else {
        //parent code
        //Add necessary information of child to repeaterProcs list so we can
        //properly clean up after child has exited
        addRepeaterProcList(idCode, pid);
        
        //Close (parents copies of) repeater sockets right away here,
        //so we don't need to close them in cleanUpAfterRepeaterProcExit()
        close(serverSocket);
        close(viewerSocket);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movl %edi, %ebp
callq 0x2070
cmpl $-0x1, %eax
je 0x5011
movl %eax, %r15d
testl %eax, %eax
je 0x5029
leaq 0x7aa5(%rip), %rax      # 0xca40
movslq (%rax), %rax
testq %rax, %rax
jle 0x4fc2
leaq 0x9b96(%rip), %r12      # 0xeb40
xorl %edx, %edx
movq (%r12), %rcx
cmpq $0x0, (%rcx)
je 0x4fd7
incq %rdx
addq $0x8, %r12
cmpq %rdx, %rax
jne 0x4fac
leaq 0x3bf6(%rip), %rsi      # 0x8bbf
movl $0x2, %edi
xorl %eax, %eax
callq 0x352c
jmp 0x4ffb
leaq 0x3ba0(%rip), %rsi      # 0x8b7e
movl $0x3, %edi
movl %r15d, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x352c
movq (%r12), %rax
movq %r14, (%rax)
movl %r15d, 0x8(%rax)
movl %ebp, %edi
callq 0x2360
movl %ebx, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2360
leaq 0x3aeb(%rip), %rsi      # 0x8b03
xorl %edi, %edi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2405
leaq 0x3b0f(%rip), %rsi      # 0x8b3f
movl $0x3, %edi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x352c
movl %ebp, %edi
movl %ebx, %esi
callq 0x538c
movl %eax, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/repeater.cpp
// Function: findServerList(long)
static int findServerList(long code)
{
    int i;

    for (i = 0; i < maxSessions; i++) {
        if (servers[i] -> code == code) {
            debug(LEVEL_3, "findServerList(): server found at index %d, code = %ld\n", i, servers[i] -> code);
            return i;
        }
    }

    debug(LEVEL_2, "findServerList(): server not found (code = %ld)\n", code);
    return UNKNOWN_REPINFO_IND;
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
leaq 0x79e5(%rip), %rax      # 0xca40
movslq (%rax), %rax
testq %rax, %rax
jle 0x5081
leaq 0xba16(%rip), %rdx      # 0x10a80
xorl %ebx, %ebx
movq (%rdx), %rsi
cmpq %rcx, 0x8(%rsi)
je 0x509e
incq %rbx
addq $0x8, %rdx
cmpq %rbx, %rax
jne 0x506c
leaq 0x3bac(%rip), %rsi      # 0x8c34
movl $0x2, %edi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x352c
movl $0xf423f, %ebx          # imm = 0xF423F
jmp 0x50b3
leaq 0x3b57(%rip), %rsi      # 0x8bfc
movl $0x3, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x352c
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/repeater.cpp
// Function: findViewerList(long)
static int findViewerList(long code)
{
    int i;

    for (i = 0; i < maxSessions; i++) {
        if (viewers[i] -> code == code) {
            debug(LEVEL_3, "findViewerList(): viewer found at index %d, code = %ld\n", i, viewers[i] -> code);
            return i;
        }
    }

    debug(LEVEL_2, "findViewerList(): Warning, viewer not found (code = %ld)\n", code);
    return UNKNOWN_REPINFO_IND;
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
leaq 0x797e(%rip), %rax      # 0xca40
movslq (%rax), %rax
testq %rax, %rax
jle 0x50e8
leaq 0xd8ef(%rip), %rdx      # 0x129c0
xorl %ebx, %ebx
movq (%rdx), %rsi
cmpq %rcx, 0x8(%rsi)
je 0x5105
incq %rbx
addq $0x8, %rdx
cmpq %rbx, %rax
jne 0x50d3
leaq 0x3bae(%rip), %rsi      # 0x8c9d
movl $0x2, %edi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x352c
movl $0xf423f, %ebx          # imm = 0xF423F
jmp 0x511a
leaq 0x3b59(%rip), %rsi      # 0x8c65
movl $0x3, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x352c
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/repeater.cpp
// Function: removeViewerList(long)
static void removeViewerList(long code)
{
    int i;

    for (i = 0; i < maxSessions; i++) {
        if (viewers[i] -> code == code) {
            debug(LEVEL_3, "removeViewerList(): Viewer removed from list: code = %ld, index = %d\n", code, i);
            viewers[i] -> code = 0;
            viewers[i] -> active = false;
            return;
        }
    }

    debug(LEVEL_2, "removeViewerList(): Warning, viewer not found (code = %ld)\n", code);
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
leaq 0x777e(%rip), %rax      # 0xca40
movslq (%rax), %rax
testq %rax, %rax
jle 0x52e8
leaq 0xd6ef(%rip), %rbx      # 0x129c0
xorl %ecx, %ecx
movq (%rbx), %rsi
cmpq %rdx, 0x8(%rsi)
je 0x52fc
incq %rcx
addq $0x8, %rbx
cmpq %rcx, %rax
jne 0x52d3
leaq 0x3ac5(%rip), %rsi      # 0x8db4
movl $0x2, %edi
xorl %eax, %eax
popq %rbx
jmp 0x352c
leaq 0x3a6b(%rip), %rsi      # 0x8d6e
movl $0x3, %edi
xorl %eax, %eax
callq 0x352c
movq (%rbx), %rax
movq $0x0, 0x8(%rax)
movb $0x0, 0x28(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/repeater.cpp
// Function: removeServerList(long)
static void removeServerList(long code)
{
    int i;

    for (i = 0; i < maxSessions; i++) {
        if (servers[i] -> code == code) {
            debug(LEVEL_3, "removeServerList(): Server Removed from list: code = %ld, index = %d\n", code, i);
            servers[i] -> code = 0;
            servers[i] -> active = false;
            return;
        }
    }
    debug(LEVEL_2, "removeServerList(): Warning, server not found (code = %ld)\n", code);
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
leaq 0x7715(%rip), %rax      # 0xca40
movslq (%rax), %rax
testq %rax, %rax
jle 0x5351
leaq 0xb746(%rip), %rbx      # 0x10a80
xorl %ecx, %ecx
movq (%rbx), %rsi
cmpq %rdx, 0x8(%rsi)
je 0x5365
incq %rcx
addq $0x8, %rbx
cmpq %rcx, %rax
jne 0x533c
leaq 0x3ade(%rip), %rsi      # 0x8e36
movl $0x2, %edi
xorl %eax, %eax
popq %rbx
jmp 0x352c
leaq 0x3a84(%rip), %rsi      # 0x8df0
movl $0x3, %edi
xorl %eax, %eax
callq 0x352c
movq (%rbx), %rax
movq $0x0, 0x8(%rax)
movb $0x0, 0x28(%rax)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/openbsd_stringfuncs.cpp
// Function: strlcat(char*, char const*, unsigned long)
size_t strlcat(char *dst, const char *src, size_t siz)
{
	char *d = dst;
	const char *s = src;
	size_t n = siz;
	size_t dlen;

	/* Find the end of dst and adjust bytes left but don't go past end */
	while (n-- != 0 && *d != '\0')
		d++;
	dlen = d - dst;
	n = siz - dlen;

	if (n == 0)
		return(dlen + strlen(s));
	while (*s != '\0') {
		if (n != 1) {
			*d++ = *s;
			n--;
		}
		s++;
	}
	*d = '\0';

	return(dlen + (s - src));	/* count does not include NUL */
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
testq %rdx, %rdx
je 0x57b3
leaq (%rdi,%rdx), %rax
movq %rdx, %r8
movq %rdi, %rcx
cmpb $0x0, (%rcx)
je 0x57b3
incq %rcx
decq %r8
jne 0x57a3
movq %rax, %rcx
movq %rcx, %rbx
subq %rdi, %rbx
subq %rbx, %rdx
je 0x57f7
movb (%rsi), %dil
movq %rsi, %rax
testb %dil, %dil
je 0x57ef
movl $0x1, %r8d
cmpq $0x1, %rdx
jne 0x57da
movq %r8, %rdx
jmp 0x57e3
movb %dil, (%rcx)
incq %rcx
decq %rdx
movb 0x1(%rax), %dil
incq %rax
testb %dil, %dil
jne 0x57cf
movb $0x0, (%rcx)
subq %rsi, %rax
jmp 0x57ff
movq %rsi, %rdi
callq 0x20d0
addq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/openbsd_stringfuncs.cpp
// Function: strlcpy(char*, char const*, unsigned long)
size_t strlcpy(char *dst, const char *src, size_t siz)
{
	char *d = dst;
	const char *s = src;
	size_t n = siz;

	/* Copy as many bytes as will fit */
	if (n != 0 && --n != 0) {
		do {
			if ((*d++ = *s++) == 0)
				break;
		} while (--n != 0);
	}

	/* Not enough room in dst, add NUL and traverse rest of src */
	if (n == 0) {
		if (siz != 0)
			*d = '\0';		/* NUL-terminate dst */
		while (*s++)
			;
	}

	return(s - src - 1);	/* count does not include NUL */
}

// Assembly:
movq %rsi, %rax
cmpq $0x2, %rdx
jae 0x5812
movq %rax, %rcx
jmp 0x582f
leaq -0x1(%rdx), %rsi
movq %rax, %rcx
movb (%rcx), %r8b
incq %rcx
movb %r8b, (%rdi)
testb %r8b, %r8b
je 0x5845
incq %rdi
decq %rsi
jne 0x5819
testq %rdx, %rdx
je 0x5837
movb $0x0, (%rdi)
leaq 0x1(%rcx), %rdx
cmpb $0x0, (%rcx)
movq %rdx, %rcx
jne 0x5837
jmp 0x5848
movq %rcx, %rdx
notq %rax
addq %rdx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_getnsec
int iniparser_getnsec(dictionary * d)
{
    int i ;
    int nsec ;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5893
movslq 0x4(%rdi), %r14
testq %r14, %r14
jle 0x589a
movq 0x10(%rdi), %r15
xorl %r12d, %r12d
xorl %ebx, %ebx
movq (%r15,%r12,8), %rdi
testq %rdi, %rdi
je 0x5889
movl $0x3a, %esi
callq 0x20b0
cmpq $0x1, %rax
adcl $0x0, %ebx
incq %r12
cmpq %r12, %r14
jne 0x586f
jmp 0x589c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x589c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdi, %rdi
sete %cl
testl %esi, %esi
sets %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x5935
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x4(%rdi), %r15d
testl %r15d, %r15d
jle 0x5915
movq 0x10(%rbx), %r12
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%r12,%r14,8), %rdi
testq %rdi, %rdi
je 0x5902
movl $0x3a, %esi
callq 0x20b0
testq %rax, %rax
jne 0x5902
leal 0x1(%r13), %eax
cmpl %ebp, %r13d
jge 0x5910
movl %eax, %r13d
incq %r14
cmpq %r14, %r15
jne 0x58de
movl %r15d, %r14d
movl %r13d, %eax
movl %r14d, %ecx
jmp 0x5917
xorl %ecx, %ecx
cmpl %ebp, %eax
jle 0x5925
movq 0x10(%rbx), %rax
movq (%rax,%rcx,8), %rax
jmp 0x5927
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x59b4
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
cmpl $0x0, 0x4(%rdi)
jle 0x59ab
movq %rsi, %rbx
leaq 0x39d5(%rip), %r15      # 0x9337
leaq 0x39c3(%rip), %r12      # 0x932c
xorl %r13d, %r13d
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rdx
testq %rdx, %rdx
je 0x599f
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rcx
movq %rbx, %rdi
testq %rcx, %rcx
je 0x5995
movq %r12, %rsi
xorl %eax, %eax
callq 0x22c0
jmp 0x599f
movq %r15, %rsi
xorl %eax, %eax
callq 0x22c0
incq %r13
movslq 0x4(%r14), %rax
cmpq %rax, %r13
jl 0x596c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x59ec
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r14
callq 0x5850
movl %eax, 0x8(%rsp)
testl %eax, %eax
jle 0x5af0
xorl %esi, %esi
movq %r14, %rdi
movl %esi, 0xc(%rsp)
callq 0x58aa
movq %rax, %rbp
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
movq (%rsp), %rdi
leaq 0x38b2(%rip), %rsi      # 0x92d9
movq %rbp, %rdx
xorl %eax, %eax
callq 0x22c0
movl $0x401, %esi            # imm = 0x401
leaq 0x10(%rsp), %rdi
leaq 0x389e(%rip), %rdx      # 0x92e0
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2310
movl 0x4(%r14), %r12d
testl %r12d, %r12d
jle 0x5ac1
leal 0x1(%r15), %eax
movslq %eax, %rbp
movslq %r15d, %rbx
xorl %r13d, %r13d
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %r15
testq %r15, %r15
je 0x5ab6
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x20f0
testl %eax, %eax
jne 0x5ab6
leaq (%r15,%rbx), %rdx
incq %rdx
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rcx
testq %rcx, %rcx
leaq 0x2b3e(%rip), %rax      # 0x85da
cmoveq %rax, %rcx
movq (%rsp), %rdi
leaq 0x3839(%rip), %rsi      # 0x92e4
xorl %eax, %eax
callq 0x22c0
movl 0x4(%r14), %r12d
incq %r13
movslq %r12d, %rax
cmpq %rax, %r13
jl 0x5a62
movl 0xc(%rsp), %esi
incl %esi
cmpl 0x8(%rsp), %esi
jne 0x5a02
movl $0xa, %edi
movq (%rsp), %rsi
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x59da
leaq 0x37cd(%rip), %r15      # 0x92d0
xorl %ebx, %ebx
movq 0x10(%r14), %rcx
movq (%rcx,%rbx,8), %rdx
testq %rdx, %rdx
je 0x5b2c
movq 0x8(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq (%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22c0
movl 0x4(%r14), %eax
incq %rbx
movslq %eax, %rcx
cmpq %rcx, %rbx
jl 0x5b05
jmp 0x59da
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5bd2
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5be4
movq %rax, %rdi
callq 0x2340
movq %rax, %r15
movq %rax, %rdi
callq 0x6347
movslq 0x4(%r14), %r12
testq %r12, %r12
jle 0x5bca
movl %eax, %ebp
movq %rbx, (%rsp)
movq 0x10(%r14), %rbx
xorl %r13d, %r13d
testq %rbx, %rbx
je 0x5bb4
movq 0x18(%r14), %rax
cmpl (%rax,%r13,4), %ebp
jne 0x5bb4
movq (%rbx,%r13,8), %rsi
movq %r15, %rdi
callq 0x22a0
testl %eax, %eax
je 0x5bc2
incq %r13
cmpq %r13, %r12
jne 0x5b95
movq (%rsp), %rbx
jmp 0x5bca
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rbx
movq %r15, %rdi
callq 0x2240
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_O3/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 0x5c3b
movq %rdi, %r14
leaq 0xed08(%rip), %rbx      # 0x14900
movl $0x401, %edx            # imm = 0x401
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
movb (%r14), %al
testb %al, %al
je 0x5c32
xorl %r15d, %r15d
movsbl %al, %edi
callq 0x22d0
movb %al, (%r15,%rbx)
cmpq $0x3fe, %r15            # imm = 0x3FE
ja 0x5c32
movb 0x1(%r14,%r15), %al
incq %r15
testb %al, %al
jne 0x5c11
movb $0x0, 0xf0c7(%rip)      # 0x14d00
jmp 0x5c3d
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq $-0x1, %rdx
callq 0x5b43
cmpq $-0x1, %rax
je 0x5ce3
movzbl (%rax), %ecx
movl $0x1, %eax
leal -0x30(%rcx), %edx
cmpl $0x3e, %edx
ja 0x5cd9
movabsq $0x4040000040400001, %rsi # imm = 0x4040000040400001
btq %rdx, %rsi
jae 0x5cc9
xorl %eax, %eax
jmp 0x5ce5
movabsq $0x21000000002, %rsi    # imm = 0x21000000002
btq %rdx, %rsi
jb 0x5ce5
cmpl $0x74, %ecx
je 0x5ce5
cmpl $0x79, %ecx
je 0x5ce5
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x62cc
movq %rdi, %r14
leaq 0xea91(%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 0x5804
movq %rbx, %rdi
callq 0x20d0
movq %rax, %r14
addq %rbx, %r14
movq %r14, %r15
cmpq %rbx, %r14
jbe 0x62c6
leaq -0x1(%r15), %r14
movsbl -0x1(%r15), %edi
callq 0x2040
testl %eax, %eax
jne 0x62ac
movb $0x0, (%r15)
jmp 0x62ce
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6346
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jle 0x631c
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x62fe
callq 0x2240
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x6310
callq 0x2240
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x62ec
movq 0x8(%rbx), %rdi
callq 0x2240
movq 0x10(%rbx), %rdi
callq 0x2240
movq 0x18(%rbx), %rdi
callq 0x2240
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
testl %eax, %eax
jle 0x637e
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
xorl %edx, %edx
movsbl (%rbx,%rcx), %esi
addl %edx, %esi
movl %esi, %edi
shll $0xa, %edi
addl %esi, %edi
movl %edi, %edx
shrl $0x6, %edx
xorl %edi, %edx
incq %rcx
cmpq %rcx, %rax
jne 0x635d
leal (%rdx,%rdx,8), %eax
jmp 0x6380
xorl %eax, %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xf, %eax
addl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rsi
movaps 0x2e14(%rip), %xmm0     # 0x9500
movaps %xmm0, (%rsp)
leaq 0x10(%rsp), %rbx
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
callq 0x5804
leaq 0x2e07(%rip), %rsi      # 0x9510
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
callq 0x5790
xorl %r15d, %r15d
movl $0xff, %r12d
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x20b0
testq %rax, %rax
je 0x6759
movq %rax, %r14
movb $0x0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x22b0
cmpq %r12, %rax
cmovaeq %r12, %rax
movl %eax, (%rsp,%r15,4)
incq %r14
movq %r14, %rbx
jmp 0x6761
movl $0xff, (%rsp,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0x671f
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d504(%rip), %edi     # 0x23d40
testl %edi, %edi
je 0x6871
xorl %esi, %esi
movl $0x1, %edx
callq 0x2180
testl %eax, %eax
jle 0x68a2
leaq 0x2f64(%rip), %rsi      # 0x97bb
movl $0x3, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x352c
movl $0x0, 0x1d4d1(%rip)     # 0x23d40
jmp 0x68a2
cmpl $0x0, 0xea60(%rip)      # 0x152d8
je 0x68a2
callq 0x2070
cmpl $-0x1, %eax
je 0x68a4
testl %eax, %eax
je 0x68b5
movl %eax, 0x1d4b2(%rip)     # 0x23d40
xorl %eax, %eax
movl %eax, 0xea3a(%rip)      # 0x152d0
movl %eax, 0xea38(%rip)      # 0x152d4
movl %eax, 0xea36(%rip)      # 0x152d8
popq %rax
retq
leaq 0x2c67(%rip), %rsi      # 0x9512
xorl %edi, %edi
xorl %eax, %eax
popq %rcx
jmp 0x2405
leaq 0x2c99(%rip), %rsi      # 0x9555
movl $0x3, %edi
xorl %eax, %eax
callq 0x352c
callq 0x68d4
xorl %edi, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/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 0x51d0
callq 0xfe78
movl %eax, %ebp
movq 0x13f50(%rip), %rbx     # 0x18fd0
leaq 0xdfda(%rip), %rsi      # 0x13061
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2280
movq 0x13f35(%rip), %rdi     # 0x18fd0
testb %bpl, %bpl
je 0x50ae
leaq 0xdfce(%rip), %rsi      # 0x13075
movl $0x8, %edx
jmp 0x50ba
leaq 0xdfc9(%rip), %rsi      # 0x1307e
movl $0x7, %edx
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
callq 0x7794
leaq 0xdf94(%rip), %rsi      # 0x13086
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
callq 0x4f8c
leaq 0xdf68(%rip), %rsi      # 0x1309a
movl $0x21, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x651f
movq (%rbx), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x22e0
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x6503
movq 0x8(%rbx), %r15
jmp 0x6522
xorl %r15d, %r15d
leaq 0x1301f(%rip), %r12     # 0x19548
xorl %r14d, %r14d
cmpq (%r12), %r15
jne 0x654b
testq %r15, %r15
je 0x655e
movq -0x8(%r12), %rsi
movq (%rbx), %rdi
movq %r15, %rdx
callq 0x2240
testl %eax, %eax
je 0x655e
incq %r14
addq $0x20, %r12
cmpq $0x18, %r14
jne 0x652c
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xb17fe(%rip), %r14     # 0xb90c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
movq %rsp, %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x0, (%rbx)
jle 0x7a0e
movslq 0x4(%rbx), %rdi
imulq $0xa8, %rdi, %rax
cmpl $0x5, 0x5c(%r14,%rax)
jne 0x7a0e
callq 0x91db
movl 0x8(%rbx), %edi
callq 0x93cd
movslq 0xabc3b(%rip), %rdi     # 0xb35b0
leal 0x1(%rdi), %eax
movl %eax, 0xabc32(%rip)     # 0xb35b0
shlq $0x5, %rdi
leaq 0xaafa7(%rip), %r14     # 0xb2930
addq %r14, %rdi
leaq 0xbcb7(%rip), %rsi      # 0x1364a
callq 0x23d0
movslq 0xabc11(%rip), %rdi     # 0xb35b0
leal 0x1(%rdi), %eax
movl %eax, 0xabc08(%rip)     # 0xb35b0
shlq $0x5, %rdi
addq %r14, %rdi
leaq 0xbcf2(%rip), %rsi      # 0x136a8
callq 0x23d0
movl 0xc(%rbx), %edi
callq 0x9447
movslq 0xabbe6(%rip), %rdi     # 0xb35b0
leal 0x1(%rdi), %eax
movl %eax, 0xabbdd(%rip)     # 0xb35b0
shlq $0x5, %rdi
addq %r14, %rdi
leaq 0xbc75(%rip), %rsi      # 0x13656
callq 0x23d0
movslq 0xabbc3(%rip), %rax     # 0xb35b0
leal 0x1(%rax), %ecx
movl %ecx, 0xabbba(%rip)     # 0xb35b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0xbc5d(%rip), %rsi      # 0x13661
movq %r14, %rdi
callq 0x23d0
jmp 0x7a54
movq 0x115bb(%rip), %rbx     # 0x18fd0
leaq 0xbc48(%rip), %rsi      # 0x13664
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0x11589(%rip), %rdi     # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x7a71
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x7a88
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x7abe
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x7abe
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x50, %rsp
movl %esi, %ebx
movl %edi, %ebp
callq 0x8b17
cmpl $0x1, %eax
jne 0x819a
movq 0x10e7d(%rip), %rbx     # 0x18fd0
leaq 0xbb32(%rip), %rsi      # 0x13c8c
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2150
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movq %rax, 0x30(%r14)
movslq %ebp, %rax
imulq $0xa8, %rax, %r15
leaq 0xb0efe(%rip), %r12     # 0xb90c8
leaq (%r12,%r15), %rsi
addq $0x88, %rsi
movq %rsp, %rdi
callq 0x2110
leaq (%r12,%r15), %rax
addq $0x8, %rax
movl %ebx, 0x20(%rsp)
movl 0xaa73d(%rip), %ecx     # 0xb292c
movl %ecx, 0x24(%rsp)
movl 0xa4(%rax), %eax
movl %eax, 0x28(%rsp)
cmpl $0x1, 0xaa724(%rip)     # 0xb2928
jne 0x8218
movl $0x1, 0x48(%rsp)
movl $0x0, 0xaa714(%rip)     # 0xb292c
leaq 0xaa6a1(%rip), %rdi     # 0xb28c0
movq %rsp, %rsi
callq 0xf42c
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x823e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8254
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf456
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xafecb(%rip), %rbp     # 0xb90c8
leaq (%rax,%rbp), %rbx
addq $0x8, %rbx
leaq 0x8(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0xa8(%rsp)
leaq 0x120(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x140(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
cmpl $0x0, (%rbx)
jle 0x92c9
movslq 0x4(%rbx), %rax
imulq $0xa8, %rax, %rax
movl 0x5c(%rbp,%rax), %eax
cmpl $0x6a, %eax
je 0x930f
cmpl $0x6b, %eax
jne 0x92c9
movl 0x8(%rbx), %edi
callq 0x9601
jmp 0x930f
movq 0xfd00(%rip), %rbx      # 0x18fd0
leaq 0xa400(%rip), %rsi      # 0x136d7
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xfcce(%rip), %rdi      # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0x932c
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x9349
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x9366
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x937d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x93c5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x93c5
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xf396
leaq 0x8(%rsp), %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xafc62(%rip), %r14     # 0xb90c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
movq %rsp, %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x0, (%rbx)
jle 0x9549
movslq 0x4(%rbx), %rax
imulq $0xa8, %rax, %rax
cmpl $0x79, 0x5c(%r14,%rax)
jne 0x9549
movslq 0xaa0b4(%rip), %rdi     # 0xb35b0
shlq $0x5, %rdi
leaq 0xa9429(%rip), %r14     # 0xb2930
addq %r14, %rdi
leaq 0xa143(%rip), %rsi      # 0x13654
callq 0x23d0
incl 0xaa094(%rip)           # 0xb35b0
movl 0x8(%rbx), %edi
callq 0xb350
movslq 0xaa085(%rip), %rax     # 0xb35b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0xa11b(%rip), %rsi      # 0x13654
movq %r14, %rdi
callq 0x23d0
incl 0xaa069(%rip)           # 0xb35b0
jmp 0x958f
movq 0xfa80(%rip), %rbx      # 0x18fd0
leaq 0xa274(%rip), %rsi      # 0x137cb
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xfa4e(%rip), %rdi      # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x95ac
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x95c3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x95f9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x95f9
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xafaa7(%rip), %r14     # 0xb90c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
leaq 0x8(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0xa8(%rsp)
cmpl $0x0, (%rbx)
jle 0x971c
movslq 0x4(%rbx), %rax
imulq $0xa8, %rax, %rax
cmpl $0x2, 0x5c(%r14,%rax)
jne 0x971c
movl 0xc(%rbx), %edi
callq 0x97d9
movl %eax, %ebp
movslq 0xa9eed(%rip), %rdi     # 0xb35b0
shlq $0x5, %rdi
leaq 0xa9262(%rip), %r14     # 0xb2930
addq %r14, %rdi
leaq 0x9eb9(%rip), %rsi      # 0x13591
callq 0x23d0
movl 0x4(%rbx), %esi
movl %ebp, %edi
movl $0x1, %edx
callq 0x7ac6
movslq 0xa9ebd(%rip), %rax     # 0xb35b0
leal 0x1(%rax), %ecx
movl %ecx, 0xa9eb4(%rip)     # 0xb35b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0xa39a(%rip), %rsi      # 0x13aa4
movq %r14, %rdi
callq 0x23d0
movl 0x14(%rbx), %edi
callq 0x9cfa
jmp 0x9762
movq 0xf8ad(%rip), %rbx      # 0x18fd0
leaq 0x9fec(%rip), %rsi      # 0x13716
movl $0x12, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xf87b(%rip), %rdi      # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x977f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x9796
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x97d1
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x97d1
jmp 0x97c4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xaf003(%rip), %rbp     # 0xb90c8
leaq (%rax,%rbp), %rbx
addq $0x8, %rbx
leaq 0x8(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0xa8(%rsp)
leaq 0x120(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x140(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
cmpl $0x0, (%rbx)
jle 0xa19c
movslq 0x4(%rbx), %rdi
imulq $0xa8, %rdi, %rax
movl 0x5c(%rbp,%rax), %eax
cmpl $0x6a, %eax
je 0xa1e2
cmpl $0xc, %eax
jne 0xa19c
callq 0xa2a0
incl 0xa941e(%rip)           # 0xb35b0
movl 0xc(%rbx), %edi
callq 0xa0a3
jmp 0xa1e2
movq 0xee2d(%rip), %rbx      # 0x18fd0
leaq 0x9541(%rip), %rsi      # 0x136eb
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xedfb(%rip), %rdi      # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0xa1ff
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0xa21c
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0xa239
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0xa250
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0xa298
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0xa298
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xf396
leaq 0x8(%rsp), %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xaee09(%rip), %r14     # 0xb90c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
movq %rsp, %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x0, (%rbx)
jle 0xa3f6
movslq 0x4(%rbx), %rdi
imulq $0xa8, %rdi, %rax
cmpl $0xd, 0x5c(%r14,%rax)
jne 0xa3f6
callq 0xa4ae
movslq 0xa924e(%rip), %rdi     # 0xb35b0
leal 0x1(%rdi), %eax
movl %eax, 0xa9245(%rip)     # 0xb35b0
shlq $0x5, %rdi
leaq 0xa85ba(%rip), %r14     # 0xb2930
addq %r14, %rdi
leaq 0x9328(%rip), %rsi      # 0x136a8
callq 0x23d0
movl 0x8(%rbx), %edi
callq 0x91db
movl 0xc(%rbx), %edi
callq 0x9447
movslq 0xa9214(%rip), %rax     # 0xb35b0
leal 0x1(%rax), %ecx
movl %ecx, 0xa920b(%rip)     # 0xb35b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0x92ae(%rip), %rsi      # 0x13661
movq %r14, %rdi
callq 0x23d0
leaq 0xa8546(%rip), %rdi     # 0xb2908
leaq 0x9187(%rip), %rsi      # 0x13550
callq 0x2090
testl %eax, %eax
je 0xa43c
movq 0xa8537(%rip), %rdx     # 0xb2910
leaq 0xa8528(%rip), %rdi     # 0xb2908
leaq 0x9169(%rip), %rcx      # 0x13550
movl $0x4, %r8d
xorl %esi, %esi
callq 0x2330
jmp 0xa43c
movq 0xebd3(%rip), %rbx      # 0x18fd0
leaq 0x9307(%rip), %rsi      # 0x1370b
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xeba1(%rip), %rdi      # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0xa459
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0xa470
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0xa4a6
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0xa4a6
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%r15)
movaps %xmm0, -0x30(%r15)
movaps %xmm0, -0x40(%r15)
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rbx, %rsi
callq 0x2110
movq %rsp, %rsi
movl %r14d, 0x54(%rsi)
movl %ebp, 0x58(%rsi)
movb $0x1, 0x50(%rsi)
leaq 0xa7cbe(%rip), %rdi     # 0xb28d8
callq 0xf3d4
leaq 0xa7ce2(%rip), %rdi     # 0xb2908
movq %rbx, %rsi
callq 0x2110
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0xac45
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x18(%rsp), %rdi
callq 0xf31e
movq %rsp, %rdi
callq 0xf31e
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf3fe
movq %rbx, %rdi
callq 0x23a0