// File: nilnilnil[P]autocomplete/./include/phrase_map.hpp
// Function: phrase_map::test()
int
    test() {
        PhraseMap pm;
        pm.insert(1, "duckduckgo", "");
        pm.insert(2, "duckduckgeese", "");
        pm.insert(1, "duckduckgoose", "");
        pm.insert(9, "duckduckgoo", "");
        pm.insert(10, "duckgo", "");
        pm.insert(3, "dukgo", "");
        pm.insert(2, "luckkuckgo", "");
        pm.insert(5, "chuckchuckgo", "");
        pm.insert(15, "dilli - no one killed jessica", "");
        pm.insert(11, "aaitbaar - no one killed jessica", "");

        pm.finalize();

        show_indexes(pm, "a");
        assert(naive_query(pm, "a") == pm.query("a"));

        show_indexes(pm, "b");
        assert(naive_query(pm, "b") == pm.query("b"));

        show_indexes(pm, "c");
        assert(naive_query(pm, "c") == pm.query("c"));

        show_indexes(pm, "d");
        assert(naive_query(pm, "d") == pm.query("d"));

        show_indexes(pm, "duck");
        assert(naive_query(pm, "duck") == pm.query("duck"));

        show_indexes(pm, "ka");
        assert(naive_query(pm, "ka") == pm.query("ka"));

        return 0;
    }

