// File: /workspace/github_c_makefile_star2_O1/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 0xe975(%rip), %rdx      # 0x1e3c4
movl $0x50, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0xd2c0(%rip), %rsi      # 0x1cd28
movq %rbx, %rdi
callq 0x9269
movq %rax, %rbx
leaq 0xf42c(%rip), %rdi      # 0x1eea6
movl $0x7, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2200
leaq 0xf41b(%rip), %rdi      # 0x1eeae
movl $0x13, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xf409(%rip), %rdi      # 0x1eec2
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0x190(%r14), %rcx
leaq 0xf3f3(%rip), %rsi      # 0x1eecc
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2150
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xf3e3(%rip), %rdi      # 0x1eedd
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
cmpl $0x0, 0x288(%r14)
jle 0xfb59
leaq 0x28c(%r14), %r15
leaq 0x1e0(%r14), %r12
leaq 0xf3bc(%rip), %r13      # 0x1eee7
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 0x2150
incq %rbp
movslq 0x288(%r14), %rax
addq $0xa, %r15
cmpq %rax, %rbp
jl 0xfb2d
cmpl $0x0, 0x2f0(%r14)
jle 0xfba6
leaq 0x2f4(%r14), %r15
leaq 0x1e0(%r14), %r12
leaq 0xf392(%rip), %r13      # 0x1ef0a
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 0x2150
incq %rbp
movslq 0x2f0(%r14), %rax
addq $0xa, %r15
cmpq %rax, %rbp
jl 0xfb7a
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xf373(%rip), %rdi      # 0x1ef2d
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xf360(%rip), %rdi      # 0x1ef33
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xf354(%rip), %rdi      # 0x1ef40
movl $0x26, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xf362(%rip), %rdi      # 0x1ef67
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xf366(%rip), %rdi      # 0x1ef84
movl $0x1c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
leaq 0xf36a(%rip), %rdi      # 0x1efa1
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