; LLVM IR from glaretechnologies/substrata :: opus/opus-1.3.1/src (repacketizer_demo)

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

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [48 x [1500 x i8]], align 16
  %11 = alloca [48 x i32], align 16
  %12 = alloca [48 x i32], align 16
  %13 = alloca ptr, align 8
  %14 = alloca [32000 x i8], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [4 x i8], align 1
  %21 = alloca [4 x i8], align 1
  %22 = alloca i32, align 4
  %23 = alloca [4 x i8], align 1
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 72000, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 32000, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 3
  br i1 %25, label %26, label %30

26:                                               ; preds = %2
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  call void @usage(ptr noundef %29)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

30:                                               ; preds = %2
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %88, %30
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sub nsw i32 %33, 2
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %36, label %91

36:                                               ; preds = %31
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds ptr, ptr %37, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = call i32 @strcmp(ptr noundef %41, ptr noundef @.str.1) #7
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %66

44:                                               ; preds = %36
  %45 = load ptr, ptr %5, align 8, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %45, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = call i32 @atoi(ptr noundef %50) #7
  store i32 %51, ptr %15, align 4, !tbaa !5
  %52 = load i32, ptr %15, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 1
  br i1 %53, label %54, label %57

54:                                               ; preds = %44
  %55 = load ptr, ptr @stderr, align 8, !tbaa !9
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.2) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

57:                                               ; preds = %44
  %58 = load i32, ptr %15, align 4, !tbaa !5
  %59 = icmp sgt i32 %58, 48
  br i1 %59, label %60, label %63

60:                                               ; preds = %57
  %61 = load ptr, ptr @stderr, align 8, !tbaa !9
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.3) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

63:                                               ; preds = %57
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %6, align 4, !tbaa !5
  br label %87

66:                                               ; preds = %36
  %67 = load ptr, ptr %5, align 8, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %67, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = call i32 @strcmp(ptr noundef %71, ptr noundef @.str.4) #7
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %66
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %86

75:                                               ; preds = %66
  %76 = load ptr, ptr @stderr, align 8, !tbaa !9
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.5, ptr noundef %81) #6
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = getelementptr inbounds ptr, ptr %83, i64 0
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  call void @usage(ptr noundef %85)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

86:                                               ; preds = %74
  br label %87

87:                                               ; preds = %86, %63
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %6, align 4, !tbaa !5
  br label %31, !llvm.loop !11

91:                                               ; preds = %31
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sub nsw i32 %93, 2
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds ptr, ptr %92, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  %98 = call noalias ptr @fopen(ptr noundef %97, ptr noundef @.str.6)
  store ptr %98, ptr %8, align 8, !tbaa !9
  %99 = load ptr, ptr %8, align 8, !tbaa !9
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %110

101:                                              ; preds = %91
  %102 = load ptr, ptr @stderr, align 8, !tbaa !9
  %103 = load ptr, ptr %5, align 8, !tbaa !9
  %104 = load i32, ptr %4, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 2
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %103, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.7, ptr noundef %108) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

110:                                              ; preds = %91
  %111 = load ptr, ptr %5, align 8, !tbaa !9
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %111, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = call noalias ptr @fopen(ptr noundef %116, ptr noundef @.str.8)
  store ptr %117, ptr %9, align 8, !tbaa !9
  %118 = load ptr, ptr %9, align 8, !tbaa !9
  %119 = icmp eq ptr %118, null
  br i1 %119, label %120, label %131

120:                                              ; preds = %110
  %121 = load ptr, ptr @stderr, align 8, !tbaa !9
  %122 = load ptr, ptr %5, align 8, !tbaa !9
  %123 = load i32, ptr %4, align 4, !tbaa !5
  %124 = sub nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %122, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.9, ptr noundef %127) #6
  %129 = load ptr, ptr %8, align 8, !tbaa !9
  %130 = call i32 @fclose(ptr noundef %129)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

131:                                              ; preds = %110
  %132 = call ptr @opus_repacketizer_create()
  store ptr %132, ptr %13, align 8, !tbaa !9
  br label %133

133:                                              ; preds = %370, %131
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %135 = icmp ne i32 %134, 0
  %136 = xor i1 %135, true
  br i1 %136, label %137, label %371

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %138 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %138, ptr %19, align 4, !tbaa !5
  %139 = load ptr, ptr %13, align 8, !tbaa !9
  %140 = call ptr @opus_repacketizer_init(ptr noundef %139)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %227, %137
  %142 = load i32, ptr %6, align 4, !tbaa !5
  %143 = load i32, ptr %19, align 4, !tbaa !5
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %145, label %230

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %146 = getelementptr inbounds [4 x i8], ptr %20, i64 0, i64 0
  %147 = load ptr, ptr %8, align 8, !tbaa !9
  %148 = call i64 @fread(ptr noundef %146, i64 noundef 1, i64 noundef 4, ptr noundef %147)
  %149 = trunc i64 %148 to i32
  store i32 %149, ptr %18, align 4, !tbaa !5
  %150 = getelementptr inbounds [4 x i8], ptr %20, i64 0, i64 0
  %151 = call i32 @char_to_int(ptr noundef %150)
  %152 = load i32, ptr %6, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [48 x i32], ptr %11, i64 0, i64 %153
  store i32 %151, ptr %154, align 4, !tbaa !5
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [48 x i32], ptr %11, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = icmp sgt i32 %158, 1500
  br i1 %159, label %166, label %160

160:                                              ; preds = %145
  %161 = load i32, ptr %6, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [48 x i32], ptr %11, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = icmp slt i32 %164, 0
  br i1 %165, label %166, label %179

166:                                              ; preds = %160, %145
  %167 = load ptr, ptr %8, align 8, !tbaa !9
  %168 = call i32 @feof(ptr noundef %167) #6
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %171

170:                                              ; preds = %166
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %178

171:                                              ; preds = %166
  %172 = load ptr, ptr @stderr, align 8, !tbaa !9
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef @.str.10) #6
  %174 = load ptr, ptr %8, align 8, !tbaa !9
  %175 = call i32 @fclose(ptr noundef %174)
  %176 = load ptr, ptr %9, align 8, !tbaa !9
  %177 = call i32 @fclose(ptr noundef %176)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %224

178:                                              ; preds = %170
  store i32 7, ptr %17, align 4
  br label %224

179:                                              ; preds = %160
  %180 = getelementptr inbounds [4 x i8], ptr %20, i64 0, i64 0
  %181 = load ptr, ptr %8, align 8, !tbaa !9
  %182 = call i64 @fread(ptr noundef %180, i64 noundef 1, i64 noundef 4, ptr noundef %181)
  %183 = trunc i64 %182 to i32
  store i32 %183, ptr %18, align 4, !tbaa !5
  %184 = getelementptr inbounds [4 x i8], ptr %20, i64 0, i64 0
  %185 = call i32 @char_to_int(ptr noundef %184)
  %186 = load i32, ptr %6, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [48 x i32], ptr %12, i64 0, i64 %187
  store i32 %185, ptr %188, align 4, !tbaa !5
  %189 = load i32, ptr %6, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [48 x [1500 x i8]], ptr %10, i64 0, i64 %190
  %192 = getelementptr inbounds [1500 x i8], ptr %191, i64 0, i64 0
  %193 = load i32, ptr %6, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [48 x i32], ptr %11, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = load ptr, ptr %8, align 8, !tbaa !9
  %199 = call i64 @fread(ptr noundef %192, i64 noundef 1, i64 noundef %197, ptr noundef %198)
  %200 = trunc i64 %199 to i32
  store i32 %200, ptr %18, align 4, !tbaa !5
  %201 = load ptr, ptr %8, align 8, !tbaa !9
  %202 = call i32 @feof(ptr noundef %201) #6
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %205

204:                                              ; preds = %179
  store i32 1, ptr %7, align 4, !tbaa !5
  store i32 7, ptr %17, align 4
  br label %224

205:                                              ; preds = %179
  %206 = load ptr, ptr %13, align 8, !tbaa !9
  %207 = load i32, ptr %6, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [48 x [1500 x i8]], ptr %10, i64 0, i64 %208
  %210 = getelementptr inbounds [1500 x i8], ptr %209, i64 0, i64 0
  %211 = load i32, ptr %6, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [48 x i32], ptr %11, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = call i32 @opus_repacketizer_cat(ptr noundef %206, ptr noundef %210, i32 noundef %214)
  store i32 %215, ptr %18, align 4, !tbaa !5
  %216 = load i32, ptr %18, align 4, !tbaa !5
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %218, label %223

218:                                              ; preds = %205
  %219 = load ptr, ptr @stderr, align 8, !tbaa !9
  %220 = load i32, ptr %18, align 4, !tbaa !5
  %221 = call ptr @opus_strerror(i32 noundef %220)
  %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %219, ptr noundef @.str.11, ptr noundef %221) #6
  store i32 7, ptr %17, align 4
  br label %224

223:                                              ; preds = %205
  store i32 0, ptr %17, align 4
  br label %224

224:                                              ; preds = %223, %218, %204, %178, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %225 = load i32, ptr %17, align 4
  switch i32 %225, label %368 [
    i32 0, label %226
    i32 7, label %230
  ]

226:                                              ; preds = %224
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %6, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %6, align 4, !tbaa !5
  br label %141, !llvm.loop !13

230:                                              ; preds = %224, %141
  %231 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %231, ptr %19, align 4, !tbaa !5
  %232 = load i32, ptr %7, align 4, !tbaa !5
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %235

234:                                              ; preds = %230
  store i32 6, ptr %17, align 4
  br label %368

235:                                              ; preds = %230
  %236 = load i32, ptr %16, align 4, !tbaa !5
  %237 = icmp ne i32 %236, 0
  br i1 %237, label %290, label %238

238:                                              ; preds = %235
  %239 = load ptr, ptr %13, align 8, !tbaa !9
  %240 = getelementptr inbounds [32000 x i8], ptr %14, i64 0, i64 0
  %241 = call i32 @opus_repacketizer_out(ptr noundef %239, ptr noundef %240, i32 noundef 32000)
  store i32 %241, ptr %18, align 4, !tbaa !5
  %242 = load i32, ptr %18, align 4, !tbaa !5
  %243 = icmp sgt i32 %242, 0
  br i1 %243, label %244, label %284

244:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %245 = load i32, ptr %18, align 4, !tbaa !5
  %246 = getelementptr inbounds [4 x i8], ptr %21, i64 0, i64 0
  call void @int_to_char(i32 noundef %245, ptr noundef %246)
  %247 = getelementptr inbounds [4 x i8], ptr %21, i64 0, i64 0
  %248 = load ptr, ptr %9, align 8, !tbaa !9
  %249 = call i64 @fwrite(ptr noundef %247, i64 noundef 1, i64 noundef 4, ptr noundef %248)
  %250 = icmp ne i64 %249, 4
  br i1 %250, label %251, label %254

251:                                              ; preds = %244
  %252 = load ptr, ptr @stderr, align 8, !tbaa !9
  %253 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %252, ptr noundef @.str.12) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %281

254:                                              ; preds = %244
  %255 = load i32, ptr %19, align 4, !tbaa !5
  %256 = sub nsw i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [48 x i32], ptr %12, i64 0, i64 %257
  %259 = load i32, ptr %258, align 4, !tbaa !5
  %260 = getelementptr inbounds [4 x i8], ptr %21, i64 0, i64 0
  call void @int_to_char(i32 noundef %259, ptr noundef %260)
  %261 = getelementptr inbounds [4 x i8], ptr %21, i64 0, i64 0
  %262 = load ptr, ptr %9, align 8, !tbaa !9
  %263 = call i64 @fwrite(ptr noundef %261, i64 noundef 1, i64 noundef 4, ptr noundef %262)
  %264 = icmp ne i64 %263, 4
  br i1 %264, label %265, label %268

265:                                              ; preds = %254
  %266 = load ptr, ptr @stderr, align 8, !tbaa !9
  %267 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %266, ptr noundef @.str.12) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %281

268:                                              ; preds = %254
  %269 = getelementptr inbounds [32000 x i8], ptr %14, i64 0, i64 0
  %270 = load i32, ptr %18, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = load ptr, ptr %9, align 8, !tbaa !9
  %273 = call i64 @fwrite(ptr noundef %269, i64 noundef 1, i64 noundef %271, ptr noundef %272)
  %274 = load i32, ptr %18, align 4, !tbaa !5
  %275 = zext i32 %274 to i64
  %276 = icmp ne i64 %273, %275
  br i1 %276, label %277, label %280

277:                                              ; preds = %268
  %278 = load ptr, ptr @stderr, align 8, !tbaa !9
  %279 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %278, ptr noundef @.str.12) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %281

280:                                              ; preds = %268
  store i32 0, ptr %17, align 4
  br label %281

281:                                              ; preds = %280, %277, %265, %251
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  %282 = load i32, ptr %17, align 4
  switch i32 %282, label %368 [
    i32 0, label %283
  ]

283:                                              ; preds = %281
  br label %289

284:                                              ; preds = %238
  %285 = load ptr, ptr @stderr, align 8, !tbaa !9
  %286 = load i32, ptr %18, align 4, !tbaa !5
  %287 = call ptr @opus_strerror(i32 noundef %286)
  %288 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %285, ptr noundef @.str.13, ptr noundef %287) #6
  br label %289

289:                                              ; preds = %284, %283
  br label %367

290:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %291 = load ptr, ptr %13, align 8, !tbaa !9
  %292 = call i32 @opus_repacketizer_get_nb_frames(ptr noundef %291)
  store i32 %292, ptr %22, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %293

293:                                              ; preds = %360, %290
  %294 = load i32, ptr %6, align 4, !tbaa !5
  %295 = load i32, ptr %22, align 4, !tbaa !5
  %296 = icmp slt i32 %294, %295
  br i1 %296, label %297, label %363

297:                                              ; preds = %293
  %298 = load ptr, ptr %13, align 8, !tbaa !9
  %299 = load i32, ptr %6, align 4, !tbaa !5
  %300 = load i32, ptr %6, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  %302 = getelementptr inbounds [32000 x i8], ptr %14, i64 0, i64 0
  %303 = call i32 @opus_repacketizer_out_range(ptr noundef %298, i32 noundef %299, i32 noundef %301, ptr noundef %302, i32 noundef 32000)
  store i32 %303, ptr %18, align 4, !tbaa !5
  %304 = load i32, ptr %18, align 4, !tbaa !5
  %305 = icmp sgt i32 %304, 0
  br i1 %305, label %306, label %354

306:                                              ; preds = %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %307 = load i32, ptr %18, align 4, !tbaa !5
  %308 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  call void @int_to_char(i32 noundef %307, ptr noundef %308)
  %309 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  %310 = load ptr, ptr %9, align 8, !tbaa !9
  %311 = call i64 @fwrite(ptr noundef %309, i64 noundef 1, i64 noundef 4, ptr noundef %310)
  %312 = icmp ne i64 %311, 4
  br i1 %312, label %313, label %316

313:                                              ; preds = %306
  %314 = load ptr, ptr @stderr, align 8, !tbaa !9
  %315 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %314, ptr noundef @.str.12) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %351

316:                                              ; preds = %306
  %317 = load i32, ptr %6, align 4, !tbaa !5
  %318 = load i32, ptr %22, align 4, !tbaa !5
  %319 = sub nsw i32 %318, 1
  %320 = icmp eq i32 %317, %319
  br i1 %320, label %321, label %328

321:                                              ; preds = %316
  %322 = load i32, ptr %19, align 4, !tbaa !5
  %323 = sub nsw i32 %322, 1
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [48 x i32], ptr %12, i64 0, i64 %324
  %326 = load i32, ptr %325, align 4, !tbaa !5
  %327 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  call void @int_to_char(i32 noundef %326, ptr noundef %327)
  br label %330

328:                                              ; preds = %316
  %329 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  call void @int_to_char(i32 noundef 0, ptr noundef %329)
  br label %330

330:                                              ; preds = %328, %321
  %331 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  %332 = load ptr, ptr %9, align 8, !tbaa !9
  %333 = call i64 @fwrite(ptr noundef %331, i64 noundef 1, i64 noundef 4, ptr noundef %332)
  %334 = icmp ne i64 %333, 4
  br i1 %334, label %335, label %338

335:                                              ; preds = %330
  %336 = load ptr, ptr @stderr, align 8, !tbaa !9
  %337 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %336, ptr noundef @.str.12) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %351

338:                                              ; preds = %330
  %339 = getelementptr inbounds [32000 x i8], ptr %14, i64 0, i64 0
  %340 = load i32, ptr %18, align 4, !tbaa !5
  %341 = sext i32 %340 to i64
  %342 = load ptr, ptr %9, align 8, !tbaa !9
  %343 = call i64 @fwrite(ptr noundef %339, i64 noundef 1, i64 noundef %341, ptr noundef %342)
  %344 = load i32, ptr %18, align 4, !tbaa !5
  %345 = zext i32 %344 to i64
  %346 = icmp ne i64 %343, %345
  br i1 %346, label %347, label %350

347:                                              ; preds = %338
  %348 = load ptr, ptr @stderr, align 8, !tbaa !9
  %349 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %348, ptr noundef @.str.12) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %351

350:                                              ; preds = %338
  store i32 0, ptr %17, align 4
  br label %351

351:                                              ; preds = %350, %347, %335, %313
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  %352 = load i32, ptr %17, align 4
  switch i32 %352, label %364 [
    i32 0, label %353
  ]

353:                                              ; preds = %351
  br label %359

354:                                              ; preds = %297
  %355 = load ptr, ptr @stderr, align 8, !tbaa !9
  %356 = load i32, ptr %18, align 4, !tbaa !5
  %357 = call ptr @opus_strerror(i32 noundef %356)
  %358 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %355, ptr noundef @.str.13, ptr noundef %357) #6
  br label %359

359:                                              ; preds = %354, %353
  br label %360

360:                                              ; preds = %359
  %361 = load i32, ptr %6, align 4, !tbaa !5
  %362 = add nsw i32 %361, 1
  store i32 %362, ptr %6, align 4, !tbaa !5
  br label %293, !llvm.loop !14

363:                                              ; preds = %293
  store i32 0, ptr %17, align 4
  br label %364

364:                                              ; preds = %363, %351
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  %365 = load i32, ptr %17, align 4
  switch i32 %365, label %368 [
    i32 0, label %366
  ]

366:                                              ; preds = %364
  br label %367

367:                                              ; preds = %366, %289
  store i32 0, ptr %17, align 4
  br label %368

368:                                              ; preds = %367, %364, %281, %234, %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %369 = load i32, ptr %17, align 4
  switch i32 %369, label %376 [
    i32 0, label %370
    i32 6, label %371
  ]

370:                                              ; preds = %368
  br label %133, !llvm.loop !15

371:                                              ; preds = %368, %133
  %372 = load ptr, ptr %8, align 8, !tbaa !9
  %373 = call i32 @fclose(ptr noundef %372)
  %374 = load ptr, ptr %9, align 8, !tbaa !9
  %375 = call i32 @fclose(ptr noundef %374)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %376

376:                                              ; preds = %371, %368, %120, %101, %75, %60, %54, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32000, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 72000, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %377 = load i32, ptr %3, align 4
  ret i32 %377
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

declare ptr @opus_repacketizer_create() #5

declare ptr @opus_repacketizer_init(ptr noundef) #5

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

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

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #1

declare i32 @opus_repacketizer_cat(ptr noundef, ptr noundef, i32 noundef) #5

declare ptr @opus_strerror(i32 noundef) #5

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

declare i32 @opus_repacketizer_out(ptr noundef, ptr noundef, i32 noundef) #5

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

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

declare i32 @opus_repacketizer_get_nb_frames(ptr noundef) #5

declare i32 @opus_repacketizer_out_range(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #5

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind willreturn memory(read) "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 #4 = { inlinehint nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage(ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [48 x [1500 x i8]], align 16
  %4 = alloca [48 x i32], align 16
  %5 = alloca [32000 x i8], align 16
  %6 = alloca [4 x i8], align 1
  %7 = alloca [4 x i8], align 1
  %8 = alloca [4 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 72000, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32000, ptr nonnull %5) #6
  %9 = icmp slt i32 %0, 3
  br i1 %9, label %11, label %.preheader

.preheader:                                       ; preds = %2
  %10 = add nsw i32 %0, -2
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %._crit_edge, label %.lr.ph

11:                                               ; preds = %2
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %12)
  br label %.thread152

.lr.ph:                                           ; preds = %.preheader, %40
  %.097181 = phi i32 [ %.198, %40 ], [ 0, %.preheader ]
  %.099180 = phi i32 [ %.1100, %40 ], [ 1, %.preheader ]
  %.0101179 = phi i32 [ %41, %40 ], [ 1, %.preheader ]
  %13 = sext i32 %.0101179 to i64
  %14 = getelementptr inbounds ptr, ptr %1, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.1) #7
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %33

18:                                               ; preds = %.lr.ph
  %19 = add nsw i32 %.0101179, 1
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds ptr, ptr %1, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = tail call i32 @atoi(ptr nocapture noundef %22) #7
  %24 = icmp slt i32 %23, 1
  br i1 %24, label %25, label %28

25:                                               ; preds = %18
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.2) #8
  br label %.thread152

28:                                               ; preds = %18
  %29 = icmp ugt i32 %23, 48
  br i1 %29, label %30, label %40

30:                                               ; preds = %28
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.3) #8
  br label %.thread152

33:                                               ; preds = %.lr.ph
  %34 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.4) #7
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %40, label %36

36:                                               ; preds = %33
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.5, ptr noundef %15) #8
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %39)
  br label %.thread152

40:                                               ; preds = %33, %28
  %.1102 = phi i32 [ %19, %28 ], [ %.0101179, %33 ]
  %.1100 = phi i32 [ %23, %28 ], [ %.099180, %33 ]
  %.198 = phi i32 [ %.097181, %28 ], [ 1, %33 ]
  %41 = add nsw i32 %.1102, 1
  %42 = icmp slt i32 %41, %10
  br i1 %42, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !9

._crit_edge.loopexit:                             ; preds = %40
  %43 = icmp eq i32 %.198, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.099.lcssa = phi i32 [ 1, %.preheader ], [ %.1100, %._crit_edge.loopexit ]
  %.097.lcssa = phi i1 [ true, %.preheader ], [ %43, %._crit_edge.loopexit ]
  %44 = zext nneg i32 %10 to i64
  %45 = getelementptr inbounds ptr, ptr %1, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = tail call noalias ptr @fopen(ptr noundef %46, ptr noundef nonnull @.str.6)
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %53

49:                                               ; preds = %._crit_edge
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = load ptr, ptr %45, align 8, !tbaa !5
  %52 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.7, ptr noundef %51) #8
  br label %.thread152

53:                                               ; preds = %._crit_edge
  %54 = zext nneg i32 %0 to i64
  %55 = getelementptr ptr, ptr %1, i64 %54
  %56 = getelementptr i8, ptr %55, i64 -8
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = tail call noalias ptr @fopen(ptr noundef %57, ptr noundef nonnull @.str.8)
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %65

60:                                               ; preds = %53
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = load ptr, ptr %56, align 8, !tbaa !5
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.9, ptr noundef %62) #8
  %64 = tail call i32 @fclose(ptr noundef nonnull %47)
  br label %.thread152

65:                                               ; preds = %53
  %66 = tail call ptr @opus_repacketizer_create() #6
  %67 = icmp sgt i32 %.099.lcssa, 0
  %wide.trip.count = zext nneg i32 %.099.lcssa to i64
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.backedge, %65
  %68 = call ptr @opus_repacketizer_init(ptr noundef %66) #6
  br i1 %67, label %.lr.ph186, label %.loopexit160.thread

.lr.ph186:                                        ; preds = %.loopexit, %87
  %indvars.iv = phi i64 [ %indvars.iv.next, %87 ], [ 0, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %69 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %47)
  %70 = call i32 @char_to_int(ptr noundef nonnull %6)
  %or.cond = icmp ugt i32 %70, 1500
  br i1 %or.cond, label %71, label %77

71:                                               ; preds = %.lr.ph186
  %72 = call i32 @feof(ptr noundef nonnull %47) #6
  %.not124 = icmp eq i32 %72, 0
  br i1 %.not124, label %.thread137, label %.thread156

.thread137:                                       ; preds = %71
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.10) #8
  %75 = call i32 @fclose(ptr noundef nonnull %47)
  %76 = call i32 @fclose(ptr noundef nonnull %58)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %.thread152

77:                                               ; preds = %.lr.ph186
  %78 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %47)
  %79 = call i32 @char_to_int(ptr noundef nonnull %6)
  %80 = getelementptr inbounds [48 x i32], ptr %4, i64 0, i64 %indvars.iv
  store i32 %79, ptr %80, align 4, !tbaa !11
  %81 = getelementptr inbounds [48 x [1500 x i8]], ptr %3, i64 0, i64 %indvars.iv
  %82 = zext nneg i32 %70 to i64
  %83 = call i64 @fread(ptr noundef nonnull %81, i64 noundef 1, i64 noundef %82, ptr noundef nonnull %47)
  %84 = call i32 @feof(ptr noundef nonnull %47) #6
  %.not122 = icmp eq i32 %84, 0
  br i1 %.not122, label %85, label %.thread156

85:                                               ; preds = %77
  %86 = call i32 @opus_repacketizer_cat(ptr noundef %66, ptr noundef nonnull %81, i32 noundef %70) #6
  %.not123 = icmp eq i32 %86, 0
  br i1 %.not123, label %87, label %.loopexit160

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit160.thread, label %.lr.ph186, !llvm.loop !13

.loopexit160:                                     ; preds = %85
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call ptr @opus_strerror(i32 noundef %86) #6
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.11, ptr noundef %89) #8
  %.2103184195 = trunc i64 %indvars.iv to i32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %.loopexit160.thread

.loopexit160.thread:                              ; preds = %87, %.loopexit, %.loopexit160
  %.2103164207 = phi i32 [ %.2103184195, %.loopexit160 ], [ 0, %.loopexit ], [ %.099.lcssa, %87 ]
  br i1 %.097.lcssa, label %91, label %112

91:                                               ; preds = %.loopexit160.thread
  %92 = call i32 @opus_repacketizer_out(ptr noundef %66, ptr noundef nonnull %5, i32 noundef 32000) #6
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %94, label %108

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @int_to_char(i32 noundef %92, ptr noundef nonnull %7)
  %95 = call i64 @fwrite(ptr noundef nonnull %7, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %58)
  %.not127 = icmp eq i64 %95, 4
  br i1 %.not127, label %96, label %.thread142

96:                                               ; preds = %94
  %97 = add nsw i32 %.2103164207, -1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [48 x i32], ptr %4, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !11
  call void @int_to_char(i32 noundef %100, ptr noundef nonnull %7)
  %101 = call i64 @fwrite(ptr noundef nonnull %7, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %58)
  %.not128 = icmp eq i64 %101, 4
  br i1 %.not128, label %102, label %.thread142

102:                                              ; preds = %96
  %103 = zext nneg i32 %92 to i64
  %104 = call i64 @fwrite(ptr noundef nonnull %5, i64 noundef 1, i64 noundef %103, ptr noundef nonnull %58)
  %.not129 = icmp eq i64 %104, %103
  br i1 %.not129, label %107, label %.thread142

.thread142:                                       ; preds = %102, %96, %94
  %105 = load ptr, ptr @stderr, align 8, !tbaa !5
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef nonnull @.str.12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %.thread152

107:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %.loopexit.backedge

108:                                              ; preds = %91
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = call ptr @opus_strerror(i32 noundef %92) #6
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.13, ptr noundef %110) #8
  br label %.loopexit.backedge

112:                                              ; preds = %.loopexit160.thread
  %113 = call i32 @opus_repacketizer_get_nb_frames(ptr noundef %66) #6
  %.not133188 = icmp sgt i32 %113, 0
  br i1 %.not133188, label %.lr.ph191, label %.loopexit.backedge

.loopexit.backedge:                               ; preds = %140, %112, %108, %107
  br label %.loopexit

.lr.ph191:                                        ; preds = %112
  %114 = add nsw i32 %113, -1
  %115 = add nsw i32 %.2103164207, -1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [48 x i32], ptr %4, i64 0, i64 %116
  br label %118

118:                                              ; preds = %.lr.ph191, %140
  %.3104189 = phi i32 [ 0, %.lr.ph191 ], [ %119, %140 ]
  %119 = add nuw nsw i32 %.3104189, 1
  %120 = call i32 @opus_repacketizer_out_range(ptr noundef %66, i32 noundef %.3104189, i32 noundef %119, ptr noundef nonnull %5, i32 noundef 32000) #6
  %121 = icmp sgt i32 %120, 0
  br i1 %121, label %122, label %136

122:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @int_to_char(i32 noundef %120, ptr noundef nonnull %8)
  %123 = call i64 @fwrite(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %58)
  %.not130 = icmp eq i64 %123, 4
  br i1 %.not130, label %124, label %.thread149

124:                                              ; preds = %122
  %125 = icmp eq i32 %.3104189, %114
  br i1 %125, label %126, label %128

126:                                              ; preds = %124
  %127 = load i32, ptr %117, align 4, !tbaa !11
  br label %128

128:                                              ; preds = %124, %126
  %.sink = phi i32 [ %127, %126 ], [ 0, %124 ]
  call void @int_to_char(i32 noundef %.sink, ptr noundef nonnull %8)
  %129 = call i64 @fwrite(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %58)
  %.not131 = icmp eq i64 %129, 4
  br i1 %.not131, label %130, label %.thread149

130:                                              ; preds = %128
  %131 = zext nneg i32 %120 to i64
  %132 = call i64 @fwrite(ptr noundef nonnull %5, i64 noundef 1, i64 noundef %131, ptr noundef nonnull %58)
  %.not132 = icmp eq i64 %132, %131
  br i1 %.not132, label %135, label %.thread149

.thread149:                                       ; preds = %130, %128, %122
  %133 = load ptr, ptr @stderr, align 8, !tbaa !5
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef nonnull @.str.12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %.thread152

135:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %140

136:                                              ; preds = %118
  %137 = load ptr, ptr @stderr, align 8, !tbaa !5
  %138 = call ptr @opus_strerror(i32 noundef %120) #6
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef nonnull @.str.13, ptr noundef %138) #8
  br label %140

140:                                              ; preds = %135, %136
  %exitcond203.not = icmp eq i32 %119, %113
  br i1 %exitcond203.not, label %.loopexit.backedge, label %118, !llvm.loop !14

.thread156:                                       ; preds = %77, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %141 = call i32 @fclose(ptr noundef nonnull %47)
  %142 = call i32 @fclose(ptr noundef nonnull %58)
  br label %.thread152

.thread152:                                       ; preds = %.thread149, %.thread142, %.thread137, %.thread156, %60, %49, %36, %30, %25, %11
  %.11 = phi i32 [ 1, %11 ], [ 1, %25 ], [ 1, %30 ], [ 1, %36 ], [ 1, %49 ], [ 1, %60 ], [ 0, %.thread156 ], [ 1, %.thread137 ], [ 1, %.thread142 ], [ 1, %.thread149 ]
  call void @llvm.lifetime.end.p0(i64 32000, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 72000, ptr nonnull %3) #6
  ret i32 %.11
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

declare ptr @opus_repacketizer_create() local_unnamed_addr #5

declare ptr @opus_repacketizer_init(ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @feof(ptr nocapture noundef) local_unnamed_addr #1

declare i32 @opus_repacketizer_cat(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare ptr @opus_strerror(i32 noundef) local_unnamed_addr #5

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

declare i32 @opus_repacketizer_out(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

declare i32 @opus_repacketizer_get_nb_frames(ptr noundef) local_unnamed_addr #5

declare i32 @opus_repacketizer_out_range(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #4 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { cold 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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