// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: s7_make_hash_table
s7_pointer s7_make_hash_table(s7_scheme *sc, s7_int size)
                {
                    s7_pointer table;
                    block_t *els;
                    /* size is rounded up to the next power of 2 */

                    if (size < 2)
                        size = 2;
                    else
                    {
                        if ((size & (size - 1)) != 0)          /* already 2^n ? */
                        {
                            if ((size & (size + 1)) != 0)      /* already 2^n - 1 ? */
                            {
                                size--;
                                size |= (size >> 1);
                                size |= (size >> 2);
                                size |= (size >> 4);
                                size |= (size >> 8);
                                size |= (size >> 16);
                                if (s7_int_bits > 31)          /* this is either 31 or 63 */
                                    size |= (size >> 32);
                            }
                            size++;
                        }
                    }

                    els = (block_t *)callocate(sc, size * sizeof(hash_entry_t *));
                    new_cell(sc, table, T_HASH_TABLE | T_SAFE_PROCEDURE);
                    hash_table_mask(table) = size - 1;
                    hash_table_set_block(table, els);
                    hash_table_elements(table) = (hash_entry_t **)(block_data(els));
                    if (!hash_table_elements(table))
                        s7_error(sc, make_symbol(sc, "memory-error"),
                                set_elist_2(sc, wrap_string(sc, "hash-table not allocated! size: ~D bytes", 40), make_integer(sc, size * sizeof(hash_entry_t *))));
                    hash_table_checker(table) = hash_empty;
                    hash_table_mapper(table) = default_hash_map;
                    hash_table_entries(table) = 0;
                    hash_table_set_procedures(table, sc->nil);
                    add_hash_table(sc, table);

                    return(table);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x2, %r13d
cmpq $0x2, %rsi
jl 0x3677b
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
addq %rsi, %rax
testq %rsi, %rax
je 0x36778
leaq 0x1(%rsi), %rax
testq %rsi, %rax
je 0x36775
decq %rsi
movq %rsi, %rax
shrq %rax
orq %rsi, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
cmpb $0x1, 0x1144f7(%rip)    # 0x14ac60
jne 0x36775
movq %rsi, %rax
shrq $0x20, %rax
orq %rax, %rsi
incq %rsi
movq %rsi, %r13
leaq (,%r13,8), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3cdd6
movq %rax, %r12
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x367b0
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r14
movq $0x20001b, (%r14)       # imm = 0x20001B
decq %r13
movq %r13, 0x8(%r14)
movq %r12, 0x28(%r14)
movq (%r12), %rax
movq %rax, 0x10(%r14)
testq %rax, %rax
jne 0x368a4
leaq 0xd3a82(%rip), %rsi     # 0x10a26b
movq %rbx, %rdi
callq 0x9afc
movq %rax, %r12
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r13
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xd3a5f(%rip), %rax     # 0x10a278
movq %rax, 0x10(%r13)
movq $0x28, 0x8(%r13)
cmpq $0x7ff, %r15            # imm = 0x7FF
ja 0x3683b
leaq 0x11011b(%rip), %rax    # 0x146950
movq (%rax,%r15,8), %rax
jmp 0x36874
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x3685a
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r15, 0x8(%rax)
movq 0x6e0(%rbx), %rcx
movq %r13, 0x8(%rcx)
movq 0x6e0(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x6e0(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x38dfa
movq 0x28(%r14), %r12
leaq 0x65c2(%rip), %rax      # 0x3ce6d
movq %rax, 0x18(%r14)
leaq 0x1143ba(%rip), %rax    # 0x14ac70
movq %rax, 0x20(%r14)
movq $0x0, 0x18(%r12)
movq 0x110(%rbx), %rax
movq 0x28(%r14), %rcx
movq %rax, 0x20(%rcx)
movq 0x770(%rbx), %rbx
movq (%rbx), %rax
movq 0x10(%rbx), %rsi
cmpq 0x8(%rbx), %rsi
jne 0x36901
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%rbx)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%rbx)
movq 0x10(%rbx), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%rbx)
movq %r14, (%rax,%rsi,8)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq