// File: /workspace/github_cpp_makefile_star2_O2/sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_param[abi:cxx11](pl0_ast_param_list const*)
vector<string> pl0_tac_param(pl0_ast_param_list const *param) {
    cout << __func__;
    // set up new flag, new scope.
    valtb.tag(); vartb.tag();
    
    if (!param) { return vector<string>(); } // no parameter.
    vector<string> type;
    for (auto && group: param->params) {
        for (auto && id: group->ids) {
            // validte.
            if (vartb.find(id->id, false) || id->id == scope.back()) {
                pl0_ast_error(id->loc, string("duplicate parameter ") + id->id);
            }
            vartb.push(variable(id->id, group->type->type, group->type->type)); // add parameters to symbol table.
            if (group->is_ref) {
                type.emplace_back(string("ref_") + group->type->type);
                irb.emit("paramref", new Value(id->id, group->type->type), new Value(group->type->type, "string"));
            }
            else {
                type.emplace_back(group->type->type);
                irb.emit("param", new Value(id->id, group->type->type), new Value(group->type->type, "string"));
            }
        }
    }
    return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4b81b(%rip), %rdi     # 0x8afd8
leaq 0x1bd7b(%rip), %rsi     # 0x5b53f
callq 0x5250
leaq 0x4ce78(%rip), %rdi     # 0x8c648
callq 0x46b0c
leaq 0x4ce3c(%rip), %rdi     # 0x8c618
callq 0x46b2e
xorps %xmm0, %xmm0
testq %r14, %r14
je 0x3fc38
andq $0x0, 0x10(%rbx)
movq %rbx, 0x10(%rsp)
movups %xmm0, (%rbx)
movq 0x8(%r14), %rbx
movq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x4ce0a(%rip), %r13     # 0x8c618
leaq 0x210(%rsp), %r12
cmpq 0x20(%rsp), %rbx
je 0x3fc31
movq (%rbx), %rax
movq 0x8(%rax), %r14
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
cmpq 0x28(%rsp), %r14
je 0x3fc28
movq (%r14), %rsi
addq $0x8, %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x46e8a
testb %al, %al
jne 0x3f86c
movq (%r14), %rdi
addq $0x8, %rdi
movq 0x4cda9(%rip), %rsi     # 0x8c608
addq $-0x20, %rsi
callq 0xfb78
testb %al, %al
je 0x3f8bb
movq (%r14), %rax
movq (%rax), %r15
movq %r12, %rdi
leaq 0x1b15c(%rip), %rsi     # 0x5a9d8
leaq 0x30(%rsp), %rdx
callq 0xfa26
movq (%r14), %rdx
addq $0x8, %rdx
leaq 0x1f0(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xfda4
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3da88
movq %rbp, %rdi
callq 0x5120
movq %r12, %rdi
callq 0x5120
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0xf0(%rsp), %rdi
callq 0x5340
movq (%rbx), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x5340
movq (%rbx), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0x1d0(%rsp), %r15
movq %r15, %rdi
callq 0x5340
movq %r12, %rdi
leaq 0xf0(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
movq %r15, %rcx
callq 0x3bcfe
movq %r13, %rdi
movq %r12, %rsi
callq 0x4866e
movq %r12, %rdi
callq 0x46fa0
leaq 0x1d0(%rsp), %rdi
callq 0x5120
leaq 0xd0(%rsp), %rdi
callq 0x5120
leaq 0xf0(%rsp), %rdi
callq 0x5120
movq (%rbx), %rax
cmpb $0x1, 0x28(%rax)
movq %r14, 0x18(%rsp)
jne 0x3fae6
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x1b075(%rip), %rsi     # 0x5a9ed
leaq 0xf(%rsp), %rdx
callq 0xfa26
movq (%rbx), %rax
movq 0x20(%rax), %rdx
addq $0x8, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0xfda4
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x4728c
movq %r12, %rdi
callq 0x5120
leaq 0x30(%rsp), %rdi
callq 0x5120
leaq 0x1b0(%rsp), %rdi
leaq 0x1b02c(%rip), %rsi     # 0x5a9f2
movq %r12, %rdx
callq 0xfa26
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %rbp
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0xb0(%rsp), %rdi
callq 0x5340
movq (%rbx), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0x190(%rsp), %r15
movq %r15, %rdi
callq 0x5340
movb $0x1, %r13b
movq %rbp, %rdi
leaq 0xb0(%rsp), %rsi
movq %r15, %rdx
callq 0x46fc0
xorl %r13d, %r13d
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %r15
movq (%rbx), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0x90(%rsp), %rdi
callq 0x5340
leaq 0x170(%rsp), %r13
movq %r13, %rdi
leaq 0x1b852(%rip), %rsi     # 0x5b2a8
leaq 0x30(%rsp), %rdx
callq 0xfa26
movq %rbx, %r14
movq %r12, %rbx
movq %r13, %rdx
movb $0x1, %r13b
movq %r15, %rdi
leaq 0x90(%rsp), %rsi
callq 0x46fc0
leaq 0x1b0(%rsp), %r12
xorl %r13d, %r13d
leaq 0x4cb42(%rip), %rdi     # 0x8c5d0
movq %r12, %rsi
movq %rbp, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x46a38
leaq 0x170(%rsp), %rdi
callq 0x5120
leaq 0x90(%rsp), %rdi
callq 0x5120
leaq 0x190(%rsp), %rdi
callq 0x5120
leaq 0xb0(%rsp), %rdi
callq 0x5120
movq %r12, %rdi
callq 0x5120
movq %rbx, %r12
movq %r14, %rbx
jmp 0x3fc13
movq 0x20(%rax), %rsi
addq $0x8, %rsi
movq 0x10(%rsp), %rdi
callq 0x47206
leaq 0x150(%rsp), %rdi
leaq 0x1aef4(%rip), %rsi     # 0x5a9fb
movq %r12, %rdx
callq 0xfa26
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %rbp
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0x70(%rsp), %rdi
callq 0x5340
movq (%rbx), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0x130(%rsp), %r15
movq %r15, %rdi
callq 0x5340
movb $0x1, %r13b
movq %rbp, %rdi
leaq 0x70(%rsp), %rsi
movq %r15, %rdx
callq 0x46fc0
xorl %r13d, %r13d
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %r15
movq (%rbx), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0x50(%rsp), %rdi
callq 0x5340
leaq 0x110(%rsp), %r13
movq %r13, %rdi
leaq 0x1b71a(%rip), %rsi     # 0x5b2a8
leaq 0x30(%rsp), %rdx
callq 0xfa26
movq %r12, %r14
movq %rbx, %r12
movq %rbp, %rbx
movq %r13, %rdx
movb $0x1, %r13b
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0x46fc0
leaq 0x150(%rsp), %rbp
xorl %r13d, %r13d
leaq 0x4ca0a(%rip), %rdi     # 0x8c5d0
movq %rbp, %rsi
movq %rbx, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x46a38
leaq 0x110(%rsp), %rdi
callq 0x5120
leaq 0x50(%rsp), %rdi
callq 0x5120
leaq 0x130(%rsp), %rdi
callq 0x5120
leaq 0x70(%rsp), %rdi
callq 0x5120
movq %rbp, %rdi
callq 0x5120
movq %r12, %rbx
movq %r14, %r12
movq 0x18(%rsp), %r14
addq $0x8, %r14
leaq 0x4c9f5(%rip), %r13     # 0x8c618
jmp 0x3f831
addq $0x8, %rbx
jmp 0x3f816
movq 0x10(%rsp), %rax
jmp 0x3fc43
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movb $0x1, %r13b
jmp 0x3fd48
movq %rax, %r14
jmp 0x3fca4
jmp 0x3fe1c
movq %rax, %r14
jmp 0x3fd89
jmp 0x3fe1c
movq %rax, %r14
jmp 0x3fdbf
movq %rax, %r14
jmp 0x3fd25
movq %rax, %r14
jmp 0x3fd57
jmp 0x3fe1c
movq %rax, %r14
leaq 0x210(%rsp), %rdi
callq 0x5120
leaq 0x30(%rsp), %rdi
jmp 0x3fe15
movq %rax, %r14
jmp 0x3fd94
movq %rax, %r14
movb $0x1, %r13b
jmp 0x3fd77
movq %rax, %r14
jmp 0x3fdca
movq %rax, %r14
movb $0x1, %r13b
jmp 0x3fdb0
movq %rax, %r14
movb $0x1, %r13b
jmp 0x3fd13
movq %rax, %r14
leaq 0x1f0(%rsp), %rdi
callq 0x5120
jmp 0x3fcf1
movq %rax, %r14
leaq 0x210(%rsp), %rdi
jmp 0x3fe15
jmp 0x3fe1c
movq %rax, %r14
leaq 0x170(%rsp), %rdi
callq 0x5120
leaq 0x90(%rsp), %rdi
callq 0x5120
testb %r13b, %r13b
je 0x3fd30
pushq $0x48
popq %rsi
movq %r15, %rdi
callq 0x5270
xorl %r13d, %r13d
jmp 0x3fd6a
movq %rax, %r14
leaq 0x110(%rsp), %rdi
callq 0x5120
movq %rbx, %rbp
leaq 0x50(%rsp), %rdi
callq 0x5120
testb %r13b, %r13b
je 0x3fd62
pushq $0x48
popq %rsi
movq %r15, %rdi
callq 0x5270
xorl %r13d, %r13d
jmp 0x3fda3
movq %rax, %r14
leaq 0x190(%rsp), %rdi
callq 0x5120
leaq 0xb0(%rsp), %rdi
callq 0x5120
testb %r13b, %r13b
je 0x3fd94
pushq $0x48
popq %rsi
movq %rbp, %rdi
callq 0x5270
leaq 0x1b0(%rsp), %rdi
jmp 0x3fe15
jmp 0x3fe1c
movq %rax, %r14
leaq 0x130(%rsp), %rdi
callq 0x5120
leaq 0x70(%rsp), %rdi
callq 0x5120
testb %r13b, %r13b
je 0x3fdca
pushq $0x48
popq %rsi
movq %rbp, %rdi
callq 0x5270
leaq 0x150(%rsp), %rdi
jmp 0x3fe15
movq %rax, %r14
jmp 0x3fe0d
movq %rax, %r14
jmp 0x3fe00
movq %rax, %r14
jmp 0x3fdf3
movq %rax, %r14
leaq 0x210(%rsp), %rdi
callq 0x46fa0
leaq 0x1d0(%rsp), %rdi
callq 0x5120
leaq 0xd0(%rsp), %rdi
callq 0x5120
leaq 0xf0(%rsp), %rdi
callq 0x5120
jmp 0x3fe1f
movq %rax, %r14
movq 0x10(%rsp), %rdi
callq 0x46752
movq %r14, %rdi
callq 0x53f0