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

; 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 [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @nusm_validate(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.NUS_binary_model, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  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 72, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = call i32 @nusm_read(ptr noundef %10, ptr noundef %6)
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %15

13:                                               ; preds = %2
  %14 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

15:                                               ; preds = %2
  %16 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 0
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.NUS_binary_model, ptr %17, i32 0, i32 0
  %19 = call i32 @memcmp(ptr noundef %16, ptr noundef %18, i64 noundef 24) #5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %23

21:                                               ; preds = %15
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

23:                                               ; preds = %15
  %24 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 6
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.NUS_binary_model, ptr %26, i32 0, i32 6
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !13
  %31 = zext i32 %30 to i64
  %32 = mul i64 64, %31
  %33 = call i32 @memcmp(ptr noundef %25, ptr noundef %28, i64 noundef %32) #5
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %23
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

37:                                               ; preds = %23
  %38 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 7
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.NUS_binary_model, ptr %40, i32 0, i32 7
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !15
  %45 = zext i32 %44 to i64
  %46 = mul i64 4, %45
  %47 = call i32 @memcmp(ptr noundef %39, ptr noundef %42, i64 noundef %46) #5
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %37
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

51:                                               ; preds = %37
  %52 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 4
  %53 = load i32, ptr %52, align 8, !tbaa !16
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %69

55:                                               ; preds = %51
  %56 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 8
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.NUS_binary_model, ptr %58, i32 0, i32 8
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 4
  %62 = load i32, ptr %61, align 8, !tbaa !16
  %63 = zext i32 %62 to i64
  %64 = call i32 @memcmp(ptr noundef %57, ptr noundef %60, i64 noundef %63) #5
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %68

66:                                               ; preds = %55
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

68:                                               ; preds = %55
  br label %69

69:                                               ; preds = %68, %51
  %70 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 9
  %71 = getelementptr inbounds %struct.NUS_skeleton, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !18
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.NUS_binary_model, ptr %73, i32 0, i32 9
  %75 = getelementptr inbounds %struct.NUS_skeleton, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !18
  %77 = icmp ne i32 %72, %76
  br i1 %77, label %78, label %80

78:                                               ; preds = %69
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

80:                                               ; preds = %69
  %81 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 9
  %82 = getelementptr inbounds %struct.NUS_skeleton, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !18
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %103

85:                                               ; preds = %80
  %86 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 9
  %87 = getelementptr inbounds %struct.NUS_skeleton, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !19
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.NUS_binary_model, ptr %89, i32 0, i32 9
  %91 = getelementptr inbounds %struct.NUS_skeleton, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 9
  %94 = getelementptr inbounds %struct.NUS_skeleton, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !18
  %96 = zext i32 %95 to i64
  %97 = mul i64 88, %96
  %98 = call i32 @memcmp(ptr noundef %88, ptr noundef %92, i64 noundef %97) #5
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %85
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

102:                                              ; preds = %85
  br label %103

103:                                              ; preds = %102, %80
  store i32 0, ptr %7, align 4, !tbaa !20
  br label %104

104:                                              ; preds = %248, %103
  %105 = load i32, ptr %7, align 4, !tbaa !20
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.NUS_binary_model, ptr %106, i32 0, i32 5
  %108 = load i32, ptr %107, align 4, !tbaa !21
  %109 = icmp ult i32 %105, %108
  br i1 %109, label %110, label %251

110:                                              ; preds = %104
  %111 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 10
  %112 = load ptr, ptr %111, align 8, !tbaa !22
  %113 = load i32, ptr %7, align 4, !tbaa !20
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds %struct.NUS_animation, ptr %112, i64 %114
  %116 = getelementptr inbounds %struct.NUS_animation, ptr %115, i32 0, i32 1
  %117 = getelementptr inbounds [64 x i8], ptr %116, i64 0, i64 0
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.NUS_binary_model, ptr %118, i32 0, i32 10
  %120 = load ptr, ptr %119, align 8, !tbaa !22
  %121 = load i32, ptr %7, align 4, !tbaa !20
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds %struct.NUS_animation, ptr %120, i64 %122
  %124 = getelementptr inbounds %struct.NUS_animation, ptr %123, i32 0, i32 1
  %125 = getelementptr inbounds [64 x i8], ptr %124, i64 0, i64 0
  %126 = call i32 @strcmp(ptr noundef %117, ptr noundef %125) #5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %110
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

130:                                              ; preds = %110
  %131 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 10
  %132 = load ptr, ptr %131, align 8, !tbaa !22
  %133 = load i32, ptr %7, align 4, !tbaa !20
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds %struct.NUS_animation, ptr %132, i64 %134
  %136 = getelementptr inbounds %struct.NUS_animation, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.NUS_binary_model, ptr %137, i32 0, i32 10
  %139 = load ptr, ptr %138, align 8, !tbaa !22
  %140 = load i32, ptr %7, align 4, !tbaa !20
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %struct.NUS_animation, ptr %139, i64 %141
  %143 = getelementptr inbounds %struct.NUS_animation, ptr %142, i32 0, i32 2
  %144 = call i32 @memcmp(ptr noundef %136, ptr noundef %143, i64 noundef 4) #5
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %148

146:                                              ; preds = %130
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

148:                                              ; preds = %130
  %149 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 10
  %150 = load ptr, ptr %149, align 8, !tbaa !22
  %151 = load i32, ptr %7, align 4, !tbaa !20
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds %struct.NUS_animation, ptr %150, i64 %152
  %154 = getelementptr inbounds %struct.NUS_animation, ptr %153, i32 0, i32 3
  %155 = load i32, ptr %154, align 4, !tbaa !23
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.NUS_binary_model, ptr %156, i32 0, i32 10
  %158 = load ptr, ptr %157, align 8, !tbaa !22
  %159 = load i32, ptr %7, align 4, !tbaa !20
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds %struct.NUS_animation, ptr %158, i64 %160
  %162 = getelementptr inbounds %struct.NUS_animation, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 4, !tbaa !23
  %164 = icmp ne i32 %155, %163
  br i1 %164, label %165, label %167

165:                                              ; preds = %148
  %166 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

167:                                              ; preds = %148
  %168 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 10
  %169 = load ptr, ptr %168, align 8, !tbaa !22
  %170 = load i32, ptr %7, align 4, !tbaa !20
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds %struct.NUS_animation, ptr %169, i64 %171
  %173 = getelementptr inbounds %struct.NUS_animation, ptr %172, i32 0, i32 4
  %174 = load ptr, ptr %173, align 8, !tbaa !26
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.NUS_binary_model, ptr %175, i32 0, i32 10
  %177 = load ptr, ptr %176, align 8, !tbaa !22
  %178 = load i32, ptr %7, align 4, !tbaa !20
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds %struct.NUS_animation, ptr %177, i64 %179
  %181 = getelementptr inbounds %struct.NUS_animation, ptr %180, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !26
  %183 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 10
  %184 = load ptr, ptr %183, align 8, !tbaa !22
  %185 = load i32, ptr %7, align 4, !tbaa !20
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds %struct.NUS_animation, ptr %184, i64 %186
  %188 = getelementptr inbounds %struct.NUS_animation, ptr %187, i32 0, i32 3
  %189 = load i32, ptr %188, align 4, !tbaa !23
  %190 = zext i32 %189 to i64
  %191 = mul i64 4, %190
  %192 = call i32 @memcmp(ptr noundef %174, ptr noundef %182, i64 noundef %191) #5
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %196

194:                                              ; preds = %167
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

196:                                              ; preds = %167
  store i32 0, ptr %8, align 4, !tbaa !20
  br label %197

197:                                              ; preds = %244, %196
  %198 = load i32, ptr %8, align 4, !tbaa !20
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.NUS_binary_model, ptr %199, i32 0, i32 10
  %201 = load ptr, ptr %200, align 8, !tbaa !22
  %202 = load i32, ptr %7, align 4, !tbaa !20
  %203 = zext i32 %202 to i64
  %204 = getelementptr inbounds %struct.NUS_animation, ptr %201, i64 %203
  %205 = getelementptr inbounds %struct.NUS_animation, ptr %204, i32 0, i32 3
  %206 = load i32, ptr %205, align 4, !tbaa !23
  %207 = icmp ult i32 %198, %206
  br i1 %207, label %208, label %247

208:                                              ; preds = %197
  %209 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 10
  %210 = load ptr, ptr %209, align 8, !tbaa !22
  %211 = load i32, ptr %7, align 4, !tbaa !20
  %212 = zext i32 %211 to i64
  %213 = getelementptr inbounds %struct.NUS_animation, ptr %210, i64 %212
  %214 = getelementptr inbounds %struct.NUS_animation, ptr %213, i32 0, i32 5
  %215 = load ptr, ptr %214, align 8, !tbaa !27
  %216 = load i32, ptr %8, align 4, !tbaa !20
  %217 = zext i32 %216 to i64
  %218 = getelementptr inbounds %struct.NUS_keyframe, ptr %215, i64 %217
  %219 = getelementptr inbounds %struct.NUS_keyframe, ptr %218, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !28
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.NUS_binary_model, ptr %221, i32 0, i32 10
  %223 = load ptr, ptr %222, align 8, !tbaa !22
  %224 = load i32, ptr %7, align 4, !tbaa !20
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds %struct.NUS_animation, ptr %223, i64 %225
  %227 = getelementptr inbounds %struct.NUS_animation, ptr %226, i32 0, i32 5
  %228 = load ptr, ptr %227, align 8, !tbaa !27
  %229 = load i32, ptr %8, align 4, !tbaa !20
  %230 = zext i32 %229 to i64
  %231 = getelementptr inbounds %struct.NUS_keyframe, ptr %228, i64 %230
  %232 = getelementptr inbounds %struct.NUS_keyframe, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !28
  %234 = getelementptr inbounds %struct.NUS_binary_model, ptr %6, i32 0, i32 9
  %235 = getelementptr inbounds %struct.NUS_skeleton, ptr %234, i32 0, i32 0
  %236 = load i32, ptr %235, align 8, !tbaa !18
  %237 = zext i32 %236 to i64
  %238 = mul i64 80, %237
  %239 = call i32 @memcmp(ptr noundef %220, ptr noundef %233, i64 noundef %238) #5
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %243

241:                                              ; preds = %208
  %242 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

243:                                              ; preds = %208
  br label %244

244:                                              ; preds = %243
  %245 = load i32, ptr %8, align 4, !tbaa !20
  %246 = add i32 %245, 1
  store i32 %246, ptr %8, align 4, !tbaa !20
  br label %197, !llvm.loop !30

247:                                              ; preds = %197
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %7, align 4, !tbaa !20
  %250 = add i32 %249, 1
  store i32 %250, ptr %7, align 4, !tbaa !20
  br label %104, !llvm.loop !32

251:                                              ; preds = %104
  call void @nus_binary_model_free(ptr noundef %6)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %252

252:                                              ; preds = %251, %241, %194, %165, %146, %128, %100, %78, %66, %49, %35, %21, %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #4
  %253 = load i32, ptr %3, align 4
  ret i32 %253
}

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

declare i32 @nusm_read(ptr noundef, ptr noundef) #2

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

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

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

declare void @nus_binary_model_free(ptr noundef) #2

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

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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

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

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


; 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_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 [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @nusm_validate(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.NUS_binary_model, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #6
  %4 = call i32 @nusm_read(ptr noundef %0, ptr noundef nonnull %3) #6
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %6, label %8

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

8:                                                ; preds = %2
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %3, ptr noundef nonnull dereferenceable(24) %1, i64 24)
  %.not = icmp eq i32 %bcmp, 0
  br i1 %.not, label %11, label %9

9:                                                ; preds = %8
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %112

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %3, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %1, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = load i32, ptr %3, align 8, !tbaa !12
  %17 = zext i32 %16 to i64
  %18 = shl nuw nsw i64 %17, 6
  %bcmp37 = call i32 @bcmp(ptr %13, ptr %15, i64 %18)
  %.not38 = icmp eq i32 %bcmp37, 0
  br i1 %.not38, label %21, label %19

19:                                               ; preds = %11
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %112

21:                                               ; preds = %11
  %22 = getelementptr inbounds i8, ptr %3, i64 32
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = getelementptr inbounds i8, ptr %1, i64 32
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds i8, ptr %3, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !14
  %28 = zext i32 %27 to i64
  %29 = shl nuw nsw i64 %28, 2
  %bcmp39 = call i32 @bcmp(ptr %23, ptr %25, i64 %29)
  %.not40 = icmp eq i32 %bcmp39, 0
  br i1 %.not40, label %32, label %30

30:                                               ; preds = %21
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %112

32:                                               ; preds = %21
  %33 = getelementptr inbounds i8, ptr %3, i64 16
  %34 = load i32, ptr %33, align 8, !tbaa !15
  %.not41 = icmp eq i32 %34, 0
  br i1 %.not41, label %43, label %35

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %3, i64 40
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %1, i64 40
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = zext i32 %34 to i64
  %bcmp42 = call i32 @bcmp(ptr %37, ptr %39, i64 %40)
  %.not43 = icmp eq i32 %bcmp42, 0
  br i1 %.not43, label %43, label %41

41:                                               ; preds = %35
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %112

43:                                               ; preds = %35, %32
  %44 = getelementptr inbounds i8, ptr %3, i64 48
  %45 = load i32, ptr %44, align 8, !tbaa !17
  %46 = getelementptr inbounds i8, ptr %1, i64 48
  %47 = load i32, ptr %46, align 8, !tbaa !17
  %.not44 = icmp eq i32 %45, %47
  br i1 %.not44, label %50, label %48

48:                                               ; preds = %43
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %112

50:                                               ; preds = %43
  %.not45 = icmp eq i32 %45, 0
  br i1 %.not45, label %60, label %51

51:                                               ; preds = %50
  %52 = getelementptr inbounds i8, ptr %3, i64 56
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = getelementptr inbounds i8, ptr %1, i64 56
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = zext i32 %45 to i64
  %57 = mul nuw nsw i64 %56, 88
  %bcmp46 = call i32 @bcmp(ptr %53, ptr %55, i64 %57)
  %.not47 = icmp eq i32 %bcmp46, 0
  br i1 %.not47, label %60, label %58

58:                                               ; preds = %51
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %112

60:                                               ; preds = %51, %50
  %61 = getelementptr inbounds i8, ptr %1, i64 20
  %62 = load i32, ptr %61, align 4, !tbaa !19
  %.not61 = icmp eq i32 %62, 0
  br i1 %.not61, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %60
  %63 = getelementptr inbounds i8, ptr %3, i64 64
  %64 = load ptr, ptr %63, align 8, !tbaa !20
  %65 = getelementptr inbounds i8, ptr %1, i64 64
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = zext i32 %45 to i64
  %68 = mul nuw nsw i64 %67, 80
  br label %69

69:                                               ; preds = %.lr.ph59, %._crit_edge
  %.03257 = phi i32 [ 0, %.lr.ph59 ], [ %111, %._crit_edge ]
  %70 = zext i32 %.03257 to i64
  %71 = getelementptr inbounds %struct.NUS_animation, ptr %64, i64 %70
  %72 = getelementptr inbounds i8, ptr %71, i64 8
  %73 = getelementptr inbounds %struct.NUS_animation, ptr %66, i64 %70
  %74 = getelementptr inbounds i8, ptr %73, i64 8
  %75 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %72, ptr noundef nonnull dereferenceable(1) %74) #7
  %.not48 = icmp eq i32 %75, 0
  br i1 %.not48, label %78, label %76

76:                                               ; preds = %69
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %112

78:                                               ; preds = %69
  %79 = getelementptr inbounds i8, ptr %71, i64 72
  %80 = getelementptr inbounds i8, ptr %73, i64 72
  %bcmp49 = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %79, ptr noundef nonnull dereferenceable(4) %80, i64 4)
  %.not50 = icmp eq i32 %bcmp49, 0
  br i1 %.not50, label %83, label %81

81:                                               ; preds = %78
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %112

83:                                               ; preds = %78
  %84 = getelementptr inbounds i8, ptr %71, i64 76
  %85 = load i32, ptr %84, align 4, !tbaa !21
  %86 = getelementptr inbounds i8, ptr %73, i64 76
  %87 = load i32, ptr %86, align 4, !tbaa !21
  %.not51 = icmp eq i32 %85, %87
  br i1 %.not51, label %90, label %88

88:                                               ; preds = %83
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %112

90:                                               ; preds = %83
  %91 = getelementptr inbounds i8, ptr %71, i64 80
  %92 = load ptr, ptr %91, align 8, !tbaa !24
  %93 = getelementptr inbounds i8, ptr %73, i64 80
  %94 = load ptr, ptr %93, align 8, !tbaa !24
  %95 = zext i32 %85 to i64
  %96 = shl nuw nsw i64 %95, 2
  %bcmp52 = call i32 @bcmp(ptr %92, ptr %94, i64 %96)
  %.not53 = icmp eq i32 %bcmp52, 0
  br i1 %.not53, label %.preheader, label %101

.preheader:                                       ; preds = %90
  %.not62 = icmp eq i32 %85, 0
  br i1 %.not62, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %97 = getelementptr inbounds %struct.NUS_animation, ptr %64, i64 %70, i32 5
  %98 = load ptr, ptr %97, align 8, !tbaa !25
  %99 = getelementptr inbounds i8, ptr %73, i64 88
  %100 = load ptr, ptr %99, align 8, !tbaa !25
  br label %104

101:                                              ; preds = %90
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %112

103:                                              ; preds = %104
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %95
  br i1 %exitcond.not, label %._crit_edge, label %104, !llvm.loop !26

104:                                              ; preds = %.lr.ph, %103
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %103 ]
  %105 = getelementptr inbounds %struct.NUS_keyframe, ptr %98, i64 %indvars.iv
  %106 = load ptr, ptr %105, align 8, !tbaa !28
  %107 = getelementptr inbounds %struct.NUS_keyframe, ptr %100, i64 %indvars.iv
  %108 = load ptr, ptr %107, align 8, !tbaa !28
  %bcmp54 = call i32 @bcmp(ptr %106, ptr %108, i64 %68)
  %.not55 = icmp eq i32 %bcmp54, 0
  br i1 %.not55, label %103, label %109

109:                                              ; preds = %104
  %110 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %112

._crit_edge:                                      ; preds = %103, %.preheader
  %111 = add nuw i32 %.03257, 1
  %exitcond64.not = icmp eq i32 %111, %62
  br i1 %exitcond64.not, label %._crit_edge60, label %69, !llvm.loop !30

._crit_edge60:                                    ; preds = %._crit_edge, %60
  call void @nus_binary_model_free(ptr noundef nonnull %3) #6
  br label %112

112:                                              ; preds = %._crit_edge60, %109, %101, %88, %81, %76, %58, %48, %41, %30, %19, %9, %6
  %.033 = phi i32 [ 0, %6 ], [ 0, %9 ], [ 0, %19 ], [ 0, %30 ], [ 0, %41 ], [ 0, %48 ], [ 0, %58 ], [ 0, %76 ], [ 0, %81 ], [ 0, %88 ], [ 0, %101 ], [ 0, %109 ], [ 1, %._crit_edge60 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #6
  ret i32 %.033
}

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

declare i32 @nusm_read(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

declare void @nus_binary_model_free(ptr noundef) local_unnamed_addr #2

; 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 willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #5

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

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

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


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