; LLVM IR from gmedders/pimd :: lib/nhc.ll (ZN5parts3nhc7advanceEmPdRKdS3_S3_)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._ZN5parts3nhc7advanceEmPdRKdS3_S3_ = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN5parts3nhc7advanceEmPdRKdS3_S3_(i64 noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  store i64 %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !9
  %22 = load i64, ptr %6, align 8, !tbaa !5
  %23 = icmp ugt i64 %22, 1
  br i1 %23, label %24, label %31

24:                                               ; preds = %5
  %25 = load ptr, ptr %7, align 8, !tbaa !9
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %31

27:                                               ; preds = %24
  %28 = load ptr, ptr %8, align 8, !tbaa !9
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = fcmp ogt double %29, 0.000000e+00
  br label %31

31:                                               ; preds = %27, %24, %5
  %32 = phi i1 [ false, %24 ], [ false, %5 ], [ %30, %27 ]
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  br label %36

34:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 44, ptr noundef @__PRETTY_FUNCTION__._ZN5parts3nhc7advanceEmPdRKdS3_S3_) #5
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %37, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %38 = load ptr, ptr %11, align 8, !tbaa !9
  %39 = load i64, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds double, ptr %38, i64 %39
  store ptr %40, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %41 = load ptr, ptr %12, align 8, !tbaa !9
  %42 = load i64, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %41, i64 %42
  store ptr %43, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %44 = load ptr, ptr %10, align 8, !tbaa !9
  %45 = load double, ptr %44, align 8, !tbaa !11
  %46 = fdiv double %45, 2.000000e+00
  store double %46, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %47 = load ptr, ptr %10, align 8, !tbaa !9
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = fdiv double %48, 4.000000e+00
  store double %49, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %50 = load ptr, ptr %8, align 8, !tbaa !9
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = fdiv double 1.000000e+00, %51
  %53 = load ptr, ptr %8, align 8, !tbaa !9
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = fdiv double %52, %54
  store double %55, ptr %16, align 8, !tbaa !11
  %56 = load double, ptr %16, align 8, !tbaa !11
  %57 = load ptr, ptr %9, align 8, !tbaa !9
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fsub double %58, 1.000000e+00
  %60 = fmul double %56, %59
  %61 = load ptr, ptr %13, align 8, !tbaa !9
  %62 = getelementptr inbounds double, ptr %61, i64 0
  store double %60, ptr %62, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %63 = load i64, ptr %6, align 8, !tbaa !5
  %64 = sub i64 %63, 1
  store i64 %64, ptr %17, align 8, !tbaa !5
  %65 = load double, ptr %14, align 8, !tbaa !11
  %66 = load ptr, ptr %13, align 8, !tbaa !9
  %67 = load i64, ptr %17, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %66, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !11
  %70 = load ptr, ptr %12, align 8, !tbaa !9
  %71 = load i64, ptr %17, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %70, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = call double @llvm.fmuladd.f64(double %65, double %69, double %73)
  store double %74, ptr %72, align 8, !tbaa !11
  %75 = load ptr, ptr %10, align 8, !tbaa !9
  %76 = load double, ptr %75, align 8, !tbaa !11
  %77 = load ptr, ptr %12, align 8, !tbaa !9
  %78 = load i64, ptr %17, align 8, !tbaa !5
  %79 = getelementptr inbounds double, ptr %77, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !11
  %81 = load ptr, ptr %11, align 8, !tbaa !9
  %82 = load i64, ptr %17, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %81, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = call double @llvm.fmuladd.f64(double %76, double %80, double %84)
  store double %85, ptr %83, align 8, !tbaa !11
  br label %86

