#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 exp(double);
void update_nu(double *nu, double *t) {
  int i, j;
  double ref_nu = 1.;
  double ref_temp = 500.;
  double theta = 1.5;
#pragma omp parallel for
  for (j = 0; j < 51; j++) {
    for (i = 0; i < 101; i++) {
      nu[101 * j + i] =
          ref_nu * exp(-theta * ((t[101 * j + i] - ref_temp) / ref_temp));
    }
  }
}


x86 assembly (clang, -O0):
<update_nu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x33,-0x18(%rbp)
jge    11f5 <update_nu+0xe5>
movl   $0x0,-0x14(%rbp)
cmpl   $0x65,-0x14(%rbp)
jge    11e2 <update_nu+0xd2>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
imul   $0x65,-0x18(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
imul   $0x65,-0x18(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115f <update_nu+0x4f>
jmp    11e7 <update_nu+0xd7>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114e <update_nu+0x3e>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_nu>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
xor    %r15d,%r15d
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm2
movsd  0xed7(%rip),%xmm3
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r14,%rbx,8),%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
call   1030 <exp@plt>
movsd  0xea1(%rip),%xmm3
movsd  0xe91(%rip),%xmm2
movsd  0xe81(%rip),%xmm1
movsd  %xmm0,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    $0x65,%rbx
jne    1150 <update_nu+0x40>
add    $0x1,%r15
add    $0x328,%r12
add    $0x328,%r14
cmp    $0x33,%r15
jne    1140 <update_nu+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @update_nu(double* nocapture writeonly %0, double* nocapture %1) {
br label %3
3: ; preds = %2, %18
%4 = phi i64 [ 0, %2 ], [ %19, %18 ]
%5 = mul nuw nsw i64 %4, 101
br label %6
6: ; preds = %3, %6
%7 = phi i64 [ 0, %3 ], [ %16, %6 ]
%8 = add nuw nsw i64 %7, %5
%9 = getelementptr inbounds double, double* %1, i64 %8
%10 = load double, double* %9
%11 = fadd double %10, -5.000000e+02
%12 = fdiv double %11, 5.000000e+02
%13 = fmul double %12, -1.500000e+00
%14 = tail call double @exp(double %13)
%15 = getelementptr inbounds double, double* %0, i64 %8
store double %14, double* %15
%16 = add nuw nsw i64 %7, 1
%17 = icmp eq i64 %16, 101
br i1 %17, label %18, label %6
18: ; preds = %6
%19 = add nuw nsw i64 %4, 1
%20 = icmp eq i64 %19, 51
br i1 %20, label %21, label %3
21: ; preds = %18
ret void
}