// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/weno3.c
// Function: WENO3
void WENO3(Real F[restrict][DIMU], Real Fhat[restrict])
{
    Real omega[R]; /* weights */
    Real q[R]; /* q vectors */
    Real IS[R]; /* smoothness measurements */
    Real alpha[R];
    const Real C[R] = {1.0 / 3.0, 2.0 / 3.0};
    const Real epsilon = 1.0e-6;
    for (int r = 0; r < DIMU; ++r) {
        IS[0] = Square(F[CN][r] - F[CN-1][r]);
        IS[1] = Square(F[CN+1][r] - F[CN][r]);
        alpha[0] = C[0] / Square(epsilon + IS[0]);
        alpha[1] = C[1] / Square(epsilon + IS[1]);
        omega[0] = alpha[0] / (alpha[0] + alpha[1]);
        omega[1] = alpha[1] / (alpha[0] + alpha[1]);
        q[0] = (1.0 / 2.0) * (-F[CN-1][r] + 3.0 * F[CN][r]);
        q[1] = (1.0 / 2.0) * (F[CN][r] + F[CN+1][r]);
        Fhat[r] = omega[0] * q[0] + omega[1] * q[1];
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x7a36(%rip), %rax      # 0x2ae70
movq %rax, -0x60(%rbp)
movq 0x7a33(%rip), %rax      # 0x2ae78
movq %rax, -0x58(%rbp)
movsd 0x430f(%rip), %xmm0     # 0x27760
movsd %xmm0, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
cmpl $0x5, -0x6c(%rbp)
jge 0x235f3
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movsd 0x28(%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
subsd (%rax,%rcx,8), %xmm0
callq 0x23600
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movsd 0x50(%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
subsd 0x28(%rax,%rcx,8), %xmm0
callq 0x23600
movsd %xmm0, -0x38(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd 0x429c(%rip), %xmm0     # 0x27760
addsd -0x40(%rbp), %xmm0
callq 0x23600
movaps %xmm0, %xmm1
movsd -0x80(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd 0x426f(%rip), %xmm0     # 0x27760
addsd -0x38(%rbp), %xmm0
callq 0x23600
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x50(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
addsd -0x48(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
addsd -0x48(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movsd 0x28(%rax,%rcx,8), %xmm1
movsd 0x78f2(%rip), %xmm2     # 0x2ae68
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x4182(%rip), %xmm0     # 0x27708
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movsd 0x28(%rax,%rcx,8), %xmm1
movq -0x8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
addsd 0x50(%rax,%rcx,8), %xmm1
movsd 0x4155(%rip), %xmm0     # 0x27708
mulsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm0
movsd -0x30(%rbp), %xmm2
movsd -0x18(%rbp), %xmm1
mulsd -0x28(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x2345d
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)