; LLVM IR from zeux/meshoptimizer :: tools (clusterfuzz)

; 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.meshopt_Meshlet = type { i32, i32, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca [100 x [4 x float]], align 16
  %7 = alloca i32, align 4
  %8 = alloca [999 x i32], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [333 x %struct.meshopt_Meshlet], align 16
  %12 = alloca [999 x i32], align 16
  %13 = alloca [1332 x i8], align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %14 = load i64, ptr %5, align 8, !tbaa !9
  %15 = icmp eq i64 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  br label %205

17:                                               ; preds = %2
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 0
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = zext i8 %20 to i32
  call void @srand(i32 noundef %21) #4
  call void @llvm.lifetime.start.p0(i64 1600, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %22

22:                                               ; preds = %55, %17
  %23 = load i32, ptr %7, align 4, !tbaa !12
  %24 = icmp slt i32 %23, 100
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %58

26:                                               ; preds = %22
  %27 = call i32 @rand() #4
  %28 = srem i32 %27, 10
  %29 = sitofp i32 %28 to float
  %30 = load i32, ptr %7, align 4, !tbaa !12
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 %31
  %33 = getelementptr inbounds [4 x float], ptr %32, i64 0, i64 0
  store float %29, ptr %33, align 16, !tbaa !14
  %34 = call i32 @rand() #4
  %35 = srem i32 %34, 10
  %36 = sitofp i32 %35 to float
  %37 = load i32, ptr %7, align 4, !tbaa !12
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 %38
  %40 = getelementptr inbounds [4 x float], ptr %39, i64 0, i64 1
  store float %36, ptr %40, align 4, !tbaa !14
  %41 = call i32 @rand() #4
  %42 = srem i32 %41, 10
  %43 = sitofp i32 %42 to float
  %44 = load i32, ptr %7, align 4, !tbaa !12
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 %45
  %47 = getelementptr inbounds [4 x float], ptr %46, i64 0, i64 2
  store float %43, ptr %47, align 8, !tbaa !14
  %48 = call i32 @rand() #4
  %49 = srem i32 %48, 10
  %50 = sitofp i32 %49 to float
  %51 = load i32, ptr %7, align 4, !tbaa !12
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 %52
  %54 = getelementptr inbounds [4 x float], ptr %53, i64 0, i64 3
  store float %50, ptr %54, align 4, !tbaa !14
  br label %55

55:                                               ; preds = %26
  %56 = load i32, ptr %7, align 4, !tbaa !12
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !12
  br label %22, !llvm.loop !16

58:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 3996, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %59 = load i64, ptr %5, align 8, !tbaa !9
  %60 = sub i64 %59, 1
  %61 = icmp ult i64 %60, 999
  br i1 %61, label %62, label %67

62:                                               ; preds = %58
  %63 = load i64, ptr %5, align 8, !tbaa !9
  %64 = sub i64 %63, 1
  %65 = udiv i64 %64, 3
  %66 = mul i64 %65, 3
  br label %68

67:                                               ; preds = %58
  br label %68

68:                                               ; preds = %67, %62
  %69 = phi i64 [ %66, %62 ], [ 999, %67 ]
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %9, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %71

71:                                               ; preds = %88, %68
  %72 = load i32, ptr %10, align 4, !tbaa !12
  %73 = load i32, ptr %9, align 4, !tbaa !12
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %91

76:                                               ; preds = %71
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = load i32, ptr %10, align 4, !tbaa !12
  %79 = add nsw i32 1, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %77, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !11
  %83 = zext i8 %82 to i32
  %84 = srem i32 %83, 100
  %85 = load i32, ptr %10, align 4, !tbaa !12
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 %86
  store i32 %84, ptr %87, align 4, !tbaa !12
  br label %88

88:                                               ; preds = %76
  %89 = load i32, ptr %10, align 4, !tbaa !12
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %10, align 4, !tbaa !12
  br label %71, !llvm.loop !18

91:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 5328, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 3996, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1332, ptr %13) #4
  %92 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %93 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %94 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %95 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %96 = load i32, ptr %9, align 4, !tbaa !12
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %99 = getelementptr inbounds [4 x float], ptr %98, i64 0, i64 0
  %100 = call i64 @meshopt_buildMeshlets(ptr noundef %92, ptr noundef %93, ptr noundef %94, ptr noundef %95, i64 noundef %97, ptr noundef %99, i64 noundef 100, i64 noundef 16, i64 noundef 4, i64 noundef 4, float noundef 0.000000e+00)
  %101 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %102 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %103 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %104 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %105 = load i32, ptr %9, align 4, !tbaa !12
  %106 = sext i32 %105 to i64
  %107 = call i64 @meshopt_buildMeshletsScan(ptr noundef %101, ptr noundef %102, ptr noundef %103, ptr noundef %104, i64 noundef %106, i64 noundef 100, i64 noundef 4, i64 noundef 4)
  %108 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %109 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %110 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %111 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %112 = load i32, ptr %9, align 4, !tbaa !12
  %113 = sext i32 %112 to i64
  %114 = call i64 @meshopt_buildMeshletsScan(ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef %111, i64 noundef %113, i64 noundef 100, i64 noundef 4, i64 noundef 8)
  %115 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %116 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %117 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %118 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %119 = load i32, ptr %9, align 4, !tbaa !12
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %122 = getelementptr inbounds [4 x float], ptr %121, i64 0, i64 0
  %123 = call i64 @meshopt_buildMeshletsFlex(ptr noundef %115, ptr noundef %116, ptr noundef %117, ptr noundef %118, i64 noundef %120, ptr noundef %122, i64 noundef 100, i64 noundef 16, i64 noundef 4, i64 noundef 4, i64 noundef 8, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %124 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %125 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %126 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %127 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %128 = load i32, ptr %9, align 4, !tbaa !12
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %131 = getelementptr inbounds [4 x float], ptr %130, i64 0, i64 0
  %132 = call i64 @meshopt_buildMeshletsFlex(ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127, i64 noundef %129, ptr noundef %131, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 8, i64 noundef 16, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %133 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %134 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %135 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %136 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %137 = load i32, ptr %9, align 4, !tbaa !12
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %140 = getelementptr inbounds [4 x float], ptr %139, i64 0, i64 0
  %141 = call i64 @meshopt_buildMeshletsFlex(ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136, i64 noundef %138, ptr noundef %140, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 8, i64 noundef 32, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %142 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %143 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %144 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %145 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %146 = load i32, ptr %9, align 4, !tbaa !12
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %149 = getelementptr inbounds [4 x float], ptr %148, i64 0, i64 0
  %150 = call i64 @meshopt_buildMeshletsFlex(ptr noundef %142, ptr noundef %143, ptr noundef %144, ptr noundef %145, i64 noundef %147, ptr noundef %149, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 16, i64 noundef 32, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %151 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %152 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %153 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %154 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %155 = load i32, ptr %9, align 4, !tbaa !12
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %158 = getelementptr inbounds [4 x float], ptr %157, i64 0, i64 0
  %159 = call i64 @meshopt_buildMeshletsSplit(ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %154, i64 noundef %156, ptr noundef %158, i64 noundef 100, i64 noundef 16, i64 noundef 4, i64 noundef 4, i64 noundef 8, float noundef 0.000000e+00)
  %160 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %161 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %162 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %163 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %164 = load i32, ptr %9, align 4, !tbaa !12
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %167 = getelementptr inbounds [4 x float], ptr %166, i64 0, i64 0
  %168 = call i64 @meshopt_buildMeshletsSplit(ptr noundef %160, ptr noundef %161, ptr noundef %162, ptr noundef %163, i64 noundef %165, ptr noundef %167, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 4, i64 noundef 32, float noundef 0.000000e+00)
  %169 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %170 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %171 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %172 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %173 = load i32, ptr %9, align 4, !tbaa !12
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %176 = getelementptr inbounds [4 x float], ptr %175, i64 0, i64 0
  %177 = call i64 @meshopt_buildMeshletsSplit(ptr noundef %169, ptr noundef %170, ptr noundef %171, ptr noundef %172, i64 noundef %174, ptr noundef %176, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 8, i64 noundef 32, float noundef 0.000000e+00)
  %178 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %179 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %180 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %181 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %182 = load i32, ptr %9, align 4, !tbaa !12
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %185 = getelementptr inbounds [4 x float], ptr %184, i64 0, i64 0
  %186 = call i64 @meshopt_buildMeshletsSplit(ptr noundef %178, ptr noundef %179, ptr noundef %180, ptr noundef %181, i64 noundef %183, ptr noundef %185, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 12, i64 noundef 32, float noundef 0.000000e+00)
  %187 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %188 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %189 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %190 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %191 = load i32, ptr %9, align 4, !tbaa !12
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %194 = getelementptr inbounds [4 x float], ptr %193, i64 0, i64 0
  %195 = call i64 @meshopt_buildMeshletsSplit(ptr noundef %187, ptr noundef %188, ptr noundef %189, ptr noundef %190, i64 noundef %192, ptr noundef %194, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 16, i64 noundef 32, float noundef 0.000000e+00)
  %196 = getelementptr inbounds [333 x %struct.meshopt_Meshlet], ptr %11, i64 0, i64 0
  %197 = getelementptr inbounds [999 x i32], ptr %12, i64 0, i64 0
  %198 = getelementptr inbounds [1332 x i8], ptr %13, i64 0, i64 0
  %199 = getelementptr inbounds [999 x i32], ptr %8, i64 0, i64 0
  %200 = load i32, ptr %9, align 4, !tbaa !12
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100 x [4 x float]], ptr %6, i64 0, i64 0
  %203 = getelementptr inbounds [4 x float], ptr %202, i64 0, i64 0
  %204 = call i64 @meshopt_buildMeshletsSplit(ptr noundef %196, ptr noundef %197, ptr noundef %198, ptr noundef %199, i64 noundef %201, ptr noundef %203, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 32, i64 noundef 32, float noundef 0.000000e+00)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 1332, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 3996, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 5328, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 3996, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1600, ptr %6) #4
  br label %205

205:                                              ; preds = %91, %16
  %206 = load i32, ptr %3, align 4
  ret i32 %206
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #1

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

; Function Attrs: nounwind
declare i32 @rand() #1

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

declare i64 @meshopt_buildMeshlets(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, float noundef) #3

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

declare i64 @meshopt_buildMeshletsFlex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, float noundef, float noundef) #3

declare i64 @meshopt_buildMeshletsSplit(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, float noundef) #3

attributes #0 = { mustprogress 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 = { 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 #2 = { nocallback nofree nosync 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; 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.meshopt_Meshlet = type { i32, i32, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @LLVMFuzzerTestOneInput(ptr nocapture noundef readonly %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = alloca [100 x [4 x float]], align 16
  %4 = alloca [999 x i32], align 16
  %5 = alloca [333 x %struct.meshopt_Meshlet], align 16
  %6 = alloca [999 x i32], align 16
  %7 = alloca [1332 x i8], align 16
  %8 = icmp eq i64 %1, 0
  br i1 %8, label %56, label %9

9:                                                ; preds = %2
  %10 = load i8, ptr %0, align 1, !tbaa !5
  %11 = zext i8 %10 to i32
  tail call void @srand(i32 noundef %11) #4
  call void @llvm.lifetime.start.p0(i64 1600, ptr nonnull %3) #4
  br label %14

12:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 3996, ptr nonnull %4) #4
  %13 = icmp ult i64 %1, 1000
  br i1 %13, label %26, label %.lr.ph.preheader

14:                                               ; preds = %9, %14
  %indvars.iv = phi i64 [ 0, %9 ], [ %indvars.iv.next, %14 ]
  %15 = tail call i32 @rand() #4
  %16 = getelementptr inbounds [100 x [4 x float]], ptr %3, i64 0, i64 %indvars.iv
  %17 = tail call i32 @rand() #4
  %18 = tail call i32 @rand() #4
  %19 = tail call i32 @rand() #4
  %20 = insertelement <4 x i32> poison, i32 %15, i64 0
  %21 = insertelement <4 x i32> %20, i32 %17, i64 1
  %22 = insertelement <4 x i32> %21, i32 %18, i64 2
  %23 = insertelement <4 x i32> %22, i32 %19, i64 3
  %24 = srem <4 x i32> %23, <i32 10, i32 10, i32 10, i32 10>
  %25 = sitofp <4 x i32> %24 to <4 x float>
  store <4 x float> %25, ptr %16, align 16, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100
  br i1 %exitcond.not, label %12, label %14, !llvm.loop !10

26:                                               ; preds = %12
  %27 = add nsw i64 %1, -1
  %28 = urem i64 %27, 3
  %29 = sub nuw nsw i64 %27, %28
  %30 = icmp sgt i64 %29, 0
  br i1 %30, label %.lr.ph.preheader, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %26
  %.pre = and i64 %29, 4294967295
  br label %._crit_edge

.lr.ph.preheader:                                 ; preds = %12, %26
  %31 = phi i64 [ %29, %26 ], [ 999, %12 ]
  %wide.trip.count = and i64 %31, 4294967295
  %min.iters.check = icmp ult i64 %wide.trip.count, 4
  br i1 %min.iters.check, label %.lr.ph.preheader41, label %vector.ph

.lr.ph.preheader41:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv37.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %31, 3
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %32 = or disjoint i64 %index, 1
  %33 = getelementptr inbounds i8, ptr %0, i64 %32
  %wide.load = load <4 x i8>, ptr %33, align 1, !tbaa !5
  %34 = urem <4 x i8> %wide.load, <i8 100, i8 100, i8 100, i8 100>
  %35 = zext nneg <4 x i8> %34 to <4 x i32>
  %36 = getelementptr inbounds [999 x i32], ptr %4, i64 0, i64 %index
  store <4 x i32> %35, ptr %36, align 16, !tbaa !12
  %index.next = add nuw i64 %index, 4
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader41

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %wide.trip.count, %middle.block ], [ %wide.trip.count, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 5328, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 3996, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1332, ptr nonnull %7) #4
  %38 = call i64 @meshopt_buildMeshlets(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 4, i64 noundef 4, float noundef 0.000000e+00)
  %39 = call i64 @meshopt_buildMeshletsScan(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, i64 noundef 100, i64 noundef 4, i64 noundef 4)
  %40 = call i64 @meshopt_buildMeshletsScan(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, i64 noundef 100, i64 noundef 4, i64 noundef 8)
  %41 = call i64 @meshopt_buildMeshletsFlex(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 4, i64 noundef 4, i64 noundef 8, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %42 = call i64 @meshopt_buildMeshletsFlex(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 8, i64 noundef 16, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %43 = call i64 @meshopt_buildMeshletsFlex(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 8, i64 noundef 32, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %44 = call i64 @meshopt_buildMeshletsFlex(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 16, i64 noundef 32, float noundef 0.000000e+00, float noundef 2.000000e+00)
  %45 = call i64 @meshopt_buildMeshletsSplit(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 4, i64 noundef 4, i64 noundef 8, float noundef 0.000000e+00)
  %46 = call i64 @meshopt_buildMeshletsSplit(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 4, i64 noundef 32, float noundef 0.000000e+00)
  %47 = call i64 @meshopt_buildMeshletsSplit(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 8, i64 noundef 32, float noundef 0.000000e+00)
  %48 = call i64 @meshopt_buildMeshletsSplit(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 8, i64 noundef 12, i64 noundef 32, float noundef 0.000000e+00)
  %49 = call i64 @meshopt_buildMeshletsSplit(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 16, i64 noundef 32, float noundef 0.000000e+00)
  %50 = call i64 @meshopt_buildMeshletsSplit(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4, i64 noundef %.pre-phi, ptr noundef nonnull %3, i64 noundef 100, i64 noundef 16, i64 noundef 16, i64 noundef 32, i64 noundef 32, float noundef 0.000000e+00)
  call void @llvm.lifetime.end.p0(i64 1332, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 3996, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 5328, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 3996, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1600, ptr nonnull %3) #4
  br label %56

.lr.ph:                                           ; preds = %.lr.ph.preheader41, %.lr.ph
  %indvars.iv37 = phi i64 [ %indvars.iv.next38, %.lr.ph ], [ %indvars.iv37.ph, %.lr.ph.preheader41 ]
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %51 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next38
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = urem i8 %52, 100
  %54 = zext nneg i8 %53 to i32
  %55 = getelementptr inbounds [999 x i32], ptr %4, i64 0, i64 %indvars.iv37
  store i32 %54, ptr %55, align 4, !tbaa !12
  %exitcond40.not = icmp eq i64 %indvars.iv.next38, %wide.trip.count
  br i1 %exitcond40.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

56:                                               ; preds = %2, %._crit_edge
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #1

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

declare i64 @meshopt_buildMeshlets(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, float noundef) local_unnamed_addr #3

declare i64 @meshopt_buildMeshletsScan(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare i64 @meshopt_buildMeshletsFlex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, float noundef, float noundef) local_unnamed_addr #3

declare i64 @meshopt_buildMeshletsSplit(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, float noundef) local_unnamed_addr #3

attributes #0 = { mustprogress 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 = { 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 #2 = { mustprogress nocallback nofree nosync 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !6, i64 0}
!14 = distinct !{!14, !11, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !11, !16, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass