// File: /workspace/github_cpp_makefile_star2_O1/dtsaras[P]GCW/rwgraph.cpp
// Function: Graph::read_similarities(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void Graph::read_similarities(string filename, int P){
    ifstream infile(filename);
    int num_nodes;
    int max_P;
    double tmp;
    stringstream tmp_s;
    int node_id;
    string a;
    infile >> num_nodes >> max_P;
    for (int v = 1; v <= getSize(); v++){
        A[v].clear();
        // infile.getline(tmp_s, 256, "\n");
        infile >> node_id;
        for (int p = 0; p < max_P; p++){
            if (p < P){
                infile >> setprecision(16) >> tmp;
                similarities[v][p] = tmp;
                A[v].insert(pair<double, int>(-similarities[v][p], p));
                tsim_V_p[p] += similarities[v][p];
            }
            else{
                infile >> setprecision(16) >> tmp;
            }
        }
        // infile.seekg(sizeof(double) * (max_P - P) * 2, infile.cur);
        // infile.ignore(max_P - P, "\n");
        // for (int i = 0; i < max_P - P; i++)
        //     infile.ignore(max_P - P, "\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x58(%rsp), %rdi
movl $0x8, %edx
callq 0x3530
leaq 0x260(%rsp), %rdi
callq 0x3260
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x31e0
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x31e0
cmpl $0x0, 0x9c8(%rbx)
jle 0xee7a
movslq %ebp, %rbp
movl $0x1, %eax
leaq 0x58(%rsp), %r14
movq %rax, 0x18(%rsp)
leaq (%rax,%rax,2), %r13
movq %r13, %r15
shlq $0x4, %r15
movq 0xaf8(%rbx), %rdi
addq %r15, %rdi
callq 0x13572
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x31e0
cmpl $0x0, 0xc(%rsp)
jle 0xee61
xorl %r12d, %r12d
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
cmpq %rbp, %r12
jge 0xee3a
movq $0x10, 0x60(%rsp,%rax)
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3220
movsd 0x10(%rsp), %xmm0
movq 0xae0(%rbx), %rax
movq (%rax,%r13,8), %rcx
movsd %xmm0, (%rcx,%r12,8)
movq 0xaf8(%rbx), %rdi
addq %r15, %rdi
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
xorps 0x98c0(%rip), %xmm0     # 0x186c0
movlps %xmm0, 0x28(%rsp)
movl %r12d, 0x30(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x135d6
movq 0xae0(%rbx), %rax
movq 0xb00(%rbx), %rcx
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
addsd (%rcx,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r12,8)
jmp 0xee50
movq $0x10, 0x60(%rsp,%rax)
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3220
incq %r12
movslq 0xc(%rsp), %rax
cmpq %rax, %r12
jl 0xeda6
movq 0x18(%rsp), %rdx
leaq 0x1(%rdx), %rax
movslq 0x9c8(%rbx), %rcx
cmpq %rcx, %rdx
jl 0xed6c
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xee8e
callq 0x3340
movq 0x10113(%rip), %rsi     # 0x1efa8
leaq 0x260(%rsp), %rdi
callq 0x3290
leaq 0x2e0(%rsp), %rdi
callq 0x3120
leaq 0x58(%rsp), %rdi
callq 0x30d0
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xef0e
jmp 0xeed6
jmp 0xeed6
jmp 0xeed6
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xeeed
callq 0x3340
movq 0x100b4(%rip), %rsi     # 0x1efa8
leaq 0x260(%rsp), %rdi
callq 0x3290
leaq 0x2e0(%rsp), %rdi
callq 0x3120
leaq 0x58(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x35c0