// File: /workspace/github_c_makefile_star2_O1/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 $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movl $0x1, 0xec8(%rdi)
leaq 0xba03(%rip), %r14      # 0x11520
leaq 0x7bc9(%rip), %r15      # 0xd6ed
leaq 0x87d5(%rip), %r13      # 0xe300
movslq 0xec8(%rbx), %rax
shlq $0x5, %rax
leaq (%r14,%rax), %r12
movq 0x8(%rax,%r14), %rax
testq %rax, %rax
je 0x5ce5
movq %rax, 0x8(%rsp)
movq 0x30(%rbx), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4e5f
movq %r12, %rcx
movl %eax, %r12d
movl 0x10(%rcx), %r9d
movq %rcx, (%rsp)
movl 0x14(%rcx), %eax
cmpl %r9d, %r12d
jge 0x5b97
cmpl %eax, %r9d
movq %r13, %r8
cmoveq %r15, %r8
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0x8755(%rip), %rdx      # 0xe2e5
movq 0x8(%rsp), %rcx
jmp 0x5bc6
cmpl %eax, %r12d
jle 0x5c01
cmpl %eax, %r9d
leaq 0x8764(%rip), %r8       # 0xe30a
cmoveq %r15, %r8
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0x8727(%rip), %rdx      # 0xe2e5
movq 0x8(%rsp), %rcx
movl %eax, %r9d
xorl %eax, %eax
callq 0x40e0
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xaec1
cmpq 0x90(%rbx), %rax
je 0x5bf8
movslq 0xec8(%rbx), %r12
shlq $0x5, %r12
addq %r14, %r12
jmp 0x5cdd
movq (%rsp), %r12
jmp 0x5ce0
movq (%rsp), %rax
movq 0x18(%rax), %r13
testq %r13, %r13
je 0x5cd2
xorl %r14d, %r14d
movq 0x8(%rbp), %rdi
movsbq (%r13), %r15
cmpq $0x9, %r15
jne 0x5c3b
cmpq 0x90(%rbx), %rdi
je 0x5c50
movl (%rdi), %eax
andl $0x1f, %eax
cmpl $0x5, %eax
je 0x5c50
xorl %eax, %eax
jmp 0x5c66
movq %r15, %rax
shlq $0x4, %rax
leaq 0xd077(%rip), %rcx      # 0x12cc0
callq *(%rax,%rcx)
testl %eax, %eax
je 0x5c37
leaq 0x1(%r13), %rax
cmpb $0x0, 0x1(%r13)
cmovneq %rax, %r13
movq 0x10(%rbp), %rbp
incl %r14d
movb $0x1, %al
testb %al, %al
je 0x5c6f
cmpl %r12d, %r14d
jl 0x5c15
cmpl %r12d, %r14d
jge 0x5cc4
incl %r14d
shlq $0x4, %r15
leaq 0xd03e(%rip), %rax      # 0x12cc0
movq 0x8(%r15,%rax), %r9
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0x8678(%rip), %rdx      # 0xe313
movq 0x8(%rsp), %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x40e0
leaq 0xb86f(%rip), %r14      # 0x11520
leaq 0x7a35(%rip), %r15      # 0xd6ed
leaq 0x8641(%rip), %r13      # 0xe300
jmp 0x5bcd
leaq 0xb855(%rip), %r14      # 0x11520
leaq 0x7a1b(%rip), %r15      # 0xd6ed
leaq 0x8627(%rip), %r13      # 0xe300
movq (%rsp), %r12
movb $0x1, %bpl
testb %bpl, %bpl
je 0x5d1f
movq 0x70(%rbx), %rax
movq 0x90(%rbx), %rcx
movq %rcx, 0x8(%rax)
movl 0xec8(%rbx), %esi
movq %rbx, %rdi
callq *(%r12)
cmpq 0x90(%rbx), %rax
je 0x5d1f
cmpb $0x0, 0xa99(%rbx)
je 0x5b2b
movq %rbx, %rdi
callq 0x434c
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq