// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: hash_table_fill
static s7_pointer hash_table_fill(s7_scheme *sc, s7_pointer args)
                {
                    s7_pointer val, table;
                    table = car(args);
                    if (is_immutable(table))
                        return(immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->fill_symbol, table)));

                    val = cadr(args);
                    if (hash_table_entries(table) > 0)
                    {
                        s7_int len;
                        hash_entry_t **entries;
                        entries = hash_table_elements(table);
                        len = hash_table_mask(table) + 1;      /* minimum len is 2 (see s7_make_hash_table) */
                        if (val == sc->F)                      /* hash-table-ref returns #f if it can't find a key, so val == #f here means empty the table */
                        {
                            hash_entry_t **hp, **hn;
                            hash_entry_t *p;
                            hp = entries;
                            hn = (hash_entry_t **)(hp + len);
                            for (; hp < hn; hp++)
                            {
                                if (*hp)
                                {
                                    p = *hp;
                                    while (hash_entry_next(p)) p = hash_entry_next(p);
                                    hash_entry_next(p) = sc->block_lists[BLOCK_LIST];
                                    sc->block_lists[BLOCK_LIST] = *hp;
                                }
                                hp++;
                                if (*hp)
                                {
                                    p = *hp;
                                    while (hash_entry_next(p)) p = hash_entry_next(p);
                                    hash_entry_next(p) = sc->block_lists[BLOCK_LIST];
                                    sc->block_lists[BLOCK_LIST] = *hp;
                                }
                            }
                            if (len >= 8)
                                memclr64(entries, len * sizeof(hash_entry_t *));
                            else memclr(entries, len * sizeof(hash_entry_t *));
                            if (!hash_table_checker_locked(table))
                            {
                                hash_table_checker(table) = hash_empty;
                                hash_clear_chosen(table);
                            }
                            hash_table_entries(table) = 0;
                        }
                        else
                        {
                            s7_int i;
                            hash_entry_t *x;

                            if (is_typed_hash_table(table))
                            {
                                if (((is_c_function(hash_table_value_typer(table))) &&
                                            (c_function_call(hash_table_value_typer(table))(sc, set_plist_1(sc, val)) == sc->F)) ||
                                        ((is_any_closure(hash_table_value_typer(table))) &&
                                         (s7_apply_function(sc, hash_table_value_typer(table), set_plist_1(sc, val)) == sc->F)))
                                    s7_wrong_type_arg_error(sc, "fill!", 2, val,
                                            make_type_name(sc, hash_table_typer_name(sc, hash_table_value_typer(table)), INDEFINITE_ARTICLE));
                            }
                            for (i = 0; i < len; i++)
                                for (x = entries[i]; x; x = hash_entry_next(x))
                                    hash_entry_set_value(x, val);
                            /* keys haven't changed, so no need to mess with hash_table_checker */
                        }
                    }
                    return(val);
                }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0x43e34
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x98(%rsp), %rdi
movq 0x1d669a(%rip), %rsi    # 0x21a498
movq 0x98(%rsp), %rax
movq 0xee8(%rax), %rdx
movq 0x80(%rsp), %rcx
callq 0xf240
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0xb800
movq %rax, 0xa0(%rsp)
jmp 0x44255
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x18(%rax)
jle 0x44245
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rax
movq 0x98(%rsp), %rcx
cmpq 0x120(%rcx), %rax
jne 0x44045
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq 0x78(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0x43fbf
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
je 0x43f39
movq 0x68(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x43f0a
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x43eee
movq 0x98(%rsp), %rax
movq 0x838(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x68(%rsp), %rax
movq (%rax), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x838(%rax)
movq 0x68(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
je 0x43faa
movq 0x68(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x43f7b
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x43f5f
movq 0x98(%rsp), %rax
movq 0x838(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x68(%rsp), %rax
movq (%rax), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x838(%rax)
jmp 0x43fac
movq 0x68(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x68(%rsp)
jmp 0x43ec6
cmpq $0x8, 0x78(%rsp)
jl 0x43fdc
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
shlq $0x3, %rsi
callq 0xd7ce0
jmp 0x43fef
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
shlq $0x3, %rsi
callq 0xd2340
movq 0x80(%rsp), %rax
leaq 0x1d67a2(%rip), %rcx    # 0x21a7a0
cmpq %rcx, 0x20(%rax)
jne 0x4402c
movq 0x80(%rsp), %rax
leaq -0xcc83(%rip), %rcx     # 0x37390
movq %rcx, 0x18(%rax)
movq 0x80(%rsp), %rax
movq (%rax), %rcx
andq $-0x20000001, %rcx      # imm = 0xDFFFFFFF
movq %rcx, (%rax)
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x18(%rax)
jmp 0x44243
movq 0x80(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x441de
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0x30, %eax
jl 0x440dc
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x98(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x35ea0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rax
callq *%rax
movq 0x98(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0x44164
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1de634(%rip), %rax    # 0x222730
testb $0x1, (%rax,%rcx)
je 0x441dc
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x35ea0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq 0x98(%rsp), %rcx
cmpq 0x120(%rcx), %rax
jne 0x441dc
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rsi
callq 0xd96a0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0xd8890
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq %rax, %r8
leaq 0x1aa9f3(%rip), %rsi    # 0x1eebc5
movl $0x2, %edx
callq 0x12540
jmp 0x441de
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x78(%rsp), %rax
jge 0x44241
movq 0x70(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x4422f
movq 0x88(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x44206
jmp 0x44231
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x441e7
jmp 0x44243
jmp 0x44245
movq 0x88(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)