// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: new_symbol
static inline s7_pointer new_symbol(s7_scheme *sc, const char *name, s7_int len, uint64_t hash, uint32_t location)
    {
        /* name might not be null-terminated, these are permanent symbols even in s7_gensym; g_gensym handles everything separately */
        s7_pointer x, str, p;
        uint8_t *base, *val;

        base = alloc_symbol(sc);
        x = (s7_pointer)base;
        str = (s7_pointer)(base + sizeof(s7_cell));
        p = (s7_pointer)(base + 2 * sizeof(s7_cell));
        val = (uint8_t *)alloc_permanent_string(sc, len + 1);
        memcpy((void *)val, (void *)name, len);
        val[len] = '\0';

        typeflag(str) = T_STRING | T_IMMUTABLE | T_UNHEAP;       /* avoid debugging confusion involving set_type (also below) */
        string_length(str) = len;
        string_value(str) = (char *)val;
        string_hash(str) = hash;

        typeflag(x) = T_SYMBOL | T_UNHEAP;
        symbol_set_name_cell(x, str);
        set_global_slot(x, sc->undefined);                       /* was sc->nil */
        symbol_info(x) = (block_t *)(base + 3 * sizeof(s7_cell));
        set_initial_slot(x, sc->undefined);
        symbol_set_local_unchecked(x, 0LL, sc->nil);
        symbol_set_tag(x, 0);
        symbol_set_tag2(x, 0);
        symbol_set_ctr(x, 0);
        symbol_clear_type(x);

        if (len > 1)                                             /* not 0, otherwise : is a keyword */
        {
            if ((name[0] == ':') || (name[len - 1] == ':'))      /* see s7test under keyword? for troubles if both colons are present */
            {
                s7_pointer slot, ksym;
                set_type_bit(x, T_IMMUTABLE | T_KEYWORD | T_GLOBAL);
                ksym = make_symbol_with_length(sc, (name[0] == ':') ? (char *)(name + 1) : name, len - 1);
                keyword_set_symbol(x, ksym);
                set_has_keyword(ksym);
                /* the keyword symbol needs to be permanent (not a gensym) else we have to laboriously gc-protect it */
                if ((is_gensym(ksym)) &&
                        (in_heap(ksym)))
                    s7_remove_from_heap(sc, ksym);
                slot = make_permanent_slot(sc, x, x);
                set_global_slot(x, slot);
                set_local_slot(x, slot);
            }
        }

        typeflag(p) = T_PAIR | T_IMMUTABLE | T_UNHEAP;  /* add x to the symbol table */
        set_car(p, x);
        set_cdr(p, vector_element(sc->symbol_table, location));
        vector_element(sc->symbol_table, location) = p;
        pair_set_raw_hash(p, hash);
        pair_set_raw_len(p, (uint32_t)len); /* symbol name length, so it ought to fit! */
        pair_set_raw_name(p, string_value(str));

        return(x);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0xc(%rsp)
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
movl 0x7f8(%rdi), %edx
cmpl $0x2e00, %edx           # imm = 0x2E00
movq %rcx, 0x20(%rsp)
jne 0x927a
movl $0x2e00, %edi           # imm = 0x2E00
callq 0x8480
movq %rax, 0x828(%r15)
xorl %edx, %edx
jmp 0x9281
movq 0x828(%r15), %rax
movq %rax, 0x18(%rsp)
movl %edx, %ebx
leaq (%rax,%rbx), %r12
addl $0xb8, %edx
movl %edx, 0x7f8(%r15)
leaq (%rax,%rbx), %r13
addq $0x30, %r13
leaq 0x1(%r14), %rsi
movq %r15, %rdi
callq 0xd3b1
movq %rax, %rbp
movq %rax, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x83e0
movb $0x0, (%rbp,%r14)
movabsq $0x400000000000000a, %rcx # imm = 0x400000000000000A
leaq 0x1000009(%rcx), %rax
movq %rax, (%r13)
movq %r14, 0x8(%r13)
movq %rbp, 0x10(%r13)
movq 0x20(%rsp), %rbp
movq %rbp, 0x18(%r13)
movq %rcx, -0x30(%r13)
movq %r13, -0x28(%r13)
movq 0x128(%r15), %rax
movq %rax, -0x20(%r13)
movq %r15, %r13
movq 0x18(%rsp), %rax
leaq 0x90(%rax,%rbx), %rax
movq %rcx, %rbx
movq %rax, -0x40(%rax)
movq 0x128(%r15), %rcx
movq %rcx, 0x20(%rax)
movq 0x110(%r15), %rcx
movq %rcx, -0x78(%rax)
movq 0x10(%rsp), %r15
xorps %xmm0, %xmm0
movups %xmm0, -0x70(%rax)
andl $0x0, 0xc(%rax)
andq $0x0, 0x10(%rax)
cmpq $0x2, %r14
jl 0x93d0
cmpb $0x3a, (%r15)
je 0x9359
cmpb $0x3a, -0x1(%r15,%r14)
jne 0x93d0
movabsq $0x408000000101000a, %rax # imm = 0x408000000101000A
movq %rax, (%r12)
xorl %esi, %esi
cmpb $0x3a, (%r15)
sete %sil
addq %r15, %rsi
leaq -0x1(%r14), %rdx
movq %r13, %rdi
callq 0x8c3b
movq 0x8(%r12), %rcx
movq 0x20(%rcx), %rcx
movq %rax, 0x18(%rcx)
movq (%rax), %rcx
leaq 0x1ffffff6(%rbx), %rdx
andq %rcx, %rdx
orq $0x4000000, %rcx        # imm = 0x4000000
movq %rcx, (%rax)
cmpq $0x20000000, %rdx       # imm = 0x20000000
jne 0x93b8
movq %r13, %rdi
movq %rax, %rsi
callq 0x9897
movq %r13, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x982d
movq %rax, 0x10(%r12)
movq %rax, 0x18(%r12)
leaq 0x60(%r12), %rax
addq $0xfffff7, %rbx         # imm = 0xFFFFF7
movq %rbx, 0x60(%r12)
movq %r12, 0x68(%r12)
movq 0x148(%r13), %rcx
movq 0x10(%rcx), %rcx
movl 0xc(%rsp), %edx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x70(%r12)
movq 0x148(%r13), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx,%rdx,8)
movq %rbp, 0x78(%r12)
movl %r14d, 0x8c(%r12)
movq 0x40(%r12), %rax
movq %rax, 0x80(%r12)
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq