; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/process/src/c_src (GeometricTransformation)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

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

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

declare ptr @simple_mat_copy(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @hypercv_pyramid_up(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %2
  br label %29

25:                                               ; preds = %2
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !9
  store i32 %32, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !13
  store i32 %35, ptr %6, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !14
  store i32 %38, ptr %7, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %39, i32 0, i32 3
  %41 = load i32, ptr %40, align 4, !tbaa !15
  store i32 %41, ptr %8, align 4, !tbaa !12
  %42 = load i32, ptr %5, align 4, !tbaa !12
  %43 = icmp sge i32 %42, 2
  br i1 %43, label %44, label %48

44:                                               ; preds = %29
  %45 = load i32, ptr %6, align 4, !tbaa !12
  %46 = icmp sge i32 %45, 2
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  br label %52

48:                                               ; preds = %44, %29
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

52:                                               ; preds = %47
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  br label %60

56:                                               ; preds = %52
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

60:                                               ; preds = %55
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !12
  %65 = mul nsw i32 %64, 2
  %66 = icmp eq i32 %63, %65
  br i1 %66, label %67, label %75

67:                                               ; preds = %60
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = load i32, ptr %6, align 4, !tbaa !12
  %72 = mul nsw i32 %71, 2
  %73 = icmp eq i32 %70, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %67
  br label %79

75:                                               ; preds = %67, %60
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

79:                                               ; preds = %74
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 8, !tbaa !14
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !14
  %86 = icmp eq i32 %82, %85
  br i1 %86, label %87, label %88

87:                                               ; preds = %79
  br label %92

88:                                               ; preds = %79
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = call ptr @simple_mat_copy(ptr noundef %93)
  store ptr %94, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !9
  store i32 %97, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !13
  store i32 %100, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %101, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  store ptr %103, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %104, i32 0, i32 5
  %106 = load ptr, ptr %105, align 8, !tbaa !16
  store ptr %106, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !12
  br label %107

107:                                              ; preds = %200, %92
  %108 = load i32, ptr %14, align 4, !tbaa !12
  %109 = load i32, ptr %10, align 4, !tbaa !12
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %203

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %113

113:                                              ; preds = %196, %112
  %114 = load i32, ptr %16, align 4, !tbaa !12
  %115 = load i32, ptr %11, align 4, !tbaa !12
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %113
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %199

118:                                              ; preds = %113
  %119 = load i32, ptr %14, align 4, !tbaa !12
  %120 = srem i32 %119, 2
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %126, label %122

122:                                              ; preds = %118
  %123 = load i32, ptr %16, align 4, !tbaa !12
  %124 = srem i32 %123, 2
  %125 = icmp eq i32 %124, 1
  br i1 %125, label %126, label %151

126:                                              ; preds = %122, %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !12
  br label %127

127:                                              ; preds = %147, %126
  %128 = load i32, ptr %17, align 4, !tbaa !12
  %129 = load i32, ptr %8, align 4, !tbaa !12
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %150

132:                                              ; preds = %127
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = load i32, ptr %14, align 4, !tbaa !12
  %135 = load i32, ptr %11, align 4, !tbaa !12
  %136 = mul nsw i32 %134, %135
  %137 = load i32, ptr %8, align 4, !tbaa !12
  %138 = mul nsw i32 %136, %137
  %139 = load i32, ptr %16, align 4, !tbaa !12
  %140 = load i32, ptr %8, align 4, !tbaa !12
  %141 = mul nsw i32 %139, %140
  %142 = add nsw i32 %138, %141
  %143 = load i32, ptr %17, align 4, !tbaa !12
  %144 = add nsw i32 %142, %143
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %133, i64 %145
  store i8 0, ptr %146, align 1, !tbaa !17
  br label %147

147:                                              ; preds = %132
  %148 = load i32, ptr %17, align 4, !tbaa !12
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %17, align 4, !tbaa !12
  br label %127, !llvm.loop !18

150:                                              ; preds = %131
  br label %195

151:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !12
  br label %152

152:                                              ; preds = %191, %151
  %153 = load i32, ptr %18, align 4, !tbaa !12
  %154 = load i32, ptr %8, align 4, !tbaa !12
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %194

157:                                              ; preds = %152
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = load i32, ptr %14, align 4, !tbaa !12
  %160 = sdiv i32 %159, 2
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !13
  %164 = mul nsw i32 %160, %163
  %165 = load i32, ptr %8, align 4, !tbaa !12
  %166 = mul nsw i32 %164, %165
  %167 = load i32, ptr %16, align 4, !tbaa !12
  %168 = sdiv i32 %167, 2
  %169 = load i32, ptr %8, align 4, !tbaa !12
  %170 = mul nsw i32 %168, %169
  %171 = add nsw i32 %166, %170
  %172 = load i32, ptr %18, align 4, !tbaa !12
  %173 = add nsw i32 %171, %172
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i8, ptr %158, i64 %174
  %176 = load i8, ptr %175, align 1, !tbaa !17
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = load i32, ptr %14, align 4, !tbaa !12
  %179 = load i32, ptr %11, align 4, !tbaa !12
  %180 = mul nsw i32 %178, %179
  %181 = load i32, ptr %8, align 4, !tbaa !12
  %182 = mul nsw i32 %180, %181
  %183 = load i32, ptr %16, align 4, !tbaa !12
  %184 = load i32, ptr %8, align 4, !tbaa !12
  %185 = mul nsw i32 %183, %184
  %186 = add nsw i32 %182, %185
  %187 = load i32, ptr %18, align 4, !tbaa !12
  %188 = add nsw i32 %186, %187
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i8, ptr %177, i64 %189
  store i8 %176, ptr %190, align 1, !tbaa !17
  br label %191

191:                                              ; preds = %157
  %192 = load i32, ptr %18, align 4, !tbaa !12
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %18, align 4, !tbaa !12
  br label %152, !llvm.loop !20

194:                                              ; preds = %156
  br label %195

195:                                              ; preds = %194, %150
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %16, align 4, !tbaa !12
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %16, align 4, !tbaa !12
  br label %113, !llvm.loop !21

199:                                              ; preds = %117
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %14, align 4, !tbaa !12
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %14, align 4, !tbaa !12
  br label %107, !llvm.loop !22

203:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %204 = call ptr @gaussian_kernel(i32 noundef 5, double noundef 0.000000e+00, i32 noundef 4)
  store ptr %204, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %205, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !16
  store ptr %207, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !12
  br label %208

208:                                              ; preds = %223, %203
  %209 = load i32, ptr %21, align 4, !tbaa !12
  %210 = icmp slt i32 %209, 5
  br i1 %210, label %212, label %211

211:                                              ; preds = %208
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %226

212:                                              ; preds = %208
  %213 = load ptr, ptr %20, align 8, !tbaa !5
  %214 = load i32, ptr %21, align 4, !tbaa !12
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds float, ptr %213, i64 %215
  %217 = load float, ptr %216, align 4, !tbaa !23
  %218 = fmul float %217, 2.000000e+00
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = load i32, ptr %21, align 4, !tbaa !12
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds float, ptr %219, i64 %221
  store float %218, ptr %222, align 4, !tbaa !23
  br label %223

223:                                              ; preds = %212
  %224 = load i32, ptr %21, align 4, !tbaa !12
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %21, align 4, !tbaa !12
  br label %208, !llvm.loop !25

226:                                              ; preds = %211
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = load ptr, ptr %19, align 8, !tbaa !5
  %230 = load ptr, ptr %19, align 8, !tbaa !5
  call void @hypercv_gaussian_blur_with_kernel(ptr noundef %227, ptr noundef %228, ptr noundef %229, ptr noundef %230, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

declare ptr @gaussian_kernel(i32 noundef, double noundef, i32 noundef) #0

declare void @hypercv_gaussian_blur_with_kernel(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn nounwind }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!10, !11, i64 8}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !6, i64 24}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = distinct !{!25, !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"

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

declare ptr @simple_mat_copy(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @hypercv_pyramid_up(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #3 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %3, label %7

3:                                                ; preds = %2
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

7:                                                ; preds = %2
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  %13 = load i32, ptr %12, align 4, !tbaa !12
  %.fr113 = freeze i32 %13
  %14 = icmp sgt i32 %8, 1
  %15 = icmp sgt i32 %10, 1
  %or.cond = select i1 %14, i1 %15, i1 false
  br i1 %or.cond, label %20, label %16

16:                                               ; preds = %7
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

20:                                               ; preds = %7
  %.not75 = icmp eq ptr %1, null
  br i1 %.not75, label %21, label %25

21:                                               ; preds = %20
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

25:                                               ; preds = %20
  %26 = load i32, ptr %1, align 8, !tbaa !5
  %27 = shl nuw nsw i32 %8, 1
  %28 = icmp eq i32 %26, %27
  br i1 %28, label %29, label %34

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %1, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = shl nuw nsw i32 %10, 1
  %33 = icmp eq i32 %31, %32
  br i1 %33, label %38, label %34

34:                                               ; preds = %29, %25
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

38:                                               ; preds = %29
  %39 = getelementptr inbounds i8, ptr %1, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = load i32, ptr %11, align 8, !tbaa !13
  %42 = icmp eq i32 %40, %41
  br i1 %42, label %47, label %43

43:                                               ; preds = %38
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

47:                                               ; preds = %38
  %48 = tail call ptr @simple_mat_copy(ptr noundef nonnull %1) #6
  %49 = load i32, ptr %1, align 8, !tbaa !5
  %50 = load i32, ptr %30, align 4, !tbaa !11
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  %52 = load ptr, ptr %51, align 8, !tbaa !14
  %53 = getelementptr inbounds i8, ptr %48, i64 24
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  %55 = icmp sgt i32 %49, 0
  %56 = icmp sgt i32 %50, 0
  %or.cond160 = select i1 %55, i1 %56, i1 false
  %57 = icmp sgt i32 %.fr113, 0
  %or.cond161 = and i1 %or.cond160, %57
  br i1 %or.cond161, label %.preheader81.us.us.us.preheader, label %._crit_edge100

.preheader81.us.us.us.preheader:                  ; preds = %47
  %58 = mul i32 %.fr113, %50
  %59 = zext nneg i32 %.fr113 to i64
  %60 = zext nneg i32 %50 to i64
  %wide.trip.count154 = zext nneg i32 %49 to i64
  %xtraiter = and i64 %59, 1
  %61 = icmp eq i32 %.fr113, 1
  %unroll_iter = and i64 %59, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader81.us.us.us

.preheader81.us.us.us:                            ; preds = %.preheader81.us.us.us.preheader, %._crit_edge.split.us.us.us.split.us.us
  %indvars.iv151 = phi i64 [ 0, %.preheader81.us.us.us.preheader ], [ %indvars.iv.next152, %._crit_edge.split.us.us.us.split.us.us ]
  %62 = trunc nuw nsw i64 %indvars.iv151 to i32
  %63 = mul i32 %58, %62
  %64 = lshr exact i32 %62, 1
  %65 = mul nuw nsw i64 %indvars.iv151, %60
  br label %66

66:                                               ; preds = %..loopexit80_crit_edge.us.us.us.us.us, %.preheader81.us.us.us
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %..loopexit80_crit_edge.us.us.us.us.us ], [ 0, %.preheader81.us.us.us ]
  %67 = trunc nuw nsw i64 %indvars.iv146 to i32
  %68 = or i32 %67, %62
  %69 = and i32 %68, 1
  %or.cond78.us.us.us.us.us = icmp eq i32 %69, 0
  br i1 %or.cond78.us.us.us.us.us, label %.preheader.us.us.us.us.us, label %.preheader79.us.us.us.us.us

..loopexit80_crit_edge.us.us.us.us.us.loopexit.unr-lcssa: ; preds = %.preheader.us.us.us.us.us.new, %.preheader.us.us.us.us.us
  %indvars.iv141.unr = phi i64 [ 0, %.preheader.us.us.us.us.us ], [ %indvars.iv.next142.1, %.preheader.us.us.us.us.us.new ]
  br i1 %lcmp.mod.not, label %..loopexit80_crit_edge.us.us.us.us.us, label %..loopexit80_crit_edge.us.us.us.us.us.loopexit.epilog-lcssa

..loopexit80_crit_edge.us.us.us.us.us.loopexit.epilog-lcssa: ; preds = %..loopexit80_crit_edge.us.us.us.us.us.loopexit.unr-lcssa
  %70 = load i32, ptr %9, align 4, !tbaa !11
  %71 = mul nsw i32 %70, %64
  %72 = add i32 %71, %94
  %73 = mul i32 %72, %.fr113
  %74 = sext i32 %73 to i64
  %75 = getelementptr i8, ptr %52, i64 %indvars.iv141.unr
  %76 = getelementptr i8, ptr %75, i64 %74
  %77 = load i8, ptr %76, align 1, !tbaa !15
  %gep.epil = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv141.unr
  store i8 %77, ptr %gep.epil, align 1, !tbaa !15
  br label %..loopexit80_crit_edge.us.us.us.us.us

..loopexit80_crit_edge.us.us.us.us.us:            ; preds = %..loopexit80_crit_edge.us.us.us.us.us.loopexit.epilog-lcssa, %..loopexit80_crit_edge.us.us.us.us.us.loopexit.unr-lcssa, %.preheader79.us.us.us.us.us
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %60
  br i1 %exitcond150.not, label %._crit_edge.split.us.us.us.split.us.us, label %66, !llvm.loop !16

.preheader.us.us.us.us.us.new:                    ; preds = %.preheader.us.us.us.us.us, %.preheader.us.us.us.us.us.new
  %indvars.iv141 = phi i64 [ %indvars.iv.next142.1, %.preheader.us.us.us.us.us.new ], [ 0, %.preheader.us.us.us.us.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us.us.us.us.us.new ], [ 0, %.preheader.us.us.us.us.us ]
  %78 = load i32, ptr %9, align 4, !tbaa !11
  %79 = mul nsw i32 %78, %64
  %80 = add i32 %79, %94
  %81 = mul i32 %80, %.fr113
  %82 = sext i32 %81 to i64
  %83 = getelementptr i8, ptr %52, i64 %indvars.iv141
  %84 = getelementptr i8, ptr %83, i64 %82
  %85 = load i8, ptr %84, align 1, !tbaa !15
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv141
  store i8 %85, ptr %gep, align 1, !tbaa !15
  %indvars.iv.next142 = or disjoint i64 %indvars.iv141, 1
  %86 = load i32, ptr %9, align 4, !tbaa !11
  %87 = mul nsw i32 %86, %64
  %88 = add i32 %87, %94
  %89 = mul i32 %88, %.fr113
  %90 = sext i32 %89 to i64
  %91 = getelementptr i8, ptr %52, i64 %indvars.iv.next142
  %92 = getelementptr i8, ptr %91, i64 %90
  %93 = load i8, ptr %92, align 1, !tbaa !15
  %gep.1 = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv.next142
  store i8 %93, ptr %gep.1, align 1, !tbaa !15
  %indvars.iv.next142.1 = add nuw nsw i64 %indvars.iv141, 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 %..loopexit80_crit_edge.us.us.us.us.us.loopexit.unr-lcssa, label %.preheader.us.us.us.us.us.new, !llvm.loop !18

.preheader.us.us.us.us.us:                        ; preds = %66
  %94 = lshr exact i32 %67, 1
  %95 = add nuw nsw i64 %indvars.iv146, %65
  %96 = trunc nuw i64 %95 to i32
  %97 = mul i32 %.fr113, %96
  %98 = sext i32 %97 to i64
  %invariant.gep = getelementptr i8, ptr %54, i64 %98
  br i1 %61, label %..loopexit80_crit_edge.us.us.us.us.us.loopexit.unr-lcssa, label %.preheader.us.us.us.us.us.new

.preheader79.us.us.us.us.us:                      ; preds = %66
  %99 = mul i32 %.fr113, %67
  %100 = add i32 %63, %99
  %101 = sext i32 %100 to i64
  %scevgep137 = getelementptr i8, ptr %54, i64 %101
  tail call void @llvm.memset.p0.i64(ptr align 1 %scevgep137, i8 0, i64 %59, i1 false), !tbaa !15
  br label %..loopexit80_crit_edge.us.us.us.us.us

._crit_edge.split.us.us.us.split.us.us:           ; preds = %..loopexit80_crit_edge.us.us.us.us.us
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155.not, label %._crit_edge100, label %.preheader81.us.us.us, !llvm.loop !19

._crit_edge100:                                   ; preds = %._crit_edge.split.us.us.us.split.us.us, %47
  %102 = tail call ptr @gaussian_kernel(i32 noundef 5, double noundef 0.000000e+00, i32 noundef 4) #6
  %103 = getelementptr inbounds i8, ptr %102, i64 24
  %104 = load ptr, ptr %103, align 8, !tbaa !14
  %105 = load <4 x float>, ptr %104, align 4, !tbaa !20
  %106 = fmul <4 x float> %105, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
  store <4 x float> %106, ptr %104, align 4, !tbaa !20
  %107 = getelementptr inbounds i8, ptr %104, i64 16
  %108 = load float, ptr %107, align 4, !tbaa !20
  %109 = fmul float %108, 2.000000e+00
  store float %109, ptr %107, align 4, !tbaa !20
  tail call void @hypercv_gaussian_blur_with_kernel(ptr noundef %48, ptr noundef nonnull %1, ptr noundef %102, ptr noundef %102, i32 noundef 1) #6
  ret void
}

declare ptr @gaussian_kernel(i32 noundef, double noundef, i32 noundef) local_unnamed_addr #2

declare void @hypercv_gaussian_blur_with_kernel(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 = { 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 #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 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 nounwind willreturn memory(argmem: write) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !10, i64 24}
!15 = !{!8, !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !8, i64 0}


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