// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: make_sharp_constant
static s7_pointer make_sharp_constant(s7_scheme *sc, char *name, bool with_error)
    {
        /* name is the stuff after the '#', return sc->nil if not a recognized #... entity */

        if ((name[0] == 't') &&
                ((name[1] == '\0') || (strings_are_equal(name, "true"))))
            return(sc->T);

        if ((name[0] == 'f') &&
                ((name[1] == '\0') || (strings_are_equal(name, "false"))))
            return(sc->F);

        if (is_not_null(slot_value(sc->sharp_readers)))
        {
            s7_pointer x;
            x = check_sharp_readers(sc, name);
            if (x != sc->F)
                return(x);
        }

        if ((name[0] == '\0') || name[1] == '\0')
            return(unknown_sharp_constant(sc, name));

        switch (name[0])
        {
            /* -------- #< ... > -------- */
            case '<':
                if (strings_are_equal(name, "<unspecified>"))
                    return(sc->unspecified);

                if (strings_are_equal(name, "<undefined>"))
                    return(sc->undefined);

                if (strings_are_equal(name, "<eof>"))
                    return(eof_object);

                return(unknown_sharp_constant(sc, name));

                /* -------- #o #x #b -------- */
            case 'o':   /* #o (octal) */
            case 'x':   /* #x (hex) */
            case 'b':   /* #b (binary) */
                return(make_atom(sc, (char *)(name + 1), (name[0] == 'o') ? 8 : ((name[0] == 'x') ? 16 : 2), NO_SYMBOLS, with_error));

                /* -------- #_... -------- */
            case '_':
                {
                    s7_pointer sym;
                    sym = make_symbol(sc, (char *)(name + 1));
                    if ((!is_gensym(sym)) && (is_slot(initial_slot(sym))))
                        return(slot_value(initial_slot(sym)));
                    /* here we should not necessarily raise an error that *_... is undefined.  reader-cond, for example, needs to
                     *    read undefined #_ vals that it will eventually discard.
                     */
                    return(make_unknown(sc, name));    /* (define x (with-input-from-string "(#_asdf 1 2)" read)) (type-of (car x)) -> undefined? */
                }

                /* -------- #\... -------- */
            case '\\':
                if (name[2] == 0)                             /* the most common case: #\a */
                    return(chars[(uint8_t)(name[1])]);
                /* not uint32_t here!  (uint32_t)255 (as a char) returns -1!! */
                switch (name[1])
                {
                    case 'n':
                        if ((strings_are_equal(name + 1, "null")) ||
                                (strings_are_equal(name + 1, "nul")))
                            return(chars[0]);

                        if (strings_are_equal(name + 1, "newline"))
                            return(chars[(uint8_t)'\n']);
                        break;

                    case 's': if (strings_are_equal(name + 1, "space"))     return(chars[(uint8_t)' ']);  break;
                    case 'r': if (strings_are_equal(name + 1, "return"))    return(chars[(uint8_t)'\r']); break;
                    case 'l': if (strings_are_equal(name + 1, "linefeed"))  return(chars[(uint8_t)'\n']); break;
                    case 't': if (strings_are_equal(name + 1, "tab"))       return(chars[(uint8_t)'\t']); break;
                    case 'a': if (strings_are_equal(name + 1, "alarm"))     return(chars[7]);             break;
                    case 'b': if (strings_are_equal(name + 1, "backspace")) return(chars[8]);             break;
                    case 'e': if (strings_are_equal(name + 1, "escape"))    return(chars[0x1b]);          break;
                    case 'd': if (strings_are_equal(name + 1, "delete"))    return(chars[0x7f]);          break;

                    case 'x':
                                  /* #\x is just x, but apparently #\x<num> is int->char? #\x65 -> #\e, and #\xcebb is lambda? */
                              {
                                  /* sscanf here misses errors like #\x1.4, but make_atom misses #\x6/3,
                                   *   #\x#b0, #\x#e0.0, #\x-0, #\x#e0e100 etc, so we have to do it at an even lower level.
                                   * another problem: #\xbdca2cbec overflows so lval is -593310740 -> segfault unless caught
                                   */
                                  bool happy = true;
                                  char *tmp;
                                  int32_t lval = 0;

                                  tmp = (char *)(name + 2);
                                  while ((*tmp) && (happy) && (lval >= 0) && (lval < 256))
                                  {
                                      int32_t dig;
                                      dig = digits[(int32_t)(*tmp++)];
                                      if (dig < 16)
                                          lval = dig + (lval * 16);
                                      else happy = false;
                                  }
                                  if ((happy) &&
                                          (lval < 256) &&
                                          (lval >= 0))
                                      return(chars[lval]);
                              }
                              break;
                }
        }
        return(unknown_sharp_constant(sc, name));
    }

