// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
movq -0x10(%rbp), %rcx
addq $0x50, %rcx
movl $0x50, %esi
leaq 0xbd79(%rip), %rdx      # 0x29ac8
movb $0x0, %al
callq 0x20b0
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
leaq 0x9114(%rip), %rsi      # 0x26e7c
callq 0xbf90
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0xc69c(%rip), %rsi      # 0x2a418
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x230, %rdx            # imm = 0x230
leaq 0xc696(%rip), %rsi      # 0x2a42f
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xc6bf(%rip), %rsi      # 0x2a46a
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
leaq 0xc6d1(%rip), %rsi      # 0x2a497
movb $0x1, %al
callq 0x2140
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x50, %rdx
movq -0x10(%rbp), %rcx
addq $0xf0, %rcx
leaq 0xc6dc(%rip), %rsi      # 0x2a4c7
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xc67d(%rip), %rsi      # 0x2a47a
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xc67c(%rip), %rsi      # 0x2a48b
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xcac3(%rip), %rsi      # 0x2a8e4
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
leaq 0xc6a7(%rip), %rsi      # 0x2a4e3
movb $0x1, %al
callq 0x2140
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0xc69b(%rip), %rsi      # 0x2a4f0
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xcac5(%rip), %rsi      # 0x2a92c
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
callq 0x2080
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
movq -0x10(%rbp), %rcx
movl $0x50, %esi
leaq 0xbc36(%rip), %rdx      # 0x29ac8
movb $0x0, %al
callq 0x20b0
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
leaq 0xaf92(%rip), %rsi      # 0x28e3d
callq 0xbf90
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0xc63c(%rip), %rsi      # 0x2a4fb
callq 0xbee0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
leaq 0xc5bf(%rip), %rsi      # 0x2a497
movb $0x1, %al
callq 0x2140
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x50, %rdx
movq -0x10(%rbp), %rcx
addq $0xf0, %rcx
leaq 0xc5ca(%rip), %rsi      # 0x2a4c7
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xc56b(%rip), %rsi      # 0x2a47a
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
leaq 0xc56a(%rip), %rsi      # 0x2a48b
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rdi
callq 0x2080
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)