// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addl $0xffffff49, %esi       # imm = 0xFFFFFF49
cmpl $0x4, %esi
ja 0xa532
leaq 0x1f56(%rip), %rax      # 0xc398
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 0x4cf1
testl %eax, %eax
js 0xa56c
movl %eax, %esi
movq %rbx, %rdi
callq 0x46a3
jmp 0xa4ce
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
andl $0x1f, %eax
xorl %ecx, %ecx
cmpl $0xc, %eax
jmp 0xa4eb
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rbx)
cmpq 0x90(%rbx), %rax
je 0xa556
movl (%rax), %eax
andl $0x1f, %eax
cmpl $0xc, %eax
je 0xa4b2
cmpl $0x6, %eax
jne 0xa556
movq 0x110(%rbx), %rsi
movq 0xec0(%rbx), %rax
movq 0x8(%rax), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x45e8
movq %rbx, %rdi
movq %rax, %rsi
jmp 0xa560
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 0xa55d
movq 0x30(%rbx), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
movl (%rcx), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
jne 0xa556
movq 0x8(%rcx), %rsi
movl (%rsi), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
jne 0xa57b
addq $0x10, %rcx
cmpq 0x8(%rsi), %rax
jne 0xa50b
jmp 0xa55d
movq 0xea0(%rbx), %rdi
movl 0xec8(%rbx), %edx
leaq 0x2736(%rip), %rsi      # 0xcc7c
xorl %eax, %eax
callq 0x4290
movq 0xea0(%rbx), %rsi
jmp 0xa582
movq 0xd0(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa761
leaq 0x2cde(%rip), %rsi      # 0xd251
movq %rbx, %rdi
movq %r14, %rdx
jmp 0xa587
leaq 0x2ce3(%rip), %rsi      # 0xd265
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa5c7