// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movb $0x1, %bpl
cmpq %rdx, %rsi
je 0xf8831
movl %r8d, %r13d
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpb $0x1b, (%rdx)
jne 0xf8495
movq %rcx, %r15
testq %rcx, %rcx
je 0xf8632
xorl %edx, %edx
testb $0x2, 0x2(%r14)
je 0xf856b
movslq 0xc(%r15), %rax
testq %rax, %rax
jle 0xf856b
movq (%r15), %rdx
xorl %ecx, %ecx
cmpq %r14, (%rdx,%rcx,8)
je 0xf8564
incq %rcx
cmpq %rcx, %rax
jne 0xf847c
xorl %edx, %edx
jmp 0xf856b
testb %r13b, %r13b
je 0xf8760
testb $0x40, 0x3(%r14)
je 0xf8760
cmpb $0x1, 0x24c(%rbx)
jne 0xf8760
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a63
movq 0x1100(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x89ff
cmpq 0x128(%rbx), %rax
je 0xf8760
movq %rax, %r15
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0xf8509
movq %rbx, %rdi
callq 0xa550
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 0xaee6
cmpq %rax, 0x120(%rbx)
setne %bpl
jmp 0xf8834
movq 0x20(%r15), %rax
movl (%rax,%rcx,4), %edx
movq (%r12), %rax
btl $0x11, %eax
jb 0xf8584
testl %edx, %edx
je 0xf85a4
movq %r15, %rdi
movq %r12, %rsi
jmp 0xf862d
movslq 0xc(%r15), %rax
testq %rax, %rax
jle 0xf85a0
movq (%r15), %rsi
xorl %ecx, %ecx
cmpq %r12, (%rsi,%rcx,8)
je 0xf860b
incq %rcx
cmpq %rcx, %rax
jne 0xf8592
xorl %eax, %eax
jmp 0xf8612
movl 0xc(%r15), %ecx
cmpl 0x14(%r15), %ecx
jl 0xf85ba
movq %r15, %rdi
callq 0x967fa
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 0xf8632
movq 0x20(%r15), %rax
movl (%rax,%rcx,4), %eax
testl %edx, %edx
je 0xf8621
cmpl %edx, %eax
sete %bpl
jmp 0xf8834
testl %eax, %eax
je 0xf8632
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0xf80b5
movq 0x28(%r12), %rax
movq 0x18(%rax), %rax
movq 0x28(%r14), %rcx
cmpq 0x18(%rcx), %rax
jne 0xf8760
testq %rax, %rax
je 0xf8831
testb %r13b, %r13b
je 0xf8730
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rax
movq %rax, 0x20(%rsp)
testq %r15, %r15
movq %rdx, 0x8(%rsp)
jne 0xf8688
movq 0x6c0(%rbx), %r15
movq %r15, %rdi
callq 0x95f8c
movq 0x8(%rsp), %rdx
leaq -0xb81ac(%rip), %rax    # 0x404e3
leaq -0xb81d5(%rip), %rcx    # 0x404c1
testb %r13b, %r13b
cmovneq %rax, %rcx
movq %rcx, 0x18(%rsp)
movq 0x18(%r14), %r12
leaq -0xbb283(%rip), %rax    # 0x3d42a
cmpq %rax, %r12
setne %al
leaq -0x61d5c(%rip), %rcx    # 0x9695e
cmpq %rcx, %r12
setne %cl
testb %cl, %al
je 0xf8767
testq %rdx, %rdx
js 0xf8834
xorl %ecx, %ecx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq (%rax,%rcx,8), %r13
testq %r13, %r13
je 0xf8718
movq (%r13), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *%r12
cmpq 0x490(%rbx), %rax
je 0xf8760
movq 0x20(%r13), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rcx
callq *0x18(%rsp)
testb %al, %al
je 0xf8760
movq 0x18(%r13), %r13
jmp 0xf86e1
movq 0x10(%rsp), %rcx
leaq 0x1(%rcx), %rax
cmpq 0x8(%rsp), %rcx
movq %rax, %rcx
jne 0xf86d3
jmp 0xf8834
movq 0x20(%r12), %rax
leaq 0x52534(%rip), %rcx     # 0x14ac70
cmpq %rcx, %rax
jne 0xf874b
cmpq %rcx, 0x20(%r14)
je 0xf865b
movq 0x18(%r12), %rcx
cmpq 0x18(%r14), %rcx
jne 0xf8760
cmpq 0x20(%r14), %rax
je 0xf865b
xorl %ebp, %ebp
jmp 0xf8834
testq %rdx, %rdx
js 0xf8831
xorl %ebp, %ebp
movq 0x20(%rsp), %rax
movq (%rax,%rbp,8), %r13
testq %r13, %r13
je 0xf8821
movq %r13, 0x30(%rsp)
movq (%r13), %rdx
movq 0x20(%r14), %rax
movzbl (%rdx), %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %rdx, 0x10(%rsp)
callq *(%rax,%rcx,8)
movq %rax, %r13
movq 0x8(%r14), %rax
andq %r13, %rax
movq 0x10(%r14), %rcx
movq (%rcx,%rax,8), %r12
testq %r12, %r12
je 0xf8760
movq %rbp, 0x28(%rsp)
cmpq %r13, 0x10(%r12)
jne 0xf87dc
movq (%r12), %rsi
movq %rbx, %rdi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
callq *0x18(%rsp)
testb %al, %al
jne 0xf87ea
movq 0x18(%r12), %r12
xorl %ebp, %ebp
testq %r12, %r12
jne 0xf87be
jmp 0xf8834
movq 0x30(%rsp), %r13
movq 0x20(%r13), %rsi
movq 0x20(%r12), %rdx
movq %rbx, %rdi
movq %r15, %rcx
callq *0x18(%rsp)
testb %al, %al
je 0xf8760
movq 0x18(%r13), %r13
testq %r13, %r13
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %rbp
jne 0xf8784
leaq 0x1(%rbp), %rax
cmpq %rdx, %rbp
movq %rax, %rbp
jne 0xf8772
movb $0x1, %bpl
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq