// File: adamiaonr[P]rid-analytics/src/run-analysis.cpp
// Function: create_argv_parser()
ArgvParser * create_argv_parser() {

    ArgvParser * cmds = new ArgvParser();

    cmds->setIntroductoryDescription("\n\nrid-analytics v2.0\n\na tool to \
analyze the behavior of Bloom-filter based forwarding networks. it computes the \
probability of different delivery states for all possible request paths in a \
network topology passed as input.\nby adamiaonr@cmu.edu");

    cmds->setHelpOption("h", "help", "help page.");

    cmds->defineOption(
            OPTION_SCN_FILE,
            "path to .scn file with scenario info for analysis",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_DATA_DIR,
            "path to directory on which to save .csv files w/ results",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_OUTPUT_LABEL,
            "label to add to output .tsv files (will be created in <data-dir>)",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_BF_SIZE,
            "size of Bloom filter (in bits)",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_REQUEST_SIZE,
            "size of request, in # of URL components",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_MM_MODE,
            "multiple match resolution mode. 0 for 'flood' (aka 'AML'), 1 for 'random' (RML), 2/3 for 'hard/soft fallback'. default is 'flood'.",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_RESOLV_MODE,
            "enable/disable incorrect delivery resolution. 0 for 'off', 1 for 'on'. default is 'off'.",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_ORIGIN_SERVER,
            "id of origin server. default is '1'.",
            ArgvParser::OptionRequiresValue);

    cmds->defineOption(
            OPTION_START_ROUTER,
            "id of starting router. default is '0'.",
            ArgvParser::OptionRequiresValue);

    // cmds->defineOption(
    //         OPTION_VERBOSE,
    //         "print stats during the model run. default: not verbose",
    //         ArgvParser::NoOptionAttribute);
    // cmds->defineOptionAlternative(OPTION_VERBOSE, "v");

    return cmds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movl $0x158, %edi            # imm = 0x158
callq 0x54a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x390(%rbp)
callq 0x3fb30
jmp 0x2e069
movq -0x390(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3a0(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x5930
movq -0x398(%rbp), %rdx
leaq 0x34ea3(%rip), %rsi     # 0x62f40
leaq -0x38(%rbp), %rdi
callq 0x30320
jmp 0x2e0a8
movq -0x3a0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x42930
jmp 0x2e0ba
leaq -0x38(%rbp), %rdi
callq 0x52f0
leaq -0x39(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x3b0(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x5930
movq -0x3a8(%rbp), %rdx
leaq 0x30ff0(%rip), %rsi     # 0x5f0e5
leaq -0x60(%rbp), %rdi
callq 0x30320
jmp 0x2e100
leaq -0x89(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x5930
movq -0x3b8(%rbp), %rdx
leaq 0x34f13(%rip), %rsi     # 0x63034
leaq -0x88(%rbp), %rdi
callq 0x30320
jmp 0x2e12f
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x5930
movq -0x3c0(%rbp), %rdx
leaq 0x34ee9(%rip), %rsi     # 0x63039
leaq -0xb0(%rbp), %rdi
callq 0x30320
jmp 0x2e15e
movq -0x3b0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x42830
jmp 0x2e17e
leaq -0xb0(%rbp), %rdi
callq 0x52f0
leaq -0xb1(%rbp), %rdi
callq 0x5510
leaq -0x88(%rbp), %rdi
callq 0x52f0
leaq -0x89(%rbp), %rdi
callq 0x5510
leaq -0x60(%rbp), %rdi
callq 0x52f0
leaq -0x61(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x3d0(%rbp)
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x5930
movq -0x3c8(%rbp), %rdx
leaq 0x34e58(%rip), %rsi     # 0x63044
leaq -0xd8(%rbp), %rdi
callq 0x30320
jmp 0x2e1fa
leaq -0x101(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x5930
movq -0x3d8(%rbp), %rdx
leaq 0x34e32(%rip), %rsi     # 0x6304d
leaq -0x100(%rbp), %rdi
callq 0x30320
jmp 0x2e229
movq -0x3d0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0x100(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e24a
leaq -0x100(%rbp), %rdi
callq 0x52f0
leaq -0x101(%rbp), %rdi
callq 0x5510
leaq -0xd8(%rbp), %rdi
callq 0x52f0
leaq -0xd9(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x3e8(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x5930
movq -0x3e0(%rbp), %rdx
leaq 0x34dd9(%rip), %rsi     # 0x6307f
leaq -0x128(%rbp), %rdi
callq 0x30320
jmp 0x2e2b4
leaq -0x151(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x5930
movq -0x3f0(%rbp), %rdx
leaq 0x34db3(%rip), %rsi     # 0x63088
leaq -0x150(%rbp), %rdi
callq 0x30320
jmp 0x2e2e3
movq -0x3e8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
leaq -0x150(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e304
leaq -0x150(%rbp), %rdi
callq 0x52f0
leaq -0x151(%rbp), %rdi
callq 0x5510
leaq -0x128(%rbp), %rdi
callq 0x52f0
leaq -0x129(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x400(%rbp)
leaq -0x179(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x5930
movq -0x3f8(%rbp), %rdx
leaq 0x34d61(%rip), %rsi     # 0x630c1
leaq -0x178(%rbp), %rdi
callq 0x30320
jmp 0x2e36e
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x5930
movq -0x408(%rbp), %rdx
leaq 0x34d3f(%rip), %rsi     # 0x630ce
leaq -0x1a0(%rbp), %rdi
callq 0x30320
jmp 0x2e39d
movq -0x400(%rbp), %rdi
leaq -0x178(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e3be
leaq -0x1a0(%rbp), %rdi
callq 0x52f0
leaq -0x1a1(%rbp), %rdi
callq 0x5510
leaq -0x178(%rbp), %rdi
callq 0x52f0
leaq -0x179(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x418(%rbp)
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x5930
movq -0x410(%rbp), %rdx
leaq 0x34cf6(%rip), %rsi     # 0x63110
leaq -0x1c8(%rbp), %rdi
callq 0x30320
jmp 0x2e428
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x420(%rbp)
callq 0x5930
movq -0x420(%rbp), %rdx
leaq 0x34ccf(%rip), %rsi     # 0x63118
leaq -0x1f0(%rbp), %rdi
callq 0x30320
jmp 0x2e457
movq -0x418(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x1f0(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e478
leaq -0x1f0(%rbp), %rdi
callq 0x52f0
leaq -0x1f1(%rbp), %rdi
callq 0x5510
leaq -0x1c8(%rbp), %rdi
callq 0x52f0
leaq -0x1c9(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x430(%rbp)
leaq -0x219(%rbp), %rdi
movq %rdi, -0x428(%rbp)
callq 0x5930
movq -0x428(%rbp), %rdx
leaq 0x34c63(%rip), %rsi     # 0x63137
leaq -0x218(%rbp), %rdi
callq 0x30320
jmp 0x2e4e2
leaq -0x241(%rbp), %rdi
movq %rdi, -0x438(%rbp)
callq 0x5930
movq -0x438(%rbp), %rdx
leaq 0x34c41(%rip), %rsi     # 0x63144
leaq -0x240(%rbp), %rdi
callq 0x30320
jmp 0x2e511
movq -0x430(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x240(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e532
leaq -0x240(%rbp), %rdi
callq 0x52f0
leaq -0x241(%rbp), %rdi
callq 0x5510
leaq -0x218(%rbp), %rdi
callq 0x52f0
leaq -0x219(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x448(%rbp)
leaq -0x269(%rbp), %rdi
movq %rdi, -0x440(%rbp)
callq 0x5930
movq -0x440(%rbp), %rdx
leaq 0x34bde(%rip), %rsi     # 0x6316c
leaq -0x268(%rbp), %rdi
callq 0x30320
jmp 0x2e59c
leaq -0x291(%rbp), %rdi
movq %rdi, -0x450(%rbp)
callq 0x5930
movq -0x450(%rbp), %rdx
leaq 0x34bb7(%rip), %rsi     # 0x63174
leaq -0x290(%rbp), %rdi
callq 0x30320
jmp 0x2e5cb
movq -0x448(%rbp), %rdi
leaq -0x268(%rbp), %rsi
leaq -0x290(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e5ec
leaq -0x290(%rbp), %rdi
callq 0x52f0
leaq -0x291(%rbp), %rdi
callq 0x5510
leaq -0x268(%rbp), %rdi
callq 0x52f0
leaq -0x269(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x460(%rbp)
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x5930
movq -0x458(%rbp), %rdx
leaq 0x34baf(%rip), %rsi     # 0x631f7
leaq -0x2b8(%rbp), %rdi
callq 0x30320
jmp 0x2e656
leaq -0x2e1(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x5930
movq -0x468(%rbp), %rdx
leaq 0x34b90(%rip), %rsi     # 0x63207
leaq -0x2e0(%rbp), %rdi
callq 0x30320
jmp 0x2e685
movq -0x460(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
leaq -0x2e0(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e6a6
leaq -0x2e0(%rbp), %rdi
callq 0x52f0
leaq -0x2e1(%rbp), %rdi
callq 0x5510
leaq -0x2b8(%rbp), %rdi
callq 0x52f0
leaq -0x2b9(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x478(%rbp)
leaq -0x309(%rbp), %rdi
movq %rdi, -0x470(%rbp)
callq 0x5930
movq -0x470(%rbp), %rdx
leaq 0x34b5e(%rip), %rsi     # 0x63260
leaq -0x308(%rbp), %rdi
callq 0x30320
jmp 0x2e710
leaq -0x331(%rbp), %rdi
movq %rdi, -0x480(%rbp)
callq 0x5930
movq -0x480(%rbp), %rdx
leaq 0x34b3d(%rip), %rsi     # 0x6326e
leaq -0x330(%rbp), %rdi
callq 0x30320
jmp 0x2e73f
movq -0x478(%rbp), %rdi
leaq -0x308(%rbp), %rsi
leaq -0x330(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e760
leaq -0x330(%rbp), %rdi
callq 0x52f0
leaq -0x331(%rbp), %rdi
callq 0x5510
leaq -0x308(%rbp), %rdi
callq 0x52f0
leaq -0x309(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
movq %rax, -0x490(%rbp)
leaq -0x359(%rbp), %rdi
movq %rdi, -0x488(%rbp)
callq 0x5930
movq -0x488(%rbp), %rdx
leaq 0x34ad7(%rip), %rsi     # 0x63293
leaq -0x358(%rbp), %rdi
callq 0x30320
jmp 0x2e7ca
leaq -0x381(%rbp), %rdi
movq %rdi, -0x498(%rbp)
callq 0x5930
movq -0x498(%rbp), %rdx
leaq 0x34ab5(%rip), %rsi     # 0x632a0
leaq -0x380(%rbp), %rdi
callq 0x30320
jmp 0x2e7f9
movq -0x490(%rbp), %rdi
leaq -0x358(%rbp), %rsi
leaq -0x380(%rbp), %rdx
movl $0x1, %ecx
callq 0x42540
jmp 0x2e81a
leaq -0x380(%rbp), %rdi
callq 0x52f0
leaq -0x381(%rbp), %rdi
callq 0x5510
leaq -0x358(%rbp), %rdi
callq 0x52f0
leaq -0x359(%rbp), %rdi
callq 0x5510
movq -0x8(%rbp), %rax
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
movq -0x390(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x158, %esi            # imm = 0x158
callq 0x54b0
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e89c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x52f0
leaq -0x39(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e919
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e8ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x52f0
leaq -0xb1(%rbp), %rdi
callq 0x5510
leaq -0x88(%rbp), %rdi
callq 0x52f0
leaq -0x89(%rbp), %rdi
callq 0x5510
leaq -0x60(%rbp), %rdi
callq 0x52f0
leaq -0x61(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e973
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e95b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x52f0
leaq -0x101(%rbp), %rdi
callq 0x5510
leaq -0xd8(%rbp), %rdi
callq 0x52f0
leaq -0xd9(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e9d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2e9b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x52f0
leaq -0x151(%rbp), %rdi
callq 0x5510
leaq -0x128(%rbp), %rdi
callq 0x52f0
leaq -0x129(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ea2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ea15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x52f0
leaq -0x1a1(%rbp), %rdi
callq 0x5510
leaq -0x178(%rbp), %rdi
callq 0x52f0
leaq -0x179(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ea8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ea72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x52f0
leaq -0x1f1(%rbp), %rdi
callq 0x5510
leaq -0x1c8(%rbp), %rdi
callq 0x52f0
leaq -0x1c9(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2eae7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2eacf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x52f0
leaq -0x241(%rbp), %rdi
callq 0x5510
leaq -0x218(%rbp), %rdi
callq 0x52f0
leaq -0x219(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2eb44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2eb2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x52f0
leaq -0x291(%rbp), %rdi
callq 0x5510
leaq -0x268(%rbp), %rdi
callq 0x52f0
leaq -0x269(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2eba1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2eb89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x52f0
leaq -0x2e1(%rbp), %rdi
callq 0x5510
leaq -0x2b8(%rbp), %rdi
callq 0x52f0
leaq -0x2b9(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ebfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ebe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x52f0
leaq -0x331(%rbp), %rdi
callq 0x5510
leaq -0x308(%rbp), %rdi
callq 0x52f0
leaq -0x309(%rbp), %rdi
callq 0x5510
jmp 0x2ec64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ec58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x2ec40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x52f0
leaq -0x381(%rbp), %rdi
callq 0x5510
leaq -0x358(%rbp), %rdi
callq 0x52f0
leaq -0x359(%rbp), %rdi
callq 0x5510
movq -0x10(%rbp), %rdi
callq 0x5920
nopl (%rax)