// File: WinChua[P]MLDemo/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    if(argc < 3)
    {
        std::cout << "you should specify the train and test file like:" << std::endl;
        std::cout << "MLDemo train.file test.file" << std::endl;
        return 1;
    }
    std::string trainfile(argv[1]), testfile(argv[2]);
    File train(trainfile);
    File test(testfile);
    //train.show_features();
    TreeNode root(train);
    train.show_statistic();
    test.show_statistic();
    root.test(test);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x8(%rbp)
jge 0xb23f
movq 0x7de2(%rip), %rdi      # 0x12fd8
leaq 0xf48(%rip), %rsi       # 0xc145
callq 0x21f0
movq %rax, %rdi
movq 0x7dbc(%rip), %rsi      # 0x12fc8
callq 0x2240
movq 0x7dc0(%rip), %rdi      # 0x12fd8
leaq 0xf57(%rip), %rsi       # 0xc176
callq 0x21f0
movq %rax, %rdi
movq 0x7d9a(%rip), %rsi      # 0x12fc8
callq 0x2240
movl $0x1, -0x4(%rbp)
jmp 0xb488
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x230(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x2360
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x4370
jmp 0xb277
leaq -0x31(%rbp), %rdi
callq 0x2260
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x240(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x2360
movq -0x240(%rbp), %rsi
movq -0x238(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x4370
jmp 0xb2b8
leaq -0x69(%rbp), %rdi
callq 0x2260
leaq -0x100(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x20f0
jmp 0xb2d3
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x8a40
jmp 0xb2e8
leaq -0x100(%rbp), %rdi
callq 0x2140
leaq -0x190(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x20f0
jmp 0xb306
leaq -0x170(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x8a40
jmp 0xb31b
leaq -0x190(%rbp), %rdi
callq 0x2140
leaq -0x220(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x2590
jmp 0xb33c
leaq -0xe0(%rbp), %rdi
callq 0x8990
jmp 0xb34a
leaq -0x170(%rbp), %rdi
callq 0x8990
jmp 0xb358
leaq -0x220(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x30b0
jmp 0xb36d
movl $0x0, -0x4(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xb4a0
leaq -0x170(%rbp), %rdi
callq 0xb560
leaq -0xe0(%rbp), %rdi
callq 0xb560
leaq -0x68(%rbp), %rdi
callq 0x2140
leaq -0x30(%rbp), %rdi
callq 0x2140
jmp 0xb488
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x2260
jmp 0xb494
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x2260
jmp 0xb47d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb474
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x2140
jmp 0xb474
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb468
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x2140
jmp 0xb468
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb45c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xb4a0
leaq -0x170(%rbp), %rdi
callq 0xb560
leaq -0xe0(%rbp), %rdi
callq 0xb560
leaq -0x68(%rbp), %rdi
callq 0x2140
leaq -0x30(%rbp), %rdi
callq 0x2140
jmp 0xb494
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2350
nopl (%rax)