// File: /workspace/github_c_makefile_star2_O1/pedro-onate[P]eva/eva.c
// Function: compile_lambda
static es_val_t compile_lambda(es_ctx_t* ctx, es_val_t bc, es_val_t formals, es_val_t body, int tail_pos, int next, es_val_t scope)
{
  int label1 = bytecode_label(bc);
  emit_jmp(bc, -1);
  int label2 = bytecode_label(bc);
  scope = make_scope(ctx, formals, scope);
  compile_seq(ctx, bc, body, 1, RETURN, scope);
  int label3 = bytecode_label(bc);
  int rest;
  int arity = lambda_arity(formals, &rest);
  es_val_t proc = es_make_proc(ctx, arity, rest, label2, label3);
  emit_closure(bc, alloc_const(bc, proc));
  es_bytecode_val(bc)->inst[label1].operand1 = label3 - label1;
  if (tail_pos) emit(bc, (es_inst_t){ opcode(next) });
  return es_void;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, 0x14(%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq 0x50(%rsp), %rbp
movslq 0x8024(%rsi), %r14
xorl %edi, %edi
xorl %esi, %esi
movl $0x9, %edx
xorl %eax, %eax
callq 0x46e8
movq (%rax), %rsi
movl $0xffff, %edx           # imm = 0xFFFF
movq %rbx, %rdi
callq 0x5a22
movl 0x8024(%rbx), %eax
movl %eax, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x6333
movq %r15, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x22f7
movl $0x1, %ebp
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl $0x1, %ecx
movl $0xd, %r8d
movq %rax, %r9
callq 0x61e8
movl %r12d, %eax
andl $0x7, %eax
cmpq $0x5, %rax
ja 0x60a7
leaq 0x1679(%rip), %rcx      # 0x76f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%r12), %ebp
jmp 0x60ac
movl %r12d, %ebp
sarl $0x3, %ebp
jmp 0x60ac
movl $0x2, %ebp
jmp 0x60ac
movl $0x3, %ebp
jmp 0x60ac
movl $0x4, %ebp
jmp 0x60ac
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl 0x8024(%rbx), %r13d
cmpl $0x3, %ebp
jne 0x60c5
xorl %ebp, %ebp
movl $0x1, %r12d
jmp 0x6145
xorl %ebp, %ebp
leaq 0x163e(%rip), %rax      # 0x770c
movl %r12d, %ecx
andl $0x7, %ecx
cmpq $0x5, %rcx
ja 0x610d
movslq (%rax,%rcx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movl (%r12), %edx
jmp 0x6112
movl $0x1, %edx
jmp 0x6112
movl $0x3, %edx
jmp 0x6112
movl %r12d, %edx
sarl $0x3, %edx
jmp 0x6112
movl $0x2, %edx
jmp 0x6112
movl $0x4, %edx
jmp 0x6112
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0x6, %edx
jne 0x6120
incl %ebp
movq 0x18(%r12), %r12
jmp 0x60ce
cmpl $0x3, %ecx
je 0x6135
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jne 0x613c
movl (%r12), %eax
jmp 0x613c
sarl $0x3, %r12d
movl %r12d, %eax
xorl %r12d, %r12d
testl %eax, %eax
setne %r12b
movl $0x20, %edx
movq %r15, %rdi
movl $0x11, %esi
callq 0x2177
movl %ebp, 0x10(%rax)
movl %r12d, 0x14(%rax)
movl 0x10(%rsp), %ecx
movl %ecx, 0x18(%rax)
movl %r13d, 0x1c(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x59c8
movl %eax, %ebp
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
xorl %eax, %eax
callq 0x46e8
movq (%rax), %rsi
movzwl %bp, %edx
movq %rbx, %rdi
callq 0x5a22
subl %r14d, %r13d
movq 0x8018(%rbx), %rax
shlq $0x4, %r14
movw %r13w, 0x8(%rax,%r14)
cmpl $0x0, 0x14(%rsp)
je 0x61d9
xorl %edi, %edi
xorl %esi, %esi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x46e8
movq (%rax), %rsi
movq %rbx, %rdi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5a22
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq