; LLVM IR from Wilson-ZheLin/Introduction-to-Digital-Image-Processing :: 4. Edge Detection and Grayscale Transformation/src/main.ll (Z5GammaP5Imagef)

; 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.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [43 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
define dso_local noundef ptr @_Z5GammaP5Imagef(ptr noundef %0, float noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca ptr, align 8
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store float 0.000000e+00, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.Image, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.Image, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %24 = mul nsw i32 %20, %23
  %25 = sitofp i32 %24 to float
  store float %25, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call noundef ptr @_Z14CreateNewImageP5ImagePc(ptr noundef %26, ptr noundef @.str.10)
  store ptr %27, ptr %12, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.Image, ptr %28, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  store ptr %30, ptr %5, align 8, !tbaa !5
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.Image, ptr %31, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  store ptr %33, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !16
  br label %34

34:                                               ; preds = %94, %2
  %35 = load i32, ptr %13, align 4, !tbaa !16
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.Image, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !14
  %39 = icmp slt i32 %35, %38
  br i1 %39, label %41, label %40

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

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !16
  br label %42

42:                                               ; preds = %90, %41
  %43 = load i32, ptr %15, align 4, !tbaa !16
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Image, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !11
  %47 = icmp slt i32 %43, %46
  br i1 %47, label %49, label %48

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

49:                                               ; preds = %42
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Image, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !11
  %54 = load i32, ptr %13, align 4, !tbaa !16
  %55 = mul nsw i32 %53, %54
  %56 = load i32, ptr %15, align 4, !tbaa !16
  %57 = add nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i8, ptr %50, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !17
  %61 = uitofp i8 %60 to float
  %62 = fpext float %61 to double
  %63 = fadd double %62, 5.000000e-01
  %64 = fdiv double %63, 2.560000e+02
  %65 = fptrunc double %64 to float
  store float %65, ptr %7, align 4, !tbaa !9
  %66 = load float, ptr %7, align 4, !tbaa !9
  %67 = load float, ptr %4, align 4, !tbaa !9
  %68 = call noundef float @_ZSt3powff(float noundef %66, float noundef %67)
  store float %68, ptr %7, align 4, !tbaa !9
  %69 = load float, ptr %7, align 4, !tbaa !9
  %70 = fmul float %69, 2.560000e+02
  %71 = fpext float %70 to double
  %72 = fsub double %71, 5.000000e-01
  %73 = fptosi double %72 to i32
  %74 = sitofp i32 %73 to float
  store float %74, ptr %7, align 4, !tbaa !9
  %75 = load float, ptr %7, align 4, !tbaa !9
  %76 = fptoui float %75 to i8
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.Image, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !11
  %81 = load i32, ptr %13, align 4, !tbaa !16
  %82 = mul nsw i32 %80, %81
  %83 = load i32, ptr %15, align 4, !tbaa !16
  %84 = add nsw i32 %82, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i8, ptr %77, i64 %85
  store i8 %76, ptr %86, align 1, !tbaa !17
  %87 = load float, ptr %7, align 4, !tbaa !9
  %88 = load float, ptr %10, align 4, !tbaa !9
  %89 = fadd float %88, %87
  store float %89, ptr %10, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %49
  %91 = load i32, ptr %15, align 4, !tbaa !16
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %15, align 4, !tbaa !16
  br label %42, !llvm.loop !18

93:                                               ; preds = %48
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %13, align 4, !tbaa !16
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %13, align 4, !tbaa !16
  br label %34, !llvm.loop !20

97:                                               ; preds = %40
  %98 = load float, ptr %10, align 4, !tbaa !9
  %99 = load float, ptr %11, align 4, !tbaa !9
  %100 = fdiv float %98, %99
  store float %100, ptr %9, align 4, !tbaa !9
  store float 0.000000e+00, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %101

101:                                              ; preds = %141, %97
  %102 = load i32, ptr %16, align 4, !tbaa !16
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.Image, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !14
  %106 = icmp slt i32 %102, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %101
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %144

108:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !16
  br label %109

109:                                              ; preds = %137, %108
  %110 = load i32, ptr %17, align 4, !tbaa !16
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Image, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 8, !tbaa !11
  %114 = icmp slt i32 %110, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %109
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %140

116:                                              ; preds = %109
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.Image, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 8, !tbaa !11
  %121 = load i32, ptr %16, align 4, !tbaa !16
  %122 = mul nsw i32 %120, %121
  %123 = load i32, ptr %17, align 4, !tbaa !16
  %124 = add nsw i32 %122, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i8, ptr %117, i64 %125
  %127 = load i8, ptr %126, align 1, !tbaa !17
  %128 = zext i8 %127 to i32
  %129 = sitofp i32 %128 to float
  %130 = load float, ptr %9, align 4, !tbaa !9
  %131 = fsub float %129, %130
  %132 = call noundef double @_ZSt3powIfiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %131, i32 noundef 2)
  %133 = load float, ptr %10, align 4, !tbaa !9
  %134 = fpext float %133 to double
  %135 = fadd double %134, %132
  %136 = fptrunc double %135 to float
  store float %136, ptr %10, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %116
  %138 = load i32, ptr %17, align 4, !tbaa !16
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %17, align 4, !tbaa !16
  br label %109, !llvm.loop !21

140:                                              ; preds = %115
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %16, align 4, !tbaa !16
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %16, align 4, !tbaa !16
  br label %101, !llvm.loop !22

144:                                              ; preds = %107
  %145 = load float, ptr %10, align 4, !tbaa !9
  %146 = load float, ptr %11, align 4, !tbaa !9
  %147 = fdiv float %145, %146
  store float %147, ptr %8, align 4, !tbaa !9
  %148 = load float, ptr %4, align 4, !tbaa !9
  %149 = fpext float %148 to double
  %150 = load float, ptr %8, align 4, !tbaa !9
  %151 = fpext float %150 to double
  %152 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %149, double noundef %151)
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret ptr %153
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3powff(float noundef, float noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIfiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, i32 noundef) #2

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

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 = { inlinehint 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 #3 = { "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 = { 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS5Image", !13, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !7, i64 24, !13, i64 1524}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !6, i64 16}
!16 = !{!13, !13, i64 0}
!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}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z5GammaP5Imagef(ptr noundef %0, float noundef %1) local_unnamed_addr #0 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !11
  %6 = mul nsw i32 %5, %3
  %7 = sitofp i32 %6 to float
  %8 = tail call noundef ptr @_Z14CreateNewImageP5ImagePc(ptr noundef nonnull %0, ptr noundef nonnull @.str.10)
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %8, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = load i32, ptr %4, align 4, !tbaa !11
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.preheader48.lr.ph, label %._crit_edge62

.preheader48.lr.ph:                               ; preds = %2
  %15 = load i32, ptr %0, align 8, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.preheader48, label %._crit_edge62

.preheader48:                                     ; preds = %.preheader48.lr.ph, %._crit_edge
  %17 = phi i32 [ %23, %._crit_edge ], [ %13, %.preheader48.lr.ph ]
  %18 = phi i32 [ %24, %._crit_edge ], [ %15, %.preheader48.lr.ph ]
  %.04552 = phi i32 [ %25, %._crit_edge ], [ 0, %.preheader48.lr.ph ]
  %.04651 = phi float [ %.1.lcssa, %._crit_edge ], [ 0.000000e+00, %.preheader48.lr.ph ]
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge

._crit_edge53:                                    ; preds = %._crit_edge
  %20 = fdiv float %.1.lcssa, %7
  %21 = icmp sgt i32 %23, 0
  br i1 %21, label %.preheader.lr.ph, label %._crit_edge62

.preheader.lr.ph:                                 ; preds = %._crit_edge53
  %.pr = load i32, ptr %0, align 8, !tbaa !5
  %22 = icmp sgt i32 %.pr, 0
  br i1 %22, label %.preheader, label %._crit_edge62

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader48
  %23 = phi i32 [ %17, %.preheader48 ], [ %.pre, %._crit_edge.loopexit ]
  %24 = phi i32 [ %18, %.preheader48 ], [ %51, %._crit_edge.loopexit ]
  %.1.lcssa = phi float [ %.04651, %.preheader48 ], [ %49, %._crit_edge.loopexit ]
  %25 = add nuw nsw i32 %.04552, 1
  %26 = icmp slt i32 %25, %23
  br i1 %26, label %.preheader48, label %._crit_edge53, !llvm.loop !13

.lr.ph:                                           ; preds = %.preheader48, %.lr.ph
  %27 = phi i32 [ %51, %.lr.ph ], [ %18, %.preheader48 ]
  %.04450 = phi i32 [ %50, %.lr.ph ], [ 0, %.preheader48 ]
  %.149 = phi float [ %49, %.lr.ph ], [ %.04651, %.preheader48 ]
  %28 = mul nsw i32 %27, %.04552
  %29 = add nsw i32 %28, %.04450
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %10, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !16
  %33 = uitofp i8 %32 to double
  %34 = fadd double %33, 5.000000e-01
  %35 = fmul double %34, 3.906250e-03
  %36 = fptrunc double %35 to float
  %37 = tail call noundef float @_ZSt3powff(float noundef %36, float noundef %1)
  %38 = fmul float %37, 2.560000e+02
  %39 = fpext float %38 to double
  %40 = fadd double %39, -5.000000e-01
  %41 = fptosi double %40 to i32
  %42 = sitofp i32 %41 to float
  %43 = trunc i32 %41 to i8
  %44 = load i32, ptr %8, align 8, !tbaa !5
  %45 = mul nsw i32 %44, %.04552
  %46 = add nsw i32 %45, %.04450
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %12, i64 %47
  store i8 %43, ptr %48, align 1, !tbaa !16
  %49 = fadd float %.149, %42
  %50 = add nuw nsw i32 %.04450, 1
  %51 = load i32, ptr %0, align 8, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !17

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge58
  %53 = phi i32 [ %60, %._crit_edge58 ], [ %23, %.preheader.lr.ph ]
  %54 = phi i32 [ %61, %._crit_edge58 ], [ %.pr, %.preheader.lr.ph ]
  %.04361 = phi i32 [ %62, %._crit_edge58 ], [ 0, %.preheader.lr.ph ]
  %.260 = phi float [ %.3.lcssa, %._crit_edge58 ], [ 0.000000e+00, %.preheader.lr.ph ]
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph57, label %._crit_edge58

._crit_edge62:                                    ; preds = %._crit_edge58, %.preheader48.lr.ph, %2, %.preheader.lr.ph, %._crit_edge53
  %.2.lcssa = phi float [ 0.000000e+00, %._crit_edge53 ], [ 0.000000e+00, %.preheader.lr.ph ], [ 0.000000e+00, %2 ], [ 0.000000e+00, %.preheader48.lr.ph ], [ %.3.lcssa, %._crit_edge58 ]
  %56 = fdiv float %.2.lcssa, %7
  %57 = fpext float %1 to double
  %58 = fpext float %56 to double
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %57, double noundef %58)
  ret ptr %8

._crit_edge58.loopexit:                           ; preds = %.lr.ph57
  %.pre68 = load i32, ptr %4, align 4, !tbaa !11
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge58.loopexit, %.preheader
  %60 = phi i32 [ %53, %.preheader ], [ %.pre68, %._crit_edge58.loopexit ]
  %61 = phi i32 [ %54, %.preheader ], [ %77, %._crit_edge58.loopexit ]
  %.3.lcssa = phi float [ %.260, %.preheader ], [ %75, %._crit_edge58.loopexit ]
  %62 = add nuw nsw i32 %.04361, 1
  %63 = icmp slt i32 %62, %60
  br i1 %63, label %.preheader, label %._crit_edge62, !llvm.loop !18

.lr.ph57:                                         ; preds = %.preheader, %.lr.ph57
  %.056 = phi i32 [ %76, %.lr.ph57 ], [ 0, %.preheader ]
  %.355 = phi float [ %75, %.lr.ph57 ], [ %.260, %.preheader ]
  %64 = load i32, ptr %8, align 8, !tbaa !5
  %65 = mul nsw i32 %64, %.04361
  %66 = add nsw i32 %65, %.056
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %12, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !16
  %70 = uitofp i8 %69 to float
  %71 = fsub float %70, %20
  %72 = tail call noundef double @_ZSt3powIfiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef %71, i32 noundef 2)
  %73 = fpext float %.355 to double
  %74 = fadd double %72, %73
  %75 = fptrunc double %74 to float
  %76 = add nuw nsw i32 %.056, 1
  %77 = load i32, ptr %0, align 8, !tbaa !5
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %.lr.ph57, label %._crit_edge58.loopexit, !llvm.loop !19
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3powff(float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIfiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(float noundef, i32 noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { inlinehint 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 #2 = { 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" }

!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 = !{!"_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, !10, i64 16}
!13 = distinct !{!13, !14, !15}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14, !15}
!19 = distinct !{!19, !14}


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