// File: dtsaras[P]GCW/rwgraph.cpp
// Function: Graph::example(Locations*, Locations*, int)
void Graph::example(Locations* usersLocations, Locations* eventsLocations, int P)
{
    ofstream events;
    ofstream all_but_seeds;
    ofstream not_influenced;
    ofstream influenced;
    ofstream graph;
    ofstream * first = new ofstream[P];
    ofstream * second = new ofstream[P];
    vector<int> all_seeds;


    influenced.open("influenced.txt");
    graph.open("graph.txt");

    events.open("example_events.csv");
    events << "id,latitude,longitude" << endl;
    all_but_seeds.open("example_all_but_seeds.csv");
    all_but_seeds << "id,latitude,longitude" << endl;
    not_influenced.open("example_not_influenced.csv");
    not_influenced << "id,latitude,longitude" << endl;



    vector<vector<int>> influenced_ev(P);

    int eds = 0;
    graph << numNodes << " " << numEdges << endl;
    for (int i = 1; i <= numNodes; ++i){
        eds += node_deg[i];
        for (int j = 1; j < node_deg[i]; ++j){
            cout << i << " " << adjList[i][j] << " " << probabilities[i][j] << endl;
            graph << i << " " << adjList[i][j] << " " << probabilities[i][j] << endl;
        }     
    }
    cout << "Number of edges: " << eds << endl;

    for (int p = 0; p < P; ++p){
        first[p].open("example_seeds_event" + to_string(p + 1) + ".csv");
        first[p] << "id,latitude,longitude" << endl;
        second[p].open("example_inf_event" + to_string(p + 1) + ".csv");
        second[p] << "id,latitude,longitude" << endl;
        events << p + 1 << "," << setprecision(12) << eventsLocations->locations[p][0] << "," << setprecision(12) << eventsLocations->locations[p][1] << endl;
        for (int seed: seedSets[p]){
            first[p] << seed << "," << setprecision(12) << usersLocations->locations[seed][0] << "," << setprecision(12) << usersLocations->locations[seed][1] << endl;
            all_seeds.push_back(seed);
        }
    }

    float** aware_all_ev = new float*[P];
    for (int p = 0; p < P; ++p){
        aware_all_ev[p] = new float[getSize() + 1];
        for(int v = 0; v <= getSize(); v++){
            aware_all_ev[p][v] = 0;
        }
    }
                    
    for (int p = 0; p < P; p++){
        if (model == 0)
            BFS_LT(p, aware_all_ev);
        else
            BFS_IC(p, aware_all_ev);
    }


    double max_weight;
    int max_event;
    vector<int>::iterator it;
    for (int v = 1; v <= getSize(); ++v){
        it = find(all_seeds.begin(), all_seeds.end(), v);
        if (all_seeds.end() == it){
            all_but_seeds << v << "," << setprecision(12) << usersLocations->locations[v][0] << "," << setprecision(12) << usersLocations->locations[v][1] << endl;
        }
        max_weight = 0;
        max_event = -1;
        for (int p = 0; p < P; ++p){
            if (aware_all_ev[p][v] == 1 && similarities[v][p] > max_weight){
                max_weight = similarities[v][p];
                max_event = p;
            }
        }
        if (max_event == -1){
            not_influenced << v << "," << setprecision(12) << usersLocations->locations[v][0] << "," << setprecision(12) << usersLocations->locations[v][1] << endl;
        }
        else{
            influenced_ev[max_event].push_back(v);
            second[max_event] << v << "," << setprecision(12) << usersLocations->locations[v][0] << "," << setprecision(12) << usersLocations->locations[v][1] << endl;
        }
    }

    for (int p = 0; p < P; ++p){
        for (int i = 0; i < influenced_ev[p].size(); ++i)
            influenced << influenced_ev[p][i] << " ";
        influenced << endl;
    }

    for (int p = 0; p < P; ++p){
        delete [] aware_all_ev[p];
    }
    delete [] aware_all_ev;
    delete [] first;
    delete [] second;
}

// Assembly:
subq $0xf38, %rsp            # imm = 0xF38
movq %rdi, 0xf30(%rsp)
movq %rsi, 0xf28(%rsp)
movq %rdx, 0xf20(%rsp)
movl %ecx, 0xf1c(%rsp)
movq 0xf30(%rsp), %rax
movq %rax, 0x338(%rsp)
leaq 0xd18(%rsp), %rdi
callq 0x4650
leaq 0xb18(%rsp), %rdi
callq 0x4650
jmp 0x229a2
leaq 0x908(%rsp), %rdi
callq 0x4650
jmp 0x229b1
leaq 0x708(%rsp), %rdi
callq 0x4650
jmp 0x229c0
leaq 0x508(%rsp), %rdi
callq 0x4650
jmp 0x229cf
movslq 0xf1c(%rsp), %rax
movq %rax, 0x328(%rsp)
movl $0x200, %ecx            # imm = 0x200
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
movq $-0x1, %rax
cmovbq %rax, %rdi
testb %cl, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, 0x330(%rsp)
jmp 0x22a11
movq 0x328(%rsp), %rax
movq 0x330(%rsp), %rcx
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, 0x320(%rsp)
cmpq $0x0, %rax
je 0x22a9a
movq 0x320(%rsp), %rax
movq 0x328(%rsp), %rdx
shlq $0x9, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x310(%rsp)
movq %rax, 0x318(%rsp)
movq 0x318(%rsp), %rdi
movq %rdi, 0x308(%rsp)
callq 0x4650
jmp 0x22a77
movq 0x310(%rsp), %rcx
movq 0x308(%rsp), %rax
addq $0x200, %rax            # imm = 0x200
cmpq %rcx, %rax
movq %rax, 0x318(%rsp)
jne 0x22a60
movq 0x320(%rsp), %rax
movq %rax, 0x500(%rsp)
movslq 0xf1c(%rsp), %rax
movq %rax, 0x2f8(%rsp)
movl $0x200, %ecx            # imm = 0x200
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
movq $-0x1, %rax
cmovbq %rax, %rdi
testb %cl, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, 0x300(%rsp)
jmp 0x22aec
movq 0x2f8(%rsp), %rax
movq 0x300(%rsp), %rcx
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, 0x2f0(%rsp)
cmpq $0x0, %rax
je 0x22b75
movq 0x2f0(%rsp), %rax
movq 0x2f8(%rsp), %rdx
shlq $0x9, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x2e0(%rsp)
movq %rax, 0x2e8(%rsp)
movq 0x2e8(%rsp), %rdi
movq %rdi, 0x2d8(%rsp)
callq 0x4650
jmp 0x22b52
movq 0x2e0(%rsp), %rcx
movq 0x2d8(%rsp), %rax
addq $0x200, %rax            # imm = 0x200
cmpq %rcx, %rax
movq %rax, 0x2e8(%rsp)
jne 0x22b3b
movq 0x2f0(%rsp), %rax
movq %rax, 0x4f8(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0xe2d0
leaq 0xfacd(%rip), %rsi      # 0x32666
leaq 0x708(%rsp), %rdi
movl $0x10, %edx
callq 0x4080
jmp 0x22bad
leaq 0xfac1(%rip), %rsi      # 0x32675
leaq 0x508(%rsp), %rdi
movl $0x10, %edx
callq 0x4080
jmp 0x22bc8
leaq 0xfab0(%rip), %rsi      # 0x3267f
leaq 0xd18(%rsp), %rdi
movl $0x10, %edx
callq 0x4080
jmp 0x22be3
leaq 0xfaa8(%rip), %rsi      # 0x32692
leaq 0xd18(%rsp), %rdi
callq 0x43f0
movq %rax, 0x2d0(%rsp)
jmp 0x22c01
movq 0x2d0(%rsp), %rdi
movq 0x1e3a0(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x22c17
leaq 0xfa8a(%rip), %rsi      # 0x326a8
leaq 0xb18(%rsp), %rdi
movl $0x10, %edx
callq 0x4080
jmp 0x22c32
leaq 0xfa59(%rip), %rsi      # 0x32692
leaq 0xb18(%rsp), %rdi
callq 0x43f0
movq %rax, 0x2c8(%rsp)
jmp 0x22c50
movq 0x2c8(%rsp), %rdi
movq 0x1e351(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x22c66
leaq 0xfa55(%rip), %rsi      # 0x326c2
leaq 0x908(%rsp), %rdi
movl $0x10, %edx
callq 0x4080
jmp 0x22c81
leaq 0xfa0a(%rip), %rsi      # 0x32692
leaq 0x908(%rsp), %rdi
callq 0x43f0
movq %rax, 0x2c0(%rsp)
jmp 0x22c9f
movq 0x2c0(%rsp), %rdi
movq 0x1e302(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x22cb5
movslq 0xf1c(%rsp), %rax
movq %rax, 0x2b0(%rsp)
leaq 0x4c7(%rsp), %rdi
movq %rdi, 0x2b8(%rsp)
callq 0x24b90
movq 0x2b0(%rsp), %rsi
movq 0x2b8(%rsp), %rdx
leaq 0x4c8(%rsp), %rdi
callq 0x24ba0
jmp 0x22cf9
leaq 0x4c7(%rsp), %rdi
callq 0x10420
movq 0x338(%rsp), %rax
movl $0x0, 0x4c0(%rsp)
movl 0x9c8(%rax), %esi
leaq 0x508(%rsp), %rdi
callq 0x44d0
movq %rax, 0x2a8(%rsp)
jmp 0x22d36
movq 0x2a8(%rsp), %rdi
leaq 0xf8a7(%rip), %rsi      # 0x325ec
callq 0x43f0
movq %rax, 0x2a0(%rsp)
jmp 0x22d54
movq 0x2a0(%rsp), %rdi
movq 0x338(%rsp), %rax
movl 0x9cc(%rax), %esi
callq 0x44d0
movq %rax, 0x298(%rsp)
jmp 0x22d79
movq 0x298(%rsp), %rdi
movq 0x1e228(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x22d8f
movl $0x1, 0x4bc(%rsp)
movq 0x338(%rsp), %rcx
movl 0x4bc(%rsp), %eax
cmpl 0x9c8(%rcx), %eax
ja 0x23218
movq 0x338(%rsp), %rdi
addq $0xa20, %rdi            # imm = 0xA20
movslq 0x4bc(%rsp), %rsi
callq 0xe3b0
movl (%rax), %eax
addl 0x4c0(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movl $0x1, 0x4b8(%rsp)
movq 0x338(%rsp), %rdi
movl 0x4b8(%rsp), %eax
movl %eax, 0x294(%rsp)
addq $0xa20, %rdi            # imm = 0xA20
movslq 0x4bc(%rsp), %rsi
callq 0xe3b0
movq %rax, %rcx
movl 0x294(%rsp), %eax
cmpl (%rcx), %eax
jge 0x23200
movl 0x4bc(%rsp), %esi
movq 0x1e18a(%rip), %rdi     # 0x40fc0
callq 0x4670
movq %rax, 0x288(%rsp)
jmp 0x22e45
movq 0x288(%rsp), %rdi
leaq 0xf798(%rip), %rsi      # 0x325ec
callq 0x43f0
movq %rax, 0x280(%rsp)
jmp 0x22e63
movq 0x338(%rsp), %rdi
addq $0x9d8, %rdi            # imm = 0x9D8
movslq 0x4bc(%rsp), %rsi
callq 0x24850
movq %rax, %rdi
movslq 0x4b8(%rsp), %rsi
callq 0xe3b0
movq 0x280(%rsp), %rdi
movl (%rax), %esi
callq 0x4670
movq %rax, 0x278(%rsp)
jmp 0x22ea8
movq 0x278(%rsp), %rdi
leaq 0xf735(%rip), %rsi      # 0x325ec
callq 0x43f0
movq %rax, 0x270(%rsp)
jmp 0x22ec6
movq 0x338(%rsp), %rdi
addq $0x9f0, %rdi            # imm = 0x9F0
movslq 0x4bc(%rsp), %rsi
callq 0x24890
movq %rax, %rdi
movslq 0x4b8(%rsp), %rsi
callq 0xf1a0
movq 0x270(%rsp), %rdi
movss (%rax), %xmm0
callq 0x42f0
movq %rax, 0x268(%rsp)
jmp 0x22f0d
movq 0x268(%rsp), %rdi
movq 0x1e094(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x22f23
movl 0x4bc(%rsp), %esi
leaq 0x508(%rsp), %rdi
callq 0x4670
movq %rax, 0x260(%rsp)
jmp 0x22f41
movq 0x260(%rsp), %rdi
leaq 0xf69c(%rip), %rsi      # 0x325ec
callq 0x43f0
movq %rax, 0x258(%rsp)
jmp 0x22f5f
movq 0x338(%rsp), %rdi
addq $0x9d8, %rdi            # imm = 0x9D8
movslq 0x4bc(%rsp), %rsi
callq 0x24850
movq %rax, %rdi
movslq 0x4b8(%rsp), %rsi
callq 0xe3b0
movq 0x258(%rsp), %rdi
movl (%rax), %esi
callq 0x4670
movq %rax, 0x250(%rsp)
jmp 0x22fa4
movq 0x250(%rsp), %rdi
leaq 0xf639(%rip), %rsi      # 0x325ec
callq 0x43f0
movq %rax, 0x248(%rsp)
jmp 0x22fc2
movq 0x338(%rsp), %rdi
addq $0x9f0, %rdi            # imm = 0x9F0
movslq 0x4bc(%rsp), %rsi
callq 0x24890
movq %rax, %rdi
movslq 0x4b8(%rsp), %rsi
callq 0xf1a0
movq 0x248(%rsp), %rdi
movss (%rax), %xmm0
callq 0x42f0
movq %rax, 0x240(%rsp)
jmp 0x23009
movq 0x240(%rsp), %rdi
movq 0x1df98(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x2301f
jmp 0x23021
movl 0x4b8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4b8(%rsp)
jmp 0x22dec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x243af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x243a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x24395
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x24388
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x2437b
movq 0x320(%rsp), %rcx
movq %rax, %rsi
movq 0x308(%rsp), %rax
movq %rsi, 0xb10(%rsp)
movl %edx, 0xb0c(%rsp)
cmpq %rax, %rcx
movq %rax, 0x238(%rsp)
je 0x2311c
movq 0x238(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, 0x230(%rsp)
callq 0x4560
movq 0x320(%rsp), %rcx
movq 0x230(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x238(%rsp)
jne 0x230e3
movq 0x330(%rsp), %rdi
callq 0x44c0
jmp 0x2437b
movq 0x2f0(%rsp), %rcx
movq %rax, %rsi
movq 0x2d8(%rsp), %rax
movq %rsi, 0xb10(%rsp)
movl %edx, 0xb0c(%rsp)
cmpq %rax, %rcx
movq %rax, 0x228(%rsp)
je 0x23196
movq 0x228(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, 0x220(%rsp)
callq 0x4560
movq 0x2f0(%rsp), %rcx
movq 0x220(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x228(%rsp)
jne 0x2315d
movq 0x300(%rsp), %rdi
callq 0x44c0
jmp 0x2437b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x2436e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
leaq 0x4c7(%rsp), %rdi
callq 0x10420
jmp 0x2436e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x24361
jmp 0x23202
movl 0x4bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4bc(%rsp)
jmp 0x22d9a
movq 0x1dda1(%rip), %rdi     # 0x40fc0
leaq 0xf4b7(%rip), %rsi      # 0x326dd
callq 0x43f0
movq %rax, 0x218(%rsp)
jmp 0x23235
movq 0x218(%rsp), %rdi
movl 0x4c0(%rsp), %esi
callq 0x4670
movq %rax, 0x210(%rsp)
jmp 0x23253
movq 0x210(%rsp), %rdi
movq 0x1dd4e(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x23269
movl $0x0, 0x4b4(%rsp)
movl 0x4b4(%rsp), %eax
cmpl 0xf1c(%rsp), %eax
jge 0x238c6
movq 0x500(%rsp), %rax
movslq 0x4b4(%rsp), %rcx
movl %ecx, %esi
shlq $0x9, %rcx
addq %rcx, %rax
movq %rax, 0x208(%rsp)
incl %esi
leaq 0x450(%rsp), %rdi
callq 0xf820
jmp 0x232ba
leaq 0xf42e(%rip), %rsi      # 0x326ef
leaq 0x470(%rsp), %rdi
leaq 0x450(%rsp), %rdx
callq 0xf4c0
jmp 0x232d8
leaq 0xf3f9(%rip), %rdx      # 0x326d8
leaq 0x490(%rsp), %rdi
leaq 0x470(%rsp), %rsi
callq 0x25160
jmp 0x232f6
movq 0x208(%rsp), %rdi
leaq 0x490(%rsp), %rsi
movl $0x10, %edx
callq 0x41d0
jmp 0x23312
leaq 0x490(%rsp), %rdi
callq 0x4260
leaq 0x470(%rsp), %rdi
callq 0x4260
leaq 0x450(%rsp), %rdi
callq 0x4260
movq 0x500(%rsp), %rdi
movslq 0x4b4(%rsp), %rax
shlq $0x9, %rax
addq %rax, %rdi
leaq 0xf33b(%rip), %rsi      # 0x32692
callq 0x43f0
movq %rax, 0x200(%rsp)
jmp 0x23366
movq 0x200(%rsp), %rdi
movq 0x1dc3b(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x2337c
movq 0x4f8(%rsp), %rax
movslq 0x4b4(%rsp), %rcx
movl %ecx, %esi
shlq $0x9, %rcx
addq %rcx, %rax
movq %rax, 0x1f8(%rsp)
incl %esi
leaq 0x3f0(%rsp), %rdi
callq 0xf820
jmp 0x233ae
leaq 0xf34e(%rip), %rsi      # 0x32703
leaq 0x410(%rsp), %rdi
leaq 0x3f0(%rsp), %rdx
callq 0xf4c0
jmp 0x233cc
leaq 0xf305(%rip), %rdx      # 0x326d8
leaq 0x430(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x25160
jmp 0x233ea
movq 0x1f8(%rsp), %rdi
leaq 0x430(%rsp), %rsi
movl $0x10, %edx
callq 0x41d0
jmp 0x23406
leaq 0x430(%rsp), %rdi
callq 0x4260
leaq 0x410(%rsp), %rdi
callq 0x4260
leaq 0x3f0(%rsp), %rdi
callq 0x4260
movq 0x4f8(%rsp), %rdi
movslq 0x4b4(%rsp), %rax
shlq $0x9, %rax
addq %rax, %rdi
leaq 0xf247(%rip), %rsi      # 0x32692
callq 0x43f0
movq %rax, 0x1f0(%rsp)
jmp 0x2345a
movq 0x1f0(%rsp), %rdi
movq 0x1db47(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x23470
movl 0x4b4(%rsp), %esi
incl %esi
leaq 0xd18(%rsp), %rdi
callq 0x4670
movq %rax, 0x1e8(%rsp)
jmp 0x23490
movq 0x1e8(%rsp), %rdi
leaq 0xf276(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x1e0(%rsp)
jmp 0x234ae
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x1dc(%rsp)
jmp 0x234c1
movq 0x1e0(%rsp), %rdi
movl 0x1dc(%rsp), %eax
movl %eax, 0x3ec(%rsp)
movl 0x3ec(%rsp), %esi
callq 0x45a0
movq %rax, 0x1d0(%rsp)
jmp 0x234ed
movq 0x1d0(%rsp), %rdi
movq 0xf20(%rsp), %rax
movq (%rax), %rax
movslq 0x4b4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
callq 0x4730
movq %rax, 0x1c8(%rsp)
jmp 0x2351f
movq 0x1c8(%rsp), %rdi
leaq 0xf1e7(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x1c0(%rsp)
jmp 0x2353d
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x1bc(%rsp)
jmp 0x23550
movq 0x1c0(%rsp), %rdi
movl 0x1bc(%rsp), %eax
movl %eax, 0x3e8(%rsp)
movl 0x3e8(%rsp), %esi
callq 0x45a0
movq %rax, 0x1b0(%rsp)
jmp 0x2357c
movq 0x1b0(%rsp), %rdi
movq 0xf20(%rsp), %rax
movq (%rax), %rax
movslq 0x4b4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
callq 0x4730
movq %rax, 0x1a8(%rsp)
jmp 0x235af
movq 0x1a8(%rsp), %rdi
movq 0x1d9f2(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x235c5
movq 0x338(%rsp), %rax
movq 0xad0(%rax), %rax
movslq 0x4b4(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x3e0(%rsp)
movq 0x3e0(%rsp), %rdi
callq 0xf1c0
movq %rax, 0x3d8(%rsp)
movq 0x3e0(%rsp), %rdi
callq 0xf1f0
movq %rax, 0x3d0(%rsp)
leaq 0x3d8(%rsp), %rdi
leaq 0x3d0(%rsp), %rsi
callq 0xf220
testb $0x1, %al
jne 0x23633
jmp 0x238ae
leaq 0x3d8(%rsp), %rdi
callq 0xf240
movl (%rax), %eax
movl %eax, 0x3cc(%rsp)
movq 0x500(%rsp), %rdi
movslq 0x4b4(%rsp), %rax
shlq $0x9, %rax
addq %rax, %rdi
movl 0x3cc(%rsp), %esi
callq 0x4670
movq %rax, 0x1a0(%rsp)
jmp 0x23676
movq 0x1a0(%rsp), %rdi
leaq 0xf090(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x198(%rsp)
jmp 0x23694
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x194(%rsp)
jmp 0x236a7
movq 0x198(%rsp), %rdi
movl 0x194(%rsp), %eax
movl %eax, 0x3c8(%rsp)
movl 0x3c8(%rsp), %esi
callq 0x45a0
movq %rax, 0x188(%rsp)
jmp 0x236d3
movq 0x188(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x3cc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
callq 0x4730
movq %rax, 0x180(%rsp)
jmp 0x23705
movq 0x180(%rsp), %rdi
leaq 0xf001(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x178(%rsp)
jmp 0x23723
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x174(%rsp)
jmp 0x23736
movq 0x178(%rsp), %rdi
movl 0x174(%rsp), %eax
movl %eax, 0x3c4(%rsp)
movl 0x3c4(%rsp), %esi
callq 0x45a0
movq %rax, 0x168(%rsp)
jmp 0x23762
movq 0x168(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x3cc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
callq 0x4730
movq %rax, 0x160(%rsp)
jmp 0x23795
movq 0x160(%rsp), %rdi
movq 0x1d80c(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x237ab
leaq 0x4e0(%rsp), %rdi
leaq 0x3cc(%rsp), %rsi
callq 0x1b1e0
jmp 0x237c2
jmp 0x237c4
leaq 0x3d8(%rsp), %rdi
callq 0xf2d0
jmp 0x23615
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x23830
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x23823
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
leaq 0x490(%rsp), %rdi
callq 0x4260
leaq 0x470(%rsp), %rdi
callq 0x4260
leaq 0x450(%rsp), %rdi
callq 0x4260
jmp 0x24361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x2389c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
jmp 0x2388f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb10(%rsp)
movl %eax, 0xb0c(%rsp)
leaq 0x430(%rsp), %rdi
callq 0x4260
leaq 0x410(%rsp), %rdi
callq 0x4260
leaq 0x3f0(%rsp), %rdi
callq 0x4260
jmp 0x24361
jmp 0x238b0
movl 0x4b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4b4(%rsp)
jmp 0x23274
movslq 0xf1c(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x4030
movq %rax, 0x158(%rsp)
jmp 0x238f3
movq 0x158(%rsp), %rax
movq %rax, 0x3b8(%rsp)
movl $0x0, 0x3b4(%rsp)
movl 0x3b4(%rsp), %eax
cmpl 0xf1c(%rsp), %eax
jge 0x239f6
movq 0x338(%rsp), %rdi
callq 0x1db70
incl %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x4030
movq %rax, 0x150(%rsp)
jmp 0x23958
movq 0x150(%rsp), %rdx
movq 0x3b8(%rsp), %rax
movslq 0x3b4(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, 0x3b0(%rsp)
movq 0x338(%rsp), %rdi
movl 0x3b0(%rsp), %eax
movl %eax, 0x14c(%rsp)
callq 0x1db70
movl %eax, %ecx
movl 0x14c(%rsp), %eax
cmpl %ecx, %eax
jg 0x239de
movq 0x3b8(%rsp), %rax
movslq 0x3b4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x3b0(%rsp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl 0x3b0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3b0(%rsp)
jmp 0x2397f
jmp 0x239e0
movl 0x3b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3b4(%rsp)
jmp 0x2390e
movl $0x0, 0x3ac(%rsp)
movl 0x3ac(%rsp), %eax
cmpl 0xf1c(%rsp), %eax
jge 0x23a77
movq 0x338(%rsp), %rax
cmpl $0x0, 0xa60(%rax)
jne 0x23a42
movq 0x338(%rsp), %rdi
movl 0x3ac(%rsp), %esi
movq 0x3b8(%rsp), %rdx
callq 0x21a80
jmp 0x23a40
jmp 0x23a62
movq 0x338(%rsp), %rdi
movl 0x3ac(%rsp), %esi
movq 0x3b8(%rsp), %rdx
callq 0x21610
jmp 0x23a60
jmp 0x23a62
jmp 0x23a64
movl 0x3ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3ac(%rsp)
jmp 0x23a01
leaq 0x390(%rsp), %rdi
callq 0x251b0
movl $0x1, 0x38c(%rsp)
movq 0x338(%rsp), %rdi
movl 0x38c(%rsp), %eax
movl %eax, 0x148(%rsp)
callq 0x1db70
movl %eax, %ecx
movl 0x148(%rsp), %eax
cmpl %ecx, %eax
jg 0x240b5
leaq 0x4e0(%rsp), %rdi
movq %rdi, 0x138(%rsp)
callq 0x13b30
movq 0x138(%rsp), %rdi
movq %rax, 0x378(%rsp)
callq 0x13940
movq %rax, 0x370(%rsp)
movq 0x378(%rsp), %rdi
movq 0x370(%rsp), %rsi
leaq 0x38c(%rsp), %rdx
callq 0x251d0
movq %rax, 0x140(%rsp)
jmp 0x23b14
movq 0x140(%rsp), %rax
movq %rax, 0x380(%rsp)
movq 0x380(%rsp), %rax
movq %rax, 0x390(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x13940
movq %rax, 0x368(%rsp)
leaq 0x368(%rsp), %rdi
leaq 0x390(%rsp), %rsi
callq 0x25230
testb $0x1, %al
jne 0x23b67
jmp 0x23cbc
movl 0x38c(%rsp), %esi
leaq 0xb18(%rsp), %rdi
callq 0x4670
movq %rax, 0x130(%rsp)
jmp 0x23b85
movq 0x130(%rsp), %rdi
leaq 0xeb81(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x128(%rsp)
jmp 0x23ba3
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x124(%rsp)
jmp 0x23bb6
movq 0x128(%rsp), %rdi
movl 0x124(%rsp), %eax
movl %eax, 0x364(%rsp)
movl 0x364(%rsp), %esi
callq 0x45a0
movq %rax, 0x118(%rsp)
jmp 0x23be2
movq 0x118(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x38c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
callq 0x4730
movq %rax, 0x110(%rsp)
jmp 0x23c14
movq 0x110(%rsp), %rdi
leaq 0xeaf2(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x108(%rsp)
jmp 0x23c32
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x104(%rsp)
jmp 0x23c45
movq 0x108(%rsp), %rdi
movl 0x104(%rsp), %eax
movl %eax, 0x360(%rsp)
movl 0x360(%rsp), %esi
callq 0x45a0
movq %rax, 0xf8(%rsp)
jmp 0x23c71
movq 0xf8(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x38c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
callq 0x4730
movq %rax, 0xf0(%rsp)
jmp 0x23ca4
movq 0xf0(%rsp), %rdi
movq 0x1d2fd(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x23cba
jmp 0x23cbc
xorps %xmm0, %xmm0
movsd %xmm0, 0x3a0(%rsp)
movl $0xffffffff, 0x39c(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x35c(%rsp)
movl 0x35c(%rsp), %eax
cmpl 0xf1c(%rsp), %eax
jge 0x23dc4
movq 0x3b8(%rsp), %rax
movslq 0x35c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x38c(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss 0xe331(%rip), %xmm1     # 0x3204c
ucomiss %xmm1, %xmm0
jne 0x23dac
jp 0x23dac
movq 0x338(%rsp), %rdi
addq $0xae0, %rdi            # imm = 0xAE0
movslq 0x38c(%rsp), %rsi
callq 0xf180
movq %rax, %rdi
movslq 0x35c(%rsp), %rsi
callq 0xeb00
movsd (%rax), %xmm0
ucomisd 0x3a0(%rsp), %xmm0
jbe 0x23dac
movq 0x338(%rsp), %rdi
addq $0xae0, %rdi            # imm = 0xAE0
movslq 0x38c(%rsp), %rsi
callq 0xf180
movq %rax, %rdi
movslq 0x35c(%rsp), %rsi
callq 0xeb00
movsd (%rax), %xmm0
movsd %xmm0, 0x3a0(%rsp)
movl 0x35c(%rsp), %eax
movl %eax, 0x39c(%rsp)
jmp 0x23dae
movl 0x35c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x35c(%rsp)
jmp 0x23cde
cmpl $-0x1, 0x39c(%rsp)
jne 0x23f2a
movl 0x38c(%rsp), %esi
leaq 0x908(%rsp), %rdi
callq 0x4670
movq %rax, 0xe8(%rsp)
jmp 0x23df0
movq 0xe8(%rsp), %rdi
leaq 0xe916(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0xe0(%rsp)
jmp 0x23e0e
movl $0xc, %edi
callq 0xfc00
movl %eax, 0xdc(%rsp)
jmp 0x23e21
movq 0xe0(%rsp), %rdi
movl 0xdc(%rsp), %eax
movl %eax, 0x358(%rsp)
movl 0x358(%rsp), %esi
callq 0x45a0
movq %rax, 0xd0(%rsp)
jmp 0x23e4d
movq 0xd0(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x38c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
callq 0x4730
movq %rax, 0xc8(%rsp)
jmp 0x23e7f
movq 0xc8(%rsp), %rdi
leaq 0xe887(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0xc0(%rsp)
jmp 0x23e9d
movl $0xc, %edi
callq 0xfc00
movl %eax, 0xbc(%rsp)
jmp 0x23eb0
movq 0xc0(%rsp), %rdi
movl 0xbc(%rsp), %eax
movl %eax, 0x354(%rsp)
movl 0x354(%rsp), %esi
callq 0x45a0
movq %rax, 0xb0(%rsp)
jmp 0x23edc
movq 0xb0(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x38c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
callq 0x4730
movq %rax, 0xa8(%rsp)
jmp 0x23f0f
movq 0xa8(%rsp), %rdi
movq 0x1d092(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x23f25
jmp 0x2409d
movslq 0x39c(%rsp), %rsi
leaq 0x4c8(%rsp), %rdi
callq 0x24850
movq %rax, %rdi
leaq 0x38c(%rsp), %rsi
callq 0x1b1e0
jmp 0x23f51
movq 0x4f8(%rsp), %rdi
movslq 0x39c(%rsp), %rax
shlq $0x9, %rax
addq %rax, %rdi
movl 0x38c(%rsp), %esi
callq 0x4670
movq %rax, 0xa0(%rsp)
jmp 0x23f7e
movq 0xa0(%rsp), %rdi
leaq 0xe788(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x98(%rsp)
jmp 0x23f9c
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x94(%rsp)
jmp 0x23faf
movq 0x98(%rsp), %rdi
movl 0x94(%rsp), %eax
movl %eax, 0x350(%rsp)
movl 0x350(%rsp), %esi
callq 0x45a0
movq %rax, 0x88(%rsp)
jmp 0x23fdb
movq 0x88(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x38c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
callq 0x4730
movq %rax, 0x80(%rsp)
jmp 0x2400d
movq 0x80(%rsp), %rdi
leaq 0xe6f9(%rip), %rsi      # 0x32715
callq 0x43f0
movq %rax, 0x78(%rsp)
jmp 0x24028
movl $0xc, %edi
callq 0xfc00
movl %eax, 0x74(%rsp)
jmp 0x24038
movq 0x78(%rsp), %rdi
movl 0x74(%rsp), %eax
movl %eax, 0x34c(%rsp)
movl 0x34c(%rsp), %esi
callq 0x45a0
movq %rax, 0x68(%rsp)
jmp 0x2405b
movq 0x68(%rsp), %rdi
movq 0xf28(%rsp), %rax
movq (%rax), %rax
movslq 0x38c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
callq 0x4730
movq %rax, 0x60(%rsp)
jmp 0x24088
movq 0x60(%rsp), %rdi
movq 0x1cf1c(%rip), %rsi     # 0x40fb0
callq 0x4430
jmp 0x2409b
jmp 0x2409d
jmp 0x2409f
movl 0x38c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38c(%rsp)
jmp 0x23a8f
movl $0x0, 0x348(%rsp)
movl 0x348(%rsp), %eax
cmpl 0xf1c(%rsp), %eax
jge 0x241aa
movl $0x0, 0x344(%rsp)
movslq 0x344(%rsp), %rax
movq %rax, 0x58(%rsp)
movslq 0x348(%rsp), %rsi
leaq 0x4c8(%rsp), %rdi
callq 0x24850
movq %rax, %rdi
callq 0xe3d0
movq %rax, %rcx
movq 0x58(%rsp), %rax
cmpq %rcx, %rax
jae 0x2417c
movslq 0x348(%rsp), %rsi
leaq 0x4c8(%rsp), %rdi
callq 0x24850
movq %rax, %rdi
movslq 0x344(%rsp), %rsi
callq 0xe3b0
movl (%rax), %esi
leaq 0x708(%rsp), %rdi
callq 0x4670
movq %rax, 0x50(%rsp)
jmp 0x24151
movq 0x50(%rsp), %rdi
leaq 0xe48f(%rip), %rsi      # 0x325ec
callq 0x43f0
jmp 0x24164
jmp 0x24166
movl 0x344(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x344(%rsp)
jmp 0x240df
movq 0x1ce2d(%rip), %rsi     # 0x40fb0
leaq 0x708(%rsp), %rdi
callq 0x4430
jmp 0x24192
jmp 0x24194
movl 0x348(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x348(%rsp)
jmp 0x240c0
movl $0x0, 0x340(%rsp)
movl 0x340(%rsp), %eax
cmpl 0xf1c(%rsp), %eax
jge 0x24203
movq 0x3b8(%rsp), %rax
movslq 0x340(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x241ee
movq 0x48(%rsp), %rdi
callq 0x44c0
jmp 0x241f0
movl 0x340(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x340(%rsp)
jmp 0x241b5
movq 0x3b8(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, %rax
je 0x24220
movq 0x40(%rsp), %rdi
callq 0x44c0
movq 0x500(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x24290
movq 0x38(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x28(%rsp)
movq -0x8(%rcx), %rdx
shlq $0x9, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x30(%rsp)
je 0x24286
movq 0x30(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, 0x20(%rsp)
callq 0x4560
movq 0x38(%rsp), %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x30(%rsp)
jne 0x2425c
movq 0x28(%rsp), %rdi
callq 0x44c0
movq 0x4f8(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x242fe
movq 0x18(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
movq -0x8(%rcx), %rdx
shlq $0x9, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x10(%rsp)
je 0x242f4
movq 0x10(%rsp), %rdi
addq $-0x200, %rdi           # imm = 0xFE00
movq %rdi, (%rsp)
callq 0x4560
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0x242cc
movq 0x8(%rsp), %rdi
callq 0x44c0
leaq 0x4c8(%rsp), %rdi
callq 0x10200
leaq 0x4e0(%rsp), %rdi
callq 0xe2e0
leaq 0x508(%rsp), %rdi
callq 0x4560
leaq 0x708(%rsp), %rdi
callq 0x4560
leaq 0x908(%rsp), %rdi
callq 0x4560
leaq 0xb18(%rsp), %rdi
callq 0x4560
leaq 0xd18(%rsp), %rdi
callq 0x4560
addq $0xf38, %rsp            # imm = 0xF38
retq
leaq 0x4c8(%rsp), %rdi
callq 0x10200
leaq 0x4e0(%rsp), %rdi
callq 0xe2e0
leaq 0x508(%rsp), %rdi
callq 0x4560
leaq 0x708(%rsp), %rdi
callq 0x4560
leaq 0x908(%rsp), %rdi
callq 0x4560
leaq 0xb18(%rsp), %rdi
callq 0x4560
leaq 0xd18(%rsp), %rdi
callq 0x4560
movq 0xb10(%rsp), %rdi
callq 0x4690
nopl (%rax)