// File: Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: writeContinuousRecordToFile(Record*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double)
void writeContinuousRecordToFile(Record record[], const unsigned int recordPos, const string filePath, double totalRunTime)
{
	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", totalRunTime);
			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\n", record[i].comPathLength);
			i++;
		}
	}
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdx, -0x38(%rbp)
movq %rdi, %rax
movq -0x38(%rbp), %rdi
movq %rax, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
callq 0x2080
movq %rax, %rdi
leaq 0x1128c(%rip), %rsi     # 0x1943e
callq 0x2190
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x81d5
leaq 0x11277(%rip), %rdi     # 0x19440
movb $0x0, %al
callq 0x2040
jmp 0x832d
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x832b
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x38(%rax), %xmm0
leaq 0x1125d(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
leaq 0x11246(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %edx
addl $0x1, %edx
leaq 0x11233(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %edx
leaq 0x1120f(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %edx
leaq 0x111eb(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x48(%rax), %xmm0
leaq 0x111c0(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x40(%rax), %xmm0
leaq 0x1119a(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x28(%rax), %xmm0
leaq 0x11174(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x30(%rax), %xmm0
leaq 0x117fe(%rip), %rsi     # 0x19b14
movb $0x1, %al
callq 0x21c0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x81dc
jmp 0x832d
movq -0x28(%rbp), %rdi
callq 0x2160
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)