#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double DBL_EPSILON;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
scalar_t__ log10(double);
scalar_t__ malloc(int);
scalar_t__ sqrt(double);
int /*<<< orphan*/ stderr;
void stub1(double *, double *, int, int, void *);
void stub2(double *, double *, int, int, void *);
void stub3(double *, double *, int, int, void *);
void dlevmar_chkjac(void (*func)(double *p, double *hx, int m, int n,
                                 void *adata),
                    void (*jacf)(double *p, double *j, int m, int n,
                                 void *adata),
                    double *p, int m, int n, void *adata, double *err) {
  double factor = (100.0);
  double one = (1.0);
  double zero = (0.0);
  double *fvec, *fjac, *pp, *fvecp, *buf;
  register int i, j;
  double eps, epsf, temp, epsmch;
  double epslog;
  int fvec_sz = n, fjac_sz = n * m, pp_sz = m, fvecp_sz = n;
  epsmch = DBL_EPSILON;
  eps = (double)sqrt(epsmch);
  buf =
      (double *)malloc((fvec_sz + fjac_sz + pp_sz + fvecp_sz) * sizeof(double));
  if (!buf) {
    fprintf(stderr, "dlevmar_chkjac"
                    "(): memory allocation request failed\n");
    exit(1);
  }
  fvec = buf;
  fjac = fvec + fvec_sz;
  pp = fjac + fjac_sz;
  fvecp = pp + pp_sz;
  (*func)(p, fvec, m, n, adata);
  (*jacf)(p, fjac, m, n, adata);
  for (j = 0; j < m; ++j) {
    temp = eps * (((p[j]) >= 0.0) ? (p[j]) : -(p[j]));
    if (temp == zero)
      temp = eps;
    pp[j] = p[j] + temp;
  }
  (*func)(pp, fvecp, m, n, adata);
  epsf = factor * epsmch;
  epslog = (double)log10(eps);
  for (i = 0; i < n; ++i)
    err[i] = zero;
  for (j = 0; j < m; ++j) {
    temp = (((p[j]) >= 0.0) ? (p[j]) : -(p[j]));
    if (temp == zero)
      temp = one;
    for (i = 0; i < n; ++i)
      err[i] += temp * fjac[i * m + j];
  }
  for (i = 0; i < n; ++i) {
    temp = one;
    if (fvec[i] != zero && fvecp[i] != zero &&
        (((fvecp[i] - fvec[i]) >= 0.0) ? (fvecp[i] - fvec[i])
                                       : -(fvecp[i] - fvec[i])) >=
            epsf * (((fvec[i]) >= 0.0) ? (fvec[i]) : -(fvec[i])))
      temp = eps *
             ((((fvecp[i] - fvec[i]) / eps - err[i]) >= 0.0)
                  ? ((fvecp[i] - fvec[i]) / eps - err[i])
                  : -((fvecp[i] - fvec[i]) / eps - err[i])) /
             ((((fvec[i]) >= 0.0) ? (fvec[i]) : -(fvec[i])) +
              (((fvecp[i]) >= 0.0) ? (fvecp[i]) : -(fvecp[i])));
    err[i] = one;
    if (temp > epsmch && temp < eps)
      err[i] = ((double)log10(temp) - epslog) / epslog;
    if (temp >= eps)
      err[i] = zero;
  }
  free(buf);
  return;
}


x86 assembly (clang, -O0):
<dlevmar_chkjac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movsd  0xe7a(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe65(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x1c(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    0x2e11(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x9c(%rbp),%eax
add    -0xa0(%rbp),%eax
add    -0xa4(%rbp),%eax
add    -0xa8(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    124d <dlevmar_chkjac+0xed>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
lea    0xdd2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x68(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x9c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0xa0(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0xa4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   *%rax
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   *%rax
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13b9 <dlevmar_chkjac+0x259>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     131b <dlevmar_chkjac+0x1bb>
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1347 <dlevmar_chkjac+0x1e7>
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x40(%rbp),%xmm0
jne    1389 <dlevmar_chkjac+0x229>
jp     1389 <dlevmar_chkjac+0x229>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    12ce <dlevmar_chkjac+0x16e>
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   *%rax
movsd  -0x30(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1060 <log10@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    142d <dlevmar_chkjac+0x2cd>
movsd  -0x40(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1401 <dlevmar_chkjac+0x2a1>
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1542 <dlevmar_chkjac+0x3e2>
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1474 <dlevmar_chkjac+0x314>
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    14a0 <dlevmar_chkjac+0x340>
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x40(%rbp),%xmm0
jne    14d6 <dlevmar_chkjac+0x376>
jp     14d6 <dlevmar_chkjac+0x376>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    152f <dlevmar_chkjac+0x3cf>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x50(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    14dd <dlevmar_chkjac+0x37d>
jmp    1534 <dlevmar_chkjac+0x3d4>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1434 <dlevmar_chkjac+0x2d4>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1956 <dlevmar_chkjac+0x7f6>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    1585 <dlevmar_chkjac+0x425>
jp     1585 <dlevmar_chkjac+0x425>
jmp    18b0 <dlevmar_chkjac+0x750>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    15a8 <dlevmar_chkjac+0x448>
jp     15a8 <dlevmar_chkjac+0x448>
jmp    18b0 <dlevmar_chkjac+0x750>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     15f6 <dlevmar_chkjac+0x496>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    162f <dlevmar_chkjac+0x4cf>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1680 <dlevmar_chkjac+0x520>
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
jmp    16ac <dlevmar_chkjac+0x54c>
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     18b0 <dlevmar_chkjac+0x750>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1751 <dlevmar_chkjac+0x5f1>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
jmp    179c <dlevmar_chkjac+0x63c>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     17ec <dlevmar_chkjac+0x68c>
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1818 <dlevmar_chkjac+0x6b8>
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     185c <dlevmar_chkjac+0x6fc>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
jmp    1888 <dlevmar_chkjac+0x728>
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  -0x108(%rbp),%xmm1
ff
movsd  -0x110(%rbp),%xmm2
ff
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x90(%rbp),%xmm0
ff
jbe    191e <dlevmar_chkjac+0x7be>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    191e <dlevmar_chkjac+0x7be>
movsd  -0x88(%rbp),%xmm0
ff
call   1060 <log10@plt>
cvtsi2sd %rax,%xmm0
subsd  -0x98(%rbp),%xmm0
ff
divsd  -0x98(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x78(%rbp),%xmm0
jb     1943 <dlevmar_chkjac+0x7e3>
movsd  -0x40(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1948 <dlevmar_chkjac+0x7e8>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1549 <dlevmar_chkjac+0x3e9>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlevmar_chkjac>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,0x20(%rsp)
mov    %r8d,%r15d
mov    %ecx,%r13d
mov    %rdx,%r12
mov    %rsi,0x18(%rsp)
mov    %rdi,0x50(%rsp)
mov    0xb0(%rsp),%rbx
mov    %r8d,%ebp
imul   %ecx,%ebp
mov    0x2e3d(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,0x38(%rsp)
call   1080 <sqrt@plt>
mov    %rax,%r14
lea    0x0(%rbp,%r13,1),%eax
lea    (%rax,%r15,2),%edi
shl    $0x3,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     1803 <dlevmar_chkjac+0x693>
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
movapd %xmm0,0x40(%rsp)
movslq %r15d,%rcx
mov    %rcx,0x30(%rsp)
lea    (%rax,%rcx,8),%r14
movslq %ebp,%rcx
mov    %rcx,0x28(%rsp)
lea    (%r14,%rcx,8),%rcx
mov    %rcx,0x60(%rsp)
mov    %r13,0x8(%rsp)
movslq %r13d,%r13
lea    (%rcx,%r13,8),%rcx
mov    %rcx,0x68(%rsp)
mov    %r12,%rdi
mov    %rax,0x10(%rsp)
mov    %rax,%rsi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    0x20(%rsp),%rbp
mov    %rbp,%r8
call   *0x50(%rsp)
mov    %r12,%rdi
mov    %r14,0x70(%rsp)
mov    %r14,%rsi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %rbp,%r8
call   *0x18(%rsp)
mov    0x28(%rsp),%r11
mov    0x60(%rsp),%rdi
mov    0x30(%rsp),%r10
movapd 0x40(%rsp),%xmm10
mov    0x8(%rsp),%r9
mov    %r9d,%r14d
test   %r13d,%r13d
jle    14be <dlevmar_chkjac+0x34e>
cmp    $0x4,%r9d
jb     129c <dlevmar_chkjac+0x12c>
lea    (%r10,%r11,1),%rcx
lea    (%r12,%r14,8),%rax
cmp    %rax,%rdi
mov    0x10(%rsp),%rdx
jae    13da <dlevmar_chkjac+0x26a>
lea    (%rcx,%r14,1),%rax
lea    (%rdx,%rax,8),%rax
cmp    %r12,%rax
jbe    13da <dlevmar_chkjac+0x26a>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
test   $0x1,%r14b
je     12fd <dlevmar_chkjac+0x18d>
movsd  (%r12,%rax,8),%xmm0
movapd 0xd48(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
xorpd  %xmm3,%xmm3
cmpnlesd %xmm0,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
mulsd  %xmm10,%xmm3
cmpeqsd %xmm3,%xmm2
movapd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm10,%xmm2
orpd   %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rdi,%rax,8)
or     $0x1,%rax
add    %r14,%rcx
je     14be <dlevmar_chkjac+0x34e>
lea    (%r10,%r11,1),%rcx
mov    0x10(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
add    $0x8,%rcx
movapd 0xce1(%rip),%xmm0
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r12,%rax,8),%xmm2
movapd %xmm2,%xmm3
xorpd  %xmm0,%xmm3
xorpd  %xmm4,%xmm4
cmpnlesd %xmm2,%xmm4
andpd  %xmm4,%xmm3
andnpd %xmm2,%xmm4
orpd   %xmm3,%xmm4
mulsd  %xmm10,%xmm4
movapd %xmm4,%xmm3
cmpeqsd %xmm1,%xmm3
movapd %xmm3,%xmm5
andnpd %xmm4,%xmm5
andpd  %xmm10,%xmm3
orpd   %xmm5,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,-0x8(%rcx,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm2
movapd %xmm2,%xmm3
xorpd  %xmm0,%xmm3
xorpd  %xmm4,%xmm4
cmpnlesd %xmm2,%xmm4
andpd  %xmm4,%xmm3
andnpd %xmm2,%xmm4
orpd   %xmm3,%xmm4
mulsd  %xmm10,%xmm4
movapd %xmm4,%xmm3
cmpeqsd %xmm1,%xmm3
movapd %xmm3,%xmm5
andnpd %xmm4,%xmm5
andpd  %xmm10,%xmm3
orpd   %xmm5,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,(%rcx,%rax,8)
add    $0x2,%rax
cmp    %rax,%r14
jne    1330 <dlevmar_chkjac+0x1c0>
jmp    14be <dlevmar_chkjac+0x34e>
mov    %r14d,%eax
and    $0xfffffffc,%eax
movapd %xmm10,%xmm2
unpcklpd %xmm10,%xmm2
lea    (%rdx,%rcx,8),%rcx
add    $0x10,%rcx
lea    0x0(,%r14,8),%rdx
and    $0xffffffffffffffe0,%rdx
xor    %esi,%esi
xorpd  %xmm8,%xmm8
movapd 0xbf2(%rip),%xmm9
xchg   %ax,%ax
movupd (%r12,%rsi,1),%xmm4
movupd 0x10(%r12,%rsi,1),%xmm1
xorpd  %xmm6,%xmm6
cmpnlepd %xmm4,%xmm6
xorpd  %xmm5,%xmm5
cmpnlepd %xmm1,%xmm5
movapd %xmm4,%xmm7
xorpd  %xmm9,%xmm7
movapd %xmm1,%xmm3
xorpd  %xmm9,%xmm3
andpd  %xmm6,%xmm7
andnpd %xmm4,%xmm6
orpd   %xmm7,%xmm6
andpd  %xmm5,%xmm3
andnpd %xmm1,%xmm5
orpd   %xmm3,%xmm5
mulpd  %xmm2,%xmm6
mulpd  %xmm2,%xmm5
movapd %xmm6,%xmm3
cmpeqpd %xmm8,%xmm3
movapd %xmm5,%xmm7
cmpeqpd %xmm8,%xmm7
movapd %xmm2,%xmm0
andpd  %xmm3,%xmm0
andnpd %xmm6,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm2,%xmm0
andpd  %xmm7,%xmm0
andnpd %xmm5,%xmm7
orpd   %xmm0,%xmm7
addpd  %xmm4,%xmm3
addpd  %xmm1,%xmm7
movupd %xmm3,-0x10(%rcx,%rsi,1)
movupd %xmm7,(%rcx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rdx
jne    1410 <dlevmar_chkjac+0x2a0>
cmp    %r14,%rax
jne    129e <dlevmar_chkjac+0x12e>
mov    %r14,0x18(%rsp)
mov    0x68(%rsp),%rsi
mov    %r9d,%edx
mov    %r15d,%ecx
mov    %rbp,%r8
call   *0x50(%rsp)
movapd 0x40(%rsp),%xmm0
call   1070 <log10@plt>
mov    %r15d,%r14d
test   %r15d,%r15d
jle    1500 <dlevmar_chkjac+0x390>
lea    0x0(,%r14,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %rax,%rbp
call   1040 <memset@plt>
mov    %rbp,%rax
cmpl   $0x0,0x8(%rsp)
movapd 0x40(%rsp),%xmm8
mov    0x70(%rsp),%r8
mov    0x18(%rsp),%r9
jle    161d <dlevmar_chkjac+0x4ad>
mov    %r14d,%ebp
and    $0xfffffffe,%ebp
mov    %r13,%rcx
shl    $0x4,%rcx
xor    %edx,%edx
movapd 0xacd(%rip),%xmm0
xorpd  %xmm1,%xmm1
movsd  0xad9(%rip),%xmm2
mov    %r8,%r10
jmp    1561 <dlevmar_chkjac+0x3f1>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdx
add    $0x8,%r10
cmp    %r9,%rdx
je     161d <dlevmar_chkjac+0x4ad>
test   %r15d,%r15d
jle    1550 <dlevmar_chkjac+0x3e0>
movsd  (%r12,%rdx,8),%xmm3
movapd %xmm3,%xmm4
xorpd  %xmm0,%xmm4
xorpd  %xmm5,%xmm5
cmpnlesd %xmm3,%xmm5
andpd  %xmm5,%xmm4
andnpd %xmm3,%xmm5
orpd   %xmm4,%xmm5
movapd %xmm5,%xmm3
cmpeqsd %xmm1,%xmm3
movapd %xmm3,%xmm4
andnpd %xmm5,%xmm4
andpd  %xmm2,%xmm3
orpd   %xmm4,%xmm3
cmp    $0x1,%r15d
jne    15b0 <dlevmar_chkjac+0x440>
xor    %edi,%edi
jmp    15f4 <dlevmar_chkjac+0x484>
nopl   0x0(%rax)
mov    %r10,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi),%xmm4
mulsd  %xmm3,%xmm4
addsd  (%rbx,%rdi,8),%xmm4
movsd  %xmm4,(%rbx,%rdi,8)
movsd  (%rsi,%r13,8),%xmm4
mulsd  %xmm3,%xmm4
addsd  0x8(%rbx,%rdi,8),%xmm4
movsd  %xmm4,0x8(%rbx,%rdi,8)
add    $0x2,%rdi
add    %rcx,%rsi
cmp    %rdi,%rbp
jne    15c0 <dlevmar_chkjac+0x450>
test   $0x1,%r14b
je     1550 <dlevmar_chkjac+0x3e0>
mov    %rdi,%rsi
imul   %r13,%rsi
add    %rdx,%rsi
mulsd  (%r8,%rsi,8),%xmm3
addsd  (%rbx,%rdi,8),%xmm3
movsd  %xmm3,(%rbx,%rdi,8)
jmp    1550 <dlevmar_chkjac+0x3e0>
test   %r15d,%r15d
mov    0x10(%rsp),%rdi
jle    17f0 <dlevmar_chkjac+0x680>
movsd  0x9dd(%rip),%xmm0
mulsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x30(%rsp),%rax
add    %r13,%rax
add    0x28(%rsp),%rax
lea    (%rdi,%rax,8),%r15
xor    %ebp,%ebp
movsd  0x9b0(%rip),%xmm7
xorpd  %xmm9,%xmm9
movabs $0x3ff0000000000000,%r12
jmp    168d <dlevmar_chkjac+0x51d>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,%r14
je     17f0 <dlevmar_chkjac+0x680>
movsd  (%rdi,%rbp,8),%xmm3
ucomisd %xmm9,%xmm3
movapd %xmm7,%xmm0
jne    16a3 <dlevmar_chkjac+0x533>
jnp    1780 <dlevmar_chkjac+0x610>
movsd  (%r15,%rbp,8),%xmm6
ucomisd %xmm9,%xmm6
movapd %xmm7,%xmm0
jne    16ba <dlevmar_chkjac+0x54a>
jnp    1780 <dlevmar_chkjac+0x610>
movapd %xmm6,%xmm2
subsd  %xmm3,%xmm2
movapd %xmm2,%xmm1
movapd 0x932(%rip),%xmm0
xorpd  %xmm0,%xmm1
xorpd  %xmm4,%xmm4
cmpnlesd %xmm2,%xmm4
andpd  %xmm4,%xmm1
andnpd %xmm2,%xmm4
orpd   %xmm1,%xmm4
movapd %xmm3,%xmm5
xorpd  %xmm0,%xmm5
xorpd  %xmm1,%xmm1
cmpnlesd %xmm3,%xmm1
andpd  %xmm1,%xmm5
andnpd %xmm3,%xmm1
orpd   %xmm5,%xmm1
movsd  0x20(%rsp),%xmm3
mulsd  %xmm1,%xmm3
ucomisd %xmm3,%xmm4
movapd %xmm7,%xmm0
jb     1780 <dlevmar_chkjac+0x610>
divsd  %xmm8,%xmm2
subsd  (%rbx,%rbp,8),%xmm2
movapd %xmm2,%xmm3
movapd 0x8d2(%rip),%xmm4
xorpd  %xmm4,%xmm3
xorpd  %xmm0,%xmm0
cmpnlesd %xmm2,%xmm0
andpd  %xmm0,%xmm3
andnpd %xmm2,%xmm0
orpd   %xmm3,%xmm0
mulsd  %xmm8,%xmm0
movapd %xmm6,%xmm2
xorpd  %xmm4,%xmm2
xorpd  %xmm3,%xmm3
cmpnlesd %xmm6,%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm6,%xmm3
orpd   %xmm2,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,(%rbx,%rbp,8)
ucomisd 0x38(%rsp),%xmm0
jbe    17d8 <dlevmar_chkjac+0x668>
ucomisd %xmm0,%xmm8
jbe    17d8 <dlevmar_chkjac+0x668>
movapd %xmm0,0x50(%rsp)
call   1070 <log10@plt>
movapd 0x50(%rsp),%xmm0
xorpd  %xmm9,%xmm9
movsd  0x867(%rip),%xmm7
movapd 0x40(%rsp),%xmm8
mov    0x10(%rsp),%rdi
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
movsd  0x8(%rsp),%xmm1
subsd  %xmm1,%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rbx,%rbp,8)
ucomisd %xmm8,%xmm0
jb     1680 <dlevmar_chkjac+0x510>
movq   $0x0,(%rbx,%rbp,8)
jmp    1680 <dlevmar_chkjac+0x510>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    0x27ce(%rip),%rax
mov    (%rax),%edi
lea    0x80d(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@DBL_EPSILON = global double 0.000000e+00
@stderr = global i32 0
@.str = [52 x i8] c"dlevmar_chkjac(): memory allocation request failed\0A\00"
define void @dlevmar_chkjac(void (double*, double*, i32, i32, i8*)* %0, void (double*, double*, i32, i32, i8*)* %1, double* %2, i32 %3, i32 %4, i8* %5, double* %6) {
%8 = alloca void (double*, double*, i32, i32, i8*)*
%9 = alloca void (double*, double*, i32, i32, i8*)*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca i32
%24 = alloca i32
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
store void (double*, double*, i32, i32, i8*)* %0, void (double*, double*, i32, i32, i8*)** %8
store void (double*, double*, i32, i32, i8*)* %1, void (double*, double*, i32, i32, i8*)** %9
store double* %2, double** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store double* %6, double** %14
store double 1.000000e+02, double* %15
store double 1.000000e+00, double* %16
store double 0.000000e+00, double* %17
%34 = load i32, i32* %12
store i32 %34, i32* %30
%35 = load i32, i32* %12
%36 = load i32, i32* %11
%37 = mul nsw i32 %35, %36
store i32 %37, i32* %31
%38 = load i32, i32* %11
store i32 %38, i32* %32
%39 = load i32, i32* %12
store i32 %39, i32* %33
%40 = load double, double* @DBL_EPSILON
store double %40, double* %28
%41 = load double, double* %28
%42 = call i64 @sqrt(double %41)
%43 = sitofp i64 %42 to double
store double %43, double* %25
%44 = load i32, i32* %30
%45 = load i32, i32* %31
%46 = add nsw i32 %44, %45
%47 = load i32, i32* %32
%48 = add nsw i32 %46, %47
%49 = load i32, i32* %33
%50 = add nsw i32 %48, %49
%51 = sext i32 %50 to i64
%52 = mul i64 %51, 8
%53 = trunc i64 %52 to i32
%54 = call i64 @malloc(i32 %53)
%55 = inttoptr i64 %54 to double*
store double* %55, double** %22
%56 = load double*, double** %22
%57 = icmp ne double* %56, null
br i1 %57, label %62, label %58
58: ; preds = %7
%59 = load i32, i32* @stderr
%60 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%61 = call i32 @exit(i32 1)
unreachable
62: ; preds = %7
%63 = load double*, double** %22
store double* %63, double** %18
%64 = load double*, double** %18
%65 = load i32, i32* %30
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
store double* %67, double** %19
%68 = load double*, double** %19
%69 = load i32, i32* %31
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
store double* %71, double** %20
%72 = load double*, double** %20
%73 = load i32, i32* %32
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double* %75, double** %21
%76 = load void (double*, double*, i32, i32, i8*)*, void (double*, double*, i32, i32, i8*)** %8
%77 = load double*, double** %10
%78 = load double*, double** %18
%79 = load i32, i32* %11
%80 = load i32, i32* %12
%81 = load i8*, i8** %13
%82 = load void (double*, double*, i32, i32, i8*)*, void (double*, double*, i32, i32, i8*)** %9
%83 = load double*, double** %10
%84 = load double*, double** %19
%85 = load i32, i32* %11
%86 = load i32, i32* %12
%87 = load i8*, i8** %13
store i32 0, i32* %24
br label %88
88: ; preds = %133, %62
%89 = load i32, i32* %24
%90 = load i32, i32* %11
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %136
92: ; preds = %88
%93 = load double, double* %25
%94 = load double*, double** %10
%95 = load i32, i32* %24
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = fcmp oge double %98, 0.000000e+00
br i1 %99, label %100, label %106
100: ; preds = %92
%101 = load double*, double** %10
%102 = load i32, i32* %24
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
br label %113
106: ; preds = %92
%107 = load double*, double** %10
%108 = load i32, i32* %24
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
%111 = load double, double* %110
%112 = fneg double %111
br label %113
113: ; preds = %106, %100
%114 = phi double [ %105, %100 ], [ %112, %106 ]
%115 = fmul double %93, %114
store double %115, double* %27
%116 = load double, double* %27
%117 = load double, double* %17
%118 = fcmp oeq double %116, %117
br i1 %118, label %119, label %121
119: ; preds = %113
%120 = load double, double* %25
store double %120, double* %27
br label %121
121: ; preds = %119, %113
%122 = load double*, double** %10
%123 = load i32, i32* %24
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load double, double* %125
%127 = load double, double* %27
%128 = fadd double %126, %127
%129 = load double*, double** %20
%130 = load i32, i32* %24
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %129, i64 %131
store double %128, double* %132
br label %133
133: ; preds = %121
%134 = load i32, i32* %24
%135 = add nsw i32 %134, 1
store i32 %135, i32* %24
br label %88
136: ; preds = %88
%137 = load void (double*, double*, i32, i32, i8*)*, void (double*, double*, i32, i32, i8*)** %8
%138 = load double*, double** %20
%139 = load double*, double** %21
%140 = load i32, i32* %11
%141 = load i32, i32* %12
%142 = load i8*, i8** %13
%143 = load double, double* %15
%144 = load double, double* %28
%145 = fmul double %143, %144
store double %145, double* %26
%146 = load double, double* %25
%147 = call i64 @log10(double %146)
%148 = sitofp i64 %147 to double
store double %148, double* %29
store i32 0, i32* %23
br label %149
149: ; preds = %159, %136
%150 = load i32, i32* %23
%151 = load i32, i32* %12
%152 = icmp slt i32 %150, %151
br i1 %152, label %153, label %162
153: ; preds = %149
%154 = load double, double* %17
%155 = load double*, double** %14
%156 = load i32, i32* %23
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %155, i64 %157
store double %154, double* %158
br label %159
159: ; preds = %153
%160 = load i32, i32* %23
%161 = add nsw i32 %160, 1
store i32 %161, i32* %23
br label %149
162: ; preds = %149
store i32 0, i32* %24
br label %163
163: ; preds = %220, %162
%164 = load i32, i32* %24
%165 = load i32, i32* %11
%166 = icmp slt i32 %164, %165
br i1 %166, label %167, label %223
167: ; preds = %163
%168 = load double*, double** %10
%169 = load i32, i32* %24
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %168, i64 %170
%172 = load double, double* %171
%173 = fcmp oge double %172, 0.000000e+00
br i1 %173, label %174, label %180
174: ; preds = %167
%175 = load double*, double** %10
%176 = load i32, i32* %24
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double, double* %175, i64 %177
%179 = load double, double* %178
br label %187
180: ; preds = %167
%181 = load double*, double** %10
%182 = load i32, i32* %24
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds double, double* %181, i64 %183
%185 = load double, double* %184
%186 = fneg double %185
br label %187
187: ; preds = %180, %174
%188 = phi double [ %179, %174 ], [ %186, %180 ]
store double %188, double* %27
%189 = load double, double* %27
%190 = load double, double* %17
%191 = fcmp oeq double %189, %190
br i1 %191, label %192, label %194
192: ; preds = %187
%193 = load double, double* %16
store double %193, double* %27
br label %194
194: ; preds = %192, %187
store i32 0, i32* %23
br label %195
195: ; preds = %216, %194
%196 = load i32, i32* %23
%197 = load i32, i32* %12
%198 = icmp slt i32 %196, %197
br i1 %198, label %199, label %219
199: ; preds = %195
%200 = load double, double* %27
%201 = load double*, double** %19
%202 = load i32, i32* %23
%203 = load i32, i32* %11
%204 = mul nsw i32 %202, %203
%205 = load i32, i32* %24
%206 = add nsw i32 %204, %205
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds double, double* %201, i64 %207
%209 = load double, double* %208
%210 = load double*, double** %14
%211 = load i32, i32* %23
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %210, i64 %212
%214 = load double, double* %213
%215 = call double @llvm.fmuladd.f64(double %200, double %209, double %214)
store double %215, double* %213
br label %216
216: ; preds = %199
%217 = load i32, i32* %23
%218 = add nsw i32 %217, 1
store i32 %218, i32* %23
br label %195
219: ; preds = %195
br label %220
220: ; preds = %219
%221 = load i32, i32* %24
%222 = add nsw i32 %221, 1
store i32 %222, i32* %24
br label %163
223: ; preds = %163
store i32 0, i32* %23
br label %224
224: ; preds = %455, %223
%225 = load i32, i32* %23
%226 = load i32, i32* %12
%227 = icmp slt i32 %225, %226
br i1 %227, label %228, label %458
228: ; preds = %224
%229 = load double, double* %16
store double %229, double* %27
%230 = load double*, double** %18
%231 = load i32, i32* %23
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %230, i64 %232
%234 = load double, double* %233
%235 = load double, double* %17
%236 = fcmp une double %234, %235
br i1 %236, label %237, label %419
237: ; preds = %228
%238 = load double*, double** %21
%239 = load i32, i32* %23
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double, double* %238, i64 %240
%242 = load double, double* %241
%243 = load double, double* %17
%244 = fcmp une double %242, %243
br i1 %244, label %245, label %419
245: ; preds = %237
%246 = load double*, double** %21
%247 = load i32, i32* %23
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds double, double* %246, i64 %248
%250 = load double, double* %249
%251 = load double*, double** %18
%252 = load i32, i32* %23
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds double, double* %251, i64 %253
%255 = load double, double* %254
%256 = fsub double %250, %255
%257 = fcmp oge double %256, 0.000000e+00
br i1 %257, label %258, label %270
258: ; preds = %245
%259 = load double*, double** %21
%260 = load i32, i32* %23
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
%263 = load double, double* %262
%264 = load double*, double** %18
%265 = load i32, i32* %23
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double, double* %264, i64 %266
%268 = load double, double* %267
%269 = fsub double %263, %268
br label %283
270: ; preds = %245
%271 = load double*, double** %21
%272 = load i32, i32* %23
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds double, double* %271, i64 %273
%275 = load double, double* %274
%276 = load double*, double** %18
%277 = load i32, i32* %23
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds double, double* %276, i64 %278
%280 = load double, double* %279
%281 = fsub double %275, %280
%282 = fneg double %281
br label %283
283: ; preds = %270, %258
%284 = phi double [ %269, %258 ], [ %282, %270 ]
%285 = load double, double* %26
%286 = load double*, double** %18
%287 = load i32, i32* %23
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds double, double* %286, i64 %288
%290 = load double, double* %289
%291 = fcmp oge double %290, 0.000000e+00
br i1 %291, label %292, label %298
292: ; preds = %283
%293 = load double*, double** %18
%294 = load i32, i32* %23
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %293, i64 %295
%297 = load double, double* %296
br label %305
298: ; preds = %283
%299 = load double*, double** %18
%300 = load i32, i32* %23
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds double, double* %299, i64 %301
%303 = load double, double* %302
%304 = fneg double %303
br label %305
305: ; preds = %298, %292
%306 = phi double [ %297, %292 ], [ %304, %298 ]
%307 = fmul double %285, %306
%308 = fcmp oge double %284, %307
br i1 %308, label %309, label %419
309: ; preds = %305
%310 = load double, double* %25
%311 = load double*, double** %21
%312 = load i32, i32* %23
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds double, double* %311, i64 %313
%315 = load double, double* %314
%316 = load double*, double** %18
%317 = load i32, i32* %23
%318 = sext i32 %317 to i64
%319 = getelementptr inbounds double, double* %316, i64 %318
%320 = load double, double* %319
%321 = fsub double %315, %320
%322 = load double, double* %25
%323 = fdiv double %321, %322
%324 = load double*, double** %14
%325 = load i32, i32* %23
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds double, double* %324, i64 %326
%328 = load double, double* %327
%329 = fsub double %323, %328
%330 = fcmp oge double %329, 0.000000e+00
br i1 %330, label %331, label %351
331: ; preds = %309
%332 = load double*, double** %21
%333 = load i32, i32* %23
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds double, double* %332, i64 %334
%336 = load double, double* %335
%337 = load double*, double** %18
%338 = load i32, i32* %23
%339 = sext i32 %338 to i64
%340 = getelementptr inbounds double, double* %337, i64 %339
%341 = load double, double* %340
%342 = fsub double %336, %341
%343 = load double, double* %25
%344 = fdiv double %342, %343
%345 = load double*, double** %14
%346 = load i32, i32* %23
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds double, double* %345, i64 %347
%349 = load double, double* %348
%350 = fsub double %344, %349
br label %372
351: ; preds = %309
%352 = load double*, double** %21
%353 = load i32, i32* %23
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds double, double* %352, i64 %354
%356 = load double, double* %355
%357 = load double*, double** %18
%358 = load i32, i32* %23
%359 = sext i32 %358 to i64
%360 = getelementptr inbounds double, double* %357, i64 %359
%361 = load double, double* %360
%362 = fsub double %356, %361
%363 = load double, double* %25
%364 = fdiv double %362, %363
%365 = load double*, double** %14
%366 = load i32, i32* %23
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds double, double* %365, i64 %367
%369 = load double, double* %368
%370 = fsub double %364, %369
%371 = fneg double %370
br label %372
372: ; preds = %351, %331
%373 = phi double [ %350, %331 ], [ %371, %351 ]
%374 = fmul double %310, %373
%375 = load double*, double** %18
%376 = load i32, i32* %23
%377 = sext i32 %376 to i64
%378 = getelementptr inbounds double, double* %375, i64 %377
%379 = load double, double* %378
%380 = fcmp oge double %379, 0.000000e+00
br i1 %380, label %381, label %387
381: ; preds = %372
%382 = load double*, double** %18
%383 = load i32, i32* %23
%384 = sext i32 %383 to i64
%385 = getelementptr inbounds double, double* %382, i64 %384
%386 = load double, double* %385
br label %394
387: ; preds = %372
%388 = load double*, double** %18
%389 = load i32, i32* %23
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds double, double* %388, i64 %390
%392 = load double, double* %391
%393 = fneg double %392
br label %394
394: ; preds = %387, %381
%395 = phi double [ %386, %381 ], [ %393, %387 ]
%396 = load double*, double** %21
%397 = load i32, i32* %23
%398 = sext i32 %397 to i64
%399 = getelementptr inbounds double, double* %396, i64 %398
%400 = load double, double* %399
%401 = fcmp oge double %400, 0.000000e+00
br i1 %401, label %402, label %408
402: ; preds = %394
%403 = load double*, double** %21
%404 = load i32, i32* %23
%405 = sext i32 %404 to i64
%406 = getelementptr inbounds double, double* %403, i64 %405
%407 = load double, double* %406
br label %415
408: ; preds = %394
%409 = load double*, double** %21
%410 = load i32, i32* %23
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds double, double* %409, i64 %411
%413 = load double, double* %412
%414 = fneg double %413
br label %415
415: ; preds = %408, %402
%416 = phi double [ %407, %402 ], [ %414, %408 ]
%417 = fadd double %395, %416
%418 = fdiv double %374, %417
store double %418, double* %27
br label %419
419: ; preds = %415, %305, %237, %228
%420 = load double, double* %16
%421 = load double*, double** %14
%422 = load i32, i32* %23
%423 = sext i32 %422 to i64
%424 = getelementptr inbounds double, double* %421, i64 %423
store double %420, double* %424
%425 = load double, double* %27
%426 = load double, double* %28
%427 = fcmp ogt double %425, %426
br i1 %427, label %428, label %444
428: ; preds = %419
%429 = load double, double* %27
%430 = load double, double* %25
%431 = fcmp olt double %429, %430
br i1 %431, label %432, label %444
432: ; preds = %428
%433 = load double, double* %27
%434 = call i64 @log10(double %433)
%435 = sitofp i64 %434 to double
%436 = load double, double* %29
%437 = fsub double %435, %436
%438 = load double, double* %29
%439 = fdiv double %437, %438
%440 = load double*, double** %14
%441 = load i32, i32* %23
%442 = sext i32 %441 to i64
%443 = getelementptr inbounds double, double* %440, i64 %442
store double %439, double* %443
br label %444
444: ; preds = %432, %428, %419
%445 = load double, double* %27
%446 = load double, double* %25
%447 = fcmp oge double %445, %446
br i1 %447, label %448, label %454
448: ; preds = %444
%449 = load double, double* %17
%450 = load double*, double** %14
%451 = load i32, i32* %23
%452 = sext i32 %451 to i64
%453 = getelementptr inbounds double, double* %450, i64 %452
store double %449, double* %453
br label %454
454: ; preds = %448, %444
br label %455
455: ; preds = %454
%456 = load i32, i32* %23
%457 = add nsw i32 %456, 1
store i32 %457, i32* %23
br label %224
458: ; preds = %224
%459 = load double*, double** %22
%460 = call i32 @free(double* %459)
ret void
}

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
@stderr = global i32 0
@.str = [52 x i8] c"dlevmar_chkjac(): memory allocation request failed\0A\00"
define void @dlevmar_chkjac(void (double*, double*, i32, i32, i8*)* nocapture %0, void (double*, double*, i32, i32, i8*)* nocapture %1, double* %2, i32 %3, i32 %4, i8* %5, double* nocapture %6) {
%8 = bitcast double* %6 to i8*
%9 = mul nsw i32 %4, %3
%10 = load double, double* @DBL_EPSILON
%11 = tail call i64 @sqrt(double %10)
%12 = sitofp i64 %11 to double
%13 = shl i32 %4, 1
%14 = add i32 %9, %3
%15 = add i32 %14, %13
%16 = shl i32 %15, 3
%17 = tail call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to double*
%19 = icmp eq i64 %17, 0
br i1 %19, label %20, label %24
20: ; preds = %7
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%23 = tail call i32 @exit(i32 1)
unreachable
24: ; preds = %7
%25 = sext i32 %4 to i64
%26 = getelementptr inbounds double, double* %18, i64 %25
%27 = sext i32 %9 to i64
%28 = getelementptr double, double* %26, i64 %27
%29 = sext i32 %3 to i64
%30 = getelementptr inbounds double, double* %28, i64 %29
tail call void %0(double* %2, double* %18, i32 %3, i32 %4, i8* %5)
tail call void %1(double* %2, double* %26, i32 %3, i32 %4, i8* %5)
%31 = icmp sgt i32 %3, 0
br i1 %31, label %32, label %125
32: ; preds = %24
%33 = zext i32 %3 to i64
%34 = icmp ult i32 %3, 4
br i1 %34, label %79, label %35
35: ; preds = %32
%36 = add nsw i64 %25, %27
%37 = add nsw i64 %36, %33
%38 = getelementptr double, double* %18, i64 %37
%39 = getelementptr double, double* %2, i64 %33
%40 = icmp ult double* %28, %39
%41 = icmp ugt double* %38, %2
%42 = and i1 %40, %41
br i1 %42, label %79, label %43
43: ; preds = %35
%44 = and i64 %33, 4294967292
%45 = insertelement <2 x double> poison, double %12, i64 0
%46 = shufflevector <2 x double> %45, <2 x double> poison, <2 x i32> zeroinitializer
%47 = insertelement <2 x double> poison, double %12, i64 0
%48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
br label %49
49: ; preds = %49, %43
%50 = phi i64 [ 0, %43 ], [ %75, %49 ]
%51 = getelementptr inbounds double, double* %2, i64 %50
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = getelementptr inbounds double, double* %51, i64 2
%55 = bitcast double* %54 to <2 x double>*
%56 = load <2 x double>, <2 x double>* %55
%57 = fcmp ult <2 x double> %53, zeroinitializer
%58 = fcmp ult <2 x double> %56, zeroinitializer
%59 = fneg <2 x double> %53
%60 = fneg <2 x double> %56
%61 = select <2 x i1> %57, <2 x double> %59, <2 x double> %53
%62 = select <2 x i1> %58, <2 x double> %60, <2 x double> %56
%63 = fmul <2 x double> %61, %46
%64 = fmul <2 x double> %62, %48
%65 = fcmp oeq <2 x double> %63, zeroinitializer
%66 = fcmp oeq <2 x double> %64, zeroinitializer
%67 = select <2 x i1> %65, <2 x double> %46, <2 x double> %63
%68 = select <2 x i1> %66, <2 x double> %48, <2 x double> %64
%69 = fadd <2 x double> %53, %67
%70 = fadd <2 x double> %56, %68
%71 = getelementptr inbounds double, double* %28, i64 %50
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> %69, <2 x double>* %72
%73 = getelementptr inbounds double, double* %71, i64 2
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %70, <2 x double>* %74
%75 = add nuw i64 %50, 4
%76 = icmp eq i64 %75, %44
br i1 %76, label %77, label %49
77: ; preds = %49
%78 = icmp eq i64 %44, %33
br i1 %78, label %125, label %79
79: ; preds = %35, %32, %77
%80 = phi i64 [ 0, %35 ], [ 0, %32 ], [ %44, %77 ]
%81 = xor i64 %80, -1
%82 = and i64 %33, 1
%83 = icmp eq i64 %82, 0
br i1 %83, label %96, label %84
84: ; preds = %79
%85 = getelementptr inbounds double, double* %2, i64 %80
%86 = load double, double* %85
%87 = fcmp ult double %86, 0.000000e+00
%88 = fneg double %86
%89 = select i1 %87, double %88, double %86
%90 = fmul double %89, %12
%91 = fcmp oeq double %90, 0.000000e+00
%92 = select i1 %91, double %12, double %90
%93 = fadd double %86, %92
%94 = getelementptr inbounds double, double* %28, i64 %80
store double %93, double* %94
%95 = or i64 %80, 1
br label %96
96: ; preds = %84, %79
%97 = phi i64 [ %80, %79 ], [ %95, %84 ]
%98 = sub nsw i64 0, %33
%99 = icmp eq i64 %81, %98
br i1 %99, label %125, label %100
100: ; preds = %96, %100
%101 = phi i64 [ %123, %100 ], [ %97, %96 ]
%102 = getelementptr inbounds double, double* %2, i64 %101
%103 = load double, double* %102
%104 = fcmp ult double %103, 0.000000e+00
%105 = fneg double %103
%106 = select i1 %104, double %105, double %103
%107 = fmul double %106, %12
%108 = fcmp oeq double %107, 0.000000e+00
%109 = select i1 %108, double %12, double %107
%110 = fadd double %103, %109
%111 = getelementptr inbounds double, double* %28, i64 %101
store double %110, double* %111
%112 = add nuw nsw i64 %101, 1
%113 = getelementptr inbounds double, double* %2, i64 %112
%114 = load double, double* %113
%115 = fcmp ult double %114, 0.000000e+00
%116 = fneg double %114
%117 = select i1 %115, double %116, double %114
%118 = fmul double %117, %12
%119 = fcmp oeq double %118, 0.000000e+00
%120 = select i1 %119, double %12, double %118
%121 = fadd double %114, %120
%122 = getelementptr inbounds double, double* %28, i64 %112
store double %121, double* %122
%123 = add nuw nsw i64 %101, 2
%124 = icmp eq i64 %123, %33
br i1 %124, label %125, label %100
125: ; preds = %96, %100, %77, %24
tail call void %0(double* %28, double* %30, i32 %3, i32 %4, i8* %5)
%126 = fmul double %10, 1.000000e+02
%127 = tail call i64 @log10(double %12)
%128 = sitofp i64 %127 to double
%129 = icmp sgt i32 %4, 0
br i1 %129, label %130, label %133
130: ; preds = %125
%131 = zext i32 %4 to i64
%132 = shl nuw nsw i64 %131, 3
br label %133
133: ; preds = %130, %125
br i1 %31, label %134, label %141
134: ; preds = %133
%135 = zext i32 %3 to i64
%136 = zext i32 %4 to i64
%137 = and i64 %136, 1
%138 = icmp eq i32 %4, 1
%139 = and i64 %136, 4294967294
%140 = icmp eq i64 %137, 0
br label %144
141: ; preds = %185, %133
br i1 %129, label %142, label %238
142: ; preds = %141
%143 = zext i32 %4 to i64
br label %188
144: ; preds = %134, %185
%145 = phi i64 [ 0, %134 ], [ %186, %185 ]
%146 = getelementptr inbounds double, double* %2, i64 %145
%147 = load double, double* %146
%148 = fcmp ult double %147, 0.000000e+00
%149 = fneg double %147
%150 = select i1 %148, double %149, double %147
%151 = fcmp oeq double %150, 0.000000e+00
%152 = select i1 %151, double 1.000000e+00, double %150
br i1 %129, label %153, label %185
153: ; preds = %144
br i1 %138, label %175, label %154
154: ; preds = %153, %154
%155 = phi i64 [ %172, %154 ], [ 0, %153 ]
%156 = phi i64 [ %173, %154 ], [ 0, %153 ]
%157 = mul nsw i64 %155, %29
%158 = add nsw i64 %157, %145
%159 = getelementptr inbounds double, double* %26, i64 %158
%160 = load double, double* %159
%161 = getelementptr inbounds double, double* %6, i64 %155
%162 = load double, double* %161
%163 = tail call double @llvm.fmuladd.f64(double %152, double %160, double %162)
store double %163, double* %161
%164 = or i64 %155, 1
%165 = mul nsw i64 %164, %29
%166 = add nsw i64 %165, %145
%167 = getelementptr inbounds double, double* %26, i64 %166
%168 = load double, double* %167
%169 = getelementptr inbounds double, double* %6, i64 %164
%170 = load double, double* %169
%171 = tail call double @llvm.fmuladd.f64(double %152, double %168, double %170)
store double %171, double* %169
%172 = add nuw nsw i64 %155, 2
%173 = add i64 %156, 2
%174 = icmp eq i64 %173, %139
br i1 %174, label %175, label %154
175: ; preds = %154, %153
%176 = phi i64 [ 0, %153 ], [ %172, %154 ]
br i1 %140, label %185, label %177
177: ; preds = %175
%178 = mul nsw i64 %176, %29
%179 = add nsw i64 %178, %145
%180 = getelementptr inbounds double, double* %26, i64 %179
%181 = load double, double* %180
%182 = getelementptr inbounds double, double* %6, i64 %176
%183 = load double, double* %182
%184 = tail call double @llvm.fmuladd.f64(double %152, double %181, double %183)
store double %184, double* %182
br label %185
185: ; preds = %177, %175, %144
%186 = add nuw nsw i64 %145, 1
%187 = icmp eq i64 %186, %135
br i1 %187, label %141, label %144
188: ; preds = %142, %235
%189 = phi i64 [ 0, %142 ], [ %236, %235 ]
%190 = getelementptr inbounds double, double* %18, i64 %189
%191 = load double, double* %190
%192 = fcmp une double %191, 0.000000e+00
br i1 %192, label %193, label %221
193: ; preds = %188
%194 = getelementptr inbounds double, double* %30, i64 %189
%195 = load double, double* %194
%196 = fcmp une double %195, 0.000000e+00
br i1 %196, label %197, label %221
197: ; preds = %193
%198 = fsub double %195, %191
%199 = fcmp ult double %198, 0.000000e+00
%200 = fneg double %198
%201 = select i1 %199, double %200, double %198
%202 = fcmp ult double %191, 0.000000e+00
%203 = fneg double %191
%204 = select i1 %202, double %203, double %191
%205 = fmul double %126, %204
%206 = fcmp ult double %201, %205
br i1 %206, label %221, label %207
207: ; preds = %197
%208 = fdiv double %198, %12
%209 = getelementptr inbounds double, double* %6, i64 %189
%210 = load double, double* %209
%211 = fsub double %208, %210
%212 = fcmp ult double %211, 0.000000e+00
%213 = fneg double %211
%214 = select i1 %212, double %213, double %211
%215 = fmul double %214, %12
%216 = fcmp ult double %195, 0.000000e+00
%217 = fneg double %195
%218 = select i1 %216, double %217, double %195
%219 = fadd double %204, %218
%220 = fdiv double %215, %219
br label %221
221: ; preds = %207, %197, %193, %188
%222 = phi double [ %220, %207 ], [ 1.000000e+00, %197 ], [ 1.000000e+00, %193 ], [ 1.000000e+00, %188 ]
%223 = getelementptr inbounds double, double* %6, i64 %189
store double 1.000000e+00, double* %223
%224 = fcmp ogt double %222, %10
%225 = fcmp olt double %222, %12
%226 = select i1 %224, i1 %225, i1 false
br i1 %226, label %227, label %232
227: ; preds = %221
%228 = tail call i64 @log10(double %222)
%229 = sitofp i64 %228 to double
%230 = fsub double %229, %128
%231 = fdiv double %230, %128
store double %231, double* %223
br label %232
232: ; preds = %227, %221
%233 = fcmp ult double %222, %12
br i1 %233, label %235, label %234
234: ; preds = %232
store double 0.000000e+00, double* %223
br label %235
235: ; preds = %232, %234
%236 = add nuw nsw i64 %189, 1
%237 = icmp eq i64 %236, %143
br i1 %237, label %238, label %188
238: ; preds = %235, %141
%239 = tail call i32 @free(double* %18)
ret void
}