// File: /workspace/github_c_makefile_star2_O3/mohuangrui[P]ArtraCFD/ensight_writer.c
// Function: InitializeTransientCaseFile
static void InitializeTransientCaseFile(EnSet *enSet)
{
    snprintf(enSet->fname, sizeof(EnStr), "%s.case", enSet->rname);
    FILE *fp = Fopen(enSet->fname, "w");
    fprintf(fp, "FORMAT\n");
    fprintf(fp, "type: ensight gold\n");
    fprintf(fp, "\n");
    fprintf(fp, "GEOMETRY\n");
    fprintf(fp, "model: %s%s.geo\n", enSet->rname, enSet->gtag);
    fprintf(fp, "\n");
    fprintf(fp, "VARIABLE\n");
    for (int n = 0; n < enSet->scaN; ++n) {
        fprintf(fp, "scalar per node:  1  %3s  %s%s.%s\n",
                enSet->sca[n], enSet->rname, enSet->vtag, enSet->sca[n]);
    }
    for (int n = 0; n < enSet->vecN; ++n) {
        fprintf(fp, "vector per node:  1  %3s  %s%s.%s\n",
                enSet->vec[n], enSet->rname, enSet->vtag, enSet->vec[n]);
    }
    fprintf(fp, "\n");
    fprintf(fp, "TIME\n");
    fprintf(fp, "time set: 1\n");
    fprintf(fp, "number of steps:          0          \n");
    fprintf(fp, "filename start number:    0\n");
    fprintf(fp, "filename increment:       1\n");
    fprintf(fp, "time values:  ");
    fclose(fp);
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xa0(%rdi), %rbx
leaq 0xdd80(%rip), %rdx      # 0x1d454
movl $0x50, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0xc63b(%rip), %rsi      # 0x1bd28
movq %rbx, %rdi
callq 0x9026
movq %rax, %rbx
leaq 0xe837(%rip), %rdi      # 0x1df36
movl $0x7, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2200
leaq 0xe826(%rip), %rdi      # 0x1df3e
movl $0x13, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xe814(%rip), %rdi      # 0x1df52
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0x190(%r14), %rcx
leaq 0xe7fe(%rip), %rsi      # 0x1df5c
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2160
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xe7ee(%rip), %rdi      # 0x1df6d
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
cmpl $0x0, 0x288(%r14)
jle 0xf7de
leaq 0x28c(%r14), %r15
leaq 0x1e0(%r14), %r12
leaq 0xe7c7(%rip), %r13      # 0x1df77
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x2160
incq %rbp
movslq 0x288(%r14), %rax
addq $0xa, %r15
cmpq %rax, %rbp
jl 0xf7b2
cmpl $0x0, 0x2f0(%r14)
jle 0xf82b
leaq 0x2f4(%r14), %r15
leaq 0x1e0(%r14), %r12
leaq 0xe79d(%rip), %r13      # 0x1df9a
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x2160
incq %rbp
movslq 0x2f0(%r14), %rax
addq $0xa, %r15
cmpq %rax, %rbp
jl 0xf7ff
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xe77e(%rip), %rdi      # 0x1dfbd
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xe76b(%rip), %rdi      # 0x1dfc3
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xe75f(%rip), %rdi      # 0x1dfd0
movl $0x26, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xe76d(%rip), %rdi      # 0x1dff7
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xe771(%rip), %rdi      # 0x1e014
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xe775(%rip), %rdi      # 0x1e031
movl $0xe, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2080