// File: /workspace/github_c_makefile_star2_O2/mohuangrui[P]ArtraCFD/data_stream.c
// Function: ReadPolyStateData
void ReadPolyStateData(const int pm, const int pn, FILE *fp, Geometry *const geo)
{
    const char *fmtI = ParseFormat("%lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %d");
    const char *fmtJ = ParseFormat("%lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg, %lg");
    Polyhedron *poly  = NULL;
    const Real zero = 0.0;
    for (int n = pm; n < pn; ++n) {
        poly = geo->poly + n;
        Sread(fp, 16, fmtI,
                &(poly->O[X]), &(poly->O[Y]), &(poly->O[Z]), &(poly->r),
                &(poly->V[TO][X]), &(poly->V[TO][Y]), &(poly->V[TO][Z]),
                &(poly->W[TO][X]), &(poly->W[TO][Y]), &(poly->W[TO][Z]),
                &(poly->rho), &(poly->T), &(poly->cf),
                &(poly->area), &(poly->volume), &(poly->mid));
        Sread(fp, 16, fmtJ,
                &(poly->at[TO][X]), &(poly->at[TO][Y]), &(poly->at[TO][Z]),
                &(poly->ar[TO][X]), &(poly->ar[TO][Y]), &(poly->ar[TO][Z]),
                &(poly->at[TN][X]), &(poly->at[TN][Y]), &(poly->at[TN][Z]),
                &(poly->g[X]), &(poly->g[Y]), &(poly->g[Z]),
                &(poly->ar[TN][X]), &(poly->ar[TN][Y]), &(poly->ar[TN][Z]),
                &(poly->to));
        if (zero >= poly->to) {
            poly->to = FLT_MAX;
        }
        if (geo->sphN > n) {
            poly->faceN = 0; /* analytical polyhedron tag */
            poly->facet = NULL;
        }
        for (int s = 0; s < DIMS; ++s) {
            poly->V[TN][s] = poly->V[TO][s];
            poly->W[TN][s] = poly->W[TO][s];
        }
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, 0x40(%rsp)
movl %esi, %ebp
movl %edi, %r13d
leaq 0xf786(%rip), %rdi      # 0x1b94d
callq 0x8566
movq %rax, 0x50(%rsp)
leaq 0xf7c3(%rip), %rdi      # 0x1b99b
callq 0x8566
movq %rax, 0x48(%rsp)
movslq %r13d, %rcx
movslq %ebp, %rax
movq %rax, 0x60(%rsp)
imulq $0x238, %rcx, %rdx      # imm = 0x238
addq $0xc8, %rdx
movq %rbx, 0x58(%rsp)
cmpq 0x60(%rsp), %rcx
jge 0xc47d
movq %rdx, 0x68(%rsp)
movq 0x10(%rbx), %rbp
movq %rcx, 0x70(%rsp)
imulq $0x238, %rcx, %r15      # imm = 0x238
leaq (%r15,%rbp), %rcx
addq $0x20, %rcx
leaq 0x28(%rbp,%r15), %r8
leaq 0x30(%rbp,%r15), %r9
leaq 0x18(%rbp,%r15), %rax
movq %rax, 0x38(%rsp)
leaq 0x80(%rbp,%r15), %rax
movq %rax, 0x30(%rsp)
leaq 0x88(%rbp,%r15), %rax
movq %rax, 0x28(%rsp)
leaq 0x90(%rbp,%r15), %rax
movq %rax, 0x20(%rsp)
leaq 0xb0(%rbp,%r15), %rax
movq %rax, 0x18(%rsp)
leaq 0xb8(%rbp,%r15), %rax
movq %rax, 0x10(%rsp)
leaq 0xc0(%rbp,%r15), %rax
movq %rax, 0x8(%rsp)
leaq 0x1a8(%rbp,%r15), %r11
leaq 0x1b0(%rbp,%r15), %rbx
leaq 0x1b8(%rbp,%r15), %r14
leaq (%r15,%rbp), %r12
addq $0x1c0, %r12            # imm = 0x1C0
leaq (%r15,%rbp), %r13
addq $0x1c8, %r13            # imm = 0x1C8
leaq (%r15,%rbp), %r10
addq $0x10, %r10
subq $0x8, %rsp
movq 0x48(%rsp), %rdi
pushq $0x10
popq %rsi
movq 0x58(%rsp), %rdx
xorl %eax, %eax
pushq %r10
pushq %r13
pushq %r12
pushq %r14
pushq %rbx
pushq %r11
pushq 0x40(%rsp)
pushq 0x50(%rsp)
pushq 0x60(%rsp)
pushq 0x70(%rsp)
pushq 0x80(%rsp)
pushq 0x90(%rsp)
pushq 0xa0(%rsp)
callq 0x89d6
addq $0x70, %rsp
leaq (%r15,%rbp), %rcx
addq $0xe0, %rcx
leaq 0xe8(%rbp,%r15), %r8
leaq 0xf0(%rbp,%r15), %r9
leaq 0x128(%rbp,%r15), %rax
movq %rax, 0x38(%rsp)
leaq 0x130(%rbp,%r15), %rax
movq %rax, 0x30(%rsp)
leaq 0x138(%rbp,%r15), %rax
movq %rax, 0x28(%rsp)
leaq 0xf8(%rbp,%r15), %rax
movq %rax, 0x20(%rsp)
leaq 0x100(%rbp,%r15), %rax
movq %rax, 0x18(%rsp)
leaq 0x108(%rbp,%r15), %rax
movq %rax, 0x10(%rsp)
leaq 0x110(%rbp,%r15), %rax
movq %rax, 0x8(%rsp)
leaq 0x118(%rbp,%r15), %r14
leaq 0x120(%rbp,%r15), %r12
leaq 0x140(%rbp,%r15), %r13
leaq (%r15,%rbp), %r10
addq $0x148, %r10            # imm = 0x148
leaq (%r15,%rbp), %r11
addq $0x150, %r11            # imm = 0x150
leaq (%r15,%rbp), %rbx
addq $0x1a0, %rbx            # imm = 0x1A0
subq $0x8, %rsp
movq 0x48(%rsp), %rdi
pushq $0x10
popq %rsi
movq 0x50(%rsp), %rdx
xorl %eax, %eax
pushq %rbx
pushq %r11
pushq %r10
pushq %r13
pushq %r12
pushq %r14
pushq 0x40(%rsp)
pushq 0x50(%rsp)
pushq 0x60(%rsp)
pushq 0x70(%rsp)
pushq 0x80(%rsp)
pushq 0x90(%rsp)
pushq 0xa0(%rsp)
callq 0x89d6
addq $0x70, %rsp
xorpd %xmm0, %xmm0
ucomisd (%rbx), %xmm0
jb 0xc41e
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rax, (%rbx)
movq 0x58(%rsp), %rbx
movslq 0x4(%rbx), %rax
movq 0x70(%rsp), %rcx
cmpq %rax, %rcx
movq 0x68(%rsp), %rdx
jge 0xc445
addq %rbp, %r15
andl $0x0, (%r15)
andq $0x0, 0x230(%r15)
addq %rdx, %rbp
pushq $-0x18
popq %rax
testq %rax, %rax
je 0xc46e
movsd -0x30(%rbp,%rax), %xmm0
movsd (%rbp,%rax), %xmm1
movsd %xmm0, -0x18(%rbp,%rax)
movsd %xmm1, 0x18(%rbp,%rax)
addq $0x8, %rax
jmp 0xc44b
incq %rcx
addq $0x238, %rdx            # imm = 0x238
jmp 0xc200
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq