// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: Eval_Cycle
static void Eval_Cycle(scheme * sc, enum scheme_opcodes op) {
  sc->op = op;
  for (;;) {
    op_code_info *pcd = dispatch_table + sc->op;
    if (pcd->name != 0) {       /* if built-in function, check arguments */
      char msg[AUXBUFF_SIZE];
      int ok = 1;
      int n = list_length(sc, sc->args);

      /* Check number of arguments */
      if (n < pcd->min_arity) {
        ok = 0;
        snprintf(msg, AUXBUFF_SIZE, "%s: needs%s %d argument(s)",
            pcd->name,
            pcd->min_arity == pcd->max_arity ? "" : " at least",
            pcd->min_arity);
      }
      if (ok && n > pcd->max_arity) {
        ok = 0;
        snprintf(msg, AUXBUFF_SIZE, "%s: needs%s %d argument(s)",
            pcd->name,
            pcd->min_arity == pcd->max_arity ? "" : " at most",
            pcd->max_arity);
      }
      if (ok) {
        if (pcd->arg_tests_encoding != 0) {
          int i = 0;
          int j;
          const char *t = pcd->arg_tests_encoding;
          pointer arglist = sc->args;
          do {
            pointer arg = car(arglist);
            j = (int) t[0];
            if (j == TST_LIST[0]) {
              if (arg != sc->NIL && !is_pair(arg))
                break;
            } else {
              if (!tests[j].fct(arg))
                break;
            }

            if (t[1] != 0) {    /* last test is replicated as necessary */
              t++;
            }
            arglist = cdr(arglist);
            i++;
          } while (i < n);
          if (i < n) {
            ok = 0;
            snprintf(msg, AUXBUFF_SIZE, "%s: argument %d must be: %s",
                pcd->name, i + 1, tests[j].kind);
          }
        }
      }
      if (!ok) {
        if (_Error_1(sc, msg, 0) == sc->NIL) {
          return;
        }
        pcd = dispatch_table + sc->op;
      }
    }
    ok_to_freely_gc(sc);
    if (pcd->func(sc, (enum scheme_opcodes) sc->op) == sc->NIL) {
      return;
    }
    if (sc->no_memory) {
      fprintf(stderr, "No memory!\n");
      sc->retcode = 9;
      return;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
movl $0x1, 0xec8(%rdi)
leaq 0xba63(%rip), %r13      # 0x11520
movslq 0xec8(%rbx), %rax
shlq $0x5, %rax
leaq (%rax,%r13), %r15
movq 0x8(%rax,%r13), %r14
testq %r14, %r14
je 0x5b95
movq 0x30(%rbx), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4e34
movl 0x10(%r15), %r9d
movl 0x14(%r15), %r10d
cmpl %r9d, %eax
jge 0x5b24
cmpl %r10d, %r9d
leaq 0x87f9(%rip), %r8       # 0xe2f9
leaq 0x7bdf(%rip), %rax      # 0xd6e6
cmoveq %rax, %r8
movl $0x100, %esi            # imm = 0x100
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x87bf(%rip), %rdx      # 0xe2de
movq %r14, %rcx
jmp 0x5b5c
cmpl %r10d, %eax
jle 0x5bcf
cmpl %r10d, %r9d
leaq 0x87cc(%rip), %r8       # 0xe303
leaq 0x7ba8(%rip), %rcx      # 0xd6e6
cmoveq %rcx, %r8
movl $0x100, %esi            # imm = 0x100
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x8788(%rip), %rdx      # 0xe2de
movq %r14, %rcx
movl %r10d, %r9d
xorl %eax, %eax
callq 0x40e0
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xad6a
cmpq 0x90(%rbx), %rax
je 0x5ca9
movslq 0xec8(%rbx), %rax
shlq $0x5, %rax
addq %r13, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %r15
movq 0x70(%rbx), %rax
movq 0x90(%rbx), %rcx
movq %rcx, 0x8(%rax)
movl 0xec8(%rbx), %esi
movq %rbx, %rdi
callq *(%r15)
cmpq 0x90(%rbx), %rax
je 0x5ca9
cmpb $0x0, 0xa99(%rbx)
je 0x5abd
jmp 0x5ca1
movq %r15, 0x10(%rsp)
movq 0x18(%r15), %r13
testq %r13, %r13
je 0x5c48
movq %r14, 0x18(%rsp)
cmpl $0x2, %eax
movl $0x1, %r15d
movl %eax, 0xc(%rsp)
cmovgel %eax, %r15d
xorl %r14d, %r14d
movq 0x8(%rbp), %rdi
movsbq (%r13), %r12
cmpq $0x9, %r12
jne 0x5c1a
cmpq 0x90(%rbx), %rdi
je 0x5c2f
movl (%rdi), %eax
andl $0x1f, %eax
cmpl $0x5, %eax
je 0x5c2f
jmp 0x5c54
movq %r12, %rax
shlq $0x4, %rax
leaq 0xd098(%rip), %rcx      # 0x12cc0
callq *(%rax,%rcx)
testl %eax, %eax
je 0x5c54
leaq 0x1(%r13), %rax
cmpb $0x0, 0x1(%r13)
cmovneq %rax, %r13
movq 0x10(%rbp), %rbp
incl %r14d
cmpl %r14d, %r15d
jne 0x5bf6
leaq 0xb8d1(%rip), %r13      # 0x11520
jmp 0x5b90
cmpl 0xc(%rsp), %r14d
leaq 0xb8c0(%rip), %r13      # 0x11520
jge 0x5b90
incl %r14d
shlq $0x4, %r12
leaq 0xd04c(%rip), %rax      # 0x12cc0
movq 0x8(%r12,%rax), %r9
movl $0x100, %esi            # imm = 0x100
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x867f(%rip), %rdx      # 0xe30c
movq 0x18(%rsp), %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x40e0
jmp 0x5b63
movq %rbx, %rdi
callq 0x434c
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq