// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/data_probe.c
// Function: WritePointProbeData
void WritePointProbeData(const Time *time, const Space *space, const Model *model)
{
    if (0 == time->dataN[PROPT]) {
        return;
    }
    FILE *fp = NULL;
    String fname = {'\0'};
    const Partition *const part = &(space->part);
    const Node *const node = space->node;
    int idx = 0; /* linear array index math variable */
    Real Uo[DIMUo] = {0.0};
    const IntVec nMin = {part->ns[PHY][X][MIN], part->ns[PHY][Y][MIN], part->ns[PHY][Z][MIN]};
    const IntVec nMax = {part->ns[PHY][X][MAX], part->ns[PHY][Y][MAX], part->ns[PHY][Z][MAX]};
    const RealVec sMin = {part->domain[X][MIN], part->domain[Y][MIN], part->domain[Z][MIN]};
    const RealVec dd = {part->dd[X], part->dd[Y], part->dd[Z]};
    const IntVec ng = {part->ng[X], part->ng[Y], part->ng[Z]};
    RealVec p1 = {0.0};
    int i = 0, j = 0, k = 0;
    for (int n = 0; n < time->dataN[PROPT]; ++n) {
        snprintf(fname, sizeof(fname), "%s%03d.csv", "point_probe_", n + 1);
        fp = Fopen(fname, "a");
        if (0 == time->stepC) { /* initialization step */
            fprintf(fp, "# time, rho, u, v, w, p, T\n");
        }
        p1[X] = time->pp[n][0];
        p1[Y] = time->pp[n][1];
        p1[Z] = time->pp[n][2];
        i = ConfineSpace(MapNode(p1[X], sMin[X], dd[X], ng[X]), nMin[X], nMax[X]);
        j = ConfineSpace(MapNode(p1[Y], sMin[Y], dd[Y], ng[Y]), nMin[Y], nMax[Y]);
        k = ConfineSpace(MapNode(p1[Z], sMin[Z], dd[Z], ng[Z]), nMin[Z], nMax[Z]);
        idx = IndexNode(k, j, i, part->n[Y], part->n[X]);
        MapPrimitive(model->gamma, model->gasR, node[idx].U[TO], Uo);
        fprintf(fp, "%.6g, %.6g, %.6g, %.6g, %.6g, %.6g, %.6g\n",
                time->now, Uo[0], Uo[1], Uo[2], Uo[3], Uo[4], Uo[5]);
        fclose(fp);
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl 0xc(%rcx), %eax
jne 0x10cd7
jmp 0x110ef
movq $0x0, -0x20(%rbp)
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0xc8, %edx
callq 0x20d0
movq -0x10(%rbp), %rax
addq $0x28, %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x100(%rbp)
movl $0x0, -0x104(%rbp)
leaq -0x140(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x20d0
movq -0xf8(%rbp), %rax
movl 0x1a0(%rax), %eax
movl %eax, -0x14c(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1a8(%rax), %eax
movl %eax, -0x148(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1b0(%rax), %eax
movl %eax, -0x144(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1a4(%rax), %eax
movl %eax, -0x158(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1ac(%rax), %eax
movl %eax, -0x154(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1b4(%rax), %eax
movl %eax, -0x150(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x3c8(%rax), %xmm0
movsd %xmm0, -0x170(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x3d8(%rax), %xmm0
movsd %xmm0, -0x168(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x3e8(%rax), %xmm0
movsd %xmm0, -0x160(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, -0x190(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x58(%rax), %xmm0
movsd %xmm0, -0x180(%rbp)
movq -0xf8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x19c(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x198(%rbp)
movq -0xf8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x194(%rbp)
leaq -0x1c0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
movl $0x0, -0x1c4(%rbp)
movl $0x0, -0x1c8(%rbp)
movl $0x0, -0x1cc(%rbp)
movl $0x0, -0x1d0(%rbp)
movl -0x1d0(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x110ed
leaq -0xf0(%rbp), %rdi
movl -0x1d0(%rbp), %r8d
addl $0x1, %r8d
movl $0xc8, %esi
leaq 0x16aac(%rip), %rdx     # 0x27967
leaq 0x16ab0(%rip), %rcx     # 0x27972
movb $0x0, %al
callq 0x20b0
leaq -0xf0(%rbp), %rdi
leaq 0x16aa8(%rip), %rsi     # 0x2797f
callq 0xbf90
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl 0x8(%rcx), %eax
jne 0x10efd
movq -0x20(%rbp), %rdi
leaq 0x16a8b(%rip), %rsi     # 0x27981
movb $0x0, %al
callq 0x2140
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1d0(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x1c0(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1d0(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x1b8(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1d0(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x1b0(%rbp)
movsd -0x1c0(%rbp), %xmm0
movsd -0x170(%rbp), %xmm1
movsd -0x190(%rbp), %xmm2
movl -0x19c(%rbp), %edi
callq 0x95b0
movl %eax, %edi
movl -0x14c(%rbp), %esi
movl -0x158(%rbp), %edx
callq 0x95f0
movl %eax, -0x1c4(%rbp)
movsd -0x1b8(%rbp), %xmm0
movsd -0x168(%rbp), %xmm1
movsd -0x188(%rbp), %xmm2
movl -0x198(%rbp), %edi
callq 0x95b0
movl %eax, %edi
movl -0x148(%rbp), %esi
movl -0x154(%rbp), %edx
callq 0x95f0
movl %eax, -0x1c8(%rbp)
movsd -0x1b0(%rbp), %xmm0
movsd -0x160(%rbp), %xmm1
movsd -0x180(%rbp), %xmm2
movl -0x194(%rbp), %edi
callq 0x95b0
movl %eax, %edi
movl -0x144(%rbp), %esi
movl -0x150(%rbp), %edx
callq 0x95f0
movl %eax, -0x1cc(%rbp)
movl -0x1cc(%rbp), %edi
movl -0x1c8(%rbp), %esi
movl -0x1c4(%rbp), %edx
movq -0xf8(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0xf8(%rbp), %rax
movl 0xc(%rax), %r8d
callq 0x9500
movl %eax, -0x104(%rbp)
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd 0x48(%rax), %xmm1
movq -0x100(%rbp), %rdi
movslq -0x104(%rbp), %rax
imulq $0x88, %rax, %rax
addq %rax, %rdi
addq $0x10, %rdi
leaq -0x140(%rbp), %rsi
callq 0x9250
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd -0x140(%rbp), %xmm1
movsd -0x138(%rbp), %xmm2
movsd -0x130(%rbp), %xmm3
movsd -0x128(%rbp), %xmm4
movsd -0x120(%rbp), %xmm5
movsd -0x118(%rbp), %xmm6
leaq 0x16a4a(%rip), %rsi     # 0x27b13
movb $0x7, %al
callq 0x2140
movq -0x20(%rbp), %rdi
callq 0x2080
movl -0x1d0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d0(%rbp)
jmp 0x10e8a
jmp 0x110ef
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)