// File: /workspace/github_c_makefile_star2_O0/samsonjs[P]lake/src/fn.c
// Function: fn_repr
char *fn_repr(LakeFn *fn)
{
    char *s = malloc(8);
    s[0] = '\0';
    s = lake_str_append(s, "(lambda ");
    char *s2;
    if (LIST_N(fn->params) && fn->varargs)
    {
        LakeDottedList *params = dlist_make(fn->params, VAL(fn->varargs));
        s2 = dlist_repr(params);
        s = lake_str_append(s, s2);
        free(s2);
    }
    else if (fn->varargs)
    {
        s2 = lake_repr(fn->varargs);
        s = lake_str_append(s, s2);
        free(s2);
    }
    else
    {
        s2 = lake_repr(fn->params);
        s = lake_str_append(s, s2);
        free(s2);
    }
    s = lake_str_append(s, " ");
    int i;
    for (i = 0; i < LIST_N(fn->body); ++i)
    {
        s2 = lake_repr(LIST_VAL(fn->body, i));
        s = lake_str_append(s, s2);
        free(s2);
        if (i != LIST_N(fn->body) - 1) s = lake_str_append(s, " ");
    }
    return lake_str_append(s, ")");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x8, %edi
callq 0x1190
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x5ef3(%rip), %rsi      # 0x927f
callq 0x12f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x33f1
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x33f1
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x1670
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1730
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x12f0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1030
jmp 0x3456
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3429
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x40f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x12f0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1030
jmp 0x3454
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x40f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x12f0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1030
jmp 0x3456
movq -0x10(%rbp), %rdi
leaq 0x5bab(%rip), %rsi      # 0x900c
callq 0x12f0
movq %rax, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jae 0x3525
cmpl $0x0, -0x24(%rbp)
jl 0x34b9
movslq -0x24(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jae 0x34b9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0x34c1
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x34c1
movq -0x30(%rbp), %rdi
callq 0x40f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x12f0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1030
movslq -0x24(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq 0x18(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x3515
movq -0x10(%rbp), %rdi
leaq 0x5b00(%rip), %rsi      # 0x900c
callq 0x12f0
movq %rax, -0x10(%rbp)
jmp 0x3517
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3471
movq -0x10(%rbp), %rdi
leaq 0x5e61(%rip), %rsi      # 0x9391
callq 0x12f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)