// File: /workspace/github_c_makefile_star2_O0/RodionGork[P]tinyscheme/scheme.c
// Function: atom2str
static void atom2str(scheme * sc, pointer l, int f, char **pp, int *plen) {
  char *p;

  *plen = -1;
  if (l == sc->NIL) {
    p = "()";
  } else if (l == sc->T) {
    p = "#t";
  } else if (l == sc->F) {
    p = "#f";
  } else if (l == sc->EOF_OBJ) {
    p = "#<EOF>";
  } else if (is_port(l)) {
    p = "#<PORT>";
  } else if (is_number(l)) {
    p = sc->strbuff;
    if (f <= 1 || f == 10) {    /* f is the base for numbers if > 1 */
      if (num_is_integer(l)) {
        sprintf(p, "%ld", ivalue_unchecked(l));
      } else {
        if (rvalue_unchecked(l) * 0.0 != 0.0) { // is +/-inf or nan
          if (rvalue_unchecked(l) > 0) {
            strcpy(p, "+inf");
          } else if (rvalue_unchecked(l) < 0) {
            strcpy(p, "-inf");
          } else {
            strcpy(p, "+nan");
          }
        } else {
          sprintf(p, "%.10g", rvalue_unchecked(l));
        }
        /* r5rs says there must be a '.' (unless 'e'?) */
        f = strcspn(p, ".e");
        if (p[f] == 0) {
          p[f] = '.';           /* not found, so add '.0' at the end */
          p[f + 1] = '0';
          p[f + 2] = 0;
        }
      }
    } else {
      long v = ivalue(l);
      if (f >= 2 && f <= 36) {
        long_to_str(v, p, f);
      } else {
        *p = '\0';
      }
    }
  } else if (is_string(l)) {
    if (!f) {
      p = strvalue(l);
      if (IS_ASCII(*p)) {
        *plen = strlength(l);
      } else {
        string_to_utf8(sc, strvalue(l), strlength(l));
        p = sc->strbuff;
      }
    } else {                    /* Hack, uses the fact that printing is needed */
      *pp = sc->strbuff;
      *plen = 0;
      printslashstring(sc, strvalue(l), strlength(l));
      return;
    }
  } else if (is_character(l)) {
    int c = charvalue(l);
    p = sc->strbuff;
    if (!f) {
      char_to_utf8(c, p, plen);
    } else {
      switch (c) {
      case ' ':
        p = "#\\space";
        break;
      case '\n':
        p = "#\\newline";
        break;
      case '\r':
        p = "#\\return";
        break;
      case '\t':
        p = "#\\tab";
        break;
      default:
        if (c < 32 || c >= 0x80) {
          sprintf(p, "#\\x%x", c);
          break;
        }
        sprintf(p, "#\\%c", c);
        break;
      }
    }
  } else if (is_symbol(l)) {
    p = symname(l);
  } else if (is_proc(l)) {
    p = sc->strbuff;
    snprintf(p, sc->strbuff_size, "#<%s PROCEDURE %ld>", procname(l), procnum(l));
  } else if (is_macro(l)) {
    p = "#<MACRO>";
  } else if (is_closure(l)) {
    p = "#<CLOSURE>";
  } else if (is_promise(l)) {
    p = "#<PROMISE>";
  } else if (is_foreign(l)) {
    p = sc->strbuff;
    snprintf(p, sc->strbuff_size, "#<FOREIGN PROCEDURE %ld>", procnum(l));
  } else if (is_continuation(l)) {
    p = "#<CONTINUATION>";
  } else if (is_bvector(l)) {
    p = sc->strbuff;
    sprintf(p, "#u8(len=%d)", strlength(l));
  } else {
    p = "#<ERROR>";
  }
  *pp = p;
  if (*plen < 0) {
    *plen = strlen(p);
  }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq 0x50(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jne 0x14d2b
leaq 0x395f(%rip), %rax      # 0x18680
movq %rax, 0x48(%rsp)
jmp 0x152e8
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jne 0x14d4f
leaq 0x3675(%rip), %rax      # 0x183ba
movq %rax, 0x48(%rsp)
jmp 0x152e6
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
cmpq 0xd0(%rcx), %rax
jne 0x14d73
leaq 0x3654(%rip), %rax      # 0x183bd
movq %rax, 0x48(%rsp)
jmp 0x152e4
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
cmpq 0xf0(%rcx), %rax
jne 0x14d97
leaq 0x3633(%rip), %rax      # 0x183c0
movq %rax, 0x48(%rsp)
jmp 0x152e2
movq 0x68(%rsp), %rdi
callq 0x4650
cmpl $0x0, %eax
je 0x14db7
leaq 0x361a(%rip), %rax      # 0x183c7
movq %rax, 0x48(%rsp)
jmp 0x152e0
movq 0x68(%rsp), %rdi
callq 0x4460
cmpl $0x0, %eax
je 0x14f52
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rax
movq %rax, 0x48(%rsp)
cmpl $0x1, 0x64(%rsp)
jle 0x14ded
cmpl $0xa, 0x64(%rsp)
jne 0x14f11
movq 0x68(%rsp), %rdi
callq 0x4500
cmpl $0x0, %eax
je 0x14e1d
movq 0x48(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rdx
leaq 0x28b6(%rip), %rsi      # 0x176c7
movb $0x0, %al
callq 0x4280
jmp 0x14f0f
movq 0x68(%rsp), %rax
xorps %xmm0, %xmm0
mulsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x14e37
jp 0x14e37
jmp 0x14e94
movq 0x68(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x14e5d
movq 0x48(%rsp), %rdi
leaq 0x3579(%rip), %rsi      # 0x183cf
callq 0x4040
jmp 0x14e92
movq 0x68(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x10(%rax), %xmm0
jbe 0x14e7f
movq 0x48(%rsp), %rdi
leaq 0x355c(%rip), %rsi      # 0x183d4
callq 0x4040
jmp 0x14e90
movq 0x48(%rsp), %rdi
leaq 0x354e(%rip), %rsi      # 0x183d9
callq 0x4040
jmp 0x14e92
jmp 0x14eb1
movq 0x48(%rsp), %rdi
movq 0x68(%rsp), %rax
movsd 0x10(%rax), %xmm0
leaq 0x3534(%rip), %rsi      # 0x183de
movb $0x1, %al
callq 0x4280
movq 0x48(%rsp), %rdi
leaq 0x3527(%rip), %rsi      # 0x183e4
callq 0x4160
movl %eax, 0x64(%rsp)
movq 0x48(%rsp), %rax
movslq 0x64(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x14f0d
movq 0x48(%rsp), %rax
movslq 0x64(%rsp), %rcx
movb $0x2e, (%rax,%rcx)
movq 0x48(%rsp), %rax
movl 0x64(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movq 0x48(%rsp), %rax
movl 0x64(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x14f0f
jmp 0x14f4d
movq 0x68(%rsp), %rdi
callq 0x4510
movq %rax, 0x40(%rsp)
cmpl $0x2, 0x64(%rsp)
jl 0x14f43
cmpl $0x24, 0x64(%rsp)
jg 0x14f43
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x64(%rsp), %edx
callq 0x5410
jmp 0x14f4b
movq 0x48(%rsp), %rax
movb $0x0, (%rax)
jmp 0x14f4d
jmp 0x152de
movq 0x68(%rsp), %rdi
callq 0x4400
cmpl $0x0, %eax
je 0x1500d
cmpl $0x0, 0x64(%rsp)
jne 0x14fc9
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movsbl (%rax), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0x14f9b
movq 0x68(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
jmp 0x14fc7
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x68(%rsp), %rax
movl 0x10(%rax), %edx
callq 0x15490
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x15008
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movl $0x0, (%rax)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x68(%rsp), %rax
movl 0x10(%rax), %edx
callq 0x155c0
jmp 0x15312
jmp 0x152dc
movq 0x68(%rsp), %rdi
callq 0x45f0
cmpl $0x0, %eax
je 0x15106
movq 0x68(%rsp), %rdi
callq 0x4640
movl %eax, 0x3c(%rsp)
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rax
movq %rax, 0x48(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x1505e
movl 0x3c(%rsp), %edi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x15830
jmp 0x15101
movl 0x3c(%rsp), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, 0x30(%rsp)
subl $0x17, %eax
ja 0x150be
movq 0x30(%rsp), %rax
leaq 0x245f(%rip), %rcx      # 0x174dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x335a(%rip), %rax      # 0x183e7
movq %rax, 0x48(%rsp)
jmp 0x150ff
leaq 0x3354(%rip), %rax      # 0x183ef
movq %rax, 0x48(%rsp)
jmp 0x150ff
leaq 0x3350(%rip), %rax      # 0x183f9
movq %rax, 0x48(%rsp)
jmp 0x150ff
leaq 0x334b(%rip), %rax      # 0x18402
movq %rax, 0x48(%rsp)
jmp 0x150ff
cmpl $0x20, 0x3c(%rsp)
jl 0x150cf
cmpl $0x80, 0x3c(%rsp)
jl 0x150e8
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %edx
leaq 0x3329(%rip), %rsi      # 0x18408
movb $0x0, %al
callq 0x4280
jmp 0x150ff
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %edx
leaq 0x3316(%rip), %rsi      # 0x1840e
movb $0x0, %al
callq 0x4280
jmp 0x15101
jmp 0x152da
movq 0x68(%rsp), %rdi
callq 0x4790
cmpl $0x0, %eax
je 0x15129
movq 0x68(%rsp), %rdi
callq 0x47b0
movq %rax, 0x48(%rsp)
jmp 0x152d8
movq 0x68(%rsp), %rdi
callq 0x47f0
cmpl $0x0, %eax
je 0x151a2
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rax
movslq 0xea8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
callq 0x15960
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rdi
callq 0x4510
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
movq %rax, %r8
leaq 0x327d(%rip), %rdx      # 0x18413
movb $0x0, %al
callq 0x40c0
jmp 0x152d6
movq 0x68(%rsp), %rdi
callq 0x4870
cmpl $0x0, %eax
je 0x151c2
leaq 0x326f(%rip), %rax      # 0x18427
movq %rax, 0x48(%rsp)
jmp 0x152d4
movq 0x68(%rsp), %rdi
callq 0x4850
cmpl $0x0, %eax
je 0x151e2
leaq 0x3258(%rip), %rax      # 0x18430
movq %rax, 0x48(%rsp)
jmp 0x152d2
movq 0x68(%rsp), %rdi
callq 0x48d0
cmpl $0x0, %eax
je 0x15202
leaq 0x3243(%rip), %rax      # 0x1843b
movq %rax, 0x48(%rsp)
jmp 0x152d0
movq 0x68(%rsp), %rdi
callq 0x4810
cmpl $0x0, %eax
je 0x15264
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rax
movslq 0xea8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rdi
callq 0x4510
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rcx
leaq 0x31eb(%rip), %rdx      # 0x18446
movb $0x0, %al
callq 0x40c0
jmp 0x152ce
movq 0x68(%rsp), %rdi
callq 0x48b0
cmpl $0x0, %eax
je 0x15281
leaq 0x31e5(%rip), %rax      # 0x1845f
movq %rax, 0x48(%rsp)
jmp 0x152cc
movq 0x68(%rsp), %rdi
callq 0x4440
cmpl $0x0, %eax
je 0x152be
movq 0x70(%rsp), %rax
movq 0xea0(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq 0x68(%rsp), %rax
movl 0x10(%rax), %edx
leaq 0x31ba(%rip), %rsi      # 0x1846f
movb $0x0, %al
callq 0x4280
jmp 0x152ca
leaq 0x31b6(%rip), %rax      # 0x1847b
movq %rax, 0x48(%rsp)
jmp 0x152cc
jmp 0x152ce
jmp 0x152d0
jmp 0x152d2
jmp 0x152d4
jmp 0x152d6
jmp 0x152d8
jmp 0x152da
jmp 0x152dc
jmp 0x152de
jmp 0x152e0
jmp 0x152e2
jmp 0x152e4
jmp 0x152e6
jmp 0x152e8
movq 0x48(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
cmpl $0x0, (%rax)
jge 0x15312
movq 0x48(%rsp), %rdi
callq 0x40a0
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
addq $0x78, %rsp
retq
nopw (%rax,%rax)