// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %rbx
cmpl $0x6, %edi
jne 0x3f34
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x20c0
movq 0x10(%rbx), %rsi
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x20c0
movq 0x18(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x20c0
movq 0x20(%rbx), %rdi
callq 0x2240
vmovsd %xmm0, 0x8(%rsp)
leaq 0x100(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0x4422
leaq 0xe0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x555d2(%rip), %rsi     # 0x59251
leaq 0x555d8(%rip), %rdx     # 0x5925e
leaq 0xd0(%rsp), %rdi
callq 0x4d98
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x25fd
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3cc5
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3ce2
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x21f0
vcvtsd2ss 0x8(%rsp), %xmm1, %xmm0
movq 0x28(%rbx), %rax
movzbl (%rax), %eax
cmpl $0x47, %eax
vmovss %xmm0, 0x8(%rsp)
je 0x3e33
cmpl $0x67, %eax
je 0x3da6
cmpl $0x71, %eax
jne 0x3f56
leaq 0x160(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x150(%rsp), %rdi
callq 0x4422
leaq 0xc0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb0(%rsp), %rdi
callq 0x4422
vcvtss2sd 0x8(%rsp), %xmm1, %xmm0
leaq 0x150(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl $0x71, %edx
callq 0x2867
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d99
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x150(%rsp), %rdi
jmp 0x3ec4
leaq 0x120(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x110(%rsp), %rdi
callq 0x4422
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x4422
vcvtss2sd 0x8(%rsp), %xmm1, %xmm0
leaq 0x110(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movl $0x67, %edx
callq 0x2867
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e26
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x110(%rsp), %rdi
jmp 0x3ec4
leaq 0x140(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x130(%rsp), %rdi
callq 0x4422
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x90(%rsp), %rdi
callq 0x4422
vcvtss2sd 0x8(%rsp), %xmm1, %xmm0
leaq 0x130(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl $0x47, %edx
callq 0x2867
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ebc
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x3ed4
movq (%r14), %rsi
incq %rsi
callq 0x21f0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3eef
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f0a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f25
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21f0
xorl %eax, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rsi
leaq 0x190(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x20c0
leaq 0x190(%rsp), %rdi
callq 0x3b7c
movq (%rbx), %rsi
leaq 0x170(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x20c0
leaq 0x170(%rsp), %rdi
callq 0x3b7c
movq %rax, %rbx
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40df
movq 0x180(%rsp), %rsi
jmp 0x40c3
jmp 0x40dc
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4008
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x4008
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x4029
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x4029
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x4047
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x4047
movq %rax, %rbx
movq 0x150(%rsp), %rdi
cmpq %r14, %rdi
je 0x40df
movq 0x160(%rsp), %rsi
jmp 0x40c3
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x40df
movq 0x140(%rsp), %rsi
jmp 0x40c3
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
je 0x40df
movq 0x120(%rsp), %rsi
jmp 0x40c3
movq %rax, %rbx
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4130
movq 0x1a0(%rsp), %rsi
jmp 0x4128
jmp 0x40d7
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x40ae
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x40ae
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x40df
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x40df
movq %rax, %rbx
jmp 0x40fa
movq %rax, %rbx
jmp 0x4115
movq %rax, %rbx
jmp 0x4130
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40fa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4115
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4130
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2310