// Assembly:
subq $0x78, %rsp
movb %dl, %al
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0xcbcbe
movq 0x60(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0xcbca8
movq 0x60(%rsp), %rdi
leaq 0x115e44(%rip), %rsi    # 0x1e1ae1
callq 0xc0a00
testb $0x1, %al
jne 0xcbca8
jmp 0xcbcbe
movq 0x68(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0xcbd06
movq 0x60(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0xcbcf0
movq 0x60(%rsp), %rdi
leaq 0x115e02(%rip), %rsi    # 0x1e1ae7
callq 0xc0a00
testb $0x1, %al
jne 0xcbcf0
jmp 0xcbd06
movq 0x68(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x68(%rsp), %rax
movq 0x1e0(%rax), %rax
movq 0x10(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0xcbd5c
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xcdec0
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0xcbd5a
movq 0x50(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcbd5c
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xcbd77
movq 0x60(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0xcbd90
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xce040
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x2c(%rsp)
subl $0x3c, %eax
je 0xcbdf1
jmp 0xcbda3
movl 0x2c(%rsp), %eax
subl $0x5c, %eax
je 0xcbf7e
jmp 0xcbdb2
movl 0x2c(%rsp), %eax
subl $0x5f, %eax
je 0xcbf01
jmp 0xcbdc1
movl 0x2c(%rsp), %eax
subl $0x62, %eax
je 0xcbe8c
jmp 0xcbdd0
movl 0x2c(%rsp), %eax
subl $0x6f, %eax
je 0xcbe8c
jmp 0xcbddf
movl 0x2c(%rsp), %eax
subl $0x78, %eax
je 0xcbe8c
jmp 0xcc2e6
movq 0x60(%rsp), %rdi
leaq 0x117b0c(%rip), %rsi    # 0x1e3909
callq 0xc0a00
testb $0x1, %al
jne 0xcbe08
jmp 0xcbe1e
movq 0x68(%rsp), %rax
movq 0x130(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rdi
leaq 0x115ca3(%rip), %rsi    # 0x1e1acd
callq 0xc0a00
testb $0x1, %al
jne 0xcbe35
jmp 0xcbe4b
movq 0x68(%rsp), %rax
movq 0x128(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rdi
leaq 0x115c83(%rip), %rsi    # 0x1e1ada
callq 0xc0a00
testb $0x1, %al
jne 0xcbe62
jmp 0xcbe73
movq 0x14a427(%rip), %rax    # 0x216290
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xce040
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x6f, %eax
jne 0xcbebc
movl $0x8, %eax
movl %eax, 0x14(%rsp)
jmp 0xcbed8
movq 0x60(%rsp), %rax
movsbl (%rax), %edx
movl $0x2, %eax
movl $0x10, %ecx
cmpl $0x78, %edx
cmovel %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %edx
movb 0x5f(%rsp), %al
xorl %ecx, %ecx
andb $0x1, %al
movzbl %al, %r8d
callq 0xca470
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq $0x1, %rsi
callq 0xb400
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
andq $0x20000000, %rax       # imm = 0x20000000
cmpq $0x0, %rax
jne 0xcbf65
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0xcbf65
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xce1b0
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0xcbfaa
movq 0x14e5f5(%rip), %rax    # 0x21a588
movq 0x60(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rax
movsbl 0x1(%rax), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x17, %eax
ja 0xcc2e4
movq 0x8(%rsp), %rax
leaq 0x113622(%rip), %rcx    # 0x1df5f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x11750f(%rip), %rsi    # 0x1e34fa
callq 0xc0a00
testb $0x1, %al
jne 0xcc00f
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x12241d(%rip), %rsi    # 0x1ee421
callq 0xc0a00
testb $0x1, %al
jne 0xcc00f
jmp 0xcc023
movq 0x14e572(%rip), %rax    # 0x21a588
movq (%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x126b47(%rip), %rsi    # 0x1f2b7a
callq 0xc0a00
testb $0x1, %al
jne 0xcc03e
jmp 0xcc053
movq 0x14e543(%rip), %rax    # 0x21a588
movq 0x50(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x126b0a(%rip), %rsi    # 0x1f2b72
callq 0xc0a00
testb $0x1, %al
jne 0xcc073
jmp 0xcc08b
movq 0x14e50e(%rip), %rax    # 0x21a588
movq 0x100(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x126ae4(%rip), %rsi    # 0x1f2b84
callq 0xc0a00
testb $0x1, %al
jne 0xcc0ab
jmp 0xcc0c0
movq 0x14e4d6(%rip), %rax    # 0x21a588
movq 0x68(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x122350(%rip), %rsi    # 0x1ee425
callq 0xc0a00
testb $0x1, %al
jne 0xcc0e0
jmp 0xcc0f5
movq 0x14e4a1(%rip), %rax    # 0x21a588
movq 0x50(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x126a83(%rip), %rsi    # 0x1f2b8d
callq 0xc0a00
testb $0x1, %al
jne 0xcc115
jmp 0xcc12a
movq 0x14e46c(%rip), %rax    # 0x21a588
movq 0x48(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x126a6d(%rip), %rsi    # 0x1f2bac
callq 0xc0a00
testb $0x1, %al
jne 0xcc14a
jmp 0xcc15f
movq 0x14e437(%rip), %rax    # 0x21a588
movq 0x38(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x126a40(%rip), %rsi    # 0x1f2bb4
callq 0xc0a00
testb $0x1, %al
jne 0xcc17f
jmp 0xcc194
movq 0x14e402(%rip), %rax    # 0x21a588
movq 0x40(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x1269f1(%rip), %rsi    # 0x1f2b9a
callq 0xc0a00
testb $0x1, %al
jne 0xcc1b4
jmp 0xcc1cc
movq 0x14e3cd(%rip), %rax    # 0x21a588
movq 0xd8(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x1269c2(%rip), %rsi    # 0x1f2ba3
callq 0xc0a00
testb $0x1, %al
jne 0xcc1ec
jmp 0xcc204
movq 0x14e395(%rip), %rax    # 0x21a588
movq 0x3f8(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
movb $0x1, 0x47(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x60(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
je 0xcc260
xorl %eax, %eax
testb $0x1, 0x47(%rsp)
movb %al, 0x7(%rsp)
je 0xcc260
xorl %eax, %eax
cmpl $0x0, 0x34(%rsp)
movb %al, 0x7(%rsp)
jl 0xcc260
cmpl $0x100, 0x34(%rsp)      # imm = 0x100
setl %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xcc26a
jmp 0xcc2b3
movq 0x151727(%rip), %rax    # 0x21d998
movq 0x38(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x38(%rsp)
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x30(%rsp)
cmpl $0x10, 0x30(%rsp)
jge 0xcc2a9
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
shll $0x4, %ecx
addl %ecx, %eax
movl %eax, 0x34(%rsp)
jmp 0xcc2ae
movb $0x0, 0x47(%rsp)
jmp 0xcc224
testb $0x1, 0x47(%rsp)
je 0xcc2e2
cmpl $0x100, 0x34(%rsp)      # imm = 0x100
jge 0xcc2e2
cmpl $0x0, 0x34(%rsp)
jl 0xcc2e2
movq 0x14e2b6(%rip), %rax    # 0x21a588
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x70(%rsp)
jmp 0xcc2fa
jmp 0xcc2e4
jmp 0xcc2e6
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xce040
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)