; LLVM IR from zeux/meshoptimizer :: src (vertexfilter)

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

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__.meshopt_encodeFilterOct = external hidden unnamed_addr constant [73 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

30:                                               ; preds = %5
  %31 = load i64, ptr %8, align 8, !tbaa !9
  %32 = icmp eq i64 %31, 8
  br label %33

33:                                               ; preds = %30, %5
  %34 = phi i1 [ true, %5 ], [ %32, %30 ]
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  br label %38

36:                                               ; preds = %33
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 877, ptr noundef @__PRETTY_FUNCTION__.meshopt_encodeFilterOct) #5
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  %39 = load i32, ptr %9, align 4, !tbaa !11
  %40 = icmp sge i32 %39, 1
  br i1 %40, label %41, label %44

41:                                               ; preds = %38
  %42 = load i32, ptr %9, align 4, !tbaa !11
  %43 = icmp sle i32 %42, 16
  br label %44

44:                                               ; preds = %41, %38
  %45 = phi i1 [ false, %38 ], [ %43, %41 ]
  br i1 %45, label %46, label %47

46:                                               ; preds = %44
  br label %49

47:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 878, ptr noundef @__PRETTY_FUNCTION__.meshopt_encodeFilterOct) #5
  unreachable

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %50, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %51, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = mul i64 %52, 2
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %201, %49
  %56 = load i64, ptr %14, align 8, !tbaa !9
  %57 = load i64, ptr %7, align 8, !tbaa !9
  %58 = icmp ult i64 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %204

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = load i64, ptr %14, align 8, !tbaa !9
  %63 = mul i64 %62, 4
  %64 = getelementptr inbounds float, ptr %61, i64 %63
  store ptr %64, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = getelementptr inbounds float, ptr %65, i64 0
  %67 = load float, ptr %66, align 4, !tbaa !13
  store float %67, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = getelementptr inbounds float, ptr %68, i64 1
  %70 = load float, ptr %69, align 4, !tbaa !13
  store float %70, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = getelementptr inbounds float, ptr %71, i64 2
  %73 = load float, ptr %72, align 4, !tbaa !13
  store float %73, ptr %18, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = getelementptr inbounds float, ptr %74, i64 3
  %76 = load float, ptr %75, align 4, !tbaa !13
  store float %76, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %77 = load float, ptr %16, align 4, !tbaa !13
  %78 = call float @llvm.fabs.f32(float %77)
  %79 = load float, ptr %17, align 4, !tbaa !13
  %80 = call float @llvm.fabs.f32(float %79)
  %81 = fadd float %78, %80
  %82 = load float, ptr %18, align 4, !tbaa !13
  %83 = call float @llvm.fabs.f32(float %82)
  %84 = fadd float %81, %83
  store float %84, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %85 = load float, ptr %20, align 4, !tbaa !13
  %86 = fcmp oeq float %85, 0.000000e+00
  br i1 %86, label %87, label %88

87:                                               ; preds = %60
  br label %91

88:                                               ; preds = %60
  %89 = load float, ptr %20, align 4, !tbaa !13
  %90 = fdiv float 1.000000e+00, %89
  br label %91

91:                                               ; preds = %88, %87
  %92 = phi float [ 0.000000e+00, %87 ], [ %90, %88 ]
  store float %92, ptr %21, align 4, !tbaa !13
  %93 = load float, ptr %21, align 4, !tbaa !13
  %94 = load float, ptr %16, align 4, !tbaa !13
  %95 = fmul float %94, %93
  store float %95, ptr %16, align 4, !tbaa !13
  %96 = load float, ptr %21, align 4, !tbaa !13
  %97 = load float, ptr %17, align 4, !tbaa !13
  %98 = fmul float %97, %96
  store float %98, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %99 = load float, ptr %18, align 4, !tbaa !13
  %100 = fcmp oge float %99, 0.000000e+00
  br i1 %100, label %101, label %103

101:                                              ; preds = %91
  %102 = load float, ptr %16, align 4, !tbaa !13
  br label %112

103:                                              ; preds = %91
  %104 = load float, ptr %17, align 4, !tbaa !13
  %105 = call float @llvm.fabs.f32(float %104)
  %106 = fsub float 1.000000e+00, %105
  %107 = load float, ptr %16, align 4, !tbaa !13
  %108 = fcmp oge float %107, 0.000000e+00
  %109 = zext i1 %108 to i64
  %110 = select i1 %108, float 1.000000e+00, float -1.000000e+00
  %111 = fmul float %106, %110
  br label %112

112:                                              ; preds = %103, %101
  %113 = phi float [ %102, %101 ], [ %111, %103 ]
  store float %113, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %114 = load float, ptr %18, align 4, !tbaa !13
  %115 = fcmp oge float %114, 0.000000e+00
  br i1 %115, label %116, label %118

116:                                              ; preds = %112
  %117 = load float, ptr %17, align 4, !tbaa !13
  br label %127

118:                                              ; preds = %112
  %119 = load float, ptr %16, align 4, !tbaa !13
  %120 = call float @llvm.fabs.f32(float %119)
  %121 = fsub float 1.000000e+00, %120
  %122 = load float, ptr %17, align 4, !tbaa !13
  %123 = fcmp oge float %122, 0.000000e+00
  %124 = zext i1 %123 to i64
  %125 = select i1 %123, float 1.000000e+00, float -1.000000e+00
  %126 = fmul float %121, %125
  br label %127

127:                                              ; preds = %118, %116
  %128 = phi float [ %117, %116 ], [ %126, %118 ]
  store float %128, ptr %23, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %129 = load float, ptr %22, align 4, !tbaa !13
  %130 = load i32, ptr %9, align 4, !tbaa !11
  %131 = call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef %129, i32 noundef %130)
  store i32 %131, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %132 = load float, ptr %23, align 4, !tbaa !13
  %133 = load i32, ptr %9, align 4, !tbaa !11
  %134 = call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef %132, i32 noundef %133)
  store i32 %134, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %135 = load i32, ptr %9, align 4, !tbaa !11
  %136 = call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef 1.000000e+00, i32 noundef %135)
  store i32 %136, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %137 = load float, ptr %19, align 4, !tbaa !13
  %138 = load i32, ptr %13, align 4, !tbaa !11
  %139 = call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef %137, i32 noundef %138)
  store i32 %139, ptr %27, align 4, !tbaa !11
  %140 = load i64, ptr %8, align 8, !tbaa !9
  %141 = icmp eq i64 %140, 4
  br i1 %141, label %142, label %171

142:                                              ; preds = %127
  %143 = load i32, ptr %24, align 4, !tbaa !11
  %144 = trunc i32 %143 to i8
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load i64, ptr %14, align 8, !tbaa !9
  %147 = mul i64 %146, 4
  %148 = add i64 %147, 0
  %149 = getelementptr inbounds i8, ptr %145, i64 %148
  store i8 %144, ptr %149, align 1, !tbaa !15
  %150 = load i32, ptr %25, align 4, !tbaa !11
  %151 = trunc i32 %150 to i8
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = load i64, ptr %14, align 8, !tbaa !9
  %154 = mul i64 %153, 4
  %155 = add i64 %154, 1
  %156 = getelementptr inbounds i8, ptr %152, i64 %155
  store i8 %151, ptr %156, align 1, !tbaa !15
  %157 = load i32, ptr %26, align 4, !tbaa !11
  %158 = trunc i32 %157 to i8
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = load i64, ptr %14, align 8, !tbaa !9
  %161 = mul i64 %160, 4
  %162 = add i64 %161, 2
  %163 = getelementptr inbounds i8, ptr %159, i64 %162
  store i8 %158, ptr %163, align 1, !tbaa !15
  %164 = load i32, ptr %27, align 4, !tbaa !11
  %165 = trunc i32 %164 to i8
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = load i64, ptr %14, align 8, !tbaa !9
  %168 = mul i64 %167, 4
  %169 = add i64 %168, 3
  %170 = getelementptr inbounds i8, ptr %166, i64 %169
  store i8 %165, ptr %170, align 1, !tbaa !15
  br label %200

171:                                              ; preds = %127
  %172 = load i32, ptr %24, align 4, !tbaa !11
  %173 = trunc i32 %172 to i16
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  %175 = load i64, ptr %14, align 8, !tbaa !9
  %176 = mul i64 %175, 4
  %177 = add i64 %176, 0
  %178 = getelementptr inbounds i16, ptr %174, i64 %177
  store i16 %173, ptr %178, align 2, !tbaa !16
  %179 = load i32, ptr %25, align 4, !tbaa !11
  %180 = trunc i32 %179 to i16
  %181 = load ptr, ptr %12, align 8, !tbaa !5
  %182 = load i64, ptr %14, align 8, !tbaa !9
  %183 = mul i64 %182, 4
  %184 = add i64 %183, 1
  %185 = getelementptr inbounds i16, ptr %181, i64 %184
  store i16 %180, ptr %185, align 2, !tbaa !16
  %186 = load i32, ptr %26, align 4, !tbaa !11
  %187 = trunc i32 %186 to i16
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = load i64, ptr %14, align 8, !tbaa !9
  %190 = mul i64 %189, 4
  %191 = add i64 %190, 2
  %192 = getelementptr inbounds i16, ptr %188, i64 %191
  store i16 %187, ptr %192, align 2, !tbaa !16
  %193 = load i32, ptr %27, align 4, !tbaa !11
  %194 = trunc i32 %193 to i16
  %195 = load ptr, ptr %12, align 8, !tbaa !5
  %196 = load i64, ptr %14, align 8, !tbaa !9
  %197 = mul i64 %196, 4
  %198 = add i64 %197, 3
  %199 = getelementptr inbounds i16, ptr %195, i64 %198
  store i16 %194, ptr %199, align 2, !tbaa !16
  br label %200

200:                                              ; preds = %171, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %201

201:                                              ; preds = %200
  %202 = load i64, ptr %14, align 8, !tbaa !9
  %203 = add i64 %202, 1
  store i64 %203, ptr %14, align 8, !tbaa !9
  br label %55, !llvm.loop !18

204:                                              ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef, i32 noundef) #4

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

attributes #0 = { noreturn 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress 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 #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__.meshopt_encodeFilterOct = external hidden unnamed_addr constant [73 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @meshopt_encodeFilterOct(ptr nocapture noundef writeonly %0, i64 noundef %1, i64 noundef %2, i32 noundef %3, ptr nocapture noundef readonly %4) local_unnamed_addr #1 {
  %6 = icmp eq i64 %2, 4
  switch i64 %2, label %7 [
    i64 8, label %8
    i64 4, label %8
  ]

7:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 877, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_encodeFilterOct) #5
  unreachable

8:                                                ; preds = %5, %5
  %9 = add i32 %3, -1
  %10 = icmp ult i32 %9, 16
  br i1 %10, label %12, label %11

11:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 878, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_encodeFilterOct) #5
  unreachable

12:                                               ; preds = %8
  %.tr = trunc nuw i64 %2 to i32
  %13 = shl nuw nsw i32 %.tr, 1
  %.not = icmp eq i64 %1, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %68, %12
  ret void

.lr.ph:                                           ; preds = %12, %68
  %.065 = phi i64 [ %69, %68 ], [ 0, %12 ]
  %14 = shl i64 %.065, 2
  %15 = getelementptr inbounds float, ptr %4, i64 %14
  %16 = load <2 x float>, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %15, i64 8
  %18 = load float, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %15, i64 12
  %20 = load float, ptr %19, align 4, !tbaa !5
  %21 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %16)
  %shift = shufflevector <2 x float> %21, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %22 = fadd <2 x float> %21, %shift
  %23 = extractelement <2 x float> %22, i64 0
  %24 = tail call float @llvm.fabs.f32(float %18)
  %25 = fadd float %23, %24
  %26 = fcmp oeq float %25, 0.000000e+00
  %27 = fdiv float 1.000000e+00, %25
  %28 = select i1 %26, float 0.000000e+00, float %27
  %29 = insertelement <2 x float> poison, float %28, i64 0
  %30 = shufflevector <2 x float> %29, <2 x float> poison, <2 x i32> zeroinitializer
  %31 = fmul <2 x float> %16, %30
  %32 = fcmp ult float %18, 0.000000e+00
  br i1 %32, label %33, label %.thread

33:                                               ; preds = %.lr.ph
  %34 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %31)
  %35 = fcmp oge <2 x float> %31, zeroinitializer
  %36 = fsub <2 x float> <float 1.000000e+00, float 1.000000e+00>, %34
  %37 = shufflevector <2 x float> %36, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %38 = fneg <2 x float> %37
  %39 = select <2 x i1> %35, <2 x float> %37, <2 x float> %38
  br label %.thread

.thread:                                          ; preds = %.lr.ph, %33
  %40 = phi <2 x float> [ %39, %33 ], [ %31, %.lr.ph ]
  %41 = extractelement <2 x float> %40, i64 0
  %42 = tail call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef %41, i32 noundef %3)
  %43 = extractelement <2 x float> %40, i64 1
  %44 = tail call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef %43, i32 noundef %3)
  %45 = tail call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef 1.000000e+00, i32 noundef %3)
  %46 = tail call noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef %20, i32 noundef %13)
  %47 = or disjoint i64 %14, 1
  %48 = or disjoint i64 %14, 2
  %49 = or disjoint i64 %14, 3
  br i1 %6, label %50, label %59

50:                                               ; preds = %.thread
  %51 = trunc i32 %42 to i8
  %52 = getelementptr inbounds i8, ptr %0, i64 %14
  store i8 %51, ptr %52, align 1, !tbaa !9
  %53 = trunc i32 %44 to i8
  %54 = getelementptr inbounds i8, ptr %0, i64 %47
  store i8 %53, ptr %54, align 1, !tbaa !9
  %55 = trunc i32 %45 to i8
  %56 = getelementptr inbounds i8, ptr %0, i64 %48
  store i8 %55, ptr %56, align 1, !tbaa !9
  %57 = trunc i32 %46 to i8
  %58 = getelementptr inbounds i8, ptr %0, i64 %49
  store i8 %57, ptr %58, align 1, !tbaa !9
  br label %68

59:                                               ; preds = %.thread
  %60 = trunc i32 %42 to i16
  %61 = getelementptr inbounds i16, ptr %0, i64 %14
  store i16 %60, ptr %61, align 2, !tbaa !10
  %62 = trunc i32 %44 to i16
  %63 = getelementptr inbounds i16, ptr %0, i64 %47
  store i16 %62, ptr %63, align 2, !tbaa !10
  %64 = trunc i32 %45 to i16
  %65 = getelementptr inbounds i16, ptr %0, i64 %48
  store i16 %64, ptr %65, align 2, !tbaa !10
  %66 = trunc i32 %46 to i16
  %67 = getelementptr inbounds i16, ptr %0, i64 %49
  store i16 %66, ptr %67, align 2, !tbaa !10
  br label %68

68:                                               ; preds = %59, %50
  %69 = add nuw i64 %.065, 1
  %exitcond.not = icmp eq i64 %69, %1
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21meshopt_quantizeSnormfi(float noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fabs.v2f32(<2 x float>) #4

attributes #0 = { noreturn 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { inlinehint mustprogress 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { noreturn 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass