// File: Mulan-Szechuan-Sauce[P]javelin/src/node.hpp
// Function: NFunctionDeclStatement::generate(int)
virtual void generate(int level) {
    NStatement::generate(level);

    if (level == 0) {
      cout << type->cpp_type_string() << ' ' << id->name << '(';
      if (args) args->generate();
      cout << ")";
    } else {
      // Lambdas don't capture by reference, by default.
      cout << "auto " << id->name << " = [] (";
      if (args) args->generate();
      cout << ")";
      if (! type->isVoid()) {
        cout << " -> " << type->cpp_type_string() << ' ';
      }
    }

    cout << " {\n";
    stmt->generate(level + 1);
    printIndent(level);
    cout << "}";
    if (level > 0) cout << ';'; // For lambdas
    cout << endl;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movl -0xc(%rbp), %esi
callq 0xbe80
cmpl $0x0, -0xc(%rbp)
jne 0x13d15
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x30(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq *%rax
movq -0x78(%rbp), %rsi
movq 0xb351(%rip), %rdi      # 0x1efc0
callq 0x51f0
movq %rax, -0x70(%rbp)
jmp 0x13c7a
movq -0x70(%rbp), %rdi
movl $0x20, %esi
callq 0x5280
movq %rax, -0x80(%rbp)
jmp 0x13c8e
movq -0x80(%rbp), %rdi
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rsi
addq $0x10, %rsi
callq 0x51f0
movq %rax, -0x88(%rbp)
jmp 0x13cac
movq -0x88(%rbp), %rdi
movl $0x28, %esi
callq 0x5280
jmp 0x13cbf
leaq -0x30(%rbp), %rdi
callq 0x5190
movq -0x68(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x13cfd
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13cfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5190
jmp 0x13e90
movq 0xb2bc(%rip), %rdi      # 0x1efc0
leaq 0x2ac8(%rip), %rsi      # 0x167d3
callq 0x5210
jmp 0x13e18
movq 0xb2a4(%rip), %rdi      # 0x1efc0
leaq 0x3138(%rip), %rsi      # 0x16e5b
callq 0x5210
movq %rax, %rdi
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rsi
addq $0x10, %rsi
callq 0x51f0
movq %rax, %rdi
leaq 0x311b(%rip), %rsi      # 0x16e61
callq 0x5210
movq -0x68(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x13d64
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xb255(%rip), %rdi      # 0x1efc0
leaq 0x2a61(%rip), %rsi      # 0x167d3
callq 0x5210
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb $0x1, %al
jne 0x13e16
movq 0xb22c(%rip), %rdi      # 0x1efc0
leaq 0x30ce(%rip), %rsi      # 0x16e69
callq 0x5210
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0xa0(%rbp)
movq 0x20(%rax), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq *%rax
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x51f0
movq %rax, -0x90(%rbp)
jmp 0x13de1
movq -0x90(%rbp), %rdi
movl $0x20, %esi
callq 0x5280
jmp 0x13df4
leaq -0x60(%rbp), %rdi
callq 0x5190
jmp 0x13e16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5190
jmp 0x13e90
jmp 0x13e18
movq 0xb1a1(%rip), %rdi      # 0x1efc0
leaq 0x2655(%rip), %rsi      # 0x1647b
callq 0x5210
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movq (%rdi), %rax
callq *(%rax)
movq -0x68(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xbeb0
movq 0xb16f(%rip), %rdi      # 0x1efc0
leaq 0x26a3(%rip), %rsi      # 0x164fb
callq 0x5210
cmpl $0x0, -0xc(%rbp)
jle 0x13e74
movq 0xb156(%rip), %rdi      # 0x1efc0
movl $0x3b, %esi
callq 0x5280
movq 0xb145(%rip), %rdi      # 0x1efc0
movq 0xb11e(%rip), %rsi      # 0x1efa0
callq 0x5240
addq $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5400
nopl (%rax)