// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movl %r8d, 0x54(%rsp)
movq 0x70(%rsp), %rdi
callq 0xc0a60
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq $0x1, %rsi
callq 0x14930
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x93e0
movq 0x28(%rsp), %rax
movq 0x60(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x40(%rsp), %rax
movabsq $0x4000000001000013, %rcx # imm = 0x4000000001000013
movq %rcx, (%rax)
movq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x48(%rsp), %rax
movabsq $0x400000000000000a, %rcx # imm = 0x400000000000000A
movq %rcx, (%rax)
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rax
movq 0x128(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rcx
addq $0x90, %rcx
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x20(%rax)
movq 0x70(%rsp), %rax
movq 0x128(%rax), %rcx
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x20(%rax)
movq 0x70(%rsp), %rax
movq 0x110(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x48(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x48(%rsp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0x2c(%rax)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movl $0x0, 0xc(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0x28(%rax)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq $0x0, 0x10(%rax)
cmpq $0x1, 0x60(%rsp)
jle 0xb190
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0xb098
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3a, %eax
jne 0xb18e
movq 0x48(%rsp), %rax
movabsq $0x80000001010000, %rcx # imm = 0x80000001010000
orq (%rax), %rcx
movq %rcx, (%rax)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xb0d4
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0xb0de
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x60(%rsp), %rdx
subq $0x1, %rdx
callq 0xa2b0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rcx
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
orq $0x4000000, %rcx        # imm = 0x4000000
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
andq $0x20000000, %rax       # imm = 0x20000000
cmpq $0x0, %rax
je 0xb159
movq 0x18(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
jne 0xb159
movq 0x70(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xbbd0
movq 0x70(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0xbb00
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0xb190
movq 0x38(%rsp), %rax
movabsq $0x4000000001000001, %rcx # imm = 0x4000000001000001
movq %rcx, (%rax)
movq 0x48(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rax
movq 0x148(%rax), %rax
movq 0x10(%rax), %rax
movl 0x54(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x38(%rsp), %rdx
movq 0x70(%rsp), %rax
movq 0x148(%rax), %rax
movq 0x10(%rax), %rax
movl 0x54(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x58(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x60(%rsp), %rax
movl %eax, %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x2c(%rax)
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rax
addq $0x78, %rsp
retq
nopw (%rax,%rax)