; LLVM IR from bondhugula/pluto :: examples/heat-3d (heat-3d)

; 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.timeval = type { i64, i64 }

@.str = external hidden unnamed_addr constant [51 x i8], align 1
@A = external dso_local global [2 x [152 x [152 x [152 x double]]]], align 16

; 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 uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.timeval, align 8
  %14 = alloca %struct.timeval, align 8
  %15 = alloca %struct.timeval, align 8
  %16 = alloca double, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1024, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 -1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store double 0.000000e+00, ptr %16, align 8, !tbaa !13
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef 150, i64 noundef 100)
  call void @srand(i32 noundef 42) #5
  store i64 1, ptr %7, align 8, !tbaa !11
  br label %18

18:                                               ; preds = %48, %2
  %19 = load i64, ptr %7, align 8, !tbaa !11
  %20 = icmp slt i64 %19, 151
  br i1 %20, label %21, label %51

21:                                               ; preds = %18
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %22

22:                                               ; preds = %44, %21
  %23 = load i64, ptr %8, align 8, !tbaa !11
  %24 = icmp slt i64 %23, 151
  br i1 %24, label %25, label %47

25:                                               ; preds = %22
  store i64 1, ptr %9, align 8, !tbaa !11
  br label %26

26:                                               ; preds = %40, %25
  %27 = load i64, ptr %9, align 8, !tbaa !11
  %28 = icmp slt i64 %27, 151
  br i1 %28, label %29, label %43

29:                                               ; preds = %26
  %30 = call i32 @rand() #5
  %31 = srem i32 %30, 1024
  %32 = sitofp i32 %31 to double
  %33 = fmul double 1.000000e+00, %32
  %34 = load i64, ptr %7, align 8, !tbaa !11
  %35 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr @A, i64 0, i64 %34
  %36 = load i64, ptr %8, align 8, !tbaa !11
  %37 = getelementptr inbounds [152 x [152 x double]], ptr %35, i64 0, i64 %36
  %38 = load i64, ptr %9, align 8, !tbaa !11
  %39 = getelementptr inbounds [152 x double], ptr %37, i64 0, i64 %38
  store double %33, ptr %39, align 8, !tbaa !13
  br label %40

40:                                               ; preds = %29
  %41 = load i64, ptr %9, align 8, !tbaa !11
  %42 = add nsw i64 %41, 1
  store i64 %42, ptr %9, align 8, !tbaa !11
  br label %26, !llvm.loop !15

43:                                               ; preds = %26
  br label %44

44:                                               ; preds = %43
  %45 = load i64, ptr %8, align 8, !tbaa !11
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %8, align 8, !tbaa !11
  br label %22, !llvm.loop !17

47:                                               ; preds = %22
  br label %48

48:                                               ; preds = %47
  %49 = load i64, ptr %7, align 8, !tbaa !11
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %7, align 8, !tbaa !11
  br label %18, !llvm.loop !18

51:                                               ; preds = %18
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %52

52:                                               ; preds = %206, %51
  %53 = load i64, ptr %6, align 8, !tbaa !11
  %54 = icmp slt i64 %53, 99
  br i1 %54, label %55, label %209

55:                                               ; preds = %52
  store i64 1, ptr %7, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %202, %55
  %57 = load i64, ptr %7, align 8, !tbaa !11
  %58 = icmp slt i64 %57, 151
  br i1 %58, label %59, label %205

59:                                               ; preds = %56
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %60

60:                                               ; preds = %198, %59
  %61 = load i64, ptr %8, align 8, !tbaa !11
  %62 = icmp slt i64 %61, 151
  br i1 %62, label %63, label %201

63:                                               ; preds = %60
  store i64 1, ptr %9, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %194, %63
  %65 = load i64, ptr %9, align 8, !tbaa !11
  %66 = icmp slt i64 %65, 151
  br i1 %66, label %67, label %197

67:                                               ; preds = %64
  %68 = load i64, ptr %6, align 8, !tbaa !11
  %69 = srem i64 %68, 2
  %70 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %69
  %71 = load i64, ptr %7, align 8, !tbaa !11
  %72 = add nsw i64 %71, 1
  %73 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %70, i64 0, i64 %72
  %74 = load i64, ptr %8, align 8, !tbaa !11
  %75 = getelementptr inbounds [152 x [152 x double]], ptr %73, i64 0, i64 %74
  %76 = load i64, ptr %9, align 8, !tbaa !11
  %77 = getelementptr inbounds [152 x double], ptr %75, i64 0, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !13
  %79 = load i64, ptr %6, align 8, !tbaa !11
  %80 = srem i64 %79, 2
  %81 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %80
  %82 = load i64, ptr %7, align 8, !tbaa !11
  %83 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %81, i64 0, i64 %82
  %84 = load i64, ptr %8, align 8, !tbaa !11
  %85 = getelementptr inbounds [152 x [152 x double]], ptr %83, i64 0, i64 %84
  %86 = load i64, ptr %9, align 8, !tbaa !11
  %87 = getelementptr inbounds [152 x double], ptr %85, i64 0, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !13
  %89 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %88, double %78)
  %90 = load i64, ptr %6, align 8, !tbaa !11
  %91 = srem i64 %90, 2
  %92 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %91
  %93 = load i64, ptr %7, align 8, !tbaa !11
  %94 = sub nsw i64 %93, 1
  %95 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %92, i64 0, i64 %94
  %96 = load i64, ptr %8, align 8, !tbaa !11
  %97 = getelementptr inbounds [152 x [152 x double]], ptr %95, i64 0, i64 %96
  %98 = load i64, ptr %9, align 8, !tbaa !11
  %99 = getelementptr inbounds [152 x double], ptr %97, i64 0, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !13
  %101 = fadd double %89, %100
  %102 = load i64, ptr %6, align 8, !tbaa !11
  %103 = srem i64 %102, 2
  %104 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %103
  %105 = load i64, ptr %7, align 8, !tbaa !11
  %106 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %104, i64 0, i64 %105
  %107 = load i64, ptr %8, align 8, !tbaa !11
  %108 = add nsw i64 %107, 1
  %109 = getelementptr inbounds [152 x [152 x double]], ptr %106, i64 0, i64 %108
  %110 = load i64, ptr %9, align 8, !tbaa !11
  %111 = getelementptr inbounds [152 x double], ptr %109, i64 0, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !13
  %113 = load i64, ptr %6, align 8, !tbaa !11
  %114 = srem i64 %113, 2
  %115 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %114
  %116 = load i64, ptr %7, align 8, !tbaa !11
  %117 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %115, i64 0, i64 %116
  %118 = load i64, ptr %8, align 8, !tbaa !11
  %119 = getelementptr inbounds [152 x [152 x double]], ptr %117, i64 0, i64 %118
  %120 = load i64, ptr %9, align 8, !tbaa !11
  %121 = getelementptr inbounds [152 x double], ptr %119, i64 0, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !13
  %123 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %122, double %112)
  %124 = load i64, ptr %6, align 8, !tbaa !11
  %125 = srem i64 %124, 2
  %126 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %125
  %127 = load i64, ptr %7, align 8, !tbaa !11
  %128 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %126, i64 0, i64 %127
  %129 = load i64, ptr %8, align 8, !tbaa !11
  %130 = sub nsw i64 %129, 1
  %131 = getelementptr inbounds [152 x [152 x double]], ptr %128, i64 0, i64 %130
  %132 = load i64, ptr %9, align 8, !tbaa !11
  %133 = getelementptr inbounds [152 x double], ptr %131, i64 0, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !13
  %135 = fadd double %123, %134
  %136 = fmul double 1.250000e-01, %135
  %137 = call double @llvm.fmuladd.f64(double 1.250000e-01, double %101, double %136)
  %138 = load i64, ptr %6, align 8, !tbaa !11
  %139 = srem i64 %138, 2
  %140 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %139
  %141 = load i64, ptr %7, align 8, !tbaa !11
  %142 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %140, i64 0, i64 %141
  %143 = load i64, ptr %8, align 8, !tbaa !11
  %144 = getelementptr inbounds [152 x [152 x double]], ptr %142, i64 0, i64 %143
  %145 = load i64, ptr %9, align 8, !tbaa !11
  %146 = sub nsw i64 %145, 1
  %147 = getelementptr inbounds [152 x double], ptr %144, i64 0, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !13
  %149 = load i64, ptr %6, align 8, !tbaa !11
  %150 = srem i64 %149, 2
  %151 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %150
  %152 = load i64, ptr %7, align 8, !tbaa !11
  %153 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %151, i64 0, i64 %152
  %154 = load i64, ptr %8, align 8, !tbaa !11
  %155 = getelementptr inbounds [152 x [152 x double]], ptr %153, i64 0, i64 %154
  %156 = load i64, ptr %9, align 8, !tbaa !11
  %157 = getelementptr inbounds [152 x double], ptr %155, i64 0, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !13
  %159 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %158, double %148)
  %160 = load i64, ptr %6, align 8, !tbaa !11
  %161 = srem i64 %160, 2
  %162 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %161
  %163 = load i64, ptr %7, align 8, !tbaa !11
  %164 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %162, i64 0, i64 %163
  %165 = load i64, ptr %8, align 8, !tbaa !11
  %166 = getelementptr inbounds [152 x [152 x double]], ptr %164, i64 0, i64 %165
  %167 = load i64, ptr %9, align 8, !tbaa !11
  %168 = add nsw i64 %167, 1
  %169 = getelementptr inbounds [152 x double], ptr %166, i64 0, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !13
  %171 = fadd double %159, %170
  %172 = call double @llvm.fmuladd.f64(double 1.250000e-01, double %171, double %137)
  %173 = load i64, ptr %6, align 8, !tbaa !11
  %174 = srem i64 %173, 2
  %175 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %174
  %176 = load i64, ptr %7, align 8, !tbaa !11
  %177 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %175, i64 0, i64 %176
  %178 = load i64, ptr %8, align 8, !tbaa !11
  %179 = getelementptr inbounds [152 x [152 x double]], ptr %177, i64 0, i64 %178
  %180 = load i64, ptr %9, align 8, !tbaa !11
  %181 = getelementptr inbounds [152 x double], ptr %179, i64 0, i64 %180
  %182 = load double, ptr %181, align 8, !tbaa !13
  %183 = fadd double %172, %182
  %184 = load i64, ptr %6, align 8, !tbaa !11
  %185 = add nsw i64 %184, 1
  %186 = srem i64 %185, 2
  %187 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %186
  %188 = load i64, ptr %7, align 8, !tbaa !11
  %189 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr %187, i64 0, i64 %188
  %190 = load i64, ptr %8, align 8, !tbaa !11
  %191 = getelementptr inbounds [152 x [152 x double]], ptr %189, i64 0, i64 %190
  %192 = load i64, ptr %9, align 8, !tbaa !11
  %193 = getelementptr inbounds [152 x double], ptr %191, i64 0, i64 %192
  store double %183, ptr %193, align 8, !tbaa !13
  br label %194

194:                                              ; preds = %67
  %195 = load i64, ptr %9, align 8, !tbaa !11
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %9, align 8, !tbaa !11
  br label %64, !llvm.loop !19

197:                                              ; preds = %64
  br label %198

198:                                              ; preds = %197
  %199 = load i64, ptr %8, align 8, !tbaa !11
  %200 = add nsw i64 %199, 1
  store i64 %200, ptr %8, align 8, !tbaa !11
  br label %60, !llvm.loop !20

201:                                              ; preds = %60
  br label %202

202:                                              ; preds = %201
  %203 = load i64, ptr %7, align 8, !tbaa !11
  %204 = add nsw i64 %203, 1
  store i64 %204, ptr %7, align 8, !tbaa !11
  br label %56, !llvm.loop !21

205:                                              ; preds = %56
  br label %206

206:                                              ; preds = %205
  %207 = load i64, ptr %6, align 8, !tbaa !11
  %208 = add nsw i64 %207, 1
  store i64 %208, ptr %6, align 8, !tbaa !11
  br label %52, !llvm.loop !22

209:                                              ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  ret i32 0
}

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind
declare void @srand(i32 noundef) #3

; Function Attrs: nounwind
declare i32 @rand() #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


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

@.str = external hidden unnamed_addr constant [51 x i8], align 1
@A = external dso_local local_unnamed_addr global [2 x [152 x [152 x [152 x double]]]], align 16

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef 150, i64 noundef 100)
  tail call void @srand(i32 noundef 42) #5
  br label %.preheader70

.preheader70:                                     ; preds = %2, %12
  %.06173 = phi i64 [ 1, %2 ], [ %13, %12 ]
  br label %.preheader69

.preheader69:                                     ; preds = %.preheader70, %10
  %.06272 = phi i64 [ 1, %.preheader70 ], [ %11, %10 ]
  br label %4

4:                                                ; preds = %.preheader69, %4
  %.06471 = phi i64 [ 1, %.preheader69 ], [ %9, %4 ]
  %5 = tail call i32 @rand() #5
  %6 = srem i32 %5, 1024
  %7 = sitofp i32 %6 to double
  %8 = getelementptr inbounds [152 x [152 x [152 x double]]], ptr @A, i64 0, i64 %.06173, i64 %.06272, i64 %.06471
  store double %7, ptr %8, align 8, !tbaa !5
  %9 = add nuw nsw i64 %.06471, 1
  %exitcond.not = icmp eq i64 %9, 151
  br i1 %exitcond.not, label %10, label %4, !llvm.loop !9

10:                                               ; preds = %4
  %11 = add nuw nsw i64 %.06272, 1
  %exitcond78.not = icmp eq i64 %11, 151
  br i1 %exitcond78.not, label %12, label %.preheader69, !llvm.loop !11

12:                                               ; preds = %10
  %13 = add nuw nsw i64 %.06173, 1
  %exitcond79.not = icmp eq i64 %13, 151
  br i1 %exitcond79.not, label %.preheader67, label %.preheader70, !llvm.loop !12

.preheader67:                                     ; preds = %12, %72
  %.077 = phi i64 [ %73, %72 ], [ 0, %12 ]
  %14 = and i64 %.077, 1
  %15 = xor i64 %14, 1
  %16 = mul nuw nsw i64 %15, 28094464
  %17 = trunc i64 %.077 to i1
  %18 = select i1 %17, i64 28094464, i64 0
  %19 = and i64 %.077, 1
  %20 = xor i64 %19, 1
  %diff.check89 = icmp eq i64 %16, %18
  br label %.preheader66

.preheader66:                                     ; preds = %.preheader67, %71
  %.176 = phi i64 [ 1, %.preheader67 ], [ %21, %71 ]
  %21 = add nuw nsw i64 %.176, 1
  %22 = add nsw i64 %.176, -1
  br label %.preheader

.preheader:                                       ; preds = %.preheader66, %middle.block
  %.16375 = phi i64 [ 1, %.preheader66 ], [ %23, %middle.block ]
  %23 = add nuw nsw i64 %.16375, 1
  %24 = add nsw i64 %.16375, -1
  %.phi.trans.insert = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %.16375, i64 1
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !5
  br i1 %diff.check89, label %scalar.ph, label %vector.ph

vector.ph:                                        ; preds = %.preheader
  %vector.recur.init = insertelement <2 x double> poison, double %.pre, i64 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <2 x double> [ %vector.recur.init, %vector.ph ], [ %wide.load97, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %25 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %21, i64 %.16375, i64 %offset.idx
  %wide.load = load <2 x double>, ptr %25, align 8, !tbaa !5
  %26 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %22, i64 %.16375, i64 %offset.idx
  %wide.load93 = load <2 x double>, ptr %26, align 8, !tbaa !5
  %27 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %23, i64 %offset.idx
  %wide.load94 = load <2 x double>, ptr %27, align 8, !tbaa !5
  %28 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %24, i64 %offset.idx
  %wide.load95 = load <2 x double>, ptr %28, align 8, !tbaa !5
  %29 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %.16375, i64 %index
  %wide.load96 = load <2 x double>, ptr %29, align 16, !tbaa !5
  %30 = add nuw nsw i64 %index, 2
  %31 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %.16375, i64 %30
  %wide.load97 = load <2 x double>, ptr %31, align 16, !tbaa !5
  %32 = shufflevector <2 x double> %vector.recur, <2 x double> %wide.load97, <2 x i32> <i32 1, i32 2>
  %33 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %32, <2 x double> <double -2.000000e+00, double -2.000000e+00>, <2 x double> %wide.load)
  %34 = fadd <2 x double> %33, %wide.load93
  %35 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %32, <2 x double> <double -2.000000e+00, double -2.000000e+00>, <2 x double> %wide.load94)
  %36 = fadd <2 x double> %35, %wide.load95
  %37 = fmul <2 x double> %36, <double 1.250000e-01, double 1.250000e-01>
  %38 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %34, <2 x double> <double 1.250000e-01, double 1.250000e-01>, <2 x double> %37)
  %39 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %32, <2 x double> <double -2.000000e+00, double -2.000000e+00>, <2 x double> %wide.load96)
  %40 = fadd <2 x double> %39, %wide.load97
  %41 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %40, <2 x double> <double 1.250000e-01, double 1.250000e-01>, <2 x double> %38)
  %42 = fadd <2 x double> %32, %41
  %43 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %20, i64 %.176, i64 %.16375, i64 %offset.idx
  store <2 x double> %42, ptr %43, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %44 = icmp eq i64 %index.next, 150
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !13

scalar.ph:                                        ; preds = %.preheader, %scalar.ph
  %45 = phi double [ %66, %scalar.ph ], [ %.pre, %.preheader ]
  %.16574 = phi i64 [ %64, %scalar.ph ], [ 1, %.preheader ]
  %46 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %21, i64 %.16375, i64 %.16574
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = tail call double @llvm.fmuladd.f64(double %45, double -2.000000e+00, double %47)
  %49 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %22, i64 %.16375, i64 %.16574
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = fadd double %48, %50
  %52 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %23, i64 %.16574
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = tail call double @llvm.fmuladd.f64(double %45, double -2.000000e+00, double %53)
  %55 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %24, i64 %.16574
  %56 = load double, ptr %55, align 8, !tbaa !5
  %57 = fadd double %54, %56
  %58 = fmul double %57, 1.250000e-01
  %59 = tail call double @llvm.fmuladd.f64(double %51, double 1.250000e-01, double %58)
  %60 = add nsw i64 %.16574, -1
  %61 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %.16375, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = tail call double @llvm.fmuladd.f64(double %45, double -2.000000e+00, double %62)
  %64 = add nuw nsw i64 %.16574, 1
  %65 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %19, i64 %.176, i64 %.16375, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = fadd double %63, %66
  %68 = tail call double @llvm.fmuladd.f64(double %67, double 1.250000e-01, double %59)
  %69 = fadd double %45, %68
  %70 = getelementptr inbounds [2 x [152 x [152 x [152 x double]]]], ptr @A, i64 0, i64 %20, i64 %.176, i64 %.16375, i64 %.16574
  store double %69, ptr %70, align 8, !tbaa !5
  %exitcond80.not = icmp eq i64 %64, 151
  br i1 %exitcond80.not, label %middle.block, label %scalar.ph, !llvm.loop !16

middle.block:                                     ; preds = %vector.body, %scalar.ph
  %exitcond81.not = icmp eq i64 %23, 151
  br i1 %exitcond81.not, label %71, label %.preheader, !llvm.loop !17

71:                                               ; preds = %middle.block
  %exitcond82.not = icmp eq i64 %21, 151
  br i1 %exitcond82.not, label %72, label %.preheader66, !llvm.loop !18

72:                                               ; preds = %71
  %73 = add nuw nsw i64 %.077, 1
  %exitcond83.not = icmp eq i64 %73, 99
  br i1 %exitcond83.not, label %74, label %.preheader67, !llvm.loop !19

74:                                               ; preds = %72
  ret i32 0
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

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

; 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>) #4

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

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass