// File: /workspace/github_c_makefile_star2_O1/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 0xa658(%rip), %rdx      # 0x1fcc0
movl $0x50, %esi
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0x76a7(%rip), %rsi      # 0x1cd28
movq %r15, %rdi
callq 0x9269
movq %rax, %rbp
leaq 0xaf7d(%rip), %rdi      # 0x20610
movl $0x16, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2200
leaq 0x230(%r12), %rdx
leaq 0xaf73(%rip), %rsi      # 0x20627
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2150
leaq 0xaf9d(%rip), %rdi      # 0x20662
movl $0xf, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
movsd 0x48(%r14), %xmm0
leaq 0xafab(%rip), %rsi      # 0x2068f
movq %rbp, %rdi
movb $0x1, %al
callq 0x2150
leaq 0xf0(%r12), %r13
leaq 0xafc2(%rip), %rsi      # 0x206bf
movq %rbp, %rdi
movq %rbx, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2150
leaq 0xaf5e(%rip), %rdi      # 0x20672
movl $0x10, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
leaq 0xaf56(%rip), %rdi      # 0x20683
movl $0xb, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
leaq 0xb396(%rip), %rdi      # 0x20adc
movl $0x5, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
movsd 0x48(%r14), %xmm0
leaq 0xaf76(%rip), %rsi      # 0x206db
movq %rbp, %rdi
movb $0x1, %al
callq 0x2150
movl 0x8(%r14), %edx
leaq 0xaf6e(%rip), %rsi      # 0x206e8
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2150
leaq 0xb399(%rip), %rdi      # 0x20b24
movl $0x4, %esi
movl $0x1, %edx
movq %rbp, %rcx
callq 0x2200
movq %rbp, %rdi
callq 0x2080
movl $0x50, %esi
movq %r15, %rdi
leaq 0xa50c(%rip), %rdx      # 0x1fcc0
movq %r12, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0x987a(%rip), %rsi      # 0x1f03f
movq %r15, %rdi
callq 0x9269
movq %rax, %r15
leaq 0xaf1c(%rip), %rsi      # 0x206f3
movq %rax, %rdi
callq 0x91c1
movsd 0x48(%r14), %xmm0
movq %r15, %rdi
leaq 0xaea0(%rip), %rsi      # 0x2068f
movb $0x1, %al
callq 0x2150
movq %r15, %rdi
leaq 0xaebf(%rip), %rsi      # 0x206bf
movq %rbx, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2150
movl $0x10, %esi
movl $0x1, %edx
leaq 0xae54(%rip), %rdi      # 0x20672
movq %r15, %rcx
callq 0x2200
movl $0xb, %esi
movl $0x1, %edx
leaq 0xae4c(%rip), %rdi      # 0x20683
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