; LLVM IR from caryll/otfcc :: lib/table (BASE)

; 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.anon = type { i16, ptr }
%struct.otl_BaseAxis = type { i16, ptr }
%struct.otl_BaseScriptEntry = type { i32, i32, i16, ptr }
%struct.otl_BaseValue = type { i32, double }

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @axisToBk(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %struct.anon, align 8
  %5 = alloca i16, align 2
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i16, align 2
  %10 = alloca i16, align 2
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i16, align 2
  %14 = alloca ptr, align 8
  %15 = alloca i16, align 2
  %16 = alloca ptr, align 8
  %17 = alloca i16, align 2
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i16, align 2
  %21 = alloca i16, align 2
  %22 = alloca i64, align 8
  %23 = alloca i8, align 1
  %24 = alloca i16, align 2
  %25 = alloca i16, align 2
  %26 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %30, label %29

29:                                               ; preds = %1
  store ptr null, ptr %2, align 8
  br label %356

30:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  %31 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  store i16 0, ptr %31, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  store ptr null, ptr %32, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #5
  store i16 0, ptr %5, align 2, !tbaa !13
  br label %33

33:                                               ; preds = %181, %30
  %34 = load i16, ptr %5, align 2, !tbaa !13
  %35 = zext i16 %34 to i32
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.otl_BaseAxis, ptr %36, i32 0, i32 0
  %38 = load i16, ptr %37, align 8, !tbaa !9
  %39 = zext i16 %38 to i32
  %40 = icmp slt i32 %35, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %33
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #5
  br label %184

42:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.otl_BaseAxis, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !12
  %46 = load i16, ptr %5, align 2, !tbaa !13
  %47 = zext i16 %46 to i64
  %48 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %45, i64 %47
  store ptr %48, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !14
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %108

53:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 0, ptr %8, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #5
  store i16 0, ptr %9, align 2, !tbaa !13
  br label %54

54:                                               ; preds = %75, %53
  %55 = load i16, ptr %9, align 2, !tbaa !13
  %56 = zext i16 %55 to i32
  %57 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %58 = load i16, ptr %57, align 8, !tbaa !9
  %59 = zext i16 %58 to i32
  %60 = icmp slt i32 %56, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %54
  store i32 5, ptr %6, align 4
  br label %78

62:                                               ; preds = %54
  %63 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !12
  %65 = load i16, ptr %9, align 2, !tbaa !13
  %66 = zext i16 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !19
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !14
  %72 = icmp eq i32 %68, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %62
  store i8 1, ptr %8, align 1, !tbaa !17
  store i32 5, ptr %6, align 4
  br label %78

74:                                               ; preds = %62
  br label %75

75:                                               ; preds = %74
  %76 = load i16, ptr %9, align 2, !tbaa !13
  %77 = add i16 %76, 1
  store i16 %77, ptr %9, align 2, !tbaa !13
  br label %54, !llvm.loop !20

78:                                               ; preds = %73, %61
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #5
  br label %79

79:                                               ; preds = %78
  %80 = load i8, ptr %8, align 1, !tbaa !17, !range !22, !noundef !23
  %81 = trunc i8 %80 to i1
  br i1 %81, label %107, label %82

82:                                               ; preds = %79
  %83 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %84 = load i16, ptr %83, align 8, !tbaa !9
  %85 = zext i16 %84 to i32
  %86 = add nsw i32 %85, 1
  %87 = trunc i32 %86 to i16
  store i16 %87, ptr %83, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !12
  %90 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %91 = load i16, ptr %90, align 8, !tbaa !9
  %92 = zext i16 %91 to i64
  %93 = mul i64 4, %92
  %94 = call ptr @__caryll_reallocate(ptr noundef %89, i64 noundef %93, i64 noundef 241)
  %95 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  store ptr %94, ptr %95, align 8, !tbaa !12
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !14
  %99 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !12
  %101 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %102 = load i16, ptr %101, align 8, !tbaa !9
  %103 = zext i16 %102 to i32
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %100, i64 %105
  store i32 %98, ptr %106, align 4, !tbaa !19
  br label %107

107:                                              ; preds = %82, %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  br label %108

108:                                              ; preds = %107, %42
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #5
  store i16 0, ptr %10, align 2, !tbaa !13
  br label %109

109:                                              ; preds = %177, %108
  %110 = load i16, ptr %10, align 2, !tbaa !13
  %111 = zext i16 %110 to i32
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %112, i32 0, i32 2
  %114 = load i16, ptr %113, align 8, !tbaa !24
  %115 = zext i16 %114 to i32
  %116 = icmp slt i32 %111, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %109
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #5
  br label %180

118:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %119, i32 0, i32 3
  %121 = load ptr, ptr %120, align 8, !tbaa !25
  %122 = load i16, ptr %10, align 2, !tbaa !13
  %123 = zext i16 %122 to i64
  %124 = getelementptr inbounds %struct.otl_BaseValue, ptr %121, i64 %123
  %125 = getelementptr inbounds %struct.otl_BaseValue, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 8, !tbaa !26
  store i32 %126, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #5
  store i16 0, ptr %13, align 2, !tbaa !13
  br label %127

127:                                              ; preds = %146, %118
  %128 = load i16, ptr %13, align 2, !tbaa !13
  %129 = zext i16 %128 to i32
  %130 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %131 = load i16, ptr %130, align 8, !tbaa !9
  %132 = zext i16 %131 to i32
  %133 = icmp slt i32 %129, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %127
  store i32 11, ptr %6, align 4
  br label %149

135:                                              ; preds = %127
  %136 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !12
  %138 = load i16, ptr %13, align 2, !tbaa !13
  %139 = zext i16 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !19
  %142 = load i32, ptr %11, align 4, !tbaa !19
  %143 = icmp eq i32 %141, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %135
  store i8 1, ptr %12, align 1, !tbaa !17
  store i32 11, ptr %6, align 4
  br label %149

145:                                              ; preds = %135
  br label %146

146:                                              ; preds = %145
  %147 = load i16, ptr %13, align 2, !tbaa !13
  %148 = add i16 %147, 1
  store i16 %148, ptr %13, align 2, !tbaa !13
  br label %127, !llvm.loop !29

149:                                              ; preds = %144, %134
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #5
  br label %150

150:                                              ; preds = %149
  %151 = load i8, ptr %12, align 1, !tbaa !17, !range !22, !noundef !23
  %152 = trunc i8 %151 to i1
  br i1 %152, label %176, label %153

153:                                              ; preds = %150
  %154 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %155 = load i16, ptr %154, align 8, !tbaa !9
  %156 = zext i16 %155 to i32
  %157 = add nsw i32 %156, 1
  %158 = trunc i32 %157 to i16
  store i16 %158, ptr %154, align 8, !tbaa !9
  %159 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !12
  %161 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %162 = load i16, ptr %161, align 8, !tbaa !9
  %163 = zext i16 %162 to i64
  %164 = mul i64 4, %163
  %165 = call ptr @__caryll_reallocate(ptr noundef %160, i64 noundef %164, i64 noundef 256)
  %166 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  store ptr %165, ptr %166, align 8, !tbaa !12
  %167 = load i32, ptr %11, align 4, !tbaa !19
  %168 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %169 = load ptr, ptr %168, align 8, !tbaa !12
  %170 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %171 = load i16, ptr %170, align 8, !tbaa !9
  %172 = zext i16 %171 to i32
  %173 = sub nsw i32 %172, 1
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %169, i64 %174
  store i32 %167, ptr %175, align 4, !tbaa !19
  br label %176

176:                                              ; preds = %153, %150
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %177

177:                                              ; preds = %176
  %178 = load i16, ptr %10, align 2, !tbaa !13
  %179 = add i16 %178, 1
  store i16 %179, ptr %10, align 2, !tbaa !13
  br label %109, !llvm.loop !30

180:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %181

181:                                              ; preds = %180
  %182 = load i16, ptr %5, align 2, !tbaa !13
  %183 = add i16 %182, 1
  store i16 %183, ptr %5, align 2, !tbaa !13
  br label %33, !llvm.loop !31

184:                                              ; preds = %41
  %185 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %186 = load ptr, ptr %185, align 8, !tbaa !12
  %187 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %188 = load i16, ptr %187, align 8, !tbaa !9
  %189 = zext i16 %188 to i64
  call void @qsort(ptr noundef %186, i64 noundef %189, i64 noundef 4, ptr noundef @by_tag)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %190 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %191 = load i16, ptr %190, align 8, !tbaa !9
  %192 = zext i16 %191 to i32
  %193 = call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef %192, i32 noundef 0)
  store ptr %193, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #5
  store i16 0, ptr %15, align 2, !tbaa !13
  br label %194

194:                                              ; preds = %211, %184
  %195 = load i16, ptr %15, align 2, !tbaa !13
  %196 = zext i16 %195 to i32
  %197 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %198 = load i16, ptr %197, align 8, !tbaa !9
  %199 = zext i16 %198 to i32
  %200 = icmp slt i32 %196, %199
  br i1 %200, label %202, label %201

201:                                              ; preds = %194
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #5
  br label %214

202:                                              ; preds = %194
  %203 = load ptr, ptr %14, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %205 = load ptr, ptr %204, align 8, !tbaa !12
  %206 = load i16, ptr %15, align 2, !tbaa !13
  %207 = zext i16 %206 to i64
  %208 = getelementptr inbounds i32, ptr %205, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !19
  %210 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %203, i32 noundef 3, i32 noundef %209, i32 noundef 0)
  br label %211

211:                                              ; preds = %202
  %212 = load i16, ptr %15, align 2, !tbaa !13
  %213 = add i16 %212, 1
  store i16 %213, ptr %15, align 2, !tbaa !13
  br label %194, !llvm.loop !32

214:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.otl_BaseAxis, ptr %215, i32 0, i32 0
  %217 = load i16, ptr %216, align 8, !tbaa !9
  %218 = zext i16 %217 to i32
  %219 = call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef %218, i32 noundef 0)
  store ptr %219, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #5
  store i16 0, ptr %17, align 2, !tbaa !13
  br label %220

220:                                              ; preds = %346, %214
  %221 = load i16, ptr %17, align 2, !tbaa !13
  %222 = zext i16 %221 to i32
  %223 = load ptr, ptr %3, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.otl_BaseAxis, ptr %223, i32 0, i32 0
  %225 = load i16, ptr %224, align 8, !tbaa !9
  %226 = zext i16 %225 to i32
  %227 = icmp slt i32 %222, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %220
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #5
  br label %349

229:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.otl_BaseAxis, ptr %230, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !12
  %233 = load i16, ptr %17, align 2, !tbaa !13
  %234 = zext i16 %233 to i64
  %235 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %232, i64 %234
  store ptr %235, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %236 = call ptr (i32, ...) @bk_new_Block(i32 noundef 0)
  store ptr %236, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #5
  store i16 0, ptr %20, align 2, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #5
  store i16 0, ptr %21, align 2, !tbaa !13
  br label %237

237:                                              ; preds = %259, %229
  %238 = load i16, ptr %21, align 2, !tbaa !13
  %239 = zext i16 %238 to i32
  %240 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %241 = load i16, ptr %240, align 8, !tbaa !9
  %242 = zext i16 %241 to i32
  %243 = icmp slt i32 %239, %242
  br i1 %243, label %245, label %244

244:                                              ; preds = %237
  store i32 20, ptr %6, align 4
  br label %262

245:                                              ; preds = %237
  %246 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %247 = load ptr, ptr %246, align 8, !tbaa !12
  %248 = load i16, ptr %21, align 2, !tbaa !13
  %249 = zext i16 %248 to i64
  %250 = getelementptr inbounds i32, ptr %247, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !19
  %252 = load ptr, ptr %18, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %252, i32 0, i32 1
  %254 = load i32, ptr %253, align 4, !tbaa !14
  %255 = icmp eq i32 %251, %254
  br i1 %255, label %256, label %258

256:                                              ; preds = %245
  %257 = load i16, ptr %21, align 2, !tbaa !13
  store i16 %257, ptr %20, align 2, !tbaa !13
  store i32 20, ptr %6, align 4
  br label %262

258:                                              ; preds = %245
  br label %259

259:                                              ; preds = %258
  %260 = load i16, ptr %21, align 2, !tbaa !13
  %261 = add i16 %260, 1
  store i16 %261, ptr %21, align 2, !tbaa !13
  br label %237, !llvm.loop !33

262:                                              ; preds = %256, %244
  call void @llvm.lifetime.end.p0(i64 2, ptr %21) #5
  br label %263

263:                                              ; preds = %262
  %264 = load ptr, ptr %19, align 8, !tbaa !5
  %265 = load i16, ptr %20, align 2, !tbaa !13
  %266 = zext i16 %265 to i32
  %267 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %264, i32 noundef 2, i32 noundef %266, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #5
  %268 = load ptr, ptr %19, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %270 = load i16, ptr %269, align 8, !tbaa !9
  %271 = zext i16 %270 to i32
  %272 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %268, i32 noundef 2, i32 noundef %271, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 0, ptr %22, align 8, !tbaa !34
  br label %273

273:                                              ; preds = %334, %263
  %274 = load i64, ptr %22, align 8, !tbaa !34
  %275 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 0
  %276 = load i16, ptr %275, align 8, !tbaa !9
  %277 = zext i16 %276 to i64
  %278 = icmp ult i64 %274, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %273
  store i32 23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %337

280:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #5
  store i8 0, ptr %23, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #5
  store i16 0, ptr %24, align 2, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 2, ptr %25) #5
  store i16 0, ptr %25, align 2, !tbaa !13
  br label %281

281:                                              ; preds = %308, %280
  %282 = load i16, ptr %25, align 2, !tbaa !13
  %283 = zext i16 %282 to i32
  %284 = load ptr, ptr %18, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %284, i32 0, i32 2
  %286 = load i16, ptr %285, align 8, !tbaa !24
  %287 = zext i16 %286 to i32
  %288 = icmp slt i32 %283, %287
  br i1 %288, label %290, label %289

289:                                              ; preds = %281
  store i32 26, ptr %6, align 4
  br label %311

290:                                              ; preds = %281
  %291 = load ptr, ptr %18, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %291, i32 0, i32 3
  %293 = load ptr, ptr %292, align 8, !tbaa !25
  %294 = load i16, ptr %25, align 2, !tbaa !13
  %295 = zext i16 %294 to i64
  %296 = getelementptr inbounds %struct.otl_BaseValue, ptr %293, i64 %295
  %297 = getelementptr inbounds %struct.otl_BaseValue, ptr %296, i32 0, i32 0
  %298 = load i32, ptr %297, align 8, !tbaa !26
  %299 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %300 = load ptr, ptr %299, align 8, !tbaa !12
  %301 = load i64, ptr %22, align 8, !tbaa !34
  %302 = getelementptr inbounds i32, ptr %300, i64 %301
  %303 = load i32, ptr %302, align 4, !tbaa !19
  %304 = icmp eq i32 %298, %303
  br i1 %304, label %305, label %307

305:                                              ; preds = %290
  store i8 1, ptr %23, align 1, !tbaa !17
  %306 = load i16, ptr %25, align 2, !tbaa !13
  store i16 %306, ptr %24, align 2, !tbaa !13
  store i32 26, ptr %6, align 4
  br label %311

307:                                              ; preds = %290
  br label %308

308:                                              ; preds = %307
  %309 = load i16, ptr %25, align 2, !tbaa !13
  %310 = add i16 %309, 1
  store i16 %310, ptr %25, align 2, !tbaa !13
  br label %281, !llvm.loop !36

311:                                              ; preds = %305, %289
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #5
  br label %312

312:                                              ; preds = %311
  %313 = load i8, ptr %23, align 1, !tbaa !17, !range !22, !noundef !23
  %314 = trunc i8 %313 to i1
  br i1 %314, label %315, label %329

315:                                              ; preds = %312
  %316 = load ptr, ptr %19, align 8, !tbaa !5
  %317 = load ptr, ptr %18, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %317, i32 0, i32 3
  %319 = load ptr, ptr %318, align 8, !tbaa !25
  %320 = load i16, ptr %24, align 2, !tbaa !13
  %321 = zext i16 %320 to i64
  %322 = getelementptr inbounds %struct.otl_BaseValue, ptr %319, i64 %321
  %323 = getelementptr inbounds %struct.otl_BaseValue, ptr %322, i32 0, i32 1
  %324 = load double, ptr %323, align 8, !tbaa !37
  %325 = fptosi double %324 to i16
  %326 = sext i16 %325 to i32
  %327 = call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef 1, i32 noundef 2, i32 noundef %326, i32 noundef 0)
  %328 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %316, i32 noundef 16, ptr noundef %327, i32 noundef 0)
  br label %333

329:                                              ; preds = %312
  %330 = load ptr, ptr %19, align 8, !tbaa !5
  %331 = call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0)
  %332 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %330, i32 noundef 16, ptr noundef %331, i32 noundef 0)
  br label %333

333:                                              ; preds = %329, %315
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  br label %334

334:                                              ; preds = %333
  %335 = load i64, ptr %22, align 8, !tbaa !34
  %336 = add i64 %335, 1
  store i64 %336, ptr %22, align 8, !tbaa !34
  br label %273, !llvm.loop !38

337:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %338 = load ptr, ptr %19, align 8, !tbaa !5
  %339 = call ptr (i32, ...) @bk_new_Block(i32 noundef 16, ptr noundef %338, i32 noundef 16, ptr noundef null, i32 noundef 2, i32 noundef 0, i32 noundef 0)
  store ptr %339, ptr %26, align 8, !tbaa !5
  %340 = load ptr, ptr %16, align 8, !tbaa !5
  %341 = load ptr, ptr %18, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %341, i32 0, i32 0
  %343 = load i32, ptr %342, align 8, !tbaa !39
  %344 = load ptr, ptr %26, align 8, !tbaa !5
  %345 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %340, i32 noundef 3, i32 noundef %343, i32 noundef 16, ptr noundef %344, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %346

346:                                              ; preds = %337
  %347 = load i16, ptr %17, align 2, !tbaa !13
  %348 = add i16 %347, 1
  store i16 %348, ptr %17, align 2, !tbaa !13
  br label %220, !llvm.loop !40

349:                                              ; preds = %228
  %350 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  %351 = load ptr, ptr %350, align 8, !tbaa !12
  call void @free(ptr noundef %351) #5
  %352 = getelementptr inbounds %struct.anon, ptr %4, i32 0, i32 1
  store ptr null, ptr %352, align 8, !tbaa !12
  %353 = load ptr, ptr %14, align 8, !tbaa !5
  %354 = load ptr, ptr %16, align 8, !tbaa !5
  %355 = call ptr (i32, ...) @bk_new_Block(i32 noundef 16, ptr noundef %353, i32 noundef 16, ptr noundef %354, i32 noundef 0)
  store ptr %355, ptr %2, align 8
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  br label %356

356:                                              ; preds = %349, %29
  %357 = load ptr, ptr %2, align 8
  ret ptr %357
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_reallocate(ptr noundef, i64 noundef, i64 noundef) #2

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

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

declare ptr @bk_new_Block(i32 noundef, ...) #3

declare ptr @bk_push(ptr noundef, i32 noundef, ...) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8}
!11 = !{!"short", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !16, i64 4}
!15 = !{!"", !16, i64 0, !16, i64 4, !11, i64 8, !6, i64 16}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!16, !16, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!15, !11, i64 8}
!25 = !{!15, !6, i64 16}
!26 = !{!27, !16, i64 0}
!27 = !{!"", !16, i64 0, !28, i64 8}
!28 = !{!"double", !7, i64 0}
!29 = distinct !{!29, !21}
!30 = distinct !{!30, !21}
!31 = distinct !{!31, !21}
!32 = distinct !{!32, !21}
!33 = distinct !{!33, !21}
!34 = !{!35, !35, i64 0}
!35 = !{!"long", !7, i64 0}
!36 = distinct !{!36, !21}
!37 = !{!27, !28, i64 8}
!38 = distinct !{!38, !21}
!39 = !{!15, !16, i64 0}
!40 = distinct !{!40, !21}


; 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.otl_BaseScriptEntry = type { i32, i32, i16, ptr }
%struct.otl_BaseValue = type { i32, double }

; Function Attrs: nounwind uwtable
define dso_local ptr @axisToBk(ptr noundef readonly %0) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %108, label %.preheader109

.preheader109:                                    ; preds = %1
  %2 = load i16, ptr %0, align 8, !tbaa !5
  %.not154 = icmp eq i16 %2, 0
  br i1 %.not154, label %._crit_edge123, label %.lr.ph122

.lr.ph122:                                        ; preds = %.preheader109
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  br label %7

._crit_edge123:                                   ; preds = %._crit_edge, %.preheader109
  %.sroa.0.0.lcssa = phi i16 [ 0, %.preheader109 ], [ %26, %._crit_edge ]
  %.sroa.1968.0.lcssa = phi ptr [ null, %.preheader109 ], [ %.sroa.1968.3.lcssa, %._crit_edge ]
  %4 = zext i16 %.sroa.0.0.lcssa to i64
  tail call void @qsort(ptr noundef %.sroa.1968.0.lcssa, i64 noundef %4, i64 noundef 4, ptr noundef nonnull @by_tag) #5
  %5 = zext i16 %.sroa.0.0.lcssa to i32
  %6 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef %5, i32 noundef 0) #5
  %.not158 = icmp eq i16 %.sroa.0.0.lcssa, 0
  br i1 %.not158, label %._crit_edge129, label %.lr.ph128

7:                                                ; preds = %.lr.ph122, %._crit_edge
  %indvars.iv175 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next176, %._crit_edge ]
  %.sroa.1968.0121 = phi ptr [ null, %.lr.ph122 ], [ %.sroa.1968.3.lcssa, %._crit_edge ]
  %.sroa.0.0120 = phi i16 [ 0, %.lr.ph122 ], [ %26, %._crit_edge ]
  %8 = load ptr, ptr %3, align 8, !tbaa !11
  %9 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %8, i64 %indvars.iv175
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !12
  %.not102 = icmp eq i32 %11, 0
  br i1 %.not102, label %.loopexit108, label %.preheader107

.preheader107:                                    ; preds = %7
  %.not155 = icmp eq i16 %.sroa.0.0120, 0
  br i1 %.not155, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader107
  %wide.trip.count = zext i16 %.sroa.0.0120 to i64
  br label %.lr.ph

12:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !15

.lr.ph:                                           ; preds = %.lr.ph.preheader, %12
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %12 ]
  %13 = getelementptr inbounds i32, ptr %.sroa.1968.0121, i64 %indvars.iv
  %14 = load i32, ptr %13, align 4, !tbaa !17
  %15 = icmp eq i32 %14, %11
  br i1 %15, label %.loopexit108, label %12

.critedge:                                        ; preds = %12, %.preheader107
  %16 = add i16 %.sroa.0.0120, 1
  %17 = zext i16 %16 to i64
  %18 = shl nuw nsw i64 %17, 2
  %19 = tail call ptr @__caryll_reallocate(ptr noundef %.sroa.1968.0121, i64 noundef %18, i64 noundef 241)
  %20 = load i32, ptr %10, align 4, !tbaa !12
  %21 = getelementptr i32, ptr %19, i64 %17
  %22 = getelementptr i8, ptr %21, i64 -4
  store i32 %20, ptr %22, align 4, !tbaa !17
  br label %.loopexit108

.loopexit108:                                     ; preds = %.lr.ph, %.critedge, %7
  %.sroa.0.2 = phi i16 [ %.sroa.0.0120, %7 ], [ %16, %.critedge ], [ %.sroa.0.0120, %.lr.ph ]
  %.sroa.1968.2 = phi ptr [ %.sroa.1968.0121, %7 ], [ %19, %.critedge ], [ %.sroa.1968.0121, %.lr.ph ]
  %23 = getelementptr inbounds i8, ptr %9, i64 8
  %24 = load i16, ptr %23, align 8, !tbaa !18
  %.not156 = icmp eq i16 %24, 0
  br i1 %.not156, label %._crit_edge, label %.lr.ph117

.lr.ph117:                                        ; preds = %.loopexit108
  %25 = getelementptr inbounds i8, ptr %9, i64 16
  br label %30

._crit_edge:                                      ; preds = %.loopexit, %.loopexit108
  %.sroa.0.3.lcssa = phi i16 [ %.sroa.0.2, %.loopexit108 ], [ %.sroa.0.4, %.loopexit ]
  %.sroa.1968.3.lcssa = phi ptr [ %.sroa.1968.2, %.loopexit108 ], [ %.sroa.1968.4, %.loopexit ]
  %26 = freeze i16 %.sroa.0.3.lcssa
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %27 = load i16, ptr %0, align 8, !tbaa !5
  %28 = zext i16 %27 to i64
  %29 = icmp ult i64 %indvars.iv.next176, %28
  br i1 %29, label %7, label %._crit_edge123, !llvm.loop !19

30:                                               ; preds = %.lr.ph117, %.loopexit
  %31 = phi i16 [ %24, %.lr.ph117 ], [ %45, %.loopexit ]
  %indvars.iv172 = phi i64 [ 0, %.lr.ph117 ], [ %indvars.iv.next173, %.loopexit ]
  %.sroa.1968.3116 = phi ptr [ %.sroa.1968.2, %.lr.ph117 ], [ %.sroa.1968.4, %.loopexit ]
  %.sroa.0.3115 = phi i16 [ %.sroa.0.2, %.lr.ph117 ], [ %.sroa.0.4, %.loopexit ]
  %32 = load ptr, ptr %25, align 8, !tbaa !20
  %33 = getelementptr inbounds %struct.otl_BaseValue, ptr %32, i64 %indvars.iv172
  %34 = load i32, ptr %33, align 8, !tbaa !21
  %.not157 = icmp eq i16 %.sroa.0.3115, 0
  br i1 %.not157, label %.critedge104, label %.lr.ph113.preheader

.lr.ph113.preheader:                              ; preds = %30
  %wide.trip.count170 = zext i16 %.sroa.0.3115 to i64
  br label %.lr.ph113

35:                                               ; preds = %.lr.ph113
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond171.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count170
  br i1 %exitcond171.not, label %.critedge104, label %.lr.ph113, !llvm.loop !24

.lr.ph113:                                        ; preds = %.lr.ph113.preheader, %35
  %indvars.iv167 = phi i64 [ 0, %.lr.ph113.preheader ], [ %indvars.iv.next168, %35 ]
  %36 = getelementptr inbounds i32, ptr %.sroa.1968.3116, i64 %indvars.iv167
  %37 = load i32, ptr %36, align 4, !tbaa !17
  %38 = icmp eq i32 %37, %34
  br i1 %38, label %.loopexit, label %35

.critedge104:                                     ; preds = %35, %30
  %39 = add i16 %.sroa.0.3115, 1
  %40 = zext i16 %39 to i64
  %41 = shl nuw nsw i64 %40, 2
  %42 = tail call ptr @__caryll_reallocate(ptr noundef %.sroa.1968.3116, i64 noundef %41, i64 noundef 256)
  %43 = getelementptr i32, ptr %42, i64 %40
  %44 = getelementptr i8, ptr %43, i64 -4
  store i32 %34, ptr %44, align 4, !tbaa !17
  %.pre = load i16, ptr %23, align 8, !tbaa !18
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph113, %.critedge104
  %45 = phi i16 [ %.pre, %.critedge104 ], [ %31, %.lr.ph113 ]
  %.sroa.0.4 = phi i16 [ %39, %.critedge104 ], [ %.sroa.0.3115, %.lr.ph113 ]
  %.sroa.1968.4 = phi ptr [ %42, %.critedge104 ], [ %.sroa.1968.3116, %.lr.ph113 ]
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %46 = zext i16 %45 to i64
  %47 = icmp ult i64 %indvars.iv.next173, %46
  br i1 %47, label %30, label %._crit_edge, !llvm.loop !25

._crit_edge129:                                   ; preds = %.lr.ph128, %._crit_edge123
  %48 = load i16, ptr %0, align 8, !tbaa !5
  %49 = zext i16 %48 to i32
  %50 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef %49, i32 noundef 0) #5
  %51 = load i16, ptr %0, align 8, !tbaa !5
  %.not159 = icmp eq i16 %51, 0
  br i1 %.not159, label %._crit_edge146, label %.lr.ph145

.lr.ph145:                                        ; preds = %._crit_edge129
  %52 = getelementptr inbounds i8, ptr %0, i64 8
  br i1 %.not158, label %.lr.ph145.split.split, label %.lr.ph132.us

53:                                               ; preds = %.lr.ph132.us, %57
  %indvars.iv183 = phi i64 [ 0, %.lr.ph132.us ], [ %indvars.iv.next184, %57 ]
  %54 = getelementptr inbounds i32, ptr %.sroa.1968.0.lcssa, i64 %indvars.iv183
  %55 = load i32, ptr %54, align 4, !tbaa !17
  %56 = icmp eq i32 %55, %83
  br i1 %56, label %.preheader.lr.ph.us.split.loop.exit208, label %57

57:                                               ; preds = %53
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %exitcond187.not = icmp eq i64 %indvars.iv.next184, %4
  br i1 %exitcond187.not, label %.preheader.lr.ph.us, label %53, !llvm.loop !26

.preheader.lr.ph.us.split.loop.exit208:           ; preds = %53
  %58 = trunc i64 %indvars.iv183 to i32
  br label %.preheader.lr.ph.us

.preheader.lr.ph.us:                              ; preds = %57, %.preheader.lr.ph.us.split.loop.exit208
  %.091.us.ph = phi i32 [ %58, %.preheader.lr.ph.us.split.loop.exit208 ], [ 0, %57 ]
  %59 = and i32 %.091.us.ph, 65535
  %60 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %81, i32 noundef 2, i32 noundef %59, i32 noundef 0) #5
  %61 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %81, i32 noundef 2, i32 noundef %5, i32 noundef 0) #5
  %62 = getelementptr inbounds i8, ptr %80, i64 8
  %63 = getelementptr inbounds i8, ptr %80, i64 16
  br label %.preheader.us

64:                                               ; preds = %.lr.ph138.us, %68
  %indvars.iv188 = phi i64 [ 0, %.lr.ph138.us ], [ %indvars.iv.next189, %68 ]
  %65 = getelementptr inbounds %struct.otl_BaseValue, ptr %84, i64 %indvars.iv188
  %66 = load i32, ptr %65, align 8, !tbaa !21
  %67 = icmp eq i32 %66, %86
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %exitcond192.not = icmp eq i64 %indvars.iv.next189, %wide.trip.count191
  br i1 %exitcond192.not, label %._crit_edge139.us, label %64, !llvm.loop !27

69:                                               ; preds = %64
  %70 = and i64 %indvars.iv188, 65535
  %71 = getelementptr inbounds %struct.otl_BaseValue, ptr %84, i64 %70, i32 1
  %72 = load double, ptr %71, align 8, !tbaa !28
  %73 = fptosi double %72 to i16
  %74 = sext i16 %73 to i32
  br label %._crit_edge139.us

._crit_edge139.us:                                ; preds = %68, %.preheader.us, %69
  %.sink210 = phi i32 [ %74, %69 ], [ 0, %.preheader.us ], [ 0, %68 ]
  %75 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef 1, i32 noundef 2, i32 noundef %.sink210, i32 noundef 0) #5
  %76 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %81, i32 noundef 16, ptr noundef %75, i32 noundef 0) #5
  %77 = add nuw nsw i64 %.089140.us, 1
  %exitcond193.not = icmp eq i64 %77, %4
  br i1 %exitcond193.not, label %._crit_edge142.us, label %.preheader.us, !llvm.loop !29

.preheader.us:                                    ; preds = %.preheader.lr.ph.us, %._crit_edge139.us
  %.089140.us = phi i64 [ 0, %.preheader.lr.ph.us ], [ %77, %._crit_edge139.us ]
  %78 = load i16, ptr %62, align 8, !tbaa !18
  %.not162 = icmp eq i16 %78, 0
  br i1 %.not162, label %._crit_edge139.us, label %.lr.ph138.us

.lr.ph132.us:                                     ; preds = %.lr.ph145, %._crit_edge142.us
  %indvars.iv194 = phi i64 [ %indvars.iv.next195, %._crit_edge142.us ], [ 0, %.lr.ph145 ]
  %79 = load ptr, ptr %52, align 8, !tbaa !11
  %80 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %79, i64 %indvars.iv194
  %81 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 0) #5
  %82 = getelementptr inbounds i8, ptr %80, i64 4
  %83 = load i32, ptr %82, align 4, !tbaa !12
  br label %53

.lr.ph138.us:                                     ; preds = %.preheader.us
  %84 = load ptr, ptr %63, align 8, !tbaa !20
  %85 = getelementptr inbounds i32, ptr %.sroa.1968.0.lcssa, i64 %.089140.us
  %86 = load i32, ptr %85, align 4, !tbaa !17
  %wide.trip.count191 = zext i16 %78 to i64
  br label %64

._crit_edge142.us:                                ; preds = %._crit_edge139.us
  %87 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 16, ptr noundef %81, i32 noundef 16, ptr noundef null, i32 noundef 2, i32 noundef 0, i32 noundef 0) #5
  %88 = load i32, ptr %80, align 8, !tbaa !30
  %89 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %50, i32 noundef 3, i32 noundef %88, i32 noundef 16, ptr noundef %87, i32 noundef 0) #5
  %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1
  %90 = load i16, ptr %0, align 8, !tbaa !5
  %91 = zext i16 %90 to i64
  %92 = icmp ult i64 %indvars.iv.next195, %91
  br i1 %92, label %.lr.ph132.us, label %._crit_edge146, !llvm.loop !31

.lr.ph128:                                        ; preds = %._crit_edge123, %.lr.ph128
  %indvars.iv178 = phi i64 [ %indvars.iv.next179, %.lr.ph128 ], [ 0, %._crit_edge123 ]
  %93 = getelementptr inbounds i32, ptr %.sroa.1968.0.lcssa, i64 %indvars.iv178
  %94 = load i32, ptr %93, align 4, !tbaa !17
  %95 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %6, i32 noundef 3, i32 noundef %94, i32 noundef 0) #5
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %exitcond182.not = icmp eq i64 %indvars.iv.next179, %4
  br i1 %exitcond182.not, label %._crit_edge129, label %.lr.ph128, !llvm.loop !32

._crit_edge146:                                   ; preds = %._crit_edge142.us, %.lr.ph145.split.split, %._crit_edge129
  tail call void @free(ptr noundef %.sroa.1968.0.lcssa) #5
  %96 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 16, ptr noundef %6, i32 noundef 16, ptr noundef %50, i32 noundef 0) #5
  br label %108

.lr.ph145.split.split:                            ; preds = %.lr.ph145, %.lr.ph145.split.split
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %.lr.ph145.split.split ], [ 0, %.lr.ph145 ]
  %97 = load ptr, ptr %52, align 8, !tbaa !11
  %98 = getelementptr inbounds %struct.otl_BaseScriptEntry, ptr %97, i64 %indvars.iv203
  %99 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 0) #5
  %100 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %99, i32 noundef 2, i32 noundef 0, i32 noundef 0) #5
  %101 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %99, i32 noundef 2, i32 noundef %5, i32 noundef 0) #5
  %102 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 16, ptr noundef %99, i32 noundef 16, ptr noundef null, i32 noundef 2, i32 noundef 0, i32 noundef 0) #5
  %103 = load i32, ptr %98, align 8, !tbaa !30
  %104 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %50, i32 noundef 3, i32 noundef %103, i32 noundef 16, ptr noundef %102, i32 noundef 0) #5
  %indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
  %105 = load i16, ptr %0, align 8, !tbaa !5
  %106 = zext i16 %105 to i64
  %107 = icmp ult i64 %indvars.iv.next204, %106
  br i1 %107, label %.lr.ph145.split.split, label %._crit_edge146, !llvm.loop !31

108:                                              ; preds = %1, %._crit_edge146
  %.0 = phi ptr [ %96, %._crit_edge146 ], [ null, %1 ]
  ret ptr %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_reallocate(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

declare ptr @bk_new_Block(i32 noundef, ...) local_unnamed_addr #3

declare ptr @bk_push(ptr noundef, i32 noundef, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!13, !14, i64 4}
!13 = !{!"", !14, i64 0, !14, i64 4, !7, i64 8, !10, i64 16}
!14 = !{!"int", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!14, !14, i64 0}
!18 = !{!13, !7, i64 8}
!19 = distinct !{!19, !16}
!20 = !{!13, !10, i64 16}
!21 = !{!22, !14, i64 0}
!22 = !{!"", !14, i64 0, !23, i64 8}
!23 = !{!"double", !8, i64 0}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}
!27 = distinct !{!27, !16}
!28 = !{!22, !23, i64 8}
!29 = distinct !{!29, !16}
!30 = !{!13, !14, i64 0}
!31 = distinct !{!31, !16}
!32 = distinct !{!32, !16}


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