// File: /workspace/github_c_makefile_star2_O1/zyearn[P]SmallC/codegen.cpp
// Function: genArgs(treeNode*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int genArgs(treeNode* node, int type, string scope)
{
    switch(type)
    {
        case 1:
        {
            genExp(node->child[0], node->child[0]->type, scope);
            cout << "add $sp, $sp, -4" << endl;
            cout << "sw $t0, 0($sp)" << endl;
            int i = genArgs(node->child[2], node->child[2]->type, scope);
            return 1+i;
            break;
        }
        case 2:
        {
            genExp(node->child[0], node->child[0]->type, scope);
            cout << "add $sp, $sp, -4" << endl;
            cout << "sw $t0, 0($sp)" << endl;
            return 1;
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movq 0x28(%rdi), %rax
movq (%rax), %r12
movl 0x24(%r12), %r15d
cmpl $0x1, %esi
jne 0x1e5a9
movq %rdi, -0x30(%rbp)
leaq -0x80(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0xb1ca
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x106e9
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x1e4d2
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21e0
movq 0x9af7(%rip), %r15      # 0x27fd0
leaq 0x3831(%rip), %rsi      # 0x21d11
movl $0x10, %edx
movq %r15, %rdi
callq 0x2230
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
leaq 0x39e6(%rip), %rsi      # 0x21f01
movl $0xe, %edx
movq %r15, %rdi
callq 0x2230
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %r14
movl 0x24(%r14), %r15d
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0xb1ca
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x1e45c
movl %eax, %ebx
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x1e5a2
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21e0
incl %ebx
jmp 0x1e66e
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0xb1ca
movq %r12, %rdi
movl %r15d, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x106e9
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x1e5ec
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21e0
movq 0x99dd(%rip), %rbx      # 0x27fd0
leaq 0x3717(%rip), %rsi      # 0x21d11
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
leaq 0x38cc(%rip), %rsi      # 0x21f01
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movl $0x1, %ebx
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
jmp 0x1e69b
movq %rax, %rbx
movq -0x50(%rbp), %rdi
jmp 0x1e69b
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x1e6ac
movq (%r13), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2360