// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: hash_table_add
static inline s7_pointer hash_table_add(s7_scheme *sc, s7_pointer table, s7_pointer key, s7_pointer value)
                {
                    s7_int hash, hash_mask, loc;
                    hash_entry_t *x, *p;

                    if (!hash_chosen(table))
                        hash_table_set_checker(table, type(key)); /* raw_hash value (hash_loc(sc, table, key)) does not change via hash_table_set_checker etc */

                    hash_mask = hash_table_mask(table);
                    hash = hash_loc(sc, table, key);
                    loc = hash & hash_mask;

                    for (x = hash_table_element(table, loc); x; x = hash_entry_next(x))
                        if ((hash_entry_raw_hash(x) == hash) &&
                                (s7_is_equal(sc, hash_entry_key(x), key)))
                            return(value);

                    p = mallocate_block(sc);
                    hash_entry_key(p) = key;
                    hash_entry_set_value(p, T_Pos(value));
                    hash_entry_set_raw_hash(p, hash);
                    hash_entry_next(p) = hash_table_element(table, loc);
                    hash_table_element(table, loc) = p;

                    hash_table_entries(table)++;
                    if (hash_table_entries(table) > hash_mask)
                        resize_hash_table(sc, table);

                    return(value);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rax
btl $0x1d, %eax
jb 0x108303
movzbl (%r12), %ecx
movq 0x18(%r14), %rdx
leaq 0x4bd1c(%rip), %rsi     # 0x153ff0
movq (%rsi,%rcx,8), %rcx
cmpq %rcx, %rdx
je 0x108303
leaq -0xc8e90(%rip), %rsi    # 0x3f454
cmpq %rsi, %rdx
je 0x1082ff
leaq -0xc88df(%rip), %rcx    # 0x3fa11
movq %rcx, 0x18(%r14)
orq $0x20000000, %rax       # imm = 0x20000000
movq %rax, (%r14)
jmp 0x108303
movq %rcx, 0x18(%r14)
movq 0x8(%r14), %rbx
movq 0x20(%r14), %rax
movzbl (%r12), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *(%rax,%rcx,8)
movq %rax, %r13
movq %rax, %rcx
movq %rbx, 0x10(%rsp)
andq %rbx, %rcx
movq 0x10(%r14), %rax
movq %rcx, 0x8(%rsp)
movq (%rax,%rcx,8), %rbp
testq %rbp, %rbp
je 0x10836c
leaq 0x529dd(%rip), %rbx     # 0x15ad20
cmpq %r13, 0x10(%rbp)
jne 0x108363
movq (%rbp), %rsi
movzbl (%rsi), %eax
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq *(%rbx,%rax,8)
testb %al, %al
jne 0x108415
movq 0x18(%rbp), %rbp
testq %rbp, %rbp
jne 0x108343
cmpq $0x0, 0x838(%r15)
jne 0x1083b2
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%r15)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x108390
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
movl $0x0, 0x8(%rax)
movq %r12, (%rax)
movq (%rsp), %rcx
movq %rcx, 0x20(%rax)
movq %r13, 0x10(%rax)
movq 0x10(%r14), %rcx
movq 0x8(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%r14), %rcx
movq %rax, (%rcx,%rdx,8)
movq 0x28(%r14), %rax
incq 0x18(%rax)
movq 0x28(%r14), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, 0x18(%rax)
jle 0x108415
movq %r15, %rdi
movq %r14, %rsi
callq 0x402db
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq