// File: /workspace/github_cpp_makefile_star2_O3/zhengwangsun[P]pas2c/semantics.cpp
// Function: identifier_list1(int, int, int)
void identifier_list1(int type, int k, int useFlag)
{
    TreeNode tNode= tree.node[k];
	TreeNode childNode;
	if (lookahead(k) == 105)//105是,
    {
        int id_position = tree.node[k].child[1];//将id节点在树中的下标值赋给id_position
        if (useFlag == 1)
        {
            //判断放入主符号表还是子符号表
            if(currentTable == "main")
                enterMain(id_position, type);
            else
                enterSub(id_position, type, currentTable, 0);//是子程序内定义的标识符
                
            code[currentLine].append(",");
			childNode=tree.node[tNode.child[1]];
			code[currentLine].append(childNode.value);
            identifier_list1(type, tree.node[k].child[2], 1);
        }
        else if (useFlag == 2)
        {
            enterSub(id_position, type, currentTable, 1);//是子程序参数标识符
            
            code[currentLine].append(",");
			appendIDType(type);
			childNode=tree.node[tNode.child[1]];
			code[currentLine].append(childNode.value);
            identifier_list1(type, tree.node[k].child[2], 2);
        }
        else if (useFlag == 3)
        {
            if(isDefined(id_position) != 0)//查看是否声明
             {
                int idType = checkIdType(id_position);
             	addReadType(idType);
            	childNode=tree.node[tNode.child[1]];
				code[currentLine].append(childNode.value);
				code[currentLine++].append(");\n ");
				identifier_list1(-1, tree.node[k].child[2], 3);
        	 	
			 }
        	 
			else
                cout<<"the id is not defined where identifier_list1"<<endl;
        }
    }
    else if (lookahead(k) == 106)//e
    {}
    else
        cout<<"identifier_list1 error!"<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %ebp
movl %edi, 0xc(%rsp)
movslq %esi, %rax
imulq $0xa8, %rax, %rax
leaq 0xb0bbc(%rip), %r14     # 0xb90c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
leaq 0x100(%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 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
leaq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x7666
movq 0xa0(%rbx), %rax
movq %rax, 0x1a0(%rsp)
leaq 0xc8(%rsp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0xe8(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
cmpl $0x0, (%rbx)
jle 0x8679
movslq 0x4(%rbx), %rax
imulq $0xa8, %rax, %rax
movl 0x5c(%r14,%rax), %eax
cmpl $0x6a, %eax
je 0x86bf
cmpl $0x69, %eax
jne 0x8679
movl 0x8(%rbx), %r13d
cmpl $0x3, %ebp
je 0x8839
cmpl $0x2, %ebp
je 0x8755
cmpl $0x1, %ebp
jne 0x86bf
leaq 0xaa2ff(%rip), %rdi     # 0xb2908
leaq 0xaf40(%rip), %rsi      # 0x13550
callq 0x2090
testl %eax, %eax
je 0x886f
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xaa2db(%rip), %rsi     # 0xb2908
movq 0xaa2dc(%rip), %rdx     # 0xb2910
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x7666
leaq 0x38(%rsp), %rdx
movl %r13d, %edi
movl 0xc(%rsp), %esi
xorl %ecx, %ecx
callq 0x8274
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x887b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x887b
movq 0x10950(%rip), %rbx     # 0x18fd0
leaq 0xafab(%rip), %rsi      # 0x13632
movl $0x17, %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 0x1091e(%rip), %rdi     # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x86dc
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x86f9
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x871e
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x8743
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xaa1a3(%rip), %rsi     # 0xb2908
movq 0xaa1a4(%rip), %rdx     # 0xb2910
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0x7666
leaq 0x18(%rsp), %rdx
movl %r13d, %edi
movl 0xc(%rsp), %esi
movl $0x1, %ecx
callq 0x8274
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x87ab
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2230
movslq 0xaadfe(%rip), %rax     # 0xb35b0
shlq $0x5, %rax
leaq 0xaa173(%rip), %rdi     # 0xb2930
addq %rax, %rdi
leaq 0xb2da(%rip), %rsi      # 0x13aa1
callq 0x23d0
movl 0xc(%rsp), %edi
callq 0x91a9
movslq 0x108(%rsp), %rax
movq %rax, 0x10(%rsp)
imulq $0xa8, %rax, %rdx
leaq (%r14,%rdx), %r13
addq $0x8, %r13
leaq 0x58(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%r13), %cl
movb %cl, 0x58(%rax)
leaq (%r14,%rdx), %rsi
addq $0x68, %rsi
leaq 0xb8(%rsp), %rdi
callq 0x2110
subq $-0x80, %r13
leaq 0xd8(%rsp), %rdi
movq %r13, %rsi
callq 0x2110
jmp 0x88fb
movl %r13d, %edi
callq 0x8b17
testl %eax, %eax
je 0x8951
movl %r13d, %edi
callq 0x8ea2
cmpl $0x1, %eax
je 0x899c
cmpl $0x2, %eax
jne 0x89bd
leaq 0xad8e(%rip), %rsi      # 0x135f8
jmp 0x89a3
movl %r13d, %edi
movl 0xc(%rsp), %esi
callq 0x8132
movslq 0xaad2e(%rip), %rax     # 0xb35b0
shlq $0x5, %rax
leaq 0xaa0a3(%rip), %rdi     # 0xb2930
addq %rax, %rdi
leaq 0xb20a(%rip), %rsi      # 0x13aa1
callq 0x23d0
movslq 0x108(%rsp), %rax
movq %rax, 0x10(%rsp)
imulq $0xa8, %rax, %rdx
leaq (%r14,%rdx), %r13
addq $0x8, %r13
leaq 0x58(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%r13), %cl
movb %cl, 0x58(%rax)
leaq (%r14,%rdx), %rsi
addq $0x68, %rsi
leaq 0xb8(%rsp), %rdi
callq 0x2110
subq $-0x80, %r13
leaq 0xd8(%rsp), %rdi
movq %r13, %rsi
callq 0x2110
imulq $0xa8, 0x10(%rsp), %rax
movq 0xa8(%r14,%rax), %rax
movq %rax, 0xf8(%rsp)
movslq 0xaac95(%rip), %rax     # 0xb35b0
shlq $0x5, %rax
leaq 0xaa00a(%rip), %rdi     # 0xb2930
addq %rax, %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x20a0
movl 0xc(%rbx), %esi
movl 0xc(%rsp), %edi
movl %ebp, %edx
callq 0x84e4
jmp 0x86bf
movq 0x10678(%rip), %rbx     # 0x18fd0
leaq 0xaca6(%rip), %rsi      # 0x13605
movl $0x2c, %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 0x10646(%rip), %rdi     # 0x18fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
jmp 0x86bf
leaq 0xac48(%rip), %rsi      # 0x135eb
movslq 0xaac06(%rip), %rax     # 0xb35b0
shlq $0x5, %rax
leaq 0xa9f7b(%rip), %rdi     # 0xb2930
addq %rax, %rdi
callq 0x23d0
movslq 0x108(%rsp), %rax
imulq $0xa8, %rax, %rdx
leaq (%r14,%rdx), %r13
addq $0x8, %r13
leaq 0x58(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%r13), %cl
movb %cl, 0x58(%rax)
leaq (%r14,%rdx), %rsi
addq $0x68, %rsi
leaq 0xb8(%rsp), %rdi
callq 0x2110
leaq 0x80(%r13), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x2110
movq 0xa0(%r13), %rax
movq %rax, 0xf8(%rsp)
movslq 0xaab83(%rip), %rdi     # 0xb35b0
shlq $0x5, %rdi
leaq 0xa9ef8(%rip), %r14     # 0xb2930
addq %r14, %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x20a0
movslq 0xaab59(%rip), %rax     # 0xb35b0
leal 0x1(%rax), %ecx
movl %ecx, 0xaab50(%rip)     # 0xb35b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0xab20(%rip), %rsi      # 0x1358e
movq %r14, %rdi
callq 0x23d0
movl 0xc(%rbx), %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x3, %edx
callq 0x84e4
jmp 0x86bf
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x8af8
movq 0x48(%rsp), %rsi
jmp 0x8abd
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x8af8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x8af8
jmp 0x8af5
jmp 0x8af5
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x8b0f
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x8b0f
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xf396
leaq 0x100(%rsp), %rdi
callq 0xf396
movq %rbx, %rdi
callq 0x23a0