// Assembly:
subq $0x3c8, %rsp            # imm = 0x3C8
leaq 0x3b0(%rsp), %rdi
movl $0xe4e1c0, %esi         # imm = 0xE4E1C0
callq 0xdcf0
leaq 0x38f(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x5a50
movq 0x78(%rsp), %rdx
leaq 0x1b53c(%rip), %rsi     # 0x22083
leaq 0x390(%rsp), %rdi
callq 0xddd0
jmp 0x6b56
leaq 0x1b793(%rip), %rsi     # 0x222f0
leaq 0x368(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6b6e
leaq 0x3b0(%rsp), %rdi
movl $0x1, %esi
leaq 0x390(%rsp), %rdx
leaq 0x368(%rsp), %rcx
callq 0xdd50
jmp 0x6b92
leaq 0x390(%rsp), %rdi
callq 0x5320
leaq 0x38f(%rsp), %rdi
callq 0x55e0
leaq 0x347(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x5a50
movq 0x70(%rsp), %rdx
leaq 0x1b4c4(%rip), %rsi     # 0x2208e
leaq 0x348(%rsp), %rdi
callq 0xddd0
jmp 0x6bd9
leaq 0x1b710(%rip), %rsi     # 0x222f0
leaq 0x330(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6bf1
leaq 0x3b0(%rsp), %rdi
movl $0x2, %esi
leaq 0x348(%rsp), %rdx
leaq 0x330(%rsp), %rcx
callq 0xdd50
jmp 0x6c15
leaq 0x348(%rsp), %rdi
callq 0x5320
leaq 0x347(%rsp), %rdi
callq 0x55e0
leaq 0x30f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x5a50
movq 0x68(%rsp), %rdx
leaq 0x1b44f(%rip), %rsi     # 0x2209c
leaq 0x310(%rsp), %rdi
callq 0xddd0
jmp 0x6c5c
leaq 0x1b68d(%rip), %rsi     # 0x222f0
leaq 0x2f8(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6c74
leaq 0x3b0(%rsp), %rdi
movl $0x1, %esi
leaq 0x310(%rsp), %rdx
leaq 0x2f8(%rsp), %rcx
callq 0xdd50
jmp 0x6c98
leaq 0x310(%rsp), %rdi
callq 0x5320
leaq 0x30f(%rsp), %rdi
callq 0x55e0
leaq 0x2d7(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x5a50
movq 0x60(%rsp), %rdx
leaq 0x1b3da(%rip), %rsi     # 0x220aa
leaq 0x2d8(%rsp), %rdi
callq 0xddd0
jmp 0x6cdf
leaq 0x1b60a(%rip), %rsi     # 0x222f0
leaq 0x2c0(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6cf7
leaq 0x3b0(%rsp), %rdi
movl $0x9, %esi
leaq 0x2d8(%rsp), %rdx
leaq 0x2c0(%rsp), %rcx
callq 0xdd50
jmp 0x6d1b
leaq 0x2d8(%rsp), %rdi
callq 0x5320
leaq 0x2d7(%rsp), %rdi
callq 0x55e0
leaq 0x29f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x5a50
movq 0x58(%rsp), %rdx
leaq 0x1b334(%rip), %rsi     # 0x22087
leaq 0x2a0(%rsp), %rdi
callq 0xddd0
jmp 0x6d62
leaq 0x1b587(%rip), %rsi     # 0x222f0
leaq 0x288(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6d7a
leaq 0x3b0(%rsp), %rdi
movl $0xa, %esi
leaq 0x2a0(%rsp), %rdx
leaq 0x288(%rsp), %rcx
callq 0xdd50
jmp 0x6d9e
leaq 0x2a0(%rsp), %rdi
callq 0x5320
leaq 0x29f(%rsp), %rdi
callq 0x55e0
leaq 0x267(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x5a50
movq 0x50(%rsp), %rdx
leaq 0x1b2e0(%rip), %rsi     # 0x220b6
leaq 0x268(%rsp), %rdi
callq 0xddd0
jmp 0x6de5
leaq 0x1b504(%rip), %rsi     # 0x222f0
leaq 0x250(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6dfd
leaq 0x3b0(%rsp), %rdi
movl $0x3, %esi
leaq 0x268(%rsp), %rdx
leaq 0x250(%rsp), %rcx
callq 0xdd50
jmp 0x6e21
leaq 0x268(%rsp), %rdi
callq 0x5320
leaq 0x267(%rsp), %rdi
callq 0x55e0
leaq 0x22f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x5a50
movq 0x48(%rsp), %rdx
leaq 0x1b263(%rip), %rsi     # 0x220bc
leaq 0x230(%rsp), %rdi
callq 0xddd0
jmp 0x6e68
leaq 0x1b481(%rip), %rsi     # 0x222f0
leaq 0x218(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6e80
leaq 0x3b0(%rsp), %rdi
movl $0x2, %esi
leaq 0x230(%rsp), %rdx
leaq 0x218(%rsp), %rcx
callq 0xdd50
jmp 0x6ea4
leaq 0x230(%rsp), %rdi
callq 0x5320
leaq 0x22f(%rsp), %rdi
callq 0x55e0
leaq 0x1f7(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x5a50
movq 0x40(%rsp), %rdx
leaq 0x1b1eb(%rip), %rsi     # 0x220c7
leaq 0x1f8(%rsp), %rdi
callq 0xddd0
jmp 0x6eeb
leaq 0x1b3fe(%rip), %rsi     # 0x222f0
leaq 0x1e0(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6f03
leaq 0x3b0(%rsp), %rdi
movl $0x5, %esi
leaq 0x1f8(%rsp), %rdx
leaq 0x1e0(%rsp), %rcx
callq 0xdd50
jmp 0x6f27
leaq 0x1f8(%rsp), %rdi
callq 0x5320
leaq 0x1f7(%rsp), %rdi
callq 0x55e0
leaq 0x1bf(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x5a50
movq 0x38(%rsp), %rdx
leaq 0x1b175(%rip), %rsi     # 0x220d4
leaq 0x1c0(%rsp), %rdi
callq 0xddd0
jmp 0x6f6e
leaq 0x1b37b(%rip), %rsi     # 0x222f0
leaq 0x1a8(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x6f86
leaq 0x3b0(%rsp), %rdi
movl $0xf, %esi
leaq 0x1c0(%rsp), %rdx
leaq 0x1a8(%rsp), %rcx
callq 0xdd50
jmp 0x6faa
leaq 0x1c0(%rsp), %rdi
callq 0x5320
leaq 0x1bf(%rsp), %rdi
callq 0x55e0
leaq 0x187(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x5a50
movq 0x30(%rsp), %rdx
leaq 0x1b110(%rip), %rsi     # 0x220f2
leaq 0x188(%rsp), %rdi
callq 0xddd0
jmp 0x6ff1
leaq 0x1b2f8(%rip), %rsi     # 0x222f0
leaq 0x170(%rsp), %rdi
xorl %edx, %edx
callq 0xde90
jmp 0x7009
leaq 0x3b0(%rsp), %rdi
movl $0xb, %esi
leaq 0x188(%rsp), %rdx
leaq 0x170(%rsp), %rcx
callq 0xdd50
jmp 0x702d
leaq 0x188(%rsp), %rdi
callq 0x5320
leaq 0x187(%rsp), %rdi
callq 0x55e0
leaq 0x3b0(%rsp), %rdi
xorl %esi, %esi
callq 0xdec0
jmp 0x7058
leaq 0x14f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x5a50
movq 0x28(%rsp), %rdx
leaq 0x1b07a(%rip), %rsi     # 0x220f0
leaq 0x150(%rsp), %rdi
callq 0xddd0
jmp 0x7085
leaq 0x3b0(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x68c0
jmp 0x709c
leaq 0x150(%rsp), %rdi
callq 0x5320
leaq 0x14f(%rsp), %rdi
callq 0x55e0
leaq 0x127(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5a50
movq 0x20(%rsp), %rdx
leaq 0x1b9c2(%rip), %rsi     # 0x22a96
leaq 0x128(%rsp), %rdi
callq 0xddd0
jmp 0x70e3
leaq 0x3b0(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x68c0
jmp 0x70fa
leaq 0x128(%rsp), %rdi
callq 0x5320
leaq 0x127(%rsp), %rdi
callq 0x55e0
leaq 0xff(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5a50
movq 0x18(%rsp), %rdx
leaq 0x1c880(%rip), %rsi     # 0x239b2
leaq 0x100(%rsp), %rdi
callq 0xddd0
jmp 0x7141
leaq 0x3b0(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x68c0
jmp 0x7158
leaq 0x100(%rsp), %rdi
callq 0x5320
leaq 0xff(%rsp), %rdi
callq 0x55e0
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5a50
movq 0x10(%rsp), %rdx
leaq 0x1b662(%rip), %rsi     # 0x227f2
leaq 0xd8(%rsp), %rdi
callq 0xddd0
jmp 0x719f
leaq 0x3b0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x68c0
jmp 0x71b6
leaq 0xd8(%rsp), %rdi
callq 0x5320
leaq 0xd7(%rsp), %rdi
callq 0x55e0
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5a50
movq 0x8(%rsp), %rdx
leaq 0x1af25(%rip), %rsi     # 0x22113
leaq 0xb0(%rsp), %rdi
callq 0xddd0
jmp 0x71fd
leaq 0x3b0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x68c0
jmp 0x7214
leaq 0xb0(%rsp), %rdi
callq 0x5320
leaq 0xaf(%rsp), %rdi
callq 0x55e0
leaq 0x87(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5a50
movq (%rsp), %rdx
leaq 0x1aece(%rip), %rsi     # 0x22118
leaq 0x88(%rsp), %rdi
callq 0xddd0
jmp 0x7259
leaq 0x3b0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x68c0
jmp 0x7270
leaq 0x88(%rsp), %rdi
callq 0x5320
leaq 0x87(%rsp), %rdi
callq 0x55e0
leaq 0x3b0(%rsp), %rdi
callq 0xdf10
xorl %eax, %eax
addq $0x3c8, %rsp            # imm = 0x3C8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x72d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x390(%rsp), %rdi
callq 0x5320
leaq 0x38f(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7321
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x5320
leaq 0x347(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x736a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x310(%rsp), %rdi
callq 0x5320
leaq 0x30f(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x73b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0x5320
leaq 0x2d7(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x73fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x5320
leaq 0x29f(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7445
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x268(%rsp), %rdi
callq 0x5320
leaq 0x267(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x748e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x5320
leaq 0x22f(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x74d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x5320
leaq 0x1f7(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7520
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x5320
leaq 0x1bf(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7569
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x5320
leaq 0x187(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x75cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x5320
leaq 0x14f(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7614
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x5320
leaq 0x127(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x765d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x5320
leaq 0xff(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x76a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x5320
leaq 0xd7(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x76ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x5320
leaq 0xaf(%rsp), %rdi
callq 0x55e0
jmp 0x7742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
jmp 0x7735
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x380(%rsp)
movl %eax, 0x37c(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x5320
leaq 0x87(%rsp), %rdi
callq 0x55e0
leaq 0x3b0(%rsp), %rdi
callq 0xdf10
movq 0x380(%rsp), %rdi
callq 0x5a40
nopl (%rax)