// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/plot.c
// Function: solve_inv_gauss
void solve_inv_gauss(double* observations[2], int obscount, double meanstart, double meanend, double stdevstart, double stdevend, double* mean, double* stdev)
{
 /*!Last Changed 27.10.2004*/
 int i, j, k;
 double sum, m, s, mdiff, sdiff, power, bestsum = +LONG_MAX;
 mdiff = (meanend - meanstart) / DIVISIONS;
 sdiff = (stdevend - stdevstart) / DIVISIONS;
 for (i = 0; i < DIVISIONS; i++)
   for (j = 1; j < DIVISIONS; j++)
    {
     sum = 0;
     m = meanstart + mdiff * i;
     s = stdevstart + sdiff * j;
     for (k = 0; k < obscount; k++)
      {
       power = observations[1][k] - 1 + s * sqrt(2 * PI) * gaussian(observations[0][k], m, s);
       sum += power * power;
      }
     if (sum < bestsum)
      {
       bestsum = sum;
       *mean = m;
       *stdev = s;
      }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm2, -0x28(%rbp)
movsd %xmm3, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movsd 0x680ea(%rip), %xmm0    # 0xe2fb0
movsd %xmm0, -0x88(%rbp)
movsd -0x20(%rbp), %xmm0
subsd -0x18(%rbp), %xmm0
movsd 0x67b60(%rip), %xmm1    # 0xe2a40
divsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x30(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
movsd 0x67b45(%rip), %xmm1    # 0xe2a40
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x64, -0x44(%rbp)
jge 0x7b092
movl $0x1, -0x48(%rbp)
cmpl $0x64, -0x48(%rbp)
jge 0x7b082
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x18(%rbp), %xmm1
movsd -0x70(%rbp), %xmm0
cvtsi2sdl -0x44(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x28(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
cvtsi2sdl -0x48(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x7b038
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x67086(%rip), %xmm1    # 0xe2018
subsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd 0x6c6fd(%rip), %xmm0    # 0xe76b0
callq 0x42a0
movaps %xmm0, %xmm1
movsd -0xa0(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x4c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x60(%rbp), %xmm1
movsd -0x68(%rbp), %xmm2
callq 0xc2650
movsd -0x98(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x90(%rbp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd -0x80(%rbp), %xmm2
movsd -0x58(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x7af6d
movsd -0x58(%rbp), %xmm1
movsd -0x88(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7b072
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x60(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x68(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x7b074
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x7af1c
jmp 0x7b084
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x7af0b
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)