// File: /workspace/github_c_makefile_star2_O1/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 0x101380
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpb $0x1b, (%rdx)
movq %rdx, 0x18(%rsp)
jne 0x101387
movq %rcx, %rbx
testq %rcx, %rcx
je 0x10145e
xorl %edx, %edx
testb $0x2, 0x2(%r15)
je 0x10146a
movslq 0xc(%rbx), %rax
testq %rax, %rax
jle 0x10146a
movq (%rbx), %rdx
xorl %ecx, %ecx
cmpq %r15, (%rdx,%rcx,8)
je 0x101463
incq %rcx
cmpq %rcx, %rax
jne 0x101367
xorl %edx, %edx
jmp 0x10146a
movb $0x1, %dl
jmp 0x101782
testb %r14b, %r14b
je 0x101772
testb $0x40, 0x3(%r15)
je 0x101772
cmpb $0x1, 0x24c(%r13)
jne 0x101772
movq %r13, %rdi
movq %r15, %rsi
callq 0x9a55
movq 0x1100(%r13), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x99ef
movq %rax, %r15
movq 0x128(%r13), %r14
cmpq %r14, %rax
je 0x10176d
movq 0x90(%r13), %rax
movq 0x110(%r13), %rbx
cmpq 0x98(%r13), %rax
ja 0x1013f8
movq %r13, %rdi
callq 0xb389
movq 0x90(%r13), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r13)
movq -0x8(%rax), %rax
movl $0x200001, %ecx         # imm = 0x200001
movq %rcx, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x90(%r13), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%r13)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq %r13, %rdi
movq %r15, %rsi
callq 0xbd41
cmpq %rax, 0x120(%r13)
setne %dl
jmp 0x10176d
jmp 0x10151f
movq 0x20(%rbx), %rax
movl (%rax,%rcx,4), %edx
testb $0x2, 0x2(%r12)
jne 0x101483
testl %edx, %edx
je 0x1014a3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x100fa2
jmp 0x1014f9
movslq 0xc(%rbx), %rax
testq %rax, %rax
jle 0x10149f
movq (%rbx), %rsi
xorl %ecx, %ecx
cmpq %r12, (%rsi,%rcx,8)
je 0x1014fe
incq %rcx
cmpq %rcx, %rax
jne 0x101491
xorl %eax, %eax
jmp 0x101505
movl 0xc(%rbx), %eax
cmpl 0x14(%rbx), %eax
jl 0x1014b3
movq %rbx, %rdi
callq 0x9cf49
orb $0x2, 0x2(%r12)
orb $0x2, 0x2(%r15)
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movq %r12, (%rax,%rcx,8)
movl 0x10(%rbx), %eax
incl %eax
movl %eax, 0x10(%rbx)
movq 0x20(%rbx), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0xc(%rbx)
movl %eax, (%rdx,%rcx,4)
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movq %r15, (%rax,%rcx,8)
movl 0x10(%rbx), %eax
movq 0x20(%rbx), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0xc(%rbx)
movl %eax, (%rdx,%rcx,4)
movb $0x1, %bpl
jmp 0x101516
movq 0x20(%rbx), %rax
movl (%rax,%rcx,4), %eax
testl %edx, %edx
sete %bpl
je 0x101640
cmpl %edx, %eax
sete %dl
testb %bpl, %bpl
je 0x101774
movq 0x28(%r12), %rax
movq 0x18(%rax), %rax
movq 0x28(%r15), %rcx
cmpq 0x18(%rcx), %rax
jne 0x101772
testq %rax, %rax
je 0x101769
testb %r14b, %r14b
je 0x10165a
movl %r14d, %ebp
movq 0x8(%r12), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%r12), %rax
movq %rax, 0x28(%rsp)
testq %rbx, %rbx
jne 0x101573
movq %r13, %rdi
movl %edx, %ebx
callq 0x9c66c
movl %ebx, %edx
movq %rax, %rbx
movq %rbx, 0x20(%rsp)
leaq -0xbe848(%rip), %rax    # 0x42d37
leaq -0xbe871(%rip), %r14    # 0x42d15
testb %bpl, %bpl
cmovneq %rax, %r14
movq 0x18(%r15), %r15
leaq -0xc1b87(%rip), %rax    # 0x3fa11
cmpq %rax, %r15
setne %al
leaq -0x644f8(%rip), %rcx    # 0x9d0ad
cmpq %rcx, %r15
setne %cl
testb %cl, %al
je 0x101693
cmpq $0x0, 0x8(%rsp)
js 0x101769
movq %r13, %rbx
xorl %ecx, %ecx
movq 0x28(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq (%rax,%rcx,8), %r13
testq %r13, %r13
sete %bpl
je 0x10161e
movl %edx, %r12d
movq (%r13), %rdx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq *%r15
cmpq 0x490(%rbx), %rax
je 0x101610
movq 0x20(%r13), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rcx
callq *%r14
movl %r12d, %edx
andb %al, %dl
jmp 0x101614
xorl %eax, %eax
xorl %edx, %edx
testb %al, %al
je 0x10161e
movq 0x18(%r13), %r13
jmp 0x1015d2
testb $0x1, %bpl
je 0x101774
movq 0x10(%rsp), %rcx
leaq 0x1(%rcx), %rax
cmpq 0x8(%rsp), %rcx
movq %rax, %rcx
jne 0x1015c4
jmp 0x101769
testl %eax, %eax
je 0x1014fc
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x100fa2
jmp 0x1014fc
movq 0x20(%r12), %rax
leaq 0x5160a(%rip), %rcx     # 0x152c70
cmpq %rcx, %rax
jne 0x101675
cmpq %rcx, 0x20(%r15)
je 0x101548
movq 0x18(%r12), %rcx
cmpq 0x18(%r15), %rcx
jne 0x101772
cmpq 0x20(%r15), %rax
jne 0x101772
jmp 0x101548
cmpq $0x0, 0x8(%rsp)
js 0x101769
xorl %ecx, %ecx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
movq (%rax,%rcx,8), %r15
testq %r15, %r15
sete %al
je 0x10174e
movb %al, 0x7(%rsp)
movl %edx, 0x10(%rsp)
movq (%r15), %r12
movq 0x18(%rsp), %rbx
movq 0x20(%rbx), %rax
movzbl (%r12), %ecx
movq %r13, %rbp
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq *(%rax,%rcx,8)
movq %rax, %r13
movq 0x8(%rbx), %rax
andq %r13, %rax
movq 0x10(%rbx), %rcx
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x10171b
cmpq %r13, 0x10(%rbx)
jne 0x101715
movq (%rbx), %rsi
movq %rbp, %rdi
movq %r12, %rdx
movq 0x20(%rsp), %rcx
callq *%r14
testb %al, %al
jne 0x101721
movq 0x18(%rbx), %rbx
jmp 0x1016f5
xorl %eax, %eax
xorl %edx, %edx
jmp 0x10173a
movq 0x20(%r15), %rsi
movq 0x20(%rbx), %rdx
movq %rbp, %rdi
movq 0x20(%rsp), %rcx
callq *%r14
movl 0x10(%rsp), %edx
andb %al, %dl
movq %rbp, %r13
testb %al, %al
je 0x10174a
movq 0x18(%r15), %r15
jmp 0x1016af
movb 0x7(%rsp), %al
testb $0x1, %al
je 0x101774
movq 0x30(%rsp), %rcx
leaq 0x1(%rcx), %rax
cmpq 0x8(%rsp), %rcx
movq %rax, %rcx
jne 0x1016a1
movb $0x1, %dl
jmp 0x101774
cmpq %r14, %r15
jne 0x101774
xorl %edx, %edx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
andb $0x1, %dl
movl %edx, %eax
retq