; LLVM IR from Wilson-ZheLin/Introduction-to-Digital-Image-Processing :: 7. Image Noise and Noise Reduction, Homomorphic Filter, and Band Stop Filter/src/ma_01734bfb (Z16AlphaTrimmedMeanP5Image)

; 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.Image = type { i32, i32, i32, ptr, [15 x [100 x i8]], i32 }

@.str.18 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z14CreateNewImageP5ImagePc(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12SavePNMImageP5ImagePc(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16AlphaTrimmedMeanP5Image(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [9 x i8], align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %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 i32, align 4
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #2
  call void @llvm.lifetime.start.p0(i64 9, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = call noundef ptr @_Z14CreateNewImageP5ImagePc(ptr noundef %19, ptr noundef @.str.18)
  store ptr %20, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.Image, ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %3, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.Image, ptr %24, i32 0, i32 3
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  store ptr %26, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  store i32 1, ptr %7, align 4, !tbaa !12
  br label %27

27:                                               ; preds = %176, %1
  %28 = load i32, ptr %7, align 4, !tbaa !12
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.Image, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !13
  %32 = sub nsw i32 %31, 1
  %33 = icmp slt i32 %28, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %27
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  br label %179

35:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  store i32 1, ptr %9, align 4, !tbaa !12
  br label %36

36:                                               ; preds = %172, %35
  %37 = load i32, ptr %9, align 4, !tbaa !12
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.Image, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !14
  %41 = sub nsw i32 %40, 1
  %42 = icmp slt i32 %37, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %36
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  br label %175

44:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  store i32 0, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  store i32 -1, ptr %11, align 4, !tbaa !12
  br label %45

45:                                               ; preds = %78, %44
  %46 = load i32, ptr %11, align 4, !tbaa !12
  %47 = icmp sle i32 %46, 1
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  br label %81

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  store i32 -1, ptr %12, align 4, !tbaa !12
  br label %50

50:                                               ; preds = %74, %49
  %51 = load i32, ptr %12, align 4, !tbaa !12
  %52 = icmp sle i32 %51, 1
  br i1 %52, label %54, label %53

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

54:                                               ; preds = %50
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.Image, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !14
  %59 = load i32, ptr %7, align 4, !tbaa !12
  %60 = load i32, ptr %11, align 4, !tbaa !12
  %61 = add nsw i32 %59, %60
  %62 = mul nsw i32 %58, %61
  %63 = load i32, ptr %9, align 4, !tbaa !12
  %64 = load i32, ptr %12, align 4, !tbaa !12
  %65 = add nsw i32 %63, %64
  %66 = add nsw i32 %62, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %55, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !15
  %70 = load i32, ptr %10, align 4, !tbaa !12
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %10, align 4, !tbaa !12
  %72 = sext i32 %70 to i64
  %73 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %72
  store i8 %69, ptr %73, align 1, !tbaa !15
  br label %74

74:                                               ; preds = %54
  %75 = load i32, ptr %12, align 4, !tbaa !12
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %12, align 4, !tbaa !12
  br label %50, !llvm.loop !16

77:                                               ; preds = %53
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %11, align 4, !tbaa !12
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %11, align 4, !tbaa !12
  br label %45, !llvm.loop !18

81:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  store i32 1, ptr %13, align 4, !tbaa !12
  br label %82

82:                                               ; preds = %124, %81
  %83 = load i32, ptr %13, align 4, !tbaa !12
  %84 = icmp slt i32 %83, 9
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  br label %127

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %87 = load i32, ptr %13, align 4, !tbaa !12
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !15
  %91 = zext i8 %90 to i32
  store i32 %91, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  %92 = load i32, ptr %13, align 4, !tbaa !12
  store i32 %92, ptr %15, align 4, !tbaa !12
  br label %93

93:                                               ; preds = %107, %86
  %94 = load i32, ptr %15, align 4, !tbaa !12
  %95 = icmp sge i32 %94, 1
  br i1 %95, label %96, label %105

96:                                               ; preds = %93
  %97 = load i32, ptr %15, align 4, !tbaa !12
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !15
  %102 = zext i8 %101 to i32
  %103 = load i32, ptr %14, align 4, !tbaa !12
  %104 = icmp sgt i32 %102, %103
  br label %105

105:                                              ; preds = %96, %93
  %106 = phi i1 [ false, %93 ], [ %104, %96 ]
  br i1 %106, label %107, label %118

107:                                              ; preds = %105
  %108 = load i32, ptr %15, align 4, !tbaa !12
  %109 = sub nsw i32 %108, 1
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %110
  %112 = load i8, ptr %111, align 1, !tbaa !15
  %113 = load i32, ptr %15, align 4, !tbaa !12
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %114
  store i8 %112, ptr %115, align 1, !tbaa !15
  %116 = load i32, ptr %15, align 4, !tbaa !12
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %15, align 4, !tbaa !12
  br label %93, !llvm.loop !19

118:                                              ; preds = %105
  %119 = load i32, ptr %14, align 4, !tbaa !12
  %120 = trunc i32 %119 to i8
  %121 = load i32, ptr %15, align 4, !tbaa !12
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %122
  store i8 %120, ptr %123, align 1, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  br label %124

124:                                              ; preds = %118
  %125 = load i32, ptr %13, align 4, !tbaa !12
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %13, align 4, !tbaa !12
  br label %82, !llvm.loop !20

127:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  store i32 0, ptr %16, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  store i32 2, ptr %17, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  %128 = load i32, ptr %17, align 4, !tbaa !12
  store i32 %128, ptr %18, align 4, !tbaa !12
  br label %129

129:                                              ; preds = %143, %127
  %130 = load i32, ptr %18, align 4, !tbaa !12
  %131 = load i32, ptr %17, align 4, !tbaa !12
  %132 = sub nsw i32 9, %131
  %133 = icmp slt i32 %130, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %129
  store i32 19, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  br label %146

135:                                              ; preds = %129
  %136 = load i32, ptr %18, align 4, !tbaa !12
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !15
  %140 = zext i8 %139 to i32
  %141 = load i32, ptr %16, align 4, !tbaa !12
  %142 = add nsw i32 %141, %140
  store i32 %142, ptr %16, align 4, !tbaa !12
  br label %143

143:                                              ; preds = %135
  %144 = load i32, ptr %18, align 4, !tbaa !12
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %18, align 4, !tbaa !12
  br label %129, !llvm.loop !21

146:                                              ; preds = %134
  %147 = load i32, ptr %17, align 4, !tbaa !12
  %148 = mul nsw i32 2, %147
  %149 = sub nsw i32 9, %148
  %150 = load i32, ptr %16, align 4, !tbaa !12
  %151 = sdiv i32 %150, %149
  store i32 %151, ptr %16, align 4, !tbaa !12
  %152 = load i32, ptr %16, align 4, !tbaa !12
  %153 = icmp sgt i32 %152, 255
  br i1 %153, label %154, label %155

154:                                              ; preds = %146
  store i32 255, ptr %16, align 4, !tbaa !12
  br label %155

155:                                              ; preds = %154, %146
  %156 = load i32, ptr %16, align 4, !tbaa !12
  %157 = icmp slt i32 %156, 0
  br i1 %157, label %158, label %159

158:                                              ; preds = %155
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %159

159:                                              ; preds = %158, %155
  %160 = load i32, ptr %16, align 4, !tbaa !12
  %161 = trunc i32 %160 to i8
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.Image, ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !14
  %166 = load i32, ptr %7, align 4, !tbaa !12
  %167 = mul nsw i32 %165, %166
  %168 = load i32, ptr %9, align 4, !tbaa !12
  %169 = add nsw i32 %167, %168
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i8, ptr %162, i64 %170
  store i8 %161, ptr %171, align 1, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  br label %172

172:                                              ; preds = %159
  %173 = load i32, ptr %9, align 4, !tbaa !12
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %9, align 4, !tbaa !12
  br label %36, !llvm.loop !22

175:                                              ; preds = %43
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %7, align 4, !tbaa !12
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %7, align 4, !tbaa !12
  br label %27, !llvm.loop !23

179:                                              ; preds = %34
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_Z12SavePNMImageP5ImagePc(ptr noundef %180, ptr noundef @.str.19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 9, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #2
  ret void
}

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


; 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.18 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z14CreateNewImageP5ImagePc(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12SavePNMImageP5ImagePc(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16AlphaTrimmedMeanP5Image(ptr noundef %0) local_unnamed_addr #1 {
  %.sroa.0 = alloca i8, align 1
  %.sroa.18 = alloca i8, align 1
  %.sroa.42 = alloca <4 x i8>, align 4
  %.sroa.111 = alloca i8, align 1
  %.sroa.122 = alloca i8, align 1
  %.sroa.129 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %.sroa.0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %.sroa.18)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %.sroa.42)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %.sroa.111)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %.sroa.122)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %.sroa.129)
  %2 = tail call noundef ptr @_Z14CreateNewImageP5ImagePc(ptr noundef %0, ptr noundef nonnull @.str.18)
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %2, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !11
  %9 = icmp sgt i32 %8, 2
  %.sroa.42.1.sroa_idx = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx206 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx238 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx224 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx207 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx239 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx225 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx208 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx240 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx226 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx209 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx241 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx227 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx210 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  br i1 %9, label %.preheader59.lr.ph, label %._crit_edge70

.preheader59.lr.ph:                               ; preds = %1
  %10 = load i32, ptr %0, align 8, !tbaa !12
  %11 = icmp sgt i32 %10, 2
  br i1 %11, label %.preheader59.preheader, label %._crit_edge70

.preheader59.preheader:                           ; preds = %.preheader59.lr.ph
  %.sroa.42.1.sroa_idx223 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx237 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.3.sroa_idx250 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.1.sroa_idx222 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.1.sroa_idx221 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.1.sroa_idx220 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx236 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx219 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx249 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx235 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.3.sroa_idx248 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.1.sroa_idx218 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx234 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx217 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx247 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx233 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.3.sroa_idx246 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.1.sroa_idx216 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx232 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx215 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx245 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx231 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.3.sroa_idx244 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.1.sroa_idx214 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx230 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx213 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.3.sroa_idx243 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.2.sroa_idx229 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.3.sroa_idx242 = getelementptr inbounds i8, ptr %.sroa.42, i64 3
  %.sroa.42.1.sroa_idx212 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  %.sroa.42.2.sroa_idx228 = getelementptr inbounds i8, ptr %.sroa.42, i64 2
  %.sroa.42.1.sroa_idx211 = getelementptr inbounds i8, ptr %.sroa.42, i64 1
  br label %.preheader59

.preheader59:                                     ; preds = %.preheader59.preheader, %._crit_edge
  %12 = phi i32 [ %8, %.preheader59.preheader ], [ %62, %._crit_edge ]
  %13 = phi i32 [ %10, %.preheader59.preheader ], [ %63, %._crit_edge ]
  %indvars.iv = phi i64 [ 1, %.preheader59.preheader ], [ %indvars.iv.next.pre-phi, %._crit_edge ]
  %14 = icmp sgt i32 %13, 2
  br i1 %14, label %.preheader58.preheader, label %.preheader59.._crit_edge_crit_edge

.preheader59.._crit_edge_crit_edge:               ; preds = %.preheader59
  %.pre91 = add nuw nsw i64 %indvars.iv, 1
  br label %._crit_edge

.preheader58.preheader:                           ; preds = %.preheader59
  %15 = trunc i64 %indvars.iv to i32
  %16 = add i32 %15, -1
  %17 = trunc i64 %indvars.iv to i32
  %18 = add nuw nsw i64 %indvars.iv, 1
  %19 = trunc i64 %18 to i32
  %20 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.preheader58

._crit_edge70:                                    ; preds = %._crit_edge, %.preheader59.lr.ph, %1
  tail call void @_Z12SavePNMImageP5ImagePc(ptr noundef %2, ptr noundef nonnull @.str.19)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %.sroa.0)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %.sroa.18)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %.sroa.42)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %.sroa.111)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %.sroa.122)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %.sroa.129)
  ret void

.preheader58:                                     ; preds = %.preheader58.preheader, %.critedge.7
  %21 = phi i32 [ %148, %.critedge.7 ], [ %13, %.preheader58.preheader ]
  %.05568 = phi i32 [ %147, %.critedge.7 ], [ 1, %.preheader58.preheader ]
  %22 = mul i32 %16, %21
  %23 = add i32 %22, %.05568
  %24 = add i32 %23, -1
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds i8, ptr %4, i64 %25
  %27 = load i8, ptr %26, align 1, !tbaa !13
  store i8 %27, ptr %.sroa.0, align 1, !tbaa !13
  %28 = sext i32 %23 to i64
  %29 = getelementptr inbounds i8, ptr %4, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !13
  store i8 %30, ptr %.sroa.18, align 1, !tbaa !13
  %31 = add i32 %23, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i8, ptr %4, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !13
  store i8 %34, ptr %.sroa.42, align 4, !tbaa !13
  %35 = mul i32 %21, %17
  %36 = add i32 %35, %.05568
  %37 = add i32 %36, -1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i8, ptr %4, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !13
  store i8 %40, ptr %.sroa.42.1.sroa_idx223, align 1, !tbaa !13
  %41 = sext i32 %36 to i64
  %42 = getelementptr inbounds i8, ptr %4, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !13
  store i8 %43, ptr %.sroa.42.2.sroa_idx237, align 2, !tbaa !13
  %44 = add i32 %36, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %4, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !13
  store i8 %47, ptr %.sroa.42.3.sroa_idx250, align 1, !tbaa !13
  %48 = mul i32 %21, %19
  %49 = add i32 %48, %.05568
  %50 = add i32 %49, -1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %4, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !13
  store i8 %53, ptr %.sroa.111, align 1, !tbaa !13
  %54 = sext i32 %49 to i64
  %55 = getelementptr inbounds i8, ptr %4, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !13
  store i8 %56, ptr %.sroa.122, align 1, !tbaa !13
  %57 = add i32 %49, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i8, ptr %4, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !13
  store i8 %60, ptr %.sroa.129, align 1, !tbaa !13
  %61 = icmp ugt i8 %27, %30
  br i1 %61, label %67, label %.critedge

._crit_edge.loopexit:                             ; preds = %.critedge.7
  %.pre = load i32, ptr %7, align 4, !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader59.._crit_edge_crit_edge, %._crit_edge.loopexit
  %indvars.iv.next.pre-phi = phi i64 [ %.pre91, %.preheader59.._crit_edge_crit_edge ], [ %18, %._crit_edge.loopexit ]
  %62 = phi i32 [ %12, %.preheader59.._crit_edge_crit_edge ], [ %.pre, %._crit_edge.loopexit ]
  %63 = phi i32 [ %13, %.preheader59.._crit_edge_crit_edge ], [ %148, %._crit_edge.loopexit ]
  %64 = add nsw i32 %62, -1
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next.pre-phi, %65
  br i1 %66, label %.preheader59, label %._crit_edge70, !llvm.loop !14

67:                                               ; preds = %.preheader58
  store i8 %27, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge

.critedge:                                        ; preds = %67, %.preheader58
  %.050.lcssa.sroa.phi = phi ptr [ %.sroa.0, %67 ], [ %.sroa.18, %.preheader58 ]
  store i8 %30, ptr %.050.lcssa.sroa.phi, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1.140 = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %68 = icmp ugt i8 %.sroa.18.0..sroa.18.1.140, %34
  br i1 %68, label %69, label %.critedge.1

69:                                               ; preds = %.critedge
  store i8 %.sroa.18.0..sroa.18.1.140, ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0.134 = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %70 = icmp ugt i8 %.sroa.0.0..sroa.0.0.134, %34
  br i1 %70, label %71, label %.critedge.1

71:                                               ; preds = %69
  store i8 %.sroa.0.0..sroa.0.0.134, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.1

.critedge.1:                                      ; preds = %71, %69, %.critedge
  %.050.lcssa.1.sroa.phi = phi ptr [ %.sroa.42, %.critedge ], [ %.sroa.18, %69 ], [ %.sroa.0, %71 ]
  store i8 %34, ptr %.050.lcssa.1.sroa.phi, align 1, !tbaa !13
  %.sroa.42.1..sroa.42.3.168 = load i8, ptr %.sroa.42.1.sroa_idx222, align 1, !tbaa !13
  %.sroa.42.0..sroa.42.2.146 = load i8, ptr %.sroa.42, align 4, !tbaa !13
  %72 = icmp ugt i8 %.sroa.42.0..sroa.42.2.146, %.sroa.42.1..sroa.42.3.168
  br i1 %72, label %73, label %.critedge.2

73:                                               ; preds = %.critedge.1
  store i8 %.sroa.42.0..sroa.42.2.146, ptr %.sroa.42.1.sroa_idx221, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1.139 = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %74 = icmp ugt i8 %.sroa.18.0..sroa.18.1.139, %.sroa.42.1..sroa.42.3.168
  br i1 %74, label %75, label %.critedge.2

75:                                               ; preds = %73
  store i8 %.sroa.18.0..sroa.18.1.139, ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0.133 = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %76 = icmp ugt i8 %.sroa.0.0..sroa.0.0.133, %.sroa.42.1..sroa.42.3.168
  br i1 %76, label %77, label %.critedge.2

77:                                               ; preds = %75
  store i8 %.sroa.0.0..sroa.0.0.133, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.2

.critedge.2:                                      ; preds = %77, %75, %73, %.critedge.1
  %.050.lcssa.2.sroa.phi = phi ptr [ %.sroa.42.1.sroa_idx, %.critedge.1 ], [ %.sroa.42, %73 ], [ %.sroa.18, %75 ], [ %.sroa.0, %77 ]
  store i8 %.sroa.42.1..sroa.42.3.168, ptr %.050.lcssa.2.sroa.phi, align 1, !tbaa !13
  %.sroa.42.1..sroa.42.3.165 = load i8, ptr %.sroa.42.1.sroa_idx220, align 1, !tbaa !13
  %78 = icmp ugt i8 %.sroa.42.1..sroa.42.3.165, %43
  br i1 %78, label %79, label %.critedge.3

79:                                               ; preds = %.critedge.2
  store i8 %.sroa.42.1..sroa.42.3.165, ptr %.sroa.42.2.sroa_idx236, align 2, !tbaa !13
  %.sroa.42.0..sroa.42.2.145 = load i8, ptr %.sroa.42, align 4, !tbaa !13
  %80 = icmp ugt i8 %.sroa.42.0..sroa.42.2.145, %43
  br i1 %80, label %81, label %.critedge.3

81:                                               ; preds = %79
  store i8 %.sroa.42.0..sroa.42.2.145, ptr %.sroa.42.1.sroa_idx219, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1.138 = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %82 = icmp ugt i8 %.sroa.18.0..sroa.18.1.138, %43
  br i1 %82, label %83, label %.critedge.3

83:                                               ; preds = %81
  store i8 %.sroa.18.0..sroa.18.1.138, ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0.132 = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %84 = icmp ugt i8 %.sroa.0.0..sroa.0.0.132, %43
  br i1 %84, label %85, label %.critedge.3

85:                                               ; preds = %83
  store i8 %.sroa.0.0..sroa.0.0.132, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.3

.critedge.3:                                      ; preds = %85, %83, %81, %79, %.critedge.2
  %.050.lcssa.3.sroa.phi = phi ptr [ %.sroa.42.2.sroa_idx, %.critedge.2 ], [ %.sroa.42.1.sroa_idx206, %79 ], [ %.sroa.42, %81 ], [ %.sroa.18, %83 ], [ %.sroa.0, %85 ]
  store i8 %43, ptr %.050.lcssa.3.sroa.phi, align 1, !tbaa !13
  %.sroa.42.3..sroa.42.5.200 = load i8, ptr %.sroa.42.3.sroa_idx249, align 1, !tbaa !13
  %.sroa.42.2..sroa.42.4.184 = load i8, ptr %.sroa.42.2.sroa_idx235, align 2, !tbaa !13
  %86 = icmp ugt i8 %.sroa.42.2..sroa.42.4.184, %.sroa.42.3..sroa.42.5.200
  br i1 %86, label %87, label %.critedge.4

87:                                               ; preds = %.critedge.3
  store i8 %.sroa.42.2..sroa.42.4.184, ptr %.sroa.42.3.sroa_idx248, align 1, !tbaa !13
  %.sroa.42.1..sroa.42.3.162 = load i8, ptr %.sroa.42.1.sroa_idx218, align 1, !tbaa !13
  %88 = icmp ugt i8 %.sroa.42.1..sroa.42.3.162, %.sroa.42.3..sroa.42.5.200
  br i1 %88, label %89, label %.critedge.4

89:                                               ; preds = %87
  store i8 %.sroa.42.1..sroa.42.3.162, ptr %.sroa.42.2.sroa_idx234, align 2, !tbaa !13
  %.sroa.42.0..sroa.42.2.144 = load i8, ptr %.sroa.42, align 4, !tbaa !13
  %90 = icmp ugt i8 %.sroa.42.0..sroa.42.2.144, %.sroa.42.3..sroa.42.5.200
  br i1 %90, label %91, label %.critedge.4

91:                                               ; preds = %89
  store i8 %.sroa.42.0..sroa.42.2.144, ptr %.sroa.42.1.sroa_idx217, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1.137 = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %92 = icmp ugt i8 %.sroa.18.0..sroa.18.1.137, %.sroa.42.3..sroa.42.5.200
  br i1 %92, label %93, label %.critedge.4

93:                                               ; preds = %91
  store i8 %.sroa.18.0..sroa.18.1.137, ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0.131 = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %94 = icmp ugt i8 %.sroa.0.0..sroa.0.0.131, %.sroa.42.3..sroa.42.5.200
  br i1 %94, label %95, label %.critedge.4

95:                                               ; preds = %93
  store i8 %.sroa.0.0..sroa.0.0.131, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.4

.critedge.4:                                      ; preds = %95, %93, %91, %89, %87, %.critedge.3
  %.050.lcssa.4.sroa.phi = phi ptr [ %.sroa.42.3.sroa_idx238, %.critedge.3 ], [ %.sroa.42.2.sroa_idx224, %87 ], [ %.sroa.42.1.sroa_idx207, %89 ], [ %.sroa.42, %91 ], [ %.sroa.18, %93 ], [ %.sroa.0, %95 ]
  store i8 %.sroa.42.3..sroa.42.5.200, ptr %.050.lcssa.4.sroa.phi, align 1, !tbaa !13
  %.sroa.111.0..sroa.111.6.204 = load i8, ptr %.sroa.111, align 1, !tbaa !13
  %.sroa.42.3..sroa.42.5.197 = load i8, ptr %.sroa.42.3.sroa_idx247, align 1, !tbaa !13
  %96 = icmp ugt i8 %.sroa.42.3..sroa.42.5.197, %.sroa.111.0..sroa.111.6.204
  br i1 %96, label %97, label %.critedge.5

97:                                               ; preds = %.critedge.4
  store i8 %.sroa.42.3..sroa.42.5.197, ptr %.sroa.111, align 1, !tbaa !13
  %.sroa.42.2..sroa.42.4.181 = load i8, ptr %.sroa.42.2.sroa_idx233, align 2, !tbaa !13
  %98 = icmp ugt i8 %.sroa.42.2..sroa.42.4.181, %.sroa.111.0..sroa.111.6.204
  br i1 %98, label %99, label %.critedge.5

99:                                               ; preds = %97
  store i8 %.sroa.42.2..sroa.42.4.181, ptr %.sroa.42.3.sroa_idx246, align 1, !tbaa !13
  %.sroa.42.1..sroa.42.3.159 = load i8, ptr %.sroa.42.1.sroa_idx216, align 1, !tbaa !13
  %100 = icmp ugt i8 %.sroa.42.1..sroa.42.3.159, %.sroa.111.0..sroa.111.6.204
  br i1 %100, label %101, label %.critedge.5

101:                                              ; preds = %99
  store i8 %.sroa.42.1..sroa.42.3.159, ptr %.sroa.42.2.sroa_idx232, align 2, !tbaa !13
  %.sroa.42.0..sroa.42.2.143 = load i8, ptr %.sroa.42, align 4, !tbaa !13
  %102 = icmp ugt i8 %.sroa.42.0..sroa.42.2.143, %.sroa.111.0..sroa.111.6.204
  br i1 %102, label %103, label %.critedge.5

103:                                              ; preds = %101
  store i8 %.sroa.42.0..sroa.42.2.143, ptr %.sroa.42.1.sroa_idx215, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1.136 = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %104 = icmp ugt i8 %.sroa.18.0..sroa.18.1.136, %.sroa.111.0..sroa.111.6.204
  br i1 %104, label %105, label %.critedge.5

105:                                              ; preds = %103
  store i8 %.sroa.18.0..sroa.18.1.136, ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0.130 = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %106 = icmp ugt i8 %.sroa.0.0..sroa.0.0.130, %.sroa.111.0..sroa.111.6.204
  br i1 %106, label %107, label %.critedge.5

107:                                              ; preds = %105
  store i8 %.sroa.0.0..sroa.0.0.130, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.5

.critedge.5:                                      ; preds = %107, %105, %103, %101, %99, %97, %.critedge.4
  %.050.lcssa.5.sroa.phi = phi ptr [ %.sroa.111, %.critedge.4 ], [ %.sroa.42.3.sroa_idx239, %97 ], [ %.sroa.42.2.sroa_idx225, %99 ], [ %.sroa.42.1.sroa_idx208, %101 ], [ %.sroa.42, %103 ], [ %.sroa.18, %105 ], [ %.sroa.0, %107 ]
  store i8 %.sroa.111.0..sroa.111.6.204, ptr %.050.lcssa.5.sroa.phi, align 1, !tbaa !13
  %.sroa.122.0..sroa.122.7.205 = load i8, ptr %.sroa.122, align 1, !tbaa !13
  %.sroa.111.0..sroa.111.6.203 = load i8, ptr %.sroa.111, align 1, !tbaa !13
  %108 = icmp ugt i8 %.sroa.111.0..sroa.111.6.203, %.sroa.122.0..sroa.122.7.205
  br i1 %108, label %109, label %.critedge.6

109:                                              ; preds = %.critedge.5
  store i8 %.sroa.111.0..sroa.111.6.203, ptr %.sroa.122, align 1, !tbaa !13
  %.sroa.42.3..sroa.42.5.194 = load i8, ptr %.sroa.42.3.sroa_idx245, align 1, !tbaa !13
  %110 = icmp ugt i8 %.sroa.42.3..sroa.42.5.194, %.sroa.122.0..sroa.122.7.205
  br i1 %110, label %111, label %.critedge.6

111:                                              ; preds = %109
  store i8 %.sroa.42.3..sroa.42.5.194, ptr %.sroa.111, align 1, !tbaa !13
  %.sroa.42.2..sroa.42.4.178 = load i8, ptr %.sroa.42.2.sroa_idx231, align 2, !tbaa !13
  %112 = icmp ugt i8 %.sroa.42.2..sroa.42.4.178, %.sroa.122.0..sroa.122.7.205
  br i1 %112, label %113, label %.critedge.6

113:                                              ; preds = %111
  store i8 %.sroa.42.2..sroa.42.4.178, ptr %.sroa.42.3.sroa_idx244, align 1, !tbaa !13
  %.sroa.42.1..sroa.42.3.156 = load i8, ptr %.sroa.42.1.sroa_idx214, align 1, !tbaa !13
  %114 = icmp ugt i8 %.sroa.42.1..sroa.42.3.156, %.sroa.122.0..sroa.122.7.205
  br i1 %114, label %115, label %.critedge.6

115:                                              ; preds = %113
  store i8 %.sroa.42.1..sroa.42.3.156, ptr %.sroa.42.2.sroa_idx230, align 2, !tbaa !13
  %.sroa.42.0..sroa.42.2.142 = load i8, ptr %.sroa.42, align 4, !tbaa !13
  %116 = icmp ugt i8 %.sroa.42.0..sroa.42.2.142, %.sroa.122.0..sroa.122.7.205
  br i1 %116, label %117, label %.critedge.6

117:                                              ; preds = %115
  store i8 %.sroa.42.0..sroa.42.2.142, ptr %.sroa.42.1.sroa_idx213, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1.135 = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %118 = icmp ugt i8 %.sroa.18.0..sroa.18.1.135, %.sroa.122.0..sroa.122.7.205
  br i1 %118, label %119, label %.critedge.6

119:                                              ; preds = %117
  store i8 %.sroa.18.0..sroa.18.1.135, ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0.129 = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %120 = icmp ugt i8 %.sroa.0.0..sroa.0.0.129, %.sroa.122.0..sroa.122.7.205
  br i1 %120, label %121, label %.critedge.6

121:                                              ; preds = %119
  store i8 %.sroa.0.0..sroa.0.0.129, ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.6

.critedge.6:                                      ; preds = %121, %119, %117, %115, %113, %111, %109, %.critedge.5
  %.050.lcssa.6.sroa.phi = phi ptr [ %.sroa.122, %.critedge.5 ], [ %.sroa.111, %109 ], [ %.sroa.42.3.sroa_idx240, %111 ], [ %.sroa.42.2.sroa_idx226, %113 ], [ %.sroa.42.1.sroa_idx209, %115 ], [ %.sroa.42, %117 ], [ %.sroa.18, %119 ], [ %.sroa.0, %121 ]
  store i8 %.sroa.122.0..sroa.122.7.205, ptr %.050.lcssa.6.sroa.phi, align 1, !tbaa !13
  %.sroa.122.0..sroa.122.7. = load i8, ptr %.sroa.122, align 1, !tbaa !13
  %122 = icmp ugt i8 %.sroa.122.0..sroa.122.7., %60
  br i1 %122, label %123, label %.critedge.7

123:                                              ; preds = %.critedge.6
  store i8 %.sroa.122.0..sroa.122.7., ptr %.sroa.129, align 1, !tbaa !13
  %.sroa.111.0..sroa.111.6.202 = load i8, ptr %.sroa.111, align 1, !tbaa !13
  %124 = icmp ugt i8 %.sroa.111.0..sroa.111.6.202, %60
  br i1 %124, label %125, label %.critedge.7

125:                                              ; preds = %123
  store i8 %.sroa.111.0..sroa.111.6.202, ptr %.sroa.122, align 1, !tbaa !13
  %.sroa.42.3..sroa.42.5. = load i8, ptr %.sroa.42.3.sroa_idx243, align 1, !tbaa !13
  %126 = icmp ugt i8 %.sroa.42.3..sroa.42.5., %60
  br i1 %126, label %127, label %.critedge.7

127:                                              ; preds = %125
  store i8 %.sroa.42.3..sroa.42.5., ptr %.sroa.111, align 1, !tbaa !13
  %.sroa.42.2..sroa.42.4. = load i8, ptr %.sroa.42.2.sroa_idx229, align 2, !tbaa !13
  %128 = icmp ugt i8 %.sroa.42.2..sroa.42.4., %60
  br i1 %128, label %129, label %.critedge.7

129:                                              ; preds = %127
  store i8 %.sroa.42.2..sroa.42.4., ptr %.sroa.42.3.sroa_idx242, align 1, !tbaa !13
  %.sroa.42.1..sroa.42.3. = load i8, ptr %.sroa.42.1.sroa_idx212, align 1, !tbaa !13
  %130 = icmp ugt i8 %.sroa.42.1..sroa.42.3., %60
  br i1 %130, label %131, label %.critedge.7

131:                                              ; preds = %129
  store i8 %.sroa.42.1..sroa.42.3., ptr %.sroa.42.2.sroa_idx228, align 2, !tbaa !13
  %.sroa.42.0..sroa.42.2.141 = load i8, ptr %.sroa.42, align 4, !tbaa !13
  %132 = icmp ugt i8 %.sroa.42.0..sroa.42.2.141, %60
  br i1 %132, label %133, label %.critedge.7

133:                                              ; preds = %131
  store i8 %.sroa.42.0..sroa.42.2.141, ptr %.sroa.42.1.sroa_idx211, align 1, !tbaa !13
  %.sroa.18.0..sroa.18.1. = load i8, ptr %.sroa.18, align 1, !tbaa !13
  %134 = icmp ugt i8 %.sroa.18.0..sroa.18.1., %60
  br i1 %134, label %135, label %.critedge.7

135:                                              ; preds = %133
  store i8 %.sroa.18.0..sroa.18.1., ptr %.sroa.42, align 4, !tbaa !13
  %.sroa.0.0..sroa.0.0. = load i8, ptr %.sroa.0, align 1, !tbaa !13
  %136 = icmp ugt i8 %.sroa.0.0..sroa.0.0., %60
  br i1 %136, label %137, label %.critedge.7

137:                                              ; preds = %135
  store i8 %.sroa.0.0..sroa.0.0., ptr %.sroa.18, align 1, !tbaa !13
  br label %.critedge.7

.critedge.7:                                      ; preds = %137, %135, %133, %131, %129, %127, %125, %123, %.critedge.6
  %.050.lcssa.7.sroa.phi = phi ptr [ %.sroa.129, %.critedge.6 ], [ %.sroa.122, %123 ], [ %.sroa.111, %125 ], [ %.sroa.42.3.sroa_idx241, %127 ], [ %.sroa.42.2.sroa_idx227, %129 ], [ %.sroa.42.1.sroa_idx210, %131 ], [ %.sroa.42, %133 ], [ %.sroa.18, %135 ], [ %.sroa.0, %137 ]
  store i8 %60, ptr %.050.lcssa.7.sroa.phi, align 1, !tbaa !13
  %.sroa.42.0..sroa.42.2. = load <4 x i8>, ptr %.sroa.42, align 4, !tbaa !13
  %138 = zext <4 x i8> %.sroa.42.0..sroa.42.2. to <4 x i16>
  %.sroa.111.0..sroa.111.6. = load i8, ptr %.sroa.111, align 1, !tbaa !13
  %139 = zext i8 %.sroa.111.0..sroa.111.6. to i16
  %140 = tail call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> %138)
  %op.rdx = add i16 %140, %139
  %141 = udiv i16 %op.rdx, 5
  %142 = trunc i16 %141 to i8
  %143 = mul nsw i32 %21, %20
  %144 = add nsw i32 %143, %.05568
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %6, i64 %145
  store i8 %142, ptr %146, align 1, !tbaa !13
  %147 = add nuw nsw i32 %.05568, 1
  %148 = load i32, ptr %0, align 8, !tbaa !12
  %149 = add nsw i32 %148, -1
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %.preheader58, label %._crit_edge.loopexit, !llvm.loop !17
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v4i16(<4 x i16>) #2

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

!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 16}
!6 = !{!"_ZTS5Image", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !8, i64 24, !7, i64 1524}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 0}
!13 = !{!8, !8, i64 0}
!14 = distinct !{!14, !15, !16}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !15}


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