// File: /workspace/github_cpp_makefile_star2_O3/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), %r15
leaq 0x48(%r15), %rdi
movl %eax, 0x38(%rsp)
movq 0x50(%r15), %rsi
cmpq 0x58(%r15), %rsi
movq %rdi, 0x10(%rsp)
je 0x53fa
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%r15)
jmp 0x5404
leaq 0x38(%rsp), %rdx
callq 0x5c7e
leaq 0x30(%r15), %r12
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 0x551a
movq 0x38(%r15), %rsi
cmpq 0x40(%r15), %rsi
je 0x5465
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%r15)
jmp 0x5472
movq %r12, %rdi
leaq 0x8(%rsp), %rdx
callq 0x5d9e
movq 0x50(%r15), %rsi
movl -0x4(%rsi), %eax
incl %eax
movl %eax, 0x38(%rsp)
cmpq 0x58(%r15), %rsi
je 0x5491
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%r15)
jmp 0x549e
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0x5c7e
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 0x54f9
movq 0x38(%r15), %rsi
cmpq 0x40(%r15), %rsi
je 0x54e5
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%r15)
jmp 0x54f0
movq %r12, %rdi
movq %r14, %rdx
callq 0x5d9e
movq 0x50(%r15), %rax
incl -0x4(%rax)
jmp 0x54b2
movq %rbp, %rdi
movq 0x6ac5(%rip), %rsi      # 0xbfc8
callq 0x32a0
leaq 0xb0(%rsp), %rdi
callq 0x30e0
jmp 0x5417
movl 0x8(%rsp), %eax
movq 0x618(%rbx), %rcx
movl %eax, (%rcx)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x5543
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 0x555b
jmp 0x555b
jmp 0x555b
movq %rax, %rbx
jmp 0x5581
movq %rax, %rbx
movq 0x6a5e(%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 0x559d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3360
nop