; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_kinematics)

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

%struct._RcsGraph = type { ptr, [10 x %struct._RcsBody], i32, i32, ptr, ptr, ptr, ptr, ptr }
%struct._RcsBody = type { double, i8, i32, [3 x double], [3 x double], double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._RcsJoint = type { ptr, double, double, double, double, double, double, double, i8, i32, i32, i32, i32, ptr, %struct.HTr, double, double, double, double, i32, ptr, ptr, ptr, ptr, ptr }
%struct.HTr = type { [3 x double], [3 x [3 x double]] }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

; 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

declare void @MatNd_reshapeAndSetZero(ptr noundef, i32 noundef, i32 noundef) #1

declare ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local double @RcsGraph_jointLimitGradient(ptr noundef %0, ptr noundef %1, i32 noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 0.000000e+00, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %22

18:                                               ; preds = %3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._RcsGraph, ptr %19, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !13
  br label %26

22:                                               ; preds = %3
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._RcsGraph, ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 4, !tbaa !15
  br label %26

26:                                               ; preds = %22, %18
  %27 = phi i32 [ %21, %18 ], [ %25, %22 ]
  store i32 %27, ptr %8, align 4, !tbaa !9
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = load i32, ptr %8, align 4, !tbaa !9
  call void @MatNd_reshapeAndSetZero(ptr noundef %28, i32 noundef 1, i32 noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._RcsGraph, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  store ptr %32, ptr %9, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %126, %26
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %129

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._RcsBody, ptr %38, i32 0, i32 18
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  store ptr %40, ptr %11, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %121, %37
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %125

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._RcsJoint, ptr %46, i32 0, i32 4
  %48 = load double, ptr %47, align 8, !tbaa !20
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._RcsJoint, ptr %49, i32 0, i32 3
  %51 = load double, ptr %50, align 8, !tbaa !23
  %52 = fsub double %48, %51
  store double %52, ptr %12, align 8, !tbaa !11
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._RcsJoint, ptr %53, i32 0, i32 12
  %55 = load i32, ptr %54, align 8, !tbaa !24
  %56 = icmp ne i32 %55, -1
  br i1 %56, label %57, label %120

57:                                               ; preds = %45
  %58 = load double, ptr %12, align 8, !tbaa !11
  %59 = fcmp ogt double %58, 0.000000e+00
  br i1 %59, label %60, label %120

60:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._RcsGraph, ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !25
  %64 = getelementptr inbounds %struct._MatNd, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !26
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._RcsJoint, ptr %66, i32 0, i32 11
  %68 = load i32, ptr %67, align 4, !tbaa !28
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._RcsGraph, ptr %69, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = getelementptr inbounds %struct._MatNd, ptr %71, i32 0, i32 2
  %73 = load i32, ptr %72, align 4, !tbaa !29
  %74 = mul i32 %68, %73
  %75 = add i32 %74, 0
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %65, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !11
  store double %78, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %79 = load double, ptr %13, align 8, !tbaa !11
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._RcsJoint, ptr %80, i32 0, i32 1
  %82 = load double, ptr %81, align 8, !tbaa !30
  %83 = fsub double %79, %82
  store double %83, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %86, label %90

86:                                               ; preds = %60
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._RcsJoint, ptr %87, i32 0, i32 12
  %89 = load i32, ptr %88, align 8, !tbaa !24
  br label %94

90:                                               ; preds = %60
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._RcsJoint, ptr %91, i32 0, i32 11
  %93 = load i32, ptr %92, align 4, !tbaa !28
  br label %94

94:                                               ; preds = %90, %86
  %95 = phi i32 [ %89, %86 ], [ %93, %90 ]
  store i32 %95, ptr %15, align 4, !tbaa !9
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._RcsJoint, ptr %96, i32 0, i32 5
  %98 = load double, ptr %97, align 8, !tbaa !31
  %99 = load double, ptr %14, align 8, !tbaa !11
  %100 = fmul double %98, %99
  %101 = load double, ptr %12, align 8, !tbaa !11
  %102 = load double, ptr %12, align 8, !tbaa !11
  %103 = fmul double %101, %102
  %104 = fdiv double %100, %103
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._MatNd, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !26
  %108 = load i32, ptr %15, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  store double %104, ptr %110, align 8, !tbaa !11
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._RcsJoint, ptr %111, i32 0, i32 5
  %113 = load double, ptr %112, align 8, !tbaa !31
  %114 = load double, ptr %14, align 8, !tbaa !11
  %115 = load double, ptr %12, align 8, !tbaa !11
  %116 = fdiv double %114, %115
  %117 = call double @pow(double noundef %116, double noundef 2.000000e+00) #5
  %118 = load double, ptr %7, align 8, !tbaa !11
  %119 = call double @llvm.fmuladd.f64(double %113, double %117, double %118)
  store double %119, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %120

120:                                              ; preds = %94, %57, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._RcsJoint, ptr %122, i32 0, i32 23
  %124 = load ptr, ptr %123, align 8, !tbaa !32
  store ptr %124, ptr %11, align 8, !tbaa !5
  br label %41, !llvm.loop !33

125:                                              ; preds = %44
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef %127)
  store ptr %128, ptr %9, align 8, !tbaa !5
  br label %33, !llvm.loop !35

129:                                              ; preds = %36
  %130 = load double, ptr %7, align 8, !tbaa !11
  %131 = fmul double 5.000000e-01, %130
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret double %131
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 1848}
!14 = !{!"_RcsGraph", !6, i64 0, !7, i64 8, !10, i64 1848, !10, i64 1852, !6, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888}
!15 = !{!14, !10, i64 1852}
!16 = !{!14, !6, i64 0}
!17 = !{!18, !6, i64 168}
!18 = !{!"_RcsBody", !12, i64 0, !19, i64 8, !10, i64 12, !7, i64 16, !7, i64 40, !12, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!21, !12, i64 32}
!21 = !{!"_RcsJoint", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !19, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !6, i64 88, !22, i64 96, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !10, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264}
!22 = !{!"", !7, i64 0, !7, i64 24}
!23 = !{!21, !12, i64 24}
!24 = !{!21, !10, i64 80}
!25 = !{!14, !6, i64 1856}
!26 = !{!27, !6, i64 0}
!27 = !{!"_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !19, i64 20}
!28 = !{!21, !10, i64 76}
!29 = !{!27, !10, i64 12}
!30 = !{!21, !12, i64 8}
!31 = !{!21, !12, i64 40}
!32 = !{!21, !6, i64 256}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


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

declare void @MatNd_reshapeAndSetZero(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare ptr @RcsBody_depthFirstTraversalGetNext(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: nounwind uwtable
define dso_local double @RcsGraph_jointLimitGradient(ptr nocapture noundef readonly %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = icmp eq i32 %2, 0
  %.in.v = select i1 %4, i64 1848, i64 1852
  %.in = getelementptr inbounds i8, ptr %0, i64 %.in.v
  %5 = load i32, ptr %.in, align 4, !tbaa !5
  tail call void @MatNd_reshapeAndSetZero(ptr noundef %1, i32 noundef 1, i32 noundef %5) #3
  %6 = load ptr, ptr %0, align 8, !tbaa !9
  %.not43 = icmp eq ptr %6, null
  br i1 %.not43, label %._crit_edge48, label %.lr.ph47

.lr.ph47:                                         ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 1856
  %8 = icmp eq i32 %2, 1
  br i1 %8, label %.lr.ph47.split.us, label %.lr.ph47.split

.lr.ph47.split.us:                                ; preds = %.lr.ph47, %._crit_edge.split.us.us
  %.045.us = phi double [ %.1.lcssa.us, %._crit_edge.split.us.us ], [ 0.000000e+00, %.lr.ph47 ]
  %.03444.us = phi ptr [ %10, %._crit_edge.split.us.us ], [ %6, %.lr.ph47 ]
  %9 = getelementptr inbounds i8, ptr %.03444.us, i64 168
  %.03539.us = load ptr, ptr %9, align 8, !tbaa !12
  %.not3840.us = icmp eq ptr %.03539.us, null
  br i1 %.not3840.us, label %._crit_edge.split.us.us, label %.lr.ph.us

._crit_edge.split.us.us:                          ; preds = %45, %.lr.ph47.split.us
  %.1.lcssa.us = phi double [ %.045.us, %.lr.ph47.split.us ], [ %.2.us.us, %45 ]
  %10 = tail call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef nonnull %.03444.us) #3
  %.not.us = icmp eq ptr %10, null
  br i1 %.not.us, label %._crit_edge48, label %.lr.ph47.split.us, !llvm.loop !13

.lr.ph.us:                                        ; preds = %.lr.ph47.split.us, %45
  %.03542.us.us = phi ptr [ %.035.us.us, %45 ], [ %.03539.us, %.lr.ph47.split.us ]
  %.141.us.us = phi double [ %.2.us.us, %45 ], [ %.045.us, %.lr.ph47.split.us ]
  %11 = getelementptr inbounds i8, ptr %.03542.us.us, i64 32
  %12 = load double, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %.03542.us.us, i64 24
  %14 = load double, ptr %13, align 8, !tbaa !20
  %15 = fsub double %12, %14
  %16 = getelementptr inbounds i8, ptr %.03542.us.us, i64 80
  %17 = load i32, ptr %16, align 8, !tbaa !21
  %18 = icmp ne i32 %17, -1
  %19 = fcmp ogt double %15, 0.000000e+00
  %or.cond.us.us = select i1 %18, i1 %19, i1 false
  br i1 %or.cond.us.us, label %20, label %45

20:                                               ; preds = %.lr.ph.us
  %21 = load ptr, ptr %7, align 8, !tbaa !22
  %22 = load ptr, ptr %21, align 8, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %.03542.us.us, i64 76
  %24 = load i32, ptr %23, align 4, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %21, i64 12
  %26 = load i32, ptr %25, align 4, !tbaa !26
  %27 = mul i32 %26, %24
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %22, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !27
  %31 = getelementptr inbounds i8, ptr %.03542.us.us, i64 8
  %32 = load double, ptr %31, align 8, !tbaa !28
  %33 = fsub double %30, %32
  %34 = getelementptr inbounds i8, ptr %.03542.us.us, i64 40
  %35 = load double, ptr %34, align 8, !tbaa !29
  %36 = fmul double %35, %33
  %37 = fmul double %15, %15
  %38 = fdiv double %36, %37
  %39 = load ptr, ptr %1, align 8, !tbaa !23
  %40 = sext i32 %17 to i64
  %41 = getelementptr inbounds double, ptr %39, i64 %40
  store double %38, ptr %41, align 8, !tbaa !27
  %42 = load double, ptr %34, align 8, !tbaa !29
  %43 = fdiv double %33, %15
  %square.us.us = fmul double %43, %43
  %44 = tail call double @llvm.fmuladd.f64(double %42, double %square.us.us, double %.141.us.us)
  br label %45

45:                                               ; preds = %20, %.lr.ph.us
  %.2.us.us = phi double [ %44, %20 ], [ %.141.us.us, %.lr.ph.us ]
  %46 = getelementptr inbounds i8, ptr %.03542.us.us, i64 256
  %.035.us.us = load ptr, ptr %46, align 8, !tbaa !12
  %.not38.us.us = icmp eq ptr %.035.us.us, null
  br i1 %.not38.us.us, label %._crit_edge.split.us.us, label %.lr.ph.us, !llvm.loop !30

._crit_edge48:                                    ; preds = %._crit_edge.split, %._crit_edge.split.us.us, %3
  %.0.lcssa = phi double [ 0.000000e+00, %3 ], [ %.1.lcssa.us, %._crit_edge.split.us.us ], [ %.1.lcssa, %._crit_edge.split ]
  %47 = fmul double %.0.lcssa, 5.000000e-01
  ret double %47

.lr.ph47.split:                                   ; preds = %.lr.ph47, %._crit_edge.split
  %.045 = phi double [ %.1.lcssa, %._crit_edge.split ], [ 0.000000e+00, %.lr.ph47 ]
  %.03444 = phi ptr [ %49, %._crit_edge.split ], [ %6, %.lr.ph47 ]
  %48 = getelementptr inbounds i8, ptr %.03444, i64 168
  %.03539 = load ptr, ptr %48, align 8, !tbaa !12
  %.not3840 = icmp eq ptr %.03539, null
  br i1 %.not3840, label %._crit_edge.split, label %.lr.ph

._crit_edge.split:                                ; preds = %84, %.lr.ph47.split
  %.1.lcssa = phi double [ %.045, %.lr.ph47.split ], [ %.2, %84 ]
  %49 = tail call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef nonnull %.03444) #3
  %.not = icmp eq ptr %49, null
  br i1 %.not, label %._crit_edge48, label %.lr.ph47.split, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph47.split, %84
  %.03542 = phi ptr [ %.035, %84 ], [ %.03539, %.lr.ph47.split ]
  %.141 = phi double [ %.2, %84 ], [ %.045, %.lr.ph47.split ]
  %50 = getelementptr inbounds i8, ptr %.03542, i64 32
  %51 = load double, ptr %50, align 8, !tbaa !15
  %52 = getelementptr inbounds i8, ptr %.03542, i64 24
  %53 = load double, ptr %52, align 8, !tbaa !20
  %54 = fsub double %51, %53
  %55 = getelementptr inbounds i8, ptr %.03542, i64 80
  %56 = load i32, ptr %55, align 8, !tbaa !21
  %57 = icmp ne i32 %56, -1
  %58 = fcmp ogt double %54, 0.000000e+00
  %or.cond = select i1 %57, i1 %58, i1 false
  br i1 %or.cond, label %59, label %84

59:                                               ; preds = %.lr.ph
  %60 = load ptr, ptr %7, align 8, !tbaa !22
  %61 = load ptr, ptr %60, align 8, !tbaa !23
  %62 = getelementptr inbounds i8, ptr %.03542, i64 76
  %63 = load i32, ptr %62, align 4, !tbaa !25
  %64 = getelementptr inbounds i8, ptr %60, i64 12
  %65 = load i32, ptr %64, align 4, !tbaa !26
  %66 = mul i32 %65, %63
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %61, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !27
  %70 = getelementptr inbounds i8, ptr %.03542, i64 8
  %71 = load double, ptr %70, align 8, !tbaa !28
  %72 = fsub double %69, %71
  %73 = getelementptr inbounds i8, ptr %.03542, i64 40
  %74 = load double, ptr %73, align 8, !tbaa !29
  %75 = fmul double %74, %72
  %76 = fmul double %54, %54
  %77 = fdiv double %75, %76
  %78 = load ptr, ptr %1, align 8, !tbaa !23
  %79 = sext i32 %63 to i64
  %80 = getelementptr inbounds double, ptr %78, i64 %79
  store double %77, ptr %80, align 8, !tbaa !27
  %81 = load double, ptr %73, align 8, !tbaa !29
  %82 = fdiv double %72, %54
  %square = fmul double %82, %82
  %83 = tail call double @llvm.fmuladd.f64(double %81, double %square, double %.141)
  br label %84

84:                                               ; preds = %59, %.lr.ph
  %.2 = phi double [ %83, %59 ], [ %.141, %.lr.ph ]
  %85 = getelementptr inbounds i8, ptr %.03542, i64 256
  %.035 = load ptr, ptr %85, align 8, !tbaa !12
  %.not38 = icmp eq ptr %.035, null
  br i1 %.not38, label %._crit_edge.split, label %.lr.ph, !llvm.loop !30
}

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_RcsGraph", !11, i64 0, !7, i64 8, !6, i64 1848, !6, i64 1852, !11, i64 1856, !11, i64 1864, !11, i64 1872, !11, i64 1880, !11, i64 1888}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !17, i64 32}
!16 = !{!"_RcsJoint", !11, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !18, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !11, i64 88, !19, i64 96, !17, i64 192, !17, i64 200, !17, i64 208, !17, i64 216, !6, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!"", !7, i64 0, !7, i64 24}
!20 = !{!16, !17, i64 24}
!21 = !{!16, !6, i64 80}
!22 = !{!10, !11, i64 1856}
!23 = !{!24, !11, i64 0}
!24 = !{!"_MatNd", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !18, i64 20}
!25 = !{!16, !6, i64 76}
!26 = !{!24, !6, i64 12}
!27 = !{!17, !17, i64 0}
!28 = !{!16, !17, i64 8}
!29 = !{!16, !17, i64 40}
!30 = distinct !{!30, !14}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass