// File: /workspace/github_cpp_makefile_star2_O1/wenleix[P]EdgePPR/src/PPRCommon.cpp
// Function: ReadVector(double*, int, char const*, char const*)
void ReadVector(double *pprValue, int allocSize, const char* filename, const char* suffix) {
	char fullname[1000];
	sprintf(fullname, "%s.%s", filename, suffix);

	if (strcmp(suffix, "txt") == 0) {
		FILE *f = fopen(fullname, "r");
		int numRead = -1;
		int size = 0;
		numRead = fscanf(f, "%d", &size);
		assert(numRead == 1 && size == allocSize);
		for (int i = 0; i < size; i++) {
			numRead = fscanf(f, "%lf", &pprValue[i]);
			assert(numRead == 1);
		}
	} else if (strcmp(suffix, "bin") == 0) {
		FILE *f = fopen(fullname, "rb");
		int numRead;
		int size;
		numRead = fread(&size, sizeof(int), 1, f);
		assert(numRead == 1);
		assert(allocSize == size);
		numRead = fread(pprValue, sizeof(double), size, f);
		assert(numRead == size);
	} else {
		assert(false);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x1d6a(%rip), %rsi      # 0x54cc
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x2050
leaq 0x1978(%rip), %rsi      # 0x50ed
movq %r14, %rdi
callq 0x21d0
testl %eax, %eax
je 0x3819
leaq 0x195d(%rip), %rsi      # 0x50e9
movq %r14, %rdi
callq 0x21d0
testl %eax, %eax
jne 0x38c2
leaq 0x1dab(%rip), %rsi      # 0x554e
leaq 0x10(%rsp), %rdi
callq 0x2190
movq %rax, %r14
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x21f0
cmpl $0x1, %eax
jne 0x38e1
movslq 0xc(%rsp), %r15
cmpl %ebp, %r15d
jne 0x3900
movl $0x8, %esi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x21f0
cmpl %eax, %r15d
je 0x3893
leaq 0x1d62(%rip), %rdi      # 0x5563
leaq 0x1cec(%rip), %rsi      # 0x54f4
leaq 0x1cf7(%rip), %rcx      # 0x5506
movl $0xaf, %edx
callq 0x20d0
leaq 0x18c7(%rip), %rsi      # 0x50e7
leaq 0x10(%rsp), %rdi
callq 0x2190
movq %rax, %r14
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x1801(%rip), %rsi      # 0x5040
movq %rax, %rdi
xorl %eax, %eax
callq 0x2280
cmpl $0x1, %eax
jne 0x391f
cmpl %ebp, 0xc(%rsp)
jne 0x391f
cmpl $0x0, 0xc(%rsp)
jle 0x3893
leaq 0x18ee(%rip), %r15      # 0x5158
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2280
cmpl $0x1, %eax
jne 0x38a3
incq %r12
movslq 0xc(%rsp), %rax
addq $0x8, %rbx
cmpq %rax, %r12
jl 0x386d
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c97(%rip), %rdi      # 0x5541
leaq 0x1c43(%rip), %rsi      # 0x54f4
leaq 0x1c4e(%rip), %rcx      # 0x5506
movl $0xa5, %edx
callq 0x20d0
leaq 0x1caa(%rip), %rdi      # 0x5573
leaq 0x1c24(%rip), %rsi      # 0x54f4
leaq 0x1c2f(%rip), %rcx      # 0x5506
movl $0xb1, %edx
callq 0x20d0
leaq 0x1c59(%rip), %rdi      # 0x5541
leaq 0x1c05(%rip), %rsi      # 0x54f4
leaq 0x1c10(%rip), %rcx      # 0x5506
movl $0xac, %edx
callq 0x20d0
leaq 0x1c4a(%rip), %rdi      # 0x5551
leaq 0x1be6(%rip), %rsi      # 0x54f4
leaq 0x1bf1(%rip), %rcx      # 0x5506
movl $0xad, %edx
callq 0x20d0
leaq 0x1bac(%rip), %rdi      # 0x54d2
leaq 0x1bc7(%rip), %rsi      # 0x54f4
leaq 0x1bd2(%rip), %rcx      # 0x5506
movl $0xa2, %edx
callq 0x20d0