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

; 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._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [41 x i8], align 1
@__func__.MatNd_inverseDiag = external hidden unnamed_addr constant [18 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.277 = external hidden unnamed_addr constant [69 x i8], align 1

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

declare void @print_trace() #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local double @MatNd_inverseDiag(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct._MatNd, ptr %10, i32 0, i32 2
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %35, label %14

14:                                               ; preds = %9
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._MatNd, ptr %15, i32 0, i32 1
  %17 = load i32, ptr %16, align 8, !tbaa !13
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._MatNd, ptr %18, i32 0, i32 2
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = icmp eq i32 %17, %20
  br i1 %21, label %35, label %22

22:                                               ; preds = %14
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_inverseDiag, i32 noundef 5154, ptr noundef @.str.275) #5
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._MatNd, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._MatNd, ptr %29, i32 0, i32 2
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.276, i32 noundef %28, i32 noundef %31) #5
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

35:                                               ; preds = %14, %9
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._MatNd, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._MatNd, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = icmp eq i32 %40, %43
  br i1 %44, label %45, label %53

45:                                               ; preds = %37
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._MatNd, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._MatNd, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = icmp eq i32 %48, %51
  br i1 %52, label %72, label %53

53:                                               ; preds = %45, %37
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_inverseDiag, i32 noundef 5157, ptr noundef @.str.254) #5
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._MatNd, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 8, !tbaa !13
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._MatNd, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._MatNd, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 8, !tbaa !13
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._MatNd, ptr %66, i32 0, i32 2
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.277, i32 noundef %59, i32 noundef %62, i32 noundef %65, i32 noundef %68) #5
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

72:                                               ; preds = %45
  br label %73

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store double 1.000000e+00, ptr %6, align 8, !tbaa !14
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._MatNd, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %78, label %114

78:                                               ; preds = %73
  store i32 0, ptr %5, align 4, !tbaa !16
  br label %79

79:                                               ; preds = %110, %78
  %80 = load i32, ptr %5, align 4, !tbaa !16
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._MatNd, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !13
  %84 = icmp ult i32 %80, %83
  br i1 %84, label %85, label %113

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._MatNd, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = load i32, ptr %5, align 4, !tbaa !16
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !14
  store double %92, ptr %7, align 8, !tbaa !14
  %93 = load double, ptr %7, align 8, !tbaa !14
  %94 = fcmp oeq double %93, 0.000000e+00
  br i1 %94, label %95, label %96

95:                                               ; preds = %85
  br label %99

96:                                               ; preds = %85
  %97 = load double, ptr %7, align 8, !tbaa !14
  %98 = fdiv double 1.000000e+00, %97
  br label %99

99:                                               ; preds = %96, %95
  %100 = phi double [ 0x7FEFFFFFFFFFFFFF, %95 ], [ %98, %96 ]
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._MatNd, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load i32, ptr %5, align 4, !tbaa !16
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  store double %100, ptr %106, align 8, !tbaa !14
  %107 = load double, ptr %7, align 8, !tbaa !14
  %108 = load double, ptr %6, align 8, !tbaa !14
  %109 = fmul double %108, %107
  store double %109, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %110

110:                                              ; preds = %99
  %111 = load i32, ptr %5, align 4, !tbaa !16
  %112 = add i32 %111, 1
  store i32 %112, ptr %5, align 4, !tbaa !16
  br label %79, !llvm.loop !18

113:                                              ; preds = %79
  br label %170

114:                                              ; preds = %73
  store i32 0, ptr %5, align 4, !tbaa !16
  br label %115

115:                                              ; preds = %166, %114
  %116 = load i32, ptr %5, align 4, !tbaa !16
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._MatNd, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 8, !tbaa !13
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._MatNd, ptr %120, i32 0, i32 2
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = mul i32 %119, %122
  %124 = icmp ult i32 %116, %123
  br i1 %124, label %125, label %169

125:                                              ; preds = %115
  %126 = load i32, ptr %5, align 4, !tbaa !16
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._MatNd, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 8, !tbaa !13
  %130 = add i32 %129, 1
  %131 = urem i32 %126, %130
  %132 = icmp eq i32 %131, 0
  br i1 %132, label %133, label %158

133:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._MatNd, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i32, ptr %5, align 4, !tbaa !16
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !14
  store double %140, ptr %8, align 8, !tbaa !14
  %141 = load double, ptr %8, align 8, !tbaa !14
  %142 = fcmp oeq double %141, 0.000000e+00
  br i1 %142, label %143, label %144

143:                                              ; preds = %133
  br label %147

144:                                              ; preds = %133
  %145 = load double, ptr %8, align 8, !tbaa !14
  %146 = fdiv double 1.000000e+00, %145
  br label %147

147:                                              ; preds = %144, %143
  %148 = phi double [ 0x7FEFFFFFFFFFFFFF, %143 ], [ %146, %144 ]
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._MatNd, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !17
  %152 = load i32, ptr %5, align 4, !tbaa !16
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds double, ptr %151, i64 %153
  store double %148, ptr %154, align 8, !tbaa !14
  %155 = load double, ptr %8, align 8, !tbaa !14
  %156 = load double, ptr %6, align 8, !tbaa !14
  %157 = fmul double %156, %155
  store double %157, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %165

158:                                              ; preds = %125
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._MatNd, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !17
  %162 = load i32, ptr %5, align 4, !tbaa !16
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds double, ptr %161, i64 %163
  store double 0.000000e+00, ptr %164, align 8, !tbaa !14
  br label %165

165:                                              ; preds = %158, %147
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %5, align 4, !tbaa !16
  %168 = add i32 %167, 1
  store i32 %168, ptr %5, align 4, !tbaa !16
  br label %115, !llvm.loop !20

169:                                              ; preds = %115
  br label %170

170:                                              ; preds = %169, %113
  %171 = load double, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret double %171
}

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #6 = { 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, !11, i64 12}
!10 = !{!"_MatNd", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!10, !11, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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 [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [41 x i8], align 1
@__func__.MatNd_inverseDiag = external hidden unnamed_addr constant [18 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.277 = external hidden unnamed_addr constant [69 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 @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local double @MatNd_inverseDiag(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %1, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 8
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !12
  br i1 %5, label %._crit_edge, label %6

6:                                                ; preds = %2
  %7 = icmp eq i32 %.pre, %4
  br i1 %7, label %._crit_edge, label %8

8:                                                ; preds = %6
  %9 = load ptr, ptr @stderr, align 8, !tbaa !13
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_inverseDiag, i32 noundef 5154, ptr noundef nonnull @.str.275) #4
  %11 = load ptr, ptr @stderr, align 8, !tbaa !13
  %12 = load i32, ptr %.phi.trans.insert, align 8, !tbaa !12
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.276, i32 noundef %12, i32 noundef %13) #4
  %15 = load ptr, ptr @stderr, align 8, !tbaa !13
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

._crit_edge:                                      ; preds = %2, %6
  %17 = phi i32 [ %4, %6 ], [ %.pre, %2 ]
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !12
  %20 = icmp eq i32 %17, %19
  br i1 %20, label %21, label %25

21:                                               ; preds = %._crit_edge
  %22 = getelementptr inbounds i8, ptr %0, i64 12
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = icmp eq i32 %4, %23
  br i1 %24, label %38, label %25

25:                                               ; preds = %21, %._crit_edge
  %26 = getelementptr inbounds i8, ptr %1, i64 8
  %27 = load ptr, ptr @stderr, align 8, !tbaa !13
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_inverseDiag, i32 noundef 5157, ptr noundef nonnull @.str.254) #4
  %29 = load ptr, ptr @stderr, align 8, !tbaa !13
  %30 = load i32, ptr %26, align 8, !tbaa !12
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr %18, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %0, i64 12
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.277, i32 noundef %30, i32 noundef %31, i32 noundef %32, i32 noundef %34) #4
  %36 = load ptr, ptr @stderr, align 8, !tbaa !13
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

38:                                               ; preds = %21
  br i1 %5, label %.preheader, label %.preheader45

.preheader45:                                     ; preds = %38
  %39 = mul i32 %17, %4
  %.not = icmp eq i32 %39, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader45
  %40 = add i32 %17, 1
  %wide.trip.count = zext i32 %39 to i64
  br label %59

.preheader:                                       ; preds = %38
  %.not53 = icmp eq i32 %17, 0
  br i1 %.not53, label %.loopexit, label %.lr.ph51

.lr.ph51:                                         ; preds = %.preheader
  %41 = load ptr, ptr %1, align 8, !tbaa !14
  %42 = load ptr, ptr %0, align 8, !tbaa !14
  %wide.trip.count59 = zext i32 %17 to i64
  %xtraiter = and i64 %wide.trip.count59, 1
  %43 = icmp eq i32 %17, 1
  br i1 %43, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph51.new

.lr.ph51.new:                                     ; preds = %.lr.ph51
  %unroll_iter = and i64 %wide.trip.count59, 4294967294
  br label %44

44:                                               ; preds = %44, %.lr.ph51.new
  %indvars.iv56 = phi i64 [ 0, %.lr.ph51.new ], [ %indvars.iv.next57.1, %44 ]
  %.04149 = phi double [ 1.000000e+00, %.lr.ph51.new ], [ %58, %44 ]
  %niter = phi i64 [ 0, %.lr.ph51.new ], [ %niter.next.1, %44 ]
  %45 = getelementptr inbounds double, ptr %41, i64 %indvars.iv56
  %46 = load double, ptr %45, align 8, !tbaa !15
  %47 = fcmp oeq double %46, 0.000000e+00
  %48 = fdiv double 1.000000e+00, %46
  %49 = select i1 %47, double 0x7FEFFFFFFFFFFFFF, double %48
  %50 = getelementptr inbounds double, ptr %42, i64 %indvars.iv56
  store double %49, ptr %50, align 8, !tbaa !15
  %51 = fmul double %.04149, %46
  %indvars.iv.next57 = or disjoint i64 %indvars.iv56, 1
  %52 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next57
  %53 = load double, ptr %52, align 8, !tbaa !15
  %54 = fcmp oeq double %53, 0.000000e+00
  %55 = fdiv double 1.000000e+00, %53
  %56 = select i1 %54, double 0x7FEFFFFFFFFFFFFF, double %55
  %57 = getelementptr inbounds double, ptr %42, i64 %indvars.iv.next57
  store double %56, ptr %57, align 8, !tbaa !15
  %58 = fmul double %51, %53
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %44, !llvm.loop !17

59:                                               ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %.14247 = phi double [ 1.000000e+00, %.lr.ph ], [ %.2, %76 ]
  %60 = trunc nuw i64 %indvars.iv to i32
  %61 = urem i32 %60, %40
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %73

63:                                               ; preds = %59
  %64 = load ptr, ptr %1, align 8, !tbaa !14
  %65 = getelementptr inbounds double, ptr %64, i64 %indvars.iv
  %66 = load double, ptr %65, align 8, !tbaa !15
  %67 = fcmp oeq double %66, 0.000000e+00
  %68 = fdiv double 1.000000e+00, %66
  %69 = select i1 %67, double 0x7FEFFFFFFFFFFFFF, double %68
  %70 = load ptr, ptr %0, align 8, !tbaa !14
  %71 = getelementptr inbounds double, ptr %70, i64 %indvars.iv
  store double %69, ptr %71, align 8, !tbaa !15
  %72 = fmul double %.14247, %66
  br label %76

73:                                               ; preds = %59
  %74 = load ptr, ptr %0, align 8, !tbaa !14
  %75 = getelementptr inbounds double, ptr %74, i64 %indvars.iv
  store double 0.000000e+00, ptr %75, align 8, !tbaa !15
  br label %76

76:                                               ; preds = %63, %73
  %.2 = phi double [ %72, %63 ], [ %.14247, %73 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %59, !llvm.loop !19

.loopexit.loopexit.unr-lcssa:                     ; preds = %44, %.lr.ph51
  %.lcssa.ph = phi double [ poison, %.lr.ph51 ], [ %58, %44 ]
  %indvars.iv56.unr = phi i64 [ 0, %.lr.ph51 ], [ %indvars.iv.next57.1, %44 ]
  %.04149.unr = phi double [ 1.000000e+00, %.lr.ph51 ], [ %58, %44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %77 = getelementptr inbounds double, ptr %41, i64 %indvars.iv56.unr
  %78 = load double, ptr %77, align 8, !tbaa !15
  %79 = fcmp oeq double %78, 0.000000e+00
  %80 = fdiv double 1.000000e+00, %78
  %81 = select i1 %79, double 0x7FEFFFFFFFFFFFFF, double %80
  %82 = getelementptr inbounds double, ptr %42, i64 %indvars.iv56.unr
  store double %81, ptr %82, align 8, !tbaa !15
  %83 = fmul double %.04149.unr, %78
  br label %.loopexit

.loopexit:                                        ; preds = %76, %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %.preheader45, %.preheader
  %.3 = phi double [ 1.000000e+00, %.preheader ], [ 1.000000e+00, %.preheader45 ], [ %.lcssa.ph, %.loopexit.loopexit.unr-lcssa ], [ %83, %.loopexit.loopexit.epilog-lcssa ], [ %.2, %76 ]
  ret double %.3
}

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 = { 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 = { cold nounwind }
attributes #5 = { nounwind }
attributes #6 = { 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, !10, i64 12}
!6 = !{!"_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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