// File: /workspace/github_c_makefile_star2_O2/mohuangrui[P]ArtraCFD/paraview_writer.c
// Function: WriteCaseFile
static void WriteCaseFile(const Time *time, PvSet *pvSet)
{
    snprintf(pvSet->fname, sizeof(PvStr), "%s.pvd", pvSet->bname);
    FILE *fp = Fopen(pvSet->fname, "w");
    fprintf(fp, "<?xml version=\"1.0\"?>\n");
    fprintf(fp, "<VTKFile type=\"Collection\" version=\"1.0\" byte_order=\"%s\">\n", pvSet->byteOrder);
    fprintf(fp, "  <Collection>\n");
    fprintf(fp, "    <DataSet timestep=\"%.6g\" group=\"\" part=\"0\"\n", time->now);
    fprintf(fp, "             file=\"%s%s\"/>\n", pvSet->bname, pvSet->fext);
    fprintf(fp, "  </Collection>\n");
    fprintf(fp, "</VTKFile>\n");
    fprintf(fp, "<!--\n");
    fprintf(fp, "  Time %.6g\n", time->now);
    fprintf(fp, "  Step %d\n", time->stepC);
    fprintf(fp, "-->\n");
    fclose(fp);
    /* add case to the transient case */
    snprintf(pvSet->fname, sizeof(PvStr), "%s.pvd", pvSet->rname);
    fp = Fopen(pvSet->fname, "r+");
    /* seek the target line for adding information */
    WriteToLine(fp, "</Collection>");
    /* append informatiom */
    fprintf(fp, "    <DataSet timestep=\"%.6g\" group=\"\" part=\"0\"\n", time->now);
    fprintf(fp, "             file=\"%s%s\"/>\n", pvSet->bname, pvSet->fext);
    fprintf(fp, "  </Collection>\n");
    fprintf(fp, "</VTKFile>\n");
    fclose(fp);
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %r15
leaq 0xa0(%rsi), %r12
leaq 0x50(%rsi), %rbx
leaq 0x99d2(%rip), %rdx      # 0x1dba8
pushq $0x50
popq %rsi
movq %r12, %rdi
movq %rbx, %rcx
movq %rbx, (%rsp)
xorl %eax, %eax
callq 0x20b0
leaq 0x6a27(%rip), %rsi      # 0x1ac18
movq %r12, %rdi
callq 0x8820
movq %rax, %rbp
leaq 0xa2f5(%rip), %rdi      # 0x1e4f8
pushq $0x16
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rax, %rcx
callq 0x2210
leaq 0x230(%r13), %rdx
leaq 0xa2ec(%rip), %rsi      # 0x1e50f
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2160
leaq 0xa316(%rip), %rdi      # 0x1e54a
pushq $0xf
popq %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x2210
movsd 0x48(%r15), %xmm0
leaq 0xa328(%rip), %rsi      # 0x1e577
movq %rbp, %rdi
movb $0x1, %al
callq 0x2160
leaq 0xf0(%r13), %rcx
leaq 0xa340(%rip), %rsi      # 0x1e5a7
movq %rbp, %rdi
movq %rbx, %rdx
movq %rcx, %rbx
xorl %eax, %eax
callq 0x2160
leaq 0xa2dc(%rip), %rdi      # 0x1e55a
pushq $0x10
popq %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x2210
leaq 0xa2d8(%rip), %rdi      # 0x1e56b
pushq $0xb
popq %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x2210
leaq 0xa71c(%rip), %rdi      # 0x1e9c4
pushq $0x5
popq %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x2210
movsd 0x48(%r15), %xmm0
leaq 0xa300(%rip), %rsi      # 0x1e5c3
movq %rbp, %rdi
movb $0x1, %al
callq 0x2160
movl 0x8(%r15), %edx
leaq 0xa2f8(%rip), %rsi      # 0x1e5d0
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2160
leaq 0xa723(%rip), %rdi      # 0x1ea0c
pushq $0x4
popq %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x2210
movq %rbp, %rdi
callq 0x2080
movq %r12, %rdi
pushq $0x50
popq %rsi
leaq 0x989c(%rip), %rdx      # 0x1dba8
movq %r13, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0x8c92(%rip), %rsi      # 0x1cfaf
movq %r12, %rdi
callq 0x8820
movq %rax, %r12
leaq 0xa2ac(%rip), %rsi      # 0x1e5db
movq %rax, %rdi
callq 0x879f
movsd 0x48(%r15), %xmm0
movq %r12, %rdi
leaq 0xa230(%rip), %rsi      # 0x1e577
movb $0x1, %al
callq 0x2160
movq %r12, %rdi
leaq 0xa24f(%rip), %rsi      # 0x1e5a7
movq (%rsp), %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2160
leaq 0xa1ed(%rip), %rdi      # 0x1e55a
pushq $0x10
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2210
leaq 0xa1e9(%rip), %rdi      # 0x1e56b
pushq $0xb
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2210
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2080