; LLVM IR from aap/librw :: src/gl/wdgl.ll (ZN2rw4wdgl10packattribEPhPfPNS0_10AttribDescEf)

; 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.rw::wdgl::AttribDesc" = type { i32, i32, i32, i32, i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN2rw4wdgl10packattribEPhPfPNS0_10AttribDescEf(ptr noundef %0, ptr noundef %1, ptr noundef %2, float noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store float %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %16, i32 0, i32 1
  %18 = load i32, ptr %17, align 4, !tbaa !11
  switch i32 %18, label %202 [
    i32 0, label %19
    i32 1, label %27
    i32 2, label %71
    i32 3, label %114
    i32 4, label %158
  ]

19:                                               ; preds = %4
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %22, i32 0, i32 3
  %24 = load i32, ptr %23, align 4, !tbaa !14
  %25 = mul nsw i32 %24, 4
  %26 = sext i32 %25 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %20, ptr align 4 %21, i64 %26, i1 false)
  br label %202

27:                                               ; preds = %4
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %28, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %29

29:                                               ; preds = %67, %27
  %30 = load i32, ptr %12, align 4, !tbaa !15
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %31, i32 0, i32 3
  %33 = load i32, ptr %32, align 4, !tbaa !14
  %34 = icmp slt i32 %30, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %70

36:                                               ; preds = %29
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %37, i32 0, i32 2
  %39 = load i32, ptr %38, align 4, !tbaa !16
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %54, label %41

41:                                               ; preds = %36
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load i32, ptr %12, align 4, !tbaa !15
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds float, ptr %42, i64 %44
  %46 = load float, ptr %45, align 4, !tbaa !9
  %47 = load float, ptr %8, align 4, !tbaa !9
  %48 = fmul float %46, %47
  %49 = fptosi float %48 to i8
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i32, ptr %12, align 4, !tbaa !15
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %50, i64 %52
  store i8 %49, ptr %53, align 1, !tbaa !17
  br label %66

54:                                               ; preds = %36
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !15
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds float, ptr %55, i64 %57
  %59 = load float, ptr %58, align 4, !tbaa !9
  %60 = fmul float %59, 1.270000e+02
  %61 = fptosi float %60 to i8
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !15
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %62, i64 %64
  store i8 %61, ptr %65, align 1, !tbaa !17
  br label %66

66:                                               ; preds = %54, %41
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %12, align 4, !tbaa !15
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %12, align 4, !tbaa !15
  br label %29, !llvm.loop !18

70:                                               ; preds = %35
  br label %202

71:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !15
  br label %72

72:                                               ; preds = %110, %71
  %73 = load i32, ptr %13, align 4, !tbaa !15
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = icmp slt i32 %73, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %113

79:                                               ; preds = %72
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 4, !tbaa !16
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %97, label %84

84:                                               ; preds = %79
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i32, ptr %13, align 4, !tbaa !15
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds float, ptr %85, i64 %87
  %89 = load float, ptr %88, align 4, !tbaa !9
  %90 = load float, ptr %8, align 4, !tbaa !9
  %91 = fmul float %89, %90
  %92 = fptoui float %91 to i8
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i32, ptr %13, align 4, !tbaa !15
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %93, i64 %95
  store i8 %92, ptr %96, align 1, !tbaa !17
  br label %109

97:                                               ; preds = %79
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load i32, ptr %13, align 4, !tbaa !15
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds float, ptr %98, i64 %100
  %102 = load float, ptr %101, align 4, !tbaa !9
  %103 = fmul float %102, 2.550000e+02
  %104 = fptoui float %103 to i8
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %13, align 4, !tbaa !15
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %105, i64 %107
  store i8 %104, ptr %108, align 1, !tbaa !17
  br label %109

109:                                              ; preds = %97, %84
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %13, align 4, !tbaa !15
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %13, align 4, !tbaa !15
  br label %72, !llvm.loop !20

113:                                              ; preds = %78
  br label %202

114:                                              ; preds = %4
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %115, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !15
  br label %116

116:                                              ; preds = %154, %114
  %117 = load i32, ptr %14, align 4, !tbaa !15
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %118, i32 0, i32 3
  %120 = load i32, ptr %119, align 4, !tbaa !14
  %121 = icmp slt i32 %117, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %157

123:                                              ; preds = %116
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 4, !tbaa !16
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %141, label %128

128:                                              ; preds = %123
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load i32, ptr %14, align 4, !tbaa !15
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds float, ptr %129, i64 %131
  %133 = load float, ptr %132, align 4, !tbaa !9
  %134 = load float, ptr %8, align 4, !tbaa !9
  %135 = fmul float %133, %134
  %136 = fptosi float %135 to i16
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = load i32, ptr %14, align 4, !tbaa !15
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i16, ptr %137, i64 %139
  store i16 %136, ptr %140, align 2, !tbaa !21
  br label %153

141:                                              ; preds = %123
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load i32, ptr %14, align 4, !tbaa !15
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds float, ptr %142, i64 %144
  %146 = load float, ptr %145, align 4, !tbaa !9
  %147 = fmul float %146, 3.276700e+04
  %148 = fptosi float %147 to i16
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = load i32, ptr %14, align 4, !tbaa !15
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i16, ptr %149, i64 %151
  store i16 %148, ptr %152, align 2, !tbaa !21
  br label %153

153:                                              ; preds = %141, %128
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %14, align 4, !tbaa !15
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %14, align 4, !tbaa !15
  br label %116, !llvm.loop !23

157:                                              ; preds = %122
  br label %202

158:                                              ; preds = %4
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %159, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !15
  br label %160

160:                                              ; preds = %198, %158
  %161 = load i32, ptr %15, align 4, !tbaa !15
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %162, i32 0, i32 3
  %164 = load i32, ptr %163, align 4, !tbaa !14
  %165 = icmp slt i32 %161, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %201

167:                                              ; preds = %160
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.rw::wdgl::AttribDesc", ptr %168, i32 0, i32 2
  %170 = load i32, ptr %169, align 4, !tbaa !16
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %185, label %172

172:                                              ; preds = %167
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = load i32, ptr %15, align 4, !tbaa !15
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds float, ptr %173, i64 %175
  %177 = load float, ptr %176, align 4, !tbaa !9
  %178 = load float, ptr %8, align 4, !tbaa !9
  %179 = fmul float %177, %178
  %180 = fptoui float %179 to i16
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = load i32, ptr %15, align 4, !tbaa !15
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds i16, ptr %181, i64 %183
  store i16 %180, ptr %184, align 2, !tbaa !21
  br label %197

185:                                              ; preds = %167
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = load i32, ptr %15, align 4, !tbaa !15
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds float, ptr %186, i64 %188
  %190 = load float, ptr %189, align 4, !tbaa !9
  %191 = fmul float %190, 6.553500e+04
  %192 = fptoui float %191 to i16
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = load i32, ptr %15, align 4, !tbaa !15
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds i16, ptr %193, i64 %195
  store i16 %192, ptr %196, align 2, !tbaa !21
  br label %197

197:                                              ; preds = %185, %172
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %15, align 4, !tbaa !15
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %15, align 4, !tbaa !15
  br label %160, !llvm.loop !24

201:                                              ; preds = %166
  br label %202

202:                                              ; preds = %201, %157, %113, %70, %19, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

; 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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 4}
!12 = !{!"_ZTSN2rw4wdgl10AttribDescE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 12}
!15 = !{!13, !13, i64 0}
!16 = !{!12, !13, i64 8}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @_ZN2rw4wdgl10packattribEPhPfPNS0_10AttribDescEf(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, float noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %2, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !5
  switch i32 %6, label %.loopexit [
    i32 0, label %71
    i32 1, label %.preheader
    i32 2, label %.preheader64
    i32 3, label %.preheader66
    i32 4, label %.preheader68
  ]

.preheader68:                                     ; preds = %4
  %7 = getelementptr inbounds i8, ptr %2, i64 12
  %8 = load i32, ptr %7, align 4, !tbaa !10
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader68
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %.not = icmp eq i32 %11, 0
  %wide.trip.count86 = zext nneg i32 %8 to i64
  %min.iters.check121 = icmp ult i32 %8, 8
  br i1 %.not, label %.lr.ph.split.us.preheader, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  br i1 %min.iters.check121, label %.lr.ph.split.preheader167, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph.split.preheader
  %n.vec = and i64 %wide.trip.count86, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %12 = getelementptr inbounds float, ptr %1, i64 %index
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %wide.load = load <4 x float>, ptr %12, align 4, !tbaa !12
  %wide.load118 = load <4 x float>, ptr %13, align 4, !tbaa !12
  %14 = fmul <4 x float> %wide.load, <float 6.553500e+04, float 6.553500e+04, float 6.553500e+04, float 6.553500e+04>
  %15 = fmul <4 x float> %wide.load118, <float 6.553500e+04, float 6.553500e+04, float 6.553500e+04, float 6.553500e+04>
  %16 = fptoui <4 x float> %14 to <4 x i16>
  %17 = fptoui <4 x float> %15 to <4 x i16>
  %18 = getelementptr inbounds i16, ptr %0, i64 %index
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  store <4 x i16> %16, ptr %18, align 2, !tbaa !14
  store <4 x i16> %17, ptr %19, align 2, !tbaa !14
  %index.next = add nuw i64 %index, 8
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count86
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.split.preheader167

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  br i1 %min.iters.check121, label %.lr.ph.split.us.preheader165, label %vector.ph122

vector.ph122:                                     ; preds = %.lr.ph.split.us.preheader
  %n.vec124 = and i64 %wide.trip.count86, 2147483640
  %broadcast.splatinsert = insertelement <4 x float> poison, float %3, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body126

vector.body126:                                   ; preds = %vector.body126, %vector.ph122
  %index127 = phi i64 [ 0, %vector.ph122 ], [ %index.next130, %vector.body126 ]
  %21 = getelementptr inbounds float, ptr %1, i64 %index127
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %wide.load128 = load <4 x float>, ptr %21, align 4, !tbaa !12
  %wide.load129 = load <4 x float>, ptr %22, align 4, !tbaa !12
  %23 = fmul <4 x float> %wide.load128, %broadcast.splat
  %24 = fmul <4 x float> %wide.load129, %broadcast.splat
  %25 = fptoui <4 x float> %23 to <4 x i16>
  %26 = fptoui <4 x float> %24 to <4 x i16>
  %27 = getelementptr inbounds i16, ptr %0, i64 %index127
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  store <4 x i16> %25, ptr %27, align 2, !tbaa !14
  store <4 x i16> %26, ptr %28, align 2, !tbaa !14
  %index.next130 = add nuw i64 %index127, 8
  %29 = icmp eq i64 %index.next130, %n.vec124
  br i1 %29, label %middle.block119, label %vector.body126, !llvm.loop !20

middle.block119:                                  ; preds = %vector.body126
  %cmp.n131 = icmp eq i64 %n.vec124, %wide.trip.count86
  br i1 %cmp.n131, label %.loopexit, label %.lr.ph.split.us.preheader165

.lr.ph.split.us.preheader165:                     ; preds = %middle.block119, %.lr.ph.split.us.preheader
  %indvars.iv83.ph = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %n.vec124, %middle.block119 ]
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader165, %.lr.ph.split.us
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph.split.us ], [ %indvars.iv83.ph, %.lr.ph.split.us.preheader165 ]
  %30 = getelementptr inbounds float, ptr %1, i64 %indvars.iv83
  %31 = load float, ptr %30, align 4, !tbaa !12
  %32 = fmul float %31, %3
  %33 = fptoui float %32 to i16
  %34 = getelementptr inbounds i16, ptr %0, i64 %indvars.iv83
  store i16 %33, ptr %34, align 2, !tbaa !14
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %.loopexit, label %.lr.ph.split.us, !llvm.loop !21

.preheader66:                                     ; preds = %4
  %35 = getelementptr inbounds i8, ptr %2, i64 12
  %36 = load i32, ptr %35, align 4, !tbaa !10
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph72, label %.loopexit

.lr.ph72:                                         ; preds = %.preheader66
  %38 = getelementptr inbounds i8, ptr %2, i64 8
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %.not61 = icmp eq i32 %39, 0
  %wide.trip.count96 = zext nneg i32 %36 to i64
  %min.iters.check147 = icmp ult i32 %36, 8
  br i1 %.not61, label %.lr.ph72.split.us.preheader, label %.lr.ph72.split.preheader

.lr.ph72.split.preheader:                         ; preds = %.lr.ph72
  br i1 %min.iters.check147, label %.lr.ph72.split.preheader163, label %vector.ph135

.lr.ph72.split.preheader163:                      ; preds = %middle.block132, %.lr.ph72.split.preheader
  %indvars.iv88.ph = phi i64 [ 0, %.lr.ph72.split.preheader ], [ %n.vec137, %middle.block132 ]
  br label %.lr.ph72.split

vector.ph135:                                     ; preds = %.lr.ph72.split.preheader
  %n.vec137 = and i64 %wide.trip.count96, 2147483640
  br label %vector.body139

