// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x2, %rsi
jge 0x2a602
pushq $0x2
popq %r12
jmp 0x2a66b
movq %rsi, %r12
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
addq %rsi, %rax
testq %rsi, %rax
je 0x2a66b
leaq 0x1(%r12), %rax
testq %r12, %rax
je 0x2a668
decq %r12
movq %r12, %rax
shrq %rax
orq %r12, %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, %r12
shrq $0x10, %r12
orq %rcx, %r12
cmpb $0x1, 0xef604(%rip)     # 0x119c60
jne 0x2a668
movq %r12, %rax
shrq $0x20, %rax
orq %rax, %r12
incq %r12
leaq (,%r12,8), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2ff1e
movq %rax, %r13
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x2a6a0
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r14
movq $0x20001b, (%r14)       # imm = 0x20001B
decq %r12
movq %r12, 0x8(%r14)
movq %r13, 0x28(%r14)
movq (%r13), %rax
movq %rax, 0x10(%r14)
testq %rax, %rax
jne 0x2a794
leaq 0xabb32(%rip), %rsi     # 0xd620b
movq %rbx, %rdi
callq 0x94d4
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 0xabb0f(%rip), %rax     # 0xd6218
movq %rax, 0x10(%r13)
movq $0x28, 0x8(%r13)
cmpq $0x7ff, %r15            # imm = 0x7FF
ja 0x2a72b
leaq 0xeb22b(%rip), %rax     # 0x115950
movq (%rax,%r15,8), %rax
jmp 0x2a764
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x2a74a
movq %rbx, %rdi
callq 0x9c27
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 0x2cdc0
movq 0x28(%r14), %r13
leaq 0x57c0(%rip), %rax      # 0x2ff5b
movq %rax, 0x18(%r14)
leaq 0xef4ca(%rip), %rax     # 0x119c70
movq %rax, 0x20(%r14)
andq $0x0, 0x18(%r13)
movq 0x110(%rbx), %rax
movq 0x28(%r14), %rcx
movq %rax, 0x20(%rcx)
movq 0x770(%rbx), %rdi
movq %r14, %rsi
callq 0xb999
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq