// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
movq -0x8(%rbp), %rcx
movl $0x50, %esi
leaq 0x12925(%rip), %rdx     # 0x284ec
movb $0x0, %al
callq 0x20b0
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
leaq 0x1129c(%rip), %rsi     # 0x26e7c
callq 0xbf90
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x130b0(%rip), %rsi     # 0x28ca4
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x130a6(%rip), %rsi     # 0x28cac
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x1314b(%rip), %rsi     # 0x28d63
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x13096(%rip), %rsi     # 0x28cc0
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x190, %rcx            # imm = 0x190
leaq 0x1307f(%rip), %rsi     # 0x28cca
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x13106(%rip), %rsi     # 0x28d63
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x1306c(%rip), %rsi     # 0x28cdb
movb $0x0, %al
callq 0x2140
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x288(%rcx), %eax
jge 0x15ce4
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x28c, %rdx            # imm = 0x28C
movslq -0x14(%rbp), %rax
imulq $0xa, %rax, %rax
addq %rax, %rdx
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %r8
addq $0x1e0, %r8             # imm = 0x1E0
movq -0x8(%rbp), %r9
addq $0x28c, %r9             # imm = 0x28C
movslq -0x14(%rbp), %rax
imulq $0xa, %rax, %rax
addq %rax, %r9
leaq 0x13013(%rip), %rsi     # 0x28ce5
movb $0x0, %al
callq 0x2140
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x15c7d
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x2f0(%rcx), %eax
jge 0x15d52
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x2f4, %rdx            # imm = 0x2F4
movslq -0x18(%rbp), %rax
imulq $0xa, %rax, %rax
addq %rax, %rdx
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %r8
addq $0x1e0, %r8             # imm = 0x1E0
movq -0x8(%rbp), %r9
addq $0x2f4, %r9             # imm = 0x2F4
movslq -0x18(%rbp), %rax
imulq $0xa, %rax, %rax
addq %rax, %r9
leaq 0x12fc8(%rip), %rsi     # 0x28d08
movb $0x0, %al
callq 0x2140
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x15ceb
movq -0x10(%rbp), %rdi
leaq 0x13006(%rip), %rsi     # 0x28d63
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x12fbc(%rip), %rsi     # 0x28d2b
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x12fb0(%rip), %rsi     # 0x28d31
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x12fab(%rip), %rsi     # 0x28d3e
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x12fc0(%rip), %rsi     # 0x28d65
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x12fcb(%rip), %rsi     # 0x28d82
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
leaq 0x12fd6(%rip), %rsi     # 0x28d9f
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rdi
callq 0x2080
addq $0x20, %rsp
popq %rbp
retq
nop