// File: /workspace/github_c_makefile_star2_O2/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 0xac52(%rip), %r13      # 0x10520
movslq 0xec8(%rbx), %rax
shlq $0x5, %rax
leaq (%rax,%r13), %r15
movq 0x8(%rax,%r13), %r14
testq %r14, %r14
je 0x59a5
movq 0x30(%rbx), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4cf1
movl %eax, %ecx
movl 0x10(%r15), %r9d
movl 0x14(%r15), %eax
cmpl %r9d, %ecx
jge 0x5937
cmpl %eax, %r9d
leaq 0x79b6(%rip), %r8       # 0xd2c9
leaq 0x6d9c(%rip), %rax      # 0xc6b6
cmoveq %rax, %r8
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r15
movq %r15, %rdi
leaq 0x797c(%rip), %rdx      # 0xd2ae
movq %r14, %rcx
jmp 0x596e
cmpl %eax, %ecx
jle 0x59df
cmpl %eax, %r9d
leaq 0x798a(%rip), %r8       # 0xd2d3
leaq 0x6d66(%rip), %rcx      # 0xc6b6
cmoveq %rcx, %r8
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r15
movq %r15, %rdi
leaq 0x7946(%rip), %rdx      # 0xd2ae
movq %r14, %rcx
movl %eax, %r9d
xorl %eax, %eax
callq 0x40e0
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xa5c7
cmpq 0x90(%rbx), %rax
je 0x5acd
movslq 0xec8(%rbx), %rax
shlq $0x5, %rax
addq %r13, %rax
movq %rax, (%rsp)
movq (%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 0x5acd
cmpb $0x0, 0xa99(%rbx)
je 0x58ce
jmp 0x5aaa
movq %r15, (%rsp)
movq 0x18(%r15), %r13
testq %r13, %r13
je 0x5a53
movq %r14, 0x8(%rsp)
pushq $0x1
popq %rax
movl %eax, %r14d
movq 0x8(%rbp), %rdi
movsbq (%r13), %r12
cmpq $0x9, %r12
jne 0x5a1b
cmpq 0x90(%rbx), %rdi
je 0x5a36
movl (%rdi), %eax
andl $0x1f, %eax
cmpl $0x5, %eax
je 0x5a36
jmp 0x5a5f
movq %r12, %rax
shlq $0x4, %rax
movl %ecx, %r15d
leaq 0xc294(%rip), %rcx      # 0x11cc0
callq *(%rax,%rcx)
movl %r15d, %ecx
testl %eax, %eax
je 0x5a5f
leaq 0x1(%r13), %rax
cmpb $0x0, 0x1(%r13)
cmovneq %rax, %r13
movq 0x10(%rbp), %rbp
leal 0x1(%r14), %eax
cmpl %ecx, %r14d
movl %eax, %r14d
jl 0x59f7
leaq 0xaac6(%rip), %r13      # 0x10520
jmp 0x59a1
leal -0x1(%r14), %eax
cmpl %ecx, %eax
leaq 0xaab4(%rip), %r13      # 0x10520
jge 0x59a1
shlq $0x4, %r12
leaq 0xc243(%rip), %rax      # 0x11cc0
movq 0x8(%r12,%rax), %r9
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r15
movq %r15, %rdi
leaq 0x7846(%rip), %rdx      # 0xd2dc
movq 0x8(%rsp), %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x40e0
jmp 0x5975
movq 0xc547(%rip), %rax      # 0x11ff8
movq (%rax), %rcx
leaq 0x783d(%rip), %rdi      # 0xd2f8
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x42a0
movl $0x9, 0x10(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq