// File: /workspace/github_cpp_makefile_star2_O3/yuang-chen[P]paraGCN/src/parser.cpp
// Function: Parser::parseNode()
void Parser::parseNode() {
    string line;
    int max_idx = 0, max_label = 0;

    auto &feature_sparse_index = this->gcnData->feature_index;
    auto &feature_val = this->gcnData->feature_value;
    auto &labels = this->gcnData->label;

    feature_sparse_index.indptr.push_back(0);

    while(!svmlight_file.eof()) {
        getline(svmlight_file, line);
        feature_sparse_index.indptr.push_back(feature_sparse_index.indptr.back());

        istringstream ss(line);
        int label;
        ss >> label;
        labels.push_back(label);
        max_label = max(max_label, label);
        string target_value;
        while(ss >> target_value) {
            istringstream tv_ss(target_value);
            int target;
            char col;
            float value;
            tv_ss >> target >> col >> value;

            feature_val.push_back(value);
            feature_sparse_index.indices.push_back(target);
            feature_sparse_index.indptr.back() += 1;
            max_idx = max(max_idx, target);
        }        
    }
    gcnParams->input_dim = max_idx + 1;
    gcnParams->output_dim = max_label + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x388, %rsp            # imm = 0x388
movq %rdi, %r14
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x620(%rdi), %r15
leaq 0x18(%r15), %r12
movl $0x0, 0x88(%rsp)
movq 0x20(%r15), %rsi
cmpq 0x28(%r15), %rsi
je 0x55fe
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x20(%r15)
jmp 0x560e
leaq 0x88(%rsp), %rdx
movq %r12, %rdi
callq 0x5c7e
movq 0x410(%r14), %rax
movq -0x18(%rax), %rax
movl $0x1, %ebx
testb $0x2, 0x430(%r14,%rax)
movl $0x1, %ecx
jne 0x5897
movq %r12, 0x78(%rsp)
leaq 0x90(%r15), %rcx
movq %rcx, 0x80(%rsp)
leaq 0x78(%r15), %rcx
movq %rcx, 0x70(%rsp)
leaq 0x410(%r14), %rcx
movq %rcx, 0x20(%rsp)
movq %r14, 0x68(%rsp)
leaq 0x410(%r14,%rax), %rdi
movl $0x0, 0xc(%rsp)
leaq 0x28(%rsp), %r12
leaq 0x208(%rsp), %r14
leaq 0x18(%rsp), %rbp
leaq 0x1c(%rsp), %r13
xorl %ebx, %ebx
movl $0xa, %esi
callq 0x31e0
movsbl %al, %edx
movq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3390
movq 0x20(%r15), %rsi
cmpq 0x28(%r15), %rsi
je 0x56be
movl -0x4(%rsi), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x20(%r15)
jmp 0x56cc
leaq -0x4(%rsi), %rdx
movq 0x78(%rsp), %rdi
callq 0x5d9e
leaq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0x8, %edx
callq 0x3340
leaq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3160
movq 0x80(%r15), %rsi
cmpq 0x88(%r15), %rsi
je 0x5718
movl 0x10(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x80(%r15)
jmp 0x572b
movq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x5d9e
movl 0x10(%rsp), %eax
movl 0xc(%rsp), %ecx
cmpl %eax, %ecx
cmovlel %eax, %ecx
movl %ecx, 0xc(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq 0x3240
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5832
movq %r14, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x3340
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3160
movq %rax, %rdi
leaq 0x17(%rsp), %rsi
callq 0x3260
movq %rax, %rdi
movq %r13, %rsi
callq 0x33c0
movq 0x98(%r15), %rsi
cmpq 0xa0(%r15), %rsi
je 0x57cc
movss 0x1c(%rsp), %xmm0
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x98(%r15)
jmp 0x57dc
movq 0x80(%rsp), %rdi
movq %r13, %rdx
callq 0x5e7a
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x57f6
movl 0x18(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x5801
movq %r15, %rdi
movq %rbp, %rdx
callq 0x5d9e
movq 0x20(%r15), %rax
incl -0x4(%rax)
movl 0x18(%rsp), %eax
cmpl %eax, %ebx
cmovlel %eax, %ebx
movq %r14, %rdi
movq 0x67ad(%rip), %rsi      # 0xbfc8
callq 0x32a0
leaq 0x280(%rsp), %rdi
callq 0x30e0
jmp 0x5750
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x584e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x88(%rsp), %rdi
movq 0x676b(%rip), %rsi      # 0xbfc8
callq 0x32a0
leaq 0x100(%rsp), %rdi
callq 0x30e0
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
testb $0x2, 0x20(%rcx,%rax)
je 0x5689
incl %ebx
movl 0xc(%rsp), %ecx
incl %ecx
movq 0x68(%rsp), %r14
movq 0x618(%r14), %rax
movl %ebx, 0x4(%rax)
movl %ecx, 0xc(%rax)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x58c0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x58db
jmp 0x58db
movq %rax, %rbx
jmp 0x5927
movq %rax, %rbx
jmp 0x5948
jmp 0x58e2
movq %rax, %rbx
jmp 0x590b
movq %rax, %rbx
movq 0x66d7(%rip), %rsi      # 0xbfc8
leaq 0x208(%rsp), %rdi
callq 0x32a0
leaq 0x280(%rsp), %rdi
callq 0x30e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5927
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x669a(%rip), %rsi      # 0xbfc8
leaq 0x88(%rsp), %rdi
callq 0x32a0
leaq 0x100(%rsp), %rdi
callq 0x30e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5964
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3360