// File: /workspace/github_cpp_makefile_star2_O1/yuang-chen[P]paraGCN/src/parser.cpp
// Function: Parser::parseGraph()
void Parser::parseGraph() {
    int node = 0; 
    string line;

    auto &graph_sparse_index = this->gcnData->graph;
    graph_sparse_index.indptr.push_back(0);
 
    while(getline(this->graph_file, line)) {    // get the line out of the graph file, which iilutrates node relation
        graph_sparse_index.indices.push_back(node);  
        graph_sparse_index.indptr.push_back(graph_sparse_index.indptr.back() + 1);
        node++;
        
        istringstream ss(line);    // analyze the line 
        int neighbor;
        while(ss >> neighbor) {       // get the number out of the line
            graph_sparse_index.indices.push_back(neighbor);
            graph_sparse_index.indptr.back() += 1;
        }
    }
    this->gcnParams->num_nodes = node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, 0x8(%rsp)
leaq 0x28(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
movq 0x620(%rdi), %r12
leaq 0x48(%r12), %rdi
movl %eax, 0x38(%rsp)
movq 0x50(%r12), %rsi
cmpq 0x58(%r12), %rsi
movq %rdi, 0x10(%rsp)
je 0x5466
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%r12)
jmp 0x5470
leaq 0x38(%rsp), %rdx
callq 0x5cfa
leaq 0x30(%r12), %r15
leaq 0x18(%rsp), %r13
leaq 0x38(%rsp), %rbp
leaq 0xc(%rsp), %r14
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3390
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5591
movq 0x38(%r12), %rsi
cmpq 0x40(%r12), %rsi
je 0x54d5
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%r12)
jmp 0x54e2
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x5e1a
movq 0x50(%r12), %rsi
movl -0x4(%rsi), %eax
incl %eax
movl %eax, 0x38(%rsp)
cmpq 0x58(%r12), %rsi
je 0x5504
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%r12)
jmp 0x5511
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0x5cfa
incl 0x8(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movl $0x8, %edx
callq 0x3340
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3160
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5570
movq 0x38(%r12), %rsi
cmpq 0x40(%r12), %rsi
je 0x555b
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%r12)
jmp 0x5566
movq %r15, %rdi
movq %r14, %rdx
callq 0x5e1a
movq 0x50(%r12), %rax
incl -0x4(%rax)
jmp 0x5525
movq %rbp, %rdi
movq 0x6a4e(%rip), %rsi      # 0xbfc8
callq 0x32a0
leaq 0xb0(%rsp), %rdi
callq 0x30e0
jmp 0x5484
movl 0x8(%rsp), %eax
movq 0x618(%rbx), %rcx
movl %eax, (%rcx)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x55ba
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55d2
jmp 0x55d2
jmp 0x55d2
movq %rax, %rbx
jmp 0x55f8
movq %rax, %rbx
movq 0x69e7(%rip), %rsi      # 0xbfc8
leaq 0x38(%rsp), %rdi
callq 0x32a0
leaq 0xb0(%rsp), %rdi
callq 0x30e0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x5614
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3360