// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/paraview_reader.c
// Function: ReadStructuredData
static void ReadStructuredData(Space *space, const Model *model, PvSet *pvSet)
{
    snprintf(pvSet->fname, sizeof(PvStr), "%s%s", pvSet->bname, pvSet->fext);
    FILE *fp = Fopen(pvSet->fname, "r");
    PvReal data = 0.0; /* paraview scalar data */
    const char *fmtI = ParseFormat("%lg");
    const Partition *const part = &(space->part);
    Node *const node = space->node;
    Real *restrict U = NULL;
    int idx = 0; /* linear array index math variable */
    /* get rid of redundant lines */
    ReadInLine(fp, "<PointData>");
    for (int s = 0; s < pvSet->scaN; ++s) {
        Sread(fp, 0, "");
        for (int k = part->ns[PAL][Z][MIN]; k < part->ns[PAL][Z][MAX]; ++k) {
            for (int j = part->ns[PAL][Y][MIN]; j < part->ns[PAL][Y][MAX]; ++j) {
                for (int i = part->ns[PAL][X][MIN]; i < part->ns[PAL][X][MAX]; ++i) {
                    idx = IndexNode(k, j, i, part->n[Y], part->n[X]);
                    if (0 == s) {
                        /* geometric field initializer */
                        node[idx].did = NONE;
                        node[idx].fid = NONE;
                        node[idx].lid = NONE;
                        node[idx].gst = NONE;
                        memset(node[idx].U, 1, DIMT * sizeof(*node[idx].U));
                        if (InPartBox(k, j, i, part->ns[PIN])) {
                            node[idx].did = 0;
                            node[idx].fid = 0;
                            node[idx].lid = 0;
                            node[idx].gst = 0;
                        }
                    }
                    if (!InPartBox(k, j, i, part->ns[PIO])) {
                        continue;
                    }
                    /* data field initializer */
                    U = node[idx].U[TO];
                    Fscanf(fp, 1, fmtI, &data);
                    switch (s) {
                        case 0: /* rho */
                            U[0] = data;
                            break;
                        case 1: /* u */
                            U[1] = U[0] * data;
                            break;
                        case 2: /* v */
                            U[2] = U[0] * data;
                            break;
                        case 3: /* w */
                            U[3] = U[0] * data;
                            break;
                        case 4: /* p */
                            U[4] = 0.5 * (U[1] * U[1] + U[2] * U[2] + U[3] * U[3]) / U[0] +
                                data / (model->gamma - 1.0);
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        Sread(fp, 0, ""); /* get rid of the end of line of data */
        Sread(fp, 0, "");
    }
    fclose(fp);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
movq -0x18(%rbp), %rcx
addq $0x50, %rcx
movq -0x18(%rbp), %r8
addq $0xf0, %r8
movl $0x50, %esi
leaq 0xca36(%rip), %rdx      # 0x29ad4
movb $0x0, %al
callq 0x20b0
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
leaq 0xa70c(%rip), %rsi      # 0x277c3
callq 0xbf90
movq %rax, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
leaq 0xab07(%rip), %rdi      # 0x27bd6
callq 0xbbc0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x20(%rbp), %rdi
leaq 0xc9d0(%rip), %rsi      # 0x29ad9
callq 0xbe50
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x280(%rcx), %eax
jge 0x1d49a
movq -0x20(%rbp), %rdi
xorl %esi, %esi
leaq 0xbc2f(%rip), %rdx      # 0x28d64
movb $0x0, %al
callq 0xc1e0
movq -0x38(%rbp), %rax
movl 0x1c8(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x1cc(%rcx), %eax
jge 0x1d464
movq -0x38(%rbp), %rax
movl 0x1c0(%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x1c4(%rcx), %eax
jge 0x1d454
movq -0x38(%rbp), %rax
movl 0x1b8(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x1d444
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl -0x5c(%rbp), %edx
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
movl 0xc(%rax), %r8d
callq 0x9500
movl %eax, -0x4c(%rbp)
xorl %eax, %eax
cmpl -0x50(%rbp), %eax
jne 0x1d2cf
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rdi
movslq -0x4c(%rbp), %rax
imulq $0x88, %rax, %rax
addq %rax, %rdi
addq $0x10, %rdi
movl $0x1, %esi
movl $0x78, %edx
callq 0x20d0
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl -0x5c(%rbp), %edx
movq -0x38(%rbp), %rcx
addq $0x68, %rcx
callq 0x9530
cmpl $0x0, %eax
je 0x1d2cd
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
jmp 0x1d2cf
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl -0x5c(%rbp), %edx
movq -0x38(%rbp), %rcx
addq $0x68, %rcx
callq 0x9530
cmpl $0x0, %eax
jne 0x1d2ef
jmp 0x1d436
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rdx
movq %rdx, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rdx,8), %rcx
leaq 0x10(%rax,%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rdx
xorl %eax, %eax
movl $0x1, %esi
leaq -0x28(%rbp), %rcx
callq 0xc040
movl -0x50(%rbp), %eax
movq %rax, -0x68(%rbp)
subq $0x4, %rax
ja 0x1d432
movq -0x68(%rbp), %rax
leaq 0xbe8d(%rip), %rcx      # 0x291cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd -0x28(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x1d434
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
mulsd -0x28(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x1d434
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
mulsd -0x28(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0x10(%rax)
jmp 0x1d434
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
mulsd -0x28(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0x18(%rax)
jmp 0x1d434
movq -0x48(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x48(%rbp), %rax
movsd 0x8(%rax), %xmm2
movq -0x48(%rbp), %rax
movsd 0x10(%rax), %xmm1
movq -0x48(%rbp), %rax
mulsd 0x10(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x48(%rbp), %rax
movsd 0x18(%rax), %xmm1
movq -0x48(%rbp), %rax
movsd 0x18(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0xa30f(%rip), %xmm0     # 0x27708
mulsd %xmm1, %xmm0
movq -0x48(%rbp), %rax
divsd (%rax), %xmm0
movsd -0x28(%rbp), %xmm1
movq -0x10(%rbp), %rax
movsd 0x40(%rax), %xmm2
movsd 0xa2f5(%rip), %xmm3     # 0x27710
subsd %xmm3, %xmm2
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0x20(%rax)
jmp 0x1d434
jmp 0x1d434
jmp 0x1d436
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1d189
jmp 0x1d446
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1d169
jmp 0x1d456
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1d149
movq -0x20(%rbp), %rdi
xorl %esi, %esi
leaq 0xb8f3(%rip), %rdx      # 0x28d64
movb $0x0, %al
callq 0xc1e0
movq -0x20(%rbp), %rdi
xorl %esi, %esi
leaq 0xb8df(%rip), %rdx      # 0x28d64
movb $0x0, %al
callq 0xc1e0
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1d115
movq -0x20(%rbp), %rdi
callq 0x2080
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)