#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 M_E;
void integral_recur(int nmin, int nmax, double vals[]) {
  double vals1[100 + 1];
  vals1[100] = 0.00367843028136748866811;
  for (int i = 99; i >= nmin;
       vals1[i] = vals1[i + 1] / (i + 1) + 1 / (M_E * (i + 1)), i--)
    ;
  int j = 0;
  for (int i = nmin; i <= nmax; i++, j++) {
    vals[j] = vals1[i];
  }
}


x86 assembly (clang, -O0):
<integral_recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2d0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x63,-0x344(%rbp)
mov    -0x344(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     11ae <integral_recur+0xae>
jmp    1140 <integral_recur+0x40>
mov    -0x344(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0x340(%rbp,%rax,8),%xmm0
ff ff
mov    -0x344(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    0x2e74(%rip),%rax
mov    (%rax),%ecx
mov    -0x344(%rbp),%eax
add    $0x1,%eax
imul   %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movslq -0x344(%rbp),%rax
movsd  %xmm0,-0x340(%rbp,%rax,8)
ff ff
mov    -0x344(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x344(%rbp)
jmp    112c <integral_recur+0x2c>
movl   $0x0,-0x348(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x34c(%rbp)
mov    -0x34c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1213 <integral_recur+0x113>
movslq -0x34c(%rbp),%rax
movsd  -0x340(%rbp,%rax,8),%xmm0
ff ff
mov    -0x10(%rbp),%rax
movslq -0x348(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34c(%rbp)
mov    -0x348(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x348(%rbp)
jmp    11c1 <integral_recur+0xc1>
add    $0x2d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integral_recur>:
sub    $0x328,%rsp
movabs $0x3f6e223a384a75f1,%rax
22 6e 3f
mov    %rax,0x320(%rsp)
movslq %edi,%r8
cmp    $0x63,%edi
jg     1188 <integral_recur+0x78>
mov    0x2ea8(%rip),%rax
mov    (%rax),%r9d
imul   $0x64,%r9d,%r10d
movsd  0xeb9(%rip),%xmm0
mov    $0x64,%ecx
nopl   0x0(%rax)
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
lea    0x1(%r10),%eax
cmp    $0x3,%eax
mov    $0x0,%eax
cmovb  %r10d,%eax
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rsp,%rcx,8)
add    $0xffffffffffffffff,%rcx
sub    %r9d,%r10d
cmp    %r8,%rcx
jg     1150 <integral_recur+0x40>
sub    %edi,%esi
jl     11a6 <integral_recur+0x96>
lea    (%rsp,%r8,8),%rax
lea    0x8(,%rsi,8),%rcx
mov    %rdx,%rdi
mov    %rax,%rsi
mov    %rcx,%rdx
call   1030 <memcpy@plt>
add    $0x328,%rsp
ret

LLVM IR (-O0):
@M_E = global i32 0
define void @integral_recur(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca [101 x double]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double* %2, double** %6
%11 = getelementptr inbounds [101 x double], [101 x double]* %7, i64 0, i64 100
store double 0x3F6E223A384A75F1, double* %11
store i32 99, i32* %8
br label %12
12: ; preds = %17, %3
%13 = load i32, i32* %8
%14 = load i32, i32* %4
%15 = icmp sge i32 %13, %14
br i1 %15, label %16, label %39
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %8
%19 = add nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [101 x double], [101 x double]* %7, i64 0, i64 %20
%22 = load double, double* %21
%23 = load i32, i32* %8
%24 = add nsw i32 %23, 1
%25 = sitofp i32 %24 to double
%26 = fdiv double %22, %25
%27 = load i32, i32* @M_E
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
%30 = mul nsw i32 %27, %29
%31 = sdiv i32 1, %30
%32 = sitofp i32 %31 to double
%33 = fadd double %26, %32
%34 = load i32, i32* %8
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [101 x double], [101 x double]* %7, i64 0, i64 %35
store double %33, double* %36
%37 = load i32, i32* %8
%38 = add nsw i32 %37, -1
store i32 %38, i32* %8
br label %12
39: ; preds = %12
store i32 0, i32* %9
%40 = load i32, i32* %4
store i32 %40, i32* %10
br label %41
41: ; preds = %54, %39
%42 = load i32, i32* %10
%43 = load i32, i32* %5
%44 = icmp sle i32 %42, %43
br i1 %44, label %45, label %59
45: ; preds = %41
%46 = load i32, i32* %10
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [101 x double], [101 x double]* %7, i64 0, i64 %47
%49 = load double, double* %48
%50 = load double*, double** %6
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %49, double* %53
br label %54
54: ; preds = %45
%55 = load i32, i32* %10
%56 = add nsw i32 %55, 1
store i32 %56, i32* %10
%57 = load i32, i32* %9
%58 = add nsw i32 %57, 1
store i32 %58, i32* %9
br label %41
59: ; preds = %41
ret void
}

LLVM IR (-O2):
@M_E = global i32 0
define void @integral_recur(i32 %0, i32 %1, double* nocapture writeonly %2) {
%4 = bitcast double* %2 to i8*
%5 = alloca [101 x double]
%6 = bitcast [101 x double]* %5 to i8*
%7 = getelementptr inbounds [101 x double], [101 x double]* %5, i64 0, i64 100
store double 0x3F6E223A384A75F1, double* %7
%8 = icmp sgt i32 %0, 99
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load i32, i32* @M_E
%11 = sext i32 %0 to i64
br label %22
12: ; preds = %22, %3
%13 = icmp slt i32 %1, %0
br i1 %13, label %39, label %14
14: ; preds = %12
%15 = sext i32 %0 to i64
%16 = getelementptr [101 x double], [101 x double]* %5, i64 0, i64 %15
%17 = bitcast double* %16 to i8*
%18 = sub i32 %1, %0
%19 = zext i32 %18 to i64
%20 = shl nuw nsw i64 %19, 3
%21 = add nuw nsw i64 %20, 8
br label %39
22: ; preds = %9, %22
%23 = phi double [ 0x3F6E223A384A75F1, %9 ], [ %35, %22 ]
%24 = phi i64 [ 99, %9 ], [ %37, %22 ]
%25 = add nsw i64 %24, 1
%26 = trunc i64 %25 to i32
%27 = sitofp i32 %26 to double
%28 = fdiv double %23, %27
%29 = trunc i64 %25 to i32
%30 = mul i32 %10, %29
%31 = add i32 %30, 1
%32 = icmp ult i32 %31, 3
%33 = select i1 %32, i32 %30, i32 0
%34 = sitofp i32 %33 to double
%35 = fadd double %28, %34
%36 = getelementptr inbounds [101 x double], [101 x double]* %5, i64 0, i64 %24
store double %35, double* %36
%37 = add nsw i64 %24, -1
%38 = icmp sgt i64 %24, %11
br i1 %38, label %22, label %12
39: ; preds = %14, %12
ret void
}