// File: dtsaras[P]GCW/rwgraph.cpp
// Function: Graph::create_AV_sets(Locations*, Locations*, int, Utilities)
void Graph::create_AV_sets(Locations* usersLocations, Locations* eventsLocations, int P, Utilities util){
    double max_dist = find_max_dist(P, usersLocations, eventsLocations, util);
    for (int v = 1; v <= getSize(); v++){
        A[v].clear();
        for (int p = 0; p < P; p++){
            similarities[v][p] = util.computeSimilarity(usersLocations->locations[v][0], usersLocations->locations[v][1], eventsLocations->locations[p][0], eventsLocations->locations[p][1], max_dist);
            A[v].insert(pair<double, int>(-similarities[v][p], p));
            tsim_V_p[p] += similarities[v][p];
        }
    }
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movl %ecx, 0x64(%rsp)
movq 0x78(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl 0x64(%rsp), %esi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0x1ee40
movsd %xmm0, 0x58(%rsp)
movl $0x1, 0x50(%rsp)
movq 0x20(%rsp), %rdi
movl 0x50(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x1db70
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jg 0x1ee29
movq 0x20(%rsp), %rax
movq 0xaf8(%rax), %rdi
movslq 0x50(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x248b0
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x64(%rsp), %eax
jge 0x1ee17
movq 0x70(%rsp), %rax
movq (%rax), %rax
movslq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
movq 0x70(%rsp), %rax
movq (%rax), %rax
movslq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm1
movq 0x68(%rsp), %rax
movq (%rax), %rax
movslq 0x4c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm2
movq 0x68(%rsp), %rax
movq (%rax), %rax
movslq 0x4c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x8(%rax), %xmm3
movsd 0x58(%rsp), %xmm4
leaq 0x87(%rsp), %rdi
callq 0x1a8a0
movq 0x20(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0xae0, %rdi            # imm = 0xAE0
movslq 0x50(%rsp), %rsi
callq 0xf180
movq %rax, %rdi
movslq 0x4c(%rsp), %rsi
callq 0xeb00
movsd (%rsp), %xmm0
movq 0x20(%rsp), %rdi
movsd %xmm0, (%rax)
movq 0xaf8(%rdi), %rax
movslq 0x50(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
addq $0xae0, %rdi            # imm = 0xAE0
movslq 0x50(%rsp), %rsi
callq 0xf180
movq %rax, %rdi
movslq 0x4c(%rsp), %rsi
callq 0xeb00
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x4c(%rsp), %rdx
callq 0x248f0
movq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x248c0
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
addq $0xae0, %rdi            # imm = 0xAE0
movslq 0x50(%rsp), %rsi
callq 0xf180
movq %rax, %rdi
movslq 0x4c(%rsp), %rsi
callq 0xeb00
movq 0x20(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
addq $0xb00, %rdi            # imm = 0xB00
movslq 0x4c(%rsp), %rsi
callq 0xeb00
movsd 0x10(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x1ec8a
jmp 0x1ee19
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x1ec45
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)