; LLVM IR from balintbalazs/B3D :: source/src/B3D_cudaCompress/B3D (B3DcompressFunctions)

; 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.cudaCompress::BitStream" = type <{ %"class.cudaCompress::BitStreamReadOnly.base", [4 x i8], ptr, i8, [7 x i8] }>
%"class.cudaCompress::BitStreamReadOnly.base" = type <{ ptr, ptr, i32, i32, i32 }>

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [107 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #0 align 2

declare void @_ZN12cudaCompress4util16predictor7_tilesEPKsPsiiii(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) #0

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

declare void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12cudaCompress9BitStreamC2EPSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef) unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN12cudaCompress12encodeRLHuffEPNS_8InstanceERNS_9BitStreamEPKPKtjj(ptr noundef, ptr noundef nonnull align 8 dereferenceable(41), ptr noundef, i32 noundef, i32 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12cudaCompress13compressImageEPNS_8InstanceERSt6vectorIjSaIjEEPsPfS7_Ptiiimffiff(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i64 noundef %9, float noundef %10, float noundef %11, i32 noundef %12, float noundef %13, float noundef %14) #4 personality ptr @__gxx_personality_v0 {
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca i32, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca [1 x ptr], align 8
  %32 = alloca %"class.cudaCompress::BitStream", align 8
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.cudaCompress::BitStream", align 8
  store ptr %0, ptr %16, align 8, !tbaa !5
  store ptr %1, ptr %17, align 8, !tbaa !5
  store ptr %2, ptr %18, align 8, !tbaa !5
  store ptr %3, ptr %19, align 8, !tbaa !5
  store ptr %4, ptr %20, align 8, !tbaa !5
  store ptr %5, ptr %21, align 8, !tbaa !5
  store i32 %6, ptr %22, align 4, !tbaa !9
  store i32 %7, ptr %23, align 4, !tbaa !9
  store i32 %8, ptr %24, align 4, !tbaa !9
  store i64 %9, ptr %25, align 8, !tbaa !11
  store float %10, ptr %26, align 4, !tbaa !13
  store float %11, ptr %27, align 4, !tbaa !13
  store i32 %12, ptr %28, align 4, !tbaa !9
  store float %13, ptr %29, align 4, !tbaa !13
  store float %14, ptr %30, align 4, !tbaa !13
  %37 = load i32, ptr %23, align 4, !tbaa !9
  %38 = load i32, ptr %24, align 4, !tbaa !9
  %39 = mul nsw i32 %37, %38
  store i32 %39, ptr %23, align 4, !tbaa !9
  store i32 1, ptr %24, align 4, !tbaa !9
  %40 = load i64, ptr %25, align 8, !tbaa !11
  %41 = icmp ugt i64 %40, 0
  br i1 %41, label %42, label %305

42:                                               ; preds = %15
  %43 = load i64, ptr %25, align 8, !tbaa !11
  %44 = icmp ult i64 %43, 100
  br i1 %44, label %45, label %305

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %46 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %46, ptr %31, align 8, !tbaa !5
  %47 = load i64, ptr %25, align 8, !tbaa !11
  switch i64 %47, label %291 [
    i64 1, label %48
    i64 3, label %48
    i64 11, label %48
    i64 2, label %81
    i64 7, label %121
    i64 17, label %165
    i64 27, label %209
    i64 37, label %246
  ]

48:                                               ; preds = %45, %45, %45
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = load ptr, ptr %19, align 8, !tbaa !5
  %51 = load i32, ptr %22, align 4, !tbaa !9
  %52 = load i32, ptr %23, align 4, !tbaa !9
  %53 = mul nsw i32 %51, %52
  call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %49, ptr noundef %50, i32 noundef %53)
  %54 = load ptr, ptr %19, align 8, !tbaa !5
  %55 = load ptr, ptr %19, align 8, !tbaa !5
  %56 = load i32, ptr %22, align 4, !tbaa !9
  %57 = load i32, ptr %23, align 4, !tbaa !9
  %58 = mul nsw i32 %56, %57
  %59 = load float, ptr %27, align 4, !tbaa !13
  %60 = load float, ptr %29, align 4, !tbaa !13
  %61 = load float, ptr %30, align 4, !tbaa !13
  call void @_ZN12cudaCompress4util3vstEPfS1_ifff(ptr noundef %54, ptr noundef %55, i32 noundef %58, float noundef %59, float noundef %60, float noundef %61)
  %62 = load ptr, ptr %19, align 8, !tbaa !5
  %63 = load ptr, ptr %19, align 8, !tbaa !5
  %64 = load float, ptr %26, align 4, !tbaa !13
  %65 = fdiv float 1.000000e+00, %64
  %66 = load i32, ptr %22, align 4, !tbaa !9
  %67 = load i32, ptr %23, align 4, !tbaa !9
  %68 = mul nsw i32 %66, %67
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %62, ptr noundef %63, float noundef %65, i32 noundef %68)
  %69 = load ptr, ptr %19, align 8, !tbaa !5
  %70 = load ptr, ptr %20, align 8, !tbaa !5
  %71 = load ptr, ptr %18, align 8, !tbaa !5
  %72 = load i32, ptr %22, align 4, !tbaa !9
  %73 = load i32, ptr %22, align 4, !tbaa !9
  %74 = load i32, ptr %23, align 4, !tbaa !9
  %75 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef %69, ptr noundef %70, ptr noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74, i32 noundef %75)
  %76 = load ptr, ptr %21, align 8, !tbaa !5
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  %78 = load i32, ptr %22, align 4, !tbaa !9
  %79 = load i32, ptr %23, align 4, !tbaa !9
  %80 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %76, ptr noundef %77, i32 noundef %78, i32 noundef %79, i32 noundef %80, i32 noundef 0, i32 noundef 0)
  br label %292

81:                                               ; preds = %45
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = load i32, ptr %22, align 4, !tbaa !9
  %85 = load i32, ptr %23, align 4, !tbaa !9
  %86 = mul nsw i32 %84, %85
  call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %82, ptr noundef %83, i32 noundef %86)
  %87 = load ptr, ptr %19, align 8, !tbaa !5
  %88 = load ptr, ptr %19, align 8, !tbaa !5
  %89 = load i32, ptr %22, align 4, !tbaa !9
  %90 = load i32, ptr %23, align 4, !tbaa !9
  %91 = mul nsw i32 %89, %90
  %92 = load float, ptr %27, align 4, !tbaa !13
  %93 = load float, ptr %29, align 4, !tbaa !13
  %94 = load float, ptr %30, align 4, !tbaa !13
  call void @_ZN12cudaCompress4util3vstEPfS1_ifff(ptr noundef %87, ptr noundef %88, i32 noundef %91, float noundef %92, float noundef %93, float noundef %94)
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = load ptr, ptr %19, align 8, !tbaa !5
  %97 = load float, ptr %26, align 4, !tbaa !13
  %98 = fdiv float 1.000000e+00, %97
  %99 = load i32, ptr %22, align 4, !tbaa !9
  %100 = load i32, ptr %23, align 4, !tbaa !9
  %101 = mul nsw i32 %99, %100
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %95, ptr noundef %96, float noundef %98, i32 noundef %101)
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load i32, ptr %22, align 4, !tbaa !9
  %105 = load i32, ptr %23, align 4, !tbaa !9
  %106 = mul nsw i32 %104, %105
  call void @_ZN12cudaCompress4util3f2uEPfPti(ptr noundef %102, ptr noundef %103, i32 noundef %106)
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = load ptr, ptr %18, align 8, !tbaa !5
  %109 = load i32, ptr %22, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = mul i64 %110, 2
  %112 = trunc i64 %111 to i32
  %113 = load i32, ptr %22, align 4, !tbaa !9
  %114 = load i32, ptr %23, align 4, !tbaa !9
  %115 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util16predictor7_tilesEPKsPsiiii(ptr noundef %107, ptr noundef %108, i32 noundef %112, i32 noundef %113, i32 noundef %114, i32 noundef %115)
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  %117 = load ptr, ptr %18, align 8, !tbaa !5
  %118 = load i32, ptr %22, align 4, !tbaa !9
  %119 = load i32, ptr %23, align 4, !tbaa !9
  %120 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %116, ptr noundef %117, i32 noundef %118, i32 noundef %119, i32 noundef %120, i32 noundef 0, i32 noundef 0)
  br label %292

121:                                              ; preds = %45
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  %123 = load ptr, ptr %19, align 8, !tbaa !5
  %124 = load i32, ptr %22, align 4, !tbaa !9
  %125 = load i32, ptr %23, align 4, !tbaa !9
  %126 = mul nsw i32 %124, %125
  call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %122, ptr noundef %123, i32 noundef %126)
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = load float, ptr %27, align 4, !tbaa !13
  %130 = fneg float %129
  %131 = load i32, ptr %22, align 4, !tbaa !9
  %132 = load i32, ptr %23, align 4, !tbaa !9
  %133 = mul nsw i32 %131, %132
  call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %127, ptr noundef %128, float noundef %130, i32 noundef %133)
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = load ptr, ptr %19, align 8, !tbaa !5
  %136 = load float, ptr %29, align 4, !tbaa !13
  %137 = fdiv float 1.000000e+00, %136
  %138 = load i32, ptr %22, align 4, !tbaa !9
  %139 = load i32, ptr %23, align 4, !tbaa !9
  %140 = mul nsw i32 %138, %139
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %134, ptr noundef %135, float noundef %137, i32 noundef %140)
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = load i32, ptr %22, align 4, !tbaa !9
  %144 = load i32, ptr %23, align 4, !tbaa !9
  %145 = mul nsw i32 %143, %144
  call void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef %141, ptr noundef %142, i32 noundef %145)
  %146 = load ptr, ptr %19, align 8, !tbaa !5
  %147 = load ptr, ptr %19, align 8, !tbaa !5
  %148 = load float, ptr %26, align 4, !tbaa !13
  %149 = fdiv float 1.000000e+00, %148
  %150 = load i32, ptr %22, align 4, !tbaa !9
  %151 = load i32, ptr %23, align 4, !tbaa !9
  %152 = mul nsw i32 %150, %151
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %146, ptr noundef %147, float noundef %149, i32 noundef %152)
  %153 = load ptr, ptr %19, align 8, !tbaa !5
  %154 = load ptr, ptr %20, align 8, !tbaa !5
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = load i32, ptr %22, align 4, !tbaa !9
  %157 = load i32, ptr %22, align 4, !tbaa !9
  %158 = load i32, ptr %23, align 4, !tbaa !9
  %159 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef %153, ptr noundef %154, ptr noundef %155, i32 noundef %156, i32 noundef %157, i32 noundef %158, i32 noundef %159)
  %160 = load ptr, ptr %21, align 8, !tbaa !5
  %161 = load ptr, ptr %18, align 8, !tbaa !5
  %162 = load i32, ptr %22, align 4, !tbaa !9
  %163 = load i32, ptr %23, align 4, !tbaa !9
  %164 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %160, ptr noundef %161, i32 noundef %162, i32 noundef %163, i32 noundef %164, i32 noundef 0, i32 noundef 0)
  br label %292

165:                                              ; preds = %45
  %166 = load ptr, ptr %18, align 8, !tbaa !5
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = load i32, ptr %22, align 4, !tbaa !9
  %169 = load i32, ptr %23, align 4, !tbaa !9
  %170 = mul nsw i32 %168, %169
  call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %166, ptr noundef %167, i32 noundef %170)
  %171 = load ptr, ptr %19, align 8, !tbaa !5
  %172 = load ptr, ptr %19, align 8, !tbaa !5
  %173 = load float, ptr %27, align 4, !tbaa !13
  %174 = fneg float %173
  %175 = load i32, ptr %22, align 4, !tbaa !9
  %176 = load i32, ptr %23, align 4, !tbaa !9
  %177 = mul nsw i32 %175, %176
  call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %171, ptr noundef %172, float noundef %174, i32 noundef %177)
  %178 = load ptr, ptr %19, align 8, !tbaa !5
  %179 = load ptr, ptr %19, align 8, !tbaa !5
  %180 = load i32, ptr %22, align 4, !tbaa !9
  %181 = load i32, ptr %23, align 4, !tbaa !9
  %182 = mul nsw i32 %180, %181
  call void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef %178, ptr noundef %179, i32 noundef %182)
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = load ptr, ptr %19, align 8, !tbaa !5
  %185 = load float, ptr %26, align 4, !tbaa !13
  %186 = fdiv float 1.000000e+00, %185
  %187 = load i32, ptr %22, align 4, !tbaa !9
  %188 = load i32, ptr %23, align 4, !tbaa !9
  %189 = mul nsw i32 %187, %188
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %183, ptr noundef %184, float noundef %186, i32 noundef %189)
  %190 = load ptr, ptr %19, align 8, !tbaa !5
  %191 = load ptr, ptr %20, align 8, !tbaa !5
  %192 = load i32, ptr %22, align 4, !tbaa !9
  %193 = load i32, ptr %23, align 4, !tbaa !9
  %194 = mul nsw i32 %192, %193
  call void @_ZN12cudaCompress4util3f2uEPfPti(ptr noundef %190, ptr noundef %191, i32 noundef %194)
  %195 = load ptr, ptr %20, align 8, !tbaa !5
  %196 = load ptr, ptr %18, align 8, !tbaa !5
  %197 = load i32, ptr %22, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = mul i64 %198, 2
  %200 = trunc i64 %199 to i32
  %201 = load i32, ptr %22, align 4, !tbaa !9
  %202 = load i32, ptr %23, align 4, !tbaa !9
  %203 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util16predictor7_tilesEPKsPsiiii(ptr noundef %195, ptr noundef %196, i32 noundef %200, i32 noundef %201, i32 noundef %202, i32 noundef %203)
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  %205 = load ptr, ptr %18, align 8, !tbaa !5
  %206 = load i32, ptr %22, align 4, !tbaa !9
  %207 = load i32, ptr %23, align 4, !tbaa !9
  %208 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %204, ptr noundef %205, i32 noundef %206, i32 noundef %207, i32 noundef %208, i32 noundef 0, i32 noundef 0)
  br label %292

209:                                              ; preds = %45
  %210 = load ptr, ptr %18, align 8, !tbaa !5
  %211 = load ptr, ptr %19, align 8, !tbaa !5
  %212 = load i32, ptr %22, align 4, !tbaa !9
  %213 = load i32, ptr %23, align 4, !tbaa !9
  %214 = mul nsw i32 %212, %213
  call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %210, ptr noundef %211, i32 noundef %214)
  %215 = load ptr, ptr %19, align 8, !tbaa !5
  %216 = load ptr, ptr %19, align 8, !tbaa !5
  %217 = load float, ptr %27, align 4, !tbaa !13
  %218 = fneg float %217
  %219 = load i32, ptr %22, align 4, !tbaa !9
  %220 = load i32, ptr %23, align 4, !tbaa !9
  %221 = mul nsw i32 %219, %220
  call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %215, ptr noundef %216, float noundef %218, i32 noundef %221)
  %222 = load ptr, ptr %19, align 8, !tbaa !5
  %223 = load ptr, ptr %19, align 8, !tbaa !5
  %224 = load i32, ptr %22, align 4, !tbaa !9
  %225 = load i32, ptr %23, align 4, !tbaa !9
  %226 = mul nsw i32 %224, %225
  call void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef %222, ptr noundef %223, i32 noundef %226)
  %227 = load ptr, ptr %19, align 8, !tbaa !5
  %228 = load ptr, ptr %19, align 8, !tbaa !5
  %229 = load float, ptr %26, align 4, !tbaa !13
  %230 = fdiv float 1.000000e+00, %229
  %231 = load i32, ptr %22, align 4, !tbaa !9
  %232 = load i32, ptr %23, align 4, !tbaa !9
  %233 = mul nsw i32 %231, %232
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %227, ptr noundef %228, float noundef %230, i32 noundef %233)
  %234 = load ptr, ptr %19, align 8, !tbaa !5
  %235 = load ptr, ptr %20, align 8, !tbaa !5
  %236 = load ptr, ptr %18, align 8, !tbaa !5
  %237 = load i32, ptr %22, align 4, !tbaa !9
  %238 = load i32, ptr %22, align 4, !tbaa !9
  %239 = load i32, ptr %23, align 4, !tbaa !9
  %240 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util22predictor7_tiles_wnll2EPKfPfPsiiii(ptr noundef %234, ptr noundef %235, ptr noundef %236, i32 noundef %237, i32 noundef %238, i32 noundef %239, i32 noundef %240)
  %241 = load ptr, ptr %21, align 8, !tbaa !5
  %242 = load ptr, ptr %18, align 8, !tbaa !5
  %243 = load i32, ptr %22, align 4, !tbaa !9
  %244 = load i32, ptr %23, align 4, !tbaa !9
  %245 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %241, ptr noundef %242, i32 noundef %243, i32 noundef %244, i32 noundef %245, i32 noundef 0, i32 noundef 0)
  br label %292

246:                                              ; preds = %45
  %247 = load ptr, ptr %18, align 8, !tbaa !5
  %248 = load ptr, ptr %19, align 8, !tbaa !5
  %249 = load i32, ptr %22, align 4, !tbaa !9
  %250 = load i32, ptr %23, align 4, !tbaa !9
  %251 = mul nsw i32 %249, %250
  call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %247, ptr noundef %248, i32 noundef %251)
  %252 = load ptr, ptr %19, align 8, !tbaa !5
  %253 = load ptr, ptr %19, align 8, !tbaa !5
  %254 = load float, ptr %27, align 4, !tbaa !13
  %255 = fneg float %254
  %256 = load i32, ptr %22, align 4, !tbaa !9
  %257 = load i32, ptr %23, align 4, !tbaa !9
  %258 = mul nsw i32 %256, %257
  call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %252, ptr noundef %253, float noundef %255, i32 noundef %258)
  %259 = load ptr, ptr %19, align 8, !tbaa !5
  %260 = load ptr, ptr %19, align 8, !tbaa !5
  %261 = load float, ptr %29, align 4, !tbaa !13
  %262 = fdiv float 1.000000e+00, %261
  %263 = load i32, ptr %22, align 4, !tbaa !9
  %264 = load i32, ptr %23, align 4, !tbaa !9
  %265 = mul nsw i32 %263, %264
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %259, ptr noundef %260, float noundef %262, i32 noundef %265)
  %266 = load ptr, ptr %19, align 8, !tbaa !5
  %267 = load ptr, ptr %19, align 8, !tbaa !5
  %268 = load i32, ptr %22, align 4, !tbaa !9
  %269 = load i32, ptr %23, align 4, !tbaa !9
  %270 = mul nsw i32 %268, %269
  call void @_ZN12cudaCompress4util8AnscombeEPfS1_if(ptr noundef %266, ptr noundef %267, i32 noundef %270, float noundef 0.000000e+00)
  %271 = load ptr, ptr %19, align 8, !tbaa !5
  %272 = load ptr, ptr %19, align 8, !tbaa !5
  %273 = load float, ptr %26, align 4, !tbaa !13
  %274 = fmul float 2.000000e+00, %273
  %275 = fdiv float 1.000000e+00, %274
  %276 = load i32, ptr %22, align 4, !tbaa !9
  %277 = load i32, ptr %23, align 4, !tbaa !9
  %278 = mul nsw i32 %276, %277
  call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %271, ptr noundef %272, float noundef %275, i32 noundef %278)
  %279 = load ptr, ptr %19, align 8, !tbaa !5
  %280 = load ptr, ptr %20, align 8, !tbaa !5
  %281 = load ptr, ptr %18, align 8, !tbaa !5
  %282 = load i32, ptr %22, align 4, !tbaa !9
  %283 = load i32, ptr %22, align 4, !tbaa !9
  %284 = load i32, ptr %23, align 4, !tbaa !9
  %285 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef %279, ptr noundef %280, ptr noundef %281, i32 noundef %282, i32 noundef %283, i32 noundef %284, i32 noundef %285)
  %286 = load ptr, ptr %21, align 8, !tbaa !5
  %287 = load ptr, ptr %18, align 8, !tbaa !5
  %288 = load i32, ptr %22, align 4, !tbaa !9
  %289 = load i32, ptr %23, align 4, !tbaa !9
  %290 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %286, ptr noundef %287, i32 noundef %288, i32 noundef %289, i32 noundef %290, i32 noundef 0, i32 noundef 0)
  br label %292

291:                                              ; preds = %45
  br label %292

292:                                              ; preds = %291, %246, %209, %165, %121, %81, %48
  call void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 218)
  call void @llvm.lifetime.start.p0(i64 48, ptr %32) #5
  %293 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN12cudaCompress9BitStreamC2EPSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(41) %32, ptr noundef %293)
  %294 = load ptr, ptr %16, align 8, !tbaa !5
  %295 = getelementptr inbounds [1 x ptr], ptr %31, i64 0, i64 0
  %296 = load i32, ptr %22, align 4, !tbaa !9
  %297 = load i32, ptr %23, align 4, !tbaa !9
  %298 = mul nsw i32 %296, %297
  %299 = invoke noundef zeroext i1 @_ZN12cudaCompress12encodeRLHuffEPNS_8InstanceERNS_9BitStreamEPKPKtjj(ptr noundef %294, ptr noundef nonnull align 8 dereferenceable(41) %32, ptr noundef %295, i32 noundef 1, i32 noundef %298)
          to label %300 unwind label %301

300:                                              ; preds = %292
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %32) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %359

301:                                              ; preds = %292
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %33, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %34, align 4
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %32) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %360

305:                                              ; preds = %42, %15
  %306 = load i64, ptr %25, align 8, !tbaa !11
  %307 = sub i64 %306, 100
  store i64 %307, ptr %25, align 8, !tbaa !11
  %308 = load ptr, ptr %19, align 8, !tbaa !5
  %309 = load ptr, ptr %20, align 8, !tbaa !5
  %310 = load ptr, ptr %18, align 8, !tbaa !5
  %311 = load i32, ptr %22, align 4, !tbaa !9
  %312 = load i32, ptr %23, align 4, !tbaa !9
  %313 = load i32, ptr %22, align 4, !tbaa !9
  %314 = load i32, ptr %22, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util27dwtFloat2DForwardFromUshortEPfS1_PKtiiiiiP11CUstream_st(ptr noundef %308, ptr noundef %309, ptr noundef %310, i32 noundef %311, i32 noundef %312, i32 noundef 1, i32 noundef %313, i32 noundef %314, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  store i32 1, ptr %35, align 4, !tbaa !9
  br label %315

315:                                              ; preds = %339, %305
  %316 = load i32, ptr %35, align 4, !tbaa !9
  %317 = sext i32 %316 to i64
  %318 = load i64, ptr %25, align 8, !tbaa !11
  %319 = icmp ult i64 %317, %318
  br i1 %319, label %321, label %320

320:                                              ; preds = %315
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %342

321:                                              ; preds = %315
  %322 = load ptr, ptr %19, align 8, !tbaa !5
  %323 = load ptr, ptr %20, align 8, !tbaa !5
  %324 = load ptr, ptr %19, align 8, !tbaa !5
  %325 = load i32, ptr %22, align 4, !tbaa !9
  %326 = sitofp i32 %325 to double
  %327 = load i32, ptr %35, align 4, !tbaa !9
  %328 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 2.000000e+00, i32 noundef %327)
  %329 = fdiv double %326, %328
  %330 = fptosi double %329 to i32
  %331 = load i32, ptr %23, align 4, !tbaa !9
  %332 = sitofp i32 %331 to double
  %333 = load i32, ptr %35, align 4, !tbaa !9
  %334 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 2.000000e+00, i32 noundef %333)
  %335 = fdiv double %332, %334
  %336 = fptosi double %335 to i32
  %337 = load i32, ptr %22, align 4, !tbaa !9
  %338 = load i32, ptr %22, align 4, !tbaa !9
  call void @_ZN12cudaCompress4util17dwtFloat2DForwardEPfS1_PKfiiiiiP11CUstream_st(ptr noundef %322, ptr noundef %323, ptr noundef %324, i32 noundef %330, i32 noundef %336, i32 noundef 1, i32 noundef %337, i32 noundef %338, ptr noundef null)
  br label %339

339:                                              ; preds = %321
  %340 = load i32, ptr %35, align 4, !tbaa !9
  %341 = add nsw i32 %340, 1
  store i32 %341, ptr %35, align 4, !tbaa !9
  br label %315, !llvm.loop !15

342:                                              ; preds = %320
  %343 = load ptr, ptr %21, align 8, !tbaa !5
  %344 = load ptr, ptr %19, align 8, !tbaa !5
  %345 = load i32, ptr %22, align 4, !tbaa !9
  %346 = load i32, ptr %23, align 4, !tbaa !9
  %347 = load float, ptr %26, align 4, !tbaa !13
  call void @_ZN12cudaCompress4util19quantizeToSymbols2DEPtPKfjjfjNS0_13EQuantizeTypeE(ptr noundef %343, ptr noundef %344, i32 noundef %345, i32 noundef %346, float noundef %347, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 48, ptr %36) #5
  %348 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN12cudaCompress9BitStreamC2EPSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(41) %36, ptr noundef %348)
  %349 = load ptr, ptr %16, align 8, !tbaa !5
  %350 = load i32, ptr %22, align 4, !tbaa !9
  %351 = load i32, ptr %23, align 4, !tbaa !9
  %352 = mul nsw i32 %350, %351
  %353 = invoke noundef zeroext i1 @_ZN12cudaCompress12encodeRLHuffEPNS_8InstanceERNS_9BitStreamEPKPKtjj(ptr noundef %349, ptr noundef nonnull align 8 dereferenceable(41) %36, ptr noundef %21, i32 noundef 1, i32 noundef %352)
          to label %354 unwind label %355

354:                                              ; preds = %342
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %36) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %36) #5
  br label %359

355:                                              ; preds = %342
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %33, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %34, align 4
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %36) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %36) #5
  br label %360

359:                                              ; preds = %354, %300
  ret void

360:                                              ; preds = %355, %301
  %361 = load ptr, ptr %33, align 8
  %362 = load i32, ptr %34, align 4
  %363 = insertvalue { ptr, i32 } poison, ptr %361, 0
  %364 = insertvalue { ptr, i32 } %363, i32 %362, 1
  resume { ptr, i32 } %364
}

declare void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef, ptr noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util3vstEPfS1_ifff(ptr noundef, ptr noundef, i32 noundef, float noundef, float noundef, float noundef) #1

declare void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef, ptr noundef, float noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util3f2uEPfPti(ptr noundef, ptr noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef, ptr noundef, float noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef, ptr noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util22predictor7_tiles_wnll2EPKfPfPsiiii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @_ZN12cudaCompress4util8AnscombeEPfS1_if(ptr noundef, ptr noundef, i32 noundef, float noundef) #1

declare void @_ZN12cudaCompress4util27dwtFloat2DForwardFromUshortEPfS1_PKtiiiiiP11CUstream_st(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare void @_ZN12cudaCompress4util17dwtFloat2DForwardEPfS1_PKfiiiiiP11CUstream_st(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare void @_ZN12cudaCompress4util19quantizeToSymbols2DEPtPKfjjfjNS0_13EQuantizeTypeE(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef, i32 noundef, i32 noundef) #1

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 = { "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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

%"class.cudaCompress::BitStream" = type <{ %"class.cudaCompress::BitStreamReadOnly.base", [4 x i8], ptr, i8, [7 x i8] }>
%"class.cudaCompress::BitStreamReadOnly.base" = type <{ ptr, ptr, i32, i32, i32 }>

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [107 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #0 align 2

declare void @_ZN12cudaCompress4util16predictor7_tilesEPKsPsiiii(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) local_unnamed_addr #0

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

declare void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12cudaCompress9BitStreamC2EPSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef) unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN12cudaCompress12encodeRLHuffEPNS_8InstanceERNS_9BitStreamEPKPKtjj(ptr noundef, ptr noundef nonnull align 8 dereferenceable(41), ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12cudaCompress13compressImageEPNS_8InstanceERSt6vectorIjSaIjEEPsPfS7_Ptiiimffiff(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i64 noundef %9, float noundef %10, float noundef %11, i32 noundef %12, float noundef %13, float noundef %14) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %16 = alloca ptr, align 8
  %17 = alloca [1 x ptr], align 8
  %18 = alloca %"class.cudaCompress::BitStream", align 8
  %19 = alloca %"class.cudaCompress::BitStream", align 8
  store ptr %5, ptr %16, align 8, !tbaa !5
  %20 = mul nsw i32 %8, %7
  %21 = add i64 %9, -1
  %or.cond = icmp ult i64 %21, 99
  br i1 %or.cond, label %22, label %55

22:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  store ptr %5, ptr %17, align 8, !tbaa !5
  switch i64 %9, label %._crit_edge231 [
    i64 1, label %23
    i64 3, label %23
    i64 11, label %23
    i64 2, label %26
    i64 7, label %30
    i64 17, label %35
    i64 27, label %40
    i64 37, label %44
  ]

._crit_edge231:                                   ; preds = %22
  %.pre = mul nsw i32 %20, %6
  br label %50

23:                                               ; preds = %22, %22, %22
  %24 = mul nsw i32 %20, %6
  tail call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %2, ptr noundef %3, i32 noundef %24)
  tail call void @_ZN12cudaCompress4util3vstEPfS1_ifff(ptr noundef %3, ptr noundef %3, i32 noundef %24, float noundef %11, float noundef %13, float noundef %14)
  %25 = fdiv float 1.000000e+00, %10
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %25, i32 noundef %24)
  tail call void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef %3, ptr noundef %4, ptr noundef %2, i32 noundef %6, i32 noundef %6, i32 noundef %20, i32 noundef %12)
  tail call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %5, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  br label %50

26:                                               ; preds = %22
  %27 = mul nsw i32 %20, %6
  tail call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %2, ptr noundef %3, i32 noundef %27)
  tail call void @_ZN12cudaCompress4util3vstEPfS1_ifff(ptr noundef %3, ptr noundef %3, i32 noundef %27, float noundef %11, float noundef %13, float noundef %14)
  %28 = fdiv float 1.000000e+00, %10
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %28, i32 noundef %27)
  tail call void @_ZN12cudaCompress4util3f2uEPfPti(ptr noundef %3, ptr noundef %4, i32 noundef %27)
  %29 = shl i32 %6, 1
  tail call void @_ZN12cudaCompress4util16predictor7_tilesEPKsPsiiii(ptr noundef %4, ptr noundef %2, i32 noundef %29, i32 noundef %6, i32 noundef %20, i32 noundef %12)
  tail call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %5, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  br label %50

30:                                               ; preds = %22
  %31 = mul nsw i32 %20, %6
  tail call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %2, ptr noundef %3, i32 noundef %31)
  %32 = fneg float %11
  tail call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %32, i32 noundef %31)
  %33 = fdiv float 1.000000e+00, %13
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %33, i32 noundef %31)
  tail call void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef %3, ptr noundef %3, i32 noundef %31)
  %34 = fdiv float 1.000000e+00, %10
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %34, i32 noundef %31)
  tail call void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef %3, ptr noundef %4, ptr noundef %2, i32 noundef %6, i32 noundef %6, i32 noundef %20, i32 noundef %12)
  tail call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %5, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  br label %50

35:                                               ; preds = %22
  %36 = mul nsw i32 %20, %6
  tail call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %2, ptr noundef %3, i32 noundef %36)
  %37 = fneg float %11
  tail call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %37, i32 noundef %36)
  tail call void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef %3, ptr noundef %3, i32 noundef %36)
  %38 = fdiv float 1.000000e+00, %10
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %38, i32 noundef %36)
  tail call void @_ZN12cudaCompress4util3f2uEPfPti(ptr noundef %3, ptr noundef %4, i32 noundef %36)
  %39 = shl i32 %6, 1
  tail call void @_ZN12cudaCompress4util16predictor7_tilesEPKsPsiiii(ptr noundef %4, ptr noundef %2, i32 noundef %39, i32 noundef %6, i32 noundef %20, i32 noundef %12)
  tail call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %5, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  br label %50

40:                                               ; preds = %22
  %41 = mul nsw i32 %20, %6
  tail call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %2, ptr noundef %3, i32 noundef %41)
  %42 = fneg float %11
  tail call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %42, i32 noundef %41)
  tail call void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef %3, ptr noundef %3, i32 noundef %41)
  %43 = fdiv float 1.000000e+00, %10
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %43, i32 noundef %41)
  tail call void @_ZN12cudaCompress4util22predictor7_tiles_wnll2EPKfPfPsiiii(ptr noundef %3, ptr noundef %4, ptr noundef %2, i32 noundef %6, i32 noundef %6, i32 noundef %20, i32 noundef %12)
  tail call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %5, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  br label %50

44:                                               ; preds = %22
  %45 = mul nsw i32 %20, %6
  tail call void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef %2, ptr noundef %3, i32 noundef %45)
  %46 = fneg float %11
  tail call void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %46, i32 noundef %45)
  %47 = fdiv float 1.000000e+00, %13
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %47, i32 noundef %45)
  tail call void @_ZN12cudaCompress4util8AnscombeEPfS1_if(ptr noundef %3, ptr noundef %3, i32 noundef %45, float noundef 0.000000e+00)
  %48 = fmul float %10, 2.000000e+00
  %49 = fdiv float 1.000000e+00, %48
  tail call void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef %3, ptr noundef %3, float noundef %49, i32 noundef %45)
  tail call void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef %3, ptr noundef %4, ptr noundef %2, i32 noundef %6, i32 noundef %6, i32 noundef %20, i32 noundef %12)
  tail call void @_ZN12cudaCompress4util9symbolizeEPtPKsjjjjj(ptr noundef %5, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  br label %50

50:                                               ; preds = %._crit_edge231, %44, %40, %35, %30, %26, %23
  %.pre-phi = phi i32 [ %.pre, %._crit_edge231 ], [ %45, %44 ], [ %41, %40 ], [ %36, %35 ], [ %31, %30 ], [ %27, %26 ], [ %24, %23 ]
  tail call void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 218)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %18) #5
  call void @_ZN12cudaCompress9BitStreamC2EPSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(41) %18, ptr noundef nonnull %1)
  %51 = invoke noundef zeroext i1 @_ZN12cudaCompress12encodeRLHuffEPNS_8InstanceERNS_9BitStreamEPKPKtjj(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(41) %18, ptr noundef nonnull %17, i32 noundef 1, i32 noundef %.pre-phi)
          to label %52 unwind label %53

52:                                               ; preds = %50
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %18) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  br label %73

53:                                               ; preds = %50
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %18) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  br label %74

55:                                               ; preds = %15
  %56 = add i64 %9, -100
  tail call void @_ZN12cudaCompress4util27dwtFloat2DForwardFromUshortEPfS1_PKtiiiiiP11CUstream_st(ptr noundef %3, ptr noundef %4, ptr noundef %2, i32 noundef %6, i32 noundef %20, i32 noundef 1, i32 noundef %6, i32 noundef %6, ptr noundef null)
  %57 = icmp ugt i64 %56, 1
  br i1 %57, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %55
  %58 = sitofp i32 %6 to double
  %59 = sitofp i32 %20 to double
  br label %62

._crit_edge:                                      ; preds = %62, %55
  tail call void @_ZN12cudaCompress4util19quantizeToSymbols2DEPtPKfjjfjNS0_13EQuantizeTypeE(ptr noundef %5, ptr noundef %3, i32 noundef %6, i32 noundef %20, float noundef %10, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %19) #5
  call void @_ZN12cudaCompress9BitStreamC2EPSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(41) %19, ptr noundef nonnull %1)
  %60 = mul nsw i32 %20, %6
  %61 = invoke noundef zeroext i1 @_ZN12cudaCompress12encodeRLHuffEPNS_8InstanceERNS_9BitStreamEPKPKtjj(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(41) %19, ptr noundef nonnull %16, i32 noundef 1, i32 noundef %60)
          to label %70 unwind label %71

62:                                               ; preds = %.lr.ph, %62
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %62 ]
  %63 = trunc nuw nsw i64 %indvars.iv to i32
  %64 = tail call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 2.000000e+00, i32 noundef %63)
  %65 = fdiv double %58, %64
  %66 = fptosi double %65 to i32
  %67 = tail call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 2.000000e+00, i32 noundef %63)
  %68 = fdiv double %59, %67
  %69 = fptosi double %68 to i32
  tail call void @_ZN12cudaCompress4util17dwtFloat2DForwardEPfS1_PKfiiiiiP11CUstream_st(ptr noundef %3, ptr noundef %4, ptr noundef %3, i32 noundef %66, i32 noundef %69, i32 noundef 1, i32 noundef %6, i32 noundef %6, ptr noundef null)
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %56
  br i1 %exitcond.not, label %._crit_edge, label %62, !llvm.loop !9

70:                                               ; preds = %._crit_edge
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %19) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #5
  br label %73

71:                                               ; preds = %._crit_edge
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN12cudaCompress9BitStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %19) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #5
  br label %74

73:                                               ; preds = %70, %52
  ret void

74:                                               ; preds = %71, %53
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %72, %71 ]
  resume { ptr, i32 } %.pn
}

declare void @_ZN12cudaCompress4util3u2fEPtPfi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util3vstEPfS1_ifff(ptr noundef, ptr noundef, i32 noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util8multiplyEPfS1_fi(ptr noundef, ptr noundef, float noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util21predictor7_tiles_wnllEPKfPfPsiiii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util3f2uEPfPti(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util6offsetEPfS1_fi(ptr noundef, ptr noundef, float noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util9sqrtArrayEPfS1_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util22predictor7_tiles_wnll2EPKfPfPsiiii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util8AnscombeEPfS1_if(ptr noundef, ptr noundef, i32 noundef, float noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util27dwtFloat2DForwardFromUshortEPfS1_PKtiiiiiP11CUstream_st(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util17dwtFloat2DForwardEPfS1_PKfiiiiiP11CUstream_st(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN12cudaCompress4util19quantizeToSymbols2DEPtPKfjjfjNS0_13EQuantizeTypeE(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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 = { "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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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