// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xae8, %rsp            # imm = 0xAE8
movl %ecx, 0x4(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %r13
leaq 0x6e8(%rsp), %rdi
callq 0x35a0
leaq 0x4e8(%rsp), %rdi
callq 0x35a0
leaq 0x2e8(%rsp), %rdi
callq 0x35a0
leaq 0xe8(%rsp), %rdi
callq 0x35a0
leaq 0x8e8(%rsp), %rdi
callq 0x35a0
movslq 0x4(%rsp), %r14
movq %r14, %r15
shlq $0x9, %r15
leaq 0x8(%r15), %rax
testl %r14d, %r14d
movq $-0x1, %rbx
cmovnsq %rax, %rbx
movq %rbx, %rdi
callq 0x3030
movq %r14, (%rax)
movq %rax, 0x40(%rsp)
addq $0x8, %rax
movq %rax, 0xb8(%rsp)
movq %r14, 0x48(%rsp)
testl %r14d, %r14d
je 0x11386
movq %r15, %rbp
negq %rbp
xorl %r12d, %r12d
movq 0xb8(%rsp), %r14
movq %r14, %rdi
callq 0x35a0
addq $-0x200, %r12           # imm = 0xFE00
addq $0x200, %r14            # imm = 0x200
cmpq %r12, %rbp
jne 0x1136b
movq %rbx, %rdi
callq 0x3030
movq %rax, %r12
addq $0x8, %rax
movq %rax, 0x78(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%r12)
testl %eax, %eax
je 0x113cd
negq %r15
xorl %r14d, %r14d
movq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x35a0
addq $-0x200, %r14           # imm = 0xFE00
addq $0x200, %rbx            # imm = 0x200
cmpq %r14, %r15
jne 0x113b2
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
leaq 0x635b(%rip), %rsi      # 0x17746
leaq 0xe8(%rsp), %rdi
movl $0x10, %edx
callq 0x3070
leaq 0x6351(%rip), %rsi      # 0x17755
leaq 0x8e8(%rsp), %rdi
movl $0x10, %edx
callq 0x3070
leaq 0x6342(%rip), %rsi      # 0x1775f
leaq 0x6e8(%rsp), %rdi
movl $0x10, %edx
callq 0x3070
leaq 0x633c(%rip), %rsi      # 0x17772
leaq 0x6e8(%rsp), %rbx
movl $0x15, %edx
movq %rbx, %rdi
callq 0x33b0
movq 0x6e8(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
leaq 0x6e8(%rsp), %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
leaq 0x6305(%rip), %rsi      # 0x17788
leaq 0x4e8(%rsp), %rdi
movl $0x10, %edx
callq 0x3070
leaq 0x62d6(%rip), %rsi      # 0x17772
leaq 0x4e8(%rsp), %rbx
movl $0x15, %edx
movq %rbx, %rdi
callq 0x33b0
movq 0x4e8(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
leaq 0x4e8(%rsp), %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
leaq 0x62b9(%rip), %rsi      # 0x177a2
leaq 0x2e8(%rsp), %rdi
movl $0x10, %edx
callq 0x3070
leaq 0x6270(%rip), %rsi      # 0x17772
leaq 0x2e8(%rsp), %rbx
movl $0x15, %edx
movq %rbx, %rdi
callq 0x33b0
movq 0x2e8(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
leaq 0x2e8(%rsp), %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movq %r12, 0xc8(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x48(%rsp), %r14
movq %r14, %rsi
callq 0x1289c
movl 0x9c8(%r13), %esi
leaq 0x8e8(%rsp), %rdi
callq 0x3230
movq %rax, %rbx
leaq 0x611c(%rip), %rsi      # 0x176a4
movl $0x1, %edx
movq %rax, %rdi
callq 0x33b0
movl 0x9cc(%r13), %esi
movq %rbx, %rdi
callq 0x3230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movl 0x9c8(%r13), %ecx
testl %ecx, %ecx
je 0x11779
movq 0xa20(%r13), %rax
xorl %ebx, %ebx
movl $0x1, %r12d
leaq 0x60b1(%rip), %rbp      # 0x176a4
movl (%rax,%r12,4), %edx
cmpl $0x2, %edx
jl 0x11762
movl %edx, 0x30(%rsp)
movl %ebx, 0x38(%rsp)
movl $0x1, %r14d
leaq (%r12,%r12,2), %r15
movq 0xc9b7(%rip), %rdi      # 0x1dfd0
movl %r12d, %esi
callq 0x35b0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq 0x9d8(%r13), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%r14,4), %esi
movq %rbx, %rdi
callq 0x35b0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq 0x9f0(%r13), %rax
movq (%rax,%r15,8), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%r14,4), %xmm0
movq %rbx, %rdi
callq 0x3520
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
leaq 0x8e8(%rsp), %rdi
movl %r12d, %esi
callq 0x35b0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq 0x9d8(%r13), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%r14,4), %esi
movq %rbx, %rdi
callq 0x35b0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq 0x9f0(%r13), %rax
movq (%rax,%r15,8), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%r14,4), %xmm0
movq %rbx, %rdi
callq 0x3520
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
incq %r14
movq 0xa20(%r13), %rax
movslq (%rax,%r12,4), %rcx
cmpq %rcx, %r14
jl 0x11612
movl 0x9c8(%r13), %ecx
movq 0x48(%rsp), %r14
movl 0x38(%rsp), %ebx
movl 0x30(%rsp), %edx
addl %edx, %ebx
leaq 0x1(%r12), %rdx
movl %ecx, %esi
cmpq %rsi, %r12
movq %rdx, %r12
jb 0x115f3
jmp 0x1177b
xorl %ebx, %ebx
movq 0xc84e(%rip), %rdi      # 0x1dfd0
leaq 0x6034(%rip), %rsi      # 0x177bd
movl $0x11, %edx
callq 0x33b0
movq 0xc836(%rip), %rdi      # 0x1dfd0
movl %ebx, %esi
callq 0x35b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movl 0x4(%rsp), %eax
movl %eax, %r12d
testl %eax, %eax
movq %r12, 0x50(%rsp)
jle 0x11dba
leaq 0x68(%rsp), %r15
xorl %eax, %eax
leaq 0x6008(%rip), %rbp      # 0x177f5
leaq 0x1(%rax), %rdx
movl $0x1, %ebx
movq %rax, 0x38(%rsp)
cmpq $0x9, %rax
leaq 0x80(%rsp), %r14
movl $0xd1b71759, %r12d      # imm = 0xD1B71759
jb 0x1184b
movl $0x4, %ebx
movl %edx, %eax
cmpl $0x63, %eax
jbe 0x11844
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x11849
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1184b
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x11816
addl $-0x3, %ebx
jmp 0x1184b
addl $-0x2, %ebx
jmp 0x1184b
decl %ebx
movq %rdx, 0x30(%rsp)
movl %ebx, %esi
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %r14, %rdi
movl $0x2d, %edx
callq 0x33d0
movq 0x80(%rsp), %rdi
movl %ebx, %esi
movq 0x30(%rsp), %rdx
callq 0xadc7
movl $0x13, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x5f38(%rip), %rcx      # 0x177cf
callq 0x33a0
movq %r15, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x18(%rsp), %rbx
je 0x118c4
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x118cb
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x58(%rsp), %rdi
leaq 0x5ec9(%rip), %rsi      # 0x177b8
callq 0x3650
movq %rbx, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11917
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1191d
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x38(%rsp), %r14
shlq $0x9, %r14
movq 0xb8(%rsp), %rdx
leaq (%rdx,%r14), %rbx
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movl $0x10, %edx
callq 0x3170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11970
callq 0x3340
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x1197f
callq 0x3340
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x11999
callq 0x3340
movl $0x15, %edx
movq %rbx, %rdi
leaq 0x5dca(%rip), %rsi      # 0x17772
callq 0x33b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movl $0x1, %r15d
cmpq $0x9, 0x38(%rsp)
jb 0x11a26
movl $0x4, %r15d
movq 0x30(%rsp), %rax
cmpl $0x63, %eax
jbe 0x11a1d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x11a23
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x11a26
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x119ed
addl $-0x3, %r15d
jmp 0x11a26
addl $-0x2, %r15d
jmp 0x11a26
decl %r15d
movl %r15d, %esi
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x33d0
movq 0x80(%rsp), %rdi
movl %r15d, %esi
movq 0x30(%rsp), %rdx
callq 0xadc7
movl $0x11, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x5d6c(%rip), %rcx      # 0x177e3
callq 0x33a0
leaq 0x68(%rsp), %r15
movq %r15, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11aa4
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x11aab
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x58(%rsp), %rdi
leaq 0x5ce9(%rip), %rsi      # 0x177b8
callq 0x3650
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11afc
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x11b02
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
addq 0x78(%rsp), %r14
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movl $0x10, %edx
callq 0x3170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11b45
callq 0x3340
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x11b54
callq 0x3340
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x11b6e
callq 0x3340
movl $0x15, %edx
movq %r14, %rdi
leaq 0x5bf5(%rip), %rsi      # 0x17772
callq 0x33b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
leaq 0x6e8(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x35b0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r14,%rax)
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x3520
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r14,%rax)
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq %r14, %rdi
callq 0x3520
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movq 0xad0(%r13), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r12
addq $0x8, %r12
movq 0x10(%r12), %r14
cmpq %r12, %r14
je 0x11d9d
movl 0x20(%r14), %esi
movl %esi, 0x8(%rsp)
movq %rbx, %rdi
callq 0x35b0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0x11d77
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xa8(%rsp)
jmp 0x11d89
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd306
movq %r14, %rdi
callq 0x33c0
movq %rax, %r14
cmpq %r12, %rax
jne 0x11c96
movq 0x50(%rsp), %r12
movq 0x30(%rsp), %rax
cmpq %r12, %rax
movq 0x48(%rsp), %r14
leaq 0x68(%rsp), %r15
jne 0x117ed
shlq $0x3, %r14
movl 0x4(%rsp), %ebp
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %r14, %rdi
callq 0x3030
movq %rax, %rbx
testl %ebp, %ebp
jle 0x11e6b
movl 0x9c8(%r13), %r12d
leal 0x1(%r12), %r14d
movslq %r14d, %rax
shlq $0x2, %rax
cmpl $-0x1, %r12d
movq $-0x1, %r15
cmovgeq %rax, %r15
shlq $0x2, %r14
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x3030
movq %rax, (%rbx,%rbp,8)
testl %r12d, %r12d
js 0x11e25
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x31c0
incq %rbp
cmpq %rbp, 0x50(%rsp)
jne 0x11e07
cmpl $0x0, 0x4(%rsp)
movq 0x50(%rsp), %r12
jle 0x11e6b
xorl %ebp, %ebp
cmpl $0x0, 0xa60(%r13)
je 0x11e56
movq %r13, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x10660
jmp 0x11e63
movq %r13, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x10a02
incl %ebp
cmpl %ebp, 0x4(%rsp)
jne 0x11e3d
movl $0x1, 0x8(%rsp)
cmpl $0x0, 0x9c8(%r13)
jle 0x12192
leaq 0x8(%rsp), %r14
leaq 0x5968(%rip), %rbp      # 0x177f5
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq %r14, %rdx
callq 0x144fc
cmpq %rax, 0xa8(%rsp)
jne 0x11f6f
movl 0x8(%rsp), %esi
leaq 0x4e8(%rsp), %rdi
callq 0x35b0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
cmpl $0x0, 0x4(%rsp)
jle 0x12001
movslq 0x8(%rsp), %rax
leaq (%rax,%rax,2), %rcx
shlq $0x3, %rcx
addq 0xae0(%r13), %rcx
xorps %xmm0, %xmm0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %esi, %esi
movq (%rbx,%rsi,8), %rdi
movss (%rdi,%rax,4), %xmm1
ucomiss 0x5114(%rip), %xmm1     # 0x170bc
jne 0x11fc0
jp 0x11fc0
movq (%rcx), %rdi
movsd (%rdi,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x11fc0
movapd %xmm1, %xmm0
movl %esi, %edx
incq %rsi
cmpq %rsi, %r12
jne 0x11f98
cmpl $-0x1, %edx
je 0x12001
movslq %edx, %r15
movq 0xd0(%rsp), %rax
leaq (%r15,%r15,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
je 0x120af
movl 0x8(%rsp), %esi
movl %esi, (%rax)
addq $0x4, %rax
movq %rax, 0x8(%rdi)
jmp 0x120be
movl 0x8(%rsp), %esi
leaq 0x2e8(%rsp), %rdi
callq 0x35b0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3360
jmp 0x12167
movq %rax, %rsi
movq %r14, %rdx
callq 0xd306
movl 0x8(%rsp), %esi
shlq $0x9, %r15
addq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0x35b0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x33b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x8(%r15,%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm0
movq %r15, %rdi
callq 0x3520
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
movl 0x8(%rsp), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rsp)
cmpl 0x9c8(%r13), %eax
jl 0x11e8d
cmpl $0x0, 0x4(%rsp)
movq 0x40(%rsp), %r13
movq 0xc8(%rsp), %rbp
jle 0x1227e
xorl %r15d, %r15d
leaq 0x54f0(%rip), %r14      # 0x176a4
movq 0xd0(%rsp), %rcx
leaq (%r15,%r15,2), %r12
movq (%rcx,%r12,8), %rax
cmpq %rax, 0x8(%rcx,%r12,8)
je 0x1220f
xorl %r13d, %r13d
movl (%rax,%r13,4), %esi
leaq 0xe8(%rsp), %rdi
callq 0x35b0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x33b0
incq %r13
movq 0xd0(%rsp), %rcx
movq (%rcx,%r12,8), %rax
movq 0x8(%rcx,%r12,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
ja 0x121ce
movq 0xe8(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0xe8(%rsp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0x3360
movsbl %al, %esi
leaq 0xe8(%rsp), %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3240
incq %r15
movq 0x50(%rsp), %r12
cmpq %r12, %r15
jne 0x121b4
cmpl $0x0, 0x4(%rsp)
movq 0x40(%rsp), %r13
jle 0x1227e
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x12276
callq 0x3410
incq %r14
cmpq %r14, %r12
jne 0x12268
movq %rbx, %rdi
callq 0x3410
movq (%r13), %rbx
testq %rbx, %rbx
je 0x122e2
shlq $0x9, %rbx
movq 0xbd26(%rip), %rax      # 0x1dfc0
movq (%rax), %r14
movq 0x18(%rax), %r15
leaq (%rbx,%r13), %r12
addq $-0x1f8, %r12           # imm = 0xFE08
negq %rbx
movq %r14, (%r12)
movq -0x18(%r14), %rax
movq %r15, (%r12,%rax)
leaq 0x8(%r12), %rdi
callq 0x32f0
leaq 0xf8(%r12), %rdi
callq 0x3120
addq $-0x200, %r12           # imm = 0xFE00
addq $0x200, %rbx            # imm = 0x200
jne 0x122af
movq %r13, %rdi
callq 0x3410
movq (%rbp), %rbx
testq %rbx, %rbx
je 0x12346
shlq $0x9, %rbx
movq 0xbcc2(%rip), %rax      # 0x1dfc0
movq (%rax), %r14
movq 0x18(%rax), %r15
leaq (%rbx,%rbp), %r12
addq $-0x1f8, %r12           # imm = 0xFE08
negq %rbx
movq %r14, (%r12)
movq -0x18(%r14), %rax
movq %r15, (%r12,%rax)
leaq 0x8(%r12), %rdi
callq 0x32f0
leaq 0xf8(%r12), %rdi
callq 0x3120
addq $-0x200, %r12           # imm = 0xFE00
addq $0x200, %rbx            # imm = 0x200
jne 0x12313
movq %rbp, %rdi
callq 0x3410
leaq 0xd0(%rsp), %rdi
callq 0xad82
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x1236d
callq 0x3340
movq 0xbc4c(%rip), %rax      # 0x1dfc0
movq (%rax), %rbx
movq 0x18(%rax), %r14
leaq 0x8f0(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x8e8(%rsp,%rax)
callq 0x32f0
movl $0xf8, %r15d
leaq 0x8e8(%rsp), %rdi
addq %r15, %rdi
callq 0x3120
leaq 0xf0(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0xe8(%rsp,%rax)
callq 0x32f0
leaq 0xe8(%rsp), %rdi
addq %r15, %rdi
callq 0x3120
leaq 0x2f0(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x2e8(%rsp,%rax)
callq 0x32f0
leaq 0x2e8(%rsp), %rdi
addq %r15, %rdi
callq 0x3120
leaq 0x4f0(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x4e8(%rsp,%rax)
callq 0x32f0
leaq 0x4e8(%rsp), %rdi
addq %r15, %rdi
callq 0x3120
leaq 0x6f0(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x6e8(%rsp,%rax)
callq 0x32f0
leaq 0x6e8(%rsp), %rdi
addq %r15, %rdi
callq 0x3120
addq $0xae8, %rsp            # imm = 0xAE8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12587
jmp 0x124af
jmp 0x1247d
movq %rax, %rbx
jmp 0x125a9
movq %rax, %rbx
jmp 0x125b6
movq %rax, %rbx
jmp 0x125c3
movq %rax, %rbx
jmp 0x125d0
movq %rax, %rbx
jmp 0x125dd
jmp 0x12587
jmp 0x12587
movq %rax, %rbx
jmp 0x12597
jmp 0x12587
jmp 0x124c7
jmp 0x124cc
jmp 0x124d1
jmp 0x12587
movq %rax, %rbx
jmp 0x124fc
movq %rax, %rbx
jmp 0x124e8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x124e8
callq 0x3340
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x124fc
callq 0x3340
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x1258a
callq 0x3340
jmp 0x1258a
jmp 0x12587
jmp 0x12587
movq %rax, %rbx
testq %r14, %r14
je 0x12543
negq %r14
movq %r12, %r15
addq $-0x1f8, %r15           # imm = 0xFE08
leaq (%r15,%r14), %rdi
callq 0x34a0
addq $-0x200, %r14           # imm = 0xFE00
jne 0x12531
movq %r12, %rdi
jmp 0x12576
movq %rax, %rbx
testq %r12, %r12
je 0x12571
negq %r12
movq 0x40(%rsp), %r14
addq $-0x1f8, %r14           # imm = 0xFE08
leaq (%r14,%r12), %rdi
callq 0x34a0
addq $-0x200, %r12           # imm = 0xFE00
jne 0x1255f
movq 0x40(%rsp), %rdi
callq 0x3410
jmp 0x125a9
jmp 0x12587
jmp 0x12587
jmp 0x12587
jmp 0x12587
jmp 0x12587
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0xad82
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x125a9
callq 0x3340
leaq 0x8e8(%rsp), %rdi
callq 0x34a0
leaq 0xe8(%rsp), %rdi
callq 0x34a0
leaq 0x2e8(%rsp), %rdi
callq 0x34a0
leaq 0x4e8(%rsp), %rdi
callq 0x34a0
leaq 0x6e8(%rsp), %rdi
callq 0x34a0
movq %rbx, %rdi
callq 0x35c0