#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 sqrt(double);
void jachelval(double *p, double *jac, int m, int n, void *data) {
  register int i = 0;
  double tmp;
  tmp = p[0] * p[0] + p[1] * p[1];
  jac[i++] = 50.0 * p[1] / (3.14159265358979323846 * tmp);
  jac[i++] = -50.0 * p[0] / (3.14159265358979323846 * tmp);
  jac[i++] = 10.0;
  jac[i++] = 10.0 * p[0] / sqrt(tmp);
  jac[i++] = 10.0 * p[1] / sqrt(tmp);
  jac[i++] = 0.0;
  jac[i++] = 0.0;
  jac[i++] = 0.0;
  jac[i++] = 1.0;
}


x86 assembly (clang, -O0):
<jachelval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeb4(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  0xe97(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0xe73(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  0xe5f(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  0xe1d(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0xe0c(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0xdca(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  0xd23(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jachelval>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  (%rdi),%xmm2
movsd  0x8(%rdi),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
mulsd  0xec6(%rip),%xmm0
addsd  %xmm1,%xmm2
movsd  0xec2(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi)
movsd  (%rdi),%xmm0
mulsd  0xeb2(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsi)
movabs $0x4024000000000000,%rax
mov    %rax,0x10(%rsi)
movsd  (%rdi),%xmm4
mulsd  0xe97(%rip),%xmm4
xorps  %xmm1,%xmm1
sqrtsd %xmm2,%xmm1
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm2
movapd %xmm1,%xmm0
jae    11c5 <jachelval+0xb5>
movapd %xmm2,%xmm0
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm4,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm4
xorpd  %xmm3,%xmm3
movsd  0x10(%rsp),%xmm1
movsd  (%rsp),%xmm2
divsd  %xmm0,%xmm4
movsd  %xmm4,0x18(%rbx)
movsd  0x8(%r14),%xmm0
mulsd  0xe3c(%rip),%xmm0
ucomisd %xmm3,%xmm2
jae    11f9 <jachelval+0xe9>
movsd  %xmm0,(%rsp)
movapd %xmm2,%xmm0
call   1030 <sqrt@plt>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rbx)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x28(%rbx)
movq   $0x0,0x38(%rbx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x40(%rbx)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @jachelval(double* %0, double* %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
store i32 0, i32* %11
%13 = load double*, double** %6
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = load double*, double** %6
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = load double*, double** %6
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double, double* %23
%25 = fmul double %21, %24
%26 = call double @llvm.fmuladd.f64(double %15, double %18, double %25)
store double %26, double* %12
%27 = load double*, double** %6
%28 = getelementptr inbounds double, double* %27, i64 1
%29 = load double, double* %28
%30 = fmul double 5.000000e+01, %29
%31 = load double, double* %12
%32 = fmul double 0x400921FB54442D18, %31
%33 = fdiv double %30, %32
%34 = load double*, double** %7
%35 = load i32, i32* %11
%36 = add nsw i32 %35, 1
store i32 %36, i32* %11
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds double, double* %34, i64 %37
store double %33, double* %38
%39 = load double*, double** %6
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = fmul double -5.000000e+01, %41
%43 = load double, double* %12
%44 = fmul double 0x400921FB54442D18, %43
%45 = fdiv double %42, %44
%46 = load double*, double** %7
%47 = load i32, i32* %11
%48 = add nsw i32 %47, 1
store i32 %48, i32* %11
%49 = sext i32 %47 to i64
%50 = getelementptr inbounds double, double* %46, i64 %49
store double %45, double* %50
%51 = load double*, double** %7
%52 = load i32, i32* %11
%53 = add nsw i32 %52, 1
store i32 %53, i32* %11
%54 = sext i32 %52 to i64
%55 = getelementptr inbounds double, double* %51, i64 %54
store double 1.000000e+01, double* %55
%56 = load double*, double** %6
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
%59 = fmul double 1.000000e+01, %58
%60 = load double, double* %12
%61 = call double @sqrt(double %60)
%62 = fdiv double %59, %61
%63 = load double*, double** %7
%64 = load i32, i32* %11
%65 = add nsw i32 %64, 1
store i32 %65, i32* %11
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds double, double* %63, i64 %66
store double %62, double* %67
%68 = load double*, double** %6
%69 = getelementptr inbounds double, double* %68, i64 1
%70 = load double, double* %69
%71 = fmul double 1.000000e+01, %70
%72 = load double, double* %12
%73 = call double @sqrt(double %72)
%74 = fdiv double %71, %73
%75 = load double*, double** %7
%76 = load i32, i32* %11
%77 = add nsw i32 %76, 1
store i32 %77, i32* %11
%78 = sext i32 %76 to i64
%79 = getelementptr inbounds double, double* %75, i64 %78
store double %74, double* %79
%80 = load double*, double** %7
%81 = load i32, i32* %11
%82 = add nsw i32 %81, 1
store i32 %82, i32* %11
%83 = sext i32 %81 to i64
%84 = getelementptr inbounds double, double* %80, i64 %83
store double 0.000000e+00, double* %84
%85 = load double*, double** %7
%86 = load i32, i32* %11
%87 = add nsw i32 %86, 1
store i32 %87, i32* %11
%88 = sext i32 %86 to i64
%89 = getelementptr inbounds double, double* %85, i64 %88
store double 0.000000e+00, double* %89
%90 = load double*, double** %7
%91 = load i32, i32* %11
%92 = add nsw i32 %91, 1
store i32 %92, i32* %11
%93 = sext i32 %91 to i64
%94 = getelementptr inbounds double, double* %90, i64 %93
store double 0.000000e+00, double* %94
%95 = load double*, double** %7
%96 = load i32, i32* %11
%97 = add nsw i32 %96, 1
store i32 %97, i32* %11
%98 = sext i32 %96 to i64
%99 = getelementptr inbounds double, double* %95, i64 %98
store double 1.000000e+00, double* %99
ret void
}

LLVM IR (-O2):
define void @jachelval(double* nocapture %0, double* nocapture writeonly %1, i32 %2, i32 %3, i8* nocapture readnone %4) {
%6 = load double, double* %0
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = fmul double %8, %8
%10 = tail call double @llvm.fmuladd.f64(double %6, double %6, double %9)
%11 = fmul double %8, 5.000000e+01
%12 = fmul double %10, 0x400921FB54442D18
%13 = fdiv double %11, %12
store double %13, double* %1
%14 = load double, double* %0
%15 = fmul double %14, -5.000000e+01
%16 = fdiv double %15, %12
%17 = getelementptr inbounds double, double* %1, i64 1
store double %16, double* %17
%18 = getelementptr inbounds double, double* %1, i64 2
store double 1.000000e+01, double* %18
%19 = load double, double* %0
%20 = fmul double %19, 1.000000e+01
%21 = tail call double @sqrt(double %10)
%22 = fdiv double %20, %21
%23 = getelementptr inbounds double, double* %1, i64 3
store double %22, double* %23
%24 = load double, double* %7
%25 = fmul double %24, 1.000000e+01
%26 = tail call double @sqrt(double %10)
%27 = fdiv double %25, %26
%28 = getelementptr inbounds double, double* %1, i64 4
store double %27, double* %28
%29 = getelementptr inbounds double, double* %1, i64 5
%30 = getelementptr inbounds double, double* %1, i64 8
%31 = bitcast double* %29 to i8*
store double 1.000000e+00, double* %30
ret void
}