// File: /workspace/github_c_makefile_star2_O2/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 0xd742(%rip), %rdx      # 0x1c334
pushq $0x50
popq %rsi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x20b0
leaq 0xc00f(%rip), %rsi      # 0x1ac18
movq %rbx, %rdi
callq 0x8820
movq %rax, %rbx
leaq 0xe1fb(%rip), %rdi      # 0x1ce16
pushq $0x7
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rax, %rcx
callq 0x2210
leaq 0xe1ea(%rip), %rdi      # 0x1ce1e
pushq $0x13
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2210
pushq $0xa
popq %rbp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xe1dc(%rip), %rdi      # 0x1ce32
pushq $0x9
popq %r12
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0x190(%r14), %rcx
leaq 0xe1c6(%rip), %rsi      # 0x1ce3c
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2160
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2100
leaq 0xe1b9(%rip), %rdi      # 0x1ce4d
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0x28c(%r14), %r12
leaq 0x1e0(%r14), %r15
leaq 0xe1a0(%rip), %r13      # 0x1ce57
xorl %ebp, %ebp
movslq 0x288(%r14), %rax
cmpq %rax, %rbp
jge 0xece7
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x2160
incq %rbp
addq $0xa, %r12
jmp 0xecb9
leaq 0x2f4(%r14), %r12
leaq 0xe185(%rip), %r13      # 0x1ce7a
xorl %ebp, %ebp
movslq 0x2f0(%r14), %rax
cmpq %rax, %rbp
jge 0xed25
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x2160
incq %rbp
addq $0xa, %r12
jmp 0xecf7
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2100
leaq 0xe166(%rip), %rdi      # 0x1ce9d
pushq $0x5
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0xe153(%rip), %rdi      # 0x1cea3
pushq $0xc
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0xe14b(%rip), %rdi      # 0x1ceb0
pushq $0x26
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0xe15d(%rip), %rdi      # 0x1ced7
pushq $0x1c
popq %r15
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0xe161(%rip), %rdi      # 0x1cef4
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2210
leaq 0xe169(%rip), %rdi      # 0x1cf11
pushq $0xe
popq %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2210
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2080