// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rdi, %r14
leaq 0xa0(%rsi), %r15
leaq 0x50(%rsi), %rbx
leaq 0x99ea(%rip), %rdx      # 0x1ed50
movl $0x50, %esi
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0x69a9(%rip), %rsi      # 0x1bd28
movq %r15, %rdi
callq 0x9026
movq %rax, %rbp
leaq 0xa30f(%rip), %rdi      # 0x1f6a0
movl $0x16, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2200
leaq 0x230(%r12), %rdx
leaq 0xa305(%rip), %rsi      # 0x1f6b7
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2160
leaq 0xa32f(%rip), %rdi      # 0x1f6f2
movl $0xf, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
movsd 0x48(%r14), %xmm0
leaq 0xa33d(%rip), %rsi      # 0x1f71f
movq %rbp, %rdi
movb $0x1, %al
callq 0x2160
leaq 0xf0(%r12), %r13
leaq 0xa354(%rip), %rsi      # 0x1f74f
movq %rbp, %rdi
movq %rbx, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2160
leaq 0xa2f0(%rip), %rdi      # 0x1f702
movl $0x10, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
leaq 0xa2e8(%rip), %rdi      # 0x1f713
movl $0xb, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
leaq 0xa728(%rip), %rdi      # 0x1fb6c
movl $0x5, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
movsd 0x48(%r14), %xmm0
leaq 0xa308(%rip), %rsi      # 0x1f76b
movq %rbp, %rdi
movb $0x1, %al
callq 0x2160
movl 0x8(%r14), %edx
leaq 0xa300(%rip), %rsi      # 0x1f778
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2160
leaq 0xa72b(%rip), %rdi      # 0x1fbb4
movl $0x4, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
movq %rbp, %rdi
callq 0x2080
movl $0x50, %esi
movq %r15, %rdi
leaq 0x989e(%rip), %rdx      # 0x1ed50
movq %r12, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0x8c0c(%rip), %rsi      # 0x1e0cf
movq %r15, %rdi
callq 0x9026
movq %rax, %r15
leaq 0xa2ae(%rip), %rsi      # 0x1f783
movq %rax, %rdi
callq 0x8f7e
movsd 0x48(%r14), %xmm0
movq %r15, %rdi
leaq 0xa232(%rip), %rsi      # 0x1f71f
movb $0x1, %al
callq 0x2160
movq %r15, %rdi
leaq 0xa251(%rip), %rsi      # 0x1f74f
movq %rbx, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2160
movl $0x10, %esi
movl $0x1, %edx
leaq 0xa1e6(%rip), %rdi      # 0x1f702
movq %r15, %rcx
callq 0x2200
movl $0xb, %esi
movl $0x1, %edx
leaq 0xa1de(%rip), %rdi      # 0x1f713
movq %r15, %rcx
callq 0x2200
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2080