#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 */
int NonlinearADR_Decay_DiracIC(int *, double *, int, double, double *,
                               double *);
double pow(double, double);
int NonlinearADR_Decay_DiracIC_dr(int *iwork, double *rwork, int nPoints,
                                  double T, double *x, double *u, double *dr) {
  int i, iret;
  double c = rwork[10], d = rwork[11];
  iret = NonlinearADR_Decay_DiracIC(iwork, rwork, nPoints, T, x, u);
  for (i = 0; i < nPoints; i++) {
    dr[i] = d * c * pow(u[i], (d - 1.0));
  }
  return iret;
}


x86 assembly (clang, -O0):
<NonlinearADR_Decay_DiracIC_dr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1030 <NonlinearADR_Decay_DiracIC@plt>
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ec <NonlinearADR_Decay_DiracIC_dr+0xcc>
movsd  -0x50(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xe44(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1187 <NonlinearADR_Decay_DiracIC_dr+0x67>
mov    -0x40(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NonlinearADR_Decay_DiracIC_dr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r13
mov    %r8,%rbx
mov    %edx,%r15d
movsd  0x50(%rsi),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x58(%rsi),%xmm1
movsd  %xmm1,0x8(%rsp)
call   1030 <NonlinearADR_Decay_DiracIC@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mov    %eax,%r14d
test   %r15d,%r15d
jle    1275 <NonlinearADR_Decay_DiracIC_dr+0x155>
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
addsd  0xe84(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %r15d,%r12d
lea    -0x1(%r12),%rax
mov    %r12d,%r15d
and    $0x3,%r15d
cmp    $0x3,%rax
jae    119e <NonlinearADR_Decay_DiracIC_dr+0x7e>
xor    %ebp,%ebp
jmp    1230 <NonlinearADR_Decay_DiracIC_dr+0x110>
and    $0xfffffffc,%r12d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rbp,8),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x0(%r13,%rbp,8)
movsd  0x8(%rbx,%rbp,8),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%r13,%rbp,8)
movsd  0x10(%rbx,%rbp,8),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%r13,%rbp,8)
movsd  0x18(%rbx,%rbp,8),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%r13,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%r12
jne    11b0 <NonlinearADR_Decay_DiracIC_dr+0x90>
test   %r15,%r15
je     1275 <NonlinearADR_Decay_DiracIC_dr+0x155>
lea    0x0(,%rbp,8),%r12
add    %r13,%r12
lea    (%rbx,%rbp,8),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rbp,8),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%r12,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1250 <NonlinearADR_Decay_DiracIC_dr+0x130>
mov    %r14d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @NonlinearADR_Decay_DiracIC_dr(i32* %0, double* %1, i32 %2, double %3, double* %4, double* %5, double* %6) {
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double
store i32* %0, i32** %8
store double* %1, double** %9
store i32 %2, i32* %10
store double %3, double* %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%19 = load double*, double** %9
%20 = getelementptr inbounds double, double* %19, i64 10
%21 = load double, double* %20
store double %21, double* %17
%22 = load double*, double** %9
%23 = getelementptr inbounds double, double* %22, i64 11
%24 = load double, double* %23
store double %24, double* %18
%25 = load i32*, i32** %8
%26 = load double*, double** %9
%27 = load i32, i32* %10
%28 = load double, double* %11
%29 = load double*, double** %12
%30 = load double*, double** %13
%31 = call i32 @NonlinearADR_Decay_DiracIC(i32* %25, double* %26, i32 %27, double %28, double* %29, double* %30)
store i32 %31, i32* %16
store i32 0, i32* %15
br label %32
32: ; preds = %53, %7
%33 = load i32, i32* %15
%34 = load i32, i32* %10
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %56
36: ; preds = %32
%37 = load double, double* %18
%38 = load double, double* %17
%39 = fmul double %37, %38
%40 = load double*, double** %13
%41 = load i32, i32* %15
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
%44 = load double, double* %43
%45 = load double, double* %18
%46 = fsub double %45, 1.000000e+00
%47 = call double @pow(double %44, double %46)
%48 = fmul double %39, %47
%49 = load double*, double** %14
%50 = load i32, i32* %15
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
store double %48, double* %52
br label %53
53: ; preds = %36
%54 = load i32, i32* %15
%55 = add nsw i32 %54, 1
store i32 %55, i32* %15
br label %32
56: ; preds = %32
%57 = load i32, i32* %16
ret i32 %57
}

LLVM IR (-O2):
define i32 @NonlinearADR_Decay_DiracIC_dr(i32* %0, double* %1, i32 %2, double %3, double* %4, double* %5, double* nocapture writeonly %6) {
%8 = getelementptr inbounds double, double* %1, i64 10
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 11
%11 = load double, double* %10
%12 = tail call i32 @NonlinearADR_Decay_DiracIC(i32* %0, double* %1, i32 %2, double %3, double* %4, double* %5)
%13 = icmp sgt i32 %2, 0
br i1 %13, label %14, label %66
14: ; preds = %7
%15 = fmul double %9, %11
%16 = fadd double %11, -1.000000e+00
%17 = zext i32 %2 to i64
%18 = add nsw i64 %17, -1
%19 = and i64 %17, 3
%20 = icmp ult i64 %18, 3
br i1 %20, label %52, label %21
21: ; preds = %14
%22 = and i64 %17, 4294967292
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %49, %23 ]
%25 = phi i64 [ 0, %21 ], [ %50, %23 ]
%26 = getelementptr inbounds double, double* %5, i64 %24
%27 = load double, double* %26
%28 = tail call double @pow(double %27, double %16)
%29 = fmul double %15, %28
%30 = getelementptr inbounds double, double* %6, i64 %24
store double %29, double* %30
%31 = or i64 %24, 1
%32 = getelementptr inbounds double, double* %5, i64 %31
%33 = load double, double* %32
%34 = tail call double @pow(double %33, double %16)
%35 = fmul double %15, %34
%36 = getelementptr inbounds double, double* %6, i64 %31
store double %35, double* %36
%37 = or i64 %24, 2
%38 = getelementptr inbounds double, double* %5, i64 %37
%39 = load double, double* %38
%40 = tail call double @pow(double %39, double %16)
%41 = fmul double %15, %40
%42 = getelementptr inbounds double, double* %6, i64 %37
store double %41, double* %42
%43 = or i64 %24, 3
%44 = getelementptr inbounds double, double* %5, i64 %43
%45 = load double, double* %44
%46 = tail call double @pow(double %45, double %16)
%47 = fmul double %15, %46
%48 = getelementptr inbounds double, double* %6, i64 %43
store double %47, double* %48
%49 = add nuw nsw i64 %24, 4
%50 = add i64 %25, 4
%51 = icmp eq i64 %50, %22
br i1 %51, label %52, label %23
52: ; preds = %23, %14
%53 = phi i64 [ 0, %14 ], [ %49, %23 ]
%54 = icmp eq i64 %19, 0
br i1 %54, label %66, label %55
55: ; preds = %52, %55
%56 = phi i64 [ %63, %55 ], [ %53, %52 ]
%57 = phi i64 [ %64, %55 ], [ 0, %52 ]
%58 = getelementptr inbounds double, double* %5, i64 %56
%59 = load double, double* %58
%60 = tail call double @pow(double %59, double %16)
%61 = fmul double %15, %60
%62 = getelementptr inbounds double, double* %6, i64 %56
store double %61, double* %62
%63 = add nuw nsw i64 %56, 1
%64 = add i64 %57, 1
%65 = icmp eq i64 %64, %19
br i1 %65, label %66, label %55
66: ; preds = %52, %55, %7
ret i32 %12
}