// File: /workspace/github_cpp_makefile_star2_O2/Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: writeSingleRecordToFile(Record*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void writeSingleRecordToFile(Record record[], const unsigned int recordPos, const string filePath)
{
	printf("Start writing records to file...\n");
	FILE* fp = fopen(filePath.c_str(), "w");
	if (!fp)
	{
		printf("Error writing record infomation!!!\n");
	}
	else
	{
		int i = 0;
		while (i < recordPos)
		{
			fprintf(fp, "%lf\t", record[i].ratioNumEdge);
			fprintf(fp, "%lf\t", record[i].runTime);
			fprintf(fp, "%d\t",  i + 1);
			fprintf(fp, "%d\t",  record[i].comPathSize);
			fprintf(fp, "%d\t",  record[i].numOfOutPriQueue);
			fprintf(fp, "%lf\t", record[i].referPathLength);
			fprintf(fp, "%lf\t", record[i].ratioPathLength);
			fprintf(fp, "%lf\t", record[i].currPathLength);
			fprintf(fp, "%lf\t", record[i].comPathLength);
			fprintf(fp, "%d\t",  record[i].numDFDCal);
			fprintf(fp, "%d\t",  record[i].numReferDiscrete);
			fprintf(fp, "%d\t",  record[i].numTemDiscrete);
			fprintf(fp, "%d\t",  record[i].referPathSize);
			fprintf(fp, "%d\n",  record[i].locationOfRefer);
			i++;
		}
	}
	fclose(fp);
	printf("Finish writing file!!!\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x562d(%rip), %rdi      # 0xa5f7
callq 0x21a0
movq (%r14), %rdi
leaq 0x51a9(%rip), %rsi      # 0xa182
callq 0x2130
movq %rax, %r14
testq %rax, %rax
je 0x5137
movl %r15d, %eax
imulq $0x50, %rax, %rax
movq %rax, -0x30(%rbp)
pushq $0x1
popq %r12
xorl %r15d, %r15d
cmpq %r15, -0x30(%rbp)
je 0x5143
movsd 0x38(%rbx,%r15), %xmm0
movq %r14, %rdi
leaq 0x516d(%rip), %r13      # 0xa184
movq %r13, %rsi
movb $0x1, %al
callq 0x2170
movsd 0x20(%rbx,%r15), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2170
movq %r14, %rdi
leaq 0x514a(%rip), %r13      # 0xa189
movq %r13, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2170
movl 0x14(%rbx,%r15), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movl 0x10(%rbx,%r15), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movsd 0x48(%rbx,%r15), %xmm0
movq %r14, %rdi
leaq 0x5103(%rip), %r13      # 0xa184
movq %r13, %rsi
movb $0x1, %al
callq 0x2170
movsd 0x40(%rbx,%r15), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2170
movsd 0x28(%rbx,%r15), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2170
movsd 0x30(%rbx,%r15), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2170
movl (%rbx,%r15), %edx
movq %r14, %rdi
leaq 0x50b4(%rip), %r13      # 0xa189
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movl 0x8(%rbx,%r15), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movl 0x4(%rbx,%r15), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movl 0x18(%rbx,%r15), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movl 0xc(%rbx,%r15), %edx
movq %r14, %rdi
leaq 0x5069(%rip), %rsi      # 0xa18d
xorl %eax, %eax
callq 0x2170
addq $0x50, %r15
incl %r12d
jmp 0x4ffc
leaq 0x54f1(%rip), %rdi      # 0xa62f
callq 0x21a0
movq %r14, %rdi
callq 0x2100
leaq 0x54c6(%rip), %rdi      # 0xa618
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21a0