// File: /workspace/github_c_makefile_star2_O1/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 0xae5c
leaq 0x263b(%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 0x4e5f
testl %eax, %eax
js 0xae85
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 0xade8
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
andl $0x1f, %eax
xorl %ecx, %ecx
cmpl $0xc, %eax
jmp 0xae05
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rbx)
cmpq 0x90(%rbx), %rax
je 0xaead
movl (%rax), %eax
andl $0x1f, %eax
cmpl $0xc, %eax
je 0xadba
cmpl $0x6, %eax
jne 0xaead
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 0xaeb7
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 0xaeb4
movq 0x30(%rbx), %rcx
movq 0x10(%rcx), %rax
movq 0x8(%rax), %rax
movl (%rax), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
sete %dl
jne 0xaead
movq 0x8(%rcx), %rcx
movq 0x8(%rax), %rsi
movl (%rsi), %edi
andl $0x1f, %edi
cmpl $0x5, %edi
jne 0xae99
cmpq 0x8(%rsi), %rcx
je 0xaea2
movq 0x10(%rax), %rax
movl (%rax), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
sete %dl
je 0xae35
jmp 0xaead
movq 0xea0(%rbx), %rdi
movl 0xec8(%rbx), %edx
leaq 0x2e43(%rip), %rsi      # 0xdcb3
xorl %eax, %eax
callq 0x4290
movq 0xea0(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
jmp 0xae92
leaq 0x33fc(%rip), %rsi      # 0xe288
movq %rbx, %rdi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xaec1
leaq 0x33fc(%rip), %rsi      # 0xe29c
jmp 0xae7e
testb $0x1, %dl
je 0xaead
movq 0x8(%rax), %rsi
jmp 0xaeb4
movq 0xd0(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb152