#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 jachatfldc(double *p, double *jac, int m, int n, void *data) {
  register int j = 0;
  jac[j++] = 1.0;
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 1.0;
  jac[j++] = -0.5 / sqrt(p[1]);
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 1.0;
  jac[j++] = -0.5 / sqrt(p[2]);
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 0.0;
  jac[j++] = 1.0;
}


x86 assembly (clang, -O0):
<jachatfldc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  0xeb5(%rip),%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
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  0xe48(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe32(%rip),%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  0xda7(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xd91(%rip),%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
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  0xcec(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jachatfldc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
movabs $0x3ff0000000000000,%r15
mov    %r15,(%rsi)
xorps  %xmm2,%xmm2
movups %xmm2,0x8(%rsi)
movq   $0x0,0x18(%rsi)
mov    %r15,0x20(%rsi)
movsd  0x8(%rdi),%xmm0
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm0
jb     1150 <jachatfldc+0x40>
sqrtsd %xmm0,%xmm0
jmp    115c <jachatfldc+0x4c>
call   1030 <sqrt@plt>
xorpd  %xmm4,%xmm4
xorps  %xmm2,%xmm2
movsd  0xe9c(%rip),%xmm3
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rbx)
movups %xmm2,0x30(%rbx)
movq   $0x0,0x40(%rbx)
mov    %r15,0x48(%rbx)
movsd  0x10(%r14),%xmm0
ucomisd %xmm4,%xmm0
jb     1193 <jachatfldc+0x83>
sqrtsd %xmm0,%xmm0
jmp    11a0 <jachatfldc+0x90>
call   1030 <sqrt@plt>
movsd  0xe60(%rip),%xmm3
divsd  %xmm0,%xmm3
movsd  %xmm3,0x50(%rbx)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x58(%rbx)
movupd %xmm0,0x68(%rbx)
mov    %r15,0x78(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

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

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