; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/vorbis-src/vq (latticebuild)

; 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.codebook = type { i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32 }
%struct.static_codebook = type { i64, i64, ptr, i32, i64, i64, i32, i32, ptr, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@stdout = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [62 x i8], align 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 %struct.codebook, align 8
  %7 = alloca %struct.static_codebook, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %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 ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  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 96, ptr %6) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store i32 -1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  store i32 -1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 -1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 96, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 72, i1 false)
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i64 1
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %35

32:                                               ; preds = %2
  %33 = load ptr, ptr @stderr, align 8, !tbaa !9
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str) #10
  call void @exit(i32 noundef 1) #11
  unreachable

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = getelementptr inbounds ptr, ptr %36, i64 1
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = call i64 @strlen(ptr noundef %38) #12
  %40 = add i64 %39, 4
  %41 = call noalias ptr @calloc(i64 noundef %40, i64 noundef 1) #13
  store ptr %41, ptr %21, align 8, !tbaa !9
  %42 = load ptr, ptr %21, align 8, !tbaa !9
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %43, i64 1
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = call ptr @strcpy(ptr noundef %42, ptr noundef %45) #10
  %47 = load ptr, ptr %21, align 8, !tbaa !9
  %48 = call noalias ptr @fopen(ptr noundef %47, ptr noundef @.str.1)
  store ptr %48, ptr %15, align 8, !tbaa !9
  %49 = load ptr, ptr %15, align 8, !tbaa !9
  %50 = icmp ne ptr %49, null
  br i1 %50, label %55, label %51

51:                                               ; preds = %35
  %52 = load ptr, ptr @stderr, align 8, !tbaa !9
  %53 = load ptr, ptr %21, align 8, !tbaa !9
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.2, ptr noundef %53) #10
  call void @exit(i32 noundef 1) #11
  unreachable

55:                                               ; preds = %35
  %56 = load ptr, ptr %21, align 8, !tbaa !9
  %57 = call ptr @strrchr(ptr noundef %56, i32 noundef 46) #12
  store ptr %57, ptr %20, align 8, !tbaa !9
  %58 = load ptr, ptr %20, align 8, !tbaa !9
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %64

60:                                               ; preds = %55
  %61 = load ptr, ptr %20, align 8, !tbaa !9
  store i8 0, ptr %61, align 1, !tbaa !11
  %62 = load ptr, ptr %21, align 8, !tbaa !9
  %63 = call noalias ptr @strdup(ptr noundef %62) #10
  store ptr %63, ptr %17, align 8, !tbaa !9
  br label %67

64:                                               ; preds = %55
  %65 = load ptr, ptr %21, align 8, !tbaa !9
  %66 = call noalias ptr @strdup(ptr noundef %65) #10
  store ptr %66, ptr %17, align 8, !tbaa !9
  br label %67

67:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  %68 = load ptr, ptr %15, align 8, !tbaa !9
  %69 = call ptr @get_line(ptr noundef %68)
  store ptr %69, ptr %16, align 8, !tbaa !9
  %70 = load ptr, ptr %16, align 8, !tbaa !9
  %71 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %70, ptr noundef @.str.3, ptr noundef %12, ptr noundef %11, ptr noundef %13, ptr noundef %14) #10
  %72 = icmp ne i32 %71, 4
  br i1 %72, label %73, label %81

73:                                               ; preds = %67
  %74 = load ptr, ptr %16, align 8, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %74, ptr noundef @.str.4, ptr noundef %12, ptr noundef %11, ptr noundef %13) #10
  %76 = icmp ne i32 %75, 3
  br i1 %76, label %77, label %80

77:                                               ; preds = %73
  %78 = load ptr, ptr @stderr, align 8, !tbaa !9
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.5) #10
  call void @exit(i32 noundef 1) #11
  unreachable

80:                                               ; preds = %73
  br label %81

81:                                               ; preds = %80, %67
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = sitofp i32 %82 to double
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = sitofp i32 %84 to double
  %86 = call double @pow(double noundef %83, double noundef %85) #10
  %87 = fptosi double %86 to i32
  store i32 %87, ptr %10, align 4, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 0
  store i64 %89, ptr %90, align 8, !tbaa !12
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 1
  store i64 %92, ptr %93, align 8, !tbaa !15
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = mul i64 %95, 8
  %97 = call noalias ptr @malloc(i64 noundef %96) #14
  %98 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 2
  store ptr %97, ptr %98, align 8, !tbaa !16
  %99 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 3
  store i32 1, ptr %99, align 8, !tbaa !17
  %100 = load i32, ptr %14, align 4, !tbaa !5
  %101 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 7
  store i32 %100, ptr %101, align 4, !tbaa !18
  %102 = load i32, ptr %12, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noalias ptr @calloc(i64 noundef %103, i64 noundef 8) #13
  %105 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 8
  store ptr %104, ptr %105, align 8, !tbaa !19
  %106 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 0
  %107 = load i64, ptr %106, align 8, !tbaa !12
  %108 = mul i64 8, %107
  %109 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 1
  %110 = load i64, ptr %109, align 8, !tbaa !15
  %111 = mul i64 %108, %110
  %112 = call noalias ptr @malloc(i64 noundef %111) #14
  store ptr %112, ptr %8, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 1
  %114 = load i64, ptr %113, align 8, !tbaa !15
  %115 = mul i64 %114, 8
  %116 = call noalias ptr @malloc(i64 noundef %115) #14
  store ptr %116, ptr %9, align 8, !tbaa !9
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %117

117:                                              ; preds = %126, %81
  %118 = load i64, ptr %19, align 8, !tbaa !20
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = icmp slt i64 %118, %120
  br i1 %121, label %122, label %129

122:                                              ; preds = %117
  %123 = load ptr, ptr %9, align 8, !tbaa !9
  %124 = load i64, ptr %19, align 8, !tbaa !20
  %125 = getelementptr inbounds i64, ptr %123, i64 %124
  store i64 1, ptr %125, align 8, !tbaa !20
  br label %126

126:                                              ; preds = %122
  %127 = load i64, ptr %19, align 8, !tbaa !20
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %19, align 8, !tbaa !20
  br label %117, !llvm.loop !21

129:                                              ; preds = %117
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %130

130:                                              ; preds = %140, %129
  %131 = load i64, ptr %19, align 8, !tbaa !20
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = icmp slt i64 %131, %133
  br i1 %134, label %135, label %143

135:                                              ; preds = %130
  %136 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !16
  %138 = load i64, ptr %19, align 8, !tbaa !20
  %139 = getelementptr inbounds i64, ptr %137, i64 %138
  store i64 1, ptr %139, align 8, !tbaa !20
  br label %140

140:                                              ; preds = %135
  %141 = load i64, ptr %19, align 8, !tbaa !20
  %142 = add nsw i64 %141, 1
  store i64 %142, ptr %19, align 8, !tbaa !20
  br label %130, !llvm.loop !23

143:                                              ; preds = %130
  call void @reset_next_value()
  %144 = load ptr, ptr %15, align 8, !tbaa !9
  %145 = call ptr @setup_line(ptr noundef %144)
  store ptr %145, ptr %16, align 8, !tbaa !9
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %146

146:                                              ; preds = %180, %143
  %147 = load i64, ptr %19, align 8, !tbaa !20
  %148 = load i32, ptr %12, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = icmp slt i64 %147, %149
  br i1 %150, label %151, label %183

151:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %152 = load ptr, ptr %16, align 8, !tbaa !9
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %161

154:                                              ; preds = %151
  %155 = load ptr, ptr %16, align 8, !tbaa !9
  %156 = load ptr, ptr %8, align 8, !tbaa !9
  %157 = load i64, ptr %19, align 8, !tbaa !20
  %158 = getelementptr inbounds double, ptr %156, i64 %157
  %159 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %155, ptr noundef @.str.6, ptr noundef %158) #10
  %160 = icmp ne i32 %159, 1
  br i1 %160, label %161, label %164

161:                                              ; preds = %154, %151
  %162 = load ptr, ptr @stderr, align 8, !tbaa !9
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef @.str.7) #10
  call void @exit(i32 noundef 1) #11
  unreachable

164:                                              ; preds = %154
  %165 = load ptr, ptr %16, align 8, !tbaa !9
  %166 = call ptr @strchr(ptr noundef %165, i32 noundef 44) #12
  store ptr %166, ptr %22, align 8, !tbaa !9
  %167 = load ptr, ptr %22, align 8, !tbaa !9
  %168 = icmp ne ptr %167, null
  br i1 %168, label %172, label %169

169:                                              ; preds = %164
  %170 = load ptr, ptr %16, align 8, !tbaa !9
  %171 = call ptr @strchr(ptr noundef %170, i32 noundef 32) #12
  store ptr %171, ptr %22, align 8, !tbaa !9
  br label %172

172:                                              ; preds = %169, %164
  %173 = load ptr, ptr %22, align 8, !tbaa !9
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %178

175:                                              ; preds = %172
  %176 = load ptr, ptr %22, align 8, !tbaa !9
  %177 = getelementptr inbounds i8, ptr %176, i32 1
  store ptr %177, ptr %22, align 8, !tbaa !9
  br label %178

178:                                              ; preds = %175, %172
  %179 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %179, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %180

180:                                              ; preds = %178
  %181 = load i64, ptr %19, align 8, !tbaa !20
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %19, align 8, !tbaa !20
  br label %146, !llvm.loop !24

183:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %184 = load ptr, ptr %8, align 8, !tbaa !9
  %185 = getelementptr inbounds double, ptr %184, i64 0
  %186 = load double, ptr %185, align 8, !tbaa !25
  store double %186, ptr %23, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  store double -1.000000e+00, ptr %24, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  store i32 1, ptr %25, align 4, !tbaa !5
  store i64 1, ptr %19, align 8, !tbaa !20
  br label %187

187:                                              ; preds = %205, %183
  %188 = load i64, ptr %19, align 8, !tbaa !20
  %189 = load i32, ptr %12, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = icmp slt i64 %188, %190
  br i1 %191, label %192, label %208

192:                                              ; preds = %187
  %193 = load ptr, ptr %8, align 8, !tbaa !9
  %194 = load i64, ptr %19, align 8, !tbaa !20
  %195 = getelementptr inbounds double, ptr %193, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !25
  %197 = load double, ptr %23, align 8, !tbaa !25
  %198 = fcmp olt double %196, %197
  br i1 %198, label %199, label %204

199:                                              ; preds = %192
  %200 = load ptr, ptr %8, align 8, !tbaa !9
  %201 = load i64, ptr %19, align 8, !tbaa !20
  %202 = getelementptr inbounds double, ptr %200, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !25
  store double %203, ptr %23, align 8, !tbaa !25
  br label %204

204:                                              ; preds = %199, %192
  br label %205

205:                                              ; preds = %204
  %206 = load i64, ptr %19, align 8, !tbaa !20
  %207 = add nsw i64 %206, 1
  store i64 %207, ptr %19, align 8, !tbaa !20
  br label %187, !llvm.loop !27

208:                                              ; preds = %187
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %209

209:                                              ; preds = %254, %208
  %210 = load i64, ptr %19, align 8, !tbaa !20
  %211 = load i32, ptr %12, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = icmp slt i64 %210, %212
  br i1 %213, label %214, label %257

214:                                              ; preds = %209
  %215 = load i64, ptr %19, align 8, !tbaa !20
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %18, align 8, !tbaa !20
  br label %217

217:                                              ; preds = %250, %214
  %218 = load i64, ptr %18, align 8, !tbaa !20
  %219 = load i32, ptr %12, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = icmp slt i64 %218, %220
  br i1 %221, label %222, label %253

222:                                              ; preds = %217
  %223 = load double, ptr %24, align 8, !tbaa !25
  %224 = fcmp oeq double %223, -1.000000e+00
  br i1 %224, label %238, label %225

225:                                              ; preds = %222
  %226 = load ptr, ptr %8, align 8, !tbaa !9
  %227 = load i64, ptr %19, align 8, !tbaa !20
  %228 = getelementptr inbounds double, ptr %226, i64 %227
  %229 = load double, ptr %228, align 8, !tbaa !25
  %230 = load ptr, ptr %8, align 8, !tbaa !9
  %231 = load i64, ptr %18, align 8, !tbaa !20
  %232 = getelementptr inbounds double, ptr %230, i64 %231
  %233 = load double, ptr %232, align 8, !tbaa !25
  %234 = fsub double %229, %233
  %235 = call double @llvm.fabs.f64(double %234)
  %236 = load double, ptr %24, align 8, !tbaa !25
  %237 = fcmp olt double %235, %236
  br i1 %237, label %238, label %249

238:                                              ; preds = %225, %222
  %239 = load ptr, ptr %8, align 8, !tbaa !9
  %240 = load i64, ptr %19, align 8, !tbaa !20
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  %242 = load double, ptr %241, align 8, !tbaa !25
  %243 = load ptr, ptr %8, align 8, !tbaa !9
  %244 = load i64, ptr %18, align 8, !tbaa !20
  %245 = getelementptr inbounds double, ptr %243, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !25
  %247 = fsub double %242, %246
  %248 = call double @llvm.fabs.f64(double %247)
  store double %248, ptr %24, align 8, !tbaa !25
  br label %249

249:                                              ; preds = %238, %225
  br label %250

250:                                              ; preds = %249
  %251 = load i64, ptr %18, align 8, !tbaa !20
  %252 = add nsw i64 %251, 1
  store i64 %252, ptr %18, align 8, !tbaa !20
  br label %217, !llvm.loop !28

253:                                              ; preds = %217
  br label %254

254:                                              ; preds = %253
  %255 = load i64, ptr %19, align 8, !tbaa !20
  %256 = add nsw i64 %255, 1
  store i64 %256, ptr %19, align 8, !tbaa !20
  br label %209, !llvm.loop !29

257:                                              ; preds = %209
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %258

258:                                              ; preds = %307, %257
  %259 = load i64, ptr %19, align 8, !tbaa !20
  %260 = load i32, ptr %12, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = icmp slt i64 %259, %261
  br i1 %262, label %263, label %308

263:                                              ; preds = %258
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %264

264:                                              ; preds = %292, %263
  %265 = load i64, ptr %19, align 8, !tbaa !20
  %266 = load i32, ptr %12, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = icmp slt i64 %265, %267
  br i1 %268, label %269, label %295

269:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %270 = load i32, ptr %25, align 4, !tbaa !5
  %271 = sitofp i32 %270 to double
  %272 = load ptr, ptr %8, align 8, !tbaa !9
  %273 = load i64, ptr %19, align 8, !tbaa !20
  %274 = getelementptr inbounds double, ptr %272, i64 %273
  %275 = load double, ptr %274, align 8, !tbaa !25
  %276 = load double, ptr %23, align 8, !tbaa !25
  %277 = fsub double %275, %276
  %278 = fmul double %271, %277
  %279 = load double, ptr %24, align 8, !tbaa !25
  %280 = fdiv double %278, %279
  store double %280, ptr %26, align 8, !tbaa !25
  %281 = load double, ptr %26, align 8, !tbaa !25
  %282 = call double @llvm.rint.f64(double %281)
  %283 = load double, ptr %26, align 8, !tbaa !25
  %284 = fsub double %282, %283
  %285 = call double @llvm.fabs.f64(double %284)
  %286 = fcmp ogt double %285, 0x3EE4F8B580000000
  br i1 %286, label %287, label %288

287:                                              ; preds = %269
  store i32 22, ptr %27, align 4
  br label %289

288:                                              ; preds = %269
  store i32 0, ptr %27, align 4
  br label %289

289:                                              ; preds = %288, %287
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  %290 = load i32, ptr %27, align 4
  switch i32 %290, label %404 [
    i32 0, label %291
    i32 22, label %295
  ]

291:                                              ; preds = %289
  br label %292

292:                                              ; preds = %291
  %293 = load i64, ptr %19, align 8, !tbaa !20
  %294 = add nsw i64 %293, 1
  store i64 %294, ptr %19, align 8, !tbaa !20
  br label %264, !llvm.loop !30

295:                                              ; preds = %289, %264
  %296 = load i32, ptr %25, align 4, !tbaa !5
  %297 = icmp sgt i32 %296, 100
  br i1 %297, label %298, label %299

298:                                              ; preds = %295
  br label %308

299:                                              ; preds = %295
  %300 = load i64, ptr %19, align 8, !tbaa !20
  %301 = load i32, ptr %12, align 4, !tbaa !5
  %302 = sext i32 %301 to i64
  %303 = icmp slt i64 %300, %302
  br i1 %303, label %304, label %307

304:                                              ; preds = %299
  %305 = load i32, ptr %25, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %25, align 4, !tbaa !5
  br label %307

307:                                              ; preds = %304, %299
  br label %258, !llvm.loop !31

308:                                              ; preds = %298, %258
  %309 = load i32, ptr %25, align 4, !tbaa !5
  %310 = sitofp i32 %309 to double
  %311 = load double, ptr %24, align 8, !tbaa !25
  %312 = fdiv double %311, %310
  store double %312, ptr %24, align 8, !tbaa !25
  %313 = load ptr, ptr @stderr, align 8, !tbaa !9
  %314 = load double, ptr %23, align 8, !tbaa !25
  %315 = load double, ptr %24, align 8, !tbaa !25
  %316 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %313, ptr noundef @.str.8, double noundef %314, double noundef %315) #10
  %317 = load double, ptr %23, align 8, !tbaa !25
  %318 = fptrunc double %317 to float
  %319 = call i64 @_float32_pack(float noundef %318)
  %320 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 4
  store i64 %319, ptr %320, align 8, !tbaa !32
  %321 = load double, ptr %24, align 8, !tbaa !25
  %322 = fptrunc double %321 to float
  %323 = call i64 @_float32_pack(float noundef %322)
  %324 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 5
  store i64 %323, ptr %324, align 8, !tbaa !33
  %325 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 6
  store i32 0, ptr %325, align 8, !tbaa !34
  %326 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 4
  %327 = load i64, ptr %326, align 8, !tbaa !32
  %328 = call float @_float32_unpack(i64 noundef %327)
  %329 = fpext float %328 to double
  store double %329, ptr %23, align 8, !tbaa !25
  %330 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 5
  %331 = load i64, ptr %330, align 8, !tbaa !33
  %332 = call float @_float32_unpack(i64 noundef %331)
  %333 = fpext float %332 to double
  store double %333, ptr %24, align 8, !tbaa !25
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %334

334:                                              ; preds = %374, %308
  %335 = load i64, ptr %19, align 8, !tbaa !20
  %336 = load i32, ptr %12, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = icmp slt i64 %335, %337
  br i1 %338, label %339, label %377

339:                                              ; preds = %334
  %340 = load ptr, ptr %8, align 8, !tbaa !9
  %341 = load i64, ptr %19, align 8, !tbaa !20
  %342 = getelementptr inbounds double, ptr %340, i64 %341
  %343 = load double, ptr %342, align 8, !tbaa !25
  %344 = load double, ptr %23, align 8, !tbaa !25
  %345 = fsub double %343, %344
  %346 = load double, ptr %24, align 8, !tbaa !25
  %347 = fdiv double %345, %346
  %348 = call double @llvm.rint.f64(double %347)
  %349 = fptosi double %348 to i64
  %350 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 8
  %351 = load ptr, ptr %350, align 8, !tbaa !19
  %352 = load i64, ptr %19, align 8, !tbaa !20
  %353 = getelementptr inbounds i64, ptr %351, i64 %352
  store i64 %349, ptr %353, align 8, !tbaa !20
  %354 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 8
  %355 = load ptr, ptr %354, align 8, !tbaa !19
  %356 = load i64, ptr %19, align 8, !tbaa !20
  %357 = getelementptr inbounds i64, ptr %355, i64 %356
  %358 = load i64, ptr %357, align 8, !tbaa !20
  %359 = trunc i64 %358 to i32
  %360 = call i32 @ilog(i32 noundef %359)
  %361 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 6
  %362 = load i32, ptr %361, align 8, !tbaa !34
  %363 = icmp sgt i32 %360, %362
  br i1 %363, label %364, label %373

364:                                              ; preds = %339
  %365 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 8
  %366 = load ptr, ptr %365, align 8, !tbaa !19
  %367 = load i64, ptr %19, align 8, !tbaa !20
  %368 = getelementptr inbounds i64, ptr %366, i64 %367
  %369 = load i64, ptr %368, align 8, !tbaa !20
  %370 = trunc i64 %369 to i32
  %371 = call i32 @ilog(i32 noundef %370)
  %372 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 6
  store i32 %371, ptr %372, align 8, !tbaa !34
  br label %373

373:                                              ; preds = %364, %339
  br label %374

374:                                              ; preds = %373
  %375 = load i64, ptr %19, align 8, !tbaa !20
  %376 = add nsw i64 %375, 1
  store i64 %376, ptr %19, align 8, !tbaa !20
  br label %334, !llvm.loop !35

377:                                              ; preds = %334
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  %378 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 2
  %379 = load ptr, ptr %378, align 8, !tbaa !16
  %380 = load i32, ptr %10, align 4, !tbaa !5
  %381 = sext i32 %380 to i64
  %382 = mul i64 8, %381
  call void @llvm.memset.p0.i64(ptr align 8 %379, i8 0, i64 %382, i1 false)
  store i64 0, ptr %18, align 8, !tbaa !20
  br label %383

383:                                              ; preds = %392, %377
  %384 = load i64, ptr %18, align 8, !tbaa !20
  %385 = load i32, ptr %10, align 4, !tbaa !5
  %386 = sext i32 %385 to i64
  %387 = icmp slt i64 %384, %386
  br i1 %387, label %388, label %395

388:                                              ; preds = %383
  %389 = load ptr, ptr %9, align 8, !tbaa !9
  %390 = load i64, ptr %18, align 8, !tbaa !20
  %391 = getelementptr inbounds i64, ptr %389, i64 %390
  store i64 1, ptr %391, align 8, !tbaa !20
  br label %392

392:                                              ; preds = %388
  %393 = load i64, ptr %18, align 8, !tbaa !20
  %394 = add nsw i64 %393, 1
  store i64 %394, ptr %18, align 8, !tbaa !20
  br label %383, !llvm.loop !36

395:                                              ; preds = %383
  %396 = load i32, ptr %10, align 4, !tbaa !5
  %397 = load ptr, ptr %9, align 8, !tbaa !9
  %398 = getelementptr inbounds %struct.static_codebook, ptr %7, i32 0, i32 2
  %399 = load ptr, ptr %398, align 8, !tbaa !16
  call void @build_tree_from_lengths(i32 noundef %396, ptr noundef %397, ptr noundef %399)
  %400 = load ptr, ptr @stdout, align 8, !tbaa !9
  %401 = load ptr, ptr %17, align 8, !tbaa !9
  call void @write_codebook(ptr noundef %400, ptr noundef %401, ptr noundef %7)
  %402 = load ptr, ptr @stderr, align 8, !tbaa !9
  %403 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %402, ptr noundef @.str.9) #10
  call void @exit(i32 noundef 0) #11
  unreachable

404:                                              ; preds = %289
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #5

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #3

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

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

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #3

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

declare ptr @get_line(ptr noundef) #7

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #8

declare void @reset_next_value() #7

declare ptr @setup_line(ptr noundef) #7

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.rint.f64(double) #9

declare i64 @_float32_pack(float noundef) #7

declare float @_float32_unpack(i64 noundef) #7

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

declare void @build_tree_from_lengths(i32 noundef, ptr noundef, ptr noundef) #7

declare void @write_codebook(ptr noundef, ptr noundef, ptr noundef) #7

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { noreturn 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 #5 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { "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 #8 = { nounwind allocsize(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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { nounwind allocsize(0,1) }
attributes #14 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"static_codebook", !14, i64 0, !14, i64 8, !10, i64 16, !6, i64 24, !14, i64 32, !14, i64 40, !6, i64 48, !6, i64 52, !10, i64 56, !6, i64 64}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!13, !10, i64 16}
!17 = !{!13, !6, i64 24}
!18 = !{!13, !6, i64 52}
!19 = !{!13, !10, i64 56}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{!26, !26, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}
!32 = !{!13, !14, i64 32}
!33 = !{!13, !14, i64 40}
!34 = !{!13, !6, i64 48}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}


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

%struct.static_codebook = type { i64, i64, ptr, i32, i64, i64, i32, i32, ptr, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [62 x i8], align 1

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.static_codebook, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #14
  store i32 -1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #14
  store i32 -1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #14
  store i32 -1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #14
  store i32 0, ptr %7, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %3, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %8, i8 0, i64 48, i1 false)
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %15

12:                                               ; preds = %2
  %13 = load ptr, ptr @stderr, align 8, !tbaa !9
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str) #15
  tail call void @exit(i32 noundef 1) #16
  unreachable

15:                                               ; preds = %2
  %16 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %10) #17
  %17 = add i64 %16, 4
  %18 = tail call noalias ptr @calloc(i64 noundef %17, i64 noundef 1) #18
  %19 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) %10) #14
  %20 = tail call noalias ptr @fopen(ptr noundef %18, ptr noundef nonnull @.str.1)
  %.not = icmp eq ptr %20, null
  br i1 %.not, label %21, label %24

21:                                               ; preds = %15
  %22 = load ptr, ptr @stderr, align 8, !tbaa !9
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.2, ptr noundef %18) #15
  tail call void @exit(i32 noundef 1) #16
  unreachable

24:                                               ; preds = %15
  %25 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %18, i32 noundef 46) #17
  %.not119 = icmp eq ptr %25, null
  br i1 %.not119, label %27, label %26

26:                                               ; preds = %24
  store i8 0, ptr %25, align 1, !tbaa !11
  br label %27

27:                                               ; preds = %24, %26
  %28 = tail call noalias ptr @strdup(ptr noundef %18) #14
  %29 = tail call ptr @get_line(ptr noundef nonnull %20) #14
  %30 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %29, ptr noundef nonnull @.str.3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %6, ptr noundef nonnull %7) #14
  %.not120 = icmp eq i32 %30, 4
  br i1 %.not120, label %36, label %31

31:                                               ; preds = %27
  %32 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %29, ptr noundef nonnull @.str.4, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %6) #14
  %.not121 = icmp eq i32 %32, 3
  br i1 %.not121, label %36, label %33

33:                                               ; preds = %31
  %34 = load ptr, ptr @stderr, align 8, !tbaa !9
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.5) #15
  call void @exit(i32 noundef 1) #16
  unreachable

36:                                               ; preds = %31, %27
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = sitofp i32 %37 to double
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sitofp i32 %39 to double
  %41 = call double @pow(double noundef %38, double noundef %40) #14
  %42 = fptosi double %41 to i32
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  store i64 %44, ptr %3, align 8, !tbaa !12
  %45 = sext i32 %42 to i64
  %46 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %45, ptr %46, align 8, !tbaa !15
  %47 = shl nsw i64 %45, 3
  %48 = call noalias ptr @malloc(i64 noundef %47) #19
  %49 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %48, ptr %49, align 8, !tbaa !16
  %50 = getelementptr inbounds i8, ptr %3, i64 24
  store i32 1, ptr %50, align 8, !tbaa !17
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %3, i64 52
  store i32 %51, ptr %52, align 4, !tbaa !18
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = call noalias ptr @calloc(i64 noundef %54, i64 noundef 8) #18
  %56 = getelementptr inbounds i8, ptr %3, i64 56
  store ptr %55, ptr %56, align 8, !tbaa !19
  %57 = shl nsw i64 %44, 3
  %58 = mul i64 %57, %45
  %59 = call noalias ptr @malloc(i64 noundef %58) #19
  %60 = call noalias ptr @malloc(i64 noundef %47) #19
  %61 = icmp sgt i32 %42, 0
  br i1 %61, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %36
  %min.iters.check = icmp ult i32 %42, 4
  br i1 %min.iters.check, label %.lr.ph.preheader221, label %vector.ph

.lr.ph.preheader221:                              ; preds = %middle.block, %.lr.ph.preheader
  %.0107132.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %45, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %62 = getelementptr inbounds i64, ptr %60, i64 %index
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  store <2 x i64> <i64 1, i64 1>, ptr %62, align 8, !tbaa !20
  store <2 x i64> <i64 1, i64 1>, ptr %63, align 8, !tbaa !20
  %index.next = add nuw i64 %index, 4
  %64 = icmp eq i64 %index.next, %n.vec
  br i1 %64, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %45
  br i1 %cmp.n, label %.preheader129, label %.lr.ph.preheader221

.preheader129:                                    ; preds = %.lr.ph, %middle.block
  br i1 %61, label %.lr.ph134.preheader, label %._crit_edge

.lr.ph134.preheader:                              ; preds = %.preheader129
  %min.iters.check198 = icmp ult i32 %42, 4
  br i1 %min.iters.check198, label %.lr.ph134.preheader220, label %vector.ph199

.lr.ph134.preheader220:                           ; preds = %middle.block196, %.lr.ph134.preheader
  %.1108133.ph = phi i64 [ 0, %.lr.ph134.preheader ], [ %n.vec201, %middle.block196 ]
  br label %.lr.ph134

vector.ph199:                                     ; preds = %.lr.ph134.preheader
  %n.vec201 = and i64 %45, 2147483644
  br label %vector.body203

vector.body203:                                   ; preds = %vector.body203, %vector.ph199
  %index204 = phi i64 [ 0, %vector.ph199 ], [ %index.next205, %vector.body203 ]
  %65 = getelementptr inbounds i64, ptr %48, i64 %index204
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  store <2 x i64> <i64 1, i64 1>, ptr %65, align 8, !tbaa !20
  store <2 x i64> <i64 1, i64 1>, ptr %66, align 8, !tbaa !20
  %index.next205 = add nuw i64 %index204, 4
  %67 = icmp eq i64 %index.next205, %n.vec201
  br i1 %67, label %middle.block196, label %vector.body203, !llvm.loop !25

middle.block196:                                  ; preds = %vector.body203
  %cmp.n206 = icmp eq i64 %n.vec201, %45
  br i1 %cmp.n206, label %._crit_edge, label %.lr.ph134.preheader220

.lr.ph:                                           ; preds = %.lr.ph.preheader221, %.lr.ph
  %.0107132 = phi i64 [ %69, %.lr.ph ], [ %.0107132.ph, %.lr.ph.preheader221 ]
  %68 = getelementptr inbounds i64, ptr %60, i64 %.0107132
  store i64 1, ptr %68, align 8, !tbaa !20
  %69 = add nuw nsw i64 %.0107132, 1
  %exitcond.not = icmp eq i64 %69, %45
  br i1 %exitcond.not, label %.preheader129, label %.lr.ph, !llvm.loop !26

.lr.ph134:                                        ; preds = %.lr.ph134.preheader220, %.lr.ph134
  %.1108133 = phi i64 [ %71, %.lr.ph134 ], [ %.1108133.ph, %.lr.ph134.preheader220 ]
  %70 = getelementptr inbounds i64, ptr %48, i64 %.1108133
  store i64 1, ptr %70, align 8, !tbaa !20
  %71 = add nuw nsw i64 %.1108133, 1
  %exitcond182.not = icmp eq i64 %71, %45
  br i1 %exitcond182.not, label %._crit_edge, label %.lr.ph134, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph134, %middle.block196, %36, %.preheader129
  call void @reset_next_value() #14
  %72 = call ptr @setup_line(ptr noundef nonnull %20) #14
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = icmp sgt i32 %73, 0
  br i1 %75, label %.lr.ph138, label %._crit_edge139

.lr.ph138:                                        ; preds = %._crit_edge, %86
  %.0106136 = phi ptr [ %spec.select, %86 ], [ %72, %._crit_edge ]
  %.2109135 = phi i64 [ %88, %86 ], [ 0, %._crit_edge ]
  %.not122 = icmp eq ptr %.0106136, null
  br i1 %.not122, label %79, label %76

76:                                               ; preds = %.lr.ph138
  %77 = getelementptr inbounds double, ptr %59, i64 %.2109135
  %78 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.0106136, ptr noundef nonnull @.str.6, ptr noundef %77) #14
  %.not123 = icmp eq i32 %78, 1
  br i1 %.not123, label %82, label %79

79:                                               ; preds = %76, %.lr.ph138
  %80 = load ptr, ptr @stderr, align 8, !tbaa !9
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.7) #15
  call void @exit(i32 noundef 1) #16
  unreachable

82:                                               ; preds = %76
  %83 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %.0106136, i32 noundef 44) #17
  %.not124 = icmp eq ptr %83, null
  br i1 %.not124, label %84, label %86

84:                                               ; preds = %82
  %85 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %.0106136, i32 noundef 32) #17
  br label %86

86:                                               ; preds = %84, %82
  %.0104 = phi ptr [ %83, %82 ], [ %85, %84 ]
  %.not125 = icmp eq ptr %.0104, null
  %87 = getelementptr inbounds i8, ptr %.0104, i64 1
  %spec.select = select i1 %.not125, ptr null, ptr %87
  %88 = add nuw nsw i64 %.2109135, 1
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = icmp slt i64 %88, %90
  br i1 %91, label %.lr.ph138, label %._crit_edge139, !llvm.loop !28

._crit_edge139:                                   ; preds = %86, %._crit_edge
  %.lcssa130 = phi i64 [ %74, %._crit_edge ], [ %90, %86 ]
  %92 = load double, ptr %59, align 8, !tbaa !29
  %93 = icmp sgt i64 %.lcssa130, 1
  br i1 %93, label %.lr.ph143.preheader, label %.preheader128

.lr.ph143.preheader:                              ; preds = %._crit_edge139
  %94 = add nsw i64 %.lcssa130, -1
  %95 = add nsw i64 %.lcssa130, -2
  %xtraiter = and i64 %94, 3
  %96 = icmp ult i64 %95, 3
  br i1 %96, label %.preheader128.loopexit.unr-lcssa, label %.lr.ph143.preheader.new

.lr.ph143.preheader.new:                          ; preds = %.lr.ph143.preheader
  %unroll_iter = and i64 %94, -4
  %invariant.gep = getelementptr inbounds i8, ptr %59, i64 8
  %invariant.gep225 = getelementptr inbounds i8, ptr %59, i64 16
  %invariant.gep227 = getelementptr inbounds i8, ptr %59, i64 24
  br label %.lr.ph143

.preheader128.loopexit.unr-lcssa:                 ; preds = %.lr.ph143, %.lr.ph143.preheader
  %.1103.lcssa.ph = phi double [ poison, %.lr.ph143.preheader ], [ %.1103.3, %.lr.ph143 ]
  %.0102141.unr = phi double [ %92, %.lr.ph143.preheader ], [ %.1103.3, %.lr.ph143 ]
  %.3140.unr = phi i64 [ 1, %.lr.ph143.preheader ], [ %111, %.lr.ph143 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader128, label %.lr.ph143.epil

.lr.ph143.epil:                                   ; preds = %.preheader128.loopexit.unr-lcssa, %.lr.ph143.epil
  %.0102141.epil = phi double [ %.1103.epil, %.lr.ph143.epil ], [ %.0102141.unr, %.preheader128.loopexit.unr-lcssa ]
  %.3140.epil = phi i64 [ %100, %.lr.ph143.epil ], [ %.3140.unr, %.preheader128.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph143.epil ], [ 0, %.preheader128.loopexit.unr-lcssa ]
  %97 = getelementptr inbounds double, ptr %59, i64 %.3140.epil
  %98 = load double, ptr %97, align 8, !tbaa !29
  %99 = fcmp olt double %98, %.0102141.epil
  %.1103.epil = select i1 %99, double %98, double %.0102141.epil
  %100 = add nuw nsw i64 %.3140.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader128, label %.lr.ph143.epil, !llvm.loop !31

.preheader128:                                    ; preds = %.preheader128.loopexit.unr-lcssa, %.lr.ph143.epil, %._crit_edge139
  %.0102.lcssa = phi double [ %92, %._crit_edge139 ], [ %.1103.lcssa.ph, %.preheader128.loopexit.unr-lcssa ], [ %.1103.epil, %.lr.ph143.epil ]
  %101 = icmp sgt i64 %.lcssa130, 0
  br i1 %101, label %.lr.ph152, label %._crit_edge163

.lr.ph143:                                        ; preds = %.lr.ph143, %.lr.ph143.preheader.new
  %.0102141 = phi double [ %92, %.lr.ph143.preheader.new ], [ %.1103.3, %.lr.ph143 ]
  %.3140 = phi i64 [ 1, %.lr.ph143.preheader.new ], [ %111, %.lr.ph143 ]
  %niter = phi i64 [ 0, %.lr.ph143.preheader.new ], [ %niter.next.3, %.lr.ph143 ]
  %102 = getelementptr inbounds double, ptr %59, i64 %.3140
  %103 = load double, ptr %102, align 8, !tbaa !29
  %104 = fcmp olt double %103, %.0102141
  %.1103 = select i1 %104, double %103, double %.0102141
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %.3140
  %105 = load double, ptr %gep, align 8, !tbaa !29
  %106 = fcmp olt double %105, %.1103
  %.1103.1 = select i1 %106, double %105, double %.1103
  %gep226 = getelementptr inbounds double, ptr %invariant.gep225, i64 %.3140
  %107 = load double, ptr %gep226, align 8, !tbaa !29
  %108 = fcmp olt double %107, %.1103.1
  %.1103.2 = select i1 %108, double %107, double %.1103.1
  %gep228 = getelementptr inbounds double, ptr %invariant.gep227, i64 %.3140
  %109 = load double, ptr %gep228, align 8, !tbaa !29
  %110 = fcmp olt double %109, %.1103.2
  %.1103.3 = select i1 %110, double %109, double %.1103.2
  %111 = add nuw nsw i64 %.3140, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader128.loopexit.unr-lcssa, label %.lr.ph143, !llvm.loop !33

.loopexit:                                        ; preds = %._crit_edge187, %.lr.ph152
  %.1101.lcssa = phi double [ %.0100151, %.lr.ph152 ], [ %.2, %._crit_edge187 ]
  %exitcond184.not = icmp eq i64 %137, %.lcssa130
  br i1 %exitcond184.not, label %.preheader127, label %.lr.ph152, !llvm.loop !34

.preheader127:                                    ; preds = %.loopexit
  br i1 %101, label %.preheader.lr.ph.split.us, label %._crit_edge163

.preheader.lr.ph.split.us:                        ; preds = %.preheader127
  %112 = fsub double %92, %.0102.lcssa
  %113 = add nsw i64 %.lcssa130, -1
  br label %.preheader.us

.preheader.us:                                    ; preds = %134, %.preheader.lr.ph.split.us
  %.099162.us = phi i32 [ 1, %.preheader.lr.ph.split.us ], [ %spec.select126.us, %134 ]
  %114 = uitofp nneg i32 %.099162.us to double
  %115 = fmul double %112, %114
  %116 = fdiv double %115, %.1101.lcssa
  %117 = call double @llvm.rint.f64(double %116)
  %118 = fsub double %117, %116
  %119 = call double @llvm.fabs.f64(double %118)
  %120 = fcmp ogt double %119, 0x3EE4F8B580000000
  br i1 %120, label %._crit_edge156.us, label %.lr.ph169

121:                                              ; preds = %.lr.ph169
  %122 = getelementptr inbounds double, ptr %59, i64 %131
  %123 = load double, ptr %122, align 8, !tbaa !29
  %124 = fsub double %123, %.0102.lcssa
  %125 = fmul double %124, %114
  %126 = fdiv double %125, %.1101.lcssa
  %127 = call double @llvm.rint.f64(double %126)
  %128 = fsub double %127, %126
  %129 = call double @llvm.fabs.f64(double %128)
  %130 = fcmp ogt double %129, 0x3EE4F8B580000000
  br i1 %130, label %._crit_edge156.us.loopexit, label %.lr.ph169, !llvm.loop !35

.lr.ph169:                                        ; preds = %.preheader.us, %121
  %.6154.us168 = phi i64 [ %131, %121 ], [ 0, %.preheader.us ]
  %131 = add nuw nsw i64 %.6154.us168, 1
  %exitcond185.not = icmp eq i64 %.6154.us168, %113
  br i1 %exitcond185.not, label %._crit_edge156.us.loopexit, label %121, !llvm.loop !35

._crit_edge156.us.loopexit:                       ; preds = %121, %.lr.ph169
  %.6.lcssa.us.ph = phi i64 [ %.lcssa130, %.lr.ph169 ], [ %131, %121 ]
  %132 = icmp slt i64 %131, %.lcssa130
  br label %._crit_edge156.us

._crit_edge156.us:                                ; preds = %._crit_edge156.us.loopexit, %.preheader.us
  %.6.lcssa.us = phi i64 [ 0, %.preheader.us ], [ %.6.lcssa.us.ph, %._crit_edge156.us.loopexit ]
  %.lcssa.us = phi i1 [ true, %.preheader.us ], [ %132, %._crit_edge156.us.loopexit ]
  %133 = icmp ugt i32 %.099162.us, 100
  br i1 %133, label %._crit_edge163.loopexit, label %134

134:                                              ; preds = %._crit_edge156.us
  %135 = zext i1 %.lcssa.us to i32
  %spec.select126.us = add nuw nsw i32 %.099162.us, %135
  %136 = icmp slt i64 %.6.lcssa.us, %.lcssa130
  br i1 %136, label %.preheader.us, label %._crit_edge163.loopexit, !llvm.loop !36

.lr.ph152:                                        ; preds = %.preheader128, %.loopexit
  %.0100151 = phi double [ %.1101.lcssa, %.loopexit ], [ -1.000000e+00, %.preheader128 ]
  %.4150 = phi i64 [ %137, %.loopexit ], [ 0, %.preheader128 ]
  %137 = add nuw nsw i64 %.4150, 1
  %138 = icmp slt i64 %137, %.lcssa130
  br i1 %138, label %.lr.ph148, label %.loopexit

.lr.ph148:                                        ; preds = %.lr.ph152
  %139 = getelementptr inbounds double, ptr %59, i64 %.4150
  %.pre.pre = load double, ptr %139, align 8, !tbaa !29
  br label %140

140:                                              ; preds = %.lr.ph148, %._crit_edge187
  %.1101146 = phi double [ %.0100151, %.lr.ph148 ], [ %.2, %._crit_edge187 ]
  %.0110145 = phi i64 [ %137, %.lr.ph148 ], [ %145, %._crit_edge187 ]
  %141 = fcmp oeq double %.1101146, -1.000000e+00
  %.phi.trans.insert = getelementptr inbounds double, ptr %59, i64 %.0110145
  %.pre188 = load double, ptr %.phi.trans.insert, align 8, !tbaa !29
  %.pre = fsub double %.pre.pre, %.pre188
  %.pre189 = call double @llvm.fabs.f64(double %.pre)
  br i1 %141, label %._crit_edge187, label %142

142:                                              ; preds = %140
  %143 = fcmp olt double %.pre189, %.1101146
  br i1 %143, label %144, label %._crit_edge187

144:                                              ; preds = %142
  br label %._crit_edge187

._crit_edge187:                                   ; preds = %140, %142, %144
  %.2 = phi double [ %.1101146, %142 ], [ %.pre189, %144 ], [ %.pre189, %140 ]
  %145 = add nuw nsw i64 %.0110145, 1
  %146 = icmp slt i64 %145, %.lcssa130
  br i1 %146, label %140, label %.loopexit, !llvm.loop !37

._crit_edge163.loopexit:                          ; preds = %._crit_edge156.us, %134
  %.099.lcssa.ph = phi i32 [ %spec.select126.us, %134 ], [ %.099162.us, %._crit_edge156.us ]
  %147 = uitofp nneg i32 %.099.lcssa.ph to double
  br label %._crit_edge163

._crit_edge163:                                   ; preds = %.preheader128, %._crit_edge163.loopexit, %.preheader127
  %.0100.lcssa192 = phi double [ %.1101.lcssa, %.preheader127 ], [ %.1101.lcssa, %._crit_edge163.loopexit ], [ -1.000000e+00, %.preheader128 ]
  %.099.lcssa = phi double [ 1.000000e+00, %.preheader127 ], [ %147, %._crit_edge163.loopexit ], [ 1.000000e+00, %.preheader128 ]
  %148 = fdiv double %.0100.lcssa192, %.099.lcssa
  %149 = load ptr, ptr @stderr, align 8, !tbaa !9
  %150 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef nonnull @.str.8, double noundef %.0102.lcssa, double noundef %148) #15
  %151 = fptrunc double %.0102.lcssa to float
  %152 = call i64 @_float32_pack(float noundef %151) #14
  %153 = getelementptr inbounds i8, ptr %3, i64 32
  store i64 %152, ptr %153, align 8, !tbaa !38
  %154 = fptrunc double %148 to float
  %155 = call i64 @_float32_pack(float noundef %154) #14
  %156 = getelementptr inbounds i8, ptr %3, i64 40
  store i64 %155, ptr %156, align 8, !tbaa !39
  %157 = getelementptr inbounds i8, ptr %3, i64 48
  store i32 0, ptr %157, align 8, !tbaa !40
  %158 = call float @_float32_unpack(i64 noundef %152) #14
  %159 = fpext float %158 to double
  %160 = call float @_float32_unpack(i64 noundef %155) #14
  %161 = fpext float %160 to double
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = icmp sgt i32 %162, 0
  br i1 %163, label %.lr.ph174, label %._crit_edge175

.lr.ph174:                                        ; preds = %._crit_edge163, %180
  %164 = phi i32 [ %181, %180 ], [ 0, %._crit_edge163 ]
  %.7172 = phi i64 [ %182, %180 ], [ 0, %._crit_edge163 ]
  %165 = getelementptr inbounds double, ptr %59, i64 %.7172
  %166 = load double, ptr %165, align 8, !tbaa !29
  %167 = fsub double %166, %159
  %168 = fdiv double %167, %161
  %169 = call double @llvm.rint.f64(double %168)
  %170 = fptosi double %169 to i64
  %171 = getelementptr inbounds i64, ptr %55, i64 %.7172
  store i64 %170, ptr %171, align 8, !tbaa !20
  %172 = trunc i64 %170 to i32
  %173 = call i32 @ilog(i32 noundef %172)
  %174 = icmp sgt i32 %173, %164
  br i1 %174, label %175, label %180

175:                                              ; preds = %.lr.ph174
  %176 = getelementptr inbounds i64, ptr %55, i64 %.7172
  %177 = load i64, ptr %176, align 8, !tbaa !20
  %178 = trunc i64 %177 to i32
  %179 = call i32 @ilog(i32 noundef %178)
  store i32 %179, ptr %157, align 8, !tbaa !40
  br label %180

180:                                              ; preds = %.lr.ph174, %175
  %181 = phi i32 [ %164, %.lr.ph174 ], [ %179, %175 ]
  %182 = add nuw nsw i64 %.7172, 1
  %183 = load i32, ptr %5, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = icmp slt i64 %182, %184
  br i1 %185, label %.lr.ph174, label %._crit_edge175, !llvm.loop !41

._crit_edge175:                                   ; preds = %180, %._crit_edge163
  call void @llvm.memset.p0.i64(ptr align 8 %48, i8 0, i64 %47, i1 false)
  br i1 %61, label %.lr.ph178.preheader, label %._crit_edge179

.lr.ph178.preheader:                              ; preds = %._crit_edge175
  %min.iters.check209 = icmp ult i32 %42, 4
  br i1 %min.iters.check209, label %.lr.ph178.preheader218, label %vector.ph210

vector.ph210:                                     ; preds = %.lr.ph178.preheader
  %n.vec212 = and i64 %45, 2147483644
  br label %vector.body214

vector.body214:                                   ; preds = %vector.body214, %vector.ph210
  %index215 = phi i64 [ 0, %vector.ph210 ], [ %index.next216, %vector.body214 ]
  %186 = getelementptr inbounds i64, ptr %60, i64 %index215
  %187 = getelementptr inbounds i8, ptr %186, i64 16
  store <2 x i64> <i64 1, i64 1>, ptr %186, align 8, !tbaa !20
  store <2 x i64> <i64 1, i64 1>, ptr %187, align 8, !tbaa !20
  %index.next216 = add nuw i64 %index215, 4
  %188 = icmp eq i64 %index.next216, %n.vec212
  br i1 %188, label %middle.block207, label %vector.body214, !llvm.loop !42

middle.block207:                                  ; preds = %vector.body214
  %cmp.n217 = icmp eq i64 %n.vec212, %45
  br i1 %cmp.n217, label %._crit_edge179, label %.lr.ph178.preheader218

.lr.ph178.preheader218:                           ; preds = %middle.block207, %.lr.ph178.preheader
  %.1111176.ph = phi i64 [ 0, %.lr.ph178.preheader ], [ %n.vec212, %middle.block207 ]
  br label %.lr.ph178

.lr.ph178:                                        ; preds = %.lr.ph178.preheader218, %.lr.ph178
  %.1111176 = phi i64 [ %190, %.lr.ph178 ], [ %.1111176.ph, %.lr.ph178.preheader218 ]
  %189 = getelementptr inbounds i64, ptr %60, i64 %.1111176
  store i64 1, ptr %189, align 8, !tbaa !20
  %190 = add nuw nsw i64 %.1111176, 1
  %exitcond186.not = icmp eq i64 %190, %45
  br i1 %exitcond186.not, label %._crit_edge179, label %.lr.ph178, !llvm.loop !43

._crit_edge179:                                   ; preds = %.lr.ph178, %middle.block207, %._crit_edge175
  call void @build_tree_from_lengths(i32 noundef %42, ptr noundef %60, ptr noundef %48) #14
  %191 = load ptr, ptr @stdout, align 8, !tbaa !9
  call void @write_codebook(ptr noundef %191, ptr noundef %28, ptr noundef nonnull %3) #14
  %192 = load ptr, ptr @stderr, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef nonnull @.str.9) #15
  call void @exit(i32 noundef 0) #16
  unreachable
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #7

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #8

declare ptr @get_line(ptr noundef) local_unnamed_addr #9

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #10

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #11

declare void @reset_next_value() local_unnamed_addr #9

declare ptr @setup_line(ptr noundef) local_unnamed_addr #9

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #12

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.rint.f64(double) #12

declare i64 @_float32_pack(float noundef) local_unnamed_addr #9

declare float @_float32_unpack(i64 noundef) local_unnamed_addr #9

; Function Attrs: nounwind uwtable
declare hidden i32 @ilog(i32 noundef) local_unnamed_addr #13

declare void @build_tree_from_lengths(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #9

declare void @write_codebook(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #9

attributes #0 = { noreturn 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { noreturn 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 #5 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #7 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 #8 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { "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 #10 = { mustprogress nofree nounwind willreturn memory(write) "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 #11 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #12 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #13 = { 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 #14 = { nounwind }
attributes #15 = { cold nounwind }
attributes #16 = { noreturn nounwind }
attributes #17 = { nounwind willreturn memory(read) }
attributes #18 = { nounwind allocsize(0,1) }
attributes #19 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"static_codebook", !14, i64 0, !14, i64 8, !10, i64 16, !6, i64 24, !14, i64 32, !14, i64 40, !6, i64 48, !6, i64 52, !10, i64 56, !6, i64 64}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!13, !10, i64 16}
!17 = !{!13, !6, i64 24}
!18 = !{!13, !6, i64 52}
!19 = !{!13, !10, i64 56}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22, !23, !24}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !22, !23, !24}
!26 = distinct !{!26, !22, !24, !23}
!27 = distinct !{!27, !22, !24, !23}
!28 = distinct !{!28, !22}
!29 = !{!30, !30, i64 0}
!30 = !{!"double", !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.unroll.disable"}
!33 = distinct !{!33, !22}
!34 = distinct !{!34, !22}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}
!37 = distinct !{!37, !22}
!38 = !{!13, !14, i64 32}
!39 = !{!13, !14, i64 40}
!40 = !{!13, !6, i64 48}
!41 = distinct !{!41, !22}
!42 = distinct !{!42, !22, !23, !24}
!43 = distinct !{!43, !22, !24, !23}


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