// File: /workspace/github_c_makefile_star2_O2/mohuangrui[P]ArtraCFD/data_probe.c
// Function: WriteLineProbeData
void WriteLineProbeData(const Time *time, const Space *space, const Model *model)
{
    if (0 == time->dataN[PROLN]) {
        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 */
    int idxOld = 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 d = {part->d[X], part->d[Y], part->d[Z]};
    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};
    RealVec p2 = {0.0};
    RealVec dl = {0.0};
    int stepN = 0;
    int i = 0, j = 0, k = 0;
    for (int n = 0; n < time->dataN[PROLN]; ++n) {
        snprintf(fname, sizeof(fname), "%s%03d_%05d.csv", "line_probe_", n + 1, time->stepC);
        fp = Fopen(fname, "w");
        fprintf(fp, "# x, y, z, rho, u, v, w, p, T <time=%.6g>\n", time->now);
        p1[X] = time->lp[n][0];
        p1[Y] = time->lp[n][1];
        p1[Z] = time->lp[n][2];
        p2[X] = time->lp[n][3];
        p2[Y] = time->lp[n][4];
        p2[Z] = time->lp[n][5];
        stepN = MaxInt(time->lp[n][6] - 1, 1);
        dl[X] = (p2[X] - p1[X]) / (Real)(stepN);
        dl[Y] = (p2[Y] - p1[Y]) / (Real)(stepN);
        dl[Z] = (p2[Z] - p1[Z]) / (Real)(stepN);
        idxOld = -1; /* used to avoid repeating node for tiny step sizes */
        for (int m = 0; m <= stepN; ++m) {
            i = ConfineSpace(MapNode(p1[X] + m * dl[X], sMin[X], dd[X], ng[X]), nMin[X], nMax[X]);
            j = ConfineSpace(MapNode(p1[Y] + m * dl[Y], sMin[Y], dd[Y], ng[Y]), nMin[Y], nMax[Y]);
            k = ConfineSpace(MapNode(p1[Z] + m * dl[Z], sMin[Z], dd[Z], ng[Z]), nMin[Z], nMax[Z]);
            idx = IndexNode(k, j, i, part->n[Y], part->n[X]);
            if (idxOld == idx) {
                continue;
            }
            idxOld = idx; /* record */
            p2[X] = MapPoint(i, sMin[X], d[X], ng[X]);
            p2[Y] = MapPoint(j, sMin[Y], d[Y], ng[Y]);
            p2[Z] = MapPoint(k, sMin[Z], d[Z], ng[Z]);
            MapPrimitive(model->gamma, model->gasR, node[idx].U[TO], Uo);
            fprintf(fp, "%.6g, %.6g, %.6g, %.6g, %.6g, %.6g, %.6g, %.6g, %.6g\n",
                    p2[X], p2[Y], p2[Z], Uo[0], Uo[1], Uo[2], Uo[3], Uo[4], Uo[5]);
        }
        fclose(fp);
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdx, 0xc8(%rsp)
movq %rdi, 0x60(%rsp)
movl 0x10(%rdi), %ebx
testl %ebx, %ebx
je 0xb994
movq %rsi, %rbp
leaq 0x130(%rsp), %rdi
xorl %r14d, %r14d
movl $0xc8, %edx
xorl %esi, %esi
callq 0x20d0
movq (%rbp), %rax
movq %rax, 0xc0(%rsp)
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rax
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movl 0x1c8(%rbp), %eax
movl %eax, 0x54(%rsp)
movl 0x1d0(%rbp), %eax
movl %eax, 0x50(%rsp)
movl 0x1d8(%rbp), %eax
movl %eax, 0x4c(%rsp)
movl 0x1cc(%rbp), %eax
movl %eax, 0x48(%rsp)
movl 0x1d4(%rbp), %eax
movl %eax, 0x44(%rsp)
movl 0x1dc(%rbp), %eax
movl %eax, 0x40(%rsp)
movsd 0x3f0(%rbp), %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x400(%rbp), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x410(%rbp), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x58(%rbp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movsd 0x60(%rbp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0x68(%rbp), %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0x70(%rbp), %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0x78(%rbp), %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0x80(%rbp), %xmm0
movsd %xmm0, 0xe8(%rsp)
movl 0x40(%rbp), %eax
movl %eax, 0x1c(%rsp)
movl 0x44(%rbp), %eax
movl %eax, 0x18(%rsp)
movl 0x48(%rbp), %eax
movl %eax, 0x14(%rsp)
movslq %ebx, %rax
cmpq %rax, %r14
jge 0xb994
leaq 0x1(%r14), %r8
movq 0x60(%rsp), %rbx
movl 0x8(%rbx), %r9d
xorl %r12d, %r12d
movl $0xc8, %esi
leaq 0x130(%rsp), %r15
movq %r15, %rdi
leaq 0x10163(%rip), %rdx     # 0x1b7ad
leaq 0x1016c(%rip), %rcx     # 0x1b7bd
movq %r8, 0xa0(%rsp)
xorl %eax, %eax
callq 0x20b0
movq %r15, %rdi
leaq 0xf5ae(%rip), %rsi      # 0x1ac18
callq 0x8820
movsd 0x48(%rbx), %xmm0
movq %rax, 0x68(%rsp)
movq %rax, %rdi
leaq 0x10146(%rip), %rsi     # 0x1b7c9
movb $0x1, %al
callq 0x2160
movq 0x60(%rbx), %rax
imulq $0x38, %r14, %rcx
movsd (%rax,%rcx), %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x8(%rax,%rcx), %xmm0
movsd %xmm0, 0x78(%rsp)
movsd 0x10(%rax,%rcx), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x18(%rax,%rcx), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x20(%rax,%rcx), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rax,%rcx), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x30(%rax,%rcx), %xmm0
addsd 0xfdb6(%rip), %xmm0     # 0x1b4a0
cvttsd2si %xmm0, %edi
pushq $0x1
popq %rsi
callq 0x7649
movl %eax, 0x58(%rsp)
cvtsi2sd %eax, %xmm0
movsd 0x30(%rsp), %xmm2
subsd 0x80(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, 0x30(%rsp)
movsd 0x28(%rsp), %xmm2
subsd 0x78(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, 0x28(%rsp)
movsd 0x20(%rsp), %xmm2
subsd 0x70(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, 0x20(%rsp)
xorpd %xmm0, %xmm0
pushq $-0x1
popq %r14
cmpl 0x58(%rsp), %r12d
jg 0xb975
movl %r12d, 0x5c(%rsp)
movsd %xmm0, 0x38(%rsp)
mulsd 0x30(%rsp), %xmm0
addsd 0x80(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movsd 0xf8(%rsp), %xmm2
movl 0x1c(%rsp), %edi
callq 0x761c
movl %eax, %edi
movl 0x54(%rsp), %esi
movl 0x48(%rsp), %edx
callq 0x7633
movl %eax, %r12d
movsd 0x38(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
addsd 0x78(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
movsd 0xf0(%rsp), %xmm2
movl 0x18(%rsp), %edi
callq 0x761c
movl %eax, %edi
movl 0x50(%rsp), %esi
movl 0x44(%rsp), %edx
callq 0x7633
movl %eax, %r15d
movsd 0x38(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm0
addsd 0x70(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
movsd 0xe8(%rsp), %xmm2
movl 0x14(%rsp), %edi
callq 0x761c
movl %eax, %edi
movl 0x4c(%rsp), %esi
movl 0x40(%rsp), %edx
callq 0x7633
movl %eax, %r13d
movl 0x34(%rbp), %r8d
movq %rbp, %rbx
movl 0x38(%rbp), %ecx
movl %eax, %edi
movl %r15d, %esi
movl %r12d, %edx
callq 0x75ec
cmpl %eax, %r14d
je 0xb957
movl %eax, %ebp
movl %r12d, %edi
movsd 0x98(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
movl 0x1c(%rsp), %esi
callq 0x7651
movsd %xmm0, 0xe0(%rsp)
movl %r15d, %edi
movsd 0x90(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm1
movl 0x18(%rsp), %esi
callq 0x7651
movsd %xmm0, 0xd8(%rsp)
movl %r13d, %edi
movsd 0x88(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm1
movl 0x14(%rsp), %esi
callq 0x7651
movsd %xmm0, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd 0x48(%rax), %xmm1
movslq %ebp, %rax
imulq $0x88, %rax, %rax
movq 0xc0(%rsp), %rcx
leaq (%rcx,%rax), %rdi
addq $0x10, %rdi
leaq 0x100(%rsp), %rsi
callq 0x74af
movsd 0x100(%rsp), %xmm3
movsd 0x108(%rsp), %xmm4
movsd 0x110(%rsp), %xmm5
movsd 0x118(%rsp), %xmm6
movsd 0x120(%rsp), %xmm7
movsd 0x128(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x68(%rsp), %rdi
leaq 0xffe5(%rip), %rsi      # 0x1b917
movsd 0xe0(%rsp), %xmm0
movsd 0xd8(%rsp), %xmm1
movsd 0xd0(%rsp), %xmm2
movb $0x8, %al
callq 0x2160
movl %ebp, %r14d
movsd 0x38(%rsp), %xmm0
addsd 0xc6a3(%rip), %xmm0     # 0x18008
movl 0x5c(%rsp), %r12d
incl %r12d
movq %rbx, %rbp
jmp 0xb74b
movq 0x68(%rsp), %rdi
callq 0x2080
movq 0x60(%rsp), %rax
movl 0x10(%rax), %ebx
movq 0xa0(%rsp), %r14
jmp 0xb617
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq