; LLVM IR from facebookresearch/habitat-sim :: src/deps/basis-universal/encoder/jpgd.ll (ZN4jpgd12jpeg_decoder11H2V2ConvertEv)

; 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.jpgd::jpeg_decoder" = type <{ [1 x %struct.__jmp_buf_tag], i32, [4 x i8], ptr, i32, i32, ptr, i32, [8 x i8], [4 x i8], [8 x ptr], [8 x ptr], [4 x ptr], i32, i32, [4 x i32], [4 x i32], [4 x i32], [4 x i32], [4 x i32], [4 x i32], i32, [4 x i32], [4 x i32], [4 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, i32, [4 x i8], [8 x ptr], [4 x ptr], [4 x ptr], i32, [4 x i32], [4 x i8], ptr, i32, i32, [64 x i8], [8320 x i8], [64 x i8], i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], ptr, [10 x i32], ptr, ptr, [256 x i32], [256 x i32], [256 x i32], [256 x i32], ptr, ptr, i32, i32, i8, i8, i8, [5 x i8] }>
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4jpgd12jpeg_decoder11H2V2ConvertEv(ptr noundef nonnull align 8 dereferenceable(13523) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %19 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 30
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 37
  %22 = load i32, ptr %21, align 8, !tbaa !14
  %23 = sub nsw i32 %20, %22
  store i32 %23, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %24 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 72
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  store ptr %25, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %26 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 73
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  store ptr %27, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %28 = load i32, ptr %3, align 4, !tbaa !15
  %29 = icmp slt i32 %28, 8
  br i1 %29, label %30, label %37

30:                                               ; preds = %1
  %31 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 66
  %32 = load ptr, ptr %31, align 8, !tbaa !18
  %33 = load i32, ptr %3, align 4, !tbaa !15
  %34 = mul nsw i32 %33, 8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %32, i64 %35
  store ptr %36, ptr %6, align 8, !tbaa !5
  br label %46

37:                                               ; preds = %1
  %38 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 66
  %39 = load ptr, ptr %38, align 8, !tbaa !18
  %40 = getelementptr inbounds i8, ptr %39, i64 128
  %41 = load i32, ptr %3, align 4, !tbaa !15
  %42 = and i32 %41, 7
  %43 = mul nsw i32 %42, 8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i8, ptr %40, i64 %44
  store ptr %45, ptr %6, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %37, %30
  %47 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 66
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = getelementptr inbounds i8, ptr %48, i64 256
  %50 = load i32, ptr %3, align 4, !tbaa !15
  %51 = ashr i32 %50, 1
  %52 = mul nsw i32 %51, 8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i8, ptr %49, i64 %53
  store ptr %54, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %55 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 60
  %56 = load i32, ptr %55, align 4, !tbaa !19
  store i32 %56, ptr %8, align 4, !tbaa !15
  br label %57

57:                                               ; preds = %230, %46
  %58 = load i32, ptr %8, align 4, !tbaa !15
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %233

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !15
  br label %62

62:                                               ; preds = %222, %61
  %63 = load i32, ptr %10, align 4, !tbaa !15
  %64 = icmp slt i32 %63, 2
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !15
  br label %67

67:                                               ; preds = %216, %66
  %68 = load i32, ptr %11, align 4, !tbaa !15
  %69 = icmp slt i32 %68, 8
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %219

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 0
  %74 = load i8, ptr %73, align 1, !tbaa !20
  %75 = zext i8 %74 to i32
  store i32 %75, ptr %12, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 64
  %78 = load i8, ptr %77, align 1, !tbaa !20
  %79 = zext i8 %78 to i32
  store i32 %79, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %80 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 68
  %81 = load i32, ptr %13, align 4, !tbaa !15
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [256 x i32], ptr %80, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !15
  store i32 %84, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %85 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 70
  %86 = load i32, ptr %13, align 4, !tbaa !15
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [256 x i32], ptr %85, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !15
  %90 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 71
  %91 = load i32, ptr %12, align 4, !tbaa !15
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [256 x i32], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !15
  %95 = add nsw i32 %89, %94
  %96 = ashr i32 %95, 16
  store i32 %96, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %97 = getelementptr inbounds %"class.jpgd::jpeg_decoder", ptr %18, i32 0, i32 69
  %98 = load i32, ptr %12, align 4, !tbaa !15
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [256 x i32], ptr %97, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !15
  store i32 %101, ptr %16, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load i32, ptr %11, align 4, !tbaa !15
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !20
  %107 = zext i8 %106 to i32
  store i32 %107, ptr %17, align 4, !tbaa !15
  %108 = load i32, ptr %17, align 4, !tbaa !15
  %109 = load i32, ptr %14, align 4, !tbaa !15
  %110 = add nsw i32 %108, %109
  %111 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %110)
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 0
  store i8 %111, ptr %113, align 1, !tbaa !20
  %114 = load i32, ptr %17, align 4, !tbaa !15
  %115 = load i32, ptr %15, align 4, !tbaa !15
  %116 = add nsw i32 %114, %115
  %117 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %116)
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i64 1
  store i8 %117, ptr %119, align 1, !tbaa !20
  %120 = load i32, ptr %17, align 4, !tbaa !15
  %121 = load i32, ptr %16, align 4, !tbaa !15
  %122 = add nsw i32 %120, %121
  %123 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %122)
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 2
  store i8 %123, ptr %125, align 1, !tbaa !20
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %126, i64 3
  store i8 -1, ptr %127, align 1, !tbaa !20
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load i32, ptr %11, align 4, !tbaa !15
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %128, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !20
  %134 = zext i8 %133 to i32
  store i32 %134, ptr %17, align 4, !tbaa !15
  %135 = load i32, ptr %17, align 4, !tbaa !15
  %136 = load i32, ptr %14, align 4, !tbaa !15
  %137 = add nsw i32 %135, %136
  %138 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %137)
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 4
  store i8 %138, ptr %140, align 1, !tbaa !20
  %141 = load i32, ptr %17, align 4, !tbaa !15
  %142 = load i32, ptr %15, align 4, !tbaa !15
  %143 = add nsw i32 %141, %142
  %144 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %143)
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds i8, ptr %145, i64 5
  store i8 %144, ptr %146, align 1, !tbaa !20
  %147 = load i32, ptr %17, align 4, !tbaa !15
  %148 = load i32, ptr %16, align 4, !tbaa !15
  %149 = add nsw i32 %147, %148
  %150 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %149)
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds i8, ptr %151, i64 6
  store i8 %150, ptr %152, align 1, !tbaa !20
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds i8, ptr %153, i64 7
  store i8 -1, ptr %154, align 1, !tbaa !20
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = load i32, ptr %11, align 4, !tbaa !15
  %157 = add nsw i32 %156, 8
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i8, ptr %155, i64 %158
  %160 = load i8, ptr %159, align 1, !tbaa !20
  %161 = zext i8 %160 to i32
  store i32 %161, ptr %17, align 4, !tbaa !15
  %162 = load i32, ptr %17, align 4, !tbaa !15
  %163 = load i32, ptr %14, align 4, !tbaa !15
  %164 = add nsw i32 %162, %163
  %165 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %164)
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds i8, ptr %166, i64 0
  store i8 %165, ptr %167, align 1, !tbaa !20
  %168 = load i32, ptr %17, align 4, !tbaa !15
  %169 = load i32, ptr %15, align 4, !tbaa !15
  %170 = add nsw i32 %168, %169
  %171 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %170)
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds i8, ptr %172, i64 1
  store i8 %171, ptr %173, align 1, !tbaa !20
  %174 = load i32, ptr %17, align 4, !tbaa !15
  %175 = load i32, ptr %16, align 4, !tbaa !15
  %176 = add nsw i32 %174, %175
  %177 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %176)
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds i8, ptr %178, i64 2
  store i8 %177, ptr %179, align 1, !tbaa !20
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds i8, ptr %180, i64 3
  store i8 -1, ptr %181, align 1, !tbaa !20
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = load i32, ptr %11, align 4, !tbaa !15
  %184 = add nsw i32 %183, 8
  %185 = add nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i8, ptr %182, i64 %186
  %188 = load i8, ptr %187, align 1, !tbaa !20
  %189 = zext i8 %188 to i32
  store i32 %189, ptr %17, align 4, !tbaa !15
  %190 = load i32, ptr %17, align 4, !tbaa !15
  %191 = load i32, ptr %14, align 4, !tbaa !15
  %192 = add nsw i32 %190, %191
  %193 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %192)
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds i8, ptr %194, i64 4
  store i8 %193, ptr %195, align 1, !tbaa !20
  %196 = load i32, ptr %17, align 4, !tbaa !15
  %197 = load i32, ptr %15, align 4, !tbaa !15
  %198 = add nsw i32 %196, %197
  %199 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %198)
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i64 5
  store i8 %199, ptr %201, align 1, !tbaa !20
  %202 = load i32, ptr %17, align 4, !tbaa !15
  %203 = load i32, ptr %16, align 4, !tbaa !15
  %204 = add nsw i32 %202, %203
  %205 = call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %204)
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds i8, ptr %206, i64 6
  store i8 %205, ptr %207, align 1, !tbaa !20
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds i8, ptr %208, i64 7
  store i8 -1, ptr %209, align 1, !tbaa !20
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds i8, ptr %210, i64 8
  store ptr %211, ptr %4, align 8, !tbaa !5
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds i8, ptr %212, i64 8
  store ptr %213, ptr %5, align 8, !tbaa !5
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = getelementptr inbounds i8, ptr %214, i32 1
  store ptr %215, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  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 %216

216:                                              ; preds = %71
  %217 = load i32, ptr %11, align 4, !tbaa !15
  %218 = add nsw i32 %217, 2
  store i32 %218, ptr %11, align 4, !tbaa !15
  br label %67, !llvm.loop !21

219:                                              ; preds = %70
  %220 = load ptr, ptr %6, align 8, !tbaa !5
  %221 = getelementptr inbounds i8, ptr %220, i64 64
  store ptr %221, ptr %6, align 8, !tbaa !5
  br label %222

222:                                              ; preds = %219
  %223 = load i32, ptr %10, align 4, !tbaa !15
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %10, align 4, !tbaa !15
  br label %62, !llvm.loop !23

225:                                              ; preds = %65
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = getelementptr inbounds i8, ptr %226, i64 256
  store ptr %227, ptr %6, align 8, !tbaa !5
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = getelementptr inbounds i8, ptr %228, i64 376
  store ptr %229, ptr %7, align 8, !tbaa !5
  br label %230

230:                                              ; preds = %225
  %231 = load i32, ptr %8, align 4, !tbaa !15
  %232 = add nsw i32 %231, -1
  store i32 %232, ptr %8, align 4, !tbaa !15
  br label %57, !llvm.loop !24

233:                                              ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = !{!10, !11, i64 584}
!10 = !{!"_ZTSN4jpgd12jpeg_decoderE", !7, i64 0, !11, i64 200, !6, i64 208, !11, i64 216, !11, i64 220, !6, i64 224, !11, i64 232, !7, i64 236, !7, i64 248, !7, i64 312, !7, i64 376, !11, i64 408, !11, i64 412, !7, i64 416, !7, i64 432, !7, i64 448, !7, i64 464, !7, i64 480, !7, i64 496, !11, i64 512, !7, i64 516, !7, i64 532, !7, i64 548, !11, i64 564, !11, i64 568, !11, i64 572, !11, i64 576, !11, i64 580, !11, i64 584, !11, i64 588, !11, i64 592, !11, i64 596, !11, i64 600, !7, i64 604, !11, i64 644, !11, i64 648, !11, i64 652, !11, i64 656, !11, i64 660, !11, i64 664, !7, i64 672, !7, i64 736, !7, i64 768, !11, i64 800, !7, i64 804, !6, i64 824, !11, i64 832, !11, i64 836, !7, i64 840, !7, i64 904, !7, i64 9224, !11, i64 9288, !11, i64 9292, !11, i64 9296, !11, i64 9300, !11, i64 9304, !11, i64 9308, !11, i64 9312, !11, i64 9316, !7, i64 9320, !6, i64 9336, !7, i64 9344, !6, i64 9384, !6, i64 9392, !7, i64 9400, !7, i64 10424, !7, i64 11448, !7, i64 12472, !6, i64 13496, !6, i64 13504, !12, i64 13512, !11, i64 13516, !13, i64 13520, !13, i64 13521, !13, i64 13522}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN4jpgd11jpgd_statusE", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!10, !11, i64 648}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !6, i64 13496}
!17 = !{!10, !6, i64 13504}
!18 = !{!10, !6, i64 9384}
!19 = !{!10, !11, i64 9308}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4jpgd12jpeg_decoder11H2V2ConvertEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(13523) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 9308
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.preheader84.lr.ph, label %._crit_edge

.preheader84.lr.ph:                               ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 584
  %6 = load i32, ptr %5, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %0, i64 648
  %8 = load i32, ptr %7, align 8, !tbaa !14
  %9 = sub nsw i32 %6, %8
  %10 = icmp slt i32 %9, 8
  %11 = getelementptr inbounds i8, ptr %0, i64 9384
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = shl nsw i32 %9, 3
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds i8, ptr %12, i64 %14
  %16 = getelementptr inbounds i8, ptr %12, i64 128
  %17 = shl i32 %9, 3
  %18 = and i32 %17, 56
  %19 = zext nneg i32 %18 to i64
  %20 = getelementptr inbounds i8, ptr %16, i64 %19
  %.073 = select i1 %10, ptr %15, ptr %20
  %21 = getelementptr inbounds i8, ptr %0, i64 13504
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %0, i64 13496
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %12, i64 256
  %26 = shl nsw i32 %9, 2
  %27 = and i32 %26, -8
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i8, ptr %25, i64 %28
  %30 = getelementptr inbounds i8, ptr %0, i64 9400
  %31 = getelementptr inbounds i8, ptr %0, i64 11448
  %32 = getelementptr inbounds i8, ptr %0, i64 12472
  %33 = getelementptr inbounds i8, ptr %0, i64 10424
  br label %.preheader84

.preheader84:                                     ; preds = %.preheader84.lr.ph, %307
  %.098 = phi ptr [ %24, %.preheader84.lr.ph ], [ %303, %307 ]
  %.07097 = phi ptr [ %22, %.preheader84.lr.ph ], [ %304, %307 ]
  %.17496 = phi ptr [ %.073, %.preheader84.lr.ph ], [ %308, %307 ]
  %.07695 = phi ptr [ %29, %.preheader84.lr.ph ], [ %309, %307 ]
  %.07994 = phi i32 [ %3, %.preheader84.lr.ph ], [ %310, %307 ]
  br label %.preheader

._crit_edge:                                      ; preds = %307, %1
  ret void

.preheader:                                       ; preds = %.preheader84, %.preheader
  %.193 = phi ptr [ %.098, %.preheader84 ], [ %303, %.preheader ]
  %.17192 = phi ptr [ %.07097, %.preheader84 ], [ %304, %.preheader ]
  %.27591 = phi ptr [ %.17496, %.preheader84 ], [ %306, %.preheader ]
  %.17790 = phi ptr [ %.07695, %.preheader84 ], [ %305, %.preheader ]
  %34 = phi i1 [ true, %.preheader84 ], [ false, %.preheader ]
  %35 = load i8, ptr %.17790, align 1, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %.17790, i64 64
  %37 = load i8, ptr %36, align 1, !tbaa !18
  %38 = zext i8 %37 to i64
  %39 = getelementptr inbounds [256 x i32], ptr %30, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !19
  %41 = getelementptr inbounds [256 x i32], ptr %31, i64 0, i64 %38
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = zext i8 %35 to i64
  %44 = getelementptr inbounds [256 x i32], ptr %32, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !19
  %46 = add nsw i32 %45, %42
  %47 = ashr i32 %46, 16
  %48 = getelementptr inbounds [256 x i32], ptr %33, i64 0, i64 %43
  %49 = load i32, ptr %48, align 4, !tbaa !19
  %50 = load i8, ptr %.27591, align 1, !tbaa !18
  %51 = zext i8 %50 to i32
  %52 = add nsw i32 %40, %51
  %53 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %52)
  store i8 %53, ptr %.193, align 1, !tbaa !18
  %54 = add nsw i32 %47, %51
  %55 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %54)
  %56 = getelementptr inbounds i8, ptr %.193, i64 1
  store i8 %55, ptr %56, align 1, !tbaa !18
  %57 = add nsw i32 %49, %51
  %58 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %57)
  %59 = getelementptr inbounds i8, ptr %.193, i64 2
  store i8 %58, ptr %59, align 1, !tbaa !18
  %60 = getelementptr inbounds i8, ptr %.193, i64 3
  store i8 -1, ptr %60, align 1, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %.27591, i64 1
  %62 = load i8, ptr %61, align 1, !tbaa !18
  %63 = zext i8 %62 to i32
  %64 = add nsw i32 %40, %63
  %65 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %64)
  %66 = getelementptr inbounds i8, ptr %.193, i64 4
  store i8 %65, ptr %66, align 1, !tbaa !18
  %67 = add nsw i32 %47, %63
  %68 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %67)
  %69 = getelementptr inbounds i8, ptr %.193, i64 5
  store i8 %68, ptr %69, align 1, !tbaa !18
  %70 = add nsw i32 %49, %63
  %71 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %70)
  %72 = getelementptr inbounds i8, ptr %.193, i64 6
  store i8 %71, ptr %72, align 1, !tbaa !18
  %73 = getelementptr inbounds i8, ptr %.193, i64 7
  store i8 -1, ptr %73, align 1, !tbaa !18
  %74 = getelementptr inbounds i8, ptr %.27591, i64 8
  %75 = load i8, ptr %74, align 1, !tbaa !18
  %76 = zext i8 %75 to i32
  %77 = add nsw i32 %40, %76
  %78 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %77)
  store i8 %78, ptr %.17192, align 1, !tbaa !18
  %79 = add nsw i32 %47, %76
  %80 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %79)
  %81 = getelementptr inbounds i8, ptr %.17192, i64 1
  store i8 %80, ptr %81, align 1, !tbaa !18
  %82 = add nsw i32 %49, %76
  %83 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %82)
  %84 = getelementptr inbounds i8, ptr %.17192, i64 2
  store i8 %83, ptr %84, align 1, !tbaa !18
  %85 = getelementptr inbounds i8, ptr %.17192, i64 3
  store i8 -1, ptr %85, align 1, !tbaa !18
  %86 = getelementptr inbounds i8, ptr %.27591, i64 9
  %87 = load i8, ptr %86, align 1, !tbaa !18
  %88 = zext i8 %87 to i32
  %89 = add nsw i32 %40, %88
  %90 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %89)
  %91 = getelementptr inbounds i8, ptr %.17192, i64 4
  store i8 %90, ptr %91, align 1, !tbaa !18
  %92 = add nsw i32 %47, %88
  %93 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %92)
  %94 = getelementptr inbounds i8, ptr %.17192, i64 5
  store i8 %93, ptr %94, align 1, !tbaa !18
  %95 = add nsw i32 %49, %88
  %96 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %95)
  %97 = getelementptr inbounds i8, ptr %.17192, i64 6
  store i8 %96, ptr %97, align 1, !tbaa !18
  %98 = getelementptr inbounds i8, ptr %.17192, i64 7
  store i8 -1, ptr %98, align 1, !tbaa !18
  %99 = getelementptr inbounds i8, ptr %.193, i64 8
  %100 = getelementptr inbounds i8, ptr %.17192, i64 8
  %101 = getelementptr inbounds i8, ptr %.17790, i64 1
  %102 = load i8, ptr %101, align 1, !tbaa !18
  %103 = getelementptr inbounds i8, ptr %.17790, i64 65
  %104 = load i8, ptr %103, align 1, !tbaa !18
  %105 = zext i8 %104 to i64
  %106 = getelementptr inbounds [256 x i32], ptr %30, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !19
  %108 = getelementptr inbounds [256 x i32], ptr %31, i64 0, i64 %105
  %109 = load i32, ptr %108, align 4, !tbaa !19
  %110 = zext i8 %102 to i64
  %111 = getelementptr inbounds [256 x i32], ptr %32, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !19
  %113 = add nsw i32 %112, %109
  %114 = ashr i32 %113, 16
  %115 = getelementptr inbounds [256 x i32], ptr %33, i64 0, i64 %110
  %116 = load i32, ptr %115, align 4, !tbaa !19
  %117 = getelementptr inbounds i8, ptr %.27591, i64 2
  %118 = load i8, ptr %117, align 1, !tbaa !18
  %119 = zext i8 %118 to i32
  %120 = add nsw i32 %107, %119
  %121 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %120)
  store i8 %121, ptr %99, align 1, !tbaa !18
  %122 = add nsw i32 %114, %119
  %123 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %122)
  %124 = getelementptr inbounds i8, ptr %.193, i64 9
  store i8 %123, ptr %124, align 1, !tbaa !18
  %125 = add nsw i32 %116, %119
  %126 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %125)
  %127 = getelementptr inbounds i8, ptr %.193, i64 10
  store i8 %126, ptr %127, align 1, !tbaa !18
  %128 = getelementptr inbounds i8, ptr %.193, i64 11
  store i8 -1, ptr %128, align 1, !tbaa !18
  %129 = getelementptr inbounds i8, ptr %.27591, i64 3
  %130 = load i8, ptr %129, align 1, !tbaa !18
  %131 = zext i8 %130 to i32
  %132 = add nsw i32 %107, %131
  %133 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %132)
  %134 = getelementptr inbounds i8, ptr %.193, i64 12
  store i8 %133, ptr %134, align 1, !tbaa !18
  %135 = add nsw i32 %114, %131
  %136 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %135)
  %137 = getelementptr inbounds i8, ptr %.193, i64 13
  store i8 %136, ptr %137, align 1, !tbaa !18
  %138 = add nsw i32 %116, %131
  %139 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %138)
  %140 = getelementptr inbounds i8, ptr %.193, i64 14
  store i8 %139, ptr %140, align 1, !tbaa !18
  %141 = getelementptr inbounds i8, ptr %.193, i64 15
  store i8 -1, ptr %141, align 1, !tbaa !18
  %142 = getelementptr inbounds i8, ptr %.27591, i64 10
  %143 = load i8, ptr %142, align 1, !tbaa !18
  %144 = zext i8 %143 to i32
  %145 = add nsw i32 %107, %144
  %146 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %145)
  store i8 %146, ptr %100, align 1, !tbaa !18
  %147 = add nsw i32 %114, %144
  %148 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %147)
  %149 = getelementptr inbounds i8, ptr %.17192, i64 9
  store i8 %148, ptr %149, align 1, !tbaa !18
  %150 = add nsw i32 %116, %144
  %151 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %150)
  %152 = getelementptr inbounds i8, ptr %.17192, i64 10
  store i8 %151, ptr %152, align 1, !tbaa !18
  %153 = getelementptr inbounds i8, ptr %.17192, i64 11
  store i8 -1, ptr %153, align 1, !tbaa !18
  %154 = getelementptr inbounds i8, ptr %.27591, i64 11
  %155 = load i8, ptr %154, align 1, !tbaa !18
  %156 = zext i8 %155 to i32
  %157 = add nsw i32 %107, %156
  %158 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %157)
  %159 = getelementptr inbounds i8, ptr %.17192, i64 12
  store i8 %158, ptr %159, align 1, !tbaa !18
  %160 = add nsw i32 %114, %156
  %161 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %160)
  %162 = getelementptr inbounds i8, ptr %.17192, i64 13
  store i8 %161, ptr %162, align 1, !tbaa !18
  %163 = add nsw i32 %116, %156
  %164 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %163)
  %165 = getelementptr inbounds i8, ptr %.17192, i64 14
  store i8 %164, ptr %165, align 1, !tbaa !18
  %166 = getelementptr inbounds i8, ptr %.17192, i64 15
  store i8 -1, ptr %166, align 1, !tbaa !18
  %167 = getelementptr inbounds i8, ptr %.193, i64 16
  %168 = getelementptr inbounds i8, ptr %.17192, i64 16
  %169 = getelementptr inbounds i8, ptr %.17790, i64 2
  %170 = load i8, ptr %169, align 1, !tbaa !18
  %171 = getelementptr inbounds i8, ptr %.17790, i64 66
  %172 = load i8, ptr %171, align 1, !tbaa !18
  %173 = zext i8 %172 to i64
  %174 = getelementptr inbounds [256 x i32], ptr %30, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !19
  %176 = getelementptr inbounds [256 x i32], ptr %31, i64 0, i64 %173
  %177 = load i32, ptr %176, align 4, !tbaa !19
  %178 = zext i8 %170 to i64
  %179 = getelementptr inbounds [256 x i32], ptr %32, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !19
  %181 = add nsw i32 %180, %177
  %182 = ashr i32 %181, 16
  %183 = getelementptr inbounds [256 x i32], ptr %33, i64 0, i64 %178
  %184 = load i32, ptr %183, align 4, !tbaa !19
  %185 = getelementptr inbounds i8, ptr %.27591, i64 4
  %186 = load i8, ptr %185, align 1, !tbaa !18
  %187 = zext i8 %186 to i32
  %188 = add nsw i32 %175, %187
  %189 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %188)
  store i8 %189, ptr %167, align 1, !tbaa !18
  %190 = add nsw i32 %182, %187
  %191 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %190)
  %192 = getelementptr inbounds i8, ptr %.193, i64 17
  store i8 %191, ptr %192, align 1, !tbaa !18
  %193 = add nsw i32 %184, %187
  %194 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %193)
  %195 = getelementptr inbounds i8, ptr %.193, i64 18
  store i8 %194, ptr %195, align 1, !tbaa !18
  %196 = getelementptr inbounds i8, ptr %.193, i64 19
  store i8 -1, ptr %196, align 1, !tbaa !18
  %197 = getelementptr inbounds i8, ptr %.27591, i64 5
  %198 = load i8, ptr %197, align 1, !tbaa !18
  %199 = zext i8 %198 to i32
  %200 = add nsw i32 %175, %199
  %201 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %200)
  %202 = getelementptr inbounds i8, ptr %.193, i64 20
  store i8 %201, ptr %202, align 1, !tbaa !18
  %203 = add nsw i32 %182, %199
  %204 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %203)
  %205 = getelementptr inbounds i8, ptr %.193, i64 21
  store i8 %204, ptr %205, align 1, !tbaa !18
  %206 = add nsw i32 %184, %199
  %207 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %206)
  %208 = getelementptr inbounds i8, ptr %.193, i64 22
  store i8 %207, ptr %208, align 1, !tbaa !18
  %209 = getelementptr inbounds i8, ptr %.193, i64 23
  store i8 -1, ptr %209, align 1, !tbaa !18
  %210 = getelementptr inbounds i8, ptr %.27591, i64 12
  %211 = load i8, ptr %210, align 1, !tbaa !18
  %212 = zext i8 %211 to i32
  %213 = add nsw i32 %175, %212
  %214 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %213)
  store i8 %214, ptr %168, align 1, !tbaa !18
  %215 = add nsw i32 %182, %212
  %216 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %215)
  %217 = getelementptr inbounds i8, ptr %.17192, i64 17
  store i8 %216, ptr %217, align 1, !tbaa !18
  %218 = add nsw i32 %184, %212
  %219 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %218)
  %220 = getelementptr inbounds i8, ptr %.17192, i64 18
  store i8 %219, ptr %220, align 1, !tbaa !18
  %221 = getelementptr inbounds i8, ptr %.17192, i64 19
  store i8 -1, ptr %221, align 1, !tbaa !18
  %222 = getelementptr inbounds i8, ptr %.27591, i64 13
  %223 = load i8, ptr %222, align 1, !tbaa !18
  %224 = zext i8 %223 to i32
  %225 = add nsw i32 %175, %224
  %226 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %225)
  %227 = getelementptr inbounds i8, ptr %.17192, i64 20
  store i8 %226, ptr %227, align 1, !tbaa !18
  %228 = add nsw i32 %182, %224
  %229 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %228)
  %230 = getelementptr inbounds i8, ptr %.17192, i64 21
  store i8 %229, ptr %230, align 1, !tbaa !18
  %231 = add nsw i32 %184, %224
  %232 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %231)
  %233 = getelementptr inbounds i8, ptr %.17192, i64 22
  store i8 %232, ptr %233, align 1, !tbaa !18
  %234 = getelementptr inbounds i8, ptr %.17192, i64 23
  store i8 -1, ptr %234, align 1, !tbaa !18
  %235 = getelementptr inbounds i8, ptr %.193, i64 24
  %236 = getelementptr inbounds i8, ptr %.17192, i64 24
  %237 = getelementptr inbounds i8, ptr %.17790, i64 3
  %238 = load i8, ptr %237, align 1, !tbaa !18
  %239 = getelementptr inbounds i8, ptr %.17790, i64 67
  %240 = load i8, ptr %239, align 1, !tbaa !18
  %241 = zext i8 %240 to i64
  %242 = getelementptr inbounds [256 x i32], ptr %30, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !19
  %244 = getelementptr inbounds [256 x i32], ptr %31, i64 0, i64 %241
  %245 = load i32, ptr %244, align 4, !tbaa !19
  %246 = zext i8 %238 to i64
  %247 = getelementptr inbounds [256 x i32], ptr %32, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !19
  %249 = add nsw i32 %248, %245
  %250 = ashr i32 %249, 16
  %251 = getelementptr inbounds [256 x i32], ptr %33, i64 0, i64 %246
  %252 = load i32, ptr %251, align 4, !tbaa !19
  %253 = getelementptr inbounds i8, ptr %.27591, i64 6
  %254 = load i8, ptr %253, align 1, !tbaa !18
  %255 = zext i8 %254 to i32
  %256 = add nsw i32 %243, %255
  %257 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %256)
  store i8 %257, ptr %235, align 1, !tbaa !18
  %258 = add nsw i32 %250, %255
  %259 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %258)
  %260 = getelementptr inbounds i8, ptr %.193, i64 25
  store i8 %259, ptr %260, align 1, !tbaa !18
  %261 = add nsw i32 %252, %255
  %262 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %261)
  %263 = getelementptr inbounds i8, ptr %.193, i64 26
  store i8 %262, ptr %263, align 1, !tbaa !18
  %264 = getelementptr inbounds i8, ptr %.193, i64 27
  store i8 -1, ptr %264, align 1, !tbaa !18
  %265 = getelementptr inbounds i8, ptr %.27591, i64 7
  %266 = load i8, ptr %265, align 1, !tbaa !18
  %267 = zext i8 %266 to i32
  %268 = add nsw i32 %243, %267
  %269 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %268)
  %270 = getelementptr inbounds i8, ptr %.193, i64 28
  store i8 %269, ptr %270, align 1, !tbaa !18
  %271 = add nsw i32 %250, %267
  %272 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %271)
  %273 = getelementptr inbounds i8, ptr %.193, i64 29
  store i8 %272, ptr %273, align 1, !tbaa !18
  %274 = add nsw i32 %252, %267
  %275 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %274)
  %276 = getelementptr inbounds i8, ptr %.193, i64 30
  store i8 %275, ptr %276, align 1, !tbaa !18
  %277 = getelementptr inbounds i8, ptr %.193, i64 31
  store i8 -1, ptr %277, align 1, !tbaa !18
  %278 = getelementptr inbounds i8, ptr %.27591, i64 14
  %279 = load i8, ptr %278, align 1, !tbaa !18
  %280 = zext i8 %279 to i32
  %281 = add nsw i32 %243, %280
  %282 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %281)
  store i8 %282, ptr %236, align 1, !tbaa !18
  %283 = add nsw i32 %250, %280
  %284 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %283)
  %285 = getelementptr inbounds i8, ptr %.17192, i64 25
  store i8 %284, ptr %285, align 1, !tbaa !18
  %286 = add nsw i32 %252, %280
  %287 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %286)
  %288 = getelementptr inbounds i8, ptr %.17192, i64 26
  store i8 %287, ptr %288, align 1, !tbaa !18
  %289 = getelementptr inbounds i8, ptr %.17192, i64 27
  store i8 -1, ptr %289, align 1, !tbaa !18
  %290 = getelementptr inbounds i8, ptr %.27591, i64 15
  %291 = load i8, ptr %290, align 1, !tbaa !18
  %292 = zext i8 %291 to i32
  %293 = add nsw i32 %243, %292
  %294 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %293)
  %295 = getelementptr inbounds i8, ptr %.17192, i64 28
  store i8 %294, ptr %295, align 1, !tbaa !18
  %296 = add nsw i32 %250, %292
  %297 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %296)
  %298 = getelementptr inbounds i8, ptr %.17192, i64 29
  store i8 %297, ptr %298, align 1, !tbaa !18
  %299 = add nsw i32 %252, %292
  %300 = tail call noundef zeroext i8 @_ZN4jpgd12jpeg_decoder5clampEi(i32 noundef %299)
  %301 = getelementptr inbounds i8, ptr %.17192, i64 30
  store i8 %300, ptr %301, align 1, !tbaa !18
  %302 = getelementptr inbounds i8, ptr %.17192, i64 31
  store i8 -1, ptr %302, align 1, !tbaa !18
  %303 = getelementptr inbounds i8, ptr %.193, i64 32
  %304 = getelementptr inbounds i8, ptr %.17192, i64 32
  %305 = getelementptr inbounds i8, ptr %.17790, i64 4
  %306 = getelementptr inbounds i8, ptr %.27591, i64 64
  br i1 %34, label %.preheader, label %307, !llvm.loop !20

307:                                              ; preds = %.preheader
  %308 = getelementptr inbounds i8, ptr %.27591, i64 320
  %309 = getelementptr inbounds i8, ptr %.17790, i64 380
  %310 = add nsw i32 %.07994, -1
  %311 = icmp sgt i32 %.07994, 1
  br i1 %311, label %.preheader84, label %._crit_edge, !llvm.loop !22
}

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

!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, !9, i64 9308}
!6 = !{!"_ZTSN4jpgd12jpeg_decoderE", !7, i64 0, !9, i64 200, !10, i64 208, !9, i64 216, !9, i64 220, !10, i64 224, !9, i64 232, !7, i64 236, !7, i64 248, !7, i64 312, !7, i64 376, !9, i64 408, !9, i64 412, !7, i64 416, !7, i64 432, !7, i64 448, !7, i64 464, !7, i64 480, !7, i64 496, !9, i64 512, !7, i64 516, !7, i64 532, !7, i64 548, !9, i64 564, !9, i64 568, !9, i64 572, !9, i64 576, !9, i64 580, !9, i64 584, !9, i64 588, !9, i64 592, !9, i64 596, !9, i64 600, !7, i64 604, !9, i64 644, !9, i64 648, !9, i64 652, !9, i64 656, !9, i64 660, !9, i64 664, !7, i64 672, !7, i64 736, !7, i64 768, !9, i64 800, !7, i64 804, !10, i64 824, !9, i64 832, !9, i64 836, !7, i64 840, !7, i64 904, !7, i64 9224, !9, i64 9288, !9, i64 9292, !9, i64 9296, !9, i64 9300, !9, i64 9304, !9, i64 9308, !9, i64 9312, !9, i64 9316, !7, i64 9320, !10, i64 9336, !7, i64 9344, !10, i64 9384, !10, i64 9392, !7, i64 9400, !7, i64 10424, !7, i64 11448, !7, i64 12472, !10, i64 13496, !10, i64 13504, !11, i64 13512, !9, i64 13516, !12, i64 13520, !12, i64 13521, !12, i64 13522}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"_ZTSN4jpgd11jpgd_statusE", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!6, !9, i64 584}
!14 = !{!6, !9, i64 648}
!15 = !{!6, !10, i64 9384}
!16 = !{!6, !10, i64 13504}
!17 = !{!6, !10, i64 13496}
!18 = !{!7, !7, i64 0}
!19 = !{!9, !9, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


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