// File: JMMackenzie[P]binary_to_jass/bin_to_jass_disk.cpp
// Function: main
int main(int argc, char** argv)
{
    if(argc != 6)
      usage(argv[0]);

    // Get input data
    std::string ds2i_prefix = argv[1];
    std::string docid_file = argv[2];
    std::string lexicon_file = argv[3];
    float quantization = std::atof(argv[4]);

    // Do it
    read_and_write_doclist(docid_file, "CIdoclist.bin");
    if (*argv[5] == 'q')
        score_index(ds2i_prefix, lexicon_file, quantization, 'q');
    else if (*argv[5] == 'G')
        score_index(ds2i_prefix, lexicon_file, quantization, 'G');
    else if (*argv[5] == 'g')
        score_index(ds2i_prefix, lexicon_file, quantization, 'g');
    else
        usage(argv[0]);


return (EXIT_SUCCESS);
}

// Assembly:
subq $0x248, %rsp            # imm = 0x248
movl $0x0, 0x244(%rsp)
movl %edi, 0x240(%rsp)
movq %rsi, 0x238(%rsp)
cmpl $0x6, 0x240(%rsp)
je 0x44ae
movq 0x238(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x217(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x2330
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x218(%rsp), %rdi
callq 0x2270
jmp 0x443a
leaq 0x218(%rsp), %rdi
callq 0x4350
jmp 0x4449
leaq 0x218(%rsp), %rdi
callq 0x2120
leaq 0x217(%rsp), %rdi
callq 0x21c0
jmp 0x44ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x449c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x2120
leaq 0x217(%rsp), %rdi
callq 0x21c0
jmp 0x4a94
movq 0x238(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x1df(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x2330
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x1e0(%rsp), %rdi
callq 0x2270
jmp 0x44ea
leaq 0x1df(%rsp), %rdi
callq 0x21c0
movq 0x238(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x1b7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x2330
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x1b8(%rsp), %rdi
callq 0x2270
jmp 0x4533
leaq 0x1b7(%rsp), %rdi
callq 0x21c0
movq 0x238(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
leaq 0x18f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x2330
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x190(%rsp), %rdi
callq 0x2270
jmp 0x457c
leaq 0x18f(%rsp), %rdi
callq 0x21c0
movq 0x238(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x2210
vmovaps %xmm0, %xmm1
vcvtsd2ss %xmm1, %xmm0, %xmm0
vmovss %xmm0, 0x188(%rsp)
leaq 0x168(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x20d0
jmp 0x45c2
leaq 0x147(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2330
movq 0x10(%rsp), %rdx
leaq 0x2febd9(%rip), %rsi    # 0x3031b9
leaq 0x148(%rsp), %rdi
callq 0x2270
jmp 0x45ef
leaq 0x168(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x2650
jmp 0x4606
leaq 0x148(%rsp), %rdi
callq 0x2120
leaq 0x147(%rsp), %rdi
callq 0x21c0
leaq 0x168(%rsp), %rdi
callq 0x2120
movq 0x238(%rsp), %rax
movq 0x28(%rax), %rax
movsbl (%rax), %eax
cmpl $0x71, %eax
jne 0x47e5
leaq 0x120(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20d0
jmp 0x465c
leaq 0x100(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x20d0
jmp 0x4673
vmovss 0x188(%rsp), %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movl $0x71, %edx
callq 0x2940
jmp 0x469c
leaq 0x100(%rsp), %rdi
callq 0x2120
leaq 0x120(%rsp), %rdi
callq 0x2120
jmp 0x4a2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x1df(%rsp), %rdi
callq 0x21c0
jmp 0x4a94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x1b7(%rsp), %rdi
callq 0x21c0
jmp 0x4a87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x18f(%rsp), %rdi
callq 0x21c0
jmp 0x4a7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x4a6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x477d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x2120
leaq 0x147(%rsp), %rdi
callq 0x21c0
leaq 0x168(%rsp), %rdi
callq 0x2120
jmp 0x4a6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x47d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x2120
leaq 0x120(%rsp), %rdi
callq 0x2120
jmp 0x4a6d
movq 0x238(%rsp), %rax
movq 0x28(%rax), %rax
movsbl (%rax), %eax
cmpl $0x47, %eax
jne 0x48bc
leaq 0xe0(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20d0
jmp 0x4814
leaq 0xc0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x20d0
jmp 0x482b
vmovss 0x188(%rsp), %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x47, %edx
callq 0x2940
jmp 0x4854
leaq 0xc0(%rsp), %rdi
callq 0x2120
leaq 0xe0(%rsp), %rdi
callq 0x2120
jmp 0x4a2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x48aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x2120
leaq 0xe0(%rsp), %rdi
callq 0x2120
jmp 0x4a6d
movq 0x238(%rsp), %rax
movq 0x28(%rax), %rax
movsbl (%rax), %eax
cmpl $0x67, %eax
jne 0x4993
leaq 0xa0(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20d0
jmp 0x48eb
leaq 0x80(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x20d0
jmp 0x4902
vmovss 0x188(%rsp), %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x67, %edx
callq 0x2940
jmp 0x492b
leaq 0x80(%rsp), %rdi
callq 0x2120
leaq 0xa0(%rsp), %rdi
callq 0x2120
jmp 0x4a28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x4981
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x2120
leaq 0xa0(%rsp), %rdi
callq 0x2120
jmp 0x4a6d
movq 0x238(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2330
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x49c6
leaq 0x60(%rsp), %rdi
callq 0x4350
jmp 0x49d2
leaq 0x60(%rsp), %rdi
callq 0x2120
leaq 0x5f(%rsp), %rdi
callq 0x21c0
jmp 0x4a28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
jmp 0x4a1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x2120
leaq 0x5f(%rsp), %rdi
callq 0x21c0
jmp 0x4a6d
jmp 0x4a2a
jmp 0x4a2c
movl $0x0, 0x244(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x2120
leaq 0x1b8(%rsp), %rdi
callq 0x2120
leaq 0x1e0(%rsp), %rdi
callq 0x2120
movl 0x244(%rsp), %eax
addq $0x248, %rsp            # imm = 0x248
retq
leaq 0x190(%rsp), %rdi
callq 0x2120
leaq 0x1b8(%rsp), %rdi
callq 0x2120
leaq 0x1e0(%rsp), %rdi
callq 0x2120
movq 0x208(%rsp), %rdi
callq 0x2320
nopw %cs:(%rax,%rax)