; 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]] }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__func__.RcsGraph_jointLimitBorderCost = external hidden unnamed_addr constant [30 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1

; 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

declare ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef) #2

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

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local double @RcsGraph_jointLimitBorderCost(ptr noundef %0, double noundef %1, i32 noundef %2) #5 {
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %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 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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  br label %21

21:                                               ; preds = %3
  %22 = load double, ptr %6, align 8, !tbaa !9
  %23 = fcmp oge double %22, 0.000000e+00
  %24 = zext i1 %23 to i32
  %25 = load double, ptr %6, align 8, !tbaa !9
  %26 = fcmp ole double %25, 1.000000e+00
  %27 = zext i1 %26 to i32
  %28 = and i32 %24, %27
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %33, label %30

30:                                               ; preds = %21
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.RcsGraph_jointLimitBorderCost, i32 noundef 1226, ptr noundef @.str.9) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

33:                                               ; preds = %21
  br label %34

34:                                               ; preds = %33
  %35 = load double, ptr %6, align 8, !tbaa !9
  %36 = fcmp oeq double %35, 1.000000e+00
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  store double 0.000000e+00, ptr %4, align 8
  br label %174

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._RcsGraph, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  store ptr %41, ptr %9, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %168, %38
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %171

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._RcsBody, ptr %47, i32 0, i32 18
  %49 = load ptr, ptr %48, align 8, !tbaa !15
  store ptr %49, ptr %11, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %163, %46
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %167

54:                                               ; preds = %50
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._RcsJoint, ptr %55, i32 0, i32 8
  %57 = load i8, ptr %56, align 8, !tbaa !18, !range !21, !noundef !22
  %58 = trunc i8 %57 to i1
  %59 = zext i1 %58 to i32
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %65

61:                                               ; preds = %54
  %62 = load i32, ptr %7, align 4, !tbaa !11
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  br label %163

65:                                               ; preds = %61, %54
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._RcsJoint, ptr %66, i32 0, i32 24
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %71

70:                                               ; preds = %65
  br label %163

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._RcsGraph, ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !24
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._RcsJoint, ptr %75, i32 0, i32 11
  %77 = load i32, ptr %76, align 4, !tbaa !25
  %78 = call double @MatNd_get(ptr noundef %74, i32 noundef %77, i32 noundef 0)
  store double %78, ptr %12, align 8, !tbaa !9
  %79 = load double, ptr %12, align 8, !tbaa !9
  %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 !26
  %83 = fcmp ogt double %79, %82
  br i1 %83, label %84, label %123

84:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._RcsJoint, ptr %85, i32 0, i32 4
  %87 = load double, ptr %86, align 8, !tbaa !27
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._RcsJoint, ptr %88, i32 0, i32 1
  %90 = load double, ptr %89, align 8, !tbaa !26
  %91 = fsub double %87, %90
  store double %91, ptr %13, align 8, !tbaa !9
  %92 = load double, ptr %13, align 8, !tbaa !9
  %93 = fcmp ogt double %92, 0.000000e+00
  br i1 %93, label %94, label %122

94:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %95 = load double, ptr %6, align 8, !tbaa !9
  %96 = load double, ptr %13, align 8, !tbaa !9
  %97 = fmul double %95, %96
  store double %97, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %98 = load double, ptr %13, align 8, !tbaa !9
  %99 = load double, ptr %14, align 8, !tbaa !9
  %100 = fsub double %98, %99
  store double %100, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._RcsJoint, ptr %101, i32 0, i32 1
  %103 = load double, ptr %102, align 8, !tbaa !26
  %104 = load double, ptr %14, align 8, !tbaa !9
  %105 = fadd double %103, %104
  store double %105, ptr %16, align 8, !tbaa !9
  %106 = load double, ptr %12, align 8, !tbaa !9
  %107 = load double, ptr %16, align 8, !tbaa !9
  %108 = fcmp ogt double %106, %107
  br i1 %108, label %109, label %121

109:                                              ; preds = %94
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._RcsJoint, ptr %110, i32 0, i32 5
  %112 = load double, ptr %111, align 8, !tbaa !28
  %113 = load double, ptr %12, align 8, !tbaa !9
  %114 = load double, ptr %16, align 8, !tbaa !9
  %115 = fsub double %113, %114
  %116 = load double, ptr %15, align 8, !tbaa !9
  %117 = fdiv double %115, %116
  %118 = call double @pow(double noundef %117, double noundef 2.000000e+00) #6
  %119 = load double, ptr %8, align 8, !tbaa !9
  %120 = call double @llvm.fmuladd.f64(double %112, double %118, double %119)
  store double %120, ptr %8, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %109, %94
  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
  br label %122

122:                                              ; preds = %121, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %162

123:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._RcsJoint, ptr %124, i32 0, i32 1
  %126 = load double, ptr %125, align 8, !tbaa !26
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._RcsJoint, ptr %127, i32 0, i32 3
  %129 = load double, ptr %128, align 8, !tbaa !29
  %130 = fsub double %126, %129
  store double %130, ptr %17, align 8, !tbaa !9
  %131 = load double, ptr %17, align 8, !tbaa !9
  %132 = fcmp ogt double %131, 0.000000e+00
  br i1 %132, label %133, label %161

133:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %134 = load double, ptr %6, align 8, !tbaa !9
  %135 = load double, ptr %17, align 8, !tbaa !9
  %136 = fmul double %134, %135
  store double %136, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %137 = load double, ptr %17, align 8, !tbaa !9
  %138 = load double, ptr %18, align 8, !tbaa !9
  %139 = fsub double %137, %138
  store double %139, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._RcsJoint, ptr %140, i32 0, i32 1
  %142 = load double, ptr %141, align 8, !tbaa !26
  %143 = load double, ptr %18, align 8, !tbaa !9
  %144 = fsub double %142, %143
  store double %144, ptr %20, align 8, !tbaa !9
  %145 = load double, ptr %12, align 8, !tbaa !9
  %146 = load double, ptr %20, align 8, !tbaa !9
  %147 = fcmp olt double %145, %146
  br i1 %147, label %148, label %160

148:                                              ; preds = %133
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._RcsJoint, ptr %149, i32 0, i32 5
  %151 = load double, ptr %150, align 8, !tbaa !28
  %152 = load double, ptr %12, align 8, !tbaa !9
  %153 = load double, ptr %20, align 8, !tbaa !9
  %154 = fsub double %152, %153
  %155 = load double, ptr %19, align 8, !tbaa !9
  %156 = fdiv double %154, %155
  %157 = call double @pow(double noundef %156, double noundef 2.000000e+00) #6
  %158 = load double, ptr %8, align 8, !tbaa !9
  %159 = call double @llvm.fmuladd.f64(double %151, double %157, double %158)
  store double %159, ptr %8, align 8, !tbaa !9
  br label %160

160:                                              ; preds = %148, %133
  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 %18) #6
  br label %161

161:                                              ; preds = %160, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %162

162:                                              ; preds = %161, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %163

163:                                              ; preds = %162, %70, %64
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._RcsJoint, ptr %164, i32 0, i32 23
  %166 = load ptr, ptr %165, align 8, !tbaa !30
  store ptr %166, ptr %11, align 8, !tbaa !5
  br label %50, !llvm.loop !31

167:                                              ; preds = %53
  br label %168

168:                                              ; preds = %167
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef %169)
  store ptr %170, ptr %9, align 8, !tbaa !5
  br label %42, !llvm.loop !33

171:                                              ; preds = %45
  %172 = load double, ptr %8, align 8, !tbaa !9
  %173 = fmul double 5.000000e-01, %172
  store double %173, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %174

174:                                              ; preds = %171, %37
  %175 = load double, ptr %4, align 8
  ret double %175
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_RcsGraph", !6, i64 0, !7, i64 8, !12, i64 1848, !12, i64 1852, !6, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888}
!15 = !{!16, !6, i64 168}
!16 = !{!"_RcsBody", !10, i64 0, !17, i64 8, !12, i64 12, !7, i64 16, !7, i64 40, !10, 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}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!19, !17, i64 64}
!19 = !{!"_RcsJoint", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !17, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !6, i64 88, !20, i64 96, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !12, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264}
!20 = !{!"", !7, i64 0, !7, i64 24}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!19, !6, i64 264}
!24 = !{!14, !6, i64 1856}
!25 = !{!19, !12, i64 76}
!26 = !{!19, !10, i64 8}
!27 = !{!19, !10, i64 32}
!28 = !{!19, !10, i64 40}
!29 = !{!19, !10, i64 24}
!30 = !{!19, !6, i64 256}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__func__.RcsGraph_jointLimitBorderCost = external hidden unnamed_addr constant [30 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

declare void @print_trace() local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

declare ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef) local_unnamed_addr #1

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

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local double @RcsGraph_jointLimitBorderCost(ptr nocapture noundef readonly %0, double noundef %1, i32 noundef %2) local_unnamed_addr #4 {
  %4 = fcmp oge double %1, 0.000000e+00
  %5 = fcmp ole double %1, 1.000000e+00
  %6 = and i1 %4, %5
  br i1 %6, label %10, label %7

7:                                                ; preds = %3
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.RcsGraph_jointLimitBorderCost, i32 noundef 1226, ptr noundef nonnull @.str.9) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

10:                                               ; preds = %3
  %11 = fcmp oeq double %1, 1.000000e+00
  br i1 %11, label %._crit_edge74, label %12

12:                                               ; preds = %10
  %13 = load ptr, ptr %0, align 8, !tbaa !9
  %.not69 = icmp eq ptr %13, null
  br i1 %.not69, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %12
  %14 = icmp eq i32 %2, 1
  %15 = getelementptr inbounds i8, ptr %0, i64 1856
  br label %17

._crit_edge74.loopexit:                           ; preds = %._crit_edge
  %16 = fmul double %.1.lcssa, 5.000000e-01
  br label %._crit_edge74

17:                                               ; preds = %.lr.ph73, %._crit_edge
  %.05071 = phi double [ 0.000000e+00, %.lr.ph73 ], [ %.1.lcssa, %._crit_edge ]
  %.05170 = phi ptr [ %13, %.lr.ph73 ], [ %19, %._crit_edge ]
  %18 = getelementptr inbounds i8, ptr %.05170, i64 168
  %.05265 = load ptr, ptr %18, align 8, !tbaa !5
  %.not6266 = icmp eq ptr %.05265, null
  br i1 %.not6266, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %61, %17
  %.1.lcssa = phi double [ %.05071, %17 ], [ %.7, %61 ]
  %19 = tail call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef nonnull %.05170) #6
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %._crit_edge74.loopexit, label %17, !llvm.loop !12

.lr.ph:                                           ; preds = %17, %61
  %.05268 = phi ptr [ %.052, %61 ], [ %.05265, %17 ]
  %.167 = phi double [ %.7, %61 ], [ %.05071, %17 ]
  %20 = getelementptr inbounds i8, ptr %.05268, i64 64
  %21 = load i8, ptr %20, align 8, !tbaa !14, !range !19, !noundef !20
  %22 = trunc nuw i8 %21 to i1
  %or.cond = and i1 %14, %22
  br i1 %or.cond, label %61, label %23

23:                                               ; preds = %.lr.ph
  %24 = getelementptr inbounds i8, ptr %.05268, i64 264
  %25 = load ptr, ptr %24, align 8, !tbaa !21
  %.not63 = icmp eq ptr %25, null
  br i1 %.not63, label %26, label %61

26:                                               ; preds = %23
  %27 = load ptr, ptr %15, align 8, !tbaa !22
  %28 = getelementptr inbounds i8, ptr %.05268, i64 76
  %29 = load i32, ptr %28, align 4, !tbaa !23
  %30 = tail call double @MatNd_get(ptr noundef %27, i32 noundef %29, i32 noundef 0) #6
  %31 = getelementptr inbounds i8, ptr %.05268, i64 8
  %32 = load double, ptr %31, align 8, !tbaa !24
  %33 = fcmp ogt double %30, %32
  br i1 %33, label %34, label %45

34:                                               ; preds = %26
  %35 = getelementptr inbounds i8, ptr %.05268, i64 32
  %36 = load double, ptr %35, align 8, !tbaa !25
  %37 = fsub double %36, %32
  %38 = fcmp ogt double %37, 0.000000e+00
  br i1 %38, label %39, label %61

39:                                               ; preds = %34
  %40 = fmul double %37, %1
  %41 = fadd double %32, %40
  %42 = fcmp ogt double %30, %41
  br i1 %42, label %43, label %61

43:                                               ; preds = %39
  %44 = fsub double %37, %40
  br label %.sink.split

45:                                               ; preds = %26
  %46 = getelementptr inbounds i8, ptr %.05268, i64 24
  %47 = load double, ptr %46, align 8, !tbaa !26
  %48 = fsub double %32, %47
  %49 = fcmp ogt double %48, 0.000000e+00
  br i1 %49, label %50, label %61

50:                                               ; preds = %45
  %51 = fmul double %48, %1
  %52 = fsub double %32, %51
  %53 = fcmp olt double %30, %52
  br i1 %53, label %54, label %61

54:                                               ; preds = %50
  %55 = fsub double %48, %51
  br label %.sink.split

.sink.split:                                      ; preds = %54, %43
  %.sink80 = phi double [ %41, %43 ], [ %52, %54 ]
  %.sink79 = phi double [ %44, %43 ], [ %55, %54 ]
  %56 = getelementptr inbounds i8, ptr %.05268, i64 40
  %57 = load double, ptr %56, align 8, !tbaa !27
  %58 = fsub double %30, %.sink80
  %59 = fdiv double %58, %.sink79
  %square64 = fmul double %59, %59
  %60 = tail call double @llvm.fmuladd.f64(double %57, double %square64, double %.167)
  br label %61

61:                                               ; preds = %.sink.split, %39, %34, %50, %45, %23, %.lr.ph
  %.7 = phi double [ %.167, %.lr.ph ], [ %.167, %23 ], [ %.167, %34 ], [ %.167, %39 ], [ %.167, %45 ], [ %.167, %50 ], [ %60, %.sink.split ]
  %62 = getelementptr inbounds i8, ptr %.05268, i64 256
  %.052 = load ptr, ptr %62, align 8, !tbaa !5
  %.not62 = icmp eq ptr %.052, null
  br i1 %.not62, label %._crit_edge, label %.lr.ph, !llvm.loop !28

._crit_edge74:                                    ; preds = %12, %._crit_edge74.loopexit, %10
  %.0 = phi double [ 0.000000e+00, %10 ], [ 0.000000e+00, %12 ], [ %16, %._crit_edge74.loopexit ]
  ret double %.0
}

attributes #0 = { nofree 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 = { "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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { cold nounwind }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !6, i64 0}
!10 = !{!"_RcsGraph", !6, i64 0, !7, i64 8, !11, i64 1848, !11, i64 1852, !6, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !17, i64 64}
!15 = !{!"_RcsJoint", !6, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !17, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !6, i64 88, !18, i64 96, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !11, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!"", !7, i64 0, !7, i64 24}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!15, !6, i64 264}
!22 = !{!10, !6, i64 1856}
!23 = !{!15, !11, i64 76}
!24 = !{!15, !16, i64 8}
!25 = !{!15, !16, i64 32}
!26 = !{!15, !16, i64 24}
!27 = !{!15, !16, i64 40}
!28 = distinct !{!28, !13}


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