// File: /workspace/github_c_makefile_star2_O0/ebb[P]chisa/printer.c
// Function: prTransfer
static void prTransfer(long transfer, long blocks)
{
    long ret, id, arg, args, name, clauses, els, cont, formalArg;

    if (match(transfer, CLASS_FiCall, &ret, &id, &args)) {
        /*
         * Call
         */
        name = idName(id);
        if (match(ret, CLASS_Nil)) {
            pr("    return ");
            if (runtime_isPrim(runtime_stringValue(name)))
                pr("prim_");
            prStr(name), pr("("), prIds(args), pr(");\n");
        } else if (match(ret, CLASS_Id, &cont)) {
            long vars;

            vars = findArgs(cont, blocks);
            pr("    "), prIds(vars), pr(" = "), prStr(name);
            pr("("), prIds(args), pr(");\n");
            pr("    goto "), prStr(cont), pr(";\n");
        }
    } else if (match(transfer, CLASS_FiGoto, &id, &args)) {
        /*
         * Goto
         */
        forEach(findArgs(idName(id), blocks), formalArg) {
            if (!match(args, CLASS_Cons, &arg, &args))
                die("Wrong number of arguments in goto.");
            pr("        "), prId(formalArg), pr(" = "), prId(arg), pr(";\n");
        }
        pr("    goto "), prId(id), pr(";\n");
    } else if (match(transfer, CLASS_FiReturn, &id)) {
        /*
         * Return
         */
        pr("    return "), prId(id), pr(";\n");
    } else if (match(transfer, CLASS_FiMatch, &id, &clauses, &els)) {
        /*
         * Match
         */
        pr("    switch (runtime_class("), prId(id), pr(")) {\n");
        {
            /*
             * Cases
             */
            long clause, cons, label, arg;
            int i, elseCounter = 0;

            forEach(clauses, clause) {
                if (match(clause, CLASS_FiCase, &cons, &label)) {
                    pr("    case CLASS_"), prId(cons), pr(":\n");
                    i = 0;
                    forEach(findArgs(idName(label), blocks), arg) {
                        pr("        "), prId(arg), pr(" = prim_fetch(");
                        prId(id);
                        pr(", "), printf("runtime_makeNumber(%d)", i++);
                        pr(");\n");
                    }
                    pr("        goto "), prId(label), pr(";\n");
                }
                if (match(clause, CLASS_FiElse, &id)) {
                    pr("    default:\n");
                    pr("        goto "), prId(id), pr(";\n");
                    elseCounter++;
                }
            }
            if (elseCounter == 0) {
                pr("    default:\n");
                pr("        runtime_matchFailure(__LINE__);\n");
            }
        }
        pr("    }\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x17, %esi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
leaq -0x30(%rbp), %r8
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x5184
movq -0x20(%rbp), %rdi
callq 0x4a10
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x50e7
leaq 0x162d(%rip), %rdi      # 0x66be
callq 0x4750
movq -0x38(%rbp), %rdi
callq 0x5650
movq %rax, %rdi
callq 0x5db0
cmpl $0x0, %eax
je 0x50b8
leaq 0x15d1(%rip), %rdi      # 0x6684
callq 0x4750
movq -0x38(%rbp), %rdi
callq 0x4e00
leaq 0x166c(%rip), %rdi      # 0x6734
callq 0x4750
movq -0x30(%rbp), %rdi
callq 0x4d60
leaq 0x16b1(%rip), %rdi      # 0x678e
callq 0x4750
jmp 0x517f
movq -0x18(%rbp), %rdi
movl $0x4, %esi
leaq -0x50(%rbp), %rdx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x517d
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54e0
movq %rax, -0x60(%rbp)
leaq 0x15d9(%rip), %rdi      # 0x66f1
callq 0x4750
movq -0x60(%rbp), %rdi
callq 0x4d60
leaq 0x1504(%rip), %rdi      # 0x6631
callq 0x4750
movq -0x38(%rbp), %rdi
callq 0x4e00
leaq 0x15f2(%rip), %rdi      # 0x6734
callq 0x4750
movq -0x30(%rbp), %rdi
callq 0x4d60
leaq 0x1637(%rip), %rdi      # 0x678e
callq 0x4750
leaq 0x15ee(%rip), %rdi      # 0x6751
callq 0x4750
movq -0x50(%rbp), %rdi
callq 0x4e00
leaq 0x1617(%rip), %rdi      # 0x678f
callq 0x4750
jmp 0x517f
jmp 0x54c8
movq -0x8(%rbp), %rdi
movl $0x18, %esi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x5262
movq -0x20(%rbp), %rdi
callq 0x4a10
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x54e0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movl $0x3, %esi
leaq -0x58(%rbp), %rdx
leaq -0x68(%rbp), %rcx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x523c
movq -0x30(%rbp), %rdi
movl $0x3, %esi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
jne 0x5204
leaq 0x14cb(%rip), %rdi      # 0x66ca
callq 0x5ed0
leaq 0x14e2(%rip), %rdi      # 0x66ed
callq 0x4750
movq -0x58(%rbp), %rdi
callq 0x4970
leaq 0x1411(%rip), %rdi      # 0x6631
callq 0x4750
movq -0x28(%rbp), %rdi
callq 0x4970
leaq 0x155a(%rip), %rdi      # 0x678f
callq 0x4750
jmp 0x51be
leaq 0x150e(%rip), %rdi      # 0x6751
callq 0x4750
movq -0x20(%rbp), %rdi
callq 0x4970
leaq 0x1537(%rip), %rdi      # 0x678f
callq 0x4750
jmp 0x54c6
movq -0x8(%rbp), %rdi
movl $0x19, %esi
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x52a1
leaq 0x143c(%rip), %rdi      # 0x66be
callq 0x4750
movq -0x20(%rbp), %rdi
callq 0x4970
leaq 0x14f8(%rip), %rdi      # 0x678f
callq 0x4750
jmp 0x54c4
movq -0x8(%rbp), %rdi
movl $0x1a, %esi
leaq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x48(%rbp), %r8
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x54c2
leaq 0x1429(%rip), %rdi      # 0x66f6
callq 0x4750
movq -0x20(%rbp), %rdi
callq 0x4970
leaq 0x142f(%rip), %rdi      # 0x6711
callq 0x4750
movl $0x0, -0x90(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movl $0x3, %esi
leaq -0x70(%rbp), %rdx
leaq -0x98(%rbp), %rcx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x5495
movq -0x70(%rbp), %rdi
movl $0x1b, %esi
leaq -0x78(%rbp), %rdx
leaq -0x80(%rbp), %rcx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x543b
leaq 0x13cc(%rip), %rdi      # 0x6717
callq 0x4750
movq -0x78(%rbp), %rdi
callq 0x4970
leaq 0x1406(%rip), %rdi      # 0x6766
callq 0x4750
movl $0x0, -0x8c(%rbp)
movq -0x80(%rbp), %rdi
callq 0x4a10
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x54e0
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
movl $0x3, %esi
leaq -0x88(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x541a
leaq 0x1335(%rip), %rdi      # 0x66ed
callq 0x4750
movq -0x88(%rbp), %rdi
callq 0x4970
leaq 0x1357(%rip), %rdi      # 0x6727
callq 0x4750
movq -0x20(%rbp), %rdi
callq 0x4970
leaq 0x120b(%rip), %rdi      # 0x65f0
callq 0x4750
movl -0x8c(%rbp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
leaq 0x1334(%rip), %rdi      # 0x6736
movb $0x0, %al
callq 0x1050
leaq 0x137e(%rip), %rdi      # 0x678e
callq 0x4750
jmp 0x538b
leaq 0x132c(%rip), %rdi      # 0x674d
callq 0x4750
movq -0x80(%rbp), %rdi
callq 0x4970
leaq 0x1359(%rip), %rdi      # 0x678f
callq 0x4750
movq -0x70(%rbp), %rdi
movl $0x1c, %esi
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x47e0
cmpl $0x0, %eax
je 0x5490
leaq 0x1300(%rip), %rdi      # 0x675b
callq 0x4750
leaq 0x12e6(%rip), %rdi      # 0x674d
callq 0x4750
movq -0x20(%rbp), %rdi
callq 0x4970
leaq 0x1313(%rip), %rdi      # 0x678f
callq 0x4750
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x52fc
cmpl $0x0, -0x90(%rbp)
jne 0x54b6
leaq 0x12b6(%rip), %rdi      # 0x675b
callq 0x4750
leaq 0x12b8(%rip), %rdi      # 0x6769
callq 0x4750
leaq 0x12d5(%rip), %rdi      # 0x6792
callq 0x4750
jmp 0x54c4
jmp 0x54c6
jmp 0x54c8
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)