; LLVM IR from Wodnerstruck/CPP-Quantum-Chemistry-Practice :: Project1-Molecular-Geometry-Analysis/src/molecule.ll (ZN8Molecule8dihedralEiiii)

; 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"

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN8Molecule5angleEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) #2 align 2

; Function Attrs: nounwind
declare double @acos(double noundef) #3

; Function Attrs: nounwind
declare double @sin(double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN8Molecule8dihedralEiiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #2 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %23 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %24, i32 noundef %25, i32 noundef 1)
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %27, i32 noundef %28, i32 noundef 2)
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %30, i32 noundef %31, i32 noundef 2)
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %33, i32 noundef %34, i32 noundef 1)
  %36 = fmul double %32, %35
  %37 = fneg double %36
  %38 = call double @llvm.fmuladd.f64(double %26, double %29, double %37)
  store double %38, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %39, i32 noundef %40, i32 noundef 2)
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %42, i32 noundef %43, i32 noundef 0)
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %45, i32 noundef %46, i32 noundef 0)
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %48, i32 noundef %49, i32 noundef 2)
  %51 = fmul double %47, %50
  %52 = fneg double %51
  %53 = call double @llvm.fmuladd.f64(double %41, double %44, double %52)
  store double %53, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %54, i32 noundef %55, i32 noundef 0)
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %57, i32 noundef %58, i32 noundef 1)
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %60, i32 noundef %61, i32 noundef 1)
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %63, i32 noundef %64, i32 noundef 0)
  %66 = fmul double %62, %65
  %67 = fneg double %66
  %68 = call double @llvm.fmuladd.f64(double %56, double %59, double %67)
  store double %68, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %69, i32 noundef %70, i32 noundef 1)
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %72, i32 noundef %73, i32 noundef 2)
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %75, i32 noundef %76, i32 noundef 2)
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %78, i32 noundef %79, i32 noundef 1)
  %81 = fmul double %77, %80
  %82 = fneg double %81
  %83 = call double @llvm.fmuladd.f64(double %71, double %74, double %82)
  store double %83, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %84, i32 noundef %85, i32 noundef 2)
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %87, i32 noundef %88, i32 noundef 0)
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %90, i32 noundef %91, i32 noundef 0)
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %93, i32 noundef %94, i32 noundef 2)
  %96 = fmul double %92, %95
  %97 = fneg double %96
  %98 = call double @llvm.fmuladd.f64(double %86, double %89, double %97)
  store double %98, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %99, i32 noundef %100, i32 noundef 0)
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %102, i32 noundef %103, i32 noundef 1)
  %105 = load i32, ptr %8, align 4, !tbaa !9
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %105, i32 noundef %106, i32 noundef 1)
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %108, i32 noundef %109, i32 noundef 0)
  %111 = fmul double %107, %110
  %112 = fneg double %111
  %113 = call double @llvm.fmuladd.f64(double %101, double %104, double %112)
  store double %113, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %114 = load double, ptr %11, align 8, !tbaa !11
  %115 = load double, ptr %14, align 8, !tbaa !11
  %116 = load double, ptr %12, align 8, !tbaa !11
  %117 = load double, ptr %15, align 8, !tbaa !11
  %118 = fmul double %116, %117
  %119 = call double @llvm.fmuladd.f64(double %114, double %115, double %118)
  %120 = load double, ptr %13, align 8, !tbaa !11
  %121 = load double, ptr %16, align 8, !tbaa !11
  %122 = call double @llvm.fmuladd.f64(double %120, double %121, double %119)
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = call noundef double @_ZN8Molecule5angleEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %123, i32 noundef %124, i32 noundef %125)
  %127 = call double @sin(double noundef %126) #4
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = call noundef double @_ZN8Molecule5angleEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %128, i32 noundef %129, i32 noundef %130)
  %132 = call double @sin(double noundef %131) #4
  %133 = fmul double %127, %132
  %134 = fdiv double %122, %133
  store double %134, ptr %17, align 8, !tbaa !11
  %135 = load double, ptr %17, align 8, !tbaa !11
  %136 = fcmp ogt double %135, 1.000000e+00
  br i1 %136, label %137, label %139

137:                                              ; preds = %5
  %138 = call double @acos(double noundef 1.000000e+00) #4
  store double %138, ptr %17, align 8, !tbaa !11
  br label %148

139:                                              ; preds = %5
  %140 = load double, ptr %17, align 8, !tbaa !11
  %141 = fcmp olt double %140, -1.000000e+00
  br i1 %141, label %142, label %144

142:                                              ; preds = %139
  %143 = call double @acos(double noundef -1.000000e+00) #4
  store double %143, ptr %17, align 8, !tbaa !11
  br label %147

144:                                              ; preds = %139
  %145 = load double, ptr %17, align 8, !tbaa !11
  %146 = call double @acos(double noundef %145) #4
  store double %146, ptr %17, align 8, !tbaa !11
  br label %147

147:                                              ; preds = %144, %142
  br label %148

148:                                              ; preds = %147, %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %149 = load double, ptr %12, align 8, !tbaa !11
  %150 = load double, ptr %16, align 8, !tbaa !11
  %151 = load double, ptr %13, align 8, !tbaa !11
  %152 = load double, ptr %15, align 8, !tbaa !11
  %153 = fmul double %151, %152
  %154 = fneg double %153
  %155 = call double @llvm.fmuladd.f64(double %149, double %150, double %154)
  store double %155, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %156 = load double, ptr %13, align 8, !tbaa !11
  %157 = load double, ptr %14, align 8, !tbaa !11
  %158 = load double, ptr %11, align 8, !tbaa !11
  %159 = load double, ptr %16, align 8, !tbaa !11
  %160 = fmul double %158, %159
  %161 = fneg double %160
  %162 = call double @llvm.fmuladd.f64(double %156, double %157, double %161)
  store double %162, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %163 = load double, ptr %11, align 8, !tbaa !11
  %164 = load double, ptr %12, align 8, !tbaa !11
  %165 = load double, ptr %12, align 8, !tbaa !11
  %166 = load double, ptr %14, align 8, !tbaa !11
  %167 = fmul double %165, %166
  %168 = fneg double %167
  %169 = call double @llvm.fmuladd.f64(double %163, double %164, double %168)
  store double %169, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  store double 1.000000e+00, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %170 = load double, ptr %18, align 8, !tbaa !11
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = load i32, ptr %9, align 4, !tbaa !9
  %173 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %171, i32 noundef %172, i32 noundef 0)
  %174 = load double, ptr %19, align 8, !tbaa !11
  %175 = load i32, ptr %8, align 4, !tbaa !9
  %176 = load i32, ptr %9, align 4, !tbaa !9
  %177 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %175, i32 noundef %176, i32 noundef 1)
  %178 = fmul double %174, %177
  %179 = call double @llvm.fmuladd.f64(double %170, double %173, double %178)
  %180 = load double, ptr %20, align 8, !tbaa !11
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = load i32, ptr %9, align 4, !tbaa !9
  %183 = call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %181, i32 noundef %182, i32 noundef 2)
  %184 = call double @llvm.fmuladd.f64(double %180, double %183, double %179)
  store double %184, ptr %22, align 8, !tbaa !11
  %185 = load double, ptr %22, align 8, !tbaa !11
  %186 = fcmp olt double %185, 0.000000e+00
  br i1 %186, label %187, label %188

187:                                              ; preds = %148
  store double -1.000000e+00, ptr %21, align 8, !tbaa !11
  br label %188

188:                                              ; preds = %187, %148
  %189 = load double, ptr %17, align 8, !tbaa !11
  %190 = load double, ptr %21, align 8, !tbaa !11
  %191 = fmul double %189, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret double %191
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #4 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}


; 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"

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN8Molecule5angleEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN8Molecule8dihedralEiiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #1 align 2 {
  %6 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef 1)
  %7 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 2)
  %8 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef 2)
  %9 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 1)
  %10 = fneg double %8
  %11 = fmul double %9, %10
  %12 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %11)
  %13 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef 2)
  %14 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 0)
  %15 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef 0)
  %16 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 2)
  %17 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef 0)
  %18 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 1)
  %19 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef 1)
  %20 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 0)
  %21 = fneg double %19
  %22 = fmul double %20, %21
  %23 = tail call double @llvm.fmuladd.f64(double %17, double %18, double %22)
  %24 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 1)
  %25 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %3, i32 noundef %4, i32 noundef 2)
  %26 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 2)
  %27 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %3, i32 noundef %4, i32 noundef 1)
  %28 = fneg double %26
  %29 = fmul double %27, %28
  %30 = tail call double @llvm.fmuladd.f64(double %24, double %25, double %29)
  %31 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 2)
  %32 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %3, i32 noundef %4, i32 noundef 0)
  %33 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 0)
  %34 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %3, i32 noundef %4, i32 noundef 2)
  %35 = insertelement <2 x double> poison, double %15, i64 0
  %36 = insertelement <2 x double> %35, double %33, i64 1
  %37 = fneg <2 x double> %36
  %38 = insertelement <2 x double> poison, double %16, i64 0
  %39 = insertelement <2 x double> %38, double %34, i64 1
  %40 = fmul <2 x double> %39, %37
  %41 = insertelement <2 x double> poison, double %13, i64 0
  %42 = insertelement <2 x double> %41, double %31, i64 1
  %43 = insertelement <2 x double> poison, double %14, i64 0
  %44 = insertelement <2 x double> %43, double %32, i64 1
  %45 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %42, <2 x double> %44, <2 x double> %40)
  %46 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 0)
  %47 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %3, i32 noundef %4, i32 noundef 1)
  %48 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 1)
  %49 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %3, i32 noundef %4, i32 noundef 0)
  %50 = fneg double %48
  %51 = fmul double %49, %50
  %52 = tail call double @llvm.fmuladd.f64(double %46, double %47, double %51)
  %53 = extractelement <2 x double> %45, i64 0
  %54 = extractelement <2 x double> %45, i64 1
  %55 = fmul double %53, %54
  %56 = tail call double @llvm.fmuladd.f64(double %12, double %30, double %55)
  %57 = tail call double @llvm.fmuladd.f64(double %23, double %52, double %56)
  %58 = tail call noundef double @_ZN8Molecule5angleEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3)
  %59 = tail call double @sin(double noundef %58) #4
  %60 = tail call noundef double @_ZN8Molecule5angleEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  %61 = tail call double @sin(double noundef %60) #4
  %62 = fmul double %59, %61
  %63 = fdiv double %57, %62
  %64 = fcmp ogt double %63, 1.000000e+00
  br i1 %64, label %69, label %65

65:                                               ; preds = %5
  %66 = fcmp olt double %63, -1.000000e+00
  br i1 %66, label %69, label %67

67:                                               ; preds = %65
  %68 = tail call double @acos(double noundef %63) #4
  br label %69

69:                                               ; preds = %65, %5, %67
  %.0 = phi double [ %68, %67 ], [ 0.000000e+00, %5 ], [ 0x400921FB54442D18, %65 ]
  %70 = fneg double %23
  %71 = fmul double %54, %70
  %72 = tail call double @llvm.fmuladd.f64(double %53, double %52, double %71)
  %73 = fneg double %12
  %74 = fmul double %52, %73
  %75 = tail call double @llvm.fmuladd.f64(double %23, double %30, double %74)
  %76 = fneg double %53
  %77 = fmul double %30, %76
  %78 = tail call double @llvm.fmuladd.f64(double %12, double %53, double %77)
  %79 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 0)
  %80 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 1)
  %81 = fmul double %75, %80
  %82 = tail call double @llvm.fmuladd.f64(double %72, double %79, double %81)
  %83 = tail call noundef double @_ZN8Molecule4unitEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %2, i32 noundef %3, i32 noundef 2)
  %84 = tail call double @llvm.fmuladd.f64(double %78, double %83, double %82)
  %85 = fcmp olt double %84, 0.000000e+00
  %86 = fneg double %.0
  %87 = select i1 %85, double %86, double %.0
  ret double %87
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass