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

  switch (op) {
  case OP_FORCE:               /* force */
    sc->code = car(sc->args);
    if (is_promise(sc->code)) {
      /* Should change type to closure here */
      s_save(sc, OP_SAVE_FORCED, sc->NIL, sc->code);
      sc->args = sc->NIL;
      s_goto(sc, OP_APPLY);
    } else {
      s_return(sc, sc->code);
    }

  case OP_SAVE_FORCED:         /* Save forced value replacing promise */
    memcpy(sc->code, sc->value, sizeof(struct cell));
    s_return(sc, sc->value);

  case OP_WRITE:               /* write */
  case OP_DISPLAY:             /* display */
  case OP_WRITE_CHAR:          /* write-char */
    if (is_pair(cdr(sc->args))) {
      if (cadr(sc->args) != sc->outport) {
        x = cons(sc, sc->outport, sc->NIL);
        s_save(sc, OP_SET_OUTPORT, x, sc->NIL);
        sc->outport = cadr(sc->args);
      }
    }
    sc->args = car(sc->args);
    if (op == OP_WRITE) {
      sc->print_flag = 1;
    } else {
      sc->print_flag = 0;
    }
    s_goto(sc, OP_P0LIST);

  case OP_WRITE_U8:            /* write-u8 */
    if (is_pair(cdr(sc->args))) {
      if (cadr(sc->args) != sc->outport) {
        x = cons(sc, sc->outport, sc->NIL);
        s_save(sc, OP_SET_OUTPORT, x, sc->NIL);
        sc->outport = cadr(sc->args);
      }
    }
    putcharacter(sc, ivalue(car(sc->args)));
    s_return(sc, sc->T);

  case OP_NEWLINE:             /* newline */
    if (is_pair(sc->args)) {
      if (car(sc->args) != sc->outport) {
        x = cons(sc, sc->outport, sc->NIL);
        s_save(sc, OP_SET_OUTPORT, x, sc->NIL);
        sc->outport = car(sc->args);
      }
    }
    putstr(sc, "\n");
    s_return(sc, sc->T);

  case OP_ERR0:                /* error */
    sc->retcode = -1;
    if (!is_string(car(sc->args))) {
      sc->args = cons(sc, mk_string(sc, " -- "), sc->args);
      setimmutable(car(sc->args));
    }
    putstr(sc, "Error: ");
    putstr(sc, strvalue(car(sc->args)));
    sc->args = cdr(sc->args);
    s_goto(sc, OP_ERR1);

  case OP_ERR1:                /* error */
    putstr(sc, " ");
    if (sc->args != sc->NIL) {
      s_save(sc, OP_ERR1, cdr(sc->args), sc->NIL);
      sc->args = car(sc->args);
      sc->print_flag = 1;
      s_goto(sc, OP_P0LIST);
    } else {
      putstr(sc, "\n");
      if (sc->interactive_repl) {
        s_goto(sc, OP_T0LVL);
      } else {
        return sc->NIL;
      }
    }

  case OP_REVERSE:             /* reverse */
    s_return(sc, reverse(sc, car(sc->args)));

  case OP_LIST_STAR:           /* list* */
    s_return(sc, list_star(sc, sc->args));

  case OP_APPEND:              /* append */
    x = sc->NIL;
    y = sc->args;
    if (y == x) {
      s_return(sc, x);
    }

    /* cdr() in the while condition is not a typo. If car() */
    /* is used (append '() 'a) will return the wrong result. */
    while (cdr(y) != sc->NIL) {
      x = revappend(sc, x, car(y));
      y = cdr(y);
      if (x == sc->F) {
        Error_0(sc, "non-list argument to append");
      }
    }

    s_return(sc, reverse_in_place(sc, car(y), x));

#if USE_PLIST
  case OP_PUT:                 /* put */
    if (!hasprop(car(sc->args)) || !hasprop(cadr(sc->args))) {
      Error_0(sc, "illegal use of put");
    }
    for (x = symprop(car(sc->args)), y = cadr(sc->args); x != sc->NIL;
        x = cdr(x)) {
      if (caar(x) == y) {
        break;
      }
    }
    if (x != sc->NIL)
      cdar(x) = caddr(sc->args);
    else
      symprop(car(sc->args)) = cons(sc, cons(sc, y, caddr(sc->args)),
          symprop(car(sc->args)));
    s_return(sc, sc->T);

  case OP_GET:                 /* get */
    if (!hasprop(car(sc->args)) || !hasprop(cadr(sc->args))) {
      Error_0(sc, "illegal use of get");
    }
    for (x = symprop(car(sc->args)), y = cadr(sc->args); x != sc->NIL;
        x = cdr(x)) {
      if (caar(x) == y) {
        break;
      }
    }
    if (x != sc->NIL) {
      s_return(sc, cdar(x));
    } else {
      s_return(sc, sc->NIL);
    }
#endif /* USE_PLIST */
  case OP_QUIT:                /* quit */
    if (is_pair(sc->args)) {
      sc->retcode = ivalue(car(sc->args));
    }
    return (sc->NIL);

  case OP_GC:                  /* gc */
    gc(sc, sc->NIL, sc->NIL);
    s_return(sc, sc->T);

  case OP_GCVERB:              /* gc-verbose */
    {
      int was = sc->gc_verbose;

      sc->gc_verbose = (car(sc->args) != sc->F);
      s_retbool(was);
    }

  case OP_NEWSEGMENT:          /* new-segment */
    if (!is_pair(sc->args) || !is_number(car(sc->args))) {
      Error_0(sc, "new-segment: argument must be a number");
    }
    alloc_cellseg(sc, (int) ivalue(car(sc->args)));
    s_return(sc, sc->T);

  case OP_OBLIST:              /* oblist */
    s_return(sc, oblist_all_symbols(sc));

  case OP_CURR_INPORT:         /* current-input-port */
    s_return(sc, sc->inport);

  case OP_CURR_OUTPORT:        /* current-output-port */
    s_return(sc, sc->outport);

  case OP_OPEN_INFILE:         /* open-input-file */
  case OP_OPEN_OUTFILE:        /* open-output-file */
  case OP_OPEN_INOUTFILE:      /* open-input-output-file */  {
      int prop = 0;
      pointer p;
      switch (op) {
      case OP_OPEN_INFILE:
        prop = port_input;
        break;
      case OP_OPEN_OUTFILE:
        prop = port_output;
        break;
      case OP_OPEN_INOUTFILE:
        prop = port_input | port_output;
        break;
      default:
        break;                  /* Quiet the compiler */
      }
      p = port_from_filename(sc, strvalue(car(sc->args)), prop);
      if (p == sc->NIL) {
        s_return(sc, sc->F);
      }
      s_return(sc, p);
    }

#if USE_STRING_PORTS
  case OP_OPEN_INSTRING:       /* open-input-string */
  case OP_OPEN_INOUTSTRING:    /* open-input-output-string */  {
      int prop = 0;
      pointer p;
      switch (op) {
      case OP_OPEN_INSTRING:
        prop = port_input;
        break;
      case OP_OPEN_INOUTSTRING:
        prop = port_input | port_output;
        break;
      default:
        break;                  /* Quiet the compiler */
      }
      p = port_from_string(sc, strvalue(car(sc->args)),
          strvalue(car(sc->args)) + strlength(car(sc->args)), prop);
      if (p == sc->NIL) {
        s_return(sc, sc->F);
      }
      s_return(sc, p);
    }
  case OP_OPEN_OUTSTRING:      /* open-output-string */  {
      pointer p;
      if (car(sc->args) == sc->NIL) {
        p = port_from_scratch(sc);
        if (p == sc->NIL) {
          s_return(sc, sc->F);
        }
      } else {
        p = port_from_string(sc, strvalue(car(sc->args)),
            strvalue(car(sc->args)) + strlength(car(sc->args)), port_output);
        if (p == sc->NIL) {
          s_return(sc, sc->F);
        }
      }
      s_return(sc, p);
    }
  case OP_GET_OUTSTRING:       /* get-output-string */  {
      port *p;

      if ((p = car(sc->args)->_object._port)->kind & port_string) {
        int size;
        char *str;

        size = p->rep.string.curr - p->rep.string.start + 1;
        str = sc->malloc(size);
        if (str != NULL) {
          pointer s;

          memcpy(str, p->rep.string.start, size - 1);
          str[size - 1] = '\0';
          s = mk_counted_string(sc, str, size - 1);
          sc->free(str);
          s_return(sc, s);
        }
      }
      s_return(sc, sc->F);
    }
#endif

  case OP_CLOSE_INPORT:        /* close-input-port */
    port_close(sc, car(sc->args), port_input);
    s_return(sc, sc->T);

  case OP_CLOSE_OUTPORT:       /* close-output-port */
    port_close(sc, car(sc->args), port_output);
    s_return(sc, sc->T);

  case OP_INT_ENV:             /* interaction-environment */
    s_return(sc, sc->global_env);

  case OP_CURR_ENV:            /* current-environment */
    s_return(sc, sc->envir);

  default:
    sprintf(sc->strbuff, "%d: illegal operator", sc->op);
    Error_0(sc, sc->strbuff);
  }
  return sc->T;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leal -0x85(%r14), %eax
