// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl 0x10(%rcx), %eax
jne 0x11127
jmp 0x117fd
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)
movl $0x0, -0x108(%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 0x30(%rax), %xmm0
movsd %xmm0, -0x190(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, -0x180(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, -0x1b0(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, -0x1a8(%rbp)
movq -0xf8(%rbp), %rax
movsd 0x58(%rax), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movq -0xf8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x1bc(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x1b8(%rbp)
movq -0xf8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x1b4(%rbp)
leaq -0x1e0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x200(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
movl $0x0, -0x224(%rbp)
movl $0x0, -0x228(%rbp)
movl $0x0, -0x22c(%rbp)
movl $0x0, -0x230(%rbp)
movl $0x0, -0x234(%rbp)
movl -0x234(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x117fb
leaq -0xf0(%rbp), %rdi
movl -0x234(%rbp), %r8d
addl $0x1, %r8d
movq -0x8(%rbp), %rax
movl 0x8(%rax), %r9d
movl $0xc8, %esi
leaq 0x16614(%rip), %rdx     # 0x2799d
leaq 0x1661d(%rip), %rcx     # 0x279ad
movb $0x0, %al
callq 0x20b0
leaq -0xf0(%rbp), %rdi
leaq 0x15ad7(%rip), %rsi     # 0x26e7c
callq 0xbf90
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
leaq 0x165f7(%rip), %rsi     # 0x279b9
movb $0x1, %al
callq 0x2140
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x1e0(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x1d8(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x1d0(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x200(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x1f8(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x1f0(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x234(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x30(%rax), %xmm0
movsd 0x16253(%rip), %xmm1    # 0x27710
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %edi
movl $0x1, %esi
callq 0x9660
movl %eax, -0x224(%rbp)
movsd -0x200(%rbp), %xmm0
subsd -0x1e0(%rbp), %xmm0
cvtsi2sdl -0x224(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x220(%rbp)
movsd -0x1f8(%rbp), %xmm0
subsd -0x1d8(%rbp), %xmm0
cvtsi2sdl -0x224(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x218(%rbp)
movsd -0x1f0(%rbp), %xmm0
subsd -0x1d0(%rbp), %xmm0
cvtsi2sdl -0x224(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x210(%rbp)
movl $0xffffffff, -0x108(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x238(%rbp)
movl -0x238(%rbp), %eax
cmpl -0x224(%rbp), %eax
jg 0x117de
movsd -0x1e0(%rbp), %xmm1
cvtsi2sdl -0x238(%rbp), %xmm0
movsd -0x220(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x170(%rbp), %xmm1
movsd -0x1b0(%rbp), %xmm2
movl -0x1bc(%rbp), %edi
callq 0x95b0
movl %eax, %edi
movl -0x14c(%rbp), %esi
movl -0x158(%rbp), %edx
callq 0x95f0
movl %eax, -0x228(%rbp)
movsd -0x1d8(%rbp), %xmm1
cvtsi2sdl -0x238(%rbp), %xmm0
movsd -0x218(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x168(%rbp), %xmm1
movsd -0x1a8(%rbp), %xmm2
movl -0x1b8(%rbp), %edi
callq 0x95b0
movl %eax, %edi
movl -0x148(%rbp), %esi
movl -0x154(%rbp), %edx
callq 0x95f0
movl %eax, -0x22c(%rbp)
movsd -0x1d0(%rbp), %xmm1
cvtsi2sdl -0x238(%rbp), %xmm0
movsd -0x210(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x160(%rbp), %xmm1
movsd -0x1a0(%rbp), %xmm2
movl -0x1b4(%rbp), %edi
callq 0x95b0
movl %eax, %edi
movl -0x144(%rbp), %esi
movl -0x150(%rbp), %edx
callq 0x95f0
movl %eax, -0x230(%rbp)
movl -0x230(%rbp), %edi
movl -0x22c(%rbp), %esi
movl -0x228(%rbp), %edx
movq -0xf8(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0xf8(%rbp), %rax
movl 0xc(%rax), %r8d
callq 0x9500
movl %eax, -0x104(%rbp)
movl -0x108(%rbp), %eax
cmpl -0x104(%rbp), %eax
jne 0x116a8
jmp 0x117ca
movl -0x104(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x228(%rbp), %edi
movsd -0x170(%rbp), %xmm0
movsd -0x190(%rbp), %xmm1
movl -0x1bc(%rbp), %esi
callq 0x9690
movsd %xmm0, -0x200(%rbp)
movl -0x22c(%rbp), %edi
movsd -0x168(%rbp), %xmm0
movsd -0x188(%rbp), %xmm1
movl -0x1b8(%rbp), %esi
callq 0x9690
movsd %xmm0, -0x1f8(%rbp)
movl -0x230(%rbp), %edi
movsd -0x160(%rbp), %xmm0
movsd -0x180(%rbp), %xmm1
movl -0x1b4(%rbp), %esi
callq 0x9690
movsd %xmm0, -0x1f0(%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
movsd -0x200(%rbp), %xmm0
movsd -0x1f8(%rbp), %xmm1
movsd -0x1f0(%rbp), %xmm2
movsd -0x140(%rbp), %xmm3
movsd -0x138(%rbp), %xmm4
movsd -0x130(%rbp), %xmm5
movsd -0x128(%rbp), %xmm6
movsd -0x120(%rbp), %xmm7
movsd -0x118(%rbp), %xmm8
leaq 0x1634a(%rip), %rsi     # 0x27b07
movsd %xmm8, (%rsp)
movb $0x8, %al
callq 0x2140
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x11555
movq -0x20(%rbp), %rdi
callq 0x2080
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x11350
jmp 0x117fd
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw %cs:(%rax,%rax)