// File: /workspace/github_c_makefile_star2_O2/mohuangrui[P]ArtraCFD/diffusive_flux.c
// Function: ComputeFvhatY
static void ComputeFvhatY(const int tn, const int k, const int j, const int i,
        const int partn[restrict], const Real dd[restrict], const Node *const node,
        const Model *model, Real Fvhat[restrict])
{
    const int idx = IndexNode(k, j, i, partn[Y], partn[X]);
    const int idxW = IndexNode(k, j, i - 1, partn[Y], partn[X]);
    const int idxE = IndexNode(k, j, i + 1, partn[Y], partn[X]);
    const int idxF = IndexNode(k - 1, j, i, partn[Y], partn[X]);
    const int idxB = IndexNode(k + 1, j, i, partn[Y], partn[X]);

    const int idxN = IndexNode(k, j + 1, i, partn[Y], partn[X]);
    const int idxWN = IndexNode(k, j + 1, i - 1, partn[Y], partn[X]);
    const int idxEN = IndexNode(k, j + 1, i + 1, partn[Y], partn[X]);
    const int idxFN = IndexNode(k - 1, j + 1, i, partn[Y], partn[X]);
    const int idxBN = IndexNode(k + 1, j + 1, i, partn[Y], partn[X]);

    const Real *restrict U = node[idx].U[tn];
    const Real u = U[1] / U[0];
    const Real v = U[2] / U[0];
    const Real w = U[3] / U[0];
    const Real T = ComputeTemperature(model->cv, U);

    U = node[idxW].U[tn];
    const Real uW = U[1] / U[0];
    const Real vW = U[2] / U[0];

    U = node[idxE].U[tn];
    const Real uE = U[1] / U[0];
    const Real vE = U[2] / U[0];

    U = node[idxF].U[tn];
    const Real vF = U[2] / U[0];
    const Real wF = U[3] / U[0];

    U = node[idxB].U[tn];
    const Real vB = U[2] / U[0];
    const Real wB = U[3] / U[0];

    U = node[idxN].U[tn];
    const Real uN = U[1] / U[0];
    const Real vN = U[2] / U[0];
    const Real wN = U[3] / U[0];
    const Real TN = ComputeTemperature(model->cv, U);

    U = node[idxWN].U[tn];
    const Real uWN = U[1] / U[0];
    const Real vWN = U[2] / U[0];

    U = node[idxEN].U[tn];
    const Real uEN = U[1] / U[0];
    const Real vEN = U[2] / U[0];

    U = node[idxFN].U[tn];
    const Real vFN = U[2] / U[0];
    const Real wFN = U[3] / U[0];

    U = node[idxBN].U[tn];
    const Real vBN = U[2] / U[0];
    const Real wBN = U[3] / U[0];

    const Real dv_dx = 0.25 * (vE + vEN - vW - vWN) * dd[X];
    const Real du_dy = (uN - u) * dd[Y];
    const Real dv_dy = (vN - v) * dd[Y];
    const Real du_dx = 0.25 * (uE + uEN - uW - uWN) * dd[X];
    const Real dw_dz = 0.25 * (wB + wBN - wF - wFN) * dd[Z];
    const Real dv_dz = 0.25 * (vB + vBN - vF - vFN) * dd[Z];
    const Real dw_dy = (wN - w) * dd[Y];
    const Real dT_dy = (TN - T) * dd[Y];

    /* calculate interfacial values */
    const Real uhat = 0.5 * (u + uN);
    const Real vhat = 0.5 * (v + vN);
    const Real what = 0.5 * (w + wN);
    const Real That = 0.5 * (T + TN);
    const Real mu = model->refMu * Viscosity(That * model->refT);
    const Real heatK = model->gamma * model->cv * mu / PrandtlNumber();
    const Real divV = du_dx + dv_dy + dw_dz;

    Fvhat[0] = 0.0;
    Fvhat[1] = mu * (dv_dx + du_dy);
    Fvhat[2] = mu * (dv_dy + dv_dy - (2.0/3.0) * divV);
    Fvhat[3] = mu * (dv_dz + dw_dy);
    Fvhat[4] = heatK * dT_dy + Fvhat[1] * uhat + Fvhat[2] * vhat + Fvhat[3] * what;
    return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x60(%rsp)
movl %ecx, %r13d
movl %edx, %ebx
movl %esi, %r12d
movl %edi, 0x30(%rsp)
movl (%r8), %ebp
movl 0x4(%r8), %r14d
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, (%rsp)
leal -0x1(%r13), %edx
movl %edx, 0x18(%rsp)
movl %r12d, %edi
movl %ebx, %esi
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x28(%rsp)
leal 0x1(%r13), %edx
movl %edx, 0x58(%rsp)
movl %r12d, %edi
movl %ebx, %esi
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x20(%rsp)
leal -0x1(%r12), %edi
movl %edi, 0x50(%rsp)
movl %ebx, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x10(%rsp)
leal 0x1(%r12), %r15d
movl %r15d, %edi
movl %ebx, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x8(%rsp)
incl %ebx
movl %r12d, %edi
movl %ebx, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x38(%rsp)
movl %r12d, %edi
movl %ebx, %esi
movl 0x18(%rsp), %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x40(%rsp)
movl %r12d, %edi
movl %ebx, %esi
movl 0x58(%rsp), %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, 0x48(%rsp)
movl 0x50(%rsp), %edi
movl %ebx, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, %r12d
movl %r15d, %edi
movl %ebx, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x75ec
movl %eax, %ebp
movslq (%rsp), %rax
movslq 0x30(%rsp), %rcx
imulq $0x88, %rax, %rax
movq 0xd0(%rsp), %r15
addq %r15, %rax
imulq $0x28, %rcx, %rbx
leaq (%rbx,%rax), %rdi
addq $0x10, %rdi
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x50(%rsp)
movsd 0x10(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x58(%rsp)
movsd 0x18(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq 0xd8(%rsp), %r14
movsd 0x50(%r14), %xmm0
callq 0x752b
movsd %xmm0, 0x18(%rsp)
movslq 0x28(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm0
movsd 0x18(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rsp)
movsd 0x20(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x88(%rsp)
movslq 0x20(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm0
movsd 0x18(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x68(%rsp)
movsd 0x20(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rsp)
movslq 0x10(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm0
movsd 0x20(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x90(%rsp)
movsd 0x28(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movslq 0x8(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm0
movsd 0x20(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x78(%rsp)
movsd 0x28(%rbx,%rax), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movslq 0x38(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
leaq (%rbx,%rax), %rdi
addq $0x10, %rdi
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x10(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd 0x18(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rsp)
movsd 0x50(%r14), %xmm0
callq 0x752b
movslq 0x40(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm1
movsd 0x18(%rbx,%rax), %xmm2
divsd %xmm1, %xmm2
movsd 0x20(%rbx,%rax), %xmm3
divsd %xmm1, %xmm3
movslq 0x48(%rsp), %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm1
movsd 0x18(%rbx,%rax), %xmm4
divsd %xmm1, %xmm4
addsd 0x68(%rsp), %xmm4
subsd 0x80(%rsp), %xmm4
subsd %xmm2, %xmm4
movapd %xmm4, %xmm8
movsd 0x20(%rbx,%rax), %xmm2
divsd %xmm1, %xmm2
addsd 0x70(%rsp), %xmm2
subsd 0x88(%rsp), %xmm2
subsd %xmm3, %xmm2
movslq %r12d, %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm1
movsd 0x20(%rbx,%rax), %xmm3
divsd %xmm1, %xmm3
movsd 0x28(%rbx,%rax), %xmm4
divsd %xmm1, %xmm4
movslq %ebp, %rax
imulq $0x88, %rax, %rax
addq %r15, %rax
movsd 0x10(%rbx,%rax), %xmm5
movsd 0x20(%rbx,%rax), %xmm1
divsd %xmm5, %xmm1
addsd 0x78(%rsp), %xmm1
subsd 0x90(%rsp), %xmm1
subsd %xmm3, %xmm1
movsd 0x28(%rbx,%rax), %xmm3
divsd %xmm5, %xmm3
addsd 0x8(%rsp), %xmm3
subsd 0x10(%rsp), %xmm3
subsd %xmm4, %xmm3
movapd %xmm3, %xmm10
movsd 0xe9e4(%rip), %xmm4     # 0x1ba30
mulsd %xmm4, %xmm2
movq 0x60(%rsp), %rax
movsd (%rax), %xmm5
movsd 0x8(%rax), %xmm3
mulsd %xmm5, %xmm2
movsd 0x20(%rsp), %xmm7
movapd %xmm7, %xmm9
movsd 0x50(%rsp), %xmm6
subsd %xmm6, %xmm9
mulsd %xmm3, %xmm9
addsd %xmm2, %xmm9
movsd %xmm9, 0x48(%rsp)
mulsd %xmm4, %xmm8
mulsd %xmm5, %xmm8
movsd %xmm8, 0x40(%rsp)
movsd 0x28(%rsp), %xmm8
movapd %xmm8, %xmm2
movsd 0x58(%rsp), %xmm5
subsd %xmm5, %xmm2
mulsd %xmm3, %xmm2
movsd %xmm2, 0x10(%rsp)
mulsd %xmm4, %xmm10
mulsd %xmm4, %xmm1
movsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm10
movsd %xmm10, 0x8(%rsp)
mulsd %xmm2, %xmm1
movsd 0x30(%rsp), %xmm4
movapd %xmm4, %xmm9
movsd (%rsp), %xmm2
subsd %xmm2, %xmm9
mulsd %xmm3, %xmm9
addsd %xmm1, %xmm9
movsd %xmm9, 0x60(%rsp)
movapd %xmm0, %xmm9
movsd 0x18(%rsp), %xmm1
subsd %xmm1, %xmm9
mulsd %xmm3, %xmm9
movsd %xmm9, 0x38(%rsp)
addsd %xmm6, %xmm7
movapd %xmm8, %xmm3
addsd %xmm5, %xmm3
addsd %xmm2, %xmm4
addsd %xmm1, %xmm0
movsd 0xe379(%rip), %xmm1     # 0x1b4b0
mulsd %xmm1, %xmm7
movsd %xmm7, 0x20(%rsp)
mulsd %xmm1, %xmm3
movsd %xmm3, 0x28(%rsp)
mulsd %xmm1, %xmm4
movsd %xmm4, 0x30(%rsp)
mulsd %xmm1, %xmm0
movsd 0x38(%r14), %xmm1
movsd %xmm1, (%rsp)
mulsd 0x70(%r14), %xmm0
callq 0x7478
mulsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x40(%r14), %xmm1
mulsd 0x50(%r14), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
callq 0x74a6
movsd 0x18(%rsp), %xmm1
divsd %xmm0, %xmm1
mulsd 0x38(%rsp), %xmm1
movapd %xmm1, %xmm3
movsd 0x40(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
addsd %xmm2, %xmm0
addsd 0x8(%rsp), %xmm0
movq 0xe0(%rsp), %rax
andq $0x0, (%rax)
movsd 0x48(%rsp), %xmm1
movsd (%rsp), %xmm4
mulsd %xmm4, %xmm1
movsd %xmm1, 0x8(%rax)
addsd %xmm2, %xmm2
mulsd 0xe84e(%rip), %xmm0     # 0x1ba38
addsd %xmm2, %xmm0
movapd %xmm4, %xmm2
mulsd %xmm4, %xmm0
movsd %xmm0, 0x10(%rax)
mulsd 0x60(%rsp), %xmm2
movsd %xmm2, 0x18(%rax)
mulsd 0x20(%rsp), %xmm1
addsd %xmm3, %xmm1
mulsd 0x28(%rsp), %xmm0
addsd %xmm1, %xmm0
mulsd 0x30(%rsp), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, 0x20(%rax)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq