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

; 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 }

@__const.nusm_store.magic_string_var = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [65 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_store(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 [5 x i8], align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = 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 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 5, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %7, ptr align 1 @__const.nusm_store.magic_string_var, i64 5, i1 false)
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = call noalias ptr @fopen(ptr noundef %11, ptr noundef @.str)
  store ptr %12, ptr %6, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %17

14:                                               ; preds = %2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %15)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %229

17:                                               ; preds = %2
  %18 = getelementptr inbounds [5 x i8], ptr %7, i64 0, i64 0
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call i64 @fwrite(ptr noundef %18, i64 noundef 4, i64 noundef 1, ptr noundef %19)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call i64 @fwrite(ptr noundef %21, i64 noundef 4, i64 noundef 6, ptr noundef %22)
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.NUS_binary_model, ptr %24, i32 0, i32 6
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.NUS_binary_model, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !13
  %30 = zext i32 %29 to i64
  %31 = mul i64 %30, 64
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = call i64 @fwrite(ptr noundef %26, i64 noundef %31, i64 noundef 1, ptr noundef %32)
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %37, label %35

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

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

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

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

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

67:                                               ; preds = %56
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %229

69:                                               ; preds = %56
  br label %70

70:                                               ; preds = %69, %51
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.NUS_binary_model, ptr %71, i32 0, i32 9
  %73 = getelementptr inbounds %struct.NUS_skeleton, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = call i64 @fwrite(ptr noundef %73, i64 noundef 4, i64 noundef 1, ptr noundef %74)
  %76 = icmp ne i64 %75, 0
  br i1 %76, label %79, label %77

77:                                               ; preds = %70
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %229

79:                                               ; preds = %70
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.NUS_binary_model, ptr %80, 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 %102

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

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

101:                                              ; preds = %85
  br label %102

102:                                              ; preds = %101, %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !20
  br label %103

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

109:                                              ; preds = %103
  store i32 2, ptr %8, align 4
  br label %224

110:                                              ; preds = %103
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.NUS_binary_model, ptr %111, i32 0, i32 10
  %113 = load ptr, ptr %112, align 8, !tbaa !22
  %114 = load i32, ptr %9, align 4, !tbaa !20
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds %struct.NUS_animation, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.NUS_animation, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = call i64 @fwrite(ptr noundef %117, i64 noundef 64, i64 noundef 1, ptr noundef %118)
  %120 = icmp ne i64 %119, 0
  br i1 %120, label %123, label %121

121:                                              ; preds = %110
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %224

123:                                              ; preds = %110
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.NUS_binary_model, ptr %124, i32 0, i32 10
  %126 = load ptr, ptr %125, align 8, !tbaa !22
  %127 = load i32, ptr %9, align 4, !tbaa !20
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds %struct.NUS_animation, ptr %126, i64 %128
  %130 = getelementptr inbounds %struct.NUS_animation, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = call i64 @fwrite(ptr noundef %130, i64 noundef 4, i64 noundef 1, ptr noundef %131)
  %133 = icmp ne i64 %132, 0
  br i1 %133, label %136, label %134

134:                                              ; preds = %123
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %224

136:                                              ; preds = %123
  %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 %9, 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 3
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = call i64 @fwrite(ptr noundef %143, i64 noundef 4, i64 noundef 1, ptr noundef %144)
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %150, label %147

147:                                              ; preds = %136
  %148 = load i32, ptr %9, align 4, !tbaa !20
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %148)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %224

150:                                              ; preds = %136
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.NUS_binary_model, ptr %151, i32 0, i32 10
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = load i32, ptr %9, align 4, !tbaa !20
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds %struct.NUS_animation, ptr %153, i64 %155
  %157 = getelementptr inbounds %struct.NUS_animation, ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !23
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.NUS_binary_model, ptr %159, i32 0, i32 10
  %161 = load ptr, ptr %160, align 8, !tbaa !22
  %162 = load i32, ptr %9, align 4, !tbaa !20
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds %struct.NUS_animation, ptr %161, i64 %163
  %165 = getelementptr inbounds %struct.NUS_animation, ptr %164, i32 0, i32 3
  %166 = load i32, ptr %165, align 4, !tbaa !26
  %167 = zext i32 %166 to i64
  %168 = mul i64 4, %167
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = call i64 @fwrite(ptr noundef %158, i64 noundef %168, i64 noundef 1, ptr noundef %169)
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %175, label %172

172:                                              ; preds = %150
  %173 = load i32, ptr %9, align 4, !tbaa !20
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %173)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %224

175:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !20
  br label %176

176:                                              ; preds = %215, %175
  %177 = load i32, ptr %10, align 4, !tbaa !20
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.NUS_binary_model, ptr %178, i32 0, i32 10
  %180 = load ptr, ptr %179, align 8, !tbaa !22
  %181 = load i32, ptr %9, align 4, !tbaa !20
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds %struct.NUS_animation, ptr %180, i64 %182
  %184 = getelementptr inbounds %struct.NUS_animation, ptr %183, i32 0, i32 3
  %185 = load i32, ptr %184, align 4, !tbaa !26
  %186 = icmp ult i32 %177, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %176
  store i32 5, ptr %8, align 4
  br label %218

188:                                              ; preds = %176
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.NUS_binary_model, ptr %189, i32 0, i32 10
  %191 = load ptr, ptr %190, align 8, !tbaa !22
  %192 = load i32, ptr %9, align 4, !tbaa !20
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds %struct.NUS_animation, ptr %191, i64 %193
  %195 = getelementptr inbounds %struct.NUS_animation, ptr %194, i32 0, i32 5
  %196 = load ptr, ptr %195, align 8, !tbaa !27
  %197 = load i32, ptr %10, align 4, !tbaa !20
  %198 = zext i32 %197 to i64
  %199 = getelementptr inbounds %struct.NUS_keyframe, ptr %196, i64 %198
  %200 = getelementptr inbounds %struct.NUS_keyframe, ptr %199, i32 0, i32 0
  %201 = load ptr, ptr %200, align 8, !tbaa !28
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.NUS_binary_model, ptr %202, i32 0, i32 9
  %204 = getelementptr inbounds %struct.NUS_skeleton, ptr %203, i32 0, i32 0
  %205 = load i32, ptr %204, align 8, !tbaa !18
  %206 = zext i32 %205 to i64
  %207 = mul i64 80, %206
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = call i64 @fwrite(ptr noundef %201, i64 noundef %207, i64 noundef 1, ptr noundef %208)
  %210 = icmp ne i64 %209, 0
  br i1 %210, label %214, label %211

211:                                              ; preds = %188
  %212 = load i32, ptr %9, align 4, !tbaa !20
  %213 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %212)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %218

214:                                              ; preds = %188
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %10, align 4, !tbaa !20
  %217 = add i32 %216, 1
  store i32 %217, ptr %10, align 4, !tbaa !20
  br label %176, !llvm.loop !30

218:                                              ; preds = %211, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %219 = load i32, ptr %8, align 4
  switch i32 %219, label %224 [
    i32 5, label %220
  ]

220:                                              ; preds = %218
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %9, align 4, !tbaa !20
  %223 = add i32 %222, 1
  store i32 %223, ptr %9, align 4, !tbaa !20
  br label %103, !llvm.loop !32

224:                                              ; preds = %218, %172, %147, %134, %121, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %225 = load i32, ptr %8, align 4
  switch i32 %225, label %229 [
    i32 2, label %226
  ]

226:                                              ; preds = %224
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = call i32 @fclose(ptr noundef %227)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %229

229:                                              ; preds = %226, %224, %99, %77, %67, %49, %35, %14
  call void @llvm.lifetime.end.p0(i64 5, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %230 = load i32, ptr %3, align 4
  ret i32 %230
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

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

declare i32 @fclose(ptr noundef) #3

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

!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, !6, i64 80}
!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, !11, i64 76}
!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_animation = type { ptr, [64 x i8], float, i32, ptr, ptr }
%struct.NUS_keyframe = type { ptr }

@__const.nusm_store.magic_string_var = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @nusm_store(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = alloca [5 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(5) %3, ptr noundef nonnull align 1 dereferenceable(5) @__const.nusm_store.magic_string_var, i64 5, i1 false)
  %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 %114

8:                                                ; preds = %2
  %9 = call i64 @fwrite(ptr noundef nonnull %3, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %10 = tail call i64 @fwrite(ptr noundef %1, i64 noundef 4, i64 noundef 6, ptr noundef nonnull %4)
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = load i32, ptr %1, align 8, !tbaa !12
  %14 = zext i32 %13 to i64
  %15 = shl nuw nsw i64 %14, 6
  %16 = tail call i64 @fwrite(ptr noundef %12, i64 noundef %15, i64 noundef 1, ptr noundef nonnull %4)
  %.not = icmp eq i64 %16, 0
  br i1 %.not, label %17, label %19

17:                                               ; preds = %8
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %114

19:                                               ; preds = %8
  %20 = getelementptr inbounds i8, ptr %1, i64 32
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %1, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %24 = zext i32 %23 to i64
  %25 = shl nuw nsw i64 %24, 2
  %26 = tail call i64 @fwrite(ptr noundef %21, i64 noundef %25, i64 noundef 1, ptr noundef nonnull %4)
  %.not61 = icmp eq i64 %26, 0
  br i1 %.not61, label %27, label %29

27:                                               ; preds = %19
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %114

29:                                               ; preds = %19
  %30 = getelementptr inbounds i8, ptr %1, i64 16
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %.not62 = icmp eq i32 %31, 0
  br i1 %.not62, label %39, label %32

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %1, i64 40
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = zext i32 %31 to i64
  %36 = tail call i64 @fwrite(ptr noundef %34, i64 noundef %35, i64 noundef 1, ptr noundef nonnull %4)
  %.not63 = icmp eq i64 %36, 0
  br i1 %.not63, label %37, label %39

37:                                               ; preds = %32
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %114

39:                                               ; preds = %32, %29
  %40 = getelementptr inbounds i8, ptr %1, i64 48
  %41 = tail call i64 @fwrite(ptr noundef nonnull %40, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %.not64 = icmp eq i64 %41, 0
  br i1 %.not64, label %42, label %44

42:                                               ; preds = %39
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %114

44:                                               ; preds = %39
  %45 = load i32, ptr %40, align 8, !tbaa !17
  %.not65 = icmp eq i32 %45, 0
  br i1 %.not65, label %54, label %46

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %1, i64 56
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = zext i32 %45 to i64
  %50 = mul nuw nsw i64 %49, 88
  %51 = tail call i64 @fwrite(ptr noundef %48, i64 noundef %50, i64 noundef 1, ptr noundef nonnull %4)
  %.not66 = icmp eq i64 %51, 0
  br i1 %.not66, label %52, label %54

52:                                               ; preds = %46
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %114

54:                                               ; preds = %46, %44
  %55 = getelementptr inbounds i8, ptr %1, i64 20
  %56 = load i32, ptr %55, align 4, !tbaa !19
  %.not7383.not = icmp eq i32 %56, 0
  br i1 %.not7383.not, label %.critedge75, label %.lr.ph85

.lr.ph85:                                         ; preds = %54
  %57 = getelementptr inbounds i8, ptr %1, i64 64
  %.pre = load ptr, ptr %57, align 8, !tbaa !20
  br label %58

58:                                               ; preds = %.lr.ph85, %.critedge
  %59 = phi ptr [ %.pre, %.lr.ph85 ], [ %110, %.critedge ]
  %indvars.iv92 = phi i64 [ 0, %.lr.ph85 ], [ %indvars.iv.next93, %.critedge ]
  %60 = getelementptr inbounds %struct.NUS_animation, ptr %59, i64 %indvars.iv92, i32 1
  %61 = tail call i64 @fwrite(ptr noundef nonnull %60, i64 noundef 64, i64 noundef 1, ptr noundef nonnull %4)
  %.not67 = icmp eq i64 %61, 0
  br i1 %.not67, label %62, label %64

62:                                               ; preds = %58
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %114

64:                                               ; preds = %58
  %65 = load ptr, ptr %57, align 8, !tbaa !20
  %66 = getelementptr inbounds %struct.NUS_animation, ptr %65, i64 %indvars.iv92, i32 2
  %67 = tail call i64 @fwrite(ptr noundef nonnull %66, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %.not68 = icmp eq i64 %67, 0
  br i1 %.not68, label %68, label %70

68:                                               ; preds = %64
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %114

70:                                               ; preds = %64
  %71 = load ptr, ptr %57, align 8, !tbaa !20
  %72 = getelementptr inbounds %struct.NUS_animation, ptr %71, i64 %indvars.iv92, i32 3
  %73 = tail call i64 @fwrite(ptr noundef nonnull %72, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %.not69 = icmp eq i64 %73, 0
  br i1 %.not69, label %74, label %77

74:                                               ; preds = %70
  %75 = trunc nuw i64 %indvars.iv92 to i32
  %76 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %75)
  br label %114

77:                                               ; preds = %70
  %78 = load ptr, ptr %57, align 8, !tbaa !20
  %79 = getelementptr inbounds %struct.NUS_animation, ptr %78, i64 %indvars.iv92
  %80 = getelementptr inbounds i8, ptr %79, i64 80
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = getelementptr inbounds i8, ptr %79, i64 76
  %83 = load i32, ptr %82, align 4, !tbaa !24
  %84 = zext i32 %83 to i64
  %85 = shl nuw nsw i64 %84, 2
  %86 = tail call i64 @fwrite(ptr noundef %81, i64 noundef %85, i64 noundef 1, ptr noundef nonnull %4)
  %.not70 = icmp eq i64 %86, 0
  br i1 %.not70, label %90, label %.preheader

.preheader:                                       ; preds = %77
  %87 = load ptr, ptr %57, align 8, !tbaa !20
  %88 = getelementptr inbounds %struct.NUS_animation, ptr %87, i64 %indvars.iv92, i32 3
  %89 = load i32, ptr %88, align 4, !tbaa !24
  %.not7281.not = icmp eq i32 %89, 0
  br i1 %.not7281.not, label %.critedge, label %.lr.ph

90:                                               ; preds = %77
  %91 = trunc nuw i64 %indvars.iv92 to i32
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %91)
  br label %114

93:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %94 = load ptr, ptr %57, align 8, !tbaa !20
  %95 = getelementptr inbounds %struct.NUS_animation, ptr %94, i64 %indvars.iv92, i32 3
  %96 = load i32, ptr %95, align 4, !tbaa !24
  %97 = zext i32 %96 to i64
  %.not72 = icmp ult i64 %indvars.iv.next, %97
  br i1 %.not72, label %.lr.ph, label %.critedge, !llvm.loop !25

.lr.ph:                                           ; preds = %.preheader, %93
  %indvars.iv = phi i64 [ %indvars.iv.next, %93 ], [ 0, %.preheader ]
  %98 = phi ptr [ %94, %93 ], [ %87, %.preheader ]
  %99 = getelementptr inbounds %struct.NUS_animation, ptr %98, i64 %indvars.iv92, i32 5
  %100 = load ptr, ptr %99, align 8, !tbaa !27
  %101 = getelementptr inbounds %struct.NUS_keyframe, ptr %100, i64 %indvars.iv
  %102 = load ptr, ptr %101, align 8, !tbaa !28
  %103 = load i32, ptr %40, align 8, !tbaa !17
  %104 = zext i32 %103 to i64
  %105 = mul nuw nsw i64 %104, 80
  %106 = tail call i64 @fwrite(ptr noundef %102, i64 noundef %105, i64 noundef 1, ptr noundef nonnull %4)
  %.not71 = icmp eq i64 %106, 0
  br i1 %.not71, label %107, label %93

107:                                              ; preds = %.lr.ph
  %108 = trunc nuw i64 %indvars.iv92 to i32
  %109 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %108)
  br label %114

.critedge:                                        ; preds = %93, %.preheader
  %110 = phi ptr [ %87, %.preheader ], [ %94, %93 ]
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %111 = load i32, ptr %55, align 4, !tbaa !19
  %112 = zext i32 %111 to i64
  %.not73 = icmp ult i64 %indvars.iv.next93, %112
  br i1 %.not73, label %58, label %.critedge75, !llvm.loop !30

.critedge75:                                      ; preds = %.critedge, %54
  %113 = tail call i32 @fclose(ptr noundef nonnull %4)
  br label %114

114:                                              ; preds = %62, %68, %74, %90, %107, %.critedge75, %52, %42, %37, %27, %17, %6
  %.3 = phi i32 [ 0, %6 ], [ 1, %.critedge75 ], [ 0, %52 ], [ 0, %42 ], [ 0, %37 ], [ 0, %27 ], [ 0, %17 ], [ 0, %107 ], [ 0, %90 ], [ 0, %74 ], [ 0, %68 ], [ 0, %62 ]
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %3) #4
  ret i32 %.3
}

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

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

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

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

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

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !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, !10, i64 80}
!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, !7, i64 76}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!22, !10, i64 88}
!28 = !{!29, !10, i64 0}
!29 = !{!"NUS_keyframe", !10, i64 0}
!30 = distinct !{!30, !26}


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