// File: 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
subq $0x30, %rsp
movq %rdx, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1151e(%rip), %rdi     # 0x1941c
movb $0x0, %al
callq 0x2040
movq -0x30(%rbp), %rdi
callq 0x2080
movq %rax, %rdi
leaq 0x11526(%rip), %rsi     # 0x1943e
callq 0x2190
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7f3b
leaq 0x11511(%rip), %rdi     # 0x19440
movb $0x0, %al
callq 0x2040
jmp 0x8155
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x8153
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x38(%rax), %xmm0
leaq 0x114f7(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x20(%rax), %xmm0
leaq 0x114d1(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
addl $0x1, %edx
leaq 0x114be(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %edx
leaq 0x1149a(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %edx
leaq 0x11476(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x48(%rax), %xmm0
leaq 0x1144b(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x40(%rax), %xmm0
leaq 0x11425(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x28(%rax), %xmm0
leaq 0x113ff(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movsd 0x30(%rax), %xmm0
leaq 0x113d9(%rip), %rsi     # 0x19464
movb $0x1, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
leaq 0x113bb(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
leaq 0x11397(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edx
leaq 0x11373(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %edx
leaq 0x1134f(%rip), %rsi     # 0x19469
movb $0x0, %al
callq 0x21c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %edx
leaq 0x1132f(%rip), %rsi     # 0x1946d
movb $0x0, %al
callq 0x21c0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7f42
jmp 0x8155
movq -0x20(%rbp), %rdi
callq 0x2160
leaq 0x1130c(%rip), %rdi     # 0x19471
movb $0x0, %al
callq 0x2040
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)