; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmrle (io)

; 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"

%"class.rle::pixel_info" = type { i8, i8 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [121 x i8], align 1
@__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE = external hidden unnamed_addr constant [69 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(12) %3) #0 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.rle::pixel_info", align 1
  %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 [12 x ptr], align 16
  %18 = alloca i32, align 4
  %19 = alloca [12 x i8], align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i8, align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call i16 @_ZNK3rle10image_info14get_pixel_infoEv(ptr noundef nonnull align 4 dereferenceable(12) %33)
  store i16 %34, ptr %10, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %35 = call noundef i32 @_ZNK3rle10pixel_info24get_number_of_componentsEv(ptr noundef nonnull align 1 dereferenceable(2) %10)
  store i32 %35, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %36 = call noundef i32 @_ZNK3rle10pixel_info28get_number_of_bits_per_pixelEv(ptr noundef nonnull align 1 dereferenceable(2) %10)
  store i32 %36, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %37 = call noundef i32 @_ZNK3rle10pixel_info20compute_num_segmentsEv(ptr noundef nonnull align 1 dereferenceable(2) %10)
  store i32 %37, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = sdiv i32 %38, 8
  store i32 %39, ptr %14, align 4, !tbaa !9
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %42, label %56

42:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = load ptr, ptr %32, align 8, !tbaa !11
  %46 = getelementptr inbounds ptr, ptr %45, i64 0
  %47 = load ptr, ptr %46, align 8
  %48 = call noundef i32 %47(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %43, i32 noundef %44)
  store i32 %48, ptr %15, align 4, !tbaa !9
  %49 = load i32, ptr %15, align 4, !tbaa !9
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = icmp eq i32 %49, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %42
  br label %55

53:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 38, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %286

56:                                               ; preds = %4
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = srem i32 %57, %58
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  br label %64

62:                                               ; preds = %56
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 42, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = call noundef zeroext i1 @_ZNK3rle10image_info24get_planar_configurationEv(ptr noundef nonnull align 4 dereferenceable(12) %65)
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %157

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = sdiv i32 %70, %71
  store i32 %72, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 96, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %88, %69
  %74 = load i32, ptr %18, align 4, !tbaa !9
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %91

78:                                               ; preds = %73
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i32, ptr %18, align 4, !tbaa !9
  %81 = load i32, ptr %16, align 4, !tbaa !9
  %82 = mul nsw i32 %80, %81
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %79, i64 %83
  %85 = load i32, ptr %18, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [12 x ptr], ptr %17, i64 0, i64 %86
  store ptr %84, ptr %87, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %78
  %89 = load i32, ptr %18, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %18, align 4, !tbaa !9
  br label %73, !llvm.loop !13

91:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %153, %91
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = load i32, ptr %16, align 4, !tbaa !9
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %156

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %98 = getelementptr inbounds [12 x i8], ptr %19, i64 0, i64 0
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = load ptr, ptr %32, align 8, !tbaa !11
  %101 = getelementptr inbounds ptr, ptr %100, i64 0
  %102 = load ptr, ptr %101, align 8
  %103 = call noundef i32 %102(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %98, i32 noundef %99)
  store i32 %103, ptr %22, align 4, !tbaa !9
  %104 = load i32, ptr %22, align 4, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = icmp eq i32 %104, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %97
  br label %110

108:                                              ; preds = %97
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 58, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

109:                                              ; No predecessors!
  br label %110

110:                                              ; preds = %109, %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %149, %110
  %112 = load i32, ptr %23, align 4, !tbaa !9
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %152

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %145, %116
  %118 = load i32, ptr %24, align 4, !tbaa !9
  %119 = load i32, ptr %14, align 4, !tbaa !9
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %148

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %123 = load i32, ptr %24, align 4, !tbaa !9
  %124 = load i32, ptr %23, align 4, !tbaa !9
  %125 = load i32, ptr %14, align 4, !tbaa !9
  %126 = mul nsw i32 %124, %125
  %127 = add nsw i32 %123, %126
  store i32 %127, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = sub nsw i32 %128, 1
  %130 = load i32, ptr %24, align 4, !tbaa !9
  %131 = sub nsw i32 %129, %130
  %132 = load i32, ptr %23, align 4, !tbaa !9
  %133 = load i32, ptr %14, align 4, !tbaa !9
  %134 = mul nsw i32 %132, %133
  %135 = add nsw i32 %131, %134
  store i32 %135, ptr %26, align 4, !tbaa !9
  %136 = load i32, ptr %26, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [12 x i8], ptr %19, i64 0, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !15
  %140 = load i32, ptr %25, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [12 x ptr], ptr %17, i64 0, i64 %141
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = getelementptr inbounds i8, ptr %143, i32 1
  store ptr %144, ptr %142, align 8, !tbaa !5
  store i8 %139, ptr %143, align 1, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %145

145:                                              ; preds = %122
  %146 = load i32, ptr %24, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %24, align 4, !tbaa !9
  br label %117, !llvm.loop !16

148:                                              ; preds = %121
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %23, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %23, align 4, !tbaa !9
  br label %111, !llvm.loop !17

152:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %20, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %20, align 4, !tbaa !9
  br label %92, !llvm.loop !18

156:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %285

157:                                              ; preds = %64
  %158 = load i32, ptr %13, align 4, !tbaa !9
  %159 = icmp eq i32 %158, 3
  br i1 %159, label %160, label %283

160:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %161 = load i32, ptr %8, align 4, !tbaa !9
  %162 = load i32, ptr %13, align 4, !tbaa !9
  %163 = sdiv i32 %161, %162
  store i32 %163, ptr %27, align 4, !tbaa !9
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = call noundef i32 @_ZNK3rle10image_info9get_widthEv(ptr noundef nonnull align 4 dereferenceable(12) %164)
  %166 = load i32, ptr %27, align 4, !tbaa !9
  %167 = icmp eq i32 %165, %166
  br i1 %167, label %168, label %169

168:                                              ; preds = %160
  br label %171

169:                                              ; preds = %160
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 75, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

170:                                              ; No predecessors!
  br label %171

171:                                              ; preds = %170, %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = call noundef i32 @_ZNK3rle10image_info9get_widthEv(ptr noundef nonnull align 4 dereferenceable(12) %172)
  %174 = sext i32 %173 to i64
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = call noundef i32 @_ZNK3rle10image_info10get_heightEv(ptr noundef nonnull align 4 dereferenceable(12) %175)
  %177 = sext i32 %176 to i64
  %178 = mul i64 %174, %177
  %179 = mul i64 %178, 1
  store i64 %179, ptr %28, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %180 = load ptr, ptr %32, align 8, !tbaa !11
  %181 = getelementptr inbounds ptr, ptr %180, i64 1
  %182 = load ptr, ptr %181, align 8
  %183 = call noundef i32 %182(ptr noundef nonnull align 8 dereferenceable(8) %32)
  store i32 %183, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load i32, ptr %27, align 4, !tbaa !9
  %186 = mul nsw i32 0, %185
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i8, ptr %184, i64 %187
  %189 = load i32, ptr %27, align 4, !tbaa !9
  %190 = load ptr, ptr %32, align 8, !tbaa !11
  %191 = getelementptr inbounds ptr, ptr %190, i64 0
  %192 = load ptr, ptr %191, align 8
  %193 = call noundef i32 %192(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %188, i32 noundef %189)
  store i32 %193, ptr %30, align 4, !tbaa !9
  %194 = load i32, ptr %30, align 4, !tbaa !9
  %195 = load i32, ptr %27, align 4, !tbaa !9
  %196 = icmp eq i32 %194, %195
  br i1 %196, label %197, label %198

197:                                              ; preds = %171
  br label %200

198:                                              ; preds = %171
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 79, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

199:                                              ; No predecessors!
  br label %200

200:                                              ; preds = %199, %197
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #5
  %201 = load i32, ptr %29, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = load i64, ptr %28, align 8, !tbaa !19
  %204 = mul i64 1, %203
  %205 = add i64 %202, %204
  %206 = trunc i64 %205 to i32
  %207 = load ptr, ptr %32, align 8, !tbaa !11
  %208 = getelementptr inbounds ptr, ptr %207, i64 2
  %209 = load ptr, ptr %208, align 8
  %210 = call noundef zeroext i1 %209(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %206)
  %211 = zext i1 %210 to i8
  store i8 %211, ptr %31, align 1, !tbaa !21
  %212 = load i8, ptr %31, align 1, !tbaa !21, !range !23, !noundef !24
  %213 = trunc i8 %212 to i1
  br i1 %213, label %214, label %215

214:                                              ; preds = %200
  br label %217

215:                                              ; preds = %200
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 82, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

216:                                              ; No predecessors!
  br label %217

217:                                              ; preds = %216, %214
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = load i32, ptr %27, align 4, !tbaa !9
  %220 = mul nsw i32 1, %219
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i8, ptr %218, i64 %221
  %223 = load i32, ptr %27, align 4, !tbaa !9
  %224 = load ptr, ptr %32, align 8, !tbaa !11
  %225 = getelementptr inbounds ptr, ptr %224, i64 0
  %226 = load ptr, ptr %225, align 8
  %227 = call noundef i32 %226(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %222, i32 noundef %223)
  store i32 %227, ptr %30, align 4, !tbaa !9
  %228 = load i32, ptr %30, align 4, !tbaa !9
  %229 = load i32, ptr %27, align 4, !tbaa !9
  %230 = icmp eq i32 %228, %229
  br i1 %230, label %231, label %232

231:                                              ; preds = %217
  br label %234

232:                                              ; preds = %217
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 84, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

233:                                              ; No predecessors!
  br label %234

234:                                              ; preds = %233, %231
  %235 = load i32, ptr %29, align 4, !tbaa !9
  %236 = zext i32 %235 to i64
  %237 = load i64, ptr %28, align 8, !tbaa !19
  %238 = mul i64 2, %237
  %239 = add i64 %236, %238
  %240 = trunc i64 %239 to i32
  %241 = load ptr, ptr %32, align 8, !tbaa !11
  %242 = getelementptr inbounds ptr, ptr %241, i64 2
  %243 = load ptr, ptr %242, align 8
  %244 = call noundef zeroext i1 %243(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %240)
  %245 = zext i1 %244 to i8
  store i8 %245, ptr %31, align 1, !tbaa !21
  %246 = load i8, ptr %31, align 1, !tbaa !21, !range !23, !noundef !24
  %247 = trunc i8 %246 to i1
  br i1 %247, label %248, label %249

248:                                              ; preds = %234
  br label %251

249:                                              ; preds = %234
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

250:                                              ; No predecessors!
  br label %251

251:                                              ; preds = %250, %248
  %252 = load ptr, ptr %7, align 8, !tbaa !5
  %253 = load i32, ptr %27, align 4, !tbaa !9
  %254 = mul nsw i32 2, %253
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds i8, ptr %252, i64 %255
  %257 = load i32, ptr %27, align 4, !tbaa !9
  %258 = load ptr, ptr %32, align 8, !tbaa !11
  %259 = getelementptr inbounds ptr, ptr %258, i64 0
  %260 = load ptr, ptr %259, align 8
  %261 = call noundef i32 %260(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %256, i32 noundef %257)
  store i32 %261, ptr %30, align 4, !tbaa !9
  %262 = load i32, ptr %30, align 4, !tbaa !9
  %263 = load i32, ptr %27, align 4, !tbaa !9
  %264 = icmp eq i32 %262, %263
  br i1 %264, label %265, label %266

265:                                              ; preds = %251
  br label %268

266:                                              ; preds = %251
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 88, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

267:                                              ; No predecessors!
  br label %268

268:                                              ; preds = %267, %265
  %269 = load i32, ptr %29, align 4, !tbaa !9
  %270 = load i32, ptr %27, align 4, !tbaa !9
  %271 = add i32 %269, %270
  %272 = load ptr, ptr %32, align 8, !tbaa !11
  %273 = getelementptr inbounds ptr, ptr %272, i64 2
  %274 = load ptr, ptr %273, align 8
  %275 = call noundef zeroext i1 %274(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %271)
  %276 = zext i1 %275 to i8
  store i8 %276, ptr %31, align 1, !tbaa !21
  %277 = load i8, ptr %31, align 1, !tbaa !21, !range !23, !noundef !24
  %278 = trunc i8 %277 to i1
  br i1 %278, label %279, label %280

279:                                              ; preds = %268
  br label %282

280:                                              ; preds = %268
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 90, ptr noundef @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

281:                                              ; No predecessors!
  br label %282

282:                                              ; preds = %281, %279
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %284

283:                                              ; preds = %157
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %288

284:                                              ; preds = %282
  br label %285

285:                                              ; preds = %284, %156
  br label %286

286:                                              ; preds = %285, %55
  %287 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %287, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %288

288:                                              ; preds = %286, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #5
  %289 = load i32, ptr %5, align 4
  ret i32 %289
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i16 @_ZNK3rle10image_info14get_pixel_infoEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

declare noundef i32 @_ZNK3rle10pixel_info24get_number_of_componentsEv(ptr noundef nonnull align 1 dereferenceable(2)) #3

declare noundef i32 @_ZNK3rle10pixel_info28get_number_of_bits_per_pixelEv(ptr noundef nonnull align 1 dereferenceable(2)) #3

declare noundef i32 @_ZNK3rle10pixel_info20compute_num_segmentsEv(ptr noundef nonnull align 1 dereferenceable(2)) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3rle10image_info24get_planar_configurationEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3rle10image_info9get_widthEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3rle10image_info10get_heightEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}


; 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"

%"class.rle::pixel_info" = type { i8, i8 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [121 x i8], align 1
@__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE = external hidden unnamed_addr constant [69 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(12) %3) local_unnamed_addr #0 align 2 {
  %5 = alloca %"class.rle::pixel_info", align 2
  %6 = alloca [12 x ptr], align 16
  %7 = alloca [12 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %5) #5
  %8 = tail call i16 @_ZNK3rle10image_info14get_pixel_infoEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  store i16 %8, ptr %5, align 2
  %9 = call noundef i32 @_ZNK3rle10pixel_info24get_number_of_componentsEv(ptr noundef nonnull align 1 dereferenceable(2) %5)
  %10 = call noundef i32 @_ZNK3rle10pixel_info28get_number_of_bits_per_pixelEv(ptr noundef nonnull align 1 dereferenceable(2) %5)
  %11 = call noundef i32 @_ZNK3rle10pixel_info20compute_num_segmentsEv(ptr noundef nonnull align 1 dereferenceable(2) %5)
  %12 = sdiv i32 %10, 8
  %13 = icmp eq i32 %11, 1
  br i1 %13, label %14, label %20

14:                                               ; preds = %4
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = load ptr, ptr %15, align 8
  %17 = call noundef i32 %16(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, i32 noundef %2)
  %18 = icmp eq i32 %17, %2
  br i1 %18, label %159, label %19

19:                                               ; preds = %14
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 38, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

20:                                               ; preds = %4
  %21 = srem i32 %2, %11
  %22 = sdiv i32 %2, %11
  %23 = icmp eq i32 %21, 0
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 42, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

25:                                               ; preds = %20
  %26 = call noundef zeroext i1 @_ZNK3rle10image_info24get_planar_configurationEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  br i1 %26, label %100, label %27

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #5
  %28 = icmp sgt i32 %11, 0
  br i1 %28, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %27
  %29 = sext i32 %22 to i64
  %wide.trip.count = zext nneg i32 %11 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %30 = icmp ult i32 %11, 4
  br i1 %30, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %31 = mul nsw i64 %indvars.iv.epil, %29
  %32 = getelementptr inbounds i8, ptr %1, i64 %31
  %33 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %indvars.iv.epil
  store ptr %32, ptr %33, align 8, !tbaa !8
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !11

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %27
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  %34 = icmp sgt i32 %22, 0
  br i1 %34, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %._crit_edge
  %35 = icmp sgt i32 %9, 0
  br i1 %35, label %.lr.ph89.split.us, label %.lr.ph89.split

.lr.ph89.split.us:                                ; preds = %.lr.ph89
  %36 = icmp sgt i32 %10, 7
  br i1 %36, label %.lr.ph89.split.us.split.us.preheader, label %.lr.ph89.split.us.split

.lr.ph89.split.us.split.us.preheader:             ; preds = %.lr.ph89.split.us
  %37 = zext nneg i32 %12 to i64
  %wide.trip.count110 = zext nneg i32 %9 to i64
  %wide.trip.count105 = zext nneg i32 %12 to i64
  %xtraiter125 = and i64 %wide.trip.count105, 1
  %38 = and i32 %10, 2147483640
  %39 = icmp eq i32 %38, 8
  %unroll_iter128 = and i64 %wide.trip.count105, 268435454
  %lcmp.mod127.not = icmp eq i64 %xtraiter125, 0
  br label %.lr.ph89.split.us.split.us

.lr.ph89.split.us.split.us:                       ; preds = %.lr.ph89.split.us.split.us.preheader, %._crit_edge86.split.us.us.us
  %.07487.us.us = phi i32 [ %77, %._crit_edge86.split.us.us.us ], [ 0, %.lr.ph89.split.us.split.us.preheader ]
  %40 = load ptr, ptr %0, align 8, !tbaa !5
  %41 = load ptr, ptr %40, align 8
  %42 = call noundef i32 %41(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %7, i32 noundef %11)
  %43 = icmp eq i32 %42, %11
  br i1 %43, label %.preheader.us.us.us, label %.split.us

.preheader.us.us.us:                              ; preds = %.lr.ph89.split.us.split.us, %._crit_edge84.us.us.us
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %._crit_edge84.us.us.us ], [ 0, %.lr.ph89.split.us.split.us ]
  %44 = mul nuw nsw i64 %indvars.iv107, %37
  %45 = trunc nsw i64 %44 to i32
  %46 = add nuw i32 %12, %45
  br i1 %39, label %._crit_edge84.us.us.us.unr-lcssa, label %.preheader.us.us.us.new

.preheader.us.us.us.new:                          ; preds = %.preheader.us.us.us, %.preheader.us.us.us.new
  %indvars.iv102 = phi i64 [ %indvars.iv.next103.1, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %niter129 = phi i64 [ %niter129.next.1, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %47 = add nuw nsw i64 %indvars.iv102, %44
  %48 = trunc i64 %indvars.iv102 to i32
  %49 = xor i32 %48, -1
  %50 = add i32 %46, %49
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [12 x i8], ptr %7, i64 0, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %47
  %55 = load ptr, ptr %54, align 8, !tbaa !8
  %56 = getelementptr inbounds i8, ptr %55, i64 1
  store ptr %56, ptr %54, align 8, !tbaa !8
  store i8 %53, ptr %55, align 1, !tbaa !13
  %indvars.iv.next103 = or disjoint i64 %indvars.iv102, 1
  %57 = add nuw nsw i64 %indvars.iv.next103, %44
  %58 = trunc i64 %indvars.iv.next103 to i32
  %59 = xor i32 %58, -1
  %60 = add i32 %46, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [12 x i8], ptr %7, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !13
  %64 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %57
  %65 = load ptr, ptr %64, align 8, !tbaa !8
  %66 = getelementptr inbounds i8, ptr %65, i64 1
  store ptr %66, ptr %64, align 8, !tbaa !8
  store i8 %63, ptr %65, align 1, !tbaa !13
  %indvars.iv.next103.1 = add nuw nsw i64 %indvars.iv102, 2
  %niter129.next.1 = add i64 %niter129, 2
  %niter129.ncmp.1 = icmp eq i64 %niter129.next.1, %unroll_iter128
  br i1 %niter129.ncmp.1, label %._crit_edge84.us.us.us.unr-lcssa, label %.preheader.us.us.us.new, !llvm.loop !14

._crit_edge84.us.us.us.unr-lcssa:                 ; preds = %.preheader.us.us.us.new, %.preheader.us.us.us
  %indvars.iv102.unr = phi i64 [ 0, %.preheader.us.us.us ], [ %indvars.iv.next103.1, %.preheader.us.us.us.new ]
  br i1 %lcmp.mod127.not, label %._crit_edge84.us.us.us, label %._crit_edge84.us.us.us.epilog-lcssa

._crit_edge84.us.us.us.epilog-lcssa:              ; preds = %._crit_edge84.us.us.us.unr-lcssa
  %67 = add nuw nsw i64 %indvars.iv102.unr, %44
  %68 = trunc i64 %indvars.iv102.unr to i32
  %69 = xor i32 %68, -1
  %70 = add i32 %46, %69
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [12 x i8], ptr %7, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %67
  %75 = load ptr, ptr %74, align 8, !tbaa !8
  %76 = getelementptr inbounds i8, ptr %75, i64 1
  store ptr %76, ptr %74, align 8, !tbaa !8
  store i8 %73, ptr %75, align 1, !tbaa !13
  br label %._crit_edge84.us.us.us

._crit_edge84.us.us.us:                           ; preds = %._crit_edge84.us.us.us.unr-lcssa, %._crit_edge84.us.us.us.epilog-lcssa
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110
  br i1 %exitcond111.not, label %._crit_edge86.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !16

._crit_edge86.split.us.us.us:                     ; preds = %._crit_edge84.us.us.us
  %77 = add nuw nsw i32 %.07487.us.us, 1
  %exitcond112.not = icmp eq i32 %77, %22
  br i1 %exitcond112.not, label %._crit_edge90, label %.lr.ph89.split.us.split.us, !llvm.loop !17

.lr.ph89.split.us.split:                          ; preds = %.lr.ph89.split.us, %.preheader.us91.preheader
  %.07487.us = phi i32 [ %82, %.preheader.us91.preheader ], [ 0, %.lr.ph89.split.us ]
  %78 = load ptr, ptr %0, align 8, !tbaa !5
  %79 = load ptr, ptr %78, align 8
  %80 = call noundef i32 %79(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %7, i32 noundef %11)
  %81 = icmp eq i32 %80, %11
  br i1 %81, label %.preheader.us91.preheader, label %.split.us

.preheader.us91.preheader:                        ; preds = %.lr.ph89.split.us.split
  %82 = add nuw nsw i32 %.07487.us, 1
  %exitcond101.not = icmp eq i32 %82, %22
  br i1 %exitcond101.not, label %._crit_edge90, label %.lr.ph89.split.us.split, !llvm.loop !17

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %83 = mul nsw i64 %indvars.iv, %29
  %84 = getelementptr inbounds i8, ptr %1, i64 %83
  %85 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %indvars.iv
  store ptr %84, ptr %85, align 16, !tbaa !8
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %86 = mul nsw i64 %indvars.iv.next, %29
  %87 = getelementptr inbounds i8, ptr %1, i64 %86
  %88 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %indvars.iv.next
  store ptr %87, ptr %88, align 8, !tbaa !8
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %89 = mul nsw i64 %indvars.iv.next.1, %29
  %90 = getelementptr inbounds i8, ptr %1, i64 %89
  %91 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %indvars.iv.next.1
  store ptr %90, ptr %91, align 16, !tbaa !8
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %92 = mul nsw i64 %indvars.iv.next.2, %29
  %93 = getelementptr inbounds i8, ptr %1, i64 %92
  %94 = getelementptr inbounds [12 x ptr], ptr %6, i64 0, i64 %indvars.iv.next.2
  store ptr %93, ptr %94, align 8, !tbaa !8
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !18

._crit_edge90:                                    ; preds = %.preheader80, %.preheader.us91.preheader, %._crit_edge86.split.us.us.us, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #5
  br label %159

.lr.ph89.split:                                   ; preds = %.lr.ph89, %.preheader80
  %.07487 = phi i32 [ %99, %.preheader80 ], [ 0, %.lr.ph89 ]
  %95 = load ptr, ptr %0, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8
  %97 = call noundef i32 %96(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %7, i32 noundef %11)
  %98 = icmp eq i32 %97, %11
  br i1 %98, label %.preheader80, label %.split.us

.preheader80:                                     ; preds = %.lr.ph89.split
  %99 = add nuw nsw i32 %.07487, 1
  %exitcond100.not = icmp eq i32 %99, %22
  br i1 %exitcond100.not, label %._crit_edge90, label %.lr.ph89.split, !llvm.loop !17

.split.us:                                        ; preds = %.lr.ph89.split, %.lr.ph89.split.us.split, %.lr.ph89.split.us.split.us
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 58, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

100:                                              ; preds = %25
  %101 = icmp eq i32 %11, 3
  br i1 %101, label %102, label %159

102:                                              ; preds = %100
  %103 = sdiv i32 %2, 3
  %104 = call noundef i32 @_ZNK3rle10image_info9get_widthEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  %105 = icmp eq i32 %104, %103
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 75, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

107:                                              ; preds = %102
  %108 = call noundef i32 @_ZNK3rle10image_info9get_widthEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  %109 = call noundef i32 @_ZNK3rle10image_info10get_heightEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  %110 = load ptr, ptr %0, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load ptr, ptr %111, align 8
  %113 = call noundef i32 %112(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %114 = load ptr, ptr %0, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8
  %116 = call noundef i32 %115(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, i32 noundef %103)
  %117 = icmp eq i32 %116, %103
  br i1 %117, label %119, label %118

118:                                              ; preds = %107
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 79, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

119:                                              ; preds = %107
  %120 = mul i32 %109, %108
  %121 = add i32 %113, %120
  %122 = load ptr, ptr %0, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i64 16
  %124 = load ptr, ptr %123, align 8
  %125 = call noundef zeroext i1 %124(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %121)
  br i1 %125, label %127, label %126

126:                                              ; preds = %119
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 82, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

127:                                              ; preds = %119
  %128 = sext i32 %103 to i64
  %129 = getelementptr inbounds i8, ptr %1, i64 %128
  %130 = load ptr, ptr %0, align 8, !tbaa !5
  %131 = load ptr, ptr %130, align 8
  %132 = call noundef i32 %131(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %129, i32 noundef %103)
  %133 = icmp eq i32 %132, %103
  br i1 %133, label %135, label %134

134:                                              ; preds = %127
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 84, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

135:                                              ; preds = %127
  %136 = shl i32 %120, 1
  %137 = add i32 %113, %136
  %138 = load ptr, ptr %0, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 16
  %140 = load ptr, ptr %139, align 8
  %141 = call noundef zeroext i1 %140(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %137)
  br i1 %141, label %143, label %142

142:                                              ; preds = %135
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

143:                                              ; preds = %135
  %144 = shl nsw i32 %103, 1
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %1, i64 %145
  %147 = load ptr, ptr %0, align 8, !tbaa !5
  %148 = load ptr, ptr %147, align 8
  %149 = call noundef i32 %148(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %146, i32 noundef %103)
  %150 = icmp eq i32 %149, %103
  br i1 %150, label %152, label %151

151:                                              ; preds = %143
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 88, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

152:                                              ; preds = %143
  %153 = add i32 %113, %103
  %154 = load ptr, ptr %0, align 8, !tbaa !5
  %155 = getelementptr inbounds i8, ptr %154, i64 16
  %156 = load ptr, ptr %155, align 8
  %157 = call noundef zeroext i1 %156(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %153)
  br i1 %157, label %159, label %158

158:                                              ; preds = %152
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 90, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3rle6source18read_into_segmentsEPciRKNS_10image_infoE) #6
  unreachable

159:                                              ; preds = %._crit_edge90, %14, %152, %100
  %.0 = phi i32 [ -1, %100 ], [ %2, %152 ], [ %2, %14 ], [ %2, %._crit_edge90 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #5
  ret i32 %.0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i16 @_ZNK3rle10image_info14get_pixel_infoEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

declare noundef i32 @_ZNK3rle10pixel_info24get_number_of_componentsEv(ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #3

declare noundef i32 @_ZNK3rle10pixel_info28get_number_of_bits_per_pixelEv(ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #3

declare noundef i32 @_ZNK3rle10pixel_info20compute_num_segmentsEv(ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3rle10image_info24get_planar_configurationEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3rle10image_info9get_widthEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3rle10image_info10get_heightEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


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