// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/bloom_t.c
// Function: main
int
main(void)
{
    plan_tests(6);
    setvbuf(stdout, 0, _IOLBF, 0);

    BLOOM *bp = bloom_create(12, 16, 2);
    ok(bp, "created");

    int rc = bloom_chk(bp, "AB");
    ok(rc == 0, "Check 'AB' not in empty table: %d", rc);

    printf("# Add AB\n");
    bloom_add(bp, "AB");

    rc = bloom_chk(bp, "AB");
    ok(rc != 0, "Check 'AB' after add: %d", rc);

    printf("# Add AC\n");
    bloom_add(bp, "AC");

    rc = bloom_chk(bp, "!@");
    ok(rc != 0, "Check '!@' without add: %d (false positive)", rc);

    printf("# Before adding CA...DZ\n");
    bloom_dump(bp, stdout);

    int antestat = bloom_stat(bp), anteover = bloom_over(bp);

    char hash[] = "__";
    for (hash[1] = 'A'; hash[1] <= 'D'; ++hash[1])
        for (hash[0] = 'C'; hash[0] <= 'Z'; ++hash[0])
            bloom_add(bp, hash);

    printf("# After adding CA...DZ:\n");
    bloom_dump(bp, stdout);

    for (hash[1] = 'A'; hash[1] <= 'D'; ++hash[1])
        for (hash[0] = 'C'; hash[0] <= 'Z'; ++hash[0])
            bloom_del(bp, hash);

    printf("# After deleting CA...DZ:\n");
    bloom_dump(bp, stdout);

    int poststat = bloom_stat(bp), postover = bloom_over(bp);
    ok(poststat == antestat, "stat %d -> %d", antestat, poststat);
    ok(postover == anteover, "over %d -> %d", anteover, postover);

    bloom_destroy(bp);

    return exit_status();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x6, %edi
callq 0x580a
movq 0x5ac0(%rip), %r13      # 0x8fc8
movq (%r13), %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3030
movl $0xc, %edi
movl $0x10, %esi
movl $0x2, %edx
callq 0x388c
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
setne %sil
subq $0x8, %rsp
leaq 0x2ace(%rip), %r10      # 0x6013
leaq 0x2abd(%rip), %rbp      # 0x6009
leaq 0x2ab1(%rip), %r9       # 0x6004
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq $0x22
pushq %rbp
callq 0x4f24
addq $0x20, %rsp
leaq 0x2b37(%rip), %rsi      # 0x60aa
movq %rbx, %rdi
callq 0x3c6a
testl %eax, %eax
je 0x35a3
movl %eax, %r10d
leaq 0x2a92(%rip), %r11      # 0x601b
leaq 0x2a74(%rip), %r9       # 0x6004
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r11
jmp 0x35c5
leaq 0x2a71(%rip), %r10      # 0x601b
leaq 0x2a53(%rip), %r9       # 0x6004
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r10
pushq $0x25
pushq %rbp
callq 0x4f24
addq $0x20, %rsp
leaq 0x2acc(%rip), %rdi      # 0x60a4
callq 0x32b0
leaq 0x2ac6(%rip), %r14      # 0x60aa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39ce
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c6a
testl %eax, %eax
je 0x3625
movl %eax, %r10d
leaq 0x2a35(%rip), %r11      # 0x603d
leaq 0x29f5(%rip), %r9       # 0x6004
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r11
jmp 0x3644
leaq 0x2a11(%rip), %r10      # 0x603d
leaq 0x29d1(%rip), %r9       # 0x6004
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r10
pushq $0x2b
pushq %rbp
callq 0x4f24
addq $0x20, %rsp
leaq 0x2a56(%rip), %rdi      # 0x60ad
callq 0x32b0
leaq 0x2a50(%rip), %rsi      # 0x60b3
movq %rbx, %rdi
callq 0x39ce
leaq 0x29e4(%rip), %rsi      # 0x6056
movq %rbx, %rdi
callq 0x3c6a
testl %eax, %eax
je 0x36a5
movl %eax, %r10d
leaq 0x29d1(%rip), %r11      # 0x6059
leaq 0x2975(%rip), %r9       # 0x6004
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r10
pushq %r11
jmp 0x36c4
leaq 0x29ad(%rip), %r10      # 0x6059
leaq 0x2951(%rip), %r9       # 0x6004
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq $0x0
pushq %r10
pushq $0x31
pushq %rbp
callq 0x4f24
addq $0x20, %rsp
leaq 0x29df(%rip), %rdi      # 0x60b6
callq 0x32b0
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x3d08
movq %rbx, %rdi
callq 0x3cba
movl %eax, %r15d
movq %rbx, %rdi
callq 0x3cde
movl %eax, %r14d
leaq 0x4(%rsp), %r12
movw $0x5f5f, (%r12)         # imm = 0x5F5F
movb $0x0, 0x2(%r12)
movb $0x41, 0x1(%r12)
movb $0x43, 0x4(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x39ce
movb 0x4(%rsp), %al
incb %al
movb %al, 0x4(%rsp)
cmpb $0x5b, %al
jl 0x371b
movb 0x5(%rsp), %al
incb %al
movb %al, 0x5(%rsp)
cmpb $0x45, %al
jl 0x3716
leaq 0x2985(%rip), %rdi      # 0x60ce
callq 0x32b0
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x3d08
leaq 0x4(%rsp), %r12
movb $0x41, 0x1(%r12)
movb $0x43, 0x4(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b38
movb 0x4(%rsp), %al
incb %al
movb %al, 0x4(%rsp)
cmpb $0x5b, %al
jl 0x376a
movb 0x5(%rsp), %al
incb %al
movb %al, 0x5(%rsp)
cmpb $0x45, %al
jl 0x3765
leaq 0x294e(%rip), %rdi      # 0x60e6
callq 0x32b0
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x3d08
movq %rbx, %rdi
callq 0x3cba
movl %eax, %r13d
movq %rbx, %rdi
callq 0x3cde
movl %eax, %r12d
subq $0x8, %rsp
cmpl %r15d, %r13d
jne 0x37ea
leaq 0x28b9(%rip), %r10      # 0x6088
leaq 0x282e(%rip), %r9       # 0x6004
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r15
jmp 0x3807
leaq 0x2897(%rip), %r10      # 0x6088
leaq 0x280c(%rip), %r9       # 0x6004
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r13
pushq %r15
pushq %r10
pushq $0x48
pushq %rbp
callq 0x4f24
addq $0x30, %rsp
subq $0x8, %rsp
cmpl %r14d, %r12d
jne 0x3842
leaq 0x286f(%rip), %r10      # 0x6096
leaq 0x27d6(%rip), %r9       # 0x6004
movl $0x1, %esi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r14
jmp 0x385f
leaq 0x284d(%rip), %r10      # 0x6096
leaq 0x27b4(%rip), %r9       # 0x6004
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r12
pushq %r14
pushq %r10
pushq $0x49
pushq %rbp
callq 0x4f24
addq $0x30, %rsp
movq %rbx, %rdi
callq 0x39a9
callq 0x5aac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop