; LLVM IR from OAID/AutoKernel :: AutoSearch/src/adams2019 (test_function_dag)

; 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.halide_buffer_t = type { i64, ptr, ptr, i64, %struct.halide_type_t, i32, ptr, ptr }
%struct.halide_type_t = type { i8, i8, i16 }
%struct.halide_dimension_t = type { i32, i32, i32, i32 }

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK15halide_buffer_t15is_bounds_queryEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @matmul(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [2 x i32], align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca [2 x i32], align 4
  %17 = alloca ptr, align 8
  %18 = alloca [2 x i32], align 4
  %19 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZNK15halide_buffer_t15is_bounds_queryEv(ptr noundef nonnull align 8 dereferenceable(56) %20)
  br i1 %21, label %25, label %22

22:                                               ; preds = %3
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = call noundef zeroext i1 @_ZNK15halide_buffer_t15is_bounds_queryEv(ptr noundef nonnull align 8 dereferenceable(56) %23)
  br i1 %24, label %25, label %70

25:                                               ; preds = %22, %3
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.halide_buffer_t, ptr %26, i32 0, i32 6
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.halide_dimension_t, ptr %28, i64 0
  %30 = getelementptr inbounds %struct.halide_dimension_t, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 4, !tbaa !16
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.halide_buffer_t, ptr %32, i32 0, i32 6
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.halide_dimension_t, ptr %34, i64 0
  %36 = getelementptr inbounds %struct.halide_dimension_t, ptr %35, i32 0, i32 0
  store i32 %31, ptr %36, align 4, !tbaa !16
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.halide_buffer_t, ptr %37, i32 0, i32 6
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.halide_dimension_t, ptr %39, i64 0
  %41 = getelementptr inbounds %struct.halide_dimension_t, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !18
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.halide_buffer_t, ptr %43, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.halide_dimension_t, ptr %45, i64 0
  %47 = getelementptr inbounds %struct.halide_dimension_t, ptr %46, i32 0, i32 1
  store i32 %42, ptr %47, align 4, !tbaa !18
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.halide_buffer_t, ptr %48, i32 0, i32 6
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.halide_dimension_t, ptr %50, i64 1
  %52 = getelementptr inbounds %struct.halide_dimension_t, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 4, !tbaa !16
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.halide_buffer_t, ptr %54, i32 0, i32 6
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.halide_dimension_t, ptr %56, i64 1
  %58 = getelementptr inbounds %struct.halide_dimension_t, ptr %57, i32 0, i32 0
  store i32 %53, ptr %58, align 4, !tbaa !16
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.halide_buffer_t, ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.halide_dimension_t, ptr %61, i64 1
  %63 = getelementptr inbounds %struct.halide_dimension_t, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !18
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.halide_buffer_t, ptr %65, i32 0, i32 6
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.halide_dimension_t, ptr %67, i64 1
  %69 = getelementptr inbounds %struct.halide_dimension_t, ptr %68, i32 0, i32 1
  store i32 %64, ptr %69, align 4, !tbaa !18
  store i32 0, ptr %4, align 4
  br label %170

70:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.halide_buffer_t, ptr %71, i32 0, i32 6
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.halide_dimension_t, ptr %73, i64 0
  %75 = getelementptr inbounds %struct.halide_dimension_t, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 4, !tbaa !16
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.halide_buffer_t, ptr %77, i32 0, i32 6
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.halide_dimension_t, ptr %79, i64 0
  %81 = getelementptr inbounds %struct.halide_dimension_t, ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !18
  %83 = add nsw i32 %76, %82
  store i32 %83, ptr %8, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.halide_buffer_t, ptr %84, i32 0, i32 6
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.halide_dimension_t, ptr %86, i64 1
  %88 = getelementptr inbounds %struct.halide_dimension_t, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 4, !tbaa !16
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.halide_buffer_t, ptr %90, i32 0, i32 6
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.halide_dimension_t, ptr %92, i64 1
  %94 = getelementptr inbounds %struct.halide_dimension_t, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !18
  %96 = add nsw i32 %89, %95
  store i32 %96, ptr %9, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.halide_buffer_t, ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.halide_dimension_t, ptr %99, i64 0
  %101 = getelementptr inbounds %struct.halide_dimension_t, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !16
  store i32 %102, ptr %10, align 4, !tbaa !19
  br label %103

103:                                              ; preds = %166, %70
  %104 = load i32, ptr %10, align 4, !tbaa !19
  %105 = load i32, ptr %8, align 4, !tbaa !19
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %169

108:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.halide_buffer_t, ptr %109, i32 0, i32 6
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.halide_dimension_t, ptr %111, i64 1
  %113 = getelementptr inbounds %struct.halide_dimension_t, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !16
  store i32 %114, ptr %12, align 4, !tbaa !19
  br label %115

115:                                              ; preds = %162, %108
  %116 = load i32, ptr %12, align 4, !tbaa !19
  %117 = load i32, ptr %9, align 4, !tbaa !19
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %165

120:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %121 = load i32, ptr %10, align 4, !tbaa !19
  store i32 %121, ptr %13, align 4, !tbaa !19
  %122 = getelementptr inbounds i32, ptr %13, i64 1
  %123 = load i32, ptr %12, align 4, !tbaa !19
  store i32 %123, ptr %122, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds [2 x i32], ptr %13, i64 0, i64 0
  %126 = call noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56) %124, ptr noundef %125)
  store ptr %126, ptr %14, align 8, !tbaa !5
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  store float 0.000000e+00, ptr %127, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !19
  br label %128

128:                                              ; preds = %158, %120
  %129 = load i32, ptr %15, align 4, !tbaa !19
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.halide_buffer_t, ptr %130, i32 0, i32 6
  %132 = load ptr, ptr %131, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.halide_dimension_t, ptr %132, i64 1
  %134 = getelementptr inbounds %struct.halide_dimension_t, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !18
  %136 = icmp slt i32 %129, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %128
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %161

138:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %139 = load i32, ptr %10, align 4, !tbaa !19
  store i32 %139, ptr %16, align 4, !tbaa !19
  %140 = getelementptr inbounds i32, ptr %16, i64 1
  %141 = load i32, ptr %15, align 4, !tbaa !19
  store i32 %141, ptr %140, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 0
  %144 = call noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56) %142, ptr noundef %143)
  store ptr %144, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %145 = load i32, ptr %15, align 4, !tbaa !19
  store i32 %145, ptr %18, align 4, !tbaa !19
  %146 = getelementptr inbounds i32, ptr %18, i64 1
  %147 = load i32, ptr %12, align 4, !tbaa !19
  store i32 %147, ptr %146, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds [2 x i32], ptr %18, i64 0, i64 0
  %150 = call noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56) %148, ptr noundef %149)
  store ptr %150, ptr %19, align 8, !tbaa !5
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  %152 = load float, ptr %151, align 4, !tbaa !20
  %153 = load ptr, ptr %19, align 8, !tbaa !5
  %154 = load float, ptr %153, align 4, !tbaa !20
  %155 = load ptr, ptr %14, align 8, !tbaa !5
  %156 = load float, ptr %155, align 4, !tbaa !20
  %157 = call float @llvm.fmuladd.f32(float %152, float %154, float %156)
  store float %157, ptr %155, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %158

158:                                              ; preds = %138
  %159 = load i32, ptr %15, align 4, !tbaa !19
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %15, align 4, !tbaa !19
  br label %128, !llvm.loop !22

161:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %12, align 4, !tbaa !19
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %12, align 4, !tbaa !19
  br label %115, !llvm.loop !24

165:                                              ; preds = %119
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %10, align 4, !tbaa !19
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %10, align 4, !tbaa !19
  br label %103, !llvm.loop !25

169:                                              ; preds = %107
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %170

170:                                              ; preds = %169, %25
  %171 = load i32, ptr %4, align 4
  ret i32 %171
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #3 align 2

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

attributes #0 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { alwaysinline mustprogress 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 40}
!10 = !{!"_ZTS15halide_buffer_t", !11, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 32, !15, i64 36, !6, i64 40, !6, i64 48}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTS13halide_type_t", !13, i64 0, !7, i64 1, !14, i64 2}
!13 = !{!"_ZTS18halide_type_code_t", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !15, i64 0}
!17 = !{!"_ZTS18halide_dimension_t", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!18 = !{!17, !15, i64 4}
!19 = !{!15, !15, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}


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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK15halide_buffer_t15is_bounds_queryEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @matmul(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca [2 x i32], align 4
  %5 = alloca [2 x i32], align 4
  %6 = alloca [2 x i32], align 4
  %7 = tail call noundef zeroext i1 @_ZNK15halide_buffer_t15is_bounds_queryEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  br i1 %7, label %10, label %8

8:                                                ; preds = %3
  %9 = tail call noundef zeroext i1 @_ZNK15halide_buffer_t15is_bounds_queryEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  br i1 %9, label %10, label %21

10:                                               ; preds = %8, %3
  %11 = getelementptr inbounds i8, ptr %2, i64 40
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = load <2 x i32>, ptr %12, align 4, !tbaa !15
  store <2 x i32> %15, ptr %14, align 4, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %12, i64 16
  %17 = getelementptr inbounds i8, ptr %1, i64 40
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  %20 = load <2 x i32>, ptr %16, align 4, !tbaa !15
  store <2 x i32> %20, ptr %19, align 4, !tbaa !15
  br label %.loopexit

21:                                               ; preds = %8
  %22 = getelementptr inbounds i8, ptr %2, i64 40
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = load i32, ptr %23, align 4, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %23, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !18
  %27 = add nsw i32 %26, %24
  %28 = getelementptr inbounds i8, ptr %23, i64 16
  %29 = load i32, ptr %28, align 4, !tbaa !16
  %30 = getelementptr inbounds i8, ptr %23, i64 20
  %31 = load i32, ptr %30, align 4, !tbaa !18
  %32 = add i32 %31, %29
  %33 = icmp sgt i32 %26, 0
  br i1 %33, label %.lr.ph48, label %.loopexit

.lr.ph48:                                         ; preds = %21
  %34 = getelementptr inbounds i8, ptr %4, i64 4
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  %36 = getelementptr inbounds i8, ptr %5, i64 4
  %37 = getelementptr inbounds i8, ptr %6, i64 4
  %38 = icmp slt i32 %29, %32
  br i1 %38, label %.lr.ph48.split, label %.loopexit

.lr.ph48.split:                                   ; preds = %.lr.ph48, %._crit_edge45
  %.03846 = phi i32 [ %43, %._crit_edge45 ], [ %24, %.lr.ph48 ]
  %39 = load ptr, ptr %22, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load i32, ptr %40, align 4, !tbaa !16
  %42 = icmp slt i32 %41, %32
  br i1 %42, label %.lr.ph44, label %._crit_edge45

._crit_edge45:                                    ; preds = %._crit_edge, %.lr.ph48.split
  %43 = add nsw i32 %.03846, 1
  %44 = icmp slt i32 %43, %27
  br i1 %44, label %.lr.ph48.split, label %.loopexit, !llvm.loop !19

.lr.ph44:                                         ; preds = %.lr.ph48.split, %._crit_edge
  %.04042 = phi i32 [ %50, %._crit_edge ], [ %41, %.lr.ph48.split ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i32 %.03846, ptr %4, align 4, !tbaa !15
  store i32 %.04042, ptr %34, align 4, !tbaa !15
  %45 = call noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull %4)
  store float 0.000000e+00, ptr %45, align 4, !tbaa !22
  %46 = load ptr, ptr %35, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 20
  %48 = load i32, ptr %47, align 4, !tbaa !18
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %50 = add i32 %.04042, 1
  %exitcond.not = icmp eq i32 %50, %32
  br i1 %exitcond.not, label %._crit_edge45, label %.lr.ph44, !llvm.loop !24

.lr.ph:                                           ; preds = %.lr.ph44, %.lr.ph
  %.03941 = phi i32 [ %57, %.lr.ph ], [ 0, %.lr.ph44 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i32 %.03846, ptr %5, align 4, !tbaa !15
  store i32 %.03941, ptr %36, align 4, !tbaa !15
  %51 = call noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i32 %.03941, ptr %6, align 4, !tbaa !15
  store i32 %.04042, ptr %37, align 4, !tbaa !15
  %52 = call noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull %6)
  %53 = load float, ptr %51, align 4, !tbaa !22
  %54 = load float, ptr %52, align 4, !tbaa !22
  %55 = load float, ptr %45, align 4, !tbaa !22
  %56 = call float @llvm.fmuladd.f32(float %53, float %54, float %55)
  store float %56, ptr %45, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %57 = add nuw nsw i32 %.03941, 1
  %58 = load ptr, ptr %35, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 20
  %60 = load i32, ptr %59, align 4, !tbaa !18
  %61 = icmp slt i32 %57, %60
  br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !25

.loopexit:                                        ; preds = %._crit_edge45, %.lr.ph48, %21, %10
  ret i32 0
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZNK15halide_buffer_t10address_ofEPKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #3 align 2

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

attributes #0 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { alwaysinline mustprogress 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 = { mustprogress 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, !10, i64 40}
!6 = !{!"_ZTS15halide_buffer_t", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !11, i64 32, !14, i64 36, !10, i64 40, !10, i64 48}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS13halide_type_t", !12, i64 0, !8, i64 1, !13, i64 2}
!12 = !{!"_ZTS18halide_type_code_t", !8, i64 0}
!13 = !{!"short", !8, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !14, i64 0}
!17 = !{!"_ZTS18halide_dimension_t", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!18 = !{!17, !14, i64 4}
!19 = distinct !{!19, !20, !21}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !8, i64 0}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass