; LLVM IR from venumb/ZSPACE :: cpp/depends/lodePNG/examples/example_bmp2png.ll (Z9decodeBMPRSt6vectorIhSaIhEERjS3_RKS1_)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z9decodeBMPRSt6vectorIhSaIhEERjS3_RKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #3
  %21 = icmp ult i64 %20, 54
  br i1 %21, label %22, label %23

22:                                               ; preds = %4
  store i32 -1, ptr %5, align 4
  br label %253

23:                                               ; preds = %4
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef 0) #3
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = zext i8 %26 to i32
  %28 = icmp ne i32 %27, 66
  br i1 %28, label %35, label %29

29:                                               ; preds = %23
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 1) #3
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = zext i8 %32 to i32
  %34 = icmp ne i32 %33, 77
  br i1 %34, label %35, label %36

35:                                               ; preds = %29, %23
  store i32 1, ptr %5, align 4
  br label %253

36:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef 10) #3
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = zext i8 %39 to i32
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef 11) #3
  %43 = load i8, ptr %42, align 1, !tbaa !9
  %44 = zext i8 %43 to i32
  %45 = mul nsw i32 256, %44
  %46 = add nsw i32 %40, %45
  store i32 %46, ptr %10, align 4, !tbaa !10
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 18) #3
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = zext i8 %49 to i32
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 19) #3
  %53 = load i8, ptr %52, align 1, !tbaa !9
  %54 = zext i8 %53 to i32
  %55 = mul nsw i32 %54, 256
  %56 = add nsw i32 %50, %55
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %56, ptr %57, align 4, !tbaa !10
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef 22) #3
  %60 = load i8, ptr %59, align 1, !tbaa !9
  %61 = zext i8 %60 to i32
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 23) #3
  %64 = load i8, ptr %63, align 1, !tbaa !9
  %65 = zext i8 %64 to i32
  %66 = mul nsw i32 %65, 256
  %67 = add nsw i32 %61, %66
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %67, ptr %68, align 4, !tbaa !10
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef 28) #3
  %71 = load i8, ptr %70, align 1, !tbaa !9
  %72 = zext i8 %71 to i32
  %73 = icmp ne i32 %72, 24
  br i1 %73, label %74, label %81

74:                                               ; preds = %36
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef 28) #3
  %77 = load i8, ptr %76, align 1, !tbaa !9
  %78 = zext i8 %77 to i32
  %79 = icmp ne i32 %78, 32
  br i1 %79, label %80, label %81

80:                                               ; preds = %74
  store i32 2, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %252

81:                                               ; preds = %74, %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef 28) #3
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = zext i8 %84 to i32
  %86 = sdiv i32 %85, 8
  store i32 %86, ptr %12, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 4, !tbaa !10
  %89 = load i32, ptr %12, align 4, !tbaa !10
  %90 = mul i32 %88, %89
  store i32 %90, ptr %13, align 4, !tbaa !10
  %91 = load i32, ptr %13, align 4, !tbaa !10
  %92 = urem i32 %91, 4
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %99

94:                                               ; preds = %81
  %95 = load i32, ptr %13, align 4, !tbaa !10
  %96 = udiv i32 %95, 4
  %97 = mul i32 %96, 4
  %98 = add i32 %97, 4
  store i32 %98, ptr %13, align 4, !tbaa !10
  br label %99

99:                                               ; preds = %94, %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %100 = load i32, ptr %13, align 4, !tbaa !10
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load i32, ptr %101, align 4, !tbaa !10
  %103 = mul i32 %100, %102
  store i32 %103, ptr %14, align 4, !tbaa !10
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #3
  %106 = load i32, ptr %14, align 4, !tbaa !10
  %107 = load i32, ptr %10, align 4, !tbaa !10
  %108 = add i32 %106, %107
  %109 = zext i32 %108 to i64
  %110 = icmp ult i64 %105, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %99
  store i32 3, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %251

112:                                              ; preds = %99
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load i32, ptr %114, align 4, !tbaa !10
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !10
  %118 = mul i32 %115, %117
  %119 = mul i32 %118, 4
  %120 = zext i32 %119 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %120)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !10
  br label %121

121:                                              ; preds = %247, %112
  %122 = load i32, ptr %15, align 4, !tbaa !10
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = load i32, ptr %123, align 4, !tbaa !10
  %125 = icmp ult i32 %122, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %121
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %250

127:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !10
  br label %128

128:                                              ; preds = %243, %127
  %129 = load i32, ptr %16, align 4, !tbaa !10
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = load i32, ptr %130, align 4, !tbaa !10
  %132 = icmp ult i32 %129, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %128
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %246

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %135 = load i32, ptr %10, align 4, !tbaa !10
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = load i32, ptr %136, align 4, !tbaa !10
  %138 = load i32, ptr %15, align 4, !tbaa !10
  %139 = sub i32 %137, %138
  %140 = sub i32 %139, 1
  %141 = load i32, ptr %13, align 4, !tbaa !10
  %142 = mul i32 %140, %141
  %143 = add i32 %135, %142
  %144 = load i32, ptr %12, align 4, !tbaa !10
  %145 = load i32, ptr %16, align 4, !tbaa !10
  %146 = mul i32 %144, %145
  %147 = add i32 %143, %146
  store i32 %147, ptr %17, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %148 = load i32, ptr %15, align 4, !tbaa !10
  %149 = mul i32 4, %148
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = load i32, ptr %150, align 4, !tbaa !10
  %152 = mul i32 %149, %151
  %153 = load i32, ptr %16, align 4, !tbaa !10
  %154 = mul i32 4, %153
  %155 = add i32 %152, %154
  store i32 %155, ptr %18, align 4, !tbaa !10
  %156 = load i32, ptr %12, align 4, !tbaa !10
  %157 = icmp eq i32 %156, 3
  br i1 %157, label %158, label %197

158:                                              ; preds = %134
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = load i32, ptr %17, align 4, !tbaa !10
  %161 = add i32 %160, 2
  %162 = zext i32 %161 to i64
  %163 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %162) #3
  %164 = load i8, ptr %163, align 1, !tbaa !9
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = load i32, ptr %18, align 4, !tbaa !10
  %167 = add i32 %166, 0
  %168 = zext i32 %167 to i64
  %169 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %165, i64 noundef %168) #3
  store i8 %164, ptr %169, align 1, !tbaa !9
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load i32, ptr %17, align 4, !tbaa !10
  %172 = add i32 %171, 1
  %173 = zext i32 %172 to i64
  %174 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %170, i64 noundef %173) #3
  %175 = load i8, ptr %174, align 1, !tbaa !9
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = load i32, ptr %18, align 4, !tbaa !10
  %178 = add i32 %177, 1
  %179 = zext i32 %178 to i64
  %180 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %176, i64 noundef %179) #3
  store i8 %175, ptr %180, align 1, !tbaa !9
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = load i32, ptr %17, align 4, !tbaa !10
  %183 = add i32 %182, 0
  %184 = zext i32 %183 to i64
  %185 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %184) #3
  %186 = load i8, ptr %185, align 1, !tbaa !9
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = load i32, ptr %18, align 4, !tbaa !10
  %189 = add i32 %188, 2
  %190 = zext i32 %189 to i64
  %191 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %190) #3
  store i8 %186, ptr %191, align 1, !tbaa !9
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = load i32, ptr %18, align 4, !tbaa !10
  %194 = add i32 %193, 3
  %195 = zext i32 %194 to i64
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %192, i64 noundef %195) #3
  store i8 -1, ptr %196, align 1, !tbaa !9
  br label %242

197:                                              ; preds = %134
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = load i32, ptr %17, align 4, !tbaa !10
  %200 = add i32 %199, 3
  %201 = zext i32 %200 to i64
  %202 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %198, i64 noundef %201) #3
  %203 = load i8, ptr %202, align 1, !tbaa !9
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = load i32, ptr %18, align 4, !tbaa !10
  %206 = add i32 %205, 0
  %207 = zext i32 %206 to i64
  %208 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %204, i64 noundef %207) #3
  store i8 %203, ptr %208, align 1, !tbaa !9
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = load i32, ptr %17, align 4, !tbaa !10
  %211 = add i32 %210, 2
  %212 = zext i32 %211 to i64
  %213 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef %212) #3
  %214 = load i8, ptr %213, align 1, !tbaa !9
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = load i32, ptr %18, align 4, !tbaa !10
  %217 = add i32 %216, 1
  %218 = zext i32 %217 to i64
  %219 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %215, i64 noundef %218) #3
  store i8 %214, ptr %219, align 1, !tbaa !9
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = load i32, ptr %17, align 4, !tbaa !10
  %222 = add i32 %221, 1
  %223 = zext i32 %222 to i64
  %224 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef %223) #3
  %225 = load i8, ptr %224, align 1, !tbaa !9
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = load i32, ptr %18, align 4, !tbaa !10
  %228 = add i32 %227, 2
  %229 = zext i32 %228 to i64
  %230 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %226, i64 noundef %229) #3
  store i8 %225, ptr %230, align 1, !tbaa !9
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = load i32, ptr %17, align 4, !tbaa !10
  %233 = add i32 %232, 0
  %234 = zext i32 %233 to i64
  %235 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %231, i64 noundef %234) #3
  %236 = load i8, ptr %235, align 1, !tbaa !9
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = load i32, ptr %18, align 4, !tbaa !10
  %239 = add i32 %238, 3
  %240 = zext i32 %239 to i64
  %241 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %240) #3
  store i8 %236, ptr %241, align 1, !tbaa !9
  br label %242

242:                                              ; preds = %197, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %16, align 4, !tbaa !10
  %245 = add i32 %244, 1
  store i32 %245, ptr %16, align 4, !tbaa !10
  br label %128, !llvm.loop !12

246:                                              ; preds = %133
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %15, align 4, !tbaa !10
  %249 = add i32 %248, 1
  store i32 %249, ptr %15, align 4, !tbaa !10
  br label %121, !llvm.loop !14

250:                                              ; preds = %126
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %251

251:                                              ; preds = %250, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %252

252:                                              ; preds = %251, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %253

253:                                              ; preds = %252, %35, %22
  %254 = load i32, ptr %5, align 4
  ret i32 %254
}

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 4) i32 @_Z9decodeBMPRSt6vectorIhSaIhEERjS3_RKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nocapture noundef nonnull align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #0 {
  %5 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #2
  %6 = icmp ult i64 %5, 54
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %4
  %8 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #2
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %.not = icmp eq i8 %9, 66
  br i1 %.not, label %10, label %.loopexit

10:                                               ; preds = %7
  %11 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1) #2
  %12 = load i8, ptr %11, align 1, !tbaa !5
  %.not76 = icmp eq i8 %12, 77
  br i1 %.not76, label %13, label %.loopexit

13:                                               ; preds = %10
  %14 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 10) #2
  %15 = load i8, ptr %14, align 1, !tbaa !5
  %16 = zext i8 %15 to i32
  %17 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 11) #2
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = zext i8 %18 to i32
  %20 = shl nuw nsw i32 %19, 8
  %21 = or disjoint i32 %20, %16
  %22 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 18) #2
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %24 = zext i8 %23 to i32
  %25 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 19) #2
  %26 = load i8, ptr %25, align 1, !tbaa !5
  %27 = zext i8 %26 to i32
  %28 = shl nuw nsw i32 %27, 8
  %29 = or disjoint i32 %28, %24
  store i32 %29, ptr %1, align 4, !tbaa !8
  %30 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 22) #2
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %32 = zext i8 %31 to i32
  %33 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 23) #2
  %34 = load i8, ptr %33, align 1, !tbaa !5
  %35 = zext i8 %34 to i32
  %36 = shl nuw nsw i32 %35, 8
  %37 = or disjoint i32 %36, %32
  store i32 %37, ptr %2, align 4, !tbaa !8
  %38 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 28) #2
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %.not77 = icmp eq i8 %39, 24
  br i1 %.not77, label %43, label %40

40:                                               ; preds = %13
  %41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 28) #2
  %42 = load i8, ptr %41, align 1, !tbaa !5
  %.not78 = icmp eq i8 %42, 32
  br i1 %.not78, label %43, label %.loopexit

43:                                               ; preds = %40, %13
  %44 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 28) #2
  %45 = load i8, ptr %44, align 1, !tbaa !5
  %46 = lshr i8 %45, 3
  %47 = zext nneg i8 %46 to i32
  %48 = load i32, ptr %1, align 4, !tbaa !8
  %49 = mul i32 %48, %47
  %.biased = add i32 %49, 3
  %.074 = and i32 %.biased, -4
  %50 = load i32, ptr %2, align 4, !tbaa !8
  %51 = mul i32 %.074, %50
  %52 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #2
  %53 = add i32 %51, %21
  %54 = zext i32 %53 to i64
  %55 = icmp ult i64 %52, %54
  br i1 %55, label %.loopexit, label %56

56:                                               ; preds = %43
  %57 = load i32, ptr %1, align 4, !tbaa !8
  %58 = load i32, ptr %2, align 4, !tbaa !8
  %59 = shl i32 %57, 2
  %60 = mul i32 %59, %58
  %61 = zext i32 %60 to i64
  tail call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %61)
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %.not82 = icmp eq i32 %62, 0
  br i1 %.not82, label %.loopexit, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %56
  %63 = icmp eq i8 %46, 3
  %64 = load i32, ptr %1, align 4, !tbaa !8
  %.not83 = icmp eq i32 %64, 0
  br i1 %.not83, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %65 = phi i32 [ %103, %._crit_edge ], [ %64, %.preheader.lr.ph ]
  %.07381 = phi i32 [ %104, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.not84 = icmp eq i32 %65, 0
  br i1 %.not84, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %66 = xor i32 %.07381, -1
  %67 = shl i32 %.07381, 2
  br i1 %63, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %68 = phi i32 [ %101, %.lr.ph.split.us ], [ %65, %.lr.ph ]
  %.07280.us = phi i32 [ %100, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %69 = load i32, ptr %2, align 4, !tbaa !8
  %70 = add i32 %69, %66
  %71 = mul i32 %70, %.074
  %72 = mul i32 %.07280.us, %47
  %73 = add i32 %72, %21
  %74 = add i32 %73, %71
  %75 = mul i32 %67, %68
  %76 = shl i32 %.07280.us, 2
  %77 = add i32 %75, %76
  %78 = add i32 %74, 2
  %79 = zext i32 %78 to i64
  %80 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %79) #2
  %81 = load i8, ptr %80, align 1, !tbaa !5
  %82 = zext i32 %77 to i64
  %83 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %82) #2
  store i8 %81, ptr %83, align 1, !tbaa !5
  %84 = add i32 %74, 1
  %85 = zext i32 %84 to i64
  %86 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %85) #2
  %87 = load i8, ptr %86, align 1, !tbaa !5
  %88 = or disjoint i32 %77, 1
  %89 = zext i32 %88 to i64
  %90 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %89) #2
  store i8 %87, ptr %90, align 1, !tbaa !5
  %91 = zext i32 %74 to i64
  %92 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %91) #2
  %93 = load i8, ptr %92, align 1, !tbaa !5
  %94 = or disjoint i32 %77, 2
  %95 = zext i32 %94 to i64
  %96 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %95) #2
  store i8 %93, ptr %96, align 1, !tbaa !5
  %97 = or disjoint i32 %77, 3
  %98 = zext i32 %97 to i64
  %99 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %98) #2
  store i8 -1, ptr %99, align 1, !tbaa !5
  %100 = add nuw i32 %.07280.us, 1
  %101 = load i32, ptr %1, align 4, !tbaa !8
  %102 = icmp ult i32 %100, %101
  br i1 %102, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %.preheader
  %103 = phi i32 [ 0, %.preheader ], [ %101, %.lr.ph.split.us ], [ %144, %.lr.ph.split ]
  %104 = add nuw i32 %.07381, 1
  %105 = load i32, ptr %2, align 4, !tbaa !8
  %106 = icmp ult i32 %104, %105
  br i1 %106, label %.preheader, label %.loopexit, !llvm.loop !12

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %107 = phi i32 [ %144, %.lr.ph.split ], [ %65, %.lr.ph ]
  %.07280 = phi i32 [ %143, %.lr.ph.split ], [ 0, %.lr.ph ]
  %108 = load i32, ptr %2, align 4, !tbaa !8
  %109 = add i32 %108, %66
  %110 = mul i32 %109, %.074
  %111 = mul i32 %.07280, %47
  %112 = add i32 %111, %21
  %113 = add i32 %112, %110
  %114 = mul i32 %67, %107
  %115 = shl i32 %.07280, 2
  %116 = add i32 %114, %115
  %117 = add i32 %113, 3
  %118 = zext i32 %117 to i64
  %119 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %118) #2
  %120 = load i8, ptr %119, align 1, !tbaa !5
  %121 = zext i32 %116 to i64
  %122 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %121) #2
  store i8 %120, ptr %122, align 1, !tbaa !5
  %123 = add i32 %113, 2
  %124 = zext i32 %123 to i64
  %125 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %124) #2
  %126 = load i8, ptr %125, align 1, !tbaa !5
  %127 = or disjoint i32 %116, 1
  %128 = zext i32 %127 to i64
  %129 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %128) #2
  store i8 %126, ptr %129, align 1, !tbaa !5
  %130 = add i32 %113, 1
  %131 = zext i32 %130 to i64
  %132 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %131) #2
  %133 = load i8, ptr %132, align 1, !tbaa !5
  %134 = or disjoint i32 %116, 2
  %135 = zext i32 %134 to i64
  %136 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %135) #2
  store i8 %133, ptr %136, align 1, !tbaa !5
  %137 = zext i32 %113 to i64
  %138 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %137) #2
  %139 = load i8, ptr %138, align 1, !tbaa !5
  %140 = or disjoint i32 %116, 3
  %141 = zext i32 %140 to i64
  %142 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %141) #2
  store i8 %139, ptr %142, align 1, !tbaa !5
  %143 = add nuw i32 %.07280, 1
  %144 = load i32, ptr %1, align 4, !tbaa !8
  %145 = icmp ult i32 %143, %144
  br i1 %145, label %.lr.ph.split, label %._crit_edge, !llvm.loop !10

.loopexit:                                        ; preds = %._crit_edge, %.preheader.lr.ph, %56, %40, %43, %7, %10, %4
  %.2 = phi i32 [ -1, %4 ], [ 1, %10 ], [ 1, %7 ], [ 2, %40 ], [ 3, %43 ], [ 0, %56 ], [ 0, %.preheader.lr.ph ], [ 0, %._crit_edge ]
  ret i32 %.2
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}


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