// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: opexe_6
static pointer opexe_6(scheme * sc, enum scheme_opcodes op) {
  pointer x, y;
  long v;

  switch (op) {
  case OP_LIST_LENGTH:         /* length *//* a.k */
    v = list_length(sc, car(sc->args));
    if (v < 0) {
      Error_1(sc, "length: not a list:", car(sc->args));
    }
    s_return(sc, mk_integer(sc, v));

  case OP_ASSQ:                /* assq *//* a.k */
    x = car(sc->args);
    for (y = cadr(sc->args); is_pair(y); y = cdr(y)) {
      if (!is_pair(car(y))) {
        Error_0(sc, "unable to handle non pair element");
      }
      if (x == caar(y))
        break;
    }
    if (is_pair(y)) {
      s_return(sc, car(y));
    } else {
      s_return(sc, sc->F);
    }


  case OP_GET_CLOSURE:         /* get-closure-code *//* a.k */
    sc->args = car(sc->args);
    if (sc->args == sc->NIL) {
      s_return(sc, sc->F);
    } else if (is_closure(sc->args)) {
      s_return(sc, cons(sc, sc->LAMBDA, closure_code(sc->value)));
    } else if (is_macro(sc->args)) {
      s_return(sc, cons(sc, sc->LAMBDA, closure_code(sc->value)));
    } else {
      s_return(sc, sc->F);
    }
  case OP_CLOSUREP:            /* closure? */
    /*
     * Note, macro object is also a closure.
     * Therefore, (closure? <#MACRO>) ==> #t
     */
    s_retbool(is_closure(car(sc->args)));
  case OP_MACROP:              /* macro? */
    s_retbool(is_macro(car(sc->args)));
  default:
    sprintf(sc->strbuff, "%d: illegal operator", sc->op);
    Error_0(sc, sc->strbuff);
  }
  return sc->T;                 /* NOTREACHED */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addl $0xffffff49, %esi       # imm = 0xFFFFFF49
cmpl $0x4, %esi
ja 0xad24
leaq 0x2779(%rip), %rax      # 0xd36c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x30(%rbx), %rax
movq 0x8(%rax), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e34
testl %eax, %eax
js 0xad4d
movl %eax, %r14d
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4689
movl $0x4002, (%rax)         # imm = 0x4002
movq %r14, 0x10(%rax)
movb $0x1, 0x8(%rax)
jmp 0xacaa
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
andl $0x1f, %eax
xorl %ecx, %ecx
cmpl $0xc, %eax
jmp 0xacc4
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rbx)
cmpq 0x90(%rbx), %rax
je 0xad10
movl (%rax), %eax
andl $0x1f, %eax
cmpl $0xc, %eax
je 0xac7c
cmpl $0x6, %eax
jne 0xad10
movq 0x110(%rbx), %r14
movq 0xec0(%rbx), %rax
movq 0x8(%rax), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4689
movl $0x5, (%rax)
movq %r14, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
jmp 0xad1a
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
andl $0x1f, %eax
xorl %ecx, %ecx
cmpl $0x6, %eax
setne %cl
shll $0x5, %ecx
movq 0xb0(%rcx,%rbx), %rsi
jmp 0xad17
movq 0x30(%rbx), %rcx
movq 0x10(%rcx), %rax
movq 0x8(%rax), %rax
movl (%rax), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
jne 0xad10
movq 0x8(%rcx), %rcx
movq 0x8(%rax), %rsi
movl (%rsi), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
jne 0xad61
cmpq 0x8(%rsi), %rcx
je 0xad17
movq 0x10(%rax), %rax
movl (%rax), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
je 0xacee
movq 0xd0(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xafff
movq 0xea0(%rbx), %rdi
movl 0xec8(%rbx), %edx
leaq 0x2f74(%rip), %rsi      # 0xdcac
xorl %eax, %eax
callq 0x4290
movq 0xea0(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
jmp 0xad5a
leaq 0x352d(%rip), %rsi      # 0xe281
movq %rbx, %rdi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xad6a
leaq 0x352d(%rip), %rsi      # 0xe295
jmp 0xad46