; LLVM IR from glaretechnologies/substrata :: opus/opus-1.3.1/silk (encode_indices)

; 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.silk_encoder_state = type { [2 x i32], i32, i32, %struct.silk_LP_state, %struct.silk_VAD_state, %struct.silk_nsq_state, [16 x i16], i32, i32, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, [4 x i32], i32, i32, [3 x i8], i8, [3 x i32], %struct.SideInfoIndices, [320 x i8], i32, [322 x i16], i32, i32, i32, i32, i32, i32, i32, i32, i16, %struct._silk_resampler_state_struct, i32, i32, i32, i32, i32, i32, [3 x %struct.SideInfoIndices], [3 x [320 x i8]] }
%struct.silk_LP_state = type { [2 x i32], i32, i32, i32 }
%struct.silk_VAD_state = type { [2 x i32], [2 x i32], [2 x i32], [4 x i32], [4 x i32], i16, [4 x i32], [4 x i32], [4 x i32], i32 }
%struct.silk_nsq_state = type { [640 x i16], [640 x i32], [96 x i32], [24 x i32], i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.SideInfoIndices = type { [4 x i8], [4 x i8], [17 x i8], i16, i8, i8, i8, i8, i8, i8, i8 }
%struct._silk_resampler_state_struct = type { [6 x i32], %union.anon, [48 x i16], i32, i32, i32, i32, i32, i32, i32, i32, ptr }
%union.anon = type { [36 x i32] }
%struct.silk_NLSF_CB_struct = type { i16, i16, i16, i16, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@silk_type_offset_VAD_iCDF = external constant [4 x i8], align 1
@silk_type_offset_no_VAD_iCDF = external constant [2 x i8], align 1
@silk_delta_gain_iCDF = external constant [41 x i8], align 16
@silk_gain_iCDF = external constant [3 x [8 x i8]], align 16
@silk_uniform8_iCDF = external constant [8 x i8], align 1
@silk_NLSF_EXT_iCDF = external constant [7 x i8], align 1
@silk_NLSF_interpolation_factor_iCDF = external constant [5 x i8], align 1
@silk_pitch_delta_iCDF = external constant [21 x i8], align 16
@silk_pitch_lag_iCDF = external constant [32 x i8], align 16
@silk_LTP_per_index_iCDF = external constant [3 x i8], align 1
@silk_LTP_gain_iCDF_ptrs = external constant [3 x ptr], align 16
@silk_LTPscale_iCDF = external constant [3 x i8], align 1
@silk_uniform4_iCDF = external constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @silk_encode_indices(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [16 x i16], align 16
  %17 = alloca [16 x i8], align 16
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %29

23:                                               ; preds = %5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.silk_encoder_state, ptr %24, i32 0, i32 75
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [3 x %struct.SideInfoIndices], ptr %25, i64 0, i64 %27
  store ptr %28, ptr %18, align 8, !tbaa !5
  br label %32

29:                                               ; preds = %5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.silk_encoder_state, ptr %30, i32 0, i32 55
  store ptr %31, ptr %18, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %29, %23
  %33 = load ptr, ptr %18, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.SideInfoIndices, ptr %33, i32 0, i32 5
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = sext i8 %35 to i32
  %37 = mul nsw i32 2, %36
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.SideInfoIndices, ptr %38, i32 0, i32 6
  %40 = load i8, ptr %39, align 2, !tbaa !14
  %41 = sext i8 %40 to i32
  %42 = add nsw i32 %37, %41
  store i32 %42, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %48, label %45

45:                                               ; preds = %32
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = icmp sge i32 %46, 2
  br i1 %47, label %48, label %52

48:                                               ; preds = %45, %32
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = sub nsw i32 %50, 2
  call void @ec_enc_icdf(ptr noundef %49, i32 noundef %51, ptr noundef @silk_type_offset_VAD_iCDF, i32 noundef 8)
  br label %55

52:                                               ; preds = %45
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load i32, ptr %13, align 4, !tbaa !9
  call void @ec_enc_icdf(ptr noundef %53, i32 noundef %54, ptr noundef @silk_type_offset_no_VAD_iCDF, i32 noundef 8)
  br label %55

55:                                               ; preds = %52, %48
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = icmp eq i32 %56, 2
  br i1 %57, label %58, label %65

58:                                               ; preds = %55
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.SideInfoIndices, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds [4 x i8], ptr %61, i64 0, i64 0
  %63 = load i8, ptr %62, align 2, !tbaa !15
  %64 = sext i8 %63 to i32
  call void @ec_enc_icdf(ptr noundef %59, i32 noundef %64, ptr noundef @silk_delta_gain_iCDF, i32 noundef 8)
  br label %86

65:                                               ; preds = %55
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load ptr, ptr %18, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.SideInfoIndices, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds [4 x i8], ptr %68, i64 0, i64 0
  %70 = load i8, ptr %69, align 2, !tbaa !15
  %71 = sext i8 %70 to i32
  %72 = ashr i32 %71, 3
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.SideInfoIndices, ptr %73, i32 0, i32 5
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = sext i8 %75 to i64
  %77 = getelementptr inbounds [3 x [8 x i8]], ptr @silk_gain_iCDF, i64 0, i64 %76
  %78 = getelementptr inbounds [8 x i8], ptr %77, i64 0, i64 0
  call void @ec_enc_icdf(ptr noundef %66, i32 noundef %72, ptr noundef %78, i32 noundef 8)
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load ptr, ptr %18, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.SideInfoIndices, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds [4 x i8], ptr %81, i64 0, i64 0
  %83 = load i8, ptr %82, align 2, !tbaa !15
  %84 = sext i8 %83 to i32
  %85 = and i32 %84, 7
  call void @ec_enc_icdf(ptr noundef %79, i32 noundef %85, ptr noundef @silk_uniform8_iCDF, i32 noundef 8)
  br label %86

86:                                               ; preds = %65, %58
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %102, %86
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.silk_encoder_state, ptr %89, i32 0, i32 20
  %91 = load i32, ptr %90, align 4, !tbaa !16
  %92 = icmp slt i32 %88, %91
  br i1 %92, label %93, label %105

93:                                               ; preds = %87
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.SideInfoIndices, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [4 x i8], ptr %96, i64 0, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !15
  %101 = sext i8 %100 to i32
  call void @ec_enc_icdf(ptr noundef %94, i32 noundef %101, ptr noundef @silk_delta_gain_iCDF, i32 noundef 8)
  br label %102

102:                                              ; preds = %93
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %11, align 4, !tbaa !9
  br label %87, !llvm.loop !22

105:                                              ; preds = %87
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.SideInfoIndices, ptr %107, i32 0, i32 2
  %109 = getelementptr inbounds [17 x i8], ptr %108, i64 0, i64 0
  %110 = load i8, ptr %109, align 2, !tbaa !15
  %111 = sext i8 %110 to i32
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.silk_encoder_state, ptr %112, i32 0, i32 48
  %114 = load ptr, ptr %113, align 8, !tbaa !24
  %115 = getelementptr inbounds %struct.silk_NLSF_CB_struct, ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !25
  %117 = load ptr, ptr %18, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.SideInfoIndices, ptr %117, i32 0, i32 5
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %120 = sext i8 %119 to i32
  %121 = ashr i32 %120, 1
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.silk_encoder_state, ptr %122, i32 0, i32 48
  %124 = load ptr, ptr %123, align 8, !tbaa !24
  %125 = getelementptr inbounds %struct.silk_NLSF_CB_struct, ptr %124, i32 0, i32 0
  %126 = load i16, ptr %125, align 8, !tbaa !27
  %127 = sext i16 %126 to i32
  %128 = mul nsw i32 %121, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %116, i64 %129
  call void @ec_enc_icdf(ptr noundef %106, i32 noundef %111, ptr noundef %130, i32 noundef 8)
  %131 = getelementptr inbounds [16 x i16], ptr %16, i64 0, i64 0
  %132 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.silk_encoder_state, ptr %133, i32 0, i32 48
  %135 = load ptr, ptr %134, align 8, !tbaa !24
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.SideInfoIndices, ptr %136, i32 0, i32 2
  %138 = getelementptr inbounds [17 x i8], ptr %137, i64 0, i64 0
  %139 = load i8, ptr %138, align 2, !tbaa !15
  %140 = sext i8 %139 to i32
  call void @silk_NLSF_unpack(ptr noundef %131, ptr noundef %132, ptr noundef %135, i32 noundef %140)
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %241, %105
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.silk_encoder_state, ptr %143, i32 0, i32 48
  %145 = load ptr, ptr %144, align 8, !tbaa !24
  %146 = getelementptr inbounds %struct.silk_NLSF_CB_struct, ptr %145, i32 0, i32 1
  %147 = load i16, ptr %146, align 2, !tbaa !28
  %148 = sext i16 %147 to i32
  %149 = icmp slt i32 %142, %148
  br i1 %149, label %150, label %244

150:                                              ; preds = %141
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.SideInfoIndices, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %11, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [17 x i8], ptr %152, i64 0, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !15
  %158 = sext i8 %157 to i32
  %159 = icmp sge i32 %158, 4
  br i1 %159, label %160, label %183

160:                                              ; preds = %150
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.silk_encoder_state, ptr %162, i32 0, i32 48
  %164 = load ptr, ptr %163, align 8, !tbaa !24
  %165 = getelementptr inbounds %struct.silk_NLSF_CB_struct, ptr %164, i32 0, i32 9
  %166 = load ptr, ptr %165, align 8, !tbaa !29
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [16 x i16], ptr %16, i64 0, i64 %168
  %170 = load i16, ptr %169, align 2, !tbaa !30
  %171 = sext i16 %170 to i64
  %172 = getelementptr inbounds i8, ptr %166, i64 %171
  call void @ec_enc_icdf(ptr noundef %161, i32 noundef 8, ptr noundef %172, i32 noundef 8)
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  %174 = load ptr, ptr %18, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.SideInfoIndices, ptr %174, i32 0, i32 2
  %176 = load i32, ptr %11, align 4, !tbaa !9
  %177 = add nsw i32 %176, 1
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [17 x i8], ptr %175, i64 0, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !15
  %181 = sext i8 %180 to i32
  %182 = sub nsw i32 %181, 4
  call void @ec_enc_icdf(ptr noundef %173, i32 noundef %182, ptr noundef @silk_NLSF_EXT_iCDF, i32 noundef 8)
  br label %240

183:                                              ; preds = %150
  %184 = load ptr, ptr %18, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.SideInfoIndices, ptr %184, i32 0, i32 2
  %186 = load i32, ptr %11, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [17 x i8], ptr %185, i64 0, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !15
  %191 = sext i8 %190 to i32
  %192 = icmp sle i32 %191, -4
  br i1 %192, label %193, label %217

193:                                              ; preds = %183
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.silk_encoder_state, ptr %195, i32 0, i32 48
  %197 = load ptr, ptr %196, align 8, !tbaa !24
  %198 = getelementptr inbounds %struct.silk_NLSF_CB_struct, ptr %197, i32 0, i32 9
  %199 = load ptr, ptr %198, align 8, !tbaa !29
  %200 = load i32, ptr %11, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [16 x i16], ptr %16, i64 0, i64 %201
  %203 = load i16, ptr %202, align 2, !tbaa !30
  %204 = sext i16 %203 to i64
  %205 = getelementptr inbounds i8, ptr %199, i64 %204
  call void @ec_enc_icdf(ptr noundef %194, i32 noundef 0, ptr noundef %205, i32 noundef 8)
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = load ptr, ptr %18, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.SideInfoIndices, ptr %207, i32 0, i32 2
  %209 = load i32, ptr %11, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [17 x i8], ptr %208, i64 0, i64 %211
  %213 = load i8, ptr %212, align 1, !tbaa !15
  %214 = sext i8 %213 to i32
  %215 = sub nsw i32 0, %214
  %216 = sub nsw i32 %215, 4
  call void @ec_enc_icdf(ptr noundef %206, i32 noundef %216, ptr noundef @silk_NLSF_EXT_iCDF, i32 noundef 8)
  br label %239

217:                                              ; preds = %183
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = load ptr, ptr %18, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.SideInfoIndices, ptr %219, i32 0, i32 2
  %221 = load i32, ptr %11, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [17 x i8], ptr %220, i64 0, i64 %223
  %225 = load i8, ptr %224, align 1, !tbaa !15
  %226 = sext i8 %225 to i32
  %227 = add nsw i32 %226, 4
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.silk_encoder_state, ptr %228, i32 0, i32 48
  %230 = load ptr, ptr %229, align 8, !tbaa !24
  %231 = getelementptr inbounds %struct.silk_NLSF_CB_struct, ptr %230, i32 0, i32 9
  %232 = load ptr, ptr %231, align 8, !tbaa !29
  %233 = load i32, ptr %11, align 4, !tbaa !9
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [16 x i16], ptr %16, i64 0, i64 %234
  %236 = load i16, ptr %235, align 2, !tbaa !30
  %237 = sext i16 %236 to i64
  %238 = getelementptr inbounds i8, ptr %232, i64 %237
  call void @ec_enc_icdf(ptr noundef %218, i32 noundef %227, ptr noundef %238, i32 noundef 8)
  br label %239

239:                                              ; preds = %217, %193
  br label %240

240:                                              ; preds = %239, %160
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %11, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %11, align 4, !tbaa !9
  br label %141, !llvm.loop !31

244:                                              ; preds = %141
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.silk_encoder_state, ptr %245, i32 0, i32 20
  %247 = load i32, ptr %246, align 4, !tbaa !16
  %248 = icmp eq i32 %247, 4
  br i1 %248, label %249, label %255

249:                                              ; preds = %244
  %250 = load ptr, ptr %7, align 8, !tbaa !5
  %251 = load ptr, ptr %18, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.SideInfoIndices, ptr %251, i32 0, i32 7
  %253 = load i8, ptr %252, align 1, !tbaa !32
  %254 = sext i8 %253 to i32
  call void @ec_enc_icdf(ptr noundef %250, i32 noundef %254, ptr noundef @silk_NLSF_interpolation_factor_iCDF, i32 noundef 8)
  br label %255

255:                                              ; preds = %249, %244
  %256 = load ptr, ptr %18, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.SideInfoIndices, ptr %256, i32 0, i32 5
  %258 = load i8, ptr %257, align 1, !tbaa !11
  %259 = sext i8 %258 to i32
  %260 = icmp eq i32 %259, 2
  br i1 %260, label %261, label %379

261:                                              ; preds = %255
  store i32 1, ptr %14, align 4, !tbaa !9
  %262 = load i32, ptr %10, align 4, !tbaa !9
  %263 = icmp eq i32 %262, 2
  br i1 %263, label %264, label %291

264:                                              ; preds = %261
  %265 = load ptr, ptr %6, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.silk_encoder_state, ptr %265, i32 0, i32 66
  %267 = load i32, ptr %266, align 8, !tbaa !33
  %268 = icmp eq i32 %267, 2
  br i1 %268, label %269, label %291

269:                                              ; preds = %264
  %270 = load ptr, ptr %18, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.SideInfoIndices, ptr %270, i32 0, i32 3
  %272 = load i16, ptr %271, align 2, !tbaa !34
  %273 = sext i16 %272 to i32
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.silk_encoder_state, ptr %274, i32 0, i32 67
  %276 = load i16, ptr %275, align 4, !tbaa !35
  %277 = sext i16 %276 to i32
  %278 = sub nsw i32 %273, %277
  store i32 %278, ptr %15, align 4, !tbaa !9
  %279 = load i32, ptr %15, align 4, !tbaa !9
  %280 = icmp slt i32 %279, -8
  br i1 %280, label %284, label %281

281:                                              ; preds = %269
  %282 = load i32, ptr %15, align 4, !tbaa !9
  %283 = icmp sgt i32 %282, 11
  br i1 %283, label %284, label %285

284:                                              ; preds = %281, %269
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %288

285:                                              ; preds = %281
  %286 = load i32, ptr %15, align 4, !tbaa !9
  %287 = add nsw i32 %286, 9
  store i32 %287, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %288

288:                                              ; preds = %285, %284
  %289 = load ptr, ptr %7, align 8, !tbaa !5
  %290 = load i32, ptr %15, align 4, !tbaa !9
  call void @ec_enc_icdf(ptr noundef %289, i32 noundef %290, ptr noundef @silk_pitch_delta_iCDF, i32 noundef 8)
  br label %291

291:                                              ; preds = %288, %264, %261
  %292 = load i32, ptr %14, align 4, !tbaa !9
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %294, label %326

294:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %295 = load ptr, ptr %18, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.SideInfoIndices, ptr %295, i32 0, i32 3
  %297 = load i16, ptr %296, align 2, !tbaa !34
  %298 = sext i16 %297 to i32
  %299 = load ptr, ptr %6, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.silk_encoder_state, ptr %299, i32 0, i32 19
  %301 = load i32, ptr %300, align 8, !tbaa !36
  %302 = ashr i32 %301, 1
  %303 = sdiv i32 %298, %302
  store i32 %303, ptr %19, align 4, !tbaa !9
  %304 = load ptr, ptr %18, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.SideInfoIndices, ptr %304, i32 0, i32 3
  %306 = load i16, ptr %305, align 2, !tbaa !34
  %307 = sext i16 %306 to i32
  %308 = load i32, ptr %19, align 4, !tbaa !9
  %309 = trunc i32 %308 to i16
  %310 = sext i16 %309 to i32
  %311 = load ptr, ptr %6, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.silk_encoder_state, ptr %311, i32 0, i32 19
  %313 = load i32, ptr %312, align 8, !tbaa !36
  %314 = ashr i32 %313, 1
  %315 = trunc i32 %314 to i16
  %316 = sext i16 %315 to i32
  %317 = mul nsw i32 %310, %316
  %318 = sub nsw i32 %307, %317
  store i32 %318, ptr %20, align 4, !tbaa !9
  %319 = load ptr, ptr %7, align 8, !tbaa !5
  %320 = load i32, ptr %19, align 4, !tbaa !9
  call void @ec_enc_icdf(ptr noundef %319, i32 noundef %320, ptr noundef @silk_pitch_lag_iCDF, i32 noundef 8)
  %321 = load ptr, ptr %7, align 8, !tbaa !5
  %322 = load i32, ptr %20, align 4, !tbaa !9
  %323 = load ptr, ptr %6, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.silk_encoder_state, ptr %323, i32 0, i32 46
  %325 = load ptr, ptr %324, align 8, !tbaa !37
  call void @ec_enc_icdf(ptr noundef %321, i32 noundef %322, ptr noundef %325, i32 noundef 8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %326

326:                                              ; preds = %294, %291
  %327 = load ptr, ptr %18, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.SideInfoIndices, ptr %327, i32 0, i32 3
  %329 = load i16, ptr %328, align 2, !tbaa !34
  %330 = load ptr, ptr %6, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.silk_encoder_state, ptr %330, i32 0, i32 67
  store i16 %329, ptr %331, align 4, !tbaa !35
  %332 = load ptr, ptr %7, align 8, !tbaa !5
  %333 = load ptr, ptr %18, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.SideInfoIndices, ptr %333, i32 0, i32 4
  %335 = load i8, ptr %334, align 2, !tbaa !38
  %336 = sext i8 %335 to i32
  %337 = load ptr, ptr %6, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.silk_encoder_state, ptr %337, i32 0, i32 47
  %339 = load ptr, ptr %338, align 8, !tbaa !39
  call void @ec_enc_icdf(ptr noundef %332, i32 noundef %336, ptr noundef %339, i32 noundef 8)
  %340 = load ptr, ptr %7, align 8, !tbaa !5
  %341 = load ptr, ptr %18, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.SideInfoIndices, ptr %341, i32 0, i32 8
  %343 = load i8, ptr %342, align 2, !tbaa !40
  %344 = sext i8 %343 to i32
  call void @ec_enc_icdf(ptr noundef %340, i32 noundef %344, ptr noundef @silk_LTP_per_index_iCDF, i32 noundef 8)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %345

345:                                              ; preds = %366, %326
  %346 = load i32, ptr %12, align 4, !tbaa !9
  %347 = load ptr, ptr %6, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.silk_encoder_state, ptr %347, i32 0, i32 20
  %349 = load i32, ptr %348, align 4, !tbaa !16
  %350 = icmp slt i32 %346, %349
  br i1 %350, label %351, label %369

351:                                              ; preds = %345
  %352 = load ptr, ptr %7, align 8, !tbaa !5
  %353 = load ptr, ptr %18, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.SideInfoIndices, ptr %353, i32 0, i32 1
  %355 = load i32, ptr %12, align 4, !tbaa !9
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [4 x i8], ptr %354, i64 0, i64 %356
  %358 = load i8, ptr %357, align 1, !tbaa !15
  %359 = sext i8 %358 to i32
  %360 = load ptr, ptr %18, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.SideInfoIndices, ptr %360, i32 0, i32 8
  %362 = load i8, ptr %361, align 2, !tbaa !40
  %363 = sext i8 %362 to i64
  %364 = getelementptr inbounds [3 x ptr], ptr @silk_LTP_gain_iCDF_ptrs, i64 0, i64 %363
  %365 = load ptr, ptr %364, align 8, !tbaa !5
  call void @ec_enc_icdf(ptr noundef %352, i32 noundef %359, ptr noundef %365, i32 noundef 8)
  br label %366

366:                                              ; preds = %351
  %367 = load i32, ptr %12, align 4, !tbaa !9
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %12, align 4, !tbaa !9
  br label %345, !llvm.loop !41

369:                                              ; preds = %345
  %370 = load i32, ptr %10, align 4, !tbaa !9
  %371 = icmp eq i32 %370, 0
  br i1 %371, label %372, label %378

372:                                              ; preds = %369
  %373 = load ptr, ptr %7, align 8, !tbaa !5
  %374 = load ptr, ptr %18, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.SideInfoIndices, ptr %374, i32 0, i32 9
  %376 = load i8, ptr %375, align 1, !tbaa !42
  %377 = sext i8 %376 to i32
  call void @ec_enc_icdf(ptr noundef %373, i32 noundef %377, ptr noundef @silk_LTPscale_iCDF, i32 noundef 8)
  br label %378

378:                                              ; preds = %372, %369
  br label %379

379:                                              ; preds = %378, %255
  %380 = load ptr, ptr %18, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.SideInfoIndices, ptr %380, i32 0, i32 5
  %382 = load i8, ptr %381, align 1, !tbaa !11
  %383 = sext i8 %382 to i32
  %384 = load ptr, ptr %6, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.silk_encoder_state, ptr %384, i32 0, i32 66
  store i32 %383, ptr %385, align 8, !tbaa !33
  %386 = load ptr, ptr %7, align 8, !tbaa !5
  %387 = load ptr, ptr %18, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.SideInfoIndices, ptr %387, i32 0, i32 10
  %389 = load i8, ptr %388, align 2, !tbaa !43
  %390 = sext i8 %389 to i32
  call void @ec_enc_icdf(ptr noundef %386, i32 noundef %390, ptr noundef @silk_uniform4_iCDF, i32 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  ret void
}

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

declare void @ec_enc_icdf(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @silk_NLSF_unpack(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 29}
!12 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !13, i64 26, !7, i64 28, !7, i64 29, !7, i64 30, !7, i64 31, !7, i64 32, !7, i64 33, !7, i64 34}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !7, i64 30}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !10, i64 4580}
!17 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !18, i64 16, !19, i64 36, !20, i64 148, !7, i64 4500, !10, i64 4532, !10, i64 4536, !7, i64 4540, !7, i64 4541, !10, i64 4544, !10, i64 4548, !10, i64 4552, !10, i64 4556, !10, i64 4560, !10, i64 4564, !10, i64 4568, !10, i64 4572, !10, i64 4576, !10, i64 4580, !10, i64 4584, !10, i64 4588, !10, i64 4592, !10, i64 4596, !10, i64 4600, !10, i64 4604, !10, i64 4608, !10, i64 4612, !10, i64 4616, !10, i64 4620, !10, i64 4624, !10, i64 4628, !10, i64 4632, !10, i64 4636, !10, i64 4640, !10, i64 4644, !10, i64 4648, !10, i64 4652, !10, i64 4656, !10, i64 4660, !10, i64 4664, !10, i64 4668, !10, i64 4672, !10, i64 4676, !10, i64 4680, !6, i64 4688, !6, i64 4696, !6, i64 4704, !7, i64 4712, !10, i64 4728, !10, i64 4732, !7, i64 4736, !7, i64 4739, !7, i64 4740, !12, i64 4752, !7, i64 4788, !10, i64 5108, !7, i64 5112, !10, i64 5756, !10, i64 5760, !10, i64 5764, !10, i64 5768, !10, i64 5772, !10, i64 5776, !10, i64 5780, !10, i64 5784, !13, i64 5788, !21, i64 5792, !10, i64 6096, !10, i64 6100, !10, i64 6104, !10, i64 6108, !10, i64 6112, !10, i64 6116, !7, i64 6120, !7, i64 6228}
!18 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!19 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 40, !13, i64 56, !7, i64 60, !7, i64 76, !7, i64 92, !10, i64 108}
!20 = !{!"", !7, i64 0, !7, i64 1280, !7, i64 3840, !7, i64 4224, !10, i64 4320, !10, i64 4324, !10, i64 4328, !10, i64 4332, !10, i64 4336, !10, i64 4340, !10, i64 4344, !10, i64 4348}
!21 = !{!"_silk_resampler_state_struct", !7, i64 0, !7, i64 24, !7, i64 168, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !10, i64 292, !6, i64 296}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!17, !6, i64 4704}
!25 = !{!26, !6, i64 24}
!26 = !{!"", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!27 = !{!26, !13, i64 0}
!28 = !{!26, !13, i64 2}
!29 = !{!26, !6, i64 48}
!30 = !{!13, !13, i64 0}
!31 = distinct !{!31, !23}
!32 = !{!12, !7, i64 31}
!33 = !{!17, !10, i64 5784}
!34 = !{!12, !13, i64 26}
!35 = !{!17, !13, i64 5788}
!36 = !{!17, !10, i64 4576}
!37 = !{!17, !6, i64 4688}
!38 = !{!12, !7, i64 28}
!39 = !{!17, !6, i64 4696}
!40 = !{!12, !7, i64 32}
!41 = distinct !{!41, !23}
!42 = !{!12, !7, i64 33}
!43 = !{!12, !7, i64 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"

%struct.SideInfoIndices = type { [4 x i8], [4 x i8], [17 x i8], i16, i8, i8, i8, i8, i8, i8, i8 }

@silk_type_offset_VAD_iCDF = external constant [4 x i8], align 1
@silk_type_offset_no_VAD_iCDF = external constant [2 x i8], align 1
@silk_delta_gain_iCDF = external constant [41 x i8], align 16
@silk_gain_iCDF = external constant [3 x [8 x i8]], align 16
@silk_uniform8_iCDF = external constant [8 x i8], align 1
@silk_NLSF_EXT_iCDF = external constant [7 x i8], align 1
@silk_NLSF_interpolation_factor_iCDF = external constant [5 x i8], align 1
@silk_pitch_delta_iCDF = external constant [21 x i8], align 16
@silk_pitch_lag_iCDF = external constant [32 x i8], align 16
@silk_LTP_per_index_iCDF = external constant [3 x i8], align 1
@silk_LTP_gain_iCDF_ptrs = external local_unnamed_addr constant [3 x ptr], align 16
@silk_LTPscale_iCDF = external constant [3 x i8], align 1
@silk_uniform4_iCDF = external constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @silk_encode_indices(ptr nocapture noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca [16 x i16], align 16
  %7 = alloca [16 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  %8 = icmp ne i32 %3, 0
  %9 = getelementptr inbounds i8, ptr %0, i64 6120
  %10 = sext i32 %2 to i64
  %11 = getelementptr inbounds [3 x %struct.SideInfoIndices], ptr %9, i64 0, i64 %10
  %12 = getelementptr inbounds i8, ptr %0, i64 4752
  %.0105 = select i1 %8, ptr %11, ptr %12
  %13 = getelementptr inbounds i8, ptr %.0105, i64 29
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = sext i8 %14 to i32
  %16 = shl nsw i32 %15, 1
  %17 = getelementptr inbounds i8, ptr %.0105, i64 30
  %18 = load i8, ptr %17, align 2, !tbaa !10
  %19 = sext i8 %18 to i32
  %20 = add nsw i32 %16, %19
  %21 = icmp sgt i32 %20, 1
  %or.cond = select i1 %8, i1 true, i1 %21
  br i1 %or.cond, label %22, label %24

22:                                               ; preds = %5
  %23 = add nsw i32 %20, -2
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %23, ptr noundef nonnull @silk_type_offset_VAD_iCDF, i32 noundef 8) #3
  br label %25

24:                                               ; preds = %5
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %20, ptr noundef nonnull @silk_type_offset_no_VAD_iCDF, i32 noundef 8) #3
  br label %25

25:                                               ; preds = %24, %22
  %26 = icmp eq i32 %4, 2
  %27 = load i8, ptr %.0105, align 2, !tbaa !11
  br i1 %26, label %28, label %30

28:                                               ; preds = %25
  %29 = sext i8 %27 to i32
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %29, ptr noundef nonnull @silk_delta_gain_iCDF, i32 noundef 8) #3
  br label %39

30:                                               ; preds = %25
  %31 = ashr i8 %27, 3
  %32 = sext i8 %31 to i32
  %33 = load i8, ptr %13, align 1, !tbaa !5
  %34 = sext i8 %33 to i64
  %35 = getelementptr inbounds [3 x [8 x i8]], ptr @silk_gain_iCDF, i64 0, i64 %34
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %32, ptr noundef nonnull %35, i32 noundef 8) #3
  %36 = load i8, ptr %.0105, align 2, !tbaa !11
  %37 = and i8 %36, 7
  %38 = zext nneg i8 %37 to i32
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %38, ptr noundef nonnull @silk_uniform8_iCDF, i32 noundef 8) #3
  br label %39

39:                                               ; preds = %30, %28
  %40 = getelementptr inbounds i8, ptr %0, i64 4580
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = icmp sgt i32 %41, 1
  br i1 %42, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %39, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %39 ]
  %43 = getelementptr inbounds [4 x i8], ptr %.0105, i64 0, i64 %indvars.iv
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = sext i8 %44 to i32
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %45, ptr noundef nonnull @silk_delta_gain_iCDF, i32 noundef 8) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = load i32, ptr %40, align 4, !tbaa !12
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next, %47
  br i1 %48, label %.lr.ph, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph, %39
  %49 = getelementptr inbounds i8, ptr %.0105, i64 8
  %50 = load i8, ptr %49, align 2, !tbaa !11
  %51 = sext i8 %50 to i32
  %52 = getelementptr inbounds i8, ptr %0, i64 4704
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = getelementptr inbounds i8, ptr %53, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = load i8, ptr %13, align 1, !tbaa !5
  %57 = ashr i8 %56, 1
  %58 = sext i8 %57 to i64
  %59 = load i16, ptr %53, align 8, !tbaa !25
  %60 = sext i16 %59 to i64
  %61 = mul nsw i64 %58, %60
  %62 = getelementptr inbounds i8, ptr %55, i64 %61
  tail call void @ec_enc_icdf(ptr noundef %1, i32 noundef %51, ptr noundef %62, i32 noundef 8) #3
  %63 = load ptr, ptr %52, align 8, !tbaa !22
  %64 = load i8, ptr %49, align 2, !tbaa !11
  %65 = sext i8 %64 to i32
  call void @silk_NLSF_unpack(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %63, i32 noundef %65) #3
  %66 = load ptr, ptr %52, align 8, !tbaa !22
  %67 = getelementptr inbounds i8, ptr %66, i64 2
  %68 = load i16, ptr %67, align 2, !tbaa !26
  %69 = icmp sgt i16 %68, 0
  br i1 %69, label %.lr.ph116, label %._crit_edge117

.lr.ph116:                                        ; preds = %._crit_edge, %105
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %105 ], [ 0, %._crit_edge ]
  %70 = phi ptr [ %106, %105 ], [ %66, %._crit_edge ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %71 = getelementptr inbounds [17 x i8], ptr %49, i64 0, i64 %indvars.iv.next124
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = icmp sgt i8 %72, 3
  br i1 %74, label %75, label %85

75:                                               ; preds = %.lr.ph116
  %76 = getelementptr inbounds i8, ptr %70, i64 48
  %77 = load ptr, ptr %76, align 8, !tbaa !27
  %78 = getelementptr inbounds [16 x i16], ptr %6, i64 0, i64 %indvars.iv123
  %79 = load i16, ptr %78, align 2, !tbaa !28
  %80 = sext i16 %79 to i64
  %81 = getelementptr inbounds i8, ptr %77, i64 %80
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef 8, ptr noundef %81, i32 noundef 8) #3
  %82 = load i8, ptr %71, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = add nsw i32 %83, -4
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %84, ptr noundef nonnull @silk_NLSF_EXT_iCDF, i32 noundef 8) #3
  br label %105

85:                                               ; preds = %.lr.ph116
  %86 = icmp slt i8 %72, -3
  br i1 %86, label %87, label %97

87:                                               ; preds = %85
  %88 = getelementptr inbounds i8, ptr %70, i64 48
  %89 = load ptr, ptr %88, align 8, !tbaa !27
  %90 = getelementptr inbounds [16 x i16], ptr %6, i64 0, i64 %indvars.iv123
  %91 = load i16, ptr %90, align 2, !tbaa !28
  %92 = sext i16 %91 to i64
  %93 = getelementptr inbounds i8, ptr %89, i64 %92
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef 0, ptr noundef %93, i32 noundef 8) #3
  %94 = load i8, ptr %71, align 1, !tbaa !11
  %95 = sext i8 %94 to i32
  %96 = sub nsw i32 -4, %95
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %96, ptr noundef nonnull @silk_NLSF_EXT_iCDF, i32 noundef 8) #3
  br label %105

97:                                               ; preds = %85
  %98 = add nsw i32 %73, 4
  %99 = getelementptr inbounds i8, ptr %70, i64 48
  %100 = load ptr, ptr %99, align 8, !tbaa !27
  %101 = getelementptr inbounds [16 x i16], ptr %6, i64 0, i64 %indvars.iv123
  %102 = load i16, ptr %101, align 2, !tbaa !28
  %103 = sext i16 %102 to i64
  %104 = getelementptr inbounds i8, ptr %100, i64 %103
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %98, ptr noundef %104, i32 noundef 8) #3
  br label %105

105:                                              ; preds = %75, %97, %87
  %106 = load ptr, ptr %52, align 8, !tbaa !22
  %107 = getelementptr inbounds i8, ptr %106, i64 2
  %108 = load i16, ptr %107, align 2, !tbaa !26
  %109 = sext i16 %108 to i64
  %110 = icmp slt i64 %indvars.iv.next124, %109
  br i1 %110, label %.lr.ph116, label %._crit_edge117, !llvm.loop !29

._crit_edge117:                                   ; preds = %105, %._crit_edge
  %111 = load i32, ptr %40, align 4, !tbaa !12
  %112 = icmp eq i32 %111, 4
  br i1 %112, label %113, label %117

113:                                              ; preds = %._crit_edge117
  %114 = getelementptr inbounds i8, ptr %.0105, i64 31
  %115 = load i8, ptr %114, align 1, !tbaa !30
  %116 = sext i8 %115 to i32
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %116, ptr noundef nonnull @silk_NLSF_interpolation_factor_iCDF, i32 noundef 8) #3
  br label %117

117:                                              ; preds = %113, %._crit_edge117
  %118 = load i8, ptr %13, align 1, !tbaa !5
  %119 = icmp eq i8 %118, 2
  br i1 %119, label %120, label %179

120:                                              ; preds = %117
  br i1 %26, label %121, label %.critedge

121:                                              ; preds = %120
  %122 = getelementptr inbounds i8, ptr %0, i64 5784
  %123 = load i32, ptr %122, align 8, !tbaa !31
  %124 = icmp eq i32 %123, 2
  br i1 %124, label %125, label %.critedge

125:                                              ; preds = %121
  %126 = getelementptr inbounds i8, ptr %.0105, i64 26
  %127 = load i16, ptr %126, align 2, !tbaa !32
  %128 = sext i16 %127 to i32
  %129 = getelementptr inbounds i8, ptr %0, i64 5788
  %130 = load i16, ptr %129, align 4, !tbaa !33
  %131 = sext i16 %130 to i32
  %132 = sub nsw i32 %128, %131
  %133 = add nsw i32 %132, 8
  %or.cond3 = icmp ult i32 %133, 20
  %134 = add nsw i32 %132, 9
  %.0106 = select i1 %or.cond3, i32 %134, i32 0
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %.0106, ptr noundef nonnull @silk_pitch_delta_iCDF, i32 noundef 8) #3
  br i1 %or.cond3, label %148, label %.critedge

.critedge:                                        ; preds = %121, %120, %125
  %135 = getelementptr inbounds i8, ptr %.0105, i64 26
  %136 = load i16, ptr %135, align 2, !tbaa !32
  %137 = sext i16 %136 to i32
  %138 = getelementptr inbounds i8, ptr %0, i64 4576
  %139 = load i32, ptr %138, align 8, !tbaa !34
  %140 = ashr i32 %139, 1
  %141 = sdiv i32 %137, %140
  %sext = shl i32 %141, 16
  %142 = ashr exact i32 %sext, 16
  %sext112 = shl i32 %140, 16
  %143 = ashr exact i32 %sext112, 16
  %144 = mul nsw i32 %142, %143
  %145 = sub nsw i32 %137, %144
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %141, ptr noundef nonnull @silk_pitch_lag_iCDF, i32 noundef 8) #3
  %146 = getelementptr inbounds i8, ptr %0, i64 4688
  %147 = load ptr, ptr %146, align 8, !tbaa !35
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %145, ptr noundef %147, i32 noundef 8) #3
  br label %148

148:                                              ; preds = %.critedge, %125
  %149 = getelementptr inbounds i8, ptr %.0105, i64 26
  %150 = load i16, ptr %149, align 2, !tbaa !32
  %151 = getelementptr inbounds i8, ptr %0, i64 5788
  store i16 %150, ptr %151, align 4, !tbaa !33
  %152 = getelementptr inbounds i8, ptr %.0105, i64 28
  %153 = load i8, ptr %152, align 2, !tbaa !36
  %154 = sext i8 %153 to i32
  %155 = getelementptr inbounds i8, ptr %0, i64 4696
  %156 = load ptr, ptr %155, align 8, !tbaa !37
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %154, ptr noundef %156, i32 noundef 8) #3
  %157 = getelementptr inbounds i8, ptr %.0105, i64 32
  %158 = load i8, ptr %157, align 2, !tbaa !38
  %159 = sext i8 %158 to i32
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %159, ptr noundef nonnull @silk_LTP_per_index_iCDF, i32 noundef 8) #3
  %160 = load i32, ptr %40, align 4, !tbaa !12
  %161 = icmp sgt i32 %160, 0
  br i1 %161, label %.lr.ph120, label %._crit_edge121

.lr.ph120:                                        ; preds = %148
  %162 = getelementptr inbounds i8, ptr %.0105, i64 4
  br label %163

163:                                              ; preds = %.lr.ph120, %163
  %indvars.iv126 = phi i64 [ 0, %.lr.ph120 ], [ %indvars.iv.next127, %163 ]
  %164 = getelementptr inbounds [4 x i8], ptr %162, i64 0, i64 %indvars.iv126
  %165 = load i8, ptr %164, align 1, !tbaa !11
  %166 = sext i8 %165 to i32
  %167 = load i8, ptr %157, align 2, !tbaa !38
  %168 = sext i8 %167 to i64
  %169 = getelementptr inbounds [3 x ptr], ptr @silk_LTP_gain_iCDF_ptrs, i64 0, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !39
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %166, ptr noundef %170, i32 noundef 8) #3
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %171 = load i32, ptr %40, align 4, !tbaa !12
  %172 = sext i32 %171 to i64
  %173 = icmp slt i64 %indvars.iv.next127, %172
  br i1 %173, label %163, label %._crit_edge121, !llvm.loop !40

._crit_edge121:                                   ; preds = %163, %148
  %174 = icmp eq i32 %4, 0
  br i1 %174, label %175, label %179

175:                                              ; preds = %._crit_edge121
  %176 = getelementptr inbounds i8, ptr %.0105, i64 33
  %177 = load i8, ptr %176, align 1, !tbaa !41
  %178 = sext i8 %177 to i32
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %178, ptr noundef nonnull @silk_LTPscale_iCDF, i32 noundef 8) #3
  br label %179

179:                                              ; preds = %._crit_edge121, %175, %117
  %180 = load i8, ptr %13, align 1, !tbaa !5
  %181 = sext i8 %180 to i32
  %182 = getelementptr inbounds i8, ptr %0, i64 5784
  store i32 %181, ptr %182, align 8, !tbaa !31
  %183 = getelementptr inbounds i8, ptr %.0105, i64 34
  %184 = load i8, ptr %183, align 2, !tbaa !42
  %185 = sext i8 %184 to i32
  call void @ec_enc_icdf(ptr noundef %1, i32 noundef %185, ptr noundef nonnull @silk_uniform4_iCDF, i32 noundef 8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #3
  ret void
}

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

declare void @ec_enc_icdf(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @silk_NLSF_unpack(ptr noundef, 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.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 29}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !9, i64 26, !7, i64 28, !7, i64 29, !7, i64 30, !7, i64 31, !7, i64 32, !7, i64 33, !7, i64 34}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!6, !7, i64 30}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 4580}
!13 = !{!"", !7, i64 0, !14, i64 8, !14, i64 12, !15, i64 16, !16, i64 36, !17, i64 148, !7, i64 4500, !14, i64 4532, !14, i64 4536, !7, i64 4540, !7, i64 4541, !14, i64 4544, !14, i64 4548, !14, i64 4552, !14, i64 4556, !14, i64 4560, !14, i64 4564, !14, i64 4568, !14, i64 4572, !14, i64 4576, !14, i64 4580, !14, i64 4584, !14, i64 4588, !14, i64 4592, !14, i64 4596, !14, i64 4600, !14, i64 4604, !14, i64 4608, !14, i64 4612, !14, i64 4616, !14, i64 4620, !14, i64 4624, !14, i64 4628, !14, i64 4632, !14, i64 4636, !14, i64 4640, !14, i64 4644, !14, i64 4648, !14, i64 4652, !14, i64 4656, !14, i64 4660, !14, i64 4664, !14, i64 4668, !14, i64 4672, !14, i64 4676, !14, i64 4680, !18, i64 4688, !18, i64 4696, !18, i64 4704, !7, i64 4712, !14, i64 4728, !14, i64 4732, !7, i64 4736, !7, i64 4739, !7, i64 4740, !6, i64 4752, !7, i64 4788, !14, i64 5108, !7, i64 5112, !14, i64 5756, !14, i64 5760, !14, i64 5764, !14, i64 5768, !14, i64 5772, !14, i64 5776, !14, i64 5780, !14, i64 5784, !9, i64 5788, !19, i64 5792, !14, i64 6096, !14, i64 6100, !14, i64 6104, !14, i64 6108, !14, i64 6112, !14, i64 6116, !7, i64 6120, !7, i64 6228}
!14 = !{!"int", !7, i64 0}
!15 = !{!"", !7, i64 0, !14, i64 8, !14, i64 12, !14, i64 16}
!16 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 40, !9, i64 56, !7, i64 60, !7, i64 76, !7, i64 92, !14, i64 108}
!17 = !{!"", !7, i64 0, !7, i64 1280, !7, i64 3840, !7, i64 4224, !14, i64 4320, !14, i64 4324, !14, i64 4328, !14, i64 4332, !14, i64 4336, !14, i64 4340, !14, i64 4344, !14, i64 4348}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"_silk_resampler_state_struct", !7, i64 0, !7, i64 24, !7, i64 168, !14, i64 264, !14, i64 268, !14, i64 272, !14, i64 276, !14, i64 280, !14, i64 284, !14, i64 288, !14, i64 292, !18, i64 296}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!13, !18, i64 4704}
!23 = !{!24, !18, i64 24}
!24 = !{!"", !9, i64 0, !9, i64 2, !9, i64 4, !9, i64 6, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !18, i64 64}
!25 = !{!24, !9, i64 0}
!26 = !{!24, !9, i64 2}
!27 = !{!24, !18, i64 48}
!28 = !{!9, !9, i64 0}
!29 = distinct !{!29, !21}
!30 = !{!6, !7, i64 31}
!31 = !{!13, !14, i64 5784}
!32 = !{!6, !9, i64 26}
!33 = !{!13, !9, i64 5788}
!34 = !{!13, !14, i64 4576}
!35 = !{!13, !18, i64 4688}
!36 = !{!6, !7, i64 28}
!37 = !{!13, !18, i64 4696}
!38 = !{!6, !7, i64 32}
!39 = !{!18, !18, i64 0}
!40 = distinct !{!40, !21}
!41 = !{!6, !7, i64 33}
!42 = !{!6, !7, i64 34}


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