// File: /workspace/github_cpp_makefile_star2_O1/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 $0x198, %rsp            # imm = 0x198
movl %edx, %ebp
movl %edi, 0x4(%rsp)
movslq %esi, %rax
imulq $0xa8, %rax, %rax
leaq 0xb1ba5(%rip), %r14     # 0xba0c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
leaq 0xf0(%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 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x768e
leaq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x768e
movq 0xa0(%rbx), %rax
movq %rax, 0x190(%rsp)
leaq 0xb8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movl (%rbx), %eax
testl %eax, %eax
jle 0x869b
movslq 0x4(%rbx), %rcx
imulq $0xa8, %rcx, %rcx
cmpl $0x69, 0x5c(%r14,%rcx)
jne 0x8680
movl 0x8(%rbx), %r13d
cmpl $0x3, %ebp
je 0x87f5
cmpl $0x2, %ebp
je 0x86e6
cmpl $0x1, %ebp
jne 0x89ae
leaq 0xab2f3(%rip), %rdi     # 0xb3908
leaq 0xbf04(%rip), %rsi      # 0x14520
callq 0x2090
testl %eax, %eax
je 0x88e4
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xab2cf(%rip), %rsi     # 0xb3908
movq 0xab2d0(%rip), %rdx     # 0xb3910
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x768e
leaq 0x28(%rsp), %rdx
movl %r13d, %edi
movl 0x4(%rsp), %esi
xorl %ecx, %ecx
callq 0x8278
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x88f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x88f0
testl %eax, %eax
jle 0x869b
movslq 0x4(%rbx), %rax
imulq $0xa8, %rax, %rax
cmpl $0x6a, 0x5c(%r14,%rax)
je 0x89ae
movq 0x1192e(%rip), %rbx     # 0x19fd0
leaq 0xbf59(%rip), %rsi      # 0x14602
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 0x118fc(%rip), %rdi     # 0x19fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
jmp 0x89ae
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xab212(%rip), %rsi     # 0xb3908
movq 0xab213(%rip), %rdx     # 0xb3910
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x768e
leaq 0x8(%rsp), %rdx
movl %r13d, %edi
movl 0x4(%rsp), %esi
movl $0x1, %ecx
callq 0x8278
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8737
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
movslq 0xabe72(%rip), %rdi     # 0xb45b0
shlq $0x5, %rdi
leaq 0xab1e7(%rip), %r13     # 0xb3930
addq %r13, %rdi
leaq 0xc31e(%rip), %rsi      # 0x14a71
callq 0x23d0
movl 0x4(%rsp), %edi
callq 0x9279
movslq 0xf8(%rsp), %rax
imulq $0xa8, %rax, %rdx
leaq (%r14,%rdx), %r15
addq $0x8, %r15
leaq 0x48(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%r15), %cl
movb %cl, 0x58(%rax)
leaq (%r14,%rdx), %rsi
addq $0x68, %rsi
leaq 0xa8(%rsp), %rdi
callq 0x2110
leaq 0x80(%r15), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2110
movq 0xa0(%r15), %rax
movq %rax, 0xe8(%rsp)
movslq 0xabddf(%rip), %rax     # 0xb45b0
shlq $0x5, %rax
addq %rax, %r13
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq %r13, %rdi
callq 0x20a0
jmp 0x89a0
movl %r13d, %edi
callq 0x8b17
testl %eax, %eax
je 0x8a4c
movl %r13d, %edi
callq 0x8edc
movl %eax, %edi
callq 0x9244
movslq 0xf8(%rsp), %rax
imulq $0xa8, %rax, %rdx
leaq (%r14,%rdx), %r15
addq $0x8, %r15
leaq 0x48(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%r15), %cl
movb %cl, 0x58(%rax)
leaq (%r14,%rdx), %rsi
addq $0x68, %rsi
leaq 0xa8(%rsp), %rdi
callq 0x2110
leaq 0x80(%r15), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2110
movq 0xa0(%r15), %rax
movq %rax, 0xe8(%rsp)
movslq 0xabd2c(%rip), %rdi     # 0xb45b0
shlq $0x5, %rdi
leaq 0xab0a1(%rip), %r14     # 0xb3930
addq %r14, %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x20a0
movslq 0xabd02(%rip), %rax     # 0xb45b0
leal 0x1(%rax), %ecx
movl %ecx, 0xabcf9(%rip)     # 0xb45b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0xbc99(%rip), %rsi      # 0x1455e
movq %r14, %rdi
callq 0x23d0
movl 0xc(%rbx), %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x3, %edx
callq 0x84fb
jmp 0x89ae
movl %r13d, %edi
movl 0x4(%rsp), %esi
callq 0x8136
movslq 0xabcb9(%rip), %rdi     # 0xb45b0
shlq $0x5, %rdi
leaq 0xab02e(%rip), %r13     # 0xb3930
addq %r13, %rdi
leaq 0xc165(%rip), %rsi      # 0x14a71
callq 0x23d0
movslq 0xf8(%rsp), %rax
imulq $0xa8, %rax, %rdx
leaq (%r14,%rdx), %r15
addq $0x8, %r15
leaq 0x48(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%r15), %cl
movb %cl, 0x58(%rax)
leaq (%r14,%rdx), %rsi
addq $0x68, %rsi
leaq 0xa8(%rsp), %rdi
callq 0x2110
leaq 0x80(%r15), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2110
movq 0xa0(%r15), %rax
movq %rax, 0xe8(%rsp)
movslq 0xabc2f(%rip), %rax     # 0xb45b0
shlq $0x5, %rax
addq %rax, %r13
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq %r13, %rdi
callq 0x20a0
movl 0xc(%rbx), %esi
movl 0x4(%rsp), %edi
movl %ebp, %edx
callq 0x84fb
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89cb
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x89f0
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x8a15
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x8a3a
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1157d(%rip), %rbx     # 0x19fd0
leaq 0xbb7b(%rip), %rsi      # 0x145d5
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 0x1154b(%rip), %rdi     # 0x19fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
jmp 0x89ae
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x8af8
movq 0x38(%rsp), %rsi
jmp 0x8abd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8af8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x8af8
jmp 0x8af5
movq %rax, %rbx
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x8b0f
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x8b0f
jmp 0x8af5
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xf7a8
leaq 0xf0(%rsp), %rdi
callq 0xf7a8
movq %rbx, %rdi
callq 0x23a0