// File: /workspace/github_c_makefile_star2_O3/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 0x2752(%rip), %rsi      # 0xe07f
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
je 0xba22
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 0xb912
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 0x4909
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 0xbc10
leaq 0x1(%r12), %r15
movzbl (%r12), %r14d
cmpl $0x2b, %r14d
je 0xba3e
cmpl $0x2e, %r14d
je 0xba8b
cmpl $0x2d, %r14d
jne 0xbab4
leaq 0x263d(%rip), %rsi      # 0xe082
movq %r15, %rdi
callq 0x41a0
testl %eax, %eax
je 0xbacf
leaq 0x2630(%rip), %rsi      # 0xe088
movq %r15, %rdi
callq 0x41a0
testl %eax, %eax
je 0xbafc
movb 0x1(%r12), %r14b
cmpb $0x2e, %r14b
jne 0xbb27
leaq 0x3(%r12), %r15
movb 0x2(%r12), %r14b
movl $0x1, %ebp
jmp 0xbb2e
movsbq 0x1(%r12), %r14
callq 0x4300
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
je 0xbb41
leaq 0x2(%r12), %r15
movl $0x1, %ebp
jmp 0xbb5a
movsbq %r14b, %r14
callq 0x4300
movq (%rax), %rax
xorl %ebp, %ebp
testb $0x8, 0x1(%rax,%r14,2)
je 0xbb41
jmp 0xbb5a
xorl %eax, %eax
cmpb $0x2b, %r14b
sete %al
leaq 0x19a1(%rip), %rcx      # 0xd480
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x90(%rbx), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0xbbf6
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 0xbc0c
leaq 0x2(%r12), %r15
xorl %ebp, %ebp
callq 0x4300
movq (%rax), %rax
movsbq %r14b, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0xbb5a
movq %rbx, %rdi
movq %r12, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4909
movb (%r15), %r14b
testb %r14b, %r14b
je 0xbbd4
callq 0x4300
movq (%rax), %rax
xorl %ecx, %ecx
movsbq %r14b, %rdx
testb $0x8, 0x1(%rax,%rdx,2)
jne 0xbbc8
cmpb $0x2e, %r14b
jne 0xbb88
testl %ebp, %ebp
movl $0x1, %ebp
je 0xbbc8
jmp 0xbb41
andb $-0x21, %r14b
cmpb $0x45, %r14b
jne 0xbb41
testl %ecx, %ecx
jne 0xbb41
movzbl 0x1(%r15), %ecx
incq %r15
movl $0x1, %ebp
cmpl $0x2b, %ecx
je 0xbbad
cmpl $0x2d, %ecx
jne 0xbbb4
movl $0x1, %ecx
jmp 0xbbc8
movsbq %cl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
movl $0x1, %ecx
je 0xbb41
movb 0x1(%r15), %r14b
incq %r15
testb %r14b, %r14b
jne 0xbb6c
movq 0x90(%rbx), %r15
movq %r12, %rdi
testl %ebp, %ebp
je 0xbc1f
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 0xbc10