; LLVM IR from giacomo-ascari/dichotomic-compression :: src/dc/dc-decompressor/dc-decompressor.ll (ZN15dc_decompressor12_deserializeEv)

; 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._dc_light_sector = type { %class.dc_pixel, i8, i8 }
%class.dc_pixel = type { i8, i8, i8 }
%class.dc = type { i8, i64, i64, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, %class.dc_pixel_matrix, %"class.std::map", %"class.std::vector" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.dc_pixel_matrix = type { ptr, i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, _dc_heavy_sector>, std::_Select1st<std::pair<const unsigned long, _dc_heavy_sector>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, _dc_heavy_sector>, std::_Select1st<std::pair<const unsigned long, _dc_heavy_sector>>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<_dc_light_sector, std::allocator<_dc_light_sector>>::_Vector_impl" }
%"struct.std::_Vector_base<_dc_light_sector, std::allocator<_dc_light_sector>>::_Vector_impl" = type { %"struct.std::_Vector_base<_dc_light_sector, std::allocator<_dc_light_sector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<_dc_light_sector, std::allocator<_dc_light_sector>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [19 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15dc_decompressor12_deserializeEv(ptr noundef nonnull align 8 dereferenceable(200) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca [8 x i8], align 1
  %5 = alloca [1024 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct._dc_light_sector, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #11
  %15 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 4
  %16 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #11
  %17 = call i32 (ptr, i32, ...) @open(ptr noundef %16, i32 noundef 2, i32 noundef 256)
  store i32 %17, ptr %3, align 4, !tbaa !9
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %23, label %20

20:                                               ; preds = %1
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.20) #11
  call void @exit(i32 noundef 1) #12
  unreachable

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #11
  call void @llvm.lifetime.start.p0(i64 1024, ptr %5) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #11
  store i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #11
  %24 = load i32, ptr %3, align 4, !tbaa !9
  %25 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 0
  %26 = call i64 @read(i32 noundef %24, ptr noundef %25, i64 noundef 2)
  %27 = icmp eq i64 %26, 2
  br i1 %27, label %28, label %37

28:                                               ; preds = %23
  %29 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 0
  %30 = load i8, ptr %29, align 1, !tbaa !13
  %31 = zext i8 %30 to i64
  %32 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 2
  store i64 %31, ptr %32, align 8, !tbaa !14
  %33 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 1
  %34 = load i8, ptr %33, align 1, !tbaa !13
  %35 = zext i8 %34 to i64
  %36 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 3
  store i64 %35, ptr %36, align 8, !tbaa !32
  br label %40

37:                                               ; preds = %23
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.21) #11
  call void @exit(i32 noundef 1) #12
  unreachable

40:                                               ; preds = %28
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 0
  %43 = call i64 @read(i32 noundef %41, ptr noundef %42, i64 noundef 8)
  %44 = icmp eq i64 %43, 8
  br i1 %44, label %45, label %82

45:                                               ; preds = %40
  %46 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 0
  %47 = load i8, ptr %46, align 1, !tbaa !13
  %48 = zext i8 %47 to i32
  %49 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 1
  %50 = load i8, ptr %49, align 1, !tbaa !13
  %51 = zext i8 %50 to i32
  %52 = shl i32 %51, 8
  %53 = add nsw i32 %48, %52
  %54 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 2
  %55 = load i8, ptr %54, align 1, !tbaa !13
  %56 = zext i8 %55 to i32
  %57 = shl i32 %56, 16
  %58 = add nsw i32 %53, %57
  %59 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 3
  %60 = load i8, ptr %59, align 1, !tbaa !13
  %61 = zext i8 %60 to i32
  %62 = shl i32 %61, 24
  %63 = add nsw i32 %58, %62
  store i32 %63, ptr %9, align 4, !tbaa !9
  %64 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 4
  %65 = load i8, ptr %64, align 1, !tbaa !13
  %66 = zext i8 %65 to i32
  %67 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 5
  %68 = load i8, ptr %67, align 1, !tbaa !13
  %69 = zext i8 %68 to i32
  %70 = shl i32 %69, 8
  %71 = add nsw i32 %66, %70
  %72 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 6
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = zext i8 %73 to i32
  %75 = shl i32 %74, 16
  %76 = add nsw i32 %71, %75
  %77 = getelementptr inbounds [8 x i8], ptr %4, i64 0, i64 7
  %78 = load i8, ptr %77, align 1, !tbaa !13
  %79 = zext i8 %78 to i32
  %80 = shl i32 %79, 24
  %81 = add nsw i32 %76, %80
  store i32 %81, ptr %10, align 4, !tbaa !9
  br label %85

82:                                               ; preds = %40
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.22) #11
  call void @exit(i32 noundef 1) #12
  unreachable

85:                                               ; preds = %45
  %86 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 2
  %87 = load i64, ptr %86, align 8, !tbaa !14
  %88 = icmp ult i64 %87, 1
  br i1 %88, label %93, label %89

89:                                               ; preds = %85
  %90 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 2
  %91 = load i64, ptr %90, align 8, !tbaa !14
  %92 = icmp ugt i64 %91, 2
  br i1 %92, label %93, label %96

93:                                               ; preds = %89, %85
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.23) #11
  call void @exit(i32 noundef 1) #12
  unreachable

96:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 5, ptr %11) #11
  call void @_ZN16_dc_light_sectorC2Ev(ptr noundef nonnull align 1 dereferenceable(5) %11)
  br label %97

97:                                               ; preds = %191, %96
  %98 = load i32, ptr %3, align 4, !tbaa !9
  %99 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %100 = invoke i64 @read(i32 noundef %98, ptr noundef %99, i64 noundef 1024)
          to label %101 unwind label %106

101:                                              ; preds = %97
  store i64 %100, ptr %7, align 8, !tbaa !11
  %102 = icmp ne i64 %100, 0
  br i1 %102, label %103, label %192

103:                                              ; preds = %101
  %104 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 2
  %105 = load i64, ptr %104, align 8, !tbaa !14
  switch i64 %105, label %190 [
    i64 1, label %110
    i64 2, label %157
  ]

106:                                              ; preds = %231, %210, %207, %203, %199, %195, %192, %169, %145, %139, %133, %122, %97
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %12, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %13, align 4
  br label %243

110:                                              ; preds = %103
  %111 = load i64, ptr %7, align 8, !tbaa !11
  %112 = urem i64 %111, 4
  %113 = icmp eq i64 %112, 0
  br i1 %113, label %114, label %153

114:                                              ; preds = %110
  %115 = load i64, ptr %7, align 8, !tbaa !11
  %116 = load i64, ptr %8, align 8, !tbaa !11
  %117 = add i64 %116, %115
  store i64 %117, ptr %8, align 8, !tbaa !11
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %118

118:                                              ; preds = %148, %114
  %119 = load i64, ptr %6, align 8, !tbaa !11
  %120 = load i64, ptr %7, align 8, !tbaa !11
  %121 = icmp ult i64 %119, %120
  br i1 %121, label %122, label %152

122:                                              ; preds = %118
  %123 = load i64, ptr %6, align 8, !tbaa !11
  %124 = add i64 %123, 1
  store i64 %124, ptr %6, align 8, !tbaa !11
  %125 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 %123
  %126 = load i8, ptr %125, align 1, !tbaa !13
  %127 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 2
  store i8 %126, ptr %127, align 1, !tbaa !33
  %128 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 0
  %129 = load i64, ptr %6, align 8, !tbaa !11
  %130 = add i64 %129, 1
  store i64 %130, ptr %6, align 8, !tbaa !11
  %131 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 %129
  %132 = load i8, ptr %131, align 1, !tbaa !13
  invoke void @_ZN8dc_pixel5set_rEh(ptr noundef nonnull align 1 dereferenceable(3) %128, i8 noundef zeroext %132)
          to label %133 unwind label %106

133:                                              ; preds = %122
  %134 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 0
  %135 = load i64, ptr %6, align 8, !tbaa !11
  %136 = add i64 %135, 1
  store i64 %136, ptr %6, align 8, !tbaa !11
  %137 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 %135
  %138 = load i8, ptr %137, align 1, !tbaa !13
  invoke void @_ZN8dc_pixel5set_gEh(ptr noundef nonnull align 1 dereferenceable(3) %134, i8 noundef zeroext %138)
          to label %139 unwind label %106

139:                                              ; preds = %133
  %140 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 0
  %141 = load i64, ptr %6, align 8, !tbaa !11
  %142 = add i64 %141, 1
  store i64 %142, ptr %6, align 8, !tbaa !11
  %143 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 %141
  %144 = load i8, ptr %143, align 1, !tbaa !13
  invoke void @_ZN8dc_pixel5set_bEh(ptr noundef nonnull align 1 dereferenceable(3) %140, i8 noundef zeroext %144)
          to label %145 unwind label %106

145:                                              ; preds = %139
  %146 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 1
  store i8 0, ptr %146, align 1, !tbaa !36
  %147 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 9
  invoke void @_ZNSt6vectorI16_dc_light_sectorSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %147, ptr noundef nonnull align 1 dereferenceable(5) %11)
          to label %148 unwind label %106

148:                                              ; preds = %145
  %149 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 6
  %150 = load i64, ptr %149, align 8, !tbaa !37
  %151 = add i64 %150, 1
  store i64 %151, ptr %149, align 8, !tbaa !37
  br label %118, !llvm.loop !38

152:                                              ; preds = %118
  br label %156

153:                                              ; preds = %110
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.24) #11
  call void @exit(i32 noundef 1) #12
  unreachable

156:                                              ; preds = %152
  br label %191

157:                                              ; preds = %103
  %158 = load i64, ptr %7, align 8, !tbaa !11
  %159 = urem i64 %158, 1
  %160 = icmp eq i64 %159, 0
  br i1 %160, label %161, label %186

161:                                              ; preds = %157
  %162 = load i64, ptr %7, align 8, !tbaa !11
  %163 = load i64, ptr %8, align 8, !tbaa !11
  %164 = add i64 %163, %162
  store i64 %164, ptr %8, align 8, !tbaa !11
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %165

165:                                              ; preds = %181, %161
  %166 = load i64, ptr %6, align 8, !tbaa !11
  %167 = load i64, ptr %7, align 8, !tbaa !11
  %168 = icmp ult i64 %166, %167
  br i1 %168, label %169, label %185

169:                                              ; preds = %165
  %170 = load i64, ptr %6, align 8, !tbaa !11
  %171 = add i64 %170, 1
  store i64 %171, ptr %6, align 8, !tbaa !11
  %172 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 %170
  %173 = load i8, ptr %172, align 1, !tbaa !13
  %174 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 2
  store i8 %173, ptr %174, align 1, !tbaa !33
  %175 = load i64, ptr %6, align 8, !tbaa !11
  %176 = add i64 %175, 1
  store i64 %176, ptr %6, align 8, !tbaa !11
  %177 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 %175
  %178 = load i8, ptr %177, align 1, !tbaa !13
  %179 = getelementptr inbounds %struct._dc_light_sector, ptr %11, i32 0, i32 1
  store i8 %178, ptr %179, align 1, !tbaa !36
  %180 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 9
  invoke void @_ZNSt6vectorI16_dc_light_sectorSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %180, ptr noundef nonnull align 1 dereferenceable(5) %11)
          to label %181 unwind label %106

181:                                              ; preds = %169
  %182 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 6
  %183 = load i64, ptr %182, align 8, !tbaa !37
  %184 = add i64 %183, 1
  store i64 %184, ptr %182, align 8, !tbaa !37
  br label %165, !llvm.loop !40

185:                                              ; preds = %165
  br label %189

186:                                              ; preds = %157
  %187 = load ptr, ptr @stderr, align 8, !tbaa !5
  %188 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef @.str.24) #11
  call void @exit(i32 noundef 1) #12
  unreachable

189:                                              ; preds = %185
  br label %191

190:                                              ; preds = %103
  br label %191

191:                                              ; preds = %190, %189, %156
  br label %97, !llvm.loop !41

192:                                              ; preds = %101
  %193 = load i32, ptr %3, align 4, !tbaa !9
  %194 = invoke i32 @close(i32 noundef %193)
          to label %195 unwind label %106

195:                                              ; preds = %192
  %196 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 7
  %197 = load i32, ptr %9, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  invoke void @_ZN15dc_pixel_matrix9set_widthEm(ptr noundef nonnull align 8 dereferenceable(24) %196, i64 noundef %198)
          to label %199 unwind label %106

199:                                              ; preds = %195
  %200 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 7
  %201 = load i32, ptr %10, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  invoke void @_ZN15dc_pixel_matrix10set_heightEm(ptr noundef nonnull align 8 dereferenceable(24) %200, i64 noundef %202)
          to label %203 unwind label %106

203:                                              ; preds = %199
  %204 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 7
  %205 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 7
  %206 = invoke noundef i64 @_ZN15dc_pixel_matrix9get_widthEv(ptr noundef nonnull align 8 dereferenceable(24) %205)
          to label %207 unwind label %106

207:                                              ; preds = %203
  %208 = getelementptr inbounds %class.dc, ptr %14, i32 0, i32 7
  %209 = invoke noundef i64 @_ZN15dc_pixel_matrix10get_heightEv(ptr noundef nonnull align 8 dereferenceable(24) %208)
          to label %210 unwind label %106

210:                                              ; preds = %207
  %211 = mul i64 %206, %209
  %212 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %211, i64 3)
  %213 = extractvalue { i64, i1 } %212, 1
  %214 = extractvalue { i64, i1 } %212, 0
  %215 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %214, i64 8)
  %216 = extractvalue { i64, i1 } %215, 1
  %217 = or i1 %213, %216
  %218 = extractvalue { i64, i1 } %215, 0
  %219 = select i1 %217, i64 -1, i64 %218
  %220 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %219) #13
          to label %221 unwind label %106

221:                                              ; preds = %210
  store i64 %211, ptr %220, align 8
  %222 = getelementptr inbounds i8, ptr %220, i64 8
  %223 = icmp eq i64 %211, 0
  br i1 %223, label %231, label %224

224:                                              ; preds = %221
  %225 = getelementptr inbounds %class.dc_pixel, ptr %222, i64 %211
  br label %226

226:                                              ; preds = %228, %224
  %227 = phi ptr [ %222, %224 ], [ %229, %228 ]
  invoke void @_ZN8dc_pixelC1Ev(ptr noundef nonnull align 1 dereferenceable(3) %227)
          to label %228 unwind label %233

228:                                              ; preds = %226
  %229 = getelementptr inbounds %class.dc_pixel, ptr %227, i64 1
  %230 = icmp eq ptr %229, %225
  br i1 %230, label %231, label %226

231:                                              ; preds = %228, %221
  invoke void @_ZN15dc_pixel_matrix10set_pixelsEP8dc_pixel(ptr noundef nonnull align 8 dereferenceable(24) %204, ptr noundef %222)
          to label %232 unwind label %106

232:                                              ; preds = %231
  call void @_ZN16_dc_light_sectorD2Ev(ptr noundef nonnull align 1 dereferenceable(5) %11) #11
  call void @llvm.lifetime.end.p0(i64 5, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #11
  ret void

233:                                              ; preds = %226
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %12, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %13, align 4
  %237 = icmp eq ptr %222, %227
  br i1 %237, label %242, label %238

238:                                              ; preds = %238, %233
  %239 = phi ptr [ %227, %233 ], [ %240, %238 ]
  %240 = getelementptr inbounds %class.dc_pixel, ptr %239, i64 -1
  call void @_ZN8dc_pixelD1Ev(ptr noundef nonnull align 1 dereferenceable(3) %240) #11
  %241 = icmp eq ptr %240, %222
  br i1 %241, label %242, label %238

242:                                              ; preds = %238, %233
  call void @_ZdaPvm(ptr noundef %220, i64 noundef %219) #14
  br label %243

243:                                              ; preds = %242, %106
  call void @_ZN16_dc_light_sectorD2Ev(ptr noundef nonnull align 1 dereferenceable(5) %11) #11
  call void @llvm.lifetime.end.p0(i64 5, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #11
  br label %244

244:                                              ; preds = %243
  %245 = load ptr, ptr %12, align 8
  %246 = load i32, ptr %13, align 4
  %247 = insertvalue { ptr, i32 } poison, ptr %245, 0
  %248 = insertvalue { ptr, i32 } %247, i32 %246, 1
  resume { ptr, i32 } %248
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15dc_pixel_matrix9get_widthEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15dc_pixel_matrix10get_heightEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

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

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16_dc_light_sectorC2Ev(ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8dc_pixel5set_rEh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8dc_pixel5set_gEh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8dc_pixel5set_bEh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI16_dc_light_sectorSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(5)) #1 align 2

declare i32 @close(i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15dc_pixel_matrix9set_widthEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15dc_pixel_matrix10set_heightEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15dc_pixel_matrix10set_pixelsEP8dc_pixel(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #7

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #8

declare void @_ZN8dc_pixelC1Ev(ptr noundef nonnull align 1 dereferenceable(3)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN8dc_pixelD1Ev(ptr noundef nonnull align 1 dereferenceable(3)) unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16_dc_light_sectorD2Ev(ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #10 align 2

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 = { 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 "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 = { 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 #6 = { inlinehint 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nobuiltin allocsize(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 #9 = { nobuiltin 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 #10 = { 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 #11 = { nounwind }
attributes #12 = { noreturn nounwind }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin 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 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !12, i64 16}
!15 = !{!"_ZTS2dc", !16, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !17, i64 32, !17, i64 64, !12, i64 96, !19, i64 104, !20, i64 128, !28, i64 176}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !12, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"_ZTS15dc_pixel_matrix", !6, i64 0, !12, i64 8, !12, i64 16}
!20 = !{!"_ZTSSt3mapIm16_dc_heavy_sectorSt4lessImESaISt4pairIKmS0_EEE", !21, i64 0}
!21 = !{!"_ZTSSt8_Rb_treeImSt4pairIKm16_dc_heavy_sectorESt10_Select1stIS3_ESt4lessImESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKm16_dc_heavy_sectorESt10_Select1stIS3_ESt4lessImESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !23, i64 0, !25, i64 8}
!23 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !24, i64 0}
!24 = !{!"_ZTSSt4lessImE"}
!25 = !{!"_ZTSSt15_Rb_tree_header", !26, i64 0, !12, i64 32}
!26 = !{!"_ZTSSt18_Rb_tree_node_base", !27, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!28 = !{!"_ZTSSt6vectorI16_dc_light_sectorSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseI16_dc_light_sectorSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI16_dc_light_sectorSaIS0_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI16_dc_light_sectorSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!15, !12, i64 24}
!33 = !{!34, !7, i64 4}
!34 = !{!"_ZTS16_dc_light_sector", !35, i64 0, !7, i64 3, !7, i64 4}
!35 = !{!"_ZTS8dc_pixel", !7, i64 0, !7, i64 1, !7, i64 2}
!36 = !{!34, !7, i64 3}
!37 = !{!15, !12, i64 96}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}
!41 = distinct !{!41, !39}


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

%struct._dc_light_sector = type { %class.dc_pixel, i8, i8 }
%class.dc_pixel = type { i8, i8, i8 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15dc_decompressor12_deserializeEv(ptr noundef nonnull align 8 dereferenceable(200) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [8 x i8], align 4
  %3 = alloca [1024 x i8], align 16
  %4 = alloca %struct._dc_light_sector, align 1
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #13
  %7 = tail call i32 (ptr, i32, ...) @open(ptr noundef %6, i32 noundef 2, i32 noundef 256)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %8, label %11

8:                                                ; preds = %1
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.20) #14
  tail call void @exit(i32 noundef 1) #15
  unreachable

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #13
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #13
  %12 = call i64 @read(i32 noundef %7, ptr noundef nonnull %2, i64 noundef 2)
  %13 = icmp eq i64 %12, 2
  br i1 %13, label %14, label %20

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load <2 x i8>, ptr %2, align 4, !tbaa !9
  %17 = zext <2 x i8> %16 to <2 x i64>
  store <2 x i64> %17, ptr %15, align 8, !tbaa !10
  %18 = call i64 @read(i32 noundef %7, ptr noundef nonnull %2, i64 noundef 8)
  %19 = icmp eq i64 %18, 8
  br i1 %19, label %23, label %29

20:                                               ; preds = %11
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.21) #14
  tail call void @exit(i32 noundef 1) #15
  unreachable

23:                                               ; preds = %14
  %24 = load i32, ptr %2, align 4
  %25 = getelementptr inbounds i8, ptr %2, i64 4
  %26 = load i32, ptr %25, align 4
  %27 = load i64, ptr %15, align 8, !tbaa !12
  %28 = add i64 %27, -3
  %or.cond = icmp ult i64 %28, -2
  br i1 %or.cond, label %32, label %35

29:                                               ; preds = %14
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.22) #14
  tail call void @exit(i32 noundef 1) #15
  unreachable

32:                                               ; preds = %23
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.23) #14
  tail call void @exit(i32 noundef 1) #15
  unreachable

35:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %4) #13
  call void @_ZN16_dc_light_sectorC2Ev(ptr noundef nonnull align 1 dereferenceable(5) %4)
  %36 = getelementptr inbounds i8, ptr %4, i64 4
  %37 = getelementptr inbounds i8, ptr %4, i64 3
  %38 = getelementptr inbounds i8, ptr %0, i64 176
  %39 = getelementptr inbounds i8, ptr %0, i64 96
  br label %40

40:                                               ; preds = %.loopexit44, %35
  %41 = invoke i64 @read(i32 noundef %7, ptr noundef nonnull %3, i64 noundef 1024)
          to label %42 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

42:                                               ; preds = %40
  %.not35 = icmp eq i64 %41, 0
  br i1 %.not35, label %77, label %43

43:                                               ; preds = %42
  %44 = load i64, ptr %15, align 8, !tbaa !12
  switch i64 %44, label %.loopexit44 [
    i64 1, label %45
    i64 2, label %.preheader60
  ]

.loopexit45:                                      ; preds = %.preheader59
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.preheader60
  %lpad.loopexit47 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %40
  %lpad.loopexit50 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %77, %79
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

45:                                               ; preds = %43
  %46 = and i64 %41, 3
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %.preheader59, label %64

.preheader59:                                     ; preds = %45, %59
  %.02654 = phi i64 [ %60, %59 ], [ 0, %45 ]
  %48 = or disjoint i64 %.02654, 1
  %49 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %.02654
  %50 = load i8, ptr %49, align 4, !tbaa !9
  store i8 %50, ptr %36, align 1, !tbaa !30
  %51 = or disjoint i64 %.02654, 2
  %52 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %48
  %53 = load i8, ptr %52, align 1, !tbaa !9
  call void @_ZN8dc_pixel5set_rEh(ptr noundef nonnull align 1 dereferenceable(3) %4, i8 noundef zeroext %53)
  %54 = or disjoint i64 %.02654, 3
  %55 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %51
  %56 = load i8, ptr %55, align 2, !tbaa !9
  call void @_ZN8dc_pixel5set_gEh(ptr noundef nonnull align 1 dereferenceable(3) %4, i8 noundef zeroext %56)
  %57 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %54
  %58 = load i8, ptr %57, align 1, !tbaa !9
  call void @_ZN8dc_pixel5set_bEh(ptr noundef nonnull align 1 dereferenceable(3) %4, i8 noundef zeroext %58)
  store i8 0, ptr %37, align 1, !tbaa !33
  invoke void @_ZNSt6vectorI16_dc_light_sectorSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 1 dereferenceable(5) %4)
          to label %59 unwind label %.loopexit45

59:                                               ; preds = %.preheader59
  %60 = add i64 %.02654, 4
  %61 = load i64, ptr %39, align 8, !tbaa !34
  %62 = add i64 %61, 1
  store i64 %62, ptr %39, align 8, !tbaa !34
  %63 = icmp ult i64 %60, %41
  br i1 %63, label %.preheader59, label %.loopexit44, !llvm.loop !35

64:                                               ; preds = %45
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.24) #14
  call void @exit(i32 noundef 1) #15
  unreachable

.preheader60:                                     ; preds = %43, %72
  %.153 = phi i64 [ %73, %72 ], [ 0, %43 ]
  %67 = or disjoint i64 %.153, 1
  %68 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %.153
  %69 = load i8, ptr %68, align 2, !tbaa !9
  store i8 %69, ptr %36, align 1, !tbaa !30
  %70 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 %67
  %71 = load i8, ptr %70, align 1, !tbaa !9
  store i8 %71, ptr %37, align 1, !tbaa !33
  invoke void @_ZNSt6vectorI16_dc_light_sectorSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 1 dereferenceable(5) %4)
          to label %72 unwind label %.loopexit.split-lp.loopexit

72:                                               ; preds = %.preheader60
  %73 = add i64 %.153, 2
  %74 = load i64, ptr %39, align 8, !tbaa !34
  %75 = add i64 %74, 1
  store i64 %75, ptr %39, align 8, !tbaa !34
  %76 = icmp ult i64 %73, %41
  br i1 %76, label %.preheader60, label %.loopexit44, !llvm.loop !37

.loopexit44:                                      ; preds = %72, %59, %43
  br label %40, !llvm.loop !38

77:                                               ; preds = %42
  %78 = invoke i32 @close(i32 noundef %7)
          to label %79 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

79:                                               ; preds = %77
  %80 = getelementptr inbounds i8, ptr %0, i64 104
  %81 = sext i32 %24 to i64
  call void @_ZN15dc_pixel_matrix9set_widthEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %81)
  %82 = sext i32 %26 to i64
  call void @_ZN15dc_pixel_matrix10set_heightEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82)
  %83 = call noundef i64 @_ZN15dc_pixel_matrix9get_widthEv(ptr noundef nonnull align 8 dereferenceable(24) %80)
  %84 = call noundef i64 @_ZN15dc_pixel_matrix10get_heightEv(ptr noundef nonnull align 8 dereferenceable(24) %80)
  %85 = mul i64 %84, %83
  %86 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %85, i64 3)
  %87 = extractvalue { i64, i1 } %86, 1
  %88 = extractvalue { i64, i1 } %86, 0
  %89 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %88, i64 8)
  %90 = extractvalue { i64, i1 } %89, 1
  %91 = or i1 %87, %90
  %92 = extractvalue { i64, i1 } %89, 0
  %93 = select i1 %91, i64 -1, i64 %92
  %94 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %93) #16
          to label %95 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

95:                                               ; preds = %79
  store i64 %85, ptr %94, align 8
  %.ptr37 = getelementptr inbounds i8, ptr %94, i64 8
  %96 = icmp eq i64 %85, 0
  br i1 %96, label %.loopexit43, label %97

97:                                               ; preds = %95
  %98 = getelementptr inbounds %class.dc_pixel, ptr %.ptr37, i64 %85
  br label %99

99:                                               ; preds = %100, %97
  %.idx = phi i64 [ 8, %97 ], [ %.add, %100 ]
  %.ptr.ptr = getelementptr inbounds i8, ptr %94, i64 %.idx
  invoke void @_ZN8dc_pixelC1Ev(ptr noundef nonnull align 1 dereferenceable(3) %.ptr.ptr)
          to label %100 unwind label %102

100:                                              ; preds = %99
  %.add = add nuw nsw i64 %.idx, 3
  %.ptr36 = getelementptr inbounds i8, ptr %94, i64 %.add
  %101 = icmp eq ptr %.ptr36, %98
  br i1 %101, label %.loopexit43, label %99

.loopexit43:                                      ; preds = %100, %95
  call void @_ZN15dc_pixel_matrix10set_pixelsEP8dc_pixel(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull %.ptr37)
  call void @_ZN16_dc_light_sectorD2Ev(ptr noundef nonnull align 1 dereferenceable(5) %4) #13
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %4) #13
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #13
  ret void

102:                                              ; preds = %99
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = icmp eq i64 %.idx, 8
  br i1 %104, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %102, %.preheader
  %.idx38 = phi i64 [ %.add39, %.preheader ], [ %.idx, %102 ]
  %.add39 = add nsw i64 %.idx38, -3
  %.ptr41 = getelementptr inbounds i8, ptr %94, i64 %.add39
  call void @_ZN8dc_pixelD1Ev(ptr noundef nonnull align 1 dereferenceable(3) %.ptr41) #13
  %105 = icmp eq i64 %.add39, 8
  br i1 %105, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %102
  call void @_ZdaPvm(ptr noundef nonnull %94, i64 noundef %93) #17
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit45, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %.loopexit
  %.pn = phi { ptr, i32 } [ %103, %.loopexit ], [ %lpad.loopexit, %.loopexit45 ], [ %lpad.loopexit47, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit50, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN16_dc_light_sectorD2Ev(ptr noundef nonnull align 1 dereferenceable(5) %4) #13
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %4) #13
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #13
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15dc_pixel_matrix9get_widthEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15dc_pixel_matrix10get_heightEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16_dc_light_sectorC2Ev(ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8dc_pixel5set_rEh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8dc_pixel5set_gEh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8dc_pixel5set_bEh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI16_dc_light_sectorSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #1 align 2

declare i32 @close(i32 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15dc_pixel_matrix9set_widthEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15dc_pixel_matrix10set_heightEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15dc_pixel_matrix10set_pixelsEP8dc_pixel(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #8

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #9

declare void @_ZN8dc_pixelC1Ev(ptr noundef nonnull align 1 dereferenceable(3)) unnamed_addr #7

; Function Attrs: nounwind
declare void @_ZN8dc_pixelD1Ev(ptr noundef nonnull align 1 dereferenceable(3)) unnamed_addr #10

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) local_unnamed_addr #11

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16_dc_light_sectorD2Ev(ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #12 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { nofree "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { inlinehint 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 #7 = { "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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nobuiltin allocsize(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 #10 = { 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 #11 = { nobuiltin 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 #12 = { 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 #13 = { nounwind }
attributes #14 = { cold nounwind }
attributes #15 = { noreturn nounwind }
attributes #16 = { builtin allocsize(0) }
attributes #17 = { builtin 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"_ZTS2dc", !14, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !15, i64 32, !15, i64 64, !11, i64 96, !17, i64 104, !18, i64 128, !26, i64 176}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !11, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"_ZTS15dc_pixel_matrix", !6, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"_ZTSSt3mapIm16_dc_heavy_sectorSt4lessImESaISt4pairIKmS0_EEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeImSt4pairIKm16_dc_heavy_sectorESt10_Select1stIS3_ESt4lessImESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKm16_dc_heavy_sectorESt10_Select1stIS3_ESt4lessImESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessImE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !11, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!26 = !{!"_ZTSSt6vectorI16_dc_light_sectorSaIS0_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseI16_dc_light_sectorSaIS0_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseI16_dc_light_sectorSaIS0_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseI16_dc_light_sectorSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!31, !7, i64 4}
!31 = !{!"_ZTS16_dc_light_sector", !32, i64 0, !7, i64 3, !7, i64 4}
!32 = !{!"_ZTS8dc_pixel", !7, i64 0, !7, i64 1, !7, i64 2}
!33 = !{!31, !7, i64 3}
!34 = !{!13, !11, i64 96}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = distinct !{!38, !36}


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