// File: JameyWoo[P]csmile/parse.cpp
// Function: param(TreeNode*)
TreeNode* param(TreeNode* k) {
    TreeNode* t = new TreeNode("Param");
    TreeNode* p = NULL;
    TreeNode* q = NULL;
    if (k == NULL && ptoken.type == "void") {
        p = new TreeNode("void");
        match("void");
    } else if (k == NULL && ptoken.type == "int") {
        p = new TreeNode("int");
        match("int");
    } else if (k != NULL) {
        p = k;
    }
    if (p != NULL) {
        t->child[0] = p;
        if (ptoken.type == "Id") {
            q            = new TreeNode("ParamId");
            q->name      = ptoken.value;
            q->line      = ptoken.line;
            t->child[1]  = q;
            t->child_cnt = 2;
            match("Id");
        }
        // TODO: 处理数组传参
    }
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x8(%rbp)
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x230(%rbp)
movb $0x1, -0x45(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x3480
movq -0x228(%rbp), %rdx
leaq 0x18fbf(%rip), %rsi     # 0x211a1
leaq -0x30(%rbp), %rdi
callq 0x4ef0
jmp 0x81ed
movq -0x230(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xdb50
jmp 0x81ff
movb $0x0, -0x45(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x34e8
leaq -0x31(%rbp), %rdi
callq 0x32d0
movq -0x230(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x8400
leaq 0x26346(%rip), %rdi     # 0x2e588
leaq 0x18eb3(%rip), %rsi     # 0x210fc
callq 0x5e70
testb $0x1, %al
jne 0x8257
jmp 0x8400
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x240(%rbp)
movb $0x1, -0x7a(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x3480
movq -0x238(%rbp), %rdx
leaq 0x18e72(%rip), %rsi     # 0x210fc
leaq -0x78(%rbp), %rdi
callq 0x4ef0
jmp 0x8295
movq -0x240(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xdb50
jmp 0x82a7
movq -0x240(%rbp), %rax
movb $0x0, -0x7a(%rbp)
movq %rax, -0x50(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x34e8
leaq -0x79(%rbp), %rdi
callq 0x32d0
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x3480
movq -0x248(%rbp), %rdx
leaq 0x18e13(%rip), %rsi     # 0x210fc
leaq -0xe8(%rbp), %rdi
callq 0x4ef0
jmp 0x82f7
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x80b0
jmp 0x830c
leaq -0xc8(%rbp), %rdi
callq 0x4ec0
leaq -0xe8(%rbp), %rdi
callq 0x34e8
leaq -0xe9(%rbp), %rdi
callq 0x32d0
jmp 0x85b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8358
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x34e8
leaq -0x31(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x45(%rbp)
jne 0x8369
jmp 0x837a
movq -0x230(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x87aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x83a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x34e8
leaq -0x79(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x7a(%rbp)
jne 0x83b3
jmp 0x83c4
movq -0x240(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x87aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x83ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x34e8
leaq -0xe9(%rbp), %rdi
callq 0x32d0
jmp 0x87aa
cmpq $0x0, -0x8(%rbp)
jne 0x85a4
leaq 0x26176(%rip), %rdi     # 0x2e588
leaq 0x18cdf(%rip), %rsi     # 0x210f8
callq 0x5e70
testb $0x1, %al
jne 0x8427
jmp 0x85a4
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x258(%rbp)
movb $0x1, -0x112(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x3480
movq -0x250(%rbp), %rdx
leaq 0x18c98(%rip), %rsi     # 0x210f8
leaq -0x110(%rbp), %rdi
callq 0x4ef0
jmp 0x846e
movq -0x258(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xdb50
jmp 0x8483
movq -0x258(%rbp), %rax
movb $0x0, -0x112(%rbp)
movq %rax, -0x50(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x34e8
leaq -0x111(%rbp), %rdi
callq 0x32d0
leaq -0x181(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x3480
movq -0x260(%rbp), %rdx
leaq 0x18c2a(%rip), %rsi     # 0x210f8
leaq -0x180(%rbp), %rdi
callq 0x4ef0
jmp 0x84dc
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x80b0
jmp 0x84f1
leaq -0x160(%rbp), %rdi
callq 0x4ec0
leaq -0x180(%rbp), %rdi
callq 0x34e8
leaq -0x181(%rbp), %rdi
callq 0x32d0
jmp 0x85b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8540
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x34e8
leaq -0x111(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x112(%rbp)
jne 0x8557
jmp 0x8568
movq -0x258(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x87aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8593
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x34e8
leaq -0x181(%rbp), %rdi
callq 0x32d0
jmp 0x87aa
cmpq $0x0, -0x8(%rbp)
je 0x85b3
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x85b5
jmp 0x85b7
cmpq $0x0, -0x50(%rbp)
je 0x879d
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
leaq 0x25fb4(%rip), %rdi     # 0x2e588
leaq 0x18bd1(%rip), %rsi     # 0x211ac
callq 0x5e70
testb $0x1, %al
jne 0x85e9
jmp 0x879b
movl $0xe0, %edi
callq 0x3280
movq %rax, -0x270(%rbp)
movb $0x1, -0x1aa(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x3480
movq -0x268(%rbp), %rdx
leaq 0x18b85(%rip), %rsi     # 0x211a7
leaq -0x1a8(%rbp), %rdi
callq 0x4ef0
jmp 0x8630
movq -0x270(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xdb50
jmp 0x8645
movq -0x270(%rbp), %rax
movb $0x0, -0x1aa(%rbp)
movq %rax, -0x58(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x34e8
leaq -0x1a9(%rbp), %rdi
callq 0x32d0
movq -0x58(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x25f27(%rip), %rsi     # 0x2e5a8
callq 0x3050
movl 0x25f3c(%rip), %ecx     # 0x2e5c8
movq -0x58(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x28(%rax)
leaq -0x219(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x3480
movq -0x278(%rbp), %rdx
leaq 0x18ae1(%rip), %rsi     # 0x211ac
leaq -0x218(%rbp), %rdi
callq 0x4ef0
jmp 0x86d9
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x80b0
jmp 0x86ee
leaq -0x1f8(%rbp), %rdi
callq 0x4ec0
leaq -0x218(%rbp), %rdi
callq 0x34e8
leaq -0x219(%rbp), %rdi
callq 0x32d0
jmp 0x879b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x873d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x34e8
leaq -0x1a9(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x1aa(%rbp)
jne 0x8754
jmp 0x8765
movq -0x270(%rbp), %rdi
movl $0xe0, %esi
callq 0x3290
jmp 0x87aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x878d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x34e8
leaq -0x219(%rbp), %rdi
callq 0x32d0
jmp 0x87aa
jmp 0x879d
movq -0x10(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)