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

; 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 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [40 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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  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 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 3
  br i1 %28, label %29, label %30

29:                                               ; preds = %2
  call void @usage()
  br label %30

30:                                               ; preds = %29, %2
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = icmp eq i32 %31, 4
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %33, %30
  %35 = load ptr, ptr %5, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 1
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call noalias ptr @strdup(ptr noundef %37) #8
  store ptr %38, ptr %7, align 8, !tbaa !9
  %39 = load ptr, ptr %7, align 8, !tbaa !9
  %40 = call noalias ptr @strdup(ptr noundef %39) #8
  store ptr %40, ptr %6, align 8, !tbaa !9
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  %42 = call ptr @strrchr(ptr noundef %41, i32 noundef 46) #9
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %48

44:                                               ; preds = %34
  %45 = load ptr, ptr %6, align 8, !tbaa !9
  %46 = call ptr @strrchr(ptr noundef %45, i32 noundef 46) #9
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  store i8 0, ptr %47, align 1, !tbaa !11
  br label %48

48:                                               ; preds = %44, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %49, i64 2
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = call ptr @strchr(ptr noundef %51, i32 noundef 44) #9
  store ptr %52, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %53, i64 2
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = call ptr @strchr(ptr noundef %55, i32 noundef 45) #9
  store ptr %56, ptr %19, align 8, !tbaa !9
  %57 = load ptr, ptr %19, align 8, !tbaa !9
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %67

59:                                               ; preds = %48
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %60, i64 2
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = call i32 @atoi(ptr noundef %62) #9
  store i32 %63, ptr %17, align 4, !tbaa !5
  %64 = load ptr, ptr %19, align 8, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %64, i64 1
  %66 = call i32 @atoi(ptr noundef %65) #9
  store i32 %66, ptr %16, align 4, !tbaa !5
  store i32 1, ptr %13, align 4, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %102

67:                                               ; preds = %48
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = getelementptr inbounds ptr, ptr %68, i64 2
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = call i32 @atoi(ptr noundef %70) #9
  store i32 %71, ptr %11, align 4, !tbaa !5
  %72 = load ptr, ptr %18, align 8, !tbaa !9
  %73 = icmp ne ptr %72, null
  br i1 %73, label %75, label %74

74:                                               ; preds = %67
  call void @usage()
  br label %79

75:                                               ; preds = %67
  %76 = load ptr, ptr %18, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %76, i64 1
  %78 = call i32 @atoi(ptr noundef %77) #9
  store i32 %78, ptr %12, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %75, %74
  %80 = load ptr, ptr %18, align 8, !tbaa !9
  %81 = getelementptr inbounds i8, ptr %80, i64 1
  %82 = call ptr @strchr(ptr noundef %81, i32 noundef 44) #9
  store ptr %82, ptr %18, align 8, !tbaa !9
  %83 = load ptr, ptr %18, align 8, !tbaa !9
  %84 = icmp ne ptr %83, null
  br i1 %84, label %86, label %85

85:                                               ; preds = %79
  call void @usage()
  br label %90

86:                                               ; preds = %79
  %87 = load ptr, ptr %18, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %87, i64 1
  %89 = call i32 @atoi(ptr noundef %88) #9
  store i32 %89, ptr %13, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %86, %85
  %91 = load i32, ptr %12, align 4, !tbaa !5
  %92 = load i32, ptr %13, align 4, !tbaa !5
  %93 = sdiv i32 %91, %92
  %94 = load i32, ptr %13, align 4, !tbaa !5
  %95 = mul nsw i32 %93, %94
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = icmp ne i32 %95, %96
  br i1 %97, label %98, label %101

98:                                               ; preds = %90
  %99 = load ptr, ptr @stderr, align 8, !tbaa !9
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str) #8
  call void @exit(i32 noundef 1) #10
  unreachable

101:                                              ; preds = %90
  br label %102

102:                                              ; preds = %101, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %103 = load ptr, ptr %7, align 8, !tbaa !9
  %104 = call noalias ptr @fopen(ptr noundef %103, ptr noundef @.str.1)
  store ptr %104, ptr %15, align 8, !tbaa !9
  %105 = load ptr, ptr %15, align 8, !tbaa !9
  %106 = icmp ne ptr %105, null
  br i1 %106, label %118, label %107

107:                                              ; preds = %102
  %108 = load ptr, ptr @stderr, align 8, !tbaa !9
  %109 = load ptr, ptr %7, align 8, !tbaa !9
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.2, ptr noundef %109) #8
  %111 = load i32, ptr %16, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %114, label %113

113:                                              ; preds = %107
  call void @exit(i32 noundef 1) #10
  unreachable

114:                                              ; preds = %107
  %115 = load ptr, ptr @stderr, align 8, !tbaa !9
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.3) #8
  br label %117

117:                                              ; preds = %114
  br label %118

118:                                              ; preds = %117, %102
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %151, label %121

121:                                              ; preds = %118
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %146, %121
  br label %123

123:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %124 = load ptr, ptr %15, align 8, !tbaa !9
  %125 = call i32 @get_next_ivalue(ptr noundef %124, ptr noundef %20)
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %123
  store i32 3, ptr %21, align 4
  br label %144

128:                                              ; preds = %123
  %129 = load i64, ptr %20, align 8, !tbaa !12
  %130 = load i32, ptr %16, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = icmp sgt i64 %129, %131
  br i1 %132, label %133, label %136

133:                                              ; preds = %128
  %134 = load i64, ptr %20, align 8, !tbaa !12
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %16, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %133, %128
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %8, align 4, !tbaa !5
  %139 = and i32 %137, 255
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %143, label %141

141:                                              ; preds = %136
  %142 = load i32, ptr %8, align 4, !tbaa !5
  call void @spinnit(ptr noundef @.str.4, i32 noundef %142)
  br label %143

143:                                              ; preds = %141, %136
  store i32 0, ptr %21, align 4
  br label %144

144:                                              ; preds = %143, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  %145 = load i32, ptr %21, align 4
  switch i32 %145, label %312 [
    i32 0, label %146
    i32 3, label %147
  ]

146:                                              ; preds = %144
  br label %122

147:                                              ; preds = %144
  %148 = load ptr, ptr %15, align 8, !tbaa !9
  call void @rewind(ptr noundef %148)
  %149 = load i32, ptr %16, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %16, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %147, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %152 = load i32, ptr %16, align 4, !tbaa !5
  %153 = sitofp i32 %152 to double
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = sitofp i32 %154 to double
  %156 = call double @pow(double noundef %153, double noundef %155) #8
  %157 = fptosi double %156 to i64
  store i64 %157, ptr %22, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %158 = load i64, ptr %22, align 8, !tbaa !12
  %159 = call noalias ptr @calloc(i64 noundef %158, i64 noundef 8) #11
  store ptr %159, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %160 = load i64, ptr %22, align 8, !tbaa !12
  %161 = call noalias ptr @calloc(i64 noundef %160, i64 noundef 8) #11
  store ptr %161, ptr %24, align 8, !tbaa !9
  %162 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %162, ptr %9, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %175, %151
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = load i64, ptr %22, align 8, !tbaa !12
  %167 = icmp slt i64 %165, %166
  br i1 %167, label %168, label %178

168:                                              ; preds = %163
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = load ptr, ptr %23, align 8, !tbaa !9
  %172 = load i32, ptr %9, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i64, ptr %171, i64 %173
  store i64 %170, ptr %174, align 8, !tbaa !12
  br label %175

175:                                              ; preds = %168
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %9, align 4, !tbaa !5
  br label %163, !llvm.loop !14

178:                                              ; preds = %163
  %179 = load ptr, ptr %15, align 8, !tbaa !9
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %226

181:                                              ; preds = %178
  call void @reset_next_value()
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = load i32, ptr %8, align 4, !tbaa !5
  %184 = sdiv i32 %183, %182
  store i32 %184, ptr %8, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %222, %181
  %186 = load ptr, ptr %15, align 8, !tbaa !9
  %187 = call i32 @feof(ptr noundef %186) #8
  %188 = icmp ne i32 %187, 0
  %189 = xor i1 %188, true
  br i1 %189, label %190, label %223

190:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %191 = load ptr, ptr %15, align 8, !tbaa !9
  %192 = load i32, ptr %11, align 4, !tbaa !5
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = load i32, ptr %13, align 4, !tbaa !5
  %195 = load i32, ptr %16, align 4, !tbaa !5
  %196 = call i32 @getval(ptr noundef %191, i32 noundef %192, i32 noundef %193, i32 noundef %194, i32 noundef %195)
  %197 = sext i32 %196 to i64
  store i64 %197, ptr %25, align 8, !tbaa !12
  %198 = load i64, ptr %25, align 8, !tbaa !12
  %199 = icmp eq i64 %198, -1
  br i1 %199, label %204, label %200

200:                                              ; preds = %190
  %201 = load i64, ptr %25, align 8, !tbaa !12
  %202 = load i64, ptr %22, align 8, !tbaa !12
  %203 = icmp sge i64 %201, %202
  br i1 %203, label %204, label %205

204:                                              ; preds = %200, %190
  store i32 8, ptr %21, align 4
  br label %220

205:                                              ; preds = %200
  %206 = load ptr, ptr %23, align 8, !tbaa !9
  %207 = load i64, ptr %25, align 8, !tbaa !12
  %208 = getelementptr inbounds i64, ptr %206, i64 %207
  %209 = load i64, ptr %208, align 8, !tbaa !12
  %210 = add nsw i64 %209, 1
  store i64 %210, ptr %208, align 8, !tbaa !12
  %211 = load i32, ptr %8, align 4, !tbaa !5
  %212 = add nsw i32 %211, -1
  store i32 %212, ptr %8, align 4, !tbaa !5
  %213 = and i32 %211, 255
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %219, label %215

215:                                              ; preds = %205
  %216 = load i32, ptr %8, align 4, !tbaa !5
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = mul nsw i32 %216, %217
  call void @spinnit(ptr noundef @.str.4, i32 noundef %218)
  br label %219

219:                                              ; preds = %215, %205
  store i32 0, ptr %21, align 4
  br label %220

220:                                              ; preds = %219, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  %221 = load i32, ptr %21, align 4
  switch i32 %221, label %312 [
    i32 0, label %222
    i32 8, label %223
  ]

222:                                              ; preds = %220
  br label %185, !llvm.loop !16

223:                                              ; preds = %220, %185
  %224 = load ptr, ptr %15, align 8, !tbaa !9
  %225 = call i32 @fclose(ptr noundef %224)
  br label %226

226:                                              ; preds = %223, %178
  %227 = load ptr, ptr @stderr, align 8, !tbaa !9
  %228 = load i64, ptr %22, align 8, !tbaa !12
  %229 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef @.str.5, i64 noundef %228) #8
  %230 = load i64, ptr %22, align 8, !tbaa !12
  %231 = trunc i64 %230 to i32
  %232 = load ptr, ptr %23, align 8, !tbaa !9
  %233 = load ptr, ptr %24, align 8, !tbaa !9
  call void @build_tree_from_lengths0(i32 noundef %231, ptr noundef %232, ptr noundef %233)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %234 = load ptr, ptr %6, align 8, !tbaa !9
  %235 = call i64 @strlen(ptr noundef %234) #9
  %236 = add i64 %235, 5
  %237 = alloca i8, i64 %236, align 16
  store ptr %237, ptr %26, align 8, !tbaa !9
  %238 = load ptr, ptr %26, align 8, !tbaa !9
  %239 = load ptr, ptr %6, align 8, !tbaa !9
  %240 = call ptr @strcpy(ptr noundef %238, ptr noundef %239) #8
  %241 = load ptr, ptr %26, align 8, !tbaa !9
  %242 = call ptr @strcat(ptr noundef %241, ptr noundef @.str.6) #8
  %243 = load ptr, ptr %26, align 8, !tbaa !9
  %244 = call noalias ptr @fopen(ptr noundef %243, ptr noundef @.str.7)
  store ptr %244, ptr %15, align 8, !tbaa !9
  %245 = load ptr, ptr %15, align 8, !tbaa !9
  %246 = icmp ne ptr %245, null
  br i1 %246, label %251, label %247

247:                                              ; preds = %226
  %248 = load ptr, ptr @stderr, align 8, !tbaa !9
  %249 = load ptr, ptr %26, align 8, !tbaa !9
  %250 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %248, ptr noundef @.str.2, ptr noundef %249) #8
  call void @exit(i32 noundef 1) #10
  unreachable

251:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  %252 = load ptr, ptr %15, align 8, !tbaa !9
  %253 = load ptr, ptr %6, align 8, !tbaa !9
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %252, ptr noundef @.str.8, ptr noundef %253) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %255

255:                                              ; preds = %286, %251
  %256 = load i32, ptr %9, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = load i64, ptr %22, align 8, !tbaa !12
  %259 = icmp slt i64 %257, %258
  br i1 %259, label %260, label %289

260:                                              ; preds = %255
  %261 = load ptr, ptr %15, align 8, !tbaa !9
  %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %261, ptr noundef @.str.9) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %263

263:                                              ; preds = %281, %260
  %264 = load i32, ptr %10, align 4, !tbaa !5
  %265 = icmp slt i32 %264, 16
  br i1 %265, label %266, label %271

266:                                              ; preds = %263
  %267 = load i32, ptr %9, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = load i64, ptr %22, align 8, !tbaa !12
  %270 = icmp slt i64 %268, %269
  br label %271

271:                                              ; preds = %266, %263
  %272 = phi i1 [ false, %263 ], [ %270, %266 ]
  br i1 %272, label %273, label %286

273:                                              ; preds = %271
  %274 = load ptr, ptr %15, align 8, !tbaa !9
  %275 = load ptr, ptr %24, align 8, !tbaa !9
  %276 = load i32, ptr %9, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds i64, ptr %275, i64 %277
  %279 = load i64, ptr %278, align 8, !tbaa !12
  %280 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %274, ptr noundef @.str.10, i64 noundef %279) #8
  br label %281

281:                                              ; preds = %273
  %282 = load i32, ptr %10, align 4, !tbaa !5
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %10, align 4, !tbaa !5
  %284 = load i32, ptr %9, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %9, align 4, !tbaa !5
  br label %263, !llvm.loop !17

286:                                              ; preds = %271
  %287 = load ptr, ptr %15, align 8, !tbaa !9
  %288 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %287, ptr noundef @.str.11) #8
  br label %255, !llvm.loop !18

289:                                              ; preds = %255
  %290 = load ptr, ptr %15, align 8, !tbaa !9
  %291 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %290, ptr noundef @.str.12) #8
  %292 = load ptr, ptr %15, align 8, !tbaa !9
  %293 = load ptr, ptr %6, align 8, !tbaa !9
  %294 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %292, ptr noundef @.str.13, ptr noundef %293) #8
  %295 = load ptr, ptr %15, align 8, !tbaa !9
  %296 = load i32, ptr %13, align 4, !tbaa !5
  %297 = load i64, ptr %22, align 8, !tbaa !12
  %298 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %295, ptr noundef @.str.14, i32 noundef %296, i64 noundef %297) #8
  %299 = load ptr, ptr %15, align 8, !tbaa !9
  %300 = load ptr, ptr %6, align 8, !tbaa !9
  %301 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %299, ptr noundef @.str.15, ptr noundef %300) #8
  %302 = load ptr, ptr %15, align 8, !tbaa !9
  %303 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %302, ptr noundef @.str.16) #8
  %304 = load ptr, ptr %15, align 8, !tbaa !9
  %305 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %304, ptr noundef @.str.17) #8
  %306 = load ptr, ptr %15, align 8, !tbaa !9
  %307 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %306, ptr noundef @.str.18) #8
  %308 = load ptr, ptr %15, align 8, !tbaa !9
  %309 = call i32 @fclose(ptr noundef %308)
  %310 = load ptr, ptr @stderr, align 8, !tbaa !9
  %311 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %310, ptr noundef @.str.19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @exit(i32 noundef 0) #10
  unreachable

312:                                              ; preds = %220, %144
  unreachable
}

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

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

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

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

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

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

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

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

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

declare i32 @get_next_ivalue(ptr noundef, ptr noundef) #6

declare void @spinnit(ptr noundef, i32 noundef) #6

declare void @rewind(ptr noundef) #6

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

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

declare void @reset_next_value() #6

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

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

declare i32 @fclose(ptr noundef) #6

declare void @build_tree_from_lengths0(i32 noundef, ptr noundef, ptr noundef) #6

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

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

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @usage() #0

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 = { 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 #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 = { 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 #6 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(0,1) }

!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, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [40 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 i64, align 8
  %4 = icmp slt i32 %0, 3
  br i1 %4, label %5, label %6

5:                                                ; preds = %2
  tail call void @usage()
  br label %6

6:                                                ; preds = %5, %2
  %7 = icmp ne i32 %0, 4
  %spec.select = zext i1 %7 to i64
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = tail call noalias ptr @strdup(ptr noundef %9) #12
  %11 = tail call noalias ptr @strdup(ptr noundef %10) #12
  %12 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %11, i32 noundef 46) #13
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %14, label %13

13:                                               ; preds = %6
  store i8 0, ptr %12, align 1, !tbaa !9
  br label %14

14:                                               ; preds = %13, %6
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %16, i32 noundef 44) #13
  %18 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %16, i32 noundef 45) #13
  %.not128 = icmp eq ptr %18, null
  %19 = tail call i32 @atoi(ptr nocapture noundef %16) #13
  br i1 %.not128, label %20, label %37

20:                                               ; preds = %14
  %.not129 = icmp eq ptr %17, null
  br i1 %.not129, label %21, label %22

21:                                               ; preds = %20
  tail call void @usage()
  br label %25

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %17, i64 1
  %24 = tail call i32 @atoi(ptr nocapture noundef %23) #13
  br label %25

25:                                               ; preds = %22, %21
  %.0104 = phi i32 [ %24, %22 ], [ undef, %21 ]
  %.0104.fr = freeze i32 %.0104
  %26 = getelementptr inbounds i8, ptr %17, i64 1
  %27 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %26, i32 noundef 44) #13
  %.not130 = icmp eq ptr %27, null
  br i1 %.not130, label %28, label %29

28:                                               ; preds = %25
  tail call void @usage()
  br label %32

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %27, i64 1
  %31 = tail call i32 @atoi(ptr nocapture noundef %30) #13
  br label %32

32:                                               ; preds = %29, %28
  %.0108 = phi i32 [ %31, %29 ], [ undef, %28 ]
  %33 = srem i32 %.0104.fr, %.0108
  %.not131 = icmp eq i32 %33, 0
  br i1 %.not131, label %.thread184, label %34

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

37:                                               ; preds = %14
  %38 = getelementptr inbounds i8, ptr %18, i64 1
  %39 = tail call i32 @atoi(ptr nocapture noundef %38) #13
  %40 = sext i32 %19 to i64
  %41 = tail call noalias ptr @fopen(ptr noundef %10, ptr noundef nonnull @.str.1)
  %.not132 = icmp eq ptr %41, null
  br i1 %.not132, label %45, label %51

.thread184:                                       ; preds = %32
  %42 = tail call noalias ptr @fopen(ptr noundef %10, ptr noundef nonnull @.str.1)
  %.not132190 = icmp eq ptr %42, null
  br i1 %.not132190, label %.thread223, label %.preheader

.thread223:                                       ; preds = %.thread184
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.2, ptr noundef %10) #14
  br label %48

45:                                               ; preds = %37
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.2, ptr noundef %10) #14
  %.not133 = icmp eq i32 %39, 0
  br i1 %.not133, label %48, label %.thread

48:                                               ; preds = %.thread223, %45
  tail call void @exit(i32 noundef 1) #15
  unreachable

.thread:                                          ; preds = %45
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.3) #14
  br label %64

51:                                               ; preds = %37
  %.not134 = icmp eq i32 %39, 0
  br i1 %.not134, label %.preheader, label %64

.preheader:                                       ; preds = %.thread184, %51
  %.0110194222 = phi i64 [ %40, %51 ], [ 0, %.thread184 ]
  %.1109197221 = phi i32 [ 1, %51 ], [ %.0108, %.thread184 ]
  %.1105202220 = phi i32 [ undef, %51 ], [ %.0104.fr, %.thread184 ]
  %.0103205219 = phi i32 [ 0, %51 ], [ %19, %.thread184 ]
  %52 = phi ptr [ %41, %51 ], [ %42, %.thread184 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #12
  %53 = call i32 @get_next_ivalue(ptr noundef nonnull %52, ptr noundef nonnull %3) #12
  %.not135156 = icmp eq i32 %53, 0
  br i1 %.not135156, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %61
  %.0158 = phi i32 [ %58, %61 ], [ 0, %.preheader ]
  %.1112157 = phi i32 [ %spec.select141, %61 ], [ 0, %.preheader ]
  %54 = load i64, ptr %3, align 8, !tbaa !10
  %55 = sext i32 %.1112157 to i64
  %56 = icmp sgt i64 %54, %55
  %57 = trunc i64 %54 to i32
  %spec.select141 = select i1 %56, i32 %57, i32 %.1112157
  %58 = add nuw nsw i32 %.0158, 1
  %59 = and i32 %.0158, 255
  %.not136 = icmp eq i32 %59, 0
  br i1 %.not136, label %60, label %61

60:                                               ; preds = %.lr.ph
  call void @spinnit(ptr noundef nonnull @.str.4, i32 noundef %58) #12
  br label %61

61:                                               ; preds = %.lr.ph, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #12
  %62 = call i32 @get_next_ivalue(ptr noundef nonnull %52, ptr noundef nonnull %3) #12
  %.not135 = icmp eq i32 %62, 0
  br i1 %.not135, label %.lr.ph, label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %61
  %63 = add nsw i32 %spec.select141, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.1112.lcssa = phi i32 [ 1, %.preheader ], [ %63, %._crit_edge.loopexit ]
  %.0.lcssa = phi i32 [ 0, %.preheader ], [ %58, %._crit_edge.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #12
  call void @rewind(ptr noundef nonnull %52)
  br label %64

64:                                               ; preds = %.thread, %._crit_edge, %51
  %.not132207 = phi i1 [ false, %51 ], [ false, %._crit_edge ], [ true, %.thread ]
  %65 = phi ptr [ %41, %51 ], [ %52, %._crit_edge ], [ null, %.thread ]
  %.0103204 = phi i32 [ 0, %51 ], [ %.0103205219, %._crit_edge ], [ 0, %.thread ]
  %.1105201 = phi i32 [ undef, %51 ], [ %.1105202220, %._crit_edge ], [ undef, %.thread ]
  %.1109196 = phi i32 [ 1, %51 ], [ %.1109197221, %._crit_edge ], [ 1, %.thread ]
  %.0110193 = phi i64 [ %40, %51 ], [ %.0110194222, %._crit_edge ], [ %40, %.thread ]
  %.4115 = phi i32 [ %39, %51 ], [ %.1112.lcssa, %._crit_edge ], [ %39, %.thread ]
  %.2 = phi i32 [ undef, %51 ], [ %.0.lcssa, %._crit_edge ], [ undef, %.thread ]
  %66 = sitofp i32 %.4115 to double
  %67 = sitofp i32 %.1109196 to double
  %68 = call double @pow(double noundef %66, double noundef %67) #12
  %69 = fptosi double %68 to i64
  %70 = call noalias ptr @calloc(i64 noundef %69, i64 noundef 8) #16
  %71 = call noalias ptr @calloc(i64 noundef %69, i64 noundef 8) #16
  %72 = icmp slt i64 %.0110193, %69
  br i1 %72, label %.lr.ph162.preheader, label %._crit_edge163

.lr.ph162.preheader:                              ; preds = %64
  %73 = sub i64 %69, %.0110193
  %min.iters.check = icmp ult i64 %73, 4
  br i1 %min.iters.check, label %.lr.ph162.preheader231, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph162.preheader
  %n.vec = and i64 %73, -4
  %ind.end = add i64 %.0110193, %n.vec
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %spec.select, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %74 = getelementptr i64, ptr %70, i64 %.0110193
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %75 = getelementptr i64, ptr %74, i64 %index
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  store <2 x i64> %broadcast.splat, ptr %75, align 8, !tbaa !10
  store <2 x i64> %broadcast.splat, ptr %76, align 8, !tbaa !10
  %index.next = add nuw i64 %index, 4
  %77 = icmp eq i64 %index.next, %n.vec
  br i1 %77, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %73, %n.vec
  br i1 %cmp.n, label %._crit_edge163, label %.lr.ph162.preheader231

.lr.ph162.preheader231:                           ; preds = %middle.block, %.lr.ph162.preheader
  %indvars.iv.ph = phi i64 [ %.0110193, %.lr.ph162.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph162

.lr.ph162:                                        ; preds = %.lr.ph162.preheader231, %.lr.ph162
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph162 ], [ %indvars.iv.ph, %.lr.ph162.preheader231 ]
  %78 = getelementptr inbounds i64, ptr %70, i64 %indvars.iv
  store i64 %spec.select, ptr %78, align 8, !tbaa !10
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %79 = icmp slt i64 %indvars.iv.next, %69
  br i1 %79, label %.lr.ph162, label %._crit_edge163, !llvm.loop !16

._crit_edge163:                                   ; preds = %.lr.ph162, %middle.block, %64
  br i1 %.not132207, label %97, label %80

80:                                               ; preds = %._crit_edge163
  call void @reset_next_value() #12
  %81 = call i32 @feof(ptr noundef nonnull %65) #12
  %.not137164 = icmp eq i32 %81, 0
  br i1 %.not137164, label %.lr.ph167.preheader, label %.thread152

.lr.ph167.preheader:                              ; preds = %80
  %82 = sdiv i32 %.2, %.1109196
  br label %.lr.ph167

.lr.ph167:                                        ; preds = %.lr.ph167.preheader, %94
  %.3165 = phi i32 [ %90, %94 ], [ %82, %.lr.ph167.preheader ]
  %83 = call i32 @getval(ptr noundef nonnull %65, i32 noundef %.0103204, i32 noundef %.1105201, i32 noundef %.1109196, i32 noundef %.4115)
  %84 = sext i32 %83 to i64
  %85 = icmp ne i32 %83, -1
  %.not138 = icmp slt i64 %84, %69
  %or.cond = and i1 %85, %.not138
  br i1 %or.cond, label %86, label %.thread152

86:                                               ; preds = %.lr.ph167
  %87 = getelementptr inbounds i64, ptr %70, i64 %84
  %88 = load i64, ptr %87, align 8, !tbaa !10
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %87, align 8, !tbaa !10
  %90 = add nsw i32 %.3165, -1
  %91 = and i32 %.3165, 255
  %.not139 = icmp eq i32 %91, 0
  br i1 %.not139, label %92, label %94

92:                                               ; preds = %86
  %93 = mul nsw i32 %90, %.1109196
  call void @spinnit(ptr noundef nonnull @.str.4, i32 noundef %93) #12
  br label %94

94:                                               ; preds = %86, %92
  %95 = call i32 @feof(ptr noundef nonnull %65) #12
  %.not137 = icmp eq i32 %95, 0
  br i1 %.not137, label %.lr.ph167, label %.thread152

.thread152:                                       ; preds = %94, %.lr.ph167, %80
  %96 = call i32 @fclose(ptr noundef nonnull %65)
  br label %97

97:                                               ; preds = %.thread152, %._crit_edge163
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.5, i64 noundef %69) #14
  %100 = trunc i64 %69 to i32
  call void @build_tree_from_lengths0(i32 noundef %100, ptr noundef %70, ptr noundef %71) #12
  %101 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %11) #13
  %102 = add i64 %101, 5
  %103 = alloca i8, i64 %102, align 16
  %104 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %103, ptr noundef nonnull dereferenceable(1) %11) #12
  %105 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %103, ptr noundef nonnull dereferenceable(1) @.str.6) #12
  %106 = call noalias ptr @fopen(ptr noundef nonnull %103, ptr noundef nonnull @.str.7)
  %.not140 = icmp eq ptr %106, null
  br i1 %.not140, label %107, label %110

107:                                              ; preds = %97
  %108 = load ptr, ptr @stderr, align 8, !tbaa !5
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef nonnull @.str.2, ptr noundef nonnull %103) #14
  call void @exit(i32 noundef 1) #15
  unreachable

110:                                              ; preds = %97
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.8, ptr noundef %11) #12
  %112 = icmp sgt i64 %69, 0
  br i1 %112, label %.lr.ph177, label %._crit_edge178

.lr.ph177:                                        ; preds = %110, %._crit_edge173
  %.1100175 = phi i32 [ %.2101.lcssa, %._crit_edge173 ], [ 0, %110 ]
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.9) #12
  %114 = sext i32 %.1100175 to i64
  %115 = icmp slt i64 %114, %69
  br i1 %115, label %.lr.ph172, label %._crit_edge173

.lr.ph172:                                        ; preds = %.lr.ph177, %.lr.ph172
  %indvars.iv181 = phi i64 [ %indvars.iv.next182, %.lr.ph172 ], [ %114, %.lr.ph177 ]
  %.0102169 = phi i32 [ %119, %.lr.ph172 ], [ 0, %.lr.ph177 ]
  %116 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv181
  %117 = load i64, ptr %116, align 8, !tbaa !10
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.10, i64 noundef %117) #12
  %119 = add nuw nsw i32 %.0102169, 1
  %indvars.iv.next182 = add nsw i64 %indvars.iv181, 1
  %120 = icmp ult i32 %.0102169, 15
  %121 = icmp slt i64 %indvars.iv.next182, %69
  %122 = select i1 %120, i1 %121, i1 false
  br i1 %122, label %.lr.ph172, label %._crit_edge173.loopexit, !llvm.loop !17

._crit_edge173.loopexit:                          ; preds = %.lr.ph172
  %123 = trunc nsw i64 %indvars.iv.next182 to i32
  %sext = shl i64 %indvars.iv.next182, 32
  %.pre = ashr exact i64 %sext, 32
  br label %._crit_edge173

._crit_edge173:                                   ; preds = %._crit_edge173.loopexit, %.lr.ph177
  %.pre-phi = phi i64 [ %.pre, %._crit_edge173.loopexit ], [ %114, %.lr.ph177 ]
  %.2101.lcssa = phi i32 [ %123, %._crit_edge173.loopexit ], [ %.1100175, %.lr.ph177 ]
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.11) #12
  %125 = icmp slt i64 %.pre-phi, %69
  br i1 %125, label %.lr.ph177, label %._crit_edge178, !llvm.loop !18

._crit_edge178:                                   ; preds = %._crit_edge173, %110
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.12) #12
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.13, ptr noundef %11) #12
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.14, i32 noundef %.1109196, i64 noundef %69) #12
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.15, ptr noundef %11) #12
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.16) #12
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.17) #12
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str.18) #12
  %133 = call i32 @fclose(ptr noundef nonnull %106)
  %134 = load ptr, ptr @stderr, align 8, !tbaa !5
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef nonnull @.str.19) #14
  call void @exit(i32 noundef 0) #15
  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 nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strchr(ptr noundef, i32 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 noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

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

declare i32 @get_next_ivalue(ptr noundef, ptr noundef) local_unnamed_addr #7

declare void @spinnit(ptr noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare void @rewind(ptr nocapture noundef) local_unnamed_addr #5

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

; 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 #9

declare void @reset_next_value() local_unnamed_addr #7

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

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

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

declare void @build_tree_from_lengths0(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

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

; 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 #11

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

; Function Attrs: nounwind uwtable
declare hidden void @usage() local_unnamed_addr #10

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 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 #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 = { 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 #6 = { 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 #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 = { 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 #9 = { 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 #10 = { 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 #11 = { 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 #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { cold nounwind }
attributes #15 = { noreturn nounwind }
attributes #16 = { nounwind allocsize(0,1) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13, !14, !15}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !13, !15, !14}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


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