// File: wichtounet[P]articles/src/graphs.cpp
// Function: graphs::output(graphs::Output)
void graphs::output(Output output){
    if(output == Output::GOOGLE){
        std::ofstream file("graph.html");

        file << "<html>" << std::endl;
        file << "<head>" << std::endl;
        file << "<script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>" << std::endl;
        file << "<script type=\"text/javascript\">google.load('visualization', '1.0', {'packages':['corechart']});</script>" << std::endl;
        file << "</head>" << std::endl;
        file << "<body>" << std::endl;

        file << "<script type=\"text/javascript\">" << std::endl;

        //One function to rule them all
        for(auto& graph : all_graphs){
            file << "function draw_" << graph->name << "(){" << std::endl;

            file << "var data = google.visualization.arrayToDataTable([" << std::endl;

            //['x', 'Cats', 'Blanket 1', 'Blanket 2'],
            auto results = compute_values(graph);

            file << "['x'";

            auto first = results.begin()->second;
            for(auto& pair : first){
                file << ", '" << pair.first << "'";
            }

            file << "]," << std::endl;

            std::vector<std::string> groups;
            for(auto& group : results){
                groups.push_back(group.first);
            }
            std::sort(groups.begin(), groups.end(), numeric_cmp);

            std::size_t max = 0;
            for(auto& group_title : groups){
                file << "['" << group_title << "'";

                for(auto& serie : results[group_title]){
                    file << ", " << serie.second;
                    max = std::max(max, serie.second);
                }

                file << "]," << std::endl;
            }

            file << "]);" << std::endl;

            file << "var graph = new google.visualization.LineChart(document.getElementById('graph_" << graph->name <<"'));" << std::endl
                 << "var options = {curveType: \"function\","
                 << "title: \"" << graph->title << "\","
                 << "animation: {duration:1200, easing:\"in\"},"
                 << "width: 700, height: 400,"
                 << "hAxis: {title:\"Number of elements\", slantedText:true},"
                 << "vAxis: {viewWindow: {min:0}, title:\"" << graph->unit << "\"}};" << std::endl
                 << "graph.draw(data, options);" << std::endl;

            file << "var button = document.getElementById('graph_button_" << graph->name << "');" << std::endl
                 << "button.onclick = function(){" << std::endl
                 << "if(options.vAxis.logScale){" << std::endl
                 << "button.value=\"Logarithmic Scale\";" << std::endl
                 << "} else {" << std::endl
                 << "button.value=\"Normal scale\";" << std::endl
                 << "}" << std::endl
                 << "options.vAxis.logScale=!options.vAxis.logScale;" << std::endl
                 << "graph.draw(data, options);" << std::endl
                 << "};" << std::endl;

            file << "}" << std::endl;
        }

        //One function to find them
        file << "function draw_all(){" << std::endl;
        for(auto& graph : all_graphs){
            file << "draw_" << graph->name << "();" << std::endl;
        }
        file << "}" << std::endl;

        //One callback to bring them all
        file << "google.setOnLoadCallback(draw_all);" << std::endl;
        file << "</script>" << std::endl;
        file << std::endl;

        //And in the web page bind them
        for(auto& graph : all_graphs){
            file << "<div id=\"graph_" << graph->name << "\" style=\"width: 700px; height: 400px;\"></div>" << std::endl;
            file << "<input id=\"graph_button_" << graph->name << "\" type=\"button\" value=\"Logarithmic scale\">" << std::endl;
        }

        file << "</body>" << std::endl;
        file << "</html>" << std::endl;

        //...In the land of Google where shadow lies
    } else if (output == Output::PLUGIN) {
        std::ofstream file("graph.html");

        //One function to rule them all
        for(auto& graph : all_graphs){
            file << "[line_chart width=\"700px\" height=\"400px\" scale_button=\"true\" title=\"" << graph->title
                << "\" h_title=\"Number of elements\" v_title=\"" << graph->unit << "\"]" << std::endl;

            //['x', 'Cats', 'Blanket 1', 'Blanket 2'],
            auto results = compute_values(graph);

            file << "['x'";

            auto first = results.begin()->second;
            for(auto& pair : first){
                file << ", '" << pair.first << "'";
            }

            file << "]," << std::endl;

            std::vector<std::string> groups;
            for(auto& group : results){
                groups.push_back(group.first);
            }
            std::sort(groups.begin(), groups.end(), numeric_cmp);

            std::size_t max = 0;
            for(auto& group_title : groups){
                file << "['" << group_title << "'";

                for(auto& serie : results[group_title]){
                    file << ", " << serie.second;
                    max = std::max(max, serie.second);
                }

                file << "]," << std::endl;
            }

            file << "[/line_chart]" << std::endl;
        }
    }
}

// Assembly:
subq $0x9f8, %rsp            # imm = 0x9F8
movl %edi, 0x9f4(%rsp)
cmpl $0x0, 0x9f4(%rsp)
jne 0x175d95
leaq 0x14ec2(%rip), %rsi     # 0x189b35
leaq 0x7f0(%rsp), %rdi
movq %rdi, 0x2e0(%rsp)
movl $0x10, %edx
callq 0x5250
movq 0x2e0(%rsp), %rdi
leaq 0x14ea4(%rip), %rsi     # 0x189b40
callq 0x5200
movq %rax, 0x2e8(%rsp)
jmp 0x174cab
movq 0x2e8(%rsp), %rdi
movq 0x7b306(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174cc1
leaq 0x14e7f(%rip), %rsi     # 0x189b47
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2d8(%rsp)
jmp 0x174cdf
movq 0x2d8(%rsp), %rdi
movq 0x7b2d2(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174cf5
leaq 0x14e52(%rip), %rsi     # 0x189b4e
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2d0(%rsp)
jmp 0x174d13
movq 0x2d0(%rsp), %rdi
movq 0x7b29e(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174d29
leaq 0x14e6a(%rip), %rsi     # 0x189b9a
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2c8(%rsp)
jmp 0x174d47
movq 0x2c8(%rsp), %rdi
movq 0x7b26a(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174d5d
leaq 0x14e9f(%rip), %rsi     # 0x189c03
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2c0(%rsp)
jmp 0x174d7b
movq 0x2c0(%rsp), %rdi
movq 0x7b236(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174d91
leaq 0x14e73(%rip), %rsi     # 0x189c0b
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2b8(%rsp)
jmp 0x174daf
movq 0x2b8(%rsp), %rdi
movq 0x7b202(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174dc5
leaq 0x14e46(%rip), %rsi     # 0x189c12
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2b0(%rsp)
jmp 0x174de3
movq 0x2b0(%rsp), %rdi
movq 0x7b1ce(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174df9
leaq 0x10938d0(%rip), %rax   # 0x12086d0
movq %rax, 0x7d8(%rsp)
leaq 0x10938c1(%rip), %rdi   # 0x12086d0
callq 0x176800
movq %rax, 0x7d0(%rsp)
leaq 0x10938ad(%rip), %rdi   # 0x12086d0
callq 0x176830
movq %rax, 0x7c8(%rsp)
leaq 0x7d0(%rsp), %rdi
leaq 0x7c8(%rsp), %rsi
callq 0x176860
testb $0x1, %al
jne 0x174e4e
jmp 0x1759bc
leaq 0x7d0(%rsp), %rdi
callq 0x1768a0
movq %rax, 0x7c0(%rsp)
leaq 0x14dc8(%rip), %rsi     # 0x189c32
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x2a8(%rsp)
jmp 0x174e81
movq 0x7c0(%rsp), %rdi
callq 0x176640
movq 0x2a8(%rsp), %rdi
movq %rax, %rsi
callq 0x51e0
movq %rax, 0x2a0(%rsp)
jmp 0x174ea8
movq 0x2a0(%rsp), %rdi
leaq 0x15010(%rip), %rsi     # 0x189ec7
callq 0x5200
movq %rax, 0x298(%rsp)
jmp 0x174ec6
movq 0x298(%rsp), %rdi
movq 0x7b0eb(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174edc
leaq 0x14d5e(%rip), %rsi     # 0x189c41
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x290(%rsp)
jmp 0x174efa
movq 0x290(%rsp), %rdi
movq 0x7b0b7(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x174f10
movq 0x7c0(%rsp), %rsi
leaq 0x778(%rsp), %rdi
movq %rdi, 0x288(%rsp)
callq 0x1768b0
movq 0x288(%rsp), %rsi
leaq 0x788(%rsp), %rdi
callq 0x174ae0
jmp 0x174f44
leaq 0x778(%rsp), %rdi
callq 0x176490
leaq 0x14d1c(%rip), %rsi     # 0x189c74
leaq 0x7f0(%rsp), %rdi
callq 0x5200
jmp 0x174f67
leaq 0x788(%rsp), %rdi
callq 0x1768e0
movq %rax, 0x738(%rsp)
leaq 0x738(%rsp), %rdi
callq 0x176910
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x740(%rsp), %rdi
callq 0x176930
jmp 0x174f9f
leaq 0x740(%rsp), %rax
movq %rax, 0x730(%rsp)
movq 0x730(%rsp), %rdi
callq 0x176960
movq %rax, 0x728(%rsp)
movq 0x730(%rsp), %rdi
callq 0x176990
movq %rax, 0x720(%rsp)
leaq 0x728(%rsp), %rdi
leaq 0x720(%rsp), %rsi
callq 0x1769c0
testb $0x1, %al
jne 0x174ff7
jmp 0x1750e4
leaq 0x728(%rsp), %rdi
callq 0x1769e0
movq %rax, 0x718(%rsp)
leaq 0x14c66(%rip), %rsi     # 0x189c79
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x280(%rsp)
jmp 0x17502a
movq 0x280(%rsp), %rdi
movq 0x718(%rsp), %rsi
callq 0x51e0
movq %rax, 0x278(%rsp)
jmp 0x175049
movq 0x278(%rsp), %rdi
leaq 0x14c23(%rip), %rsi     # 0x189c7b
callq 0x5200
jmp 0x17505f
jmp 0x175061
leaq 0x728(%rsp), %rdi
callq 0x176a00
jmp 0x174fd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
jmp 0x175d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
leaq 0x778(%rsp), %rdi
callq 0x176490
jmp 0x175d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
jmp 0x1759aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
jmp 0x17599d
leaq 0x14b92(%rip), %rsi     # 0x189c7d
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x270(%rsp)
jmp 0x175102
movq 0x270(%rsp), %rdi
movq 0x7aeaf(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175118
leaq 0x700(%rsp), %rdi
callq 0x176a30
leaq 0x788(%rsp), %rax
movq %rax, 0x6f8(%rsp)
movq 0x6f8(%rsp), %rdi
callq 0x1768e0
movq %rax, 0x6f0(%rsp)
movq 0x6f8(%rsp), %rdi
callq 0x176a40
movq %rax, 0x6e8(%rsp)
leaq 0x6f0(%rsp), %rdi
leaq 0x6e8(%rsp), %rsi
callq 0x176a70
testb $0x1, %al
jne 0x17517a
jmp 0x1751dd
leaq 0x6f0(%rsp), %rdi
callq 0x176a90
movq %rax, 0x6e0(%rsp)
movq 0x6e0(%rsp), %rsi
leaq 0x700(%rsp), %rdi
callq 0x176ab0
jmp 0x1751a6
jmp 0x1751a8
leaq 0x6f0(%rsp), %rdi
callq 0x176b20
jmp 0x17515f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
leaq 0x700(%rsp), %rdi
callq 0x176c70
jmp 0x17599d
leaq 0x700(%rsp), %rdi
movq %rdi, 0x268(%rsp)
callq 0x176ba0
movq 0x268(%rsp), %rdi
movq %rax, 0x6d8(%rsp)
callq 0x176bd0
movq %rax, 0x6d0(%rsp)
movq 0x6d8(%rsp), %rdi
movq 0x6d0(%rsp), %rsi
leaq -0x626(%rip), %rdx      # 0x174c00
callq 0x176b50
jmp 0x17522d
movq $0x0, 0x6c8(%rsp)
leaq 0x700(%rsp), %rax
movq %rax, 0x6c0(%rsp)
movq 0x6c0(%rsp), %rdi
callq 0x176ba0
movq %rax, 0x6b8(%rsp)
movq 0x6c0(%rsp), %rdi
callq 0x176bd0
movq %rax, 0x6b0(%rsp)
leaq 0x6b8(%rsp), %rdi
leaq 0x6b0(%rsp), %rsi
callq 0x176c00
testb $0x1, %al
jne 0x175291
jmp 0x17544e
leaq 0x6b8(%rsp), %rdi
callq 0x176c40
movq %rax, 0x6a8(%rsp)
leaq 0x149d3(%rip), %rsi     # 0x189c80
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x260(%rsp)
jmp 0x1752c4
movq 0x260(%rsp), %rdi
movq 0x6a8(%rsp), %rsi
callq 0x51e0
movq %rax, 0x258(%rsp)
jmp 0x1752e3
movq 0x258(%rsp), %rdi
leaq 0x14989(%rip), %rsi     # 0x189c7b
callq 0x5200
jmp 0x1752f9
movq 0x6a8(%rsp), %rsi
leaq 0x788(%rsp), %rdi
callq 0x176770
movq %rax, 0x250(%rsp)
jmp 0x175318
movq 0x250(%rsp), %rax
movq %rax, 0x6a0(%rsp)
movq 0x6a0(%rsp), %rdi
callq 0x176960
movq %rax, 0x698(%rsp)
movq 0x6a0(%rsp), %rdi
callq 0x176990
movq %rax, 0x690(%rsp)
leaq 0x698(%rsp), %rdi
leaq 0x690(%rsp), %rsi
callq 0x1769c0
testb $0x1, %al
jne 0x175370
jmp 0x175406
leaq 0x698(%rsp), %rdi
callq 0x1769e0
movq %rax, 0x688(%rsp)
leaq 0x148f7(%rip), %rsi     # 0x189c83
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x248(%rsp)
jmp 0x1753a3
movq 0x248(%rsp), %rdi
movq 0x688(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x5080
jmp 0x1753be
movq 0x688(%rsp), %rsi
addq $0x20, %rsi
leaq 0x6c8(%rsp), %rdi
callq 0x14570
movq %rax, 0x240(%rsp)
jmp 0x1753e1
movq 0x240(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x6c8(%rsp)
leaq 0x698(%rsp), %rdi
callq 0x176a00
jmp 0x175352
leaq 0x14870(%rip), %rsi     # 0x189c7d
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x238(%rsp)
jmp 0x175424
movq 0x238(%rsp), %rdi
movq 0x7ab8d(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x17543a
jmp 0x17543c
leaq 0x6b8(%rsp), %rdi
callq 0x176c50
jmp 0x175273
leaq 0x14831(%rip), %rsi     # 0x189c86
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x230(%rsp)
jmp 0x17546c
movq 0x230(%rsp), %rdi
movq 0x7ab45(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175482
leaq 0x14801(%rip), %rsi     # 0x189c8a
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x228(%rsp)
jmp 0x1754a0
movq 0x7c0(%rsp), %rdi
callq 0x176640
movq 0x228(%rsp), %rdi
movq %rax, %rsi
callq 0x51e0
movq %rax, 0x220(%rsp)
jmp 0x1754c7
movq 0x220(%rsp), %rdi
leaq 0x14803(%rip), %rsi     # 0x189cd9
callq 0x5200
movq %rax, 0x218(%rsp)
jmp 0x1754e5
movq 0x218(%rsp), %rdi
movq 0x7aacc(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x210(%rsp)
jmp 0x175503
movq 0x210(%rsp), %rdi
leaq 0x147cc(%rip), %rsi     # 0x189cde
callq 0x5200
movq %rax, 0x208(%rsp)
jmp 0x175521
movq 0x208(%rsp), %rdi
leaq 0x147d4(%rip), %rsi     # 0x189d04
callq 0x5200
movq %rax, 0x200(%rsp)
jmp 0x17553f
movq 0x7c0(%rsp), %rdi
callq 0x176640
movq 0x200(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x51e0
movq %rax, 0x1f8(%rsp)
jmp 0x17556a
movq 0x1f8(%rsp), %rdi
leaq 0x14788(%rip), %rsi     # 0x189d01
callq 0x5200
movq %rax, 0x1f0(%rsp)
jmp 0x175588
movq 0x1f0(%rsp), %rdi
leaq 0x14776(%rip), %rsi     # 0x189d0d
callq 0x5200
movq %rax, 0x1e8(%rsp)
jmp 0x1755a6
movq 0x1e8(%rsp), %rdi
leaq 0x14781(%rip), %rsi     # 0x189d36
callq 0x5200
movq %rax, 0x1e0(%rsp)
jmp 0x1755c4
movq 0x1e0(%rsp), %rdi
leaq 0x1477c(%rip), %rsi     # 0x189d4f
callq 0x5200
movq %rax, 0x1d8(%rsp)
jmp 0x1755e2
movq 0x1d8(%rsp), %rdi
leaq 0x14795(%rip), %rsi     # 0x189d86
callq 0x5200
movq %rax, 0x1d0(%rsp)
jmp 0x175600
movq 0x7c0(%rsp), %rdi
callq 0x176640
movq 0x1d0(%rsp), %rdi
movq %rax, %rsi
addq $0x40, %rsi
callq 0x51e0
movq %rax, 0x1c8(%rsp)
jmp 0x17562b
movq 0x1c8(%rsp), %rdi
leaq 0x14771(%rip), %rsi     # 0x189dab
callq 0x5200
movq %rax, 0x1c0(%rsp)
jmp 0x175649
movq 0x1c0(%rsp), %rdi
movq 0x7a968(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x1b8(%rsp)
jmp 0x175667
movq 0x1b8(%rsp), %rdi
leaq 0x1473a(%rip), %rsi     # 0x189db0
callq 0x5200
movq %rax, 0x1b0(%rsp)
jmp 0x175685
movq 0x1b0(%rsp), %rdi
movq 0x7a92c(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x17569b
leaq 0x14729(%rip), %rsi     # 0x189dcb
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x1a8(%rsp)
jmp 0x1756b9
movq 0x7c0(%rsp), %rdi
callq 0x176640
movq 0x1a8(%rsp), %rdi
movq %rax, %rsi
callq 0x51e0
movq %rax, 0x1a0(%rsp)
jmp 0x1756e0
movq 0x1a0(%rsp), %rdi
leaq 0x14710(%rip), %rsi     # 0x189dff
callq 0x5200
movq %rax, 0x198(%rsp)
jmp 0x1756fe
movq 0x198(%rsp), %rdi
movq 0x7a8b3(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x190(%rsp)
jmp 0x17571c
movq 0x190(%rsp), %rdi
leaq 0x146d8(%rip), %rsi     # 0x189e03
callq 0x5200
movq %rax, 0x188(%rsp)
jmp 0x17573a
movq 0x188(%rsp), %rdi
movq 0x7a877(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x180(%rsp)
jmp 0x175758
movq 0x180(%rsp), %rdi
leaq 0x146b9(%rip), %rsi     # 0x189e20
callq 0x5200
movq %rax, 0x178(%rsp)
jmp 0x175776
movq 0x178(%rsp), %rdi
movq 0x7a83b(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x170(%rsp)
jmp 0x175794
movq 0x170(%rsp), %rdi
leaq 0x14699(%rip), %rsi     # 0x189e3c
callq 0x5200
movq %rax, 0x168(%rsp)
jmp 0x1757b2
movq 0x168(%rsp), %rdi
movq 0x7a7ff(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x160(%rsp)
jmp 0x1757d0
movq 0x160(%rsp), %rdi
leaq 0x1467f(%rip), %rsi     # 0x189e5e
callq 0x5200
movq %rax, 0x158(%rsp)
jmp 0x1757ee
movq 0x158(%rsp), %rdi
movq 0x7a7c3(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x150(%rsp)
jmp 0x17580c
movq 0x150(%rsp), %rdi
leaq 0x1464c(%rip), %rsi     # 0x189e67
callq 0x5200
movq %rax, 0x148(%rsp)
jmp 0x17582a
movq 0x148(%rsp), %rdi
movq 0x7a787(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x140(%rsp)
jmp 0x175848
movq 0x140(%rsp), %rdi
leaq 0x1462d(%rip), %rsi     # 0x189e84
callq 0x5200
movq %rax, 0x138(%rsp)
jmp 0x175866
movq 0x138(%rsp), %rdi
movq 0x7a74b(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x130(%rsp)
jmp 0x175884
movq 0x130(%rsp), %rdi
leaq 0x145f3(%rip), %rsi     # 0x189e86
callq 0x5200
movq %rax, 0x128(%rsp)
jmp 0x1758a2
movq 0x128(%rsp), %rdi
movq 0x7a70f(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x120(%rsp)
jmp 0x1758c0
movq 0x120(%rsp), %rdi
leaq 0x144e1(%rip), %rsi     # 0x189db0
callq 0x5200
movq %rax, 0x118(%rsp)
jmp 0x1758de
movq 0x118(%rsp), %rdi
movq 0x7a6d3(%rip), %rsi     # 0x1effc0
callq 0x5230
movq %rax, 0x110(%rsp)
jmp 0x1758fc
movq 0x110(%rsp), %rdi
leaq 0x144a2(%rip), %rsi     # 0x189dad
callq 0x5200
movq %rax, 0x108(%rsp)
jmp 0x17591a
movq 0x108(%rsp), %rdi
movq 0x7a697(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175930
leaq 0x1454d(%rip), %rsi     # 0x189e84
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x100(%rsp)
jmp 0x17594e
movq 0x100(%rsp), %rdi
movq 0x7a663(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175964
leaq 0x700(%rsp), %rdi
callq 0x176c70
leaq 0x740(%rsp), %rdi
callq 0x176cd0
leaq 0x788(%rsp), %rdi
callq 0x1767f0
leaq 0x7d0(%rsp), %rdi
callq 0x176ce0
jmp 0x174e30
leaq 0x740(%rsp), %rdi
callq 0x176cd0
leaq 0x788(%rsp), %rdi
callq 0x1767f0
jmp 0x175d83
leaq 0x144f3(%rip), %rsi     # 0x189eb6
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xf8(%rsp)
jmp 0x1759da
movq 0xf8(%rsp), %rdi
movq 0x7a5d7(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x1759f0
leaq 0x1092cd9(%rip), %rax   # 0x12086d0
movq %rax, 0x680(%rsp)
leaq 0x1092cca(%rip), %rdi   # 0x12086d0
callq 0x176800
movq %rax, 0x678(%rsp)
leaq 0x1092cb6(%rip), %rdi   # 0x12086d0
callq 0x176830
movq %rax, 0x670(%rsp)
leaq 0x678(%rsp), %rdi
leaq 0x670(%rsp), %rsi
callq 0x176860
testb $0x1, %al
jne 0x175a45
jmp 0x175ae7
leaq 0x678(%rsp), %rdi
callq 0x1768a0
movq %rax, 0x668(%rsp)
leaq 0x141da(%rip), %rsi     # 0x189c3b
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xf0(%rsp)
jmp 0x175a78
movq 0x668(%rsp), %rdi
callq 0x176640
movq 0xf0(%rsp), %rdi
movq %rax, %rsi
callq 0x51e0
movq %rax, 0xe8(%rsp)
jmp 0x175a9f
movq 0xe8(%rsp), %rdi
leaq 0x1441d(%rip), %rsi     # 0x189ecb
callq 0x5200
movq %rax, 0xe0(%rsp)
jmp 0x175abd
movq 0xe0(%rsp), %rdi
movq 0x7a4f4(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175ad3
jmp 0x175ad5
leaq 0x678(%rsp), %rdi
callq 0x176ce0
jmp 0x175a27
leaq 0x14396(%rip), %rsi     # 0x189e84
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xd8(%rsp)
jmp 0x175b05
movq 0xd8(%rsp), %rdi
movq 0x7a4ac(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175b1b
leaq 0x143ad(%rip), %rsi     # 0x189ecf
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xd0(%rsp)
jmp 0x175b39
movq 0xd0(%rsp), %rdi
movq 0x7a478(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175b4f
leaq 0x140a3(%rip), %rsi     # 0x189bf9
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xc8(%rsp)
jmp 0x175b6d
movq 0xc8(%rsp), %rdi
movq 0x7a444(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175b83
movq 0x7a436(%rip), %rsi     # 0x1effc0
leaq 0x7f0(%rsp), %rdi
callq 0x5230
jmp 0x175b99
leaq 0x1092b30(%rip), %rax   # 0x12086d0
movq %rax, 0x660(%rsp)
leaq 0x1092b21(%rip), %rdi   # 0x12086d0
callq 0x176800
movq %rax, 0x658(%rsp)
leaq 0x1092b0d(%rip), %rdi   # 0x12086d0
callq 0x176830
movq %rax, 0x650(%rsp)
leaq 0x658(%rsp), %rdi
leaq 0x650(%rsp), %rsi
callq 0x176860
testb $0x1, %al
jne 0x175bee
jmp 0x175d09
leaq 0x658(%rsp), %rdi
callq 0x1768a0
movq %rax, 0x648(%rsp)
leaq 0x142e9(%rip), %rsi     # 0x189ef3
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xc0(%rsp)
jmp 0x175c21
movq 0x648(%rsp), %rdi
callq 0x176640
movq 0xc0(%rsp), %rdi
movq %rax, %rsi
callq 0x51e0
movq %rax, 0xb8(%rsp)
jmp 0x175c48
movq 0xb8(%rsp), %rdi
leaq 0x142ac(%rip), %rsi     # 0x189f03
callq 0x5200
movq %rax, 0xb0(%rsp)
jmp 0x175c66
movq 0xb0(%rsp), %rdi
movq 0x7a34b(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175c7c
leaq 0x142ae(%rip), %rsi     # 0x189f31
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0xa8(%rsp)
jmp 0x175c9a
movq 0x648(%rsp), %rdi
callq 0x176640
movq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0x51e0
movq %rax, 0xa0(%rsp)
jmp 0x175cc1
movq 0xa0(%rsp), %rdi
leaq 0x1427a(%rip), %rsi     # 0x189f4a
callq 0x5200
movq %rax, 0x98(%rsp)
jmp 0x175cdf
movq 0x98(%rsp), %rdi
movq 0x7a2d2(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175cf5
jmp 0x175cf7
leaq 0x658(%rsp), %rdi
callq 0x176ce0
jmp 0x175bd0
leaq 0x14265(%rip), %rsi     # 0x189f75
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x90(%rsp)
jmp 0x175d27
movq 0x90(%rsp), %rdi
movq 0x7a28a(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175d3d
leaq 0x14239(%rip), %rsi     # 0x189f7d
leaq 0x7f0(%rsp), %rdi
callq 0x5200
movq %rax, 0x88(%rsp)
jmp 0x175d5b
movq 0x88(%rsp), %rdi
movq 0x7a256(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175d71
leaq 0x7f0(%rsp), %rdi
callq 0x52e0
jmp 0x176471
leaq 0x7f0(%rsp), %rdi
callq 0x52e0
jmp 0x176479
cmpl $0x1, 0x9f4(%rsp)
jne 0x17646f
leaq 0x448(%rsp), %rdi
leaq 0x13d83(%rip), %rsi     # 0x189b35
movl $0x10, %edx
callq 0x5250
leaq 0x109290d(%rip), %rax   # 0x12086d0
movq %rax, 0x440(%rsp)
leaq 0x10928fe(%rip), %rdi   # 0x12086d0
callq 0x176800
movq %rax, 0x438(%rsp)
leaq 0x10928ea(%rip), %rdi   # 0x12086d0
callq 0x176830
movq %rax, 0x430(%rsp)
leaq 0x438(%rsp), %rdi
leaq 0x430(%rsp), %rsi
callq 0x176860
testb $0x1, %al
jne 0x175e11
jmp 0x176451
leaq 0x438(%rsp), %rdi
callq 0x1768a0
movq %rax, 0x428(%rsp)
leaq 0x14158(%rip), %rsi     # 0x189f85
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, 0x80(%rsp)
jmp 0x175e44
movq 0x428(%rsp), %rdi
callq 0x176640
movq 0x80(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x51e0
movq %rax, 0x78(%rsp)
jmp 0x175e6c
movq 0x78(%rsp), %rdi
leaq 0x14152(%rip), %rsi     # 0x189fca
callq 0x5200
movq %rax, 0x70(%rsp)
jmp 0x175e84
movq 0x428(%rsp), %rdi
callq 0x176640
movq 0x70(%rsp), %rdi
movq %rax, %rsi
addq $0x40, %rsi
callq 0x51e0
movq %rax, 0x68(%rsp)
jmp 0x175ea9
movq 0x68(%rsp), %rdi
leaq 0x1413e(%rip), %rsi     # 0x189ff3
callq 0x5200
movq %rax, 0x60(%rsp)
jmp 0x175ec1
movq 0x60(%rsp), %rdi
movq 0x7a0f3(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x175ed4
movq 0x428(%rsp), %rsi
leaq 0x3e0(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x1768b0
movq 0x58(%rsp), %rsi
leaq 0x3f0(%rsp), %rdi
callq 0x174ae0
jmp 0x175f02
leaq 0x3e0(%rsp), %rdi
callq 0x176490
leaq 0x13d5e(%rip), %rsi     # 0x189c74
leaq 0x448(%rsp), %rdi
callq 0x5200
jmp 0x175f25
leaq 0x3f0(%rsp), %rdi
callq 0x1768e0
movq %rax, 0x3a0(%rsp)
leaq 0x3a0(%rsp), %rdi
callq 0x176910
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x3a8(%rsp), %rdi
callq 0x176930
jmp 0x175f5d
leaq 0x3a8(%rsp), %rax
movq %rax, 0x398(%rsp)
movq 0x398(%rsp), %rdi
callq 0x176960
movq %rax, 0x390(%rsp)
movq 0x398(%rsp), %rdi
callq 0x176990
movq %rax, 0x388(%rsp)
leaq 0x390(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0x1769c0
testb $0x1, %al
jne 0x175fb5
jmp 0x176096
leaq 0x390(%rsp), %rdi
callq 0x1769e0
movq %rax, 0x380(%rsp)
leaq 0x13ca8(%rip), %rsi     # 0x189c79
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, 0x50(%rsp)
jmp 0x175fe5
movq 0x50(%rsp), %rdi
movq 0x380(%rsp), %rsi
callq 0x51e0
movq %rax, 0x48(%rsp)
jmp 0x175ffe
movq 0x48(%rsp), %rdi
leaq 0x13c71(%rip), %rsi     # 0x189c7b
callq 0x5200
jmp 0x176011
jmp 0x176013
leaq 0x390(%rsp), %rdi
callq 0x176a00
jmp 0x175f97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
jmp 0x176460
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
leaq 0x3e0(%rsp), %rdi
callq 0x176490
jmp 0x176460
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
jmp 0x176442
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
jmp 0x176435
leaq 0x13be0(%rip), %rsi     # 0x189c7d
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, 0x40(%rsp)
jmp 0x1760b1
movq 0x40(%rsp), %rdi
movq 0x79f03(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x1760c4
leaq 0x368(%rsp), %rdi
callq 0x176a30
leaq 0x3f0(%rsp), %rax
movq %rax, 0x360(%rsp)
movq 0x360(%rsp), %rdi
callq 0x1768e0
movq %rax, 0x358(%rsp)
movq 0x360(%rsp), %rdi
callq 0x176a40
movq %rax, 0x350(%rsp)
leaq 0x358(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x176a70
testb $0x1, %al
jne 0x176126
jmp 0x176189
leaq 0x358(%rsp), %rdi
callq 0x176a90
movq %rax, 0x348(%rsp)
movq 0x348(%rsp), %rsi
leaq 0x368(%rsp), %rdi
callq 0x176ab0
jmp 0x176152
jmp 0x176154
leaq 0x358(%rsp), %rdi
callq 0x176b20
jmp 0x17610b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x7e8(%rsp)
movl %eax, 0x7e4(%rsp)
leaq 0x368(%rsp), %rdi
callq 0x176c70
jmp 0x176435
leaq 0x368(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x176ba0
movq 0x38(%rsp), %rdi
movq %rax, 0x340(%rsp)
callq 0x176bd0
movq %rax, 0x338(%rsp)
movq 0x340(%rsp), %rdi
movq 0x338(%rsp), %rsi
leaq -0x15cc(%rip), %rdx     # 0x174c00
callq 0x176b50
jmp 0x1761d3
movq $0x0, 0x330(%rsp)
leaq 0x368(%rsp), %rax
movq %rax, 0x328(%rsp)
movq 0x328(%rsp), %rdi
callq 0x176ba0
movq %rax, 0x320(%rsp)
movq 0x328(%rsp), %rdi
callq 0x176bd0
movq %rax, 0x318(%rsp)
leaq 0x320(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x176c00
testb $0x1, %al
jne 0x176237
jmp 0x1763d0
leaq 0x320(%rsp), %rdi
callq 0x176c40
movq %rax, 0x310(%rsp)
leaq 0x13a2d(%rip), %rsi     # 0x189c80
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, 0x30(%rsp)
jmp 0x176267
movq 0x30(%rsp), %rdi
movq 0x310(%rsp), %rsi
callq 0x51e0
movq %rax, 0x28(%rsp)
jmp 0x176280
movq 0x28(%rsp), %rdi
leaq 0x139ef(%rip), %rsi     # 0x189c7b
callq 0x5200
jmp 0x176293
movq 0x310(%rsp), %rsi
leaq 0x3f0(%rsp), %rdi
callq 0x176770
movq %rax, 0x20(%rsp)
jmp 0x1762af
movq 0x20(%rsp), %rax
movq %rax, 0x308(%rsp)
movq 0x308(%rsp), %rdi
callq 0x176960
movq %rax, 0x300(%rsp)
movq 0x308(%rsp), %rdi
callq 0x176990
movq %rax, 0x2f8(%rsp)
leaq 0x300(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0x1769c0
testb $0x1, %al
jne 0x176304
jmp 0x17638e
leaq 0x300(%rsp), %rdi
callq 0x1769e0
movq %rax, 0x2f0(%rsp)
leaq 0x13963(%rip), %rsi     # 0x189c83
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, 0x18(%rsp)
jmp 0x176334
movq 0x18(%rsp), %rdi
movq 0x2f0(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x5080
jmp 0x17634c
movq 0x2f0(%rsp), %rsi
addq $0x20, %rsi
leaq 0x330(%rsp), %rdi
callq 0x14570
movq %rax, 0x10(%rsp)
jmp 0x17636c
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x330(%rsp)
leaq 0x300(%rsp), %rdi
callq 0x176a00
jmp 0x1762e6
leaq 0x138e8(%rip), %rsi     # 0x189c7d
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, 0x8(%rsp)
jmp 0x1763a9
movq 0x8(%rsp), %rdi
movq 0x79c0b(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x1763bc
jmp 0x1763be
leaq 0x320(%rsp), %rdi
callq 0x176c50
jmp 0x176219
leaq 0x13c1f(%rip), %rsi     # 0x189ff6
leaq 0x448(%rsp), %rdi
callq 0x5200
movq %rax, (%rsp)
jmp 0x1763ea
movq (%rsp), %rdi
movq 0x79bcb(%rip), %rsi     # 0x1effc0
callq 0x5230
jmp 0x1763fc
leaq 0x368(%rsp), %rdi
callq 0x176c70
leaq 0x3a8(%rsp), %rdi
callq 0x176cd0
leaq 0x3f0(%rsp), %rdi
callq 0x1767f0
leaq 0x438(%rsp), %rdi
callq 0x176ce0
jmp 0x175df3
leaq 0x3a8(%rsp), %rdi
callq 0x176cd0
leaq 0x3f0(%rsp), %rdi
callq 0x1767f0
jmp 0x176460
leaq 0x448(%rsp), %rdi
callq 0x52e0
jmp 0x17646f
leaq 0x448(%rsp), %rdi
callq 0x52e0
jmp 0x176479
jmp 0x176471
addq $0x9f8, %rsp            # imm = 0x9F8
retq
movq 0x7e8(%rsp), %rdi
callq 0x5360
nopw %cs:(%rax,%rax)