// File: /workspace/github_cpp_makefile_star2_O2/wenleix[P]EdgePPR/src/CreateObjGraph.cpp
// Function: readNewPaper(_IO_FILE*)
Publication* readNewPaper(FILE* file) {
    if (fgets(lineBuf, MaxLineLen, file) == NULL)
        return NULL;

    Publication *p = new Publication();
    p->title = string(ParseAttrLine(lineBuf, "Title"));
    p->id = atoi(ParseNextLine(file, "ID"));
    p->authors = string(ParseNextLine(file, "Authors"));
    p->year = atoi(ParseNextLine(file, "Year"));
    p->forum = string(ParseNextLine(file, "Conf"));		//	TODO: hmm
    p->refs.resize(atoi(ParseNextLine(file, "NumRef")));

    istringstream iss(ParseNextLine(file, "Refs"));
    for (int i = 0; i < p->refs.size(); i++) {
    	iss >> p->refs[i];
//        assert((iss >> p->refs[i]) != NULL);
    }

    assert(fgets(lineBuf, MaxLineLen, file) != NULL);
    lineBuf[strlen(lineBuf) - 1] = 0;   //  Delete the last '\n'
    assert(lineBuf[0] == 0);

    char yearbuf[100];
    sprintf(yearbuf, "@%d", p->year);
    p->conf = p->forum + yearbuf;

    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %r14
leaq 0x5a67(%rip), %rdi      # 0x8170
movl $0xf4240, %esi          # imm = 0xF4240
movq %r14, %rdx
callq 0x2200
testq %rax, %rax
je 0x295e
movl $0xa8, %edi
callq 0x2170
movq %rax, %rbx
movl $0xa8, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20f0
movq %rbx, %rdi
callq 0x342a
leaq 0x5a26(%rip), %rdi      # 0x8170
leaq 0x29d8(%rip), %rsi      # 0x5129
callq 0x2644
leaq 0x88(%rsp), %r15
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x2070
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2190
movq %r15, %rdi
callq 0x20b0
leaq 0x29a7(%rip), %rsi      # 0x512f
movq %r14, %rdi
callq 0x26a4
movq %rax, %rdi
callq 0x21f0
movl %eax, 0x88(%rbx)
leaq 0x298d(%rip), %rsi      # 0x5132
movq %r14, %rdi
callq 0x26a4
leaq 0x88(%rsp), %r15
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x2070
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x2190
movq %r15, %rdi
callq 0x20b0
leaq 0x295a(%rip), %rsi      # 0x513a
movq %r14, %rdi
callq 0x26a4
movq %rax, %rdi
callq 0x21f0
movl %eax, 0x40(%rbx)
leaq 0x2945(%rip), %rsi      # 0x513f
movq %r14, %rdi
callq 0x26a4
leaq 0x88(%rsp), %r12
leaq 0x20(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x2070
leaq 0x48(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x2190
movq %r12, %rdi
callq 0x20b0
leaq 0x90(%rbx), %r12
leaq 0x2905(%rip), %rsi      # 0x5144
movq %r14, %rdi
callq 0x26a4
movq %rax, %rdi
callq 0x21f0
movslq %eax, %rsi
movq %r12, %rdi
callq 0x347e
leaq 0x28ea(%rip), %rsi      # 0x514b
movq %r14, %rdi
callq 0x26a4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x2070
leaq 0x88(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x2240
leaq 0x20(%rsp), %rdi
callq 0x20b0
xorl %r13d, %r13d
leaq 0x88(%rsp), %r12
xorl %ebp, %ebp
movq 0x90(%rbx), %rsi
movq 0x98(%rbx), %rax
subq %rsi, %rax
sarq $0x2, %rax
cmpq %rbp, %rax
jbe 0x28d3
addq %r13, %rsi
movq %r12, %rdi
callq 0x2100
incq %rbp
addq $0x4, %r13
jmp 0x28a5
leaq 0x5896(%rip), %r12      # 0x8170
movq %r12, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
movq %r14, %rdx
callq 0x2200
testq %rax, %rax
je 0x2975
movq %r12, %rdi
callq 0x2090
movb $0x0, -0x1(%rax,%r12)
cmpb $0x0, 0x5868(%rip)      # 0x8170
jne 0x298e
movl 0x40(%rbx), %edx
leaq 0x286a(%rip), %rsi      # 0x5182
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2030
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x34af
movq %rbx, %rdi
addq $0x68, %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x2190
movq %r14, %rdi
callq 0x20b0
leaq 0x88(%rsp), %rdi
callq 0x20c0
jmp 0x2960
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x275a(%rip), %rdi      # 0x50d6
leaq 0x26ab(%rip), %rsi      # 0x502e
leaq 0x27c6(%rip), %rcx      # 0x5150
pushq $0x78
jmp 0x29a5
leaq 0x27dd(%rip), %rdi      # 0x5172
leaq 0x2692(%rip), %rsi      # 0x502e
leaq 0x27ad(%rip), %rcx      # 0x5150
pushq $0x7a
popq %rdx
callq 0x2110
jmp 0x29c1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x29d1
movq %rax, %rbx
jmp 0x29d1
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2250