// File: snesic[P]stochastic_thin_films/film.cpp
// Function: film::create_funcional_st(double*, double*, double*, double)
void film::create_funcional_st(double *r1, double *h1, double *h13, double theta1)
{
    double dx4dt=dt/(dx*dx*dx*dx);
    
    for(int i=0;i<L;i++)
    {
        r1[i]=h1[i] - dx4dt*theta1*(
                       0.5*( h13[i]+h13[ind[i+3]] ) * (h1[ind[i+4]]-3*h1[ind[i+3]]+3*h1[i]-h1[ind[i+1]])
                      -0.5*( h13[ind[i+1]]+h13[i] ) * (h1[ind[i+3]]-3*h1[i]+3*h1[ind[i+1]]-h1[ind[i]]  )
                       );
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movsd 0x10(%rax), %xmm0
movsd 0x8(%rax), %xmm1
mulsd 0x8(%rax), %xmm1
mulsd 0x8(%rax), %xmm1
mulsd 0x8(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x20(%rcx), %eax
jge 0x4cd1
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm1
movsd -0x30(%rbp), %xmm0
mulsd -0x28(%rbp), %xmm0
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm3
movq -0x20(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x3, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
addsd (%rax,%rdx,8), %xmm3
movsd 0x55e9(%rip), %xmm2     # 0xa120
mulsd %xmm3, %xmm2
movq -0x18(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x4, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movsd (%rax,%rdx,8), %xmm4
movq -0x18(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x3, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movsd (%rax,%rdx,8), %xmm3
movsd 0x55d3(%rip), %xmm5     # 0xa150
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm4
movsd 0x55ae(%rip), %xmm5     # 0xa148
mulsd %xmm5, %xmm4
addsd %xmm3, %xmm4
movq -0x18(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
subsd (%rax,%rdx,8), %xmm4
movq -0x20(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movsd (%rax,%rdx,8), %xmm5
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rdx
addsd (%rax,%rdx,8), %xmm5
movsd 0x552f(%rip), %xmm3     # 0xa120
mulsd %xmm5, %xmm3
movq -0x18(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x3, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movsd (%rax,%rdx,8), %xmm5
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm6
movsd 0x5529(%rip), %xmm7     # 0xa150
mulsd %xmm7, %xmm6
addsd %xmm5, %xmm6
movq -0x18(%rbp), %rax
movq 0x80(%rcx), %rdx
movl -0x34(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movsd (%rax,%rdx,8), %xmm5
movsd 0x54f4(%rip), %xmm7     # 0xa148
mulsd %xmm7, %xmm5
addsd %xmm6, %xmm5
movq -0x18(%rbp), %rax
movq 0x80(%rcx), %rcx
movslq -0x34(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
subsd (%rax,%rcx,8), %xmm5
mulsd %xmm5, %xmm3
movq %xmm3, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm3
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4ada
popq %rbp
retq
nopw %cs:(%rax,%rax)