; LLVM IR from aap/librw :: src/image.ll (ZN2rw5Image8makeMaskEv)

; 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.rw::Image" = type { i32, i32, i32, i32, i32, i32, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw5Image8makeMaskEv = external hidden unnamed_addr constant [27 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 void @_ZN2rw5Image11convertTo32Ev(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw5Image8makeMaskEv(ptr noundef nonnull align 8 dereferenceable(40) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %12 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 3
  %13 = load i32, ptr %12, align 4, !tbaa !9
  switch i32 %13, label %173 [
    i32 4, label %14
    i32 8, label %14
    i32 16, label %97
    i32 24, label %97
    i32 32, label %98
  ]

14:                                               ; preds = %1, %1
  %15 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %14
  br label %21

19:                                               ; preds = %14
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 749, ptr noundef @__PRETTY_FUNCTION__._ZN2rw5Image8makeMaskEv) #4
  unreachable

20:                                               ; No predecessors!
  br label %21

21:                                               ; preds = %20, %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %22 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 3
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = shl i32 1, %23
  store i32 %24, ptr %4, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !13
  br label %25

25:                                               ; preds = %93, %21
  %26 = load i32, ptr %5, align 4, !tbaa !13
  %27 = load i32, ptr %4, align 4, !tbaa !13
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %96

30:                                               ; preds = %25
  %31 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = load i32, ptr %5, align 4, !tbaa !13
  %34 = mul nsw i32 %33, 4
  %35 = add nsw i32 %34, 0
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %32, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !14
  %39 = zext i8 %38 to i32
  store i32 %39, ptr %3, align 4, !tbaa !13
  %40 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !12
  %42 = load i32, ptr %5, align 4, !tbaa !13
  %43 = mul nsw i32 %42, 4
  %44 = add nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %41, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !14
  %48 = zext i8 %47 to i32
  %49 = load i32, ptr %3, align 4, !tbaa !13
  %50 = icmp sgt i32 %48, %49
  br i1 %50, label %51, label %61

51:                                               ; preds = %30
  %52 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %53 = load ptr, ptr %52, align 8, !tbaa !12
  %54 = load i32, ptr %5, align 4, !tbaa !13
  %55 = mul nsw i32 %54, 4
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %53, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !14
  %60 = zext i8 %59 to i32
  store i32 %60, ptr %3, align 4, !tbaa !13
  br label %61

61:                                               ; preds = %51, %30
  %62 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %63 = load ptr, ptr %62, align 8, !tbaa !12
  %64 = load i32, ptr %5, align 4, !tbaa !13
  %65 = mul nsw i32 %64, 4
  %66 = add nsw i32 %65, 2
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %63, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !14
  %70 = zext i8 %69 to i32
  %71 = load i32, ptr %3, align 4, !tbaa !13
  %72 = icmp sgt i32 %70, %71
  br i1 %72, label %73, label %83

73:                                               ; preds = %61
  %74 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %75 = load ptr, ptr %74, align 8, !tbaa !12
  %76 = load i32, ptr %5, align 4, !tbaa !13
  %77 = mul nsw i32 %76, 4
  %78 = add nsw i32 %77, 2
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %75, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !14
  %82 = zext i8 %81 to i32
  store i32 %82, ptr %3, align 4, !tbaa !13
  br label %83

83:                                               ; preds = %73, %61
  %84 = load i32, ptr %3, align 4, !tbaa !13
  %85 = trunc i32 %84 to i8
  %86 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 7
  %87 = load ptr, ptr %86, align 8, !tbaa !12
  %88 = load i32, ptr %5, align 4, !tbaa !13
  %89 = mul nsw i32 %88, 4
  %90 = add nsw i32 %89, 3
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i8, ptr %87, i64 %91
  store i8 %85, ptr %92, align 1, !tbaa !14
  br label %93

93:                                               ; preds = %83
  %94 = load i32, ptr %5, align 4, !tbaa !13
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %5, align 4, !tbaa !13
  br label %25, !llvm.loop !15

96:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %173

97:                                               ; preds = %1, %1
  call void @_ZN2rw5Image11convertTo32Ev(ptr noundef nonnull align 8 dereferenceable(40) %11)
  br label %98

98:                                               ; preds = %97, %1
  %99 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 6
  %100 = load ptr, ptr %99, align 8, !tbaa !17
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %103

102:                                              ; preds = %98
  br label %105

103:                                              ; preds = %98
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 766, ptr noundef @__PRETTY_FUNCTION__._ZN2rw5Image8makeMaskEv) #4
  unreachable

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104, %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %106 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 6
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  store ptr %107, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %108

108:                                              ; preds = %169, %105
  %109 = load i32, ptr %8, align 4, !tbaa !13
  %110 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 2
  %111 = load i32, ptr %110, align 8, !tbaa !18
  %112 = icmp slt i32 %109, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  store i32 6, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %172

114:                                              ; preds = %108
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %115, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %116

116:                                              ; preds = %160, %114
  %117 = load i32, ptr %10, align 4, !tbaa !13
  %118 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !19
  %120 = icmp slt i32 %117, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %116
  store i32 9, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %163

122:                                              ; preds = %116
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds i8, ptr %123, i64 0
  %125 = load i8, ptr %124, align 1, !tbaa !14
  %126 = zext i8 %125 to i32
  store i32 %126, ptr %3, align 4, !tbaa !13
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i64 1
  %129 = load i8, ptr %128, align 1, !tbaa !14
  %130 = zext i8 %129 to i32
  %131 = load i32, ptr %3, align 4, !tbaa !13
  %132 = icmp sgt i32 %130, %131
  br i1 %132, label %133, label %138

133:                                              ; preds = %122
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 1
  %136 = load i8, ptr %135, align 1, !tbaa !14
  %137 = zext i8 %136 to i32
  store i32 %137, ptr %3, align 4, !tbaa !13
  br label %138

138:                                              ; preds = %133, %122
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 2
  %141 = load i8, ptr %140, align 1, !tbaa !14
  %142 = zext i8 %141 to i32
  %143 = load i32, ptr %3, align 4, !tbaa !13
  %144 = icmp sgt i32 %142, %143
  br i1 %144, label %145, label %150

145:                                              ; preds = %138
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = getelementptr inbounds i8, ptr %146, i64 2
  %148 = load i8, ptr %147, align 1, !tbaa !14
  %149 = zext i8 %148 to i32
  store i32 %149, ptr %3, align 4, !tbaa !13
  br label %150

150:                                              ; preds = %145, %138
  %151 = load i32, ptr %3, align 4, !tbaa !13
  %152 = trunc i32 %151 to i8
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds i8, ptr %153, i64 3
  store i8 %152, ptr %154, align 1, !tbaa !14
  %155 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 4
  %156 = load i32, ptr %155, align 8, !tbaa !20
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = sext i32 %156 to i64
  %159 = getelementptr inbounds i8, ptr %157, i64 %158
  store ptr %159, ptr %7, align 8, !tbaa !5
  br label %160

160:                                              ; preds = %150
  %161 = load i32, ptr %10, align 4, !tbaa !13
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %10, align 4, !tbaa !13
  br label %116, !llvm.loop !21

163:                                              ; preds = %121
  %164 = getelementptr inbounds %"struct.rw::Image", ptr %11, i32 0, i32 5
  %165 = load i32, ptr %164, align 4, !tbaa !22
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = sext i32 %165 to i64
  %168 = getelementptr inbounds i8, ptr %166, i64 %167
  store ptr %168, ptr %6, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %163
  %170 = load i32, ptr %8, align 4, !tbaa !13
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %8, align 4, !tbaa !13
  br label %108, !llvm.loop !23

172:                                              ; preds = %113
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %173

173:                                              ; preds = %172, %96, %1
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  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 = { 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 #3 = { nounwind }
attributes #4 = { noreturn 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, !11, i64 12}
!10 = !{!"_ZTSN2rw5ImageE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 32}
!13 = !{!11, !11, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!10, !6, i64 24}
!18 = !{!10, !11, i64 8}
!19 = !{!10, !11, i64 4}
!20 = !{!10, !11, i64 16}
!21 = distinct !{!21, !16}
!22 = !{!10, !11, i64 20}
!23 = distinct !{!23, !16}


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

@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN2rw5Image8makeMaskEv = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2rw5Image11convertTo32Ev(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2rw5Image8makeMaskEv(ptr noundef nonnull align 8 dereferenceable(40) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 12
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = add i32 %3, -4
  %5 = tail call i32 @llvm.fshl.i32(i32 %4, i32 %4, i32 30)
  switch i32 %5, label %.loopexit [
    i32 0, label %6
    i32 1, label %6
    i32 3, label %24
    i32 5, label %24
    i32 7, label %25
  ]

6:                                                ; preds = %1, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %.not40 = icmp eq ptr %8, null
  br i1 %.not40, label %9, label %10

9:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 749, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw5Image8makeMaskEv) #3
  unreachable

10:                                               ; preds = %6
  %.not51 = icmp eq i32 %3, 31
  br i1 %.not51, label %.loopexit, label %.lr.ph50.preheader

.lr.ph50.preheader:                               ; preds = %10
  %11 = shl nuw nsw i32 1, %3
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.lr.ph50

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %.lr.ph50
  %indvars.iv = phi i64 [ 0, %.lr.ph50.preheader ], [ %indvars.iv.next, %.lr.ph50 ]
  %12 = load ptr, ptr %7, align 8, !tbaa !11
  %13 = shl nsw i64 %indvars.iv, 2
  %14 = getelementptr inbounds i8, ptr %12, i64 %13
  %15 = load i8, ptr %14, align 1, !tbaa !12
  %16 = or disjoint i64 %13, 1
  %17 = getelementptr inbounds i8, ptr %12, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !12
  %spec.select = tail call i8 @llvm.umax.i8(i8 %18, i8 %15)
  %19 = or disjoint i64 %13, 2
  %20 = getelementptr inbounds i8, ptr %12, i64 %19
  %21 = load i8, ptr %20, align 1, !tbaa !12
  %.1.in = tail call i8 @llvm.umax.i8(i8 %21, i8 %spec.select)
  %22 = or disjoint i64 %13, 3
  %23 = getelementptr inbounds i8, ptr %12, i64 %22
  store i8 %.1.in, ptr %23, align 1, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph50, !llvm.loop !13

24:                                               ; preds = %1, %1
  tail call void @_ZN2rw5Image11convertTo32Ev(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br label %25

25:                                               ; preds = %24, %1
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %.not = icmp eq ptr %27, null
  br i1 %.not, label %36, label %.preheader42

.preheader42:                                     ; preds = %25
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !16
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader42
  %31 = getelementptr inbounds i8, ptr %0, i64 4
  %32 = getelementptr inbounds i8, ptr %0, i64 16
  %33 = getelementptr inbounds i8, ptr %0, i64 20
  %34 = load i32, ptr %31, align 4, !tbaa !17
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.preheader, label %.loopexit

36:                                               ; preds = %25
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 766, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN2rw5Image8makeMaskEv) #3
  unreachable

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %37 = phi i32 [ %40, %._crit_edge ], [ %29, %.preheader.lr.ph ]
  %38 = phi i32 [ %41, %._crit_edge ], [ %34, %.preheader.lr.ph ]
  %.02847 = phi i32 [ %45, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.03046 = phi ptr [ %44, %._crit_edge ], [ %27, %.preheader.lr.ph ]
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph, label %._crit_edge

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %40 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %37, %.preheader ]
  %41 = phi i32 [ %57, %._crit_edge.loopexit ], [ %38, %.preheader ]
  %42 = load i32, ptr %33, align 4, !tbaa !18
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %.03046, i64 %43
  %45 = add nuw nsw i32 %.02847, 1
  %46 = icmp slt i32 %45, %40
  br i1 %46, label %.preheader, label %.loopexit, !llvm.loop !19

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.045 = phi i32 [ %56, %.lr.ph ], [ 0, %.preheader ]
  %.02944 = phi ptr [ %55, %.lr.ph ], [ %.03046, %.preheader ]
  %47 = load i8, ptr %.02944, align 1, !tbaa !12
  %48 = getelementptr inbounds i8, ptr %.02944, i64 1
  %49 = load i8, ptr %48, align 1, !tbaa !12
  %spec.select41 = tail call i8 @llvm.umax.i8(i8 %49, i8 %47)
  %50 = getelementptr inbounds i8, ptr %.02944, i64 2
  %51 = load i8, ptr %50, align 1, !tbaa !12
  %.3.in = tail call i8 @llvm.umax.i8(i8 %51, i8 %spec.select41)
  %52 = getelementptr inbounds i8, ptr %.02944, i64 3
  store i8 %.3.in, ptr %52, align 1, !tbaa !12
  %53 = load i32, ptr %32, align 8, !tbaa !21
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %.02944, i64 %54
  %56 = add nuw nsw i32 %.045, 1
  %57 = load i32, ptr %31, align 4, !tbaa !17
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge, %.lr.ph50, %.preheader.lr.ph, %.preheader42, %10, %1
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.fshl.i32(i32, i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.umax.i8(i8, i8) #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 = { 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 speculatable willreturn memory(none) }
attributes #3 = { noreturn 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 12}
!6 = !{!"_ZTSN2rw5ImageE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 32}
!12 = !{!8, !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!6, !10, i64 24}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !7, i64 4}
!18 = !{!6, !7, i64 20}
!19 = distinct !{!19, !14, !20}
!20 = !{!"llvm.loop.unswitch.partial.disable"}
!21 = !{!6, !7, i64 16}
!22 = distinct !{!22, !14}


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