cmpl $0x1d, %eax
ja 0x94a2
leaq 0x31a8(%rip), %rcx      # 0xc280
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rcx
movl (%rcx), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
jne 0x913b
movq 0x178(%rbx), %rsi
cmpq %rsi, 0x8(%rcx)
je 0x913b
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x45e8
movq 0x90(%rbx), %rcx
movq %rbx, %rdi
movl $0xaa, %esi
movq %rax, %rdx
callq 0xa7e0
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x178(%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x30(%rbx)
xorl %eax, %eax
cmpl $0x87, %r14d
sete %al
movl %eax, 0xebc(%rbx)
movl $0xb4, 0xec8(%rbx)
movq 0xb0(%rbx), %rax
jmp 0x9834
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rsi
pushq $0x20
jmp 0x9743
movq 0x30(%rbx), %rax
movl (%rax), %ecx
andl $0x1f, %ecx
cmpl $0x5, %ecx
jne 0x982d
movq 0x8(%rax), %rax
cmpb $0x0, 0x8(%rax)
je 0x9824
movq 0x10(%rax), %rax
jmp 0x982a
orl $-0x1, 0x10(%rbx)
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
andl $0x1f, %eax
cmpl $0x1, %eax
je 0x91e7
leaq 0x3f71(%rip), %rsi      # 0xd131
movq %rbx, %rdi
callq 0x46f1
movq 0x30(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x45e8
movq %rax, 0x30(%rbx)
movq 0x8(%rax), %rax
orl $0x2000, (%rax)         # imm = 0x2000
leaq 0x3f48(%rip), %rsi      # 0xd136
movq %rbx, %rdi
callq 0x4a19
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x4a19
movq 0x30(%rbx), %rcx
movq 0xb0(%rbx), %rax
movq 0x10(%rcx), %rcx
movq %rcx, 0x30(%rbx)
movl $0x8d, 0xec8(%rbx)
jmp 0x9834
movq 0x30(%rbx), %rax
movl (%rax), %ecx
andl $0x1f, %ecx
cmpl $0x5, %ecx
jne 0x927e
movq 0x178(%rbx), %rsi
cmpq %rsi, 0x8(%rax)
je 0x927e
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x45e8
movq 0x90(%rbx), %rcx
movq %rbx, %rdi
movl $0xaa, %esi
movq %rax, %rdx
callq 0xa7e0
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x178(%rbx)
leaq 0x34e4(%rip), %rsi      # 0xc769
movq %rbx, %rdi
callq 0x4a19
jmp 0x9851
leaq 0x3f4b(%rip), %rsi      # 0xd1e4
movq %rbx, %rdi
callq 0x4a19
movq 0x30(%rbx), %rax
movq 0x90(%rbx), %rcx
cmpq %rcx, %rax
je 0x977b
movq 0x10(%rax), %rdx
movq %rbx, %rdi
movl $0x8d, %esi
callq 0xa7e0
movq 0x30(%rbx), %rcx
movq 0xb0(%rbx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, 0x30(%rbx)
movl $0x1, 0xebc(%rbx)
movl $0xb4, 0xec8(%rbx)
jmp 0x9834
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r13
testb $0x2, (%r13)
je 0x97fb
movq 0x18(%r13), %r14
subq 0x8(%r13), %r14
movq %r14, %r15
shlq $0x20, %r15
movabsq $0x100000000, %rdi      # imm = 0x100000000
addq %r15, %rdi
sarq $0x20, %rdi
callq *(%rbx)
testq %rax, %rax
je 0x97fb
movq %rax, %r12
movq 0x8(%r13), %rsi
sarq $0x20, %r15
movq %rax, %rdi
movq %r15, %rdx
callq 0x41d0
movb $0x0, (%r12,%r15)
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x4717
movq %rax, %r14
movq %r12, %rdi
callq *0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x985b
movq 0x30(%rbx), %rax
movl (%rax), %ecx
andl $0x1f, %ecx
cmpl $0x5, %ecx
jne 0x9751
movq 0x8(%rax), %rax
movl (%rax), %ecx
andl $0x1f, %ecx
cmpl $0x2, %ecx
jne 0x9751
cmpb $0x0, 0x8(%rax)
je 0x9843
movq 0x10(%rax), %rsi
jmp 0x9849
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
cmpq 0x90(%rbx), %rax
je 0x97a3
movq 0x8(%rax), %rsi
movslq 0x10(%rax), %rdx
addq %rsi, %rdx
pushq $0x20
popq %rcx
jmp 0x9704
movq 0x30(%rbx), %rsi
movq %rbx, %rdi
callq 0xab4d
jmp 0x9719
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x40(%rbx)
movl (%rcx), %eax
andl $0x1f, %eax
cmpl $0xd, %eax
jne 0x9770
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
movl $0x86, %esi
callq 0xa7e0
movq 0x90(%rbx), %rcx
movq 0xb0(%rbx), %rax
movq %rcx, 0x30(%rbx)
movl $0xa, 0xec8(%rbx)
jmp 0x9834
movq 0x40(%rbx), %rax
movq 0xec0(%rbx), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0xec0(%rbx), %rsi
jmp 0x9858
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5585
jmp 0x9851
movq 0x170(%rbx), %rsi
jmp 0x9858
movb $0x21, %bpl
leaq 0x3d02(%rip), %rsi      # 0xd184
jmp 0x9624
movb $0x31, %bpl
leaq 0x3cf0(%rip), %rsi      # 0xd181
jmp 0x9624
movq 0x178(%rbx), %rsi
jmp 0x9858
movq 0xea0(%rbx), %rdi
movl 0xec8(%rbx), %edx
leaq 0x37c6(%rip), %rsi      # 0xcc7c
xorl %eax, %eax
callq 0x4290
movq 0xea0(%rbx), %rsi
jmp 0x9758
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rcx
movl (%rcx), %edx
andl $0x1f, %edx
cmpl $0x5, %edx
jne 0x9523
movq 0x178(%rbx), %rsi
cmpq %rsi, 0x8(%rcx)
je 0x9523
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x45e8
movq 0x90(%rbx), %rcx
movq %rbx, %rdi
movl $0xaa, %esi
movq %rax, %rdx
callq 0xa7e0
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x178(%rbx)
movq 0x8(%rax), %rax
cmpb $0x0, 0x8(%rax)
je 0x9804
movq 0x10(%rax), %rsi
jmp 0x980a
movq 0x30(%rbx), %r14
movq 0x90(%rbx), %rax
addq $0x8, %r14
movq (%r14), %r14
movl (%r14), %ecx
andl $0x1f, %ecx
cmpl $0x5, %ecx
jne 0x9719
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x45e8
addq $0x10, %r14
jmp 0x9549
movq 0x30(%rbx), %r14
movq 0x90(%rbx), %rsi
cmpq %rsi, %r14
je 0x9858
movq %rsi, %rdx
leaq 0x8(%r14), %r15
cmpq %rsi, 0x10(%r14)
je 0x9814
movq (%r15), %r15
movl (%r15), %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jne 0x95bc
movq 0x8(%r15), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x45e8
movq %rax, %rdx
addq $0x10, %r15
jmp 0x9597
movq 0x90(%rbx), %rsi
cmpq %rsi, %r15
jne 0x95d5
movq 0x10(%r14), %r14
cmpq 0xd0(%rbx), %rdx
jne 0x9589
leaq 0x3b62(%rip), %rsi      # 0xd13e
jmp 0x9758
pushq $0x10
jmp 0x96f0
movq 0x30(%rbx), %rax
xorl %ecx, %ecx
cmpb $0x0, 0xa98(%rbx)
movq 0x8(%rax), %rax
sete %cl
cmpq 0xd0(%rbx), %rax
setne 0xa98(%rbx)
shll $0x5, %ecx
movq 0xb0(%rcx,%rbx), %rsi
jmp 0x9858
movb $0x11, %bpl
leaq 0x307a(%rip), %rsi      # 0xc69e
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x4240
testq %rax, %rax
je 0x97fb
movq %rax, %r12
pushq $0x20
popq %rdi
callq *(%rbx)
movq %rax, %r15
testq %rax, %rax
je 0x9658
movb %bpl, (%r15)
movq %r12, 0x8(%r15)
movl $0x1, 0x10(%r15)
testq %r14, %r14
je 0x967e
movq %r14, %rdi
callq 0x40c0
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x4773
movq %rax, 0x18(%r15)
andl $0x0, 0x14(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x588a
jmp 0x970c
movq 0x90(%rbx), %rcx
xorl %r15d, %r15d
movq %rcx, %rax
movq 0xf8(%rbx), %rdx
cmpq %r15, 0x10(%rdx)
jle 0x9719
movl %r15d, %esi
shrl %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movl %r15d, %esi
andl $0x1, %esi
leaq (%rdx,%rsi,8), %r14
addq $0x20, %r14
movq (%r14), %r14
cmpq %rcx, %r14
je 0x96e9
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x45e8
addq $0x10, %r14
movq 0x90(%rbx), %rcx
jmp 0x96c4
incq %r15
jmp 0x969d
pushq $0x30
popq %rcx
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movslq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x53de
cmpq 0x90(%rbx), %rax
je 0x97fb
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x985b
movq 0x100(%rbx), %rsi
jmp 0x9858
movq 0x38(%rbx), %rsi
jmp 0x9858
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rsi
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0xaa1a
jmp 0x9851
leaq 0x3a02(%rip), %rsi      # 0xd15a
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa5c7
movq %rbx, %rdi
movq %rcx, %rsi
jmp 0x985b
leaq 0x2fe7(%rip), %rsi      # 0xc769
movq %rbx, %rdi
callq 0x4a19
cmpl $0x0, 0x50(%rbx)
je 0x982d
movl $0x1, 0xec8(%rbx)
jmp 0x915f
pushq $0x20
popq %rdi
callq *(%rbx)
testq %rax, %rax
je 0x97fb
movq %rax, %r14
movl $0x100, %edi            # imm = 0x100
callq *(%rbx)
testq %rax, %rax
je 0x97fb
movq %rax, %r15
pushq $0x20
popq %rsi
movl $0xff, %edx
movq %rax, %rdi
callq 0x4120
movq %r15, %rax
addq $0xff, %rax
movb $0x0, 0xff(%r15)
movb $0x26, (%r14)
movq %r15, 0x8(%r14)
movq %r15, 0x18(%r14)
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x9689
movq 0xd0(%rbx), %rsi
jmp 0x9858
cvttsd2si 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x4b12
jmp 0x9851
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x60f7
jmp 0x9719
cvttsd2si 0x10(%rax), %rax
movl %eax, 0x10(%rbx)
movq 0x90(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cvttsd2si 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x51cd
movq 0xb0(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa761