; LLVM IR from PyCee/NUS_library :: src/NUSM (NUS_read)

; 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.NUS_binary_model = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, %struct.NUS_skeleton, ptr }
%struct.NUS_skeleton = type { i32, ptr }
%struct.NUS_animation = type { ptr, [64 x i8], float, i32, ptr, ptr }
%struct.NUS_keyframe = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [58 x i8], align 1

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

20:                                               ; preds = %2
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %21)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %391

23:                                               ; preds = %2
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call i32 @fseek(ptr noundef %24, i64 noundef 0, i32 noundef 0)
  %26 = getelementptr inbounds [4 x i8], ptr %9, i64 0, i64 0
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call i64 @fread(ptr noundef %26, i64 noundef 1, i64 noundef 4, ptr noundef %27)
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %46, %23
  %30 = load i64, ptr %7, align 8, !tbaa !9
  %31 = icmp ult i64 %30, 4
  br i1 %31, label %32, label %49

32:                                               ; preds = %29
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = getelementptr inbounds [4 x i8], ptr %9, i64 0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = sext i8 %35 to i32
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = getelementptr inbounds [5 x i8], ptr @.str.2, i64 0, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp ne i32 %36, %40
  br i1 %41, label %42, label %45

42:                                               ; preds = %32
  %43 = getelementptr inbounds [4 x i8], ptr %9, i64 0, i64 0
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %43)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %391

45:                                               ; preds = %32
  br label %46

46:                                               ; preds = %45
  %47 = load i64, ptr %7, align 8, !tbaa !9
  %48 = add i64 %47, 1
  store i64 %48, ptr %7, align 8, !tbaa !9
  br label %29, !llvm.loop !12

49:                                               ; preds = %29
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.NUS_binary_model, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = call i64 @fread(ptr noundef %51, i64 noundef 24, i64 noundef 1, ptr noundef %52)
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %62, label %55

55:                                               ; preds = %49
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = call i32 @ferror(ptr noundef %57) #5
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = call i32 @feof(ptr noundef %59) #5
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %58, i32 noundef %60)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %391

62:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.NUS_binary_model, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !14
  %66 = zext i32 %65 to i64
  %67 = mul i64 %66, 64
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %11, align 4, !tbaa !18
  %69 = load i32, ptr %11, align 4, !tbaa !18
  %70 = zext i32 %69 to i64
  %71 = call noalias ptr @malloc(i64 noundef %70) #6
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.NUS_binary_model, ptr %72, i32 0, i32 6
  store ptr %71, ptr %73, align 8, !tbaa !19
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.NUS_binary_model, ptr %74, i32 0, i32 6
  %76 = load ptr, ptr %75, align 8, !tbaa !19
  %77 = load i32, ptr %11, align 4, !tbaa !18
  %78 = zext i32 %77 to i64
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call i64 @fread(ptr noundef %76, i64 noundef %78, i64 noundef 1, ptr noundef %79)
  %81 = icmp ne i64 %80, 0
  br i1 %81, label %89, label %82

82:                                               ; preds = %62
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = call i32 @ferror(ptr noundef %84) #5
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = call i32 @feof(ptr noundef %86) #5
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %85, i32 noundef %87)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %390

89:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.NUS_binary_model, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !20
  %93 = zext i32 %92 to i64
  %94 = mul i64 %93, 4
  %95 = trunc i64 %94 to i32
  store i32 %95, ptr %12, align 4, !tbaa !18
  %96 = load i32, ptr %12, align 4, !tbaa !18
  %97 = zext i32 %96 to i64
  %98 = call noalias ptr @malloc(i64 noundef %97) #6
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.NUS_binary_model, ptr %99, i32 0, i32 7
  store ptr %98, ptr %100, align 8, !tbaa !21
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.NUS_binary_model, ptr %101, i32 0, i32 7
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = load i32, ptr %12, align 4, !tbaa !18
  %105 = zext i32 %104 to i64
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = call i64 @fread(ptr noundef %103, i64 noundef %105, i64 noundef 1, ptr noundef %106)
  %108 = icmp ne i64 %107, 0
  br i1 %108, label %116, label %109

109:                                              ; preds = %89
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = call i32 @ferror(ptr noundef %111) #5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = call i32 @feof(ptr noundef %113) #5
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %112, i32 noundef %114)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

116:                                              ; preds = %89
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.NUS_binary_model, ptr %117, i32 0, i32 4
  %119 = load i32, ptr %118, align 8, !tbaa !22
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %147

121:                                              ; preds = %116
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.NUS_binary_model, ptr %122, i32 0, i32 4
  %124 = load i32, ptr %123, align 8, !tbaa !22
  %125 = zext i32 %124 to i64
  %126 = call noalias ptr @malloc(i64 noundef %125) #6
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.NUS_binary_model, ptr %127, i32 0, i32 8
  store ptr %126, ptr %128, align 8, !tbaa !23
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.NUS_binary_model, ptr %129, i32 0, i32 8
  %131 = load ptr, ptr %130, align 8, !tbaa !23
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.NUS_binary_model, ptr %132, i32 0, i32 4
  %134 = load i32, ptr %133, align 8, !tbaa !22
  %135 = zext i32 %134 to i64
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = call i64 @fread(ptr noundef %131, i64 noundef %135, i64 noundef 1, ptr noundef %136)
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %146, label %139

139:                                              ; preds = %121
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = call i32 @ferror(ptr noundef %141) #5
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = call i32 @feof(ptr noundef %143) #5
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %142, i32 noundef %144)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

146:                                              ; preds = %121
  br label %147

147:                                              ; preds = %146, %116
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.NUS_binary_model, ptr %148, i32 0, i32 9
  %150 = getelementptr inbounds %struct.NUS_skeleton, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = call i64 @fread(ptr noundef %150, i64 noundef 4, i64 noundef 1, ptr noundef %151)
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %161, label %154

154:                                              ; preds = %147
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = call i32 @ferror(ptr noundef %156) #5
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = call i32 @feof(ptr noundef %158) #5
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %157, i32 noundef %159)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

161:                                              ; preds = %147
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.NUS_binary_model, ptr %162, i32 0, i32 9
  %164 = getelementptr inbounds %struct.NUS_skeleton, ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !24
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %198

167:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.NUS_binary_model, ptr %168, i32 0, i32 9
  %170 = getelementptr inbounds %struct.NUS_skeleton, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !24
  %172 = zext i32 %171 to i64
  %173 = mul i64 %172, 88
  store i64 %173, ptr %13, align 8, !tbaa !9
  %174 = load i64, ptr %13, align 8, !tbaa !9
  %175 = call noalias ptr @malloc(i64 noundef %174) #6
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.NUS_binary_model, ptr %176, i32 0, i32 9
  %178 = getelementptr inbounds %struct.NUS_skeleton, ptr %177, i32 0, i32 1
  store ptr %175, ptr %178, align 8, !tbaa !25
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.NUS_binary_model, ptr %179, i32 0, i32 9
  %181 = getelementptr inbounds %struct.NUS_skeleton, ptr %180, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8, !tbaa !25
  %183 = load i64, ptr %13, align 8, !tbaa !9
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = call i64 @fread(ptr noundef %182, i64 noundef %183, i64 noundef 1, ptr noundef %184)
  %186 = icmp ne i64 %185, 0
  br i1 %186, label %194, label %187

187:                                              ; preds = %167
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = call i32 @ferror(ptr noundef %189) #5
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = call i32 @feof(ptr noundef %191) #5
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %190, i32 noundef %192)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %195

194:                                              ; preds = %167
  store i32 0, ptr %10, align 4
  br label %195

195:                                              ; preds = %194, %187
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %196 = load i32, ptr %10, align 4
  switch i32 %196, label %389 [
    i32 0, label %197
  ]

197:                                              ; preds = %195
  br label %198

198:                                              ; preds = %197, %161
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.NUS_binary_model, ptr %199, i32 0, i32 5
  %201 = load i32, ptr %200, align 4, !tbaa !26
  %202 = zext i32 %201 to i64
  %203 = mul i64 %202, 96
  %204 = call noalias ptr @malloc(i64 noundef %203) #6
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.NUS_binary_model, ptr %205, i32 0, i32 10
  store ptr %204, ptr %206, align 8, !tbaa !27
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %207

207:                                              ; preds = %383, %198
  %208 = load i64, ptr %7, align 8, !tbaa !9
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.NUS_binary_model, ptr %209, i32 0, i32 5
  %211 = load i32, ptr %210, align 4, !tbaa !26
  %212 = zext i32 %211 to i64
  %213 = icmp ult i64 %208, %212
  br i1 %213, label %214, label %386

214:                                              ; preds = %207
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.NUS_binary_model, ptr %215, i32 0, i32 10
  %217 = load ptr, ptr %216, align 8, !tbaa !27
  %218 = load i64, ptr %7, align 8, !tbaa !9
  %219 = getelementptr inbounds %struct.NUS_animation, ptr %217, i64 %218
  %220 = getelementptr inbounds %struct.NUS_animation, ptr %219, i32 0, i32 1
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = call i64 @fread(ptr noundef %220, i64 noundef 64, i64 noundef 1, ptr noundef %221)
  %223 = icmp ne i64 %222, 0
  br i1 %223, label %231, label %224

224:                                              ; preds = %214
  %225 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = call i32 @ferror(ptr noundef %226) #5
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = call i32 @feof(ptr noundef %228) #5
  %230 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %227, i32 noundef %229)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

231:                                              ; preds = %214
  %232 = load ptr, ptr %5, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.NUS_binary_model, ptr %232, i32 0, i32 10
  %234 = load ptr, ptr %233, align 8, !tbaa !27
  %235 = load i64, ptr %7, align 8, !tbaa !9
  %236 = getelementptr inbounds %struct.NUS_animation, ptr %234, i64 %235
  %237 = getelementptr inbounds %struct.NUS_animation, ptr %236, i32 0, i32 2
  %238 = load ptr, ptr %6, align 8, !tbaa !5
  %239 = call i64 @fread(ptr noundef %237, i64 noundef 4, i64 noundef 1, ptr noundef %238)
  %240 = icmp ne i64 %239, 0
  br i1 %240, label %248, label %241

241:                                              ; preds = %231
  %242 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = call i32 @ferror(ptr noundef %243) #5
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = call i32 @feof(ptr noundef %245) #5
  %247 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %244, i32 noundef %246)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

248:                                              ; preds = %231
  %249 = load ptr, ptr %5, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.NUS_binary_model, ptr %249, i32 0, i32 10
  %251 = load ptr, ptr %250, align 8, !tbaa !27
  %252 = load i64, ptr %7, align 8, !tbaa !9
  %253 = getelementptr inbounds %struct.NUS_animation, ptr %251, i64 %252
  %254 = getelementptr inbounds %struct.NUS_animation, ptr %253, i32 0, i32 3
  %255 = load ptr, ptr %6, align 8, !tbaa !5
  %256 = call i64 @fread(ptr noundef %254, i64 noundef 4, i64 noundef 1, ptr noundef %255)
  %257 = icmp ne i64 %256, 0
  br i1 %257, label %265, label %258

258:                                              ; preds = %248
  %259 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = call i32 @ferror(ptr noundef %260) #5
  %262 = load ptr, ptr %6, align 8, !tbaa !5
  %263 = call i32 @feof(ptr noundef %262) #5
  %264 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %261, i32 noundef %263)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

265:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.NUS_binary_model, ptr %266, i32 0, i32 10
  %268 = load ptr, ptr %267, align 8, !tbaa !27
  %269 = load i64, ptr %7, align 8, !tbaa !9
  %270 = getelementptr inbounds %struct.NUS_animation, ptr %268, i64 %269
  %271 = getelementptr inbounds %struct.NUS_animation, ptr %270, i32 0, i32 3
  %272 = load i32, ptr %271, align 4, !tbaa !28
  %273 = zext i32 %272 to i64
  %274 = mul i64 %273, 4
  store i64 %274, ptr %14, align 8, !tbaa !9
  %275 = load i64, ptr %14, align 8, !tbaa !9
  %276 = call noalias ptr @malloc(i64 noundef %275) #6
  %277 = load ptr, ptr %5, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.NUS_binary_model, ptr %277, i32 0, i32 10
  %279 = load ptr, ptr %278, align 8, !tbaa !27
  %280 = load i64, ptr %7, align 8, !tbaa !9
  %281 = getelementptr inbounds %struct.NUS_animation, ptr %279, i64 %280
  %282 = getelementptr inbounds %struct.NUS_animation, ptr %281, i32 0, i32 4
  store ptr %276, ptr %282, align 8, !tbaa !31
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.NUS_binary_model, ptr %283, i32 0, i32 10
  %285 = load ptr, ptr %284, align 8, !tbaa !27
  %286 = load i64, ptr %7, align 8, !tbaa !9
  %287 = getelementptr inbounds %struct.NUS_animation, ptr %285, i64 %286
  %288 = getelementptr inbounds %struct.NUS_animation, ptr %287, i32 0, i32 4
  %289 = load ptr, ptr %288, align 8, !tbaa !31
  %290 = load i64, ptr %14, align 8, !tbaa !9
  %291 = load ptr, ptr %6, align 8, !tbaa !5
  %292 = call i64 @fread(ptr noundef %289, i64 noundef %290, i64 noundef 1, ptr noundef %291)
  %293 = icmp ne i64 %292, 0
  br i1 %293, label %301, label %294

294:                                              ; preds = %265
  %295 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = call i32 @ferror(ptr noundef %296) #5
  %298 = load ptr, ptr %6, align 8, !tbaa !5
  %299 = call i32 @feof(ptr noundef %298) #5
  %300 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %297, i32 noundef %299)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %380

301:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %302 = load ptr, ptr %5, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.NUS_binary_model, ptr %302, i32 0, i32 10
  %304 = load ptr, ptr %303, align 8, !tbaa !27
  %305 = load i64, ptr %7, align 8, !tbaa !9
  %306 = getelementptr inbounds %struct.NUS_animation, ptr %304, i64 %305
  %307 = getelementptr inbounds %struct.NUS_animation, ptr %306, i32 0, i32 3
  %308 = load i32, ptr %307, align 4, !tbaa !28
  %309 = zext i32 %308 to i64
  %310 = mul i64 8, %309
  store i64 %310, ptr %15, align 8, !tbaa !9
  %311 = load i64, ptr %15, align 8, !tbaa !9
  %312 = call noalias ptr @malloc(i64 noundef %311) #6
  %313 = load ptr, ptr %5, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.NUS_binary_model, ptr %313, i32 0, i32 10
  %315 = load ptr, ptr %314, align 8, !tbaa !27
  %316 = load i64, ptr %7, align 8, !tbaa !9
  %317 = getelementptr inbounds %struct.NUS_animation, ptr %315, i64 %316
  %318 = getelementptr inbounds %struct.NUS_animation, ptr %317, i32 0, i32 5
  store ptr %312, ptr %318, align 8, !tbaa !32
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %319

319:                                              ; preds = %375, %301
  %320 = load i64, ptr %8, align 8, !tbaa !9
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.NUS_binary_model, ptr %321, i32 0, i32 10
  %323 = load ptr, ptr %322, align 8, !tbaa !27
  %324 = load i64, ptr %7, align 8, !tbaa !9
  %325 = getelementptr inbounds %struct.NUS_animation, ptr %323, i64 %324
  %326 = getelementptr inbounds %struct.NUS_animation, ptr %325, i32 0, i32 3
  %327 = load i32, ptr %326, align 4, !tbaa !28
  %328 = zext i32 %327 to i64
  %329 = icmp ult i64 %320, %328
  br i1 %329, label %330, label %378

330:                                              ; preds = %319
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %331 = load ptr, ptr %5, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.NUS_binary_model, ptr %331, i32 0, i32 9
  %333 = getelementptr inbounds %struct.NUS_skeleton, ptr %332, i32 0, i32 0
  %334 = load i32, ptr %333, align 8, !tbaa !24
  %335 = zext i32 %334 to i64
  %336 = mul i64 %335, 80
  store i64 %336, ptr %16, align 8, !tbaa !9
  %337 = load i64, ptr %16, align 8, !tbaa !9
  %338 = call noalias ptr @malloc(i64 noundef %337) #6
  %339 = load ptr, ptr %5, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.NUS_binary_model, ptr %339, i32 0, i32 10
  %341 = load ptr, ptr %340, align 8, !tbaa !27
  %342 = load i64, ptr %7, align 8, !tbaa !9
  %343 = getelementptr inbounds %struct.NUS_animation, ptr %341, i64 %342
  %344 = getelementptr inbounds %struct.NUS_animation, ptr %343, i32 0, i32 5
  %345 = load ptr, ptr %344, align 8, !tbaa !32
  %346 = load i64, ptr %8, align 8, !tbaa !9
  %347 = getelementptr inbounds %struct.NUS_keyframe, ptr %345, i64 %346
  %348 = getelementptr inbounds %struct.NUS_keyframe, ptr %347, i32 0, i32 0
  store ptr %338, ptr %348, align 8, !tbaa !33
  %349 = load ptr, ptr %5, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.NUS_binary_model, ptr %349, i32 0, i32 10
  %351 = load ptr, ptr %350, align 8, !tbaa !27
  %352 = load i64, ptr %7, align 8, !tbaa !9
  %353 = getelementptr inbounds %struct.NUS_animation, ptr %351, i64 %352
  %354 = getelementptr inbounds %struct.NUS_animation, ptr %353, i32 0, i32 5
  %355 = load ptr, ptr %354, align 8, !tbaa !32
  %356 = load i64, ptr %8, align 8, !tbaa !9
  %357 = getelementptr inbounds %struct.NUS_keyframe, ptr %355, i64 %356
  %358 = getelementptr inbounds %struct.NUS_keyframe, ptr %357, i32 0, i32 0
  %359 = load ptr, ptr %358, align 8, !tbaa !33
  %360 = load i64, ptr %16, align 8, !tbaa !9
  %361 = load ptr, ptr %6, align 8, !tbaa !5
  %362 = call i64 @fread(ptr noundef %359, i64 noundef %360, i64 noundef 1, ptr noundef %361)
  %363 = icmp ne i64 %362, 0
  br i1 %363, label %371, label %364

364:                                              ; preds = %330
  %365 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %366 = load ptr, ptr %6, align 8, !tbaa !5
  %367 = call i32 @ferror(ptr noundef %366) #5
  %368 = load ptr, ptr %6, align 8, !tbaa !5
  %369 = call i32 @feof(ptr noundef %368) #5
  %370 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %367, i32 noundef %369)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %372

371:                                              ; preds = %330
  store i32 0, ptr %10, align 4
  br label %372

372:                                              ; preds = %371, %364
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %373 = load i32, ptr %10, align 4
  switch i32 %373, label %379 [
    i32 0, label %374
  ]

374:                                              ; preds = %372
  br label %375

375:                                              ; preds = %374
  %376 = load i64, ptr %8, align 8, !tbaa !9
  %377 = add i64 %376, 1
  store i64 %377, ptr %8, align 8, !tbaa !9
  br label %319, !llvm.loop !35

378:                                              ; preds = %319
  store i32 0, ptr %10, align 4
  br label %379

379:                                              ; preds = %378, %372
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %380

380:                                              ; preds = %379, %294
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %381 = load i32, ptr %10, align 4
  switch i32 %381, label %389 [
    i32 0, label %382
  ]

382:                                              ; preds = %380
  br label %383

383:                                              ; preds = %382
  %384 = load i64, ptr %7, align 8, !tbaa !9
  %385 = add i64 %384, 1
  store i64 %385, ptr %7, align 8, !tbaa !9
  br label %207, !llvm.loop !36

386:                                              ; preds = %207
  %387 = load ptr, ptr %6, align 8, !tbaa !5
  %388 = call i32 @fclose(ptr noundef %387)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %389

389:                                              ; preds = %386, %380, %258, %241, %224, %195, %154, %139, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %390

390:                                              ; preds = %389, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %391

391:                                              ; preds = %390, %55, %42, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %392 = load i32, ptr %3, align 4
  ret i32 %392
}

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

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

declare i32 @printf(ptr noundef, ...) #2

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

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

; Function Attrs: nounwind
declare i32 @ferror(ptr noundef) #3

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

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

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

declare i32 @fclose(ptr noundef) #2

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

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

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


; 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.NUS_animation = type { ptr, [64 x i8], float, i32, ptr, ptr }
%struct.NUS_keyframe = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local range(i32 0, 2) i32 @nusm_read(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = alloca [4 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %4 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str)
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %8

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %0)
  br label %.thread

8:                                                ; preds = %2
  %9 = tail call i32 @fseek(ptr noundef nonnull %4, i64 noundef 0, i32 noundef 0)
  %10 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %4)
  %11 = load i8, ptr %3, align 1, !tbaa !5
  %12 = load i8, ptr @.str.2, align 1, !tbaa !5
  %.not128 = icmp eq i8 %11, %12
  br i1 %.not128, label %13, label %27

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %3, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !5
  %16 = load i8, ptr getelementptr inbounds (i8, ptr @.str.2, i64 1), align 1, !tbaa !5
  %.not128.1 = icmp eq i8 %15, %16
  br i1 %.not128.1, label %17, label %27

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %3, i64 2
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = load i8, ptr getelementptr inbounds (i8, ptr @.str.2, i64 2), align 1, !tbaa !5
  %.not128.2 = icmp eq i8 %19, %20
  br i1 %.not128.2, label %21, label %27

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %3, i64 3
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %24 = load i8, ptr getelementptr inbounds (i8, ptr @.str.2, i64 3), align 1, !tbaa !5
  %.not128.3 = icmp eq i8 %23, %24
  br i1 %.not128.3, label %25, label %27

25:                                               ; preds = %21
  %26 = tail call i64 @fread(ptr noundef %1, i64 noundef 24, i64 noundef 1, ptr noundef nonnull %4)
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %29, label %34

27:                                               ; preds = %21, %17, %13, %8
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull %3)
  br label %.thread

29:                                               ; preds = %25
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %31 = tail call i32 @ferror(ptr noundef nonnull %4) #5
  %32 = tail call i32 @feof(ptr noundef nonnull %4) #5
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %31, i32 noundef %32)
  br label %.thread

34:                                               ; preds = %25
  %35 = load i32, ptr %1, align 8, !tbaa !8
  %36 = shl i32 %35, 6
  %37 = zext i32 %36 to i64
  %38 = tail call noalias ptr @malloc(i64 noundef %37) #6
  %39 = getelementptr inbounds i8, ptr %1, i64 24
  store ptr %38, ptr %39, align 8, !tbaa !13
  %40 = tail call i64 @fread(ptr noundef %38, i64 noundef %37, i64 noundef 1, ptr noundef nonnull %4)
  %.not116 = icmp eq i64 %40, 0
  br i1 %.not116, label %41, label %46

41:                                               ; preds = %34
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %43 = tail call i32 @ferror(ptr noundef nonnull %4) #5
  %44 = tail call i32 @feof(ptr noundef nonnull %4) #5
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %43, i32 noundef %44)
  br label %.thread

46:                                               ; preds = %34
  %47 = getelementptr inbounds i8, ptr %1, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !14
  %49 = shl i32 %48, 2
  %50 = zext i32 %49 to i64
  %51 = tail call noalias ptr @malloc(i64 noundef %50) #6
  %52 = getelementptr inbounds i8, ptr %1, i64 32
  store ptr %51, ptr %52, align 8, !tbaa !15
  %53 = tail call i64 @fread(ptr noundef %51, i64 noundef %50, i64 noundef 1, ptr noundef nonnull %4)
  %.not117 = icmp eq i64 %53, 0
  br i1 %.not117, label %54, label %59

54:                                               ; preds = %46
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %56 = tail call i32 @ferror(ptr noundef nonnull %4) #5
  %57 = tail call i32 @feof(ptr noundef nonnull %4) #5
  %58 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %56, i32 noundef %57)
  br label %.thread

59:                                               ; preds = %46
  %60 = getelementptr inbounds i8, ptr %1, i64 16
  %61 = load i32, ptr %60, align 8, !tbaa !16
  %.not118 = icmp eq i32 %61, 0
  br i1 %.not118, label %72, label %62

62:                                               ; preds = %59
  %63 = zext i32 %61 to i64
  %64 = tail call noalias ptr @malloc(i64 noundef %63) #6
  %65 = getelementptr inbounds i8, ptr %1, i64 40
  store ptr %64, ptr %65, align 8, !tbaa !17
  %66 = tail call i64 @fread(ptr noundef %64, i64 noundef %63, i64 noundef 1, ptr noundef nonnull %4)
  %.not119 = icmp eq i64 %66, 0
  br i1 %.not119, label %67, label %72

67:                                               ; preds = %62
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %69 = tail call i32 @ferror(ptr noundef nonnull %4) #5
  %70 = tail call i32 @feof(ptr noundef nonnull %4) #5
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %69, i32 noundef %70)
  br label %.thread

72:                                               ; preds = %62, %59
  %73 = getelementptr inbounds i8, ptr %1, i64 48
  %74 = tail call i64 @fread(ptr noundef nonnull %73, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %.not120 = icmp eq i64 %74, 0
  br i1 %.not120, label %75, label %80

75:                                               ; preds = %72
  %76 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %77 = tail call i32 @ferror(ptr noundef nonnull %4) #5
  %78 = tail call i32 @feof(ptr noundef nonnull %4) #5
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %77, i32 noundef %78)
  br label %.thread

80:                                               ; preds = %72
  %81 = load i32, ptr %73, align 8, !tbaa !18
  %.not121 = icmp eq i32 %81, 0
  br i1 %.not121, label %.critedge, label %82

82:                                               ; preds = %80
  %83 = zext i32 %81 to i64
  %84 = mul nuw nsw i64 %83, 88
  %85 = tail call noalias ptr @malloc(i64 noundef %84) #6
  %86 = getelementptr inbounds i8, ptr %1, i64 56
  store ptr %85, ptr %86, align 8, !tbaa !19
  %87 = tail call i64 @fread(ptr noundef %85, i64 noundef %84, i64 noundef 1, ptr noundef nonnull %4)
  %.not122.not = icmp eq i64 %87, 0
  br i1 %.not122.not, label %88, label %.critedge

88:                                               ; preds = %82
  %89 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %90 = tail call i32 @ferror(ptr noundef nonnull %4) #5
  %91 = tail call i32 @feof(ptr noundef nonnull %4) #5
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %90, i32 noundef %91)
  br label %.thread

.critedge:                                        ; preds = %82, %80
  %93 = getelementptr inbounds i8, ptr %1, i64 20
  %94 = load i32, ptr %93, align 4, !tbaa !20
  %95 = zext i32 %94 to i64
  %96 = mul nuw nsw i64 %95, 96
  %97 = tail call noalias ptr @malloc(i64 noundef %96) #6
  %98 = getelementptr inbounds i8, ptr %1, i64 64
  store ptr %97, ptr %98, align 8, !tbaa !21
  %.not137 = icmp eq i32 %94, 0
  br i1 %.not137, label %._crit_edge136, label %.lr.ph

.lr.ph:                                           ; preds = %.critedge, %._crit_edge
  %99 = phi ptr [ %168, %._crit_edge ], [ %97, %.critedge ]
  %.1108135 = phi i64 [ %169, %._crit_edge ], [ 0, %.critedge ]
  %100 = getelementptr inbounds %struct.NUS_animation, ptr %99, i64 %.1108135, i32 1
  %101 = tail call i64 @fread(ptr noundef nonnull %100, i64 noundef 64, i64 noundef 1, ptr noundef %4)
  %.not123 = icmp eq i64 %101, 0
  br i1 %.not123, label %102, label %107

102:                                              ; preds = %.lr.ph
  %103 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %104 = tail call i32 @ferror(ptr noundef %4) #5
  %105 = tail call i32 @feof(ptr noundef %4) #5
  %106 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %104, i32 noundef %105)
  br label %.thread

107:                                              ; preds = %.lr.ph
  %108 = load ptr, ptr %98, align 8, !tbaa !21
  %109 = getelementptr inbounds %struct.NUS_animation, ptr %108, i64 %.1108135, i32 2
  %110 = tail call i64 @fread(ptr noundef nonnull %109, i64 noundef 4, i64 noundef 1, ptr noundef %4)
  %.not124 = icmp eq i64 %110, 0
  br i1 %.not124, label %111, label %116

111:                                              ; preds = %107
  %112 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %113 = tail call i32 @ferror(ptr noundef %4) #5
  %114 = tail call i32 @feof(ptr noundef %4) #5
  %115 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %113, i32 noundef %114)
  br label %.thread

116:                                              ; preds = %107
  %117 = load ptr, ptr %98, align 8, !tbaa !21
  %118 = getelementptr inbounds %struct.NUS_animation, ptr %117, i64 %.1108135, i32 3
  %119 = tail call i64 @fread(ptr noundef nonnull %118, i64 noundef 4, i64 noundef 1, ptr noundef %4)
  %.not125 = icmp eq i64 %119, 0
  br i1 %.not125, label %120, label %125

120:                                              ; preds = %116
  %121 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %122 = tail call i32 @ferror(ptr noundef %4) #5
  %123 = tail call i32 @feof(ptr noundef %4) #5
  %124 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %122, i32 noundef %123)
  br label %.thread

125:                                              ; preds = %116
  %126 = load ptr, ptr %98, align 8, !tbaa !21
  %127 = getelementptr inbounds %struct.NUS_animation, ptr %126, i64 %.1108135, i32 3
  %128 = load i32, ptr %127, align 4, !tbaa !22
  %129 = zext i32 %128 to i64
  %130 = shl nuw nsw i64 %129, 2
  %131 = tail call noalias ptr @malloc(i64 noundef %130) #6
  %132 = getelementptr inbounds %struct.NUS_animation, ptr %126, i64 %.1108135, i32 4
  store ptr %131, ptr %132, align 8, !tbaa !25
  %133 = tail call i64 @fread(ptr noundef %131, i64 noundef %130, i64 noundef 1, ptr noundef %4)
  %.not126 = icmp eq i64 %133, 0
  br i1 %.not126, label %134, label %139

134:                                              ; preds = %125
  %135 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %136 = tail call i32 @ferror(ptr noundef %4) #5
  %137 = tail call i32 @feof(ptr noundef %4) #5
  %138 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %136, i32 noundef %137)
  br label %.thread

139:                                              ; preds = %125
  %140 = load ptr, ptr %98, align 8, !tbaa !21
  %141 = getelementptr inbounds %struct.NUS_animation, ptr %140, i64 %.1108135, i32 3
  %142 = load i32, ptr %141, align 4, !tbaa !22
  %143 = zext i32 %142 to i64
  %144 = shl nuw nsw i64 %143, 3
  %145 = tail call noalias ptr @malloc(i64 noundef %144) #6
  %146 = getelementptr inbounds %struct.NUS_animation, ptr %140, i64 %.1108135, i32 5
  store ptr %145, ptr %146, align 8, !tbaa !26
  %.not138 = icmp eq i32 %142, 0
  br i1 %.not138, label %._crit_edge, label %.critedge130

147:                                              ; preds = %.critedge130
  %148 = add nuw nsw i64 %.0109134, 1
  %149 = load ptr, ptr %98, align 8, !tbaa !21
  %150 = getelementptr inbounds %struct.NUS_animation, ptr %149, i64 %.1108135, i32 3
  %151 = load i32, ptr %150, align 4, !tbaa !22
  %152 = zext i32 %151 to i64
  %153 = icmp ult i64 %148, %152
  br i1 %153, label %.critedge130, label %._crit_edge, !llvm.loop !27

.critedge130:                                     ; preds = %139, %147
  %154 = phi ptr [ %149, %147 ], [ %140, %139 ]
  %.0109134 = phi i64 [ %148, %147 ], [ 0, %139 ]
  %155 = load i32, ptr %73, align 8, !tbaa !18
  %156 = zext i32 %155 to i64
  %157 = mul nuw nsw i64 %156, 80
  %158 = tail call noalias ptr @malloc(i64 noundef %157) #6
  %159 = getelementptr inbounds %struct.NUS_animation, ptr %154, i64 %.1108135, i32 5
  %160 = load ptr, ptr %159, align 8, !tbaa !26
  %161 = getelementptr inbounds %struct.NUS_keyframe, ptr %160, i64 %.0109134
  store ptr %158, ptr %161, align 8, !tbaa !29
  %162 = tail call i64 @fread(ptr noundef %158, i64 noundef %157, i64 noundef 1, ptr noundef %4)
  %.not127.not = icmp eq i64 %162, 0
  br i1 %.not127.not, label %163, label %147

163:                                              ; preds = %.critedge130
  %164 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %165 = tail call i32 @ferror(ptr noundef %4) #5
  %166 = tail call i32 @feof(ptr noundef %4) #5
  %167 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %165, i32 noundef %166)
  br label %.thread

._crit_edge:                                      ; preds = %147, %139
  %168 = phi ptr [ %140, %139 ], [ %149, %147 ]
  %169 = add nuw nsw i64 %.1108135, 1
  %170 = load i32, ptr %93, align 4, !tbaa !20
  %171 = zext i32 %170 to i64
  %172 = icmp ult i64 %169, %171
  br i1 %172, label %.lr.ph, label %._crit_edge136, !llvm.loop !31

._crit_edge136:                                   ; preds = %._crit_edge, %.critedge
  %173 = tail call i32 @fclose(ptr noundef %4)
  br label %.thread

.thread:                                          ; preds = %163, %134, %88, %41, %._crit_edge136, %120, %111, %102, %75, %67, %54, %29, %27, %6
  %.9 = phi i32 [ 0, %6 ], [ 0, %27 ], [ 0, %29 ], [ 0, %41 ], [ 0, %120 ], [ 0, %111 ], [ 0, %102 ], [ 1, %._crit_edge136 ], [ 0, %88 ], [ 0, %75 ], [ 0, %67 ], [ 0, %54 ], [ 0, %134 ], [ 0, %163 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret i32 %.9
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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 #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind memory(read)
declare noundef i32 @ferror(ptr nocapture noundef) local_unnamed_addr #3

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

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

; 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 noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { nofree 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 = { 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 #3 = { nofree nounwind 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

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

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


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