86:                                               ; preds = %89, %36
  %87 = load i64, ptr %17, align 8, !tbaa !5
  %88 = icmp ne i64 %87, 0
  br i1 %88, label %89, label %127

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %90 = load double, ptr %15, align 8, !tbaa !11
  %91 = fneg double %90
  %92 = load ptr, ptr %12, align 8, !tbaa !9
  %93 = load i64, ptr %17, align 8, !tbaa !5
  %94 = add i64 %93, -1
  store i64 %94, ptr %17, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %92, i64 %93
  %96 = load double, ptr %95, align 8, !tbaa !11
  %97 = fmul double %91, %96
  %98 = call double @exp(double noundef %97) #6
  store double %98, ptr %18, align 8, !tbaa !11
  %99 = load double, ptr %18, align 8, !tbaa !11
  %100 = load double, ptr %18, align 8, !tbaa !11
  %101 = load ptr, ptr %12, align 8, !tbaa !9
  %102 = load i64, ptr %17, align 8, !tbaa !5
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !11
  %105 = load double, ptr %14, align 8, !tbaa !11
  %106 = load ptr, ptr %13, align 8, !tbaa !9
  %107 = load i64, ptr %17, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %106, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = fmul double %105, %109
  %111 = call double @llvm.fmuladd.f64(double %100, double %104, double %110)
  %112 = fmul double %99, %111
  %113 = load ptr, ptr %12, align 8, !tbaa !9
  %114 = load i64, ptr %17, align 8, !tbaa !5
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  store double %112, ptr %115, align 8, !tbaa !11
  %116 = load ptr, ptr %10, align 8, !tbaa !9
  %117 = load double, ptr %116, align 8, !tbaa !11
  %118 = load ptr, ptr %12, align 8, !tbaa !9
  %119 = load i64, ptr %17, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %118, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !11
  %122 = load ptr, ptr %11, align 8, !tbaa !9
  %123 = load i64, ptr %17, align 8, !tbaa !5
  %124 = getelementptr inbounds double, ptr %122, i64 %123
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = call double @llvm.fmuladd.f64(double %117, double %121, double %125)
  store double %126, ptr %124, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %86, !llvm.loop !13

127:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %128 = load ptr, ptr %10, align 8, !tbaa !9
  %129 = load double, ptr %128, align 8, !tbaa !11
  %130 = fneg double %129
  %131 = load ptr, ptr %12, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %131, i64 0
  %133 = load double, ptr %132, align 8, !tbaa !11
  %134 = fmul double %130, %133
  %135 = call double @exp(double noundef %134) #6
  store double %135, ptr %19, align 8, !tbaa !11
  %136 = load double, ptr %16, align 8, !tbaa !11
  %137 = load ptr, ptr %9, align 8, !tbaa !9
  %138 = load double, ptr %137, align 8, !tbaa !11
  %139 = load double, ptr %19, align 8, !tbaa !11
  %140 = fmul double %138, %139
  %141 = load double, ptr %19, align 8, !tbaa !11
  %142 = call double @llvm.fmuladd.f64(double %140, double %141, double -1.000000e+00)
  %143 = fmul double %136, %142
  %144 = load ptr, ptr %13, align 8, !tbaa !9
  %145 = getelementptr inbounds double, ptr %144, i64 0
  store double %143, ptr %145, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %146 = load double, ptr %15, align 8, !tbaa !11
  %147 = fneg double %146
  %148 = load ptr, ptr %12, align 8, !tbaa !9
  %149 = getelementptr inbounds double, ptr %148, i64 1
  %150 = load double, ptr %149, align 8, !tbaa !11
  %151 = fmul double %147, %150
  %152 = call double @exp(double noundef %151) #6
  store double %152, ptr %20, align 8, !tbaa !11
  %153 = load double, ptr %20, align 8, !tbaa !11
  %154 = load double, ptr %20, align 8, !tbaa !11
  %155 = load ptr, ptr %12, align 8, !tbaa !9
  %156 = getelementptr inbounds double, ptr %155, i64 0
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = load double, ptr %14, align 8, !tbaa !11
  %159 = load ptr, ptr %13, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %159, i64 0
  %161 = load double, ptr %160, align 8, !tbaa !11
  %162 = fmul double %158, %161
  %163 = call double @llvm.fmuladd.f64(double %154, double %157, double %162)
  %164 = fmul double %153, %163
  %165 = load ptr, ptr %12, align 8, !tbaa !9
  %166 = getelementptr inbounds double, ptr %165, i64 0
  store double %164, ptr %166, align 8, !tbaa !11
  store i64 0, ptr %17, align 8, !tbaa !5
  br label %167

167:                                              ; preds = %172, %127
  %168 = load i64, ptr %17, align 8, !tbaa !5
  %169 = add i64 %168, 2
  %170 = load i64, ptr %6, align 8, !tbaa !5
  %171 = icmp ult i64 %169, %170
  br i1 %171, label %172, label %216

172:                                              ; preds = %167
  %173 = load ptr, ptr %12, align 8, !tbaa !9
  %174 = load i64, ptr %17, align 8, !tbaa !5
  %175 = getelementptr inbounds double, ptr %173, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !11
  %177 = load ptr, ptr %12, align 8, !tbaa !9
  %178 = load i64, ptr %17, align 8, !tbaa !5
  %179 = getelementptr inbounds double, ptr %177, i64 %178
  %180 = load double, ptr %179, align 8, !tbaa !11
  %181 = load double, ptr %16, align 8, !tbaa !11
  %182 = fneg double %181
  %183 = call double @llvm.fmuladd.f64(double %176, double %180, double %182)
  %184 = load ptr, ptr %13, align 8, !tbaa !9
  %185 = load i64, ptr %17, align 8, !tbaa !5
  %186 = add i64 %185, 1
  %187 = getelementptr inbounds double, ptr %184, i64 %186
  store double %183, ptr %187, align 8, !tbaa !11
  %188 = load i64, ptr %17, align 8, !tbaa !5
  %189 = add i64 %188, 1
  store i64 %189, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %190 = load double, ptr %15, align 8, !tbaa !11
  %191 = fneg double %190
  %192 = load ptr, ptr %12, align 8, !tbaa !9
  %193 = load i64, ptr %17, align 8, !tbaa !5
  %194 = add i64 %193, 1
  %195 = getelementptr inbounds double, ptr %192, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !11
  %197 = fmul double %191, %196
  %198 = call double @exp(double noundef %197) #6
  store double %198, ptr %21, align 8, !tbaa !11
  %199 = load double, ptr %21, align 8, !tbaa !11
  %200 = load double, ptr %21, align 8, !tbaa !11
  %201 = load ptr, ptr %12, align 8, !tbaa !9
  %202 = load i64, ptr %17, align 8, !tbaa !5
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !11
  %205 = load double, ptr %14, align 8, !tbaa !11
  %206 = load ptr, ptr %13, align 8, !tbaa !9
  %207 = load i64, ptr %17, align 8, !tbaa !5
  %208 = getelementptr inbounds double, ptr %206, i64 %207
  %209 = load double, ptr %208, align 8, !tbaa !11
  %210 = fmul double %205, %209
  %211 = call double @llvm.fmuladd.f64(double %200, double %204, double %210)
  %212 = fmul double %199, %211
  %213 = load ptr, ptr %12, align 8, !tbaa !9
  %214 = load i64, ptr %17, align 8, !tbaa !5
  %215 = getelementptr inbounds double, ptr %213, i64 %214
  store double %212, ptr %215, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %167, !llvm.loop !15

216:                                              ; preds = %167
  %217 = load ptr, ptr %12, align 8, !tbaa !9
  %218 = load i64, ptr %17, align 8, !tbaa !5
  %219 = getelementptr inbounds double, ptr %217, i64 %218
  %220 = load double, ptr %219, align 8, !tbaa !11
  %221 = load ptr, ptr %12, align 8, !tbaa !9
  %222 = load i64, ptr %17, align 8, !tbaa !5
  %223 = getelementptr inbounds double, ptr %221, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !11
  %225 = load double, ptr %16, align 8, !tbaa !11
  %226 = fneg double %225
  %227 = call double @llvm.fmuladd.f64(double %220, double %224, double %226)
  %228 = load ptr, ptr %13, align 8, !tbaa !9
  %229 = load i64, ptr %17, align 8, !tbaa !5
  %230 = add i64 %229, 1
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  store double %227, ptr %231, align 8, !tbaa !11
  %232 = load i64, ptr %17, align 8, !tbaa !5
  %233 = add i64 %232, 1
  store i64 %233, ptr %17, align 8, !tbaa !5
  %234 = load double, ptr %14, align 8, !tbaa !11
  %235 = load ptr, ptr %13, align 8, !tbaa !9
  %236 = load i64, ptr %17, align 8, !tbaa !5
  %237 = getelementptr inbounds double, ptr %235, i64 %236
  %238 = load double, ptr %237, align 8, !tbaa !11
  %239 = load ptr, ptr %12, align 8, !tbaa !9
  %240 = load i64, ptr %17, align 8, !tbaa !5
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  %242 = load double, ptr %241, align 8, !tbaa !11
  %243 = call double @llvm.fmuladd.f64(double %234, double %238, double %242)
  store double %243, ptr %241, align 8, !tbaa !11
  %244 = load double, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret double %244
}

; Function Attrs: nounwind
declare double @exp(double noundef) #4

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._ZN5parts3nhc7advanceEmPdRKdS3_S3_ = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN5parts3nhc7advanceEmPdRKdS3_S3_(i64 noundef %0, ptr noundef %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %3, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %4) local_unnamed_addr #2 {
  %6 = icmp ugt i64 %0, 1
  %7 = icmp ne ptr %1, null
  %or.cond = and i1 %6, %7
  br i1 %or.cond, label %8, label %.critedge

8:                                                ; preds = %5
  %9 = load double, ptr %2, align 8, !tbaa !5
  %10 = fcmp ogt double %9, 0.000000e+00
  br i1 %10, label %.lr.ph, label %.critedge

.critedge:                                        ; preds = %5, %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 44, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5parts3nhc7advanceEmPdRKdS3_S3_) #4
  unreachable

.lr.ph:                                           ; preds = %8
  %11 = getelementptr inbounds double, ptr %1, i64 %0
  %12 = getelementptr inbounds double, ptr %11, i64 %0
  %13 = load double, ptr %4, align 8, !tbaa !5
  %14 = fmul double %13, 5.000000e-01
  %15 = fdiv double 1.000000e+00, %9
  %16 = fdiv double %15, %9
  %17 = load double, ptr %3, align 8, !tbaa !5
  %18 = fadd double %17, -1.000000e+00
  %19 = fmul double %16, %18
  store double %19, ptr %12, align 8, !tbaa !5
  %20 = add i64 %0, -1
  %21 = getelementptr inbounds double, ptr %12, i64 %20
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds double, ptr %11, i64 %20
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = tail call double @llvm.fmuladd.f64(double %14, double %22, double %24)
  store double %25, ptr %23, align 8, !tbaa !5
  %26 = load double, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds double, ptr %1, i64 %20
  %28 = load double, ptr %27, align 8, !tbaa !5
  %29 = tail call double @llvm.fmuladd.f64(double %26, double %25, double %28)
  store double %29, ptr %27, align 8, !tbaa !5
  %30 = fmul double %13, -2.500000e-01
  %.pre = load double, ptr %23, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %.lr.ph, %31
  %32 = phi double [ %.pre, %.lr.ph ], [ %42, %31 ]
  %.099 = phi i64 [ %20, %.lr.ph ], [ %33, %31 ]
  %33 = add i64 %.099, -1
  %34 = fmul double %32, %30
  %35 = tail call double @exp(double noundef %34) #5
  %36 = getelementptr inbounds double, ptr %11, i64 %33
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds double, ptr %12, i64 %33
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = fmul double %14, %39
  %41 = tail call double @llvm.fmuladd.f64(double %35, double %37, double %40)
  %42 = fmul double %35, %41
  store double %42, ptr %36, align 8, !tbaa !5
  %43 = load double, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds double, ptr %1, i64 %33
  %45 = load double, ptr %44, align 8, !tbaa !5
  %46 = tail call double @llvm.fmuladd.f64(double %43, double %42, double %45)
  store double %46, ptr %44, align 8, !tbaa !5
  %.not = icmp eq i64 %33, 0
  br i1 %.not, label %._crit_edge, label %31, !llvm.loop !9

._crit_edge:                                      ; preds = %31
  %47 = load double, ptr %4, align 8, !tbaa !5
  %48 = fneg double %47
  %49 = load double, ptr %11, align 8, !tbaa !5
  %50 = fmul double %49, %48
  %51 = tail call double @exp(double noundef %50) #5
  %52 = load double, ptr %3, align 8, !tbaa !5
  %53 = fmul double %51, %52
  %54 = tail call double @llvm.fmuladd.f64(double %53, double %51, double -1.000000e+00)
  %55 = fmul double %16, %54
  store double %55, ptr %12, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %11, i64 8
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fmul double %57, %30
  %59 = tail call double @exp(double noundef %58) #5
  %60 = load double, ptr %11, align 8, !tbaa !5
  %61 = load double, ptr %12, align 8, !tbaa !5
  %62 = fmul double %14, %61
  %63 = tail call double @llvm.fmuladd.f64(double %59, double %60, double %62)
  %64 = fmul double %59, %63
  store double %64, ptr %11, align 8, !tbaa !5
  %65 = icmp ugt i64 %0, 2
  %66 = fneg double %16
  br i1 %65, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %._crit_edge
  %67 = add i64 %0, -2
  %invariant.gep = getelementptr i8, ptr %11, i64 16
  br label %68

68:                                               ; preds = %.lr.ph102, %68
  %69 = phi double [ %64, %.lr.ph102 ], [ %81, %68 ]
  %.1100 = phi i64 [ 0, %.lr.ph102 ], [ %71, %68 ]
  %70 = tail call double @llvm.fmuladd.f64(double %69, double %69, double %66)
  %71 = add nuw i64 %.1100, 1
  %72 = getelementptr inbounds double, ptr %12, i64 %71
  store double %70, ptr %72, align 8, !tbaa !5
  %gep = getelementptr double, ptr %invariant.gep, i64 %.1100
  %73 = load double, ptr %gep, align 8, !tbaa !5
  %74 = fmul double %73, %30
  %75 = tail call double @exp(double noundef %74) #5
  %76 = getelementptr inbounds double, ptr %11, i64 %71
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = load double, ptr %72, align 8, !tbaa !5
  %79 = fmul double %14, %78
  %80 = tail call double @llvm.fmuladd.f64(double %75, double %77, double %79)
  %81 = fmul double %75, %80
  store double %81, ptr %76, align 8, !tbaa !5
  %exitcond.not = icmp eq i64 %71, %67
  br i1 %exitcond.not, label %._crit_edge103.loopexit, label %68, !llvm.loop !11

._crit_edge103.loopexit:                          ; preds = %68
  %.phi.trans.insert = getelementptr inbounds double, ptr %11, i64 %67
  %.pre104 = load double, ptr %.phi.trans.insert, align 8, !tbaa !5
  %82 = add i64 %0, -1
  br label %._crit_edge103

._crit_edge103:                                   ; preds = %._crit_edge, %._crit_edge103.loopexit
  %83 = phi double [ %.pre104, %._crit_edge103.loopexit ], [ %64, %._crit_edge ]
  %.1.lcssa = phi i64 [ %82, %._crit_edge103.loopexit ], [ 1, %._crit_edge ]
  %84 = tail call double @llvm.fmuladd.f64(double %83, double %83, double %66)
  %85 = getelementptr inbounds double, ptr %12, i64 %.1.lcssa
  store double %84, ptr %85, align 8, !tbaa !5
  %86 = getelementptr inbounds double, ptr %11, i64 %.1.lcssa
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = tail call double @llvm.fmuladd.f64(double %14, double %84, double %87)
  store double %88, ptr %86, align 8, !tbaa !5
  ret double %51
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #3

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass