; LLVM IR from dbry/wavpack-stream :: src (pack_utils)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.WavpackContext = type { %struct.WavpackStreamConfig, ptr, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i8, ptr, ptr, i32, i32, ptr, [8 x i8], ptr, [80 x i8] }
%struct.WavpackStreamConfig = type { float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x i8], i8, i32, ptr }
%struct.WavpackStream = type { %struct.WavpackHeader, %struct.words_data, ptr, ptr, ptr, ptr, ptr, i64, i64, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, %struct.bs, %struct.bs, %struct.bs, float, i8, i8, i8, i8, i8, i8, i8, i8, %struct.anon, [16 x %struct.decorr_pass], %struct.decorr_pass, ptr, %struct.anon.0 }
%struct.WavpackHeader = type { [4 x i8], i16, i16, i32 }
%struct.words_data = type { [2 x i32], [2 x i32], i32, i32, i32, i32, i32, [2 x %struct.entropy_data] }
%struct.entropy_data = type { [3 x i32], i32, i32 }
%struct.bs = type { ptr, ptr, ptr, ptr, i32, i32, i32 }
%struct.anon = type { [2 x i32], [2 x i32], [2 x i32], double, double, double, ptr, ptr, i32 }
%struct.decorr_pass = type { i32, i32, i32, i32, [8 x i32], [8 x i32], i32, i32, i32, i32 }
%struct.anon.0 = type { ptr, ptr, ptr, ptr, ptr, i8, i8, i32, i32, i32, ptr, i32, i32, i32, [2 x %struct.DSDfilters], ptr }
%struct.DSDfilters = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

; 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: nounwind uwtable
define dso_local i32 @WavpackStreamPackSamples(ptr noundef %0, ptr noundef %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.WavpackContext, ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %17, i32 0, i32 7
  %19 = load i32, ptr %18, align 4, !tbaa !11
  store i32 %19, ptr %8, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %304, %3
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %305

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %24, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.WavpackContext, ptr %25, i32 0, i32 28
  %27 = load i32, ptr %26, align 8, !tbaa !16
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = add i32 %27, %28
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.WavpackContext, ptr %30, i32 0, i32 26
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = icmp ugt i32 %29, %32
  br i1 %33, label %34, label %42

34:                                               ; preds = %23
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.WavpackContext, ptr %35, i32 0, i32 26
  %37 = load i32, ptr %36, align 8, !tbaa !17
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.WavpackContext, ptr %38, i32 0, i32 28
  %40 = load i32, ptr %39, align 8, !tbaa !16
  %41 = sub i32 %37, %40
  store i32 %41, ptr %10, align 4, !tbaa !9
  br label %44

42:                                               ; preds = %23
  %43 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %43, ptr %10, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %42, %34
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.WavpackContext, ptr %45, i32 0, i32 33
  store i32 0, ptr %46, align 4, !tbaa !18
  br label %47

47:                                               ; preds = %269, %44
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.WavpackContext, ptr %48, i32 0, i32 33
  %50 = load i32, ptr %49, align 4, !tbaa !18
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.WavpackContext, ptr %51, i32 0, i32 34
  %53 = load i32, ptr %52, align 8, !tbaa !19
  %54 = icmp slt i32 %50, %53
  br i1 %54, label %55, label %274

55:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.WavpackContext, ptr %56, i32 0, i32 36
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.WavpackContext, ptr %59, i32 0, i32 33
  %61 = load i32, ptr %60, align 4, !tbaa !18
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %58, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  store ptr %64, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.WavpackStream, ptr %65, i32 0, i32 6
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.WavpackContext, ptr %68, i32 0, i32 28
  %70 = load i32, ptr %69, align 8, !tbaa !16
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.WavpackStream, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.WavpackHeader, ptr %72, i32 0, i32 3
  %74 = load i32, ptr %73, align 8, !tbaa !31
  %75 = and i32 %74, 4
  %76 = icmp ne i32 %75, 0
  %77 = zext i1 %76 to i64
  %78 = select i1 %76, i32 1, i32 2
  %79 = mul i32 %70, %78
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %67, i64 %80
  store ptr %81, ptr %12, align 8, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %82, ptr %13, align 8, !tbaa !5
  %83 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %83, ptr %14, align 4, !tbaa !9
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.WavpackStream, ptr %84, i32 0, i32 0
  %86 = getelementptr inbounds %struct.WavpackHeader, ptr %85, i32 0, i32 3
  %87 = load i32, ptr %86, align 8, !tbaa !31
  %88 = and i32 %87, 4
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %164

90:                                               ; preds = %55
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.WavpackContext, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %92, i32 0, i32 3
  %94 = load i32, ptr %93, align 4, !tbaa !32
  switch i32 %94, label %146 [
    i32 1, label %95
    i32 2, label %112
    i32 3, label %129
  ]

95:                                               ; preds = %90
  br label %96

96:                                               ; preds = %100, %95
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %14, align 4, !tbaa !9
  %99 = icmp ne i32 %97, 0
  br i1 %99, label %100, label %111

100:                                              ; preds = %96
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = trunc i32 %102 to i8
  %104 = sext i8 %103 to i32
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds i32, ptr %105, i32 1
  store ptr %106, ptr %12, align 8, !tbaa !5
  store i32 %104, ptr %105, align 4, !tbaa !9
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  %109 = sext i32 %107 to i64
  %110 = getelementptr inbounds i32, ptr %108, i64 %109
  store ptr %110, ptr %13, align 8, !tbaa !5
  br label %96, !llvm.loop !33

111:                                              ; preds = %96
  br label %161

112:                                              ; preds = %90
  br label %113

113:                                              ; preds = %117, %112
  %114 = load i32, ptr %14, align 4, !tbaa !9
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %14, align 4, !tbaa !9
  %116 = icmp ne i32 %114, 0
  br i1 %116, label %117, label %128

117:                                              ; preds = %113
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = trunc i32 %119 to i16
  %121 = sext i16 %120 to i32
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = getelementptr inbounds i32, ptr %122, i32 1
  store ptr %123, ptr %12, align 8, !tbaa !5
  store i32 %121, ptr %122, align 4, !tbaa !9
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = sext i32 %124 to i64
  %127 = getelementptr inbounds i32, ptr %125, i64 %126
  store ptr %127, ptr %13, align 8, !tbaa !5
  br label %113, !llvm.loop !35

128:                                              ; preds = %113
  br label %161

129:                                              ; preds = %90
  br label %130

130:                                              ; preds = %134, %129
  %131 = load i32, ptr %14, align 4, !tbaa !9
  %132 = add nsw i32 %131, -1
  store i32 %132, ptr %14, align 4, !tbaa !9
  %133 = icmp ne i32 %131, 0
  br i1 %133, label %134, label %145

134:                                              ; preds = %130
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = load i32, ptr %135, align 4, !tbaa !9
  %137 = shl i32 %136, 8
  %138 = ashr i32 %137, 8
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  %140 = getelementptr inbounds i32, ptr %139, i32 1
  store ptr %140, ptr %12, align 8, !tbaa !5
  store i32 %138, ptr %139, align 4, !tbaa !9
  %141 = load i32, ptr %8, align 4, !tbaa !9
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = sext i32 %141 to i64
  %144 = getelementptr inbounds i32, ptr %142, i64 %143
  store ptr %144, ptr %13, align 8, !tbaa !5
  br label %130, !llvm.loop !36

145:                                              ; preds = %130
  br label %161

146:                                              ; preds = %90
  br label %147

147:                                              ; preds = %151, %146
  %148 = load i32, ptr %14, align 4, !tbaa !9
  %149 = add nsw i32 %148, -1
  store i32 %149, ptr %14, align 4, !tbaa !9
  %150 = icmp ne i32 %148, 0
  br i1 %150, label %151, label %160

151:                                              ; preds = %147
  %152 = load ptr, ptr %13, align 8, !tbaa !5
  %153 = load i32, ptr %152, align 4, !tbaa !9
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  %155 = getelementptr inbounds i32, ptr %154, i32 1
  store ptr %155, ptr %12, align 8, !tbaa !5
  store i32 %153, ptr %154, align 4, !tbaa !9
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  %158 = sext i32 %156 to i64
  %159 = getelementptr inbounds i32, ptr %157, i64 %158
  store ptr %159, ptr %13, align 8, !tbaa !5
  br label %147, !llvm.loop !37

160:                                              ; preds = %147
  br label %161

161:                                              ; preds = %160, %145, %128, %111
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = getelementptr inbounds i32, ptr %162, i32 1
  store ptr %163, ptr %9, align 8, !tbaa !5
  br label %268

164:                                              ; preds = %55
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.WavpackContext, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %166, i32 0, i32 3
  %168 = load i32, ptr %167, align 4, !tbaa !32
  switch i32 %168, label %244 [
    i32 1, label %169
    i32 2, label %194
    i32 3, label %219
  ]

169:                                              ; preds = %164
  br label %170

170:                                              ; preds = %174, %169
  %171 = load i32, ptr %14, align 4, !tbaa !9
  %172 = add nsw i32 %171, -1
  store i32 %172, ptr %14, align 4, !tbaa !9
  %173 = icmp ne i32 %171, 0
  br i1 %173, label %174, label %193

174:                                              ; preds = %170
  %175 = load ptr, ptr %13, align 8, !tbaa !5
  %176 = getelementptr inbounds i32, ptr %175, i64 0
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = trunc i32 %177 to i8
  %179 = sext i8 %178 to i32
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = getelementptr inbounds i32, ptr %180, i32 1
  store ptr %181, ptr %12, align 8, !tbaa !5
  store i32 %179, ptr %180, align 4, !tbaa !9
  %182 = load ptr, ptr %13, align 8, !tbaa !5
  %183 = getelementptr inbounds i32, ptr %182, i64 1
  %184 = load i32, ptr %183, align 4, !tbaa !9
  %185 = trunc i32 %184 to i8
  %186 = sext i8 %185 to i32
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = getelementptr inbounds i32, ptr %187, i32 1
  store ptr %188, ptr %12, align 8, !tbaa !5
  store i32 %186, ptr %187, align 4, !tbaa !9
  %189 = load i32, ptr %8, align 4, !tbaa !9
  %190 = load ptr, ptr %13, align 8, !tbaa !5
  %191 = sext i32 %189 to i64
  %192 = getelementptr inbounds i32, ptr %190, i64 %191
  store ptr %192, ptr %13, align 8, !tbaa !5
  br label %170, !llvm.loop !38

193:                                              ; preds = %170
  br label %265

194:                                              ; preds = %164
  br label %195

195:                                              ; preds = %199, %194
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = add nsw i32 %196, -1
  store i32 %197, ptr %14, align 4, !tbaa !9
  %198 = icmp ne i32 %196, 0
  br i1 %198, label %199, label %218

199:                                              ; preds = %195
  %200 = load ptr, ptr %13, align 8, !tbaa !5
  %201 = getelementptr inbounds i32, ptr %200, i64 0
  %202 = load i32, ptr %201, align 4, !tbaa !9
  %203 = trunc i32 %202 to i16
  %204 = sext i16 %203 to i32
  %205 = load ptr, ptr %12, align 8, !tbaa !5
  %206 = getelementptr inbounds i32, ptr %205, i32 1
  store ptr %206, ptr %12, align 8, !tbaa !5
  store i32 %204, ptr %205, align 4, !tbaa !9
  %207 = load ptr, ptr %13, align 8, !tbaa !5
  %208 = getelementptr inbounds i32, ptr %207, i64 1
  %209 = load i32, ptr %208, align 4, !tbaa !9
  %210 = trunc i32 %209 to i16
  %211 = sext i16 %210 to i32
  %212 = load ptr, ptr %12, align 8, !tbaa !5
  %213 = getelementptr inbounds i32, ptr %212, i32 1
  store ptr %213, ptr %12, align 8, !tbaa !5
  store i32 %211, ptr %212, align 4, !tbaa !9
  %214 = load i32, ptr %8, align 4, !tbaa !9
  %215 = load ptr, ptr %13, align 8, !tbaa !5
  %216 = sext i32 %214 to i64
  %217 = getelementptr inbounds i32, ptr %215, i64 %216
  store ptr %217, ptr %13, align 8, !tbaa !5
  br label %195, !llvm.loop !39

218:                                              ; preds = %195
  br label %265

219:                                              ; preds = %164
  br label %220

220:                                              ; preds = %224, %219
  %221 = load i32, ptr %14, align 4, !tbaa !9
  %222 = add nsw i32 %221, -1
  store i32 %222, ptr %14, align 4, !tbaa !9
  %223 = icmp ne i32 %221, 0
  br i1 %223, label %224, label %243

224:                                              ; preds = %220
  %225 = load ptr, ptr %13, align 8, !tbaa !5
  %226 = getelementptr inbounds i32, ptr %225, i64 0
  %227 = load i32, ptr %226, align 4, !tbaa !9
  %228 = shl i32 %227, 8
  %229 = ashr i32 %228, 8
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = getelementptr inbounds i32, ptr %230, i32 1
  store ptr %231, ptr %12, align 8, !tbaa !5
  store i32 %229, ptr %230, align 4, !tbaa !9
  %232 = load ptr, ptr %13, align 8, !tbaa !5
  %233 = getelementptr inbounds i32, ptr %232, i64 1
  %234 = load i32, ptr %233, align 4, !tbaa !9
  %235 = shl i32 %234, 8
  %236 = ashr i32 %235, 8
  %237 = load ptr, ptr %12, align 8, !tbaa !5
  %238 = getelementptr inbounds i32, ptr %237, i32 1
  store ptr %238, ptr %12, align 8, !tbaa !5
  store i32 %236, ptr %237, align 4, !tbaa !9
  %239 = load i32, ptr %8, align 4, !tbaa !9
  %240 = load ptr, ptr %13, align 8, !tbaa !5
  %241 = sext i32 %239 to i64
  %242 = getelementptr inbounds i32, ptr %240, i64 %241
  store ptr %242, ptr %13, align 8, !tbaa !5
  br label %220, !llvm.loop !40

243:                                              ; preds = %220
  br label %265

244:                                              ; preds = %164
  br label %245

245:                                              ; preds = %249, %244
  %246 = load i32, ptr %14, align 4, !tbaa !9
  %247 = add nsw i32 %246, -1
  store i32 %247, ptr %14, align 4, !tbaa !9
  %248 = icmp ne i32 %246, 0
  br i1 %248, label %249, label %264

249:                                              ; preds = %245
  %250 = load ptr, ptr %13, align 8, !tbaa !5
  %251 = getelementptr inbounds i32, ptr %250, i64 0
  %252 = load i32, ptr %251, align 4, !tbaa !9
  %253 = load ptr, ptr %12, align 8, !tbaa !5
  %254 = getelementptr inbounds i32, ptr %253, i32 1
  store ptr %254, ptr %12, align 8, !tbaa !5
  store i32 %252, ptr %253, align 4, !tbaa !9
  %255 = load ptr, ptr %13, align 8, !tbaa !5
  %256 = getelementptr inbounds i32, ptr %255, i64 1
  %257 = load i32, ptr %256, align 4, !tbaa !9
  %258 = load ptr, ptr %12, align 8, !tbaa !5
  %259 = getelementptr inbounds i32, ptr %258, i32 1
  store ptr %259, ptr %12, align 8, !tbaa !5
  store i32 %257, ptr %258, align 4, !tbaa !9
  %260 = load i32, ptr %8, align 4, !tbaa !9
  %261 = load ptr, ptr %13, align 8, !tbaa !5
  %262 = sext i32 %260 to i64
  %263 = getelementptr inbounds i32, ptr %261, i64 %262
  store ptr %263, ptr %13, align 8, !tbaa !5
  br label %245, !llvm.loop !41

264:                                              ; preds = %245
  br label %265

265:                                              ; preds = %264, %243, %218, %193
  %266 = load ptr, ptr %9, align 8, !tbaa !5
  %267 = getelementptr inbounds i32, ptr %266, i64 2
  store ptr %267, ptr %9, align 8, !tbaa !5
  br label %268

268:                                              ; preds = %265, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  br label %269

269:                                              ; preds = %268
  %270 = load ptr, ptr %5, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.WavpackContext, ptr %270, i32 0, i32 33
  %272 = load i32, ptr %271, align 4, !tbaa !18
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %271, align 4, !tbaa !18
  br label %47, !llvm.loop !42

274:                                              ; preds = %47
  %275 = load i32, ptr %10, align 4, !tbaa !9
  %276 = load i32, ptr %8, align 4, !tbaa !9
  %277 = mul i32 %275, %276
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = zext i32 %277 to i64
  %280 = getelementptr inbounds i32, ptr %278, i64 %279
  store ptr %280, ptr %6, align 8, !tbaa !5
  %281 = load i32, ptr %10, align 4, !tbaa !9
  %282 = load i32, ptr %7, align 4, !tbaa !9
  %283 = sub i32 %282, %281
  store i32 %283, ptr %7, align 4, !tbaa !9
  %284 = load i32, ptr %10, align 4, !tbaa !9
  %285 = load ptr, ptr %5, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.WavpackContext, ptr %285, i32 0, i32 28
  %287 = load i32, ptr %286, align 8, !tbaa !16
  %288 = add i32 %287, %284
  store i32 %288, ptr %286, align 8, !tbaa !16
  %289 = load ptr, ptr %5, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.WavpackContext, ptr %289, i32 0, i32 26
  %291 = load i32, ptr %290, align 8, !tbaa !17
  %292 = icmp eq i32 %288, %291
  br i1 %292, label %293, label %301

293:                                              ; preds = %274
  %294 = load ptr, ptr %5, align 8, !tbaa !5
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.WavpackContext, ptr %295, i32 0, i32 26
  %297 = load i32, ptr %296, align 8, !tbaa !17
  %298 = call i32 @pack_streams(ptr noundef %294, i32 noundef %297)
  %299 = icmp ne i32 %298, 0
  br i1 %299, label %301, label %300

300:                                              ; preds = %293
  store i32 0, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %302

301:                                              ; preds = %293, %274
  store i32 0, ptr %15, align 4
  br label %302

302:                                              ; preds = %301, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  %303 = load i32, ptr %15, align 4
  switch i32 %303, label %306 [
    i32 0, label %304
  ]

304:                                              ; preds = %302
  br label %20, !llvm.loop !43

305:                                              ; preds = %20
  store i32 1, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %306

306:                                              ; preds = %305, %302
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  %307 = load i32, ptr %4, align 4
  ret i32 %307
}

; Function Attrs: nounwind uwtable
declare hidden i32 @pack_streams(ptr noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 28}
!12 = !{!"WavpackContext", !13, i64 0, !6, i64 88, !10, i64 96, !10, i64 100, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !6, i64 288, !6, i64 296, !7, i64 304, !6, i64 312, !6, i64 320, !10, i64 328, !10, i64 332, !6, i64 336, !7, i64 344, !6, i64 352, !7, i64 360}
!13 = !{!"", !14, i64 0, !14, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 72, !10, i64 76, !6, i64 80}
!14 = !{!"float", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!12, !10, i64 256}
!17 = !{!12, !10, i64 248}
!18 = !{!12, !10, i64 276}
!19 = !{!12, !10, i64 280}
!20 = !{!12, !6, i64 288}
!21 = !{!22, !6, i64 120}
!22 = !{!"", !23, i64 0, !25, i64 12, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !15, i64 128, !15, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !7, i64 156, !7, i64 157, !7, i64 158, !7, i64 159, !7, i64 160, !7, i64 161, !7, i64 162, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !26, i64 200, !26, i64 248, !26, i64 296, !14, i64 344, !7, i64 348, !7, i64 349, !7, i64 350, !7, i64 351, !7, i64 352, !7, i64 353, !7, i64 354, !7, i64 355, !27, i64 360, !7, i64 432, !29, i64 1968, !6, i64 2064, !30, i64 2072}
!23 = !{!"", !7, i64 0, !24, i64 4, !24, i64 6, !10, i64 8}
!24 = !{!"short", !7, i64 0}
!25 = !{!"words_data", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 36}
!26 = !{!"bs", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40}
!27 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !28, i64 24, !28, i64 32, !28, i64 40, !6, i64 48, !6, i64 56, !10, i64 64}
!28 = !{!"double", !7, i64 0}
!29 = !{!"decorr_pass", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 48, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92}
!30 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 41, !10, i64 44, !10, i64 48, !10, i64 52, !6, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !7, i64 76, !6, i64 160}
!31 = !{!22, !10, i64 8}
!32 = !{!12, !10, i64 12}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}
!38 = distinct !{!38, !34}
!39 = distinct !{!39, !34}
!40 = distinct !{!40, !34}
!41 = distinct !{!41, !34}
!42 = distinct !{!42, !34}
!43 = distinct !{!43, !34}


; 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: nounwind uwtable
define dso_local noundef i32 @WavpackStreamPackSamples(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 28
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not185 = icmp eq i32 %2, 0
  br i1 %.not185, label %._crit_edge190, label %.lr.ph189

.lr.ph189:                                        ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 256
  %7 = getelementptr inbounds i8, ptr %0, i64 248
  %8 = getelementptr inbounds i8, ptr %0, i64 276
  %9 = getelementptr inbounds i8, ptr %0, i64 280
  %10 = getelementptr inbounds i8, ptr %0, i64 288
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  %12 = sext i32 %5 to i64
  br label %13

13:                                               ; preds = %.lr.ph189, %.critedge
  %.0107187 = phi ptr [ %1, %.lr.ph189 ], [ %274, %.critedge ]
  %.0108186 = phi i32 [ %2, %.lr.ph189 ], [ %275, %.critedge ]
  %14 = load i32, ptr %6, align 8, !tbaa !14
  %15 = add i32 %14, %.0108186
  %16 = load i32, ptr %7, align 8, !tbaa !15
  %17 = icmp ugt i32 %15, %16
  %18 = sub i32 %16, %14
  %.0104 = select i1 %17, i32 %18, i32 %.0108186
  store i32 0, ptr %8, align 4, !tbaa !16
  %19 = load i32, ptr %9, align 8, !tbaa !17
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph184, label %._crit_edge

.lr.ph184:                                        ; preds = %13
  %21 = load ptr, ptr %10, align 8, !tbaa !18
  %.not121141 = icmp eq i32 %.0104, 0
  %umin = tail call i32 @llvm.umin.i32(i32 %16, i32 %15)
  %22 = xor i32 %14, -1
  %23 = add i32 %umin, %22
  %xtraiter = and i32 %.0104, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  %24 = icmp ult i32 %23, 3
  %xtraiter220 = and i32 %.0104, 3
  %lcmp.mod221.not = icmp eq i32 %xtraiter220, 0
  %25 = icmp ult i32 %23, 3
  %xtraiter223 = and i32 %.0104, 3
  %lcmp.mod224.not = icmp eq i32 %xtraiter223, 0
  %26 = icmp ult i32 %23, 3
  %xtraiter226 = and i32 %.0104, 7
  %lcmp.mod227.not = icmp eq i32 %xtraiter226, 0
  %27 = icmp ult i32 %23, 7
  %xtraiter229 = and i32 %.0104, 1
  %lcmp.mod230.not = icmp eq i32 %xtraiter229, 0
  %28 = add nsw i32 %.0104, -1
  %29 = icmp eq i32 %23, 0
  %xtraiter232 = and i32 %.0104, 1
  %lcmp.mod233.not = icmp eq i32 %xtraiter232, 0
  %30 = add nsw i32 %.0104, -1
  %31 = icmp eq i32 %23, 0
  %xtraiter235 = and i32 %.0104, 1
  %lcmp.mod236.not = icmp eq i32 %xtraiter235, 0
  %32 = add nsw i32 %.0104, -1
  %33 = icmp eq i32 %23, 0
  %xtraiter238 = and i32 %.0104, 3
  %lcmp.mod239.not = icmp eq i32 %xtraiter238, 0
  %34 = icmp ult i32 %23, 3
  br label %35

35:                                               ; preds = %.lr.ph184, %.loopexit134
  %.0105181 = phi ptr [ %.0107187, %.lr.ph184 ], [ %265, %.loopexit134 ]
  %storemerge180 = phi i32 [ 0, %.lr.ph184 ], [ %267, %.loopexit134 ]
  %36 = sext i32 %storemerge180 to i64
  %37 = getelementptr inbounds ptr, ptr %21, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = getelementptr inbounds i8, ptr %38, i64 120
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = load i32, ptr %6, align 8, !tbaa !14
  %42 = getelementptr inbounds i8, ptr %38, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !30
  %44 = and i32 %43, 4
  %.not113 = icmp eq i32 %44, 0
  %.lobit = lshr exact i32 %44, 2
  %45 = xor i32 %.lobit, 1
  %46 = shl i32 %41, %45
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %40, i64 %47
  %49 = load i32, ptr %11, align 4, !tbaa !31
  br i1 %.not113, label %151, label %50

50:                                               ; preds = %35
  switch i32 %49, label %.preheader133 [
    i32 1, label %.preheader135
    i32 2, label %.preheader137
    i32 3, label %.preheader139
  ]

.preheader139:                                    ; preds = %50
  br i1 %.not121141, label %.loopexit134, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader139
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.2144.prol = phi i32 [ %51, %.lr.ph.prol ], [ %.0104, %.lr.ph.preheader ]
  %.287143.prol = phi ptr [ %56, %.lr.ph.prol ], [ %.0105181, %.lr.ph.preheader ]
  %.295142.prol = phi ptr [ %55, %.lr.ph.prol ], [ %48, %.lr.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %51 = add nsw i32 %.2144.prol, -1
  %52 = load i32, ptr %.287143.prol, align 4, !tbaa !32
  %53 = shl i32 %52, 8
  %54 = ashr exact i32 %53, 8
  %55 = getelementptr inbounds i8, ptr %.295142.prol, i64 4
  store i32 %54, ptr %.295142.prol, align 4, !tbaa !32
  %56 = getelementptr inbounds i32, ptr %.287143.prol, i64 %12
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !33

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.2144.unr = phi i32 [ %.0104, %.lr.ph.preheader ], [ %51, %.lr.ph.prol ]
  %.287143.unr = phi ptr [ %.0105181, %.lr.ph.preheader ], [ %56, %.lr.ph.prol ]
  %.295142.unr = phi ptr [ %48, %.lr.ph.preheader ], [ %55, %.lr.ph.prol ]
  br i1 %24, label %.loopexit134, label %.lr.ph

.preheader137:                                    ; preds = %50
  br i1 %.not121141, label %.loopexit134, label %.lr.ph149.preheader

.lr.ph149.preheader:                              ; preds = %.preheader137
  br i1 %lcmp.mod221.not, label %.lr.ph149.prol.loopexit, label %.lr.ph149.prol

.lr.ph149.prol:                                   ; preds = %.lr.ph149.preheader, %.lr.ph149.prol
  %.1148.prol = phi i32 [ %57, %.lr.ph149.prol ], [ %.0104, %.lr.ph149.preheader ]
  %.186147.prol = phi ptr [ %61, %.lr.ph149.prol ], [ %.0105181, %.lr.ph149.preheader ]
  %.194146.prol = phi ptr [ %60, %.lr.ph149.prol ], [ %48, %.lr.ph149.preheader ]
  %prol.iter222 = phi i32 [ %prol.iter222.next, %.lr.ph149.prol ], [ 0, %.lr.ph149.preheader ]
  %57 = add nsw i32 %.1148.prol, -1
  %58 = load i32, ptr %.186147.prol, align 4, !tbaa !32
  %sext123.prol = shl i32 %58, 16
  %59 = ashr exact i32 %sext123.prol, 16
  %60 = getelementptr inbounds i8, ptr %.194146.prol, i64 4
  store i32 %59, ptr %.194146.prol, align 4, !tbaa !32
  %61 = getelementptr inbounds i32, ptr %.186147.prol, i64 %12
  %prol.iter222.next = add i32 %prol.iter222, 1
  %prol.iter222.cmp.not = icmp eq i32 %prol.iter222.next, %xtraiter220
  br i1 %prol.iter222.cmp.not, label %.lr.ph149.prol.loopexit, label %.lr.ph149.prol, !llvm.loop !35

.lr.ph149.prol.loopexit:                          ; preds = %.lr.ph149.prol, %.lr.ph149.preheader
  %.1148.unr = phi i32 [ %.0104, %.lr.ph149.preheader ], [ %57, %.lr.ph149.prol ]
  %.186147.unr = phi ptr [ %.0105181, %.lr.ph149.preheader ], [ %61, %.lr.ph149.prol ]
  %.194146.unr = phi ptr [ %48, %.lr.ph149.preheader ], [ %60, %.lr.ph149.prol ]
  br i1 %25, label %.loopexit134, label %.lr.ph149

.preheader135:                                    ; preds = %50
  br i1 %.not121141, label %.loopexit134, label %.lr.ph154.preheader

.lr.ph154.preheader:                              ; preds = %.preheader135
  br i1 %lcmp.mod224.not, label %.lr.ph154.prol.loopexit, label %.lr.ph154.prol

.lr.ph154.prol:                                   ; preds = %.lr.ph154.preheader, %.lr.ph154.prol
  %.084153.prol = phi i32 [ %62, %.lr.ph154.prol ], [ %.0104, %.lr.ph154.preheader ]
  %.085152.prol = phi ptr [ %66, %.lr.ph154.prol ], [ %.0105181, %.lr.ph154.preheader ]
  %.093151.prol = phi ptr [ %65, %.lr.ph154.prol ], [ %48, %.lr.ph154.preheader ]
  %prol.iter225 = phi i32 [ %prol.iter225.next, %.lr.ph154.prol ], [ 0, %.lr.ph154.preheader ]
  %62 = add nsw i32 %.084153.prol, -1
  %63 = load i32, ptr %.085152.prol, align 4, !tbaa !32
  %sext125.prol = shl i32 %63, 24
  %64 = ashr exact i32 %sext125.prol, 24
  %65 = getelementptr inbounds i8, ptr %.093151.prol, i64 4
  store i32 %64, ptr %.093151.prol, align 4, !tbaa !32
  %66 = getelementptr inbounds i32, ptr %.085152.prol, i64 %12
  %prol.iter225.next = add i32 %prol.iter225, 1
  %prol.iter225.cmp.not = icmp eq i32 %prol.iter225.next, %xtraiter223
  br i1 %prol.iter225.cmp.not, label %.lr.ph154.prol.loopexit, label %.lr.ph154.prol, !llvm.loop !36

.lr.ph154.prol.loopexit:                          ; preds = %.lr.ph154.prol, %.lr.ph154.preheader
  %.084153.unr = phi i32 [ %.0104, %.lr.ph154.preheader ], [ %62, %.lr.ph154.prol ]
  %.085152.unr = phi ptr [ %.0105181, %.lr.ph154.preheader ], [ %66, %.lr.ph154.prol ]
  %.093151.unr = phi ptr [ %48, %.lr.ph154.preheader ], [ %65, %.lr.ph154.prol ]
  br i1 %26, label %.loopexit134, label %.lr.ph154

.preheader133:                                    ; preds = %50
  br i1 %.not121141, label %.loopexit134, label %.lr.ph159.preheader

.lr.ph159.preheader:                              ; preds = %.preheader133
  br i1 %lcmp.mod227.not, label %.lr.ph159.prol.loopexit, label %.lr.ph159.prol

.lr.ph159.prol:                                   ; preds = %.lr.ph159.preheader, %.lr.ph159.prol
  %.3158.prol = phi i32 [ %67, %.lr.ph159.prol ], [ %.0104, %.lr.ph159.preheader ]
  %.388157.prol = phi ptr [ %70, %.lr.ph159.prol ], [ %.0105181, %.lr.ph159.preheader ]
  %.396156.prol = phi ptr [ %69, %.lr.ph159.prol ], [ %48, %.lr.ph159.preheader ]
  %prol.iter228 = phi i32 [ %prol.iter228.next, %.lr.ph159.prol ], [ 0, %.lr.ph159.preheader ]
  %67 = add nsw i32 %.3158.prol, -1
  %68 = load i32, ptr %.388157.prol, align 4, !tbaa !32
  %69 = getelementptr inbounds i8, ptr %.396156.prol, i64 4
  store i32 %68, ptr %.396156.prol, align 4, !tbaa !32
  %70 = getelementptr inbounds i32, ptr %.388157.prol, i64 %12
  %prol.iter228.next = add i32 %prol.iter228, 1
  %prol.iter228.cmp.not = icmp eq i32 %prol.iter228.next, %xtraiter226
  br i1 %prol.iter228.cmp.not, label %.lr.ph159.prol.loopexit, label %.lr.ph159.prol, !llvm.loop !37

.lr.ph159.prol.loopexit:                          ; preds = %.lr.ph159.prol, %.lr.ph159.preheader
  %.3158.unr = phi i32 [ %.0104, %.lr.ph159.preheader ], [ %67, %.lr.ph159.prol ]
  %.388157.unr = phi ptr [ %.0105181, %.lr.ph159.preheader ], [ %70, %.lr.ph159.prol ]
  %.396156.unr = phi ptr [ %48, %.lr.ph159.preheader ], [ %69, %.lr.ph159.prol ]
  br i1 %27, label %.loopexit134, label %.lr.ph159

.lr.ph154:                                        ; preds = %.lr.ph154.prol.loopexit, %.lr.ph154
  %.084153 = phi i32 [ %83, %.lr.ph154 ], [ %.084153.unr, %.lr.ph154.prol.loopexit ]
  %.085152 = phi ptr [ %87, %.lr.ph154 ], [ %.085152.unr, %.lr.ph154.prol.loopexit ]
  %.093151 = phi ptr [ %86, %.lr.ph154 ], [ %.093151.unr, %.lr.ph154.prol.loopexit ]
  %71 = load i32, ptr %.085152, align 4, !tbaa !32
  %sext125 = shl i32 %71, 24
  %72 = ashr exact i32 %sext125, 24
  %73 = getelementptr inbounds i8, ptr %.093151, i64 4
  store i32 %72, ptr %.093151, align 4, !tbaa !32
  %74 = getelementptr inbounds i32, ptr %.085152, i64 %12
  %75 = load i32, ptr %74, align 4, !tbaa !32
  %sext125.1 = shl i32 %75, 24
  %76 = ashr exact i32 %sext125.1, 24
  %77 = getelementptr inbounds i8, ptr %.093151, i64 8
  store i32 %76, ptr %73, align 4, !tbaa !32
  %78 = getelementptr inbounds i32, ptr %74, i64 %12
  %79 = load i32, ptr %78, align 4, !tbaa !32
  %sext125.2 = shl i32 %79, 24
  %80 = ashr exact i32 %sext125.2, 24
  %81 = getelementptr inbounds i8, ptr %.093151, i64 12
  store i32 %80, ptr %77, align 4, !tbaa !32
  %82 = getelementptr inbounds i32, ptr %78, i64 %12
  %83 = add nsw i32 %.084153, -4
  %84 = load i32, ptr %82, align 4, !tbaa !32
  %sext125.3 = shl i32 %84, 24
  %85 = ashr exact i32 %sext125.3, 24
  %86 = getelementptr inbounds i8, ptr %.093151, i64 16
  store i32 %85, ptr %81, align 4, !tbaa !32
  %87 = getelementptr inbounds i32, ptr %82, i64 %12
  %.not124.3 = icmp eq i32 %83, 0
  br i1 %.not124.3, label %.loopexit134, label %.lr.ph154, !llvm.loop !38

.lr.ph149:                                        ; preds = %.lr.ph149.prol.loopexit, %.lr.ph149
  %.1148 = phi i32 [ %100, %.lr.ph149 ], [ %.1148.unr, %.lr.ph149.prol.loopexit ]
  %.186147 = phi ptr [ %104, %.lr.ph149 ], [ %.186147.unr, %.lr.ph149.prol.loopexit ]
  %.194146 = phi ptr [ %103, %.lr.ph149 ], [ %.194146.unr, %.lr.ph149.prol.loopexit ]
  %88 = load i32, ptr %.186147, align 4, !tbaa !32
  %sext123 = shl i32 %88, 16
  %89 = ashr exact i32 %sext123, 16
  %90 = getelementptr inbounds i8, ptr %.194146, i64 4
  store i32 %89, ptr %.194146, align 4, !tbaa !32
  %91 = getelementptr inbounds i32, ptr %.186147, i64 %12
  %92 = load i32, ptr %91, align 4, !tbaa !32
  %sext123.1 = shl i32 %92, 16
  %93 = ashr exact i32 %sext123.1, 16
  %94 = getelementptr inbounds i8, ptr %.194146, i64 8
  store i32 %93, ptr %90, align 4, !tbaa !32
  %95 = getelementptr inbounds i32, ptr %91, i64 %12
  %96 = load i32, ptr %95, align 4, !tbaa !32
  %sext123.2 = shl i32 %96, 16
  %97 = ashr exact i32 %sext123.2, 16
  %98 = getelementptr inbounds i8, ptr %.194146, i64 12
  store i32 %97, ptr %94, align 4, !tbaa !32
  %99 = getelementptr inbounds i32, ptr %95, i64 %12
  %100 = add nsw i32 %.1148, -4
  %101 = load i32, ptr %99, align 4, !tbaa !32
  %sext123.3 = shl i32 %101, 16
  %102 = ashr exact i32 %sext123.3, 16
  %103 = getelementptr inbounds i8, ptr %.194146, i64 16
  store i32 %102, ptr %98, align 4, !tbaa !32
  %104 = getelementptr inbounds i32, ptr %99, i64 %12
  %.not122.3 = icmp eq i32 %100, 0
  br i1 %.not122.3, label %.loopexit134, label %.lr.ph149, !llvm.loop !40

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.2144 = phi i32 [ %120, %.lr.ph ], [ %.2144.unr, %.lr.ph.prol.loopexit ]
  %.287143 = phi ptr [ %125, %.lr.ph ], [ %.287143.unr, %.lr.ph.prol.loopexit ]
  %.295142 = phi ptr [ %124, %.lr.ph ], [ %.295142.unr, %.lr.ph.prol.loopexit ]
  %105 = load i32, ptr %.287143, align 4, !tbaa !32
  %106 = shl i32 %105, 8
  %107 = ashr exact i32 %106, 8
  %108 = getelementptr inbounds i8, ptr %.295142, i64 4
  store i32 %107, ptr %.295142, align 4, !tbaa !32
  %109 = getelementptr inbounds i32, ptr %.287143, i64 %12
  %110 = load i32, ptr %109, align 4, !tbaa !32
  %111 = shl i32 %110, 8
  %112 = ashr exact i32 %111, 8
  %113 = getelementptr inbounds i8, ptr %.295142, i64 8
  store i32 %112, ptr %108, align 4, !tbaa !32
  %114 = getelementptr inbounds i32, ptr %109, i64 %12
  %115 = load i32, ptr %114, align 4, !tbaa !32
  %116 = shl i32 %115, 8
  %117 = ashr exact i32 %116, 8
  %118 = getelementptr inbounds i8, ptr %.295142, i64 12
  store i32 %117, ptr %113, align 4, !tbaa !32
  %119 = getelementptr inbounds i32, ptr %114, i64 %12
  %120 = add nsw i32 %.2144, -4
  %121 = load i32, ptr %119, align 4, !tbaa !32
  %122 = shl i32 %121, 8
  %123 = ashr exact i32 %122, 8
  %124 = getelementptr inbounds i8, ptr %.295142, i64 16
  store i32 %123, ptr %118, align 4, !tbaa !32
  %125 = getelementptr inbounds i32, ptr %119, i64 %12
  %.not121.3 = icmp eq i32 %120, 0
  br i1 %.not121.3, label %.loopexit134, label %.lr.ph, !llvm.loop !41

.lr.ph159:                                        ; preds = %.lr.ph159.prol.loopexit, %.lr.ph159
  %.3158 = phi i32 [ %147, %.lr.ph159 ], [ %.3158.unr, %.lr.ph159.prol.loopexit ]
  %.388157 = phi ptr [ %150, %.lr.ph159 ], [ %.388157.unr, %.lr.ph159.prol.loopexit ]
  %.396156 = phi ptr [ %149, %.lr.ph159 ], [ %.396156.unr, %.lr.ph159.prol.loopexit ]
  %126 = load i32, ptr %.388157, align 4, !tbaa !32
  %127 = getelementptr inbounds i8, ptr %.396156, i64 4
  store i32 %126, ptr %.396156, align 4, !tbaa !32
  %128 = getelementptr inbounds i32, ptr %.388157, i64 %12
  %129 = load i32, ptr %128, align 4, !tbaa !32
  %130 = getelementptr inbounds i8, ptr %.396156, i64 8
  store i32 %129, ptr %127, align 4, !tbaa !32
  %131 = getelementptr inbounds i32, ptr %128, i64 %12
  %132 = load i32, ptr %131, align 4, !tbaa !32
  %133 = getelementptr inbounds i8, ptr %.396156, i64 12
  store i32 %132, ptr %130, align 4, !tbaa !32
  %134 = getelementptr inbounds i32, ptr %131, i64 %12
  %135 = load i32, ptr %134, align 4, !tbaa !32
  %136 = getelementptr inbounds i8, ptr %.396156, i64 16
  store i32 %135, ptr %133, align 4, !tbaa !32
  %137 = getelementptr inbounds i32, ptr %134, i64 %12
  %138 = load i32, ptr %137, align 4, !tbaa !32
  %139 = getelementptr inbounds i8, ptr %.396156, i64 20
  store i32 %138, ptr %136, align 4, !tbaa !32
  %140 = getelementptr inbounds i32, ptr %137, i64 %12
  %141 = load i32, ptr %140, align 4, !tbaa !32
  %142 = getelementptr inbounds i8, ptr %.396156, i64 24
  store i32 %141, ptr %139, align 4, !tbaa !32
  %143 = getelementptr inbounds i32, ptr %140, i64 %12
  %144 = load i32, ptr %143, align 4, !tbaa !32
  %145 = getelementptr inbounds i8, ptr %.396156, i64 28
  store i32 %144, ptr %142, align 4, !tbaa !32
  %146 = getelementptr inbounds i32, ptr %143, i64 %12
  %147 = add nsw i32 %.3158, -8
  %148 = load i32, ptr %146, align 4, !tbaa !32
  %149 = getelementptr inbounds i8, ptr %.396156, i64 32
  store i32 %148, ptr %145, align 4, !tbaa !32
  %150 = getelementptr inbounds i32, ptr %146, i64 %12
  %.not126.7 = icmp eq i32 %147, 0
  br i1 %.not126.7, label %.loopexit134, label %.lr.ph159, !llvm.loop !42

151:                                              ; preds = %35
  switch i32 %49, label %.preheader [
    i32 1, label %.preheader127
    i32 2, label %.preheader129
    i32 3, label %.preheader131
  ]

.preheader131:                                    ; preds = %151
  br i1 %.not121141, label %.loopexit134, label %.lr.ph164.preheader

.lr.ph164.preheader:                              ; preds = %.preheader131
  br i1 %lcmp.mod230.not, label %.lr.ph164.prol.loopexit, label %.lr.ph164.prol

.lr.ph164.prol:                                   ; preds = %.lr.ph164.preheader
  %152 = load i32, ptr %.0105181, align 4, !tbaa !32
  %153 = shl i32 %152, 8
  %154 = ashr exact i32 %153, 8
  %155 = getelementptr inbounds i8, ptr %48, i64 4
  store i32 %154, ptr %48, align 4, !tbaa !32
  %156 = getelementptr inbounds i8, ptr %.0105181, i64 4
  %157 = load i32, ptr %156, align 4, !tbaa !32
  %158 = shl i32 %157, 8
  %159 = ashr exact i32 %158, 8
  %160 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 %159, ptr %155, align 4, !tbaa !32
  %161 = getelementptr inbounds i32, ptr %.0105181, i64 %12
  br label %.lr.ph164.prol.loopexit

.lr.ph164.prol.loopexit:                          ; preds = %.lr.ph164.prol, %.lr.ph164.preheader
  %.6163.unr = phi i32 [ %.0104, %.lr.ph164.preheader ], [ %28, %.lr.ph164.prol ]
  %.691162.unr = phi ptr [ %.0105181, %.lr.ph164.preheader ], [ %161, %.lr.ph164.prol ]
  %.699161.unr = phi ptr [ %48, %.lr.ph164.preheader ], [ %160, %.lr.ph164.prol ]
  br i1 %29, label %.loopexit134, label %.lr.ph164

.preheader129:                                    ; preds = %151
  br i1 %.not121141, label %.loopexit134, label %.lr.ph169.preheader

.lr.ph169.preheader:                              ; preds = %.preheader129
  br i1 %lcmp.mod233.not, label %.lr.ph169.prol.loopexit, label %.lr.ph169.prol

.lr.ph169.prol:                                   ; preds = %.lr.ph169.preheader
  %162 = load i32, ptr %.0105181, align 4, !tbaa !32
  %sext.prol = shl i32 %162, 16
  %163 = ashr exact i32 %sext.prol, 16
  %164 = getelementptr inbounds i8, ptr %48, i64 4
  store i32 %163, ptr %48, align 4, !tbaa !32
  %165 = getelementptr inbounds i8, ptr %.0105181, i64 4
  %166 = load i32, ptr %165, align 4, !tbaa !32
  %sext116.prol = shl i32 %166, 16
  %167 = ashr exact i32 %sext116.prol, 16
  %168 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 %167, ptr %164, align 4, !tbaa !32
  %169 = getelementptr inbounds i32, ptr %.0105181, i64 %12
  br label %.lr.ph169.prol.loopexit

.lr.ph169.prol.loopexit:                          ; preds = %.lr.ph169.prol, %.lr.ph169.preheader
  %.5168.unr = phi i32 [ %.0104, %.lr.ph169.preheader ], [ %30, %.lr.ph169.prol ]
  %.590167.unr = phi ptr [ %.0105181, %.lr.ph169.preheader ], [ %169, %.lr.ph169.prol ]
  %.598166.unr = phi ptr [ %48, %.lr.ph169.preheader ], [ %168, %.lr.ph169.prol ]
  br i1 %31, label %.loopexit134, label %.lr.ph169

.preheader127:                                    ; preds = %151
  br i1 %.not121141, label %.loopexit134, label %.lr.ph174.preheader

.lr.ph174.preheader:                              ; preds = %.preheader127
  br i1 %lcmp.mod236.not, label %.lr.ph174.prol.loopexit, label %.lr.ph174.prol

.lr.ph174.prol:                                   ; preds = %.lr.ph174.preheader
  %170 = load i32, ptr %.0105181, align 4, !tbaa !32
  %sext118.prol = shl i32 %170, 24
  %171 = ashr exact i32 %sext118.prol, 24
  %172 = getelementptr inbounds i8, ptr %48, i64 4
  store i32 %171, ptr %48, align 4, !tbaa !32
  %173 = getelementptr inbounds i8, ptr %.0105181, i64 4
  %174 = load i32, ptr %173, align 4, !tbaa !32
  %sext119.prol = shl i32 %174, 24
  %175 = ashr exact i32 %sext119.prol, 24
  %176 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 %175, ptr %172, align 4, !tbaa !32
  %177 = getelementptr inbounds i32, ptr %.0105181, i64 %12
  br label %.lr.ph174.prol.loopexit

.lr.ph174.prol.loopexit:                          ; preds = %.lr.ph174.prol, %.lr.ph174.preheader
  %.4173.unr = phi i32 [ %.0104, %.lr.ph174.preheader ], [ %32, %.lr.ph174.prol ]
  %.489172.unr = phi ptr [ %.0105181, %.lr.ph174.preheader ], [ %177, %.lr.ph174.prol ]
  %.497171.unr = phi ptr [ %48, %.lr.ph174.preheader ], [ %176, %.lr.ph174.prol ]
  br i1 %33, label %.loopexit134, label %.lr.ph174

.preheader:                                       ; preds = %151
  br i1 %.not121141, label %.loopexit134, label %.lr.ph179.preheader

.lr.ph179.preheader:                              ; preds = %.preheader
  br i1 %lcmp.mod239.not, label %.lr.ph179.prol.loopexit, label %.lr.ph179.prol

.lr.ph179.prol:                                   ; preds = %.lr.ph179.preheader, %.lr.ph179.prol
  %.7178.prol = phi i32 [ %178, %.lr.ph179.prol ], [ %.0104, %.lr.ph179.preheader ]
  %.792177.prol = phi ptr [ %184, %.lr.ph179.prol ], [ %.0105181, %.lr.ph179.preheader ]
  %.7100176.prol = phi ptr [ %183, %.lr.ph179.prol ], [ %48, %.lr.ph179.preheader ]
  %prol.iter240 = phi i32 [ %prol.iter240.next, %.lr.ph179.prol ], [ 0, %.lr.ph179.preheader ]
  %178 = add nsw i32 %.7178.prol, -1
  %179 = load i32, ptr %.792177.prol, align 4, !tbaa !32
  %180 = getelementptr inbounds i8, ptr %.7100176.prol, i64 4
  store i32 %179, ptr %.7100176.prol, align 4, !tbaa !32
  %181 = getelementptr inbounds i8, ptr %.792177.prol, i64 4
  %182 = load i32, ptr %181, align 4, !tbaa !32
  %183 = getelementptr inbounds i8, ptr %.7100176.prol, i64 8
  store i32 %182, ptr %180, align 4, !tbaa !32
  %184 = getelementptr inbounds i32, ptr %.792177.prol, i64 %12
  %prol.iter240.next = add i32 %prol.iter240, 1
  %prol.iter240.cmp.not = icmp eq i32 %prol.iter240.next, %xtraiter238
  br i1 %prol.iter240.cmp.not, label %.lr.ph179.prol.loopexit, label %.lr.ph179.prol, !llvm.loop !43

.lr.ph179.prol.loopexit:                          ; preds = %.lr.ph179.prol, %.lr.ph179.preheader
  %.7178.unr = phi i32 [ %.0104, %.lr.ph179.preheader ], [ %178, %.lr.ph179.prol ]
  %.792177.unr = phi ptr [ %.0105181, %.lr.ph179.preheader ], [ %184, %.lr.ph179.prol ]
  %.7100176.unr = phi ptr [ %48, %.lr.ph179.preheader ], [ %183, %.lr.ph179.prol ]
  br i1 %34, label %.loopexit134, label %.lr.ph179

.lr.ph174:                                        ; preds = %.lr.ph174.prol.loopexit, %.lr.ph174
  %.4173 = phi i32 [ %193, %.lr.ph174 ], [ %.4173.unr, %.lr.ph174.prol.loopexit ]
  %.489172 = phi ptr [ %201, %.lr.ph174 ], [ %.489172.unr, %.lr.ph174.prol.loopexit ]
  %.497171 = phi ptr [ %200, %.lr.ph174 ], [ %.497171.unr, %.lr.ph174.prol.loopexit ]
  %185 = load i32, ptr %.489172, align 4, !tbaa !32
  %sext118 = shl i32 %185, 24
  %186 = ashr exact i32 %sext118, 24
  %187 = getelementptr inbounds i8, ptr %.497171, i64 4
  store i32 %186, ptr %.497171, align 4, !tbaa !32
  %188 = getelementptr inbounds i8, ptr %.489172, i64 4
  %189 = load i32, ptr %188, align 4, !tbaa !32
  %sext119 = shl i32 %189, 24
  %190 = ashr exact i32 %sext119, 24
  %191 = getelementptr inbounds i8, ptr %.497171, i64 8
  store i32 %190, ptr %187, align 4, !tbaa !32
  %192 = getelementptr inbounds i32, ptr %.489172, i64 %12
  %193 = add nsw i32 %.4173, -2
  %194 = load i32, ptr %192, align 4, !tbaa !32
  %sext118.1 = shl i32 %194, 24
  %195 = ashr exact i32 %sext118.1, 24
  %196 = getelementptr inbounds i8, ptr %.497171, i64 12
  store i32 %195, ptr %191, align 4, !tbaa !32
  %197 = getelementptr inbounds i8, ptr %192, i64 4
  %198 = load i32, ptr %197, align 4, !tbaa !32
  %sext119.1 = shl i32 %198, 24
  %199 = ashr exact i32 %sext119.1, 24
  %200 = getelementptr inbounds i8, ptr %.497171, i64 16
  store i32 %199, ptr %196, align 4, !tbaa !32
  %201 = getelementptr inbounds i32, ptr %192, i64 %12
  %.not117.1 = icmp eq i32 %193, 0
  br i1 %.not117.1, label %.loopexit134, label %.lr.ph174, !llvm.loop !44

.lr.ph169:                                        ; preds = %.lr.ph169.prol.loopexit, %.lr.ph169
  %.5168 = phi i32 [ %210, %.lr.ph169 ], [ %.5168.unr, %.lr.ph169.prol.loopexit ]
  %.590167 = phi ptr [ %218, %.lr.ph169 ], [ %.590167.unr, %.lr.ph169.prol.loopexit ]
  %.598166 = phi ptr [ %217, %.lr.ph169 ], [ %.598166.unr, %.lr.ph169.prol.loopexit ]
  %202 = load i32, ptr %.590167, align 4, !tbaa !32
  %sext = shl i32 %202, 16
  %203 = ashr exact i32 %sext, 16
  %204 = getelementptr inbounds i8, ptr %.598166, i64 4
  store i32 %203, ptr %.598166, align 4, !tbaa !32
  %205 = getelementptr inbounds i8, ptr %.590167, i64 4
  %206 = load i32, ptr %205, align 4, !tbaa !32
  %sext116 = shl i32 %206, 16
  %207 = ashr exact i32 %sext116, 16
  %208 = getelementptr inbounds i8, ptr %.598166, i64 8
  store i32 %207, ptr %204, align 4, !tbaa !32
  %209 = getelementptr inbounds i32, ptr %.590167, i64 %12
  %210 = add nsw i32 %.5168, -2
  %211 = load i32, ptr %209, align 4, !tbaa !32
  %sext.1 = shl i32 %211, 16
  %212 = ashr exact i32 %sext.1, 16
  %213 = getelementptr inbounds i8, ptr %.598166, i64 12
  store i32 %212, ptr %208, align 4, !tbaa !32
  %214 = getelementptr inbounds i8, ptr %209, i64 4
  %215 = load i32, ptr %214, align 4, !tbaa !32
  %sext116.1 = shl i32 %215, 16
  %216 = ashr exact i32 %sext116.1, 16
  %217 = getelementptr inbounds i8, ptr %.598166, i64 16
  store i32 %216, ptr %213, align 4, !tbaa !32
  %218 = getelementptr inbounds i32, ptr %209, i64 %12
  %.not115.1 = icmp eq i32 %210, 0
  br i1 %.not115.1, label %.loopexit134, label %.lr.ph169, !llvm.loop !45

.lr.ph164:                                        ; preds = %.lr.ph164.prol.loopexit, %.lr.ph164
  %.6163 = phi i32 [ %229, %.lr.ph164 ], [ %.6163.unr, %.lr.ph164.prol.loopexit ]
  %.691162 = phi ptr [ %239, %.lr.ph164 ], [ %.691162.unr, %.lr.ph164.prol.loopexit ]
  %.699161 = phi ptr [ %238, %.lr.ph164 ], [ %.699161.unr, %.lr.ph164.prol.loopexit ]
  %219 = load i32, ptr %.691162, align 4, !tbaa !32
  %220 = shl i32 %219, 8
  %221 = ashr exact i32 %220, 8
  %222 = getelementptr inbounds i8, ptr %.699161, i64 4
  store i32 %221, ptr %.699161, align 4, !tbaa !32
  %223 = getelementptr inbounds i8, ptr %.691162, i64 4
  %224 = load i32, ptr %223, align 4, !tbaa !32
  %225 = shl i32 %224, 8
  %226 = ashr exact i32 %225, 8
  %227 = getelementptr inbounds i8, ptr %.699161, i64 8
  store i32 %226, ptr %222, align 4, !tbaa !32
  %228 = getelementptr inbounds i32, ptr %.691162, i64 %12
  %229 = add nsw i32 %.6163, -2
  %230 = load i32, ptr %228, align 4, !tbaa !32
  %231 = shl i32 %230, 8
  %232 = ashr exact i32 %231, 8
  %233 = getelementptr inbounds i8, ptr %.699161, i64 12
  store i32 %232, ptr %227, align 4, !tbaa !32
  %234 = getelementptr inbounds i8, ptr %228, i64 4
  %235 = load i32, ptr %234, align 4, !tbaa !32
  %236 = shl i32 %235, 8
  %237 = ashr exact i32 %236, 8
  %238 = getelementptr inbounds i8, ptr %.699161, i64 16
  store i32 %237, ptr %233, align 4, !tbaa !32
  %239 = getelementptr inbounds i32, ptr %228, i64 %12
  %.not114.1 = icmp eq i32 %229, 0
  br i1 %.not114.1, label %.loopexit134, label %.lr.ph164, !llvm.loop !46

.lr.ph179:                                        ; preds = %.lr.ph179.prol.loopexit, %.lr.ph179
  %.7178 = phi i32 [ %258, %.lr.ph179 ], [ %.7178.unr, %.lr.ph179.prol.loopexit ]
  %.792177 = phi ptr [ %264, %.lr.ph179 ], [ %.792177.unr, %.lr.ph179.prol.loopexit ]
  %.7100176 = phi ptr [ %263, %.lr.ph179 ], [ %.7100176.unr, %.lr.ph179.prol.loopexit ]
  %240 = load i32, ptr %.792177, align 4, !tbaa !32
  %241 = getelementptr inbounds i8, ptr %.7100176, i64 4
  store i32 %240, ptr %.7100176, align 4, !tbaa !32
  %242 = getelementptr inbounds i8, ptr %.792177, i64 4
  %243 = load i32, ptr %242, align 4, !tbaa !32
  %244 = getelementptr inbounds i8, ptr %.7100176, i64 8
  store i32 %243, ptr %241, align 4, !tbaa !32
  %245 = getelementptr inbounds i32, ptr %.792177, i64 %12
  %246 = load i32, ptr %245, align 4, !tbaa !32
  %247 = getelementptr inbounds i8, ptr %.7100176, i64 12
  store i32 %246, ptr %244, align 4, !tbaa !32
  %248 = getelementptr inbounds i8, ptr %245, i64 4
  %249 = load i32, ptr %248, align 4, !tbaa !32
  %250 = getelementptr inbounds i8, ptr %.7100176, i64 16
  store i32 %249, ptr %247, align 4, !tbaa !32
  %251 = getelementptr inbounds i32, ptr %245, i64 %12
  %252 = load i32, ptr %251, align 4, !tbaa !32
  %253 = getelementptr inbounds i8, ptr %.7100176, i64 20
  store i32 %252, ptr %250, align 4, !tbaa !32
  %254 = getelementptr inbounds i8, ptr %251, i64 4
  %255 = load i32, ptr %254, align 4, !tbaa !32
  %256 = getelementptr inbounds i8, ptr %.7100176, i64 24
  store i32 %255, ptr %253, align 4, !tbaa !32
  %257 = getelementptr inbounds i32, ptr %251, i64 %12
  %258 = add nsw i32 %.7178, -4
  %259 = load i32, ptr %257, align 4, !tbaa !32
  %260 = getelementptr inbounds i8, ptr %.7100176, i64 28
  store i32 %259, ptr %256, align 4, !tbaa !32
  %261 = getelementptr inbounds i8, ptr %257, i64 4
  %262 = load i32, ptr %261, align 4, !tbaa !32
  %263 = getelementptr inbounds i8, ptr %.7100176, i64 32
  store i32 %262, ptr %260, align 4, !tbaa !32
  %264 = getelementptr inbounds i32, ptr %257, i64 %12
  %.not120.3 = icmp eq i32 %258, 0
  br i1 %.not120.3, label %.loopexit134, label %.lr.ph179, !llvm.loop !47

.loopexit134:                                     ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %.lr.ph149.prol.loopexit, %.lr.ph149, %.lr.ph154.prol.loopexit, %.lr.ph154, %.lr.ph159.prol.loopexit, %.lr.ph159, %.lr.ph164.prol.loopexit, %.lr.ph164, %.lr.ph169.prol.loopexit, %.lr.ph169, %.lr.ph174.prol.loopexit, %.lr.ph174, %.lr.ph179.prol.loopexit, %.lr.ph179, %.preheader, %.preheader127, %.preheader129, %.preheader131, %.preheader133, %.preheader135, %.preheader137, %.preheader139
  %.sink = phi i64 [ 4, %.preheader139 ], [ 4, %.preheader137 ], [ 4, %.preheader135 ], [ 4, %.preheader133 ], [ 8, %.preheader131 ], [ 8, %.preheader129 ], [ 8, %.preheader127 ], [ 8, %.preheader ], [ 8, %.lr.ph179 ], [ 8, %.lr.ph179.prol.loopexit ], [ 8, %.lr.ph174 ], [ 8, %.lr.ph174.prol.loopexit ], [ 8, %.lr.ph169 ], [ 8, %.lr.ph169.prol.loopexit ], [ 8, %.lr.ph164 ], [ 8, %.lr.ph164.prol.loopexit ], [ 4, %.lr.ph159 ], [ 4, %.lr.ph159.prol.loopexit ], [ 4, %.lr.ph154 ], [ 4, %.lr.ph154.prol.loopexit ], [ 4, %.lr.ph149 ], [ 4, %.lr.ph149.prol.loopexit ], [ 4, %.lr.ph ], [ 4, %.lr.ph.prol.loopexit ]
  %265 = getelementptr inbounds i8, ptr %.0105181, i64 %.sink
  %266 = load i32, ptr %8, align 4, !tbaa !16
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %8, align 4, !tbaa !16
  %268 = load i32, ptr %9, align 8, !tbaa !17
  %269 = icmp slt i32 %267, %268
  br i1 %269, label %35, label %._crit_edge.loopexit, !llvm.loop !48

._crit_edge.loopexit:                             ; preds = %.loopexit134
  %.pre = load i32, ptr %6, align 8, !tbaa !14
  %.pre199 = load i32, ptr %7, align 8, !tbaa !15
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %13
  %270 = phi i32 [ %.pre199, %._crit_edge.loopexit ], [ %16, %13 ]
  %271 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %14, %13 ]
  %272 = mul i32 %.0104, %5
  %273 = zext i32 %272 to i64
  %274 = getelementptr inbounds i32, ptr %.0107187, i64 %273
  %275 = sub i32 %.0108186, %.0104
  %276 = add i32 %271, %.0104
  store i32 %276, ptr %6, align 8, !tbaa !14
  %277 = icmp eq i32 %276, %270
  br i1 %277, label %278, label %.critedge

278:                                              ; preds = %._crit_edge
  %279 = tail call i32 @pack_streams(ptr noundef nonnull %0, i32 noundef %270)
  %.not112 = icmp eq i32 %279, 0
  br i1 %.not112, label %._crit_edge190, label %.critedge, !llvm.loop !49

.critedge:                                        ; preds = %278, %._crit_edge
  %.not = icmp eq i32 %275, 0
  br i1 %.not, label %._crit_edge190, label %13

._crit_edge190:                                   ; preds = %278, %.critedge, %3
  %.2103 = phi i32 [ 1, %3 ], [ 1, %.critedge ], [ 0, %278 ]
  ret i32 %.2103
}

; Function Attrs: nounwind uwtable
declare hidden i32 @pack_streams(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #1

attributes #0 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !11, i64 28}
!6 = !{!"WavpackContext", !7, i64 0, !12, i64 88, !11, i64 96, !11, i64 100, !12, i64 104, !11, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !12, i64 288, !12, i64 296, !9, i64 304, !12, i64 312, !12, i64 320, !11, i64 328, !11, i64 332, !12, i64 336, !9, i64 344, !12, i64 352, !9, i64 360}
!7 = !{!"", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !9, i64 56, !9, i64 72, !11, i64 76, !12, i64 80}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"long", !9, i64 0}
!14 = !{!6, !11, i64 256}
!15 = !{!6, !11, i64 248}
!16 = !{!6, !11, i64 276}
!17 = !{!6, !11, i64 280}
!18 = !{!6, !12, i64 288}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !12, i64 120}
!21 = !{!"", !22, i64 0, !24, i64 12, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !13, i64 128, !13, i64 136, !11, i64 144, !11, i64 148, !11, i64 152, !9, i64 156, !9, i64 157, !9, i64 158, !9, i64 159, !9, i64 160, !9, i64 161, !9, i64 162, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !25, i64 200, !25, i64 248, !25, i64 296, !8, i64 344, !9, i64 348, !9, i64 349, !9, i64 350, !9, i64 351, !9, i64 352, !9, i64 353, !9, i64 354, !9, i64 355, !26, i64 360, !9, i64 432, !28, i64 1968, !12, i64 2064, !29, i64 2072}
!22 = !{!"", !9, i64 0, !23, i64 4, !23, i64 6, !11, i64 8}
!23 = !{!"short", !9, i64 0}
!24 = !{!"words_data", !9, i64 0, !9, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !9, i64 36}
!25 = !{!"bs", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !11, i64 40}
!26 = !{!"", !9, i64 0, !9, i64 8, !9, i64 16, !27, i64 24, !27, i64 32, !27, i64 40, !12, i64 48, !12, i64 56, !11, i64 64}
!27 = !{!"double", !9, i64 0}
!28 = !{!"decorr_pass", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !9, i64 16, !9, i64 48, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92}
!29 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !9, i64 40, !9, i64 41, !11, i64 44, !11, i64 48, !11, i64 52, !12, i64 56, !11, i64 64, !11, i64 68, !11, i64 72, !9, i64 76, !12, i64 160}
!30 = !{!21, !11, i64 8}
!31 = !{!6, !11, i64 12}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.unroll.disable"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}
!41 = distinct !{!41, !39}
!42 = distinct !{!42, !39}
!43 = distinct !{!43, !34}
!44 = distinct !{!44, !39}
!45 = distinct !{!45, !39}
!46 = distinct !{!46, !39}
!47 = distinct !{!47, !39}
!48 = distinct !{!48, !39}
!49 = distinct !{!49, !39}


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