// File: /workspace/github_cpp_makefile_star2_O1/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 0x63c2(%rip), %rdi      # 0xc627
callq 0x21c0
movq (%r14), %rdi
leaq 0x5f3e(%rip), %rsi      # 0xc1b2
callq 0x2170
movq %rax, %r14
testq %rax, %rax
je 0x63de
testl %r15d, %r15d
je 0x63ea
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 0x5efd(%rip), %r13      # 0xc1b4
movq %r13, %rsi
movb $0x1, %al
callq 0x2190
movsd 0x20(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2190
movq %r14, %rdi
leaq 0x5eda(%rip), %r13      # 0xc1b9
movq %r13, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2190
movl 0x14(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2190
movl 0x10(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2190
movsd 0x48(%rbx,%r12), %xmm0
movq %r14, %rdi
leaq 0x5e93(%rip), %r13      # 0xc1b4
movq %r13, %rsi
movb $0x1, %al
callq 0x2190
movsd 0x40(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2190
movsd 0x28(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2190
movsd 0x30(%rbx,%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x2190
movl (%rbx,%r12), %edx
movq %r14, %rdi
leaq 0x5e44(%rip), %r13      # 0xc1b9
movq %r13, %rsi
xorl %eax, %eax
callq 0x2190
movl 0x8(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2190
movl 0x4(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2190
movl 0x18(%rbx,%r12), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2190
movl 0xc(%rbx,%r12), %edx
movq %r14, %rdi
leaq 0x5df9(%rip), %rsi      # 0xc1bd
xorl %eax, %eax
callq 0x2190
addq $0x50, %r12
incl %r15d
cmpq %r12, -0x30(%rbp)
jne 0x62a6
jmp 0x63ea
leaq 0x627a(%rip), %rdi      # 0xc65f
callq 0x21c0
movq %r14, %rdi
callq 0x2140
leaq 0x624f(%rip), %rdi      # 0xc648
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c0