// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: hash_table_equal_1
static bool hash_table_equal_1(s7_scheme *sc, s7_pointer x, s7_pointer y, shared_info *ci, bool equivalent)
                {
                    hash_entry_t **lists;
                    s7_int i, len;
                    shared_info *nci = ci;
                    hash_check_t hf;
                    bool (*eqf)(s7_scheme *sc, s7_pointer x, s7_pointer y, shared_info *ci);

                    if (x == y)
                        return(true);
                    if (!is_hash_table(y))
                    {
                        if (equivalent)
                            check_equivalent_method(sc, y, x);
                        return(false);
                    }
                    if (ci)
                        equal_ref(sc, x, y, ci);

                    if (hash_table_entries(x) != hash_table_entries(y))
                        return(false);
                    if (hash_table_entries(x) == 0)
                        return(true);
                    if ((!equivalent) && ((hash_table_checker_locked(x)) || (hash_table_checker_locked(y))))
                    {
                        if (hash_table_checker(x) != hash_table_checker(y))
                            return(false);
                        if (hash_table_mapper(x) != hash_table_mapper(y))
                            return(false);
                    }

                    len = hash_table_mask(x) + 1;
                    lists = hash_table_elements(x);
                    if (!nci) nci = new_shared_info(sc);

                    if (equivalent)
                        eqf = s7_is_equivalent_1;
                    else eqf = s7_is_equal_1;

                    hf = hash_table_checker(y);
                    if ((hf != hash_equal) && (hf != hash_equivalent))
                    {
                        for (i = 0; i < len; i++)
                        {
                            hash_entry_t *p;
                            for (p = lists[i]; p; p = hash_entry_next(p))
                            {
                                hash_entry_t *y_val;
                                y_val = hf(sc, y, hash_entry_key(p));
                                if (y_val == sc->unentry)
                                    return(false);
                                if (!eqf(sc, hash_entry_value(p), hash_entry_value(y_val), nci))
                                    return(false);
                            }
                        }
                        /* if we get here, every key/value in x has a corresponding key/value in y, and the number of entries match,
                         *   so surely the tables are equal??
                         * if ci not null or hash-table-checker is equal/eqivalent, can't use hf?
                         */
                        return(true);
                    }

                    /* we need to protect the current shared_info data (nci) here so the current hash_table_checker won't work --
                     *   outside equal?/eqivalent? they can safely assume that they can start a new shared_info process.
                     */
                    for (i = 0; i < len; i++)
                    {
                        hash_entry_t *p;
                        for (p = lists[i]; p; p = hash_entry_next(p))
                        {
                            hash_entry_t *x;
                            s7_int hash, loc;
                            s7_pointer key;

                            key = hash_entry_key(p);
                            hash = hash_loc(sc, y, key);
                            loc = hash & hash_table_mask(y);

                            for (x = hash_table_element(y, loc); x; x = hash_entry_next(x))
                                if (hash_entry_raw_hash(x) == hash)
                                    if (eqf(sc, hash_entry_key(x), key, nci))
                                        break;
                            if (!x)
                                return(false);
                            if (!eqf(sc, hash_entry_value(p), hash_entry_value(x), nci))
                                return(false);
                        }
                    }
                    return(true);
                }

// Assembly:
cmpq %rdx, %rsi
je 0xc5b3d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpb $0x1b, (%rdx)
jne 0xc5b40
movq %rcx, %r15
testq %rcx, %rcx
je 0xc5ca1
xorl %r13d, %r13d
testb $0x2, 0x2(%r14)
je 0xc5b18
movq %r15, %rdi
movq %r14, %rsi
callq 0x785fb
movl %eax, %r13d
movq (%r12), %rax
btl $0x11, %eax
jb 0xc5c0e
testl %r13d, %r13d
je 0xc5c29
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
jmp 0xc5c9c
movb $0x1, %al
retq
testb %bpl, %bpl
je 0xc5db7
testb $0x40, 0x3(%r14)
je 0xc5db7
cmpb $0x1, 0x24c(%rbx)
jne 0xc5db7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x88f3
movq 0x1100(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x888f
cmpq 0x128(%rbx), %rax
je 0xc5db7
movq %rax, %r15
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0xc5bb4
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movl $0x200001, %ecx         # imm = 0x200001
movq %rcx, (%rax)
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movq 0x90(%rbx), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%rbx)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq %r14, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa34c
cmpq %rax, 0x120(%rbx)
setne %al
jmp 0xc5db9
movq %r15, %rdi
movq %r12, %rsi
callq 0x785fb
testl %r13d, %r13d
je 0xc5c90
cmpl %r13d, %eax
sete %al
jmp 0xc5db9
movl 0xc(%r15), %ecx
cmpl 0x14(%r15), %ecx
jl 0xc5c3f
movq %r15, %rdi
callq 0x78405
movq (%r12), %rax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, (%r12)
orb $0x2, 0x2(%r14)
movq (%r15), %rax
movslq 0xc(%r15), %rcx
movq %r12, (%rax,%rcx,8)
movl 0x10(%r15), %eax
incl %eax
movl %eax, 0x10(%r15)
movq 0x20(%r15), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0xc(%r15)
movl %eax, (%rdx,%rcx,4)
movq (%r15), %rax
movslq 0xc(%r15), %rcx
movq %r14, (%rax,%rcx,8)
movl 0x10(%r15), %eax
movq 0x20(%r15), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0xc(%r15)
movl %eax, (%rdx,%rcx,4)
jmp 0xc5ca1
testl %eax, %eax
je 0xc5ca1
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0xc57c1
movq 0x28(%r12), %rax
movq 0x18(%rax), %rax
movq 0x28(%r14), %rcx
cmpq 0x18(%rcx), %rax
jne 0xc5db7
testq %rax, %rax
je 0xc5e82
testb %bpl, %bpl
je 0xc5d87
movq 0x8(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%r12), %rax
movq %rax, 0x8(%rsp)
testq %r15, %r15
jne 0xc5cee
movq %rbx, %rdi
callq 0x77cff
movq %rax, %r15
leaq -0x92de9(%rip), %rax    # 0x32f0c
leaq -0x92e12(%rip), %rcx    # 0x32eea
testb %bpl, %bpl
cmovneq %rax, %rcx
movq %rcx, (%rsp)
movq 0x18(%r14), %r12
leaq -0x9580b(%rip), %rax    # 0x30507
cmpq %rax, %r12
setne %al
leaq -0x4d7b3(%rip), %rcx    # 0x7856c
cmpq %rcx, %r12
setne %cl
testb %cl, %al
je 0xc5dc8
xorl %r13d, %r13d
cmpq 0x10(%rsp), %r13
jg 0xc5e82
movq 0x8(%rsp), %rax
leaq (%rax,%r13,8), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0xc5d82
movq (%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *%r12
cmpq 0x490(%rbx), %rax
je 0xc5db7
movq 0x20(%rbp), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rcx
callq *(%rsp)
movl %eax, %ecx
addq $0x18, %rbp
xorl %eax, %eax
testb %cl, %cl
jne 0xc5d44
jmp 0xc5db9
incq %r13
jmp 0xc5d30
movq 0x20(%r12), %rax
leaq 0x53edd(%rip), %rcx     # 0x119c70
cmpq %rcx, %rax
jne 0xc5da2
cmpq %rcx, 0x20(%r14)
je 0xc5cca
movq 0x18(%r12), %rcx
cmpq 0x18(%r14), %rcx
jne 0xc5db7
cmpq 0x20(%r14), %rax
je 0xc5cca
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
cmpq 0x10(%rsp), %rcx
jg 0xc5e82
movq 0x8(%rsp), %rax
leaq (%rax,%rcx,8), %r12
movq %rcx, 0x18(%rsp)
movq (%r12), %r12
testq %r12, %r12
je 0xc5e7a
movq %r12, 0x20(%rsp)
movq (%r12), %r12
movq 0x20(%r14), %rax
movzbl (%r12), %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *(%rax,%rcx,8)
movq %rax, %r13
movq 0x8(%r14), %rbp
andq %rax, %rbp
shlq $0x3, %rbp
addq 0x10(%r14), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0xc5db7
cmpq %r13, 0x10(%rbp)
jne 0xc5e43
movq (%rbp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq *(%rsp)
testb %al, %al
jne 0xc5e49
addq $0x18, %rbp
jmp 0xc5e20
movq 0x20(%rsp), %r12
movq 0x20(%r12), %rsi
movq 0x20(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rcx
callq *(%rsp)
movl %eax, %ecx
addq $0x18, %r12
xorl %eax, %eax
testb %cl, %cl
movq 0x18(%rsp), %rcx
jne 0xc5de3
jmp 0xc5db9
incq %rcx
jmp 0xc5dca
movb $0x1, %al
jmp 0xc5db9