// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: mk_atom
static pointer mk_atom(scheme * sc, char *q) {
  char c, *p;
  int has_dec_point = 0;
  int has_fp_exp = 0;

#if USE_COLON_HOOK
  if ((p = strstr(q, "::")) != 0) {
    *p = 0;
    return cons(sc, sc->COLON_HOOK,
        cons(sc,
            cons(sc,
                sc->QUOTE,
                cons(sc, mk_atom(sc, p + 2), sc->NIL)),
            cons(sc, mk_symbol(sc, str_to_maybe_lower(q)), sc->NIL)));
  }
#endif

  p = q;
  c = *p++;
  if ((c == '+') || (c == '-')) {
    if (str_eq(p, "inf.0")) {
      return mk_real(sc, (c == '+' ? 1 : -1) / 0.0);
    } else if (str_eq(p, "nan.0")) {
      return mk_real(sc, 0 / 0.0);
    }
    c = *p++;
    if (c == '.') {
      has_dec_point = 1;
      c = *p++;
    }
    if (!isdigit(c)) {
      return (mk_symbol(sc, str_to_maybe_lower(q)));
    }
  } else if (c == '.') {
    has_dec_point = 1;
    c = *p++;
    if (!isdigit(c)) {
      return (mk_symbol(sc, str_to_maybe_lower(q)));
    }
  } else if (!isdigit(c)) {
    return (mk_symbol(sc, str_to_maybe_lower(q)));
  }

  for (; (c = *p) != 0; ++p) {
    if (!isdigit(c)) {
      if (c == '.') {
        if (!has_dec_point) {
          has_dec_point = 1;
          continue;
        }
      } else if ((c == 'e') || (c == 'E')) {
        if (!has_fp_exp) {
          has_fp_exp = 1;
          has_dec_point = 1;    /* decimal point illegal further */
          p++;
          if ((*p == '-') || (*p == '+') || isdigit(*p)) {
            continue;
          }
        }
      }
      return (mk_symbol(sc, str_to_maybe_lower(q)));
    }
  }
  if (has_dec_point) {
    return mk_real(sc, atof(q));
  }
  return (mk_integer(sc, atol(q)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x25cc(%rip), %rsi      # 0xe086
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
je 0xbbaf
movb $0x0, (%rax)
movq %r12, 0x10(%rsp)
movq 0x118(%rbx), %r12
movq 0x140(%rbx), %rcx
movq %rcx, 0x8(%rsp)
addq $0x2, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0xba9f
movq %rax, %r13
movq 0x90(%rbx), %rbp
movq %rbx, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x4689
movq %rax, %r14
movl $0x5, %r15d
movl %r15d, (%rax)
movq %r13, 0x8(%rax)
movq %rbp, 0x10(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4689
movq %rax, %r13
movl %r15d, (%rax)
movq %r12, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x4908
movq %rax, %r14
movq 0x90(%rbx), %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x4689
movq %rax, %rbp
movl %r15d, (%rax)
movq %r14, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4689
movq %rax, %r14
movl %r15d, (%rax)
movq %r13, 0x8(%rax)
movq %rbp, 0x10(%rax)
movq %rbx, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4689
movl %r15d, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, 0x10(%rax)
jmp 0xbd9d
leaq 0x1(%r12), %r15
movzbl (%r12), %r14d
cmpl $0x2b, %r14d
je 0xbbcb
cmpl $0x2e, %r14d
je 0xbc18
cmpl $0x2d, %r14d
jne 0xbc41
leaq 0x24b7(%rip), %rsi      # 0xe089
movq %r15, %rdi
callq 0x41a0
testl %eax, %eax
je 0xbc5c
leaq 0x24aa(%rip), %rsi      # 0xe08f
movq %r15, %rdi
callq 0x41a0
testl %eax, %eax
je 0xbc89
movb 0x1(%r12), %r14b
cmpb $0x2e, %r14b
jne 0xbcb4
leaq 0x3(%r12), %r15
movb 0x2(%r12), %r14b
movl $0x1, %ebp
jmp 0xbcbb
movsbq 0x1(%r12), %r14
callq 0x4300
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
je 0xbcce
leaq 0x2(%r12), %r15
movl $0x1, %ebp
jmp 0xbce7
movsbq %r14b, %r14
callq 0x4300
movq (%rax), %rax
xorl %ebp, %ebp
testb $0x8, 0x1(%rax,%r14,2)
je 0xbcce
jmp 0xbce7
xorl %eax, %eax
cmpb $0x2b, %r14b
sete %al
leaq 0x1814(%rip), %rcx      # 0xd480
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0xbd83
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4689
movl $0x4002, (%rax)         # imm = 0x4002
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
movq %rcx, 0x10(%rax)
jmp 0xbd99
leaq 0x2(%r12), %r15
xorl %ebp, %ebp
callq 0x4300
movq (%rax), %rax
movsbq %r14b, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0xbce7
movq %rbx, %rdi
movq %r12, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4908
movb (%r15), %r14b
testb %r14b, %r14b
je 0xbd61
callq 0x4300
movq (%rax), %rax
xorl %ecx, %ecx
movsbq %r14b, %rdx
testb $0x8, 0x1(%rax,%rdx,2)
jne 0xbd55
cmpb $0x2e, %r14b
jne 0xbd15
testl %ebp, %ebp
movl $0x1, %ebp
je 0xbd55
jmp 0xbcce
andb $-0x21, %r14b
cmpb $0x45, %r14b
jne 0xbcce
testl %ecx, %ecx
jne 0xbcce
movzbl 0x1(%r15), %ecx
incq %r15
movl $0x1, %ebp
cmpl $0x2b, %ecx
je 0xbd3a
cmpl $0x2d, %ecx
jne 0xbd41
movl $0x1, %ecx
jmp 0xbd55
movsbq %cl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
movl $0x1, %ecx
je 0xbcce
movb 0x1(%r15), %r14b
incq %r15
testb %r14b, %r14b
jne 0xbcf9
movq 0x90(%rbx), %r15
movq %r12, %rdi
testl %ebp, %ebp
je 0xbdac
callq 0x4080
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x4689
movl $0x4002, (%rax)         # imm = 0x4002
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movb $0x0, 0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4220
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x4689
movl $0x4002, (%rax)         # imm = 0x4002
movq %r14, 0x10(%rax)
movb $0x1, 0x8(%rax)
jmp 0xbd9d