// File: /workspace/github_c_makefile_star2_O0/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
subq $0x100, %rsp            # imm = 0x100
movq %rdx, -0xa0(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x94(%rbp)
subl $0x1, %eax
je 0x30631
jmp 0x3061d
movl -0x94(%rbp), %eax
subl $0x2, %eax
je 0x30783
jmp 0x30848
movq -0xa0(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movl 0x24(%rax), %eax
movl %eax, -0xac(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x3150
movq -0xb8(%rbp), %rdi
movl -0xac(%rbp), %esi
movq -0xa8(%rbp), %rdx
xorl %ecx, %ecx
callq 0x18f60
jmp 0x30680
leaq -0x40(%rbp), %rdi
callq 0x34f8
movq 0xd940(%rip), %rdi      # 0x3dfd0
movq %rdi, -0xe8(%rbp)
leaq 0x5783(%rip), %rsi      # 0x35e21
callq 0x3250
movq %rax, %rdi
movq 0xd903(%rip), %rsi      # 0x3dfb0
movq %rsi, -0xe0(%rbp)
callq 0x32b0
movq -0xe8(%rbp), %rdi
leaq 0x594a(%rip), %rsi      # 0x36011
callq 0x3250
movq -0xe0(%rbp), %rsi
movq %rax, %rdi
callq 0x32b0
movq -0xa0(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xd8(%rbp)
movl 0x24(%rax), %eax
movl %eax, -0xcc(%rbp)
leaq -0x70(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3150
movq -0xd8(%rbp), %rdi
movl -0xcc(%rbp), %esi
movq -0xc8(%rbp), %rdx
callq 0x305f0
movl %eax, -0xbc(%rbp)
jmp 0x3072f
leaq -0x70(%rbp), %rdi
callq 0x34f8
movl -0xbc(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3084a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x34f8
jmp 0x30856
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x34f8
jmp 0x30856
movq -0xa0(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq %rax, -0x100(%rbp)
movl 0x24(%rax), %eax
movl %eax, -0xf4(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3150
movq -0x100(%rbp), %rdi
movl -0xf4(%rbp), %esi
movq -0xf0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x18f60
jmp 0x307d5
leaq -0x90(%rbp), %rdi
callq 0x34f8
movq 0xd7e8(%rip), %rdi      # 0x3dfd0
leaq 0x5632(%rip), %rsi      # 0x35e21
callq 0x3250
movq %rax, %rdi
movq 0xd7b2(%rip), %rsi      # 0x3dfb0
callq 0x32b0
movq 0xd7c6(%rip), %rdi      # 0x3dfd0
leaq 0x5800(%rip), %rsi      # 0x36011
callq 0x3250
movq %rax, %rdi
movq 0xd790(%rip), %rsi      # 0x3dfb0
callq 0x32b0
movl $0x1, -0x4(%rbp)
jmp 0x3084a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x34f8
jmp 0x30856
ud2
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3450
nop