vector.body139:                                   ; preds = %vector.body139, %vector.ph135
  %index140 = phi i64 [ 0, %vector.ph135 ], [ %index.next143, %vector.body139 ]
  %40 = getelementptr inbounds float, ptr %1, i64 %index140
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load141 = load <4 x float>, ptr %40, align 4, !tbaa !12
  %wide.load142 = load <4 x float>, ptr %41, align 4, !tbaa !12
  %42 = fmul <4 x float> %wide.load141, <float 3.276700e+04, float 3.276700e+04, float 3.276700e+04, float 3.276700e+04>
  %43 = fmul <4 x float> %wide.load142, <float 3.276700e+04, float 3.276700e+04, float 3.276700e+04, float 3.276700e+04>
  %44 = fptosi <4 x float> %42 to <4 x i16>
  %45 = fptosi <4 x float> %43 to <4 x i16>
  %46 = getelementptr inbounds i16, ptr %0, i64 %index140
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  store <4 x i16> %44, ptr %46, align 2, !tbaa !14
  store <4 x i16> %45, ptr %47, align 2, !tbaa !14
  %index.next143 = add nuw i64 %index140, 8
  %48 = icmp eq i64 %index.next143, %n.vec137
  br i1 %48, label %middle.block132, label %vector.body139, !llvm.loop !22

middle.block132:                                  ; preds = %vector.body139
  %cmp.n144 = icmp eq i64 %n.vec137, %wide.trip.count96
  br i1 %cmp.n144, label %.loopexit, label %.lr.ph72.split.preheader163

.lr.ph72.split.us.preheader:                      ; preds = %.lr.ph72
  br i1 %min.iters.check147, label %.lr.ph72.split.us.preheader161, label %vector.ph148

vector.ph148:                                     ; preds = %.lr.ph72.split.us.preheader
  %n.vec150 = and i64 %wide.trip.count96, 2147483640
  %broadcast.splatinsert156 = insertelement <4 x float> poison, float %3, i64 0
  %broadcast.splat157 = shufflevector <4 x float> %broadcast.splatinsert156, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body152

vector.body152:                                   ; preds = %vector.body152, %vector.ph148
  %index153 = phi i64 [ 0, %vector.ph148 ], [ %index.next158, %vector.body152 ]
  %49 = getelementptr inbounds float, ptr %1, i64 %index153
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %wide.load154 = load <4 x float>, ptr %49, align 4, !tbaa !12
  %wide.load155 = load <4 x float>, ptr %50, align 4, !tbaa !12
  %51 = fmul <4 x float> %wide.load154, %broadcast.splat157
  %52 = fmul <4 x float> %wide.load155, %broadcast.splat157
  %53 = fptosi <4 x float> %51 to <4 x i16>
  %54 = fptosi <4 x float> %52 to <4 x i16>
  %55 = getelementptr inbounds i16, ptr %0, i64 %index153
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  store <4 x i16> %53, ptr %55, align 2, !tbaa !14
  store <4 x i16> %54, ptr %56, align 2, !tbaa !14
  %index.next158 = add nuw i64 %index153, 8
  %57 = icmp eq i64 %index.next158, %n.vec150
  br i1 %57, label %middle.block145, label %vector.body152, !llvm.loop !23

middle.block145:                                  ; preds = %vector.body152
  %cmp.n159 = icmp eq i64 %n.vec150, %wide.trip.count96
  br i1 %cmp.n159, label %.loopexit, label %.lr.ph72.split.us.preheader161

.lr.ph72.split.us.preheader161:                   ; preds = %middle.block145, %.lr.ph72.split.us.preheader
  %indvars.iv93.ph = phi i64 [ 0, %.lr.ph72.split.us.preheader ], [ %n.vec150, %middle.block145 ]
  br label %.lr.ph72.split.us

.lr.ph72.split.us:                                ; preds = %.lr.ph72.split.us.preheader161, %.lr.ph72.split.us
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.lr.ph72.split.us ], [ %indvars.iv93.ph, %.lr.ph72.split.us.preheader161 ]
  %58 = getelementptr inbounds float, ptr %1, i64 %indvars.iv93
  %59 = load float, ptr %58, align 4, !tbaa !12
  %60 = fmul float %59, %3
  %61 = fptosi float %60 to i16
  %62 = getelementptr inbounds i16, ptr %0, i64 %indvars.iv93
  store i16 %61, ptr %62, align 2, !tbaa !14
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %.loopexit, label %.lr.ph72.split.us, !llvm.loop !24

.preheader64:                                     ; preds = %4
  %63 = getelementptr inbounds i8, ptr %2, i64 12
  %64 = load i32, ptr %63, align 4, !tbaa !10
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph74, label %.loopexit

.lr.ph74:                                         ; preds = %.preheader64
  %66 = getelementptr inbounds i8, ptr %2, i64 8
  br label %85

.preheader:                                       ; preds = %4
  %67 = getelementptr inbounds i8, ptr %2, i64 12
  %68 = load i32, ptr %67, align 4, !tbaa !10
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph76, label %.loopexit

.lr.ph76:                                         ; preds = %.preheader
  %70 = getelementptr inbounds i8, ptr %2, i64 8
  br label %76

71:                                               ; preds = %4
  %72 = getelementptr inbounds i8, ptr %2, i64 12
  %73 = load i32, ptr %72, align 4, !tbaa !10
  %74 = shl nsw i32 %73, 2
  %75 = sext i32 %74 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %0, ptr align 4 %1, i64 %75, i1 false)
  br label %.loopexit

76:                                               ; preds = %.lr.ph76, %76
  %indvars.iv101 = phi i64 [ 0, %.lr.ph76 ], [ %indvars.iv.next102, %76 ]
  %77 = load i32, ptr %70, align 4, !tbaa !11
  %.not63 = icmp eq i32 %77, 0
  %78 = getelementptr inbounds float, ptr %1, i64 %indvars.iv101
  %79 = load float, ptr %78, align 4, !tbaa !12
  %. = select i1 %.not63, float %3, float 1.270000e+02
  %80 = fmul float %79, %.
  %.sink = fptosi float %80 to i8
  %81 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv101
  store i8 %.sink, ptr %81, align 1
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %82 = load i32, ptr %67, align 4, !tbaa !10
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next102, %83
  br i1 %84, label %76, label %.loopexit, !llvm.loop !25

85:                                               ; preds = %.lr.ph74, %85
  %indvars.iv98 = phi i64 [ 0, %.lr.ph74 ], [ %indvars.iv.next99, %85 ]
  %86 = load i32, ptr %66, align 4, !tbaa !11
  %.not62 = icmp eq i32 %86, 0
  %87 = getelementptr inbounds float, ptr %1, i64 %indvars.iv98
  %88 = load float, ptr %87, align 4, !tbaa !12
  %.112 = select i1 %.not62, float %3, float 2.550000e+02
  %89 = fmul float %88, %.112
  %.sink104 = fptoui float %89 to i8
  %90 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv98
  store i8 %.sink104, ptr %90, align 1
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %91 = load i32, ptr %63, align 4, !tbaa !10
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next99, %92
  br i1 %93, label %85, label %.loopexit, !llvm.loop !26

.lr.ph72.split:                                   ; preds = %.lr.ph72.split.preheader163, %.lr.ph72.split
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph72.split ], [ %indvars.iv88.ph, %.lr.ph72.split.preheader163 ]
  %94 = getelementptr inbounds float, ptr %1, i64 %indvars.iv88
  %95 = load float, ptr %94, align 4, !tbaa !12
  %96 = fmul float %95, 3.276700e+04
  %97 = fptosi float %96 to i16
  %98 = getelementptr inbounds i16, ptr %0, i64 %indvars.iv88
  store i16 %97, ptr %98, align 2, !tbaa !14
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count96
  br i1 %exitcond92.not, label %.loopexit, label %.lr.ph72.split, !llvm.loop !27

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader167, %.lr.ph.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split ], [ %indvars.iv.ph, %.lr.ph.split.preheader167 ]
  %99 = getelementptr inbounds float, ptr %1, i64 %indvars.iv
  %100 = load float, ptr %99, align 4, !tbaa !12
  %101 = fmul float %100, 6.553500e+04
  %102 = fptoui float %101 to i16
  %103 = getelementptr inbounds i16, ptr %0, i64 %indvars.iv
  store i16 %102, ptr %103, align 2, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count86
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph.split, !llvm.loop !28

.loopexit:                                        ; preds = %.lr.ph.split, %.lr.ph.split.us, %.lr.ph72.split, %.lr.ph72.split.us, %85, %76, %middle.block, %middle.block119, %middle.block132, %middle.block145, %.preheader68, %.preheader66, %.preheader64, %.preheader, %71, %4
  ret void
}

; 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) #1

attributes #0 = { mustprogress nofree norecurse nosync nounwind memory(argmem: readwrite) 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 nounwind willreturn memory(argmem: readwrite) }

!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, !7, i64 4}
!6 = !{!"_ZTSN2rw4wdgl10AttribDescE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 12}
!11 = !{!6, !7, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = distinct !{!16, !17, !18, !19}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !17, !18, !19}
!21 = distinct !{!21, !17, !19, !18}
!22 = distinct !{!22, !17, !18, !19}
!23 = distinct !{!23, !17, !18, !19}
!24 = distinct !{!24, !17, !19, !18}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !17}
!27 = distinct !{!27, !17, !19, !18}
!28 = distinct !{!28, !17, !19, !18}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass