// File: YerevaNN[P]pmi/test.cpp
// Function: main
int main(int argc, char** argv){
    model m;
    
    

    if(argc == 1) {
        m.train(std::cin);
        m.dump(std::cout);
    }
    else {
        m.load(std::cin);
    }
    
    ngram they_could = hash(m.lookup("they"),
                            m.lookup("could"));
    ngram anywhere = hash(m.lookup("anywhere"));
	
    int they_could_count = m.count(they_could, they_could);
    int anywhere_count = m.count(anywhere, anywhere);
    int they_could__anywhere_count = m.count(they_could, anywhere);
    int they_could__anywhere_count_ = m.count(anywhere, they_could);
    
    std::cerr << they_could_count << " " << anywhere_count << " " << they_could__anywhere_count << " " << they_could__anywhere_count_ << std::endl;
    
    return 0;
}

// Assembly:
subq $0x1e8, %rsp            # imm = 0x1E8
movl $0x0, 0x1e4(%rsp)
movl %edi, 0x1e0(%rsp)
movq %rsi, 0x1d8(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x37c0
cmpl $0x1, 0x1e0(%rsp)
jne 0x24a4
movq 0x16b79(%rip), %rsi     # 0x18fd8
leaq 0x130(%rsp), %rdi
movl $0x8, %edx
callq 0xa3f0
jmp 0x2473
movq 0x16b46(%rip), %rsi     # 0x18fc0
leaq 0x130(%rsp), %rdi
callq 0x3df0
jmp 0x2489
jmp 0x24bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x2899
movq 0x16b2d(%rip), %rsi     # 0x18fd8
leaq 0x130(%rsp), %rdi
callq 0x4120
jmp 0x24ba
jmp 0x24bc
leaq 0xf7(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x2290
movq 0x80(%rsp), %rdx
leaq 0xeb24(%rip), %rsi      # 0x11004
leaq 0xf8(%rsp), %rdi
callq 0x21d0
jmp 0x24ef
leaq 0x130(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xa1f0
movq %rax, 0x78(%rsp)
jmp 0x250b
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x2290
movq 0x70(%rsp), %rdx
leaq 0xeae0(%rip), %rsi      # 0x11009
leaq 0xd0(%rsp), %rdi
callq 0x21d0
jmp 0x2538
leaq 0x130(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xa1f0
movq %rax, 0x68(%rsp)
jmp 0x2554
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rdi
movl $0x1fffff, %edx         # imm = 0x1FFFFF
callq 0x36e0
movq %rax, 0x60(%rsp)
jmp 0x256f
leaq 0xd0(%rsp), %rdi
callq 0x20e0
leaq 0xcf(%rsp), %rdi
callq 0x2160
leaq 0xf8(%rsp), %rdi
callq 0x20e0
leaq 0xf7(%rsp), %rdi
callq 0x2160
movq 0x60(%rsp), %rax
movq %rax, 0x118(%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x2290
movq 0x58(%rsp), %rdx
leaq 0xea41(%rip), %rsi      # 0x1100f
leaq 0xa0(%rsp), %rdi
callq 0x21d0
jmp 0x25dd
leaq 0x130(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xa1f0
movq %rax, 0x50(%rsp)
jmp 0x25f9
movq 0x50(%rsp), %rdi
movl $0x1fffff, %edx         # imm = 0x1FFFFF
movq %rdx, %rsi
callq 0x36e0
movq %rax, 0x48(%rsp)
jmp 0x2612
leaq 0xa0(%rsp), %rdi
callq 0x20e0
leaq 0x9f(%rsp), %rdi
callq 0x2160
movq 0x48(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x118(%rsp), %rdx
leaq 0x130(%rsp), %rdi
movq %rdx, %rsi
callq 0x38e0
movl %eax, 0x44(%rsp)
jmp 0x2657
movl 0x44(%rsp), %eax
movl %eax, 0x98(%rsp)
movq 0xc0(%rsp), %rdx
leaq 0x130(%rsp), %rdi
movq %rdx, %rsi
callq 0x38e0
movl %eax, 0x40(%rsp)
jmp 0x2680
movl 0x40(%rsp), %eax
movl %eax, 0x94(%rsp)
movq 0x118(%rsp), %rsi
movq 0xc0(%rsp), %rdx
leaq 0x130(%rsp), %rdi
callq 0x38e0
movl %eax, 0x3c(%rsp)
jmp 0x26ae
movl 0x3c(%rsp), %eax
movl %eax, 0x90(%rsp)
movq 0xc0(%rsp), %rsi
movq 0x118(%rsp), %rdx
leaq 0x130(%rsp), %rdi
callq 0x38e0
movl %eax, 0x38(%rsp)
jmp 0x26dc
movl 0x38(%rsp), %eax
movl %eax, 0x8c(%rsp)
movl 0x98(%rsp), %esi
movq 0x168fb(%rip), %rdi     # 0x18ff0
callq 0x2270
movq %rax, 0x30(%rsp)
jmp 0x2701
movq 0x30(%rsp), %rdi
leaq 0xe90b(%rip), %rsi      # 0x11018
callq 0x2120
movq %rax, 0x28(%rsp)
jmp 0x2719
movq 0x28(%rsp), %rdi
movl 0x94(%rsp), %esi
callq 0x2270
movq %rax, 0x20(%rsp)
jmp 0x2731
movq 0x20(%rsp), %rdi
leaq 0xe8db(%rip), %rsi      # 0x11018
callq 0x2120
movq %rax, 0x18(%rsp)
jmp 0x2749
movq 0x18(%rsp), %rdi
movl 0x90(%rsp), %esi
callq 0x2270
movq %rax, 0x10(%rsp)
jmp 0x2761
movq 0x10(%rsp), %rdi
leaq 0xe8ab(%rip), %rsi      # 0x11018
callq 0x2120
movq %rax, 0x8(%rsp)
jmp 0x2779
movq 0x8(%rsp), %rdi
movl 0x8c(%rsp), %esi
callq 0x2270
movq %rax, (%rsp)
jmp 0x2790
movq (%rsp), %rdi
movq 0x16815(%rip), %rsi     # 0x18fb0
callq 0x2150
jmp 0x27a2
movl $0x0, 0x1e4(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x28c0
movl 0x1e4(%rsp), %eax
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x2846
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x2839
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x282c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x20e0
leaq 0xcf(%rsp), %rdi
callq 0x2160
leaq 0xf8(%rsp), %rdi
callq 0x20e0
leaq 0xf7(%rsp), %rdi
callq 0x2160
jmp 0x2899
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x288c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x20e0
leaq 0x9f(%rsp), %rdi
callq 0x2160
leaq 0x130(%rsp), %rdi
callq 0x28c0
movq 0x128(%rsp), %rdi
callq 0x2280
nopw %cs:(%rax,%rax)
nopl (%rax)