// File: /workspace/github_cpp_makefile_star2_O3/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 0x64cb(%rip), %rdi      # 0xc61f
callq 0x21b0
movq (%r14), %rdi
leaq 0x6047(%rip), %rsi      # 0xc1aa
callq 0x2160
movq %rax, %r14
testq %rax, %rax
je 0x62cd
testl %r15d, %r15d
je 0x62d9
movl %r15d, %eax
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
movq %rax, -0x30(%rbp)
movl $0x1, %r15d
xorl %r12d, %r12d
movsd 0x38(%rbx,%r12), %xmm0
movq %r14, %rdi
leaq 0x6006(%rip), %r13      # 0xc1ac
movq %r13, %rsi
movb $0x1, %al
callq 0x2180
movsd 0x20(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2180
movq %r14, %rdi
leaq 0x5fe3(%rip), %r13      # 0xc1b1
movq %r13, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2180
movl 0x14(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2180
movl 0x10(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2180
movsd 0x48(%rbx,%r12), %xmm0
movq %r14, %rdi
leaq 0x5f9c(%rip), %r13      # 0xc1ac
movq %r13, %rsi
movb $0x1, %al
callq 0x2180
movsd 0x40(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2180
movsd 0x28(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2180
movsd 0x30(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2180
movl (%rbx,%r12), %edx
movq %r14, %rdi
leaq 0x5f4d(%rip), %r13      # 0xc1b1
movq %r13, %rsi
xorl %eax, %eax
callq 0x2180
movl 0x8(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2180
movl 0x4(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2180
movl 0x18(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2180
movl 0xc(%rbx,%r12), %edx
movq %r14, %rdi
leaq 0x5f02(%rip), %rsi      # 0xc1b5
xorl %eax, %eax
callq 0x2180
addq $0x50, %r12
incl %r15d
cmpq %r12, -0x30(%rbp)
jne 0x6195
jmp 0x62d9
leaq 0x6383(%rip), %rdi      # 0xc657
callq 0x21b0
movq %r14, %rdi
callq 0x2130
leaq 0x6358(%rip), %rdi      # 0xc640
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21b0