; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/x86/int8/avx (quantize)

; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }

@__const._Z15quantizeI32ToI810TensorDescPKiPS_PaPf.index = external hidden unnamed_addr constant [32 x i8], align 16

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #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) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15quantizeI32ToI810TensorDescPKiPS_PaPf(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #4 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.TensorDesc, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca [32 x i8], align 16
  %16 = alloca i32, align 4
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store ptr %4, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !9
  %17 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %11)
  store i32 %17, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %18 = load i32, ptr %10, align 4, !tbaa !14
  %19 = udiv i32 %18, 8
  store i32 %19, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %20 = load i32, ptr %10, align 4, !tbaa !14
  %21 = urem i32 %20, 8
  store i32 %21, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store float 0.000000e+00, ptr %14, align 4, !tbaa !17
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = load float, ptr %22, align 4, !tbaa !17
  %24 = fcmp olt float %23, 0.000000e+00
  br i1 %24, label %25, label %41

25:                                               ; preds = %5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds float, ptr %26, i64 1
  %28 = load float, ptr %27, align 4, !tbaa !17
  %29 = fcmp ogt float %28, 0.000000e+00
  br i1 %29, label %30, label %41

30:                                               ; preds = %25
  %31 = load i32, ptr %12, align 4, !tbaa !14
  %32 = load i32, ptr %13, align 4, !tbaa !14
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_Z28getSymmetricQuantizeScaleI32jjPKiPf(i32 noundef %31, i32 noundef %32, ptr noundef %33, ptr noundef %14)
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds float, ptr %34, i64 1
  %36 = load float, ptr %35, align 4, !tbaa !17
  %37 = load float, ptr %14, align 4, !tbaa !17
  %38 = fmul float %36, %37
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds float, ptr %39, i64 0
  store float %38, ptr %40, align 4, !tbaa !17
  br label %60

41:                                               ; preds = %25, %5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds float, ptr %42, i64 0
  %44 = load float, ptr %43, align 4, !tbaa !17
  %45 = fcmp ogt float %44, 0.000000e+00
  br i1 %45, label %46, label %59

46:                                               ; preds = %41
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds float, ptr %47, i64 1
  %49 = load float, ptr %48, align 4, !tbaa !17
  %50 = fcmp ogt float %49, 0.000000e+00
  br i1 %50, label %51, label %59

51:                                               ; preds = %46
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds float, ptr %52, i64 0
  %54 = load float, ptr %53, align 4, !tbaa !17
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds float, ptr %55, i64 1
  %57 = load float, ptr %56, align 4, !tbaa !17
  %58 = fdiv float %54, %57
  store float %58, ptr %14, align 4, !tbaa !17
  br label %59

59:                                               ; preds = %51, %46, %41
  br label %60

60:                                               ; preds = %59, %30
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 @__const._Z15quantizeI32ToI810TensorDescPKiPS_PaPf.index, i64 32, i1 false)
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !14
  %64 = getelementptr inbounds [32 x i8], ptr %15, i64 0, i64 0
  %65 = call { ptr, ptr } asm sideeffect "vmovups ($4), %ymm5                    \0A\09mov $$0x80, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vpbroadcastd %xmm1, %ymm4            \0A\09vpbroadcastb %xmm1, %ymm6            \0A\09vbroadcastss ($2), %ymm0             \0A\09mov $3, %ebx \0A\09cmp $$0x0, %ebx                         \0A\09je 1f                                    \0A\09.align 16                             \0A\090:                                    \0A\09vmovups ($0), %ymm3            \0A\09vcvtdq2ps %ymm3, %ymm2               \0A\09vmulps %ymm2, %ymm0, %ymm1            \0A\09vcvtps2dq %ymm1, %ymm2              \0A\09vpaddd  %ymm2, %ymm4, %ymm3                 \0A\09vpshufb %ymm3, %ymm5, %ymm1                 \0A\09vpermd  %ymm5, %ymm1, %ymm2                 \0A\09vpaddb  %ymm2, %ymm6, %ymm3                 \0A\09movq  %xmm3, ($1)                 \0A\09add $$0x20, $0                         \0A\09add $$0x8, $1                         \0A\09dec %ebx                             \0A\09jg 0b                                 \0A\09.align 16                             \0A\091:                                    \0A\09", "=r,=r,r,r,r,0,1,~{ebx},~{ymm0},~{ymm1},~{ymm2},~{ymm3},~{ymm4},~{ymm5},~{ymm6},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr %14, i32 %63, ptr %64, ptr %61, ptr %62) #6, !srcloc !19
  %66 = extractvalue { ptr, ptr } %65, 0
  %67 = extractvalue { ptr, ptr } %65, 1
  store ptr %66, ptr %6, align 8, !tbaa !5
  store ptr %67, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !14
  br label %68

68:                                               ; preds = %130, %60
  %69 = load i32, ptr %16, align 4, !tbaa !14
  %70 = load i32, ptr %13, align 4, !tbaa !14
  %71 = icmp ult i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %133

73:                                               ; preds = %68
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load i32, ptr %16, align 4, !tbaa !14
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %74, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !14
  %79 = sitofp i32 %78 to float
  %80 = load float, ptr %14, align 4, !tbaa !17
  %81 = fmul float %79, %80
  %82 = call noundef float @_ZSt5roundf(float noundef %81)
  %83 = fcmp ogt float -1.270000e+02, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %73
  br label %95

85:                                               ; preds = %73
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = load i32, ptr %16, align 4, !tbaa !14
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !14
  %91 = sitofp i32 %90 to float
  %92 = load float, ptr %14, align 4, !tbaa !17
  %93 = fmul float %91, %92
  %94 = call noundef float @_ZSt5roundf(float noundef %93)
  br label %95

95:                                               ; preds = %85, %84
  %96 = phi float [ -1.270000e+02, %84 ], [ %94, %85 ]
  %97 = fcmp olt float 1.270000e+02, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %95
  br label %123

99:                                               ; preds = %95
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load i32, ptr %16, align 4, !tbaa !14
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %100, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !14
  %105 = sitofp i32 %104 to float
  %106 = load float, ptr %14, align 4, !tbaa !17
  %107 = fmul float %105, %106
  %108 = call noundef float @_ZSt5roundf(float noundef %107)
  %109 = fcmp ogt float -1.270000e+02, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %99
  br label %121

111:                                              ; preds = %99
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = load i32, ptr %16, align 4, !tbaa !14
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %112, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !14
  %117 = sitofp i32 %116 to float
  %118 = load float, ptr %14, align 4, !tbaa !17
  %119 = fmul float %117, %118
  %120 = call noundef float @_ZSt5roundf(float noundef %119)
  br label %121

121:                                              ; preds = %111, %110
  %122 = phi float [ -1.270000e+02, %110 ], [ %120, %111 ]
  br label %123

123:                                              ; preds = %121, %98
  %124 = phi float [ 1.270000e+02, %98 ], [ %122, %121 ]
  %125 = fptosi float %124 to i8
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = load i32, ptr %16, align 4, !tbaa !14
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %126, i64 %128
  store i8 %125, ptr %129, align 1, !tbaa !16
  br label %130

130:                                              ; preds = %123
  %131 = load i32, ptr %16, align 4, !tbaa !14
  %132 = add i32 %131, 1
  store i32 %132, ptr %16, align 4, !tbaa !14
  br label %68, !llvm.loop !20

133:                                              ; preds = %72
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  ret i32 0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z28getSymmetricQuantizeScaleI32jjPKiPf(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #5 = { inlinehint 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 #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 = !{i64 0, i64 4, !10, i64 4, i64 4, !12, i64 8, i64 4, !14, i64 12, i64 80, !16}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTS8DataType", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS10DataFormat", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{i64 14223, i64 14266, i64 14299, i64 14354, i64 14409, i64 14464, i64 14518, i64 14548, i64 14604, i64 14661, i64 14715, i64 14769, i64 14817, i64 14872, i64 14929, i64 14983, i64 15046, i64 15109, i64 15172, i64 15235, i64 15286, i64 15340, i64 15393, i64 15447, i64 15501, i64 15557, i64 15611}
!20 = distinct !{!20, !21}
!21 = !{!"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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }

@__const._Z15quantizeI32ToI810TensorDescPKiPS_PaPf.index = external hidden unnamed_addr constant [32 x i8], align 16

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15quantizeI32ToI810TensorDescPKiPS_PaPf(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr nocapture noundef readnone %2, ptr noundef %3, ptr nocapture noundef %4) local_unnamed_addr #4 {
  %6 = alloca float, align 4
  %7 = alloca [32 x i8], align 16
  %8 = tail call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %9 = lshr i32 %8, 3
  %10 = and i32 %8, 7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store float 0.000000e+00, ptr %6, align 4, !tbaa !5
  %11 = load float, ptr %4, align 4, !tbaa !5
  %12 = fcmp olt float %11, 0.000000e+00
  br i1 %12, label %13, label %21

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %4, i64 4
  %15 = load float, ptr %14, align 4, !tbaa !5
  %16 = fcmp ogt float %15, 0.000000e+00
  br i1 %16, label %17, label %21

17:                                               ; preds = %13
  call void @_Z28getSymmetricQuantizeScaleI32jjPKiPf(i32 noundef %9, i32 noundef %10, ptr noundef %1, ptr noundef nonnull %6)
  %18 = load float, ptr %14, align 4, !tbaa !5
  %19 = load float, ptr %6, align 4, !tbaa !5
  %20 = fmul float %18, %19
  store float %20, ptr %4, align 4, !tbaa !5
  br label %29

21:                                               ; preds = %13, %5
  %22 = fcmp ogt float %11, 0.000000e+00
  br i1 %22, label %23, label %29

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %4, i64 4
  %25 = load float, ptr %24, align 4, !tbaa !5
  %26 = fcmp ogt float %25, 0.000000e+00
  br i1 %26, label %27, label %29

27:                                               ; preds = %23
  %28 = fdiv float %11, %25
  store float %28, ptr %6, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %21, %23, %27, %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 16 dereferenceable(32) @__const._Z15quantizeI32ToI810TensorDescPKiPS_PaPf.index, i64 32, i1 false)
  %30 = call { ptr, ptr } asm sideeffect "vmovups ($4), %ymm5                    \0A\09mov $$0x80, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vpbroadcastd %xmm1, %ymm4            \0A\09vpbroadcastb %xmm1, %ymm6            \0A\09vbroadcastss ($2), %ymm0             \0A\09mov $3, %ebx \0A\09cmp $$0x0, %ebx                         \0A\09je 1f                                    \0A\09.align 16                             \0A\090:                                    \0A\09vmovups ($0), %ymm3            \0A\09vcvtdq2ps %ymm3, %ymm2               \0A\09vmulps %ymm2, %ymm0, %ymm1            \0A\09vcvtps2dq %ymm1, %ymm2              \0A\09vpaddd  %ymm2, %ymm4, %ymm3                 \0A\09vpshufb %ymm3, %ymm5, %ymm1                 \0A\09vpermd  %ymm5, %ymm1, %ymm2                 \0A\09vpaddb  %ymm2, %ymm6, %ymm3                 \0A\09movq  %xmm3, ($1)                 \0A\09add $$0x20, $0                         \0A\09add $$0x8, $1                         \0A\09dec %ebx                             \0A\09jg 0b                                 \0A\09.align 16                             \0A\091:                                    \0A\09", "=r,=r,r,r,r,0,1,~{ebx},~{ymm0},~{ymm1},~{ymm2},~{ymm3},~{ymm4},~{ymm5},~{ymm6},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull %6, i32 %9, ptr nonnull %7, ptr %1, ptr %3) #6, !srcloc !9
  %31 = extractvalue { ptr, ptr } %30, 0
  %32 = extractvalue { ptr, ptr } %30, 1
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %29
  %wide.trip.count = zext nneg i32 %10 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %59, %29
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  ret i32 0

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %59 ]
  %33 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  %34 = load i32, ptr %33, align 4, !tbaa !10
  %35 = sitofp i32 %34 to float
  %36 = load float, ptr %6, align 4, !tbaa !5
  %37 = fmul float %36, %35
  %38 = call noundef float @_ZSt5roundf(float noundef %37)
  %39 = fcmp olt float %38, -1.270000e+02
  br i1 %39, label %.thread, label %40

40:                                               ; preds = %.lr.ph
  %41 = load i32, ptr %33, align 4, !tbaa !10
  %42 = sitofp i32 %41 to float
  %43 = load float, ptr %6, align 4, !tbaa !5
  %44 = fmul float %43, %42
  %45 = call noundef float @_ZSt5roundf(float noundef %44)
  %46 = fcmp ogt float %45, 1.270000e+02
  br i1 %46, label %59, label %.thread

.thread:                                          ; preds = %.lr.ph, %40
  %47 = load i32, ptr %33, align 4, !tbaa !10
  %48 = sitofp i32 %47 to float
  %49 = load float, ptr %6, align 4, !tbaa !5
  %50 = fmul float %49, %48
  %51 = call noundef float @_ZSt5roundf(float noundef %50)
  %52 = fcmp olt float %51, -1.270000e+02
  br i1 %52, label %59, label %53

53:                                               ; preds = %.thread
  %54 = load i32, ptr %33, align 4, !tbaa !10
  %55 = sitofp i32 %54 to float
  %56 = load float, ptr %6, align 4, !tbaa !5
  %57 = fmul float %56, %55
  %58 = call noundef float @_ZSt5roundf(float noundef %57)
  br label %59

59:                                               ; preds = %53, %.thread, %40
  %60 = phi float [ 1.270000e+02, %40 ], [ %58, %53 ], [ -1.270000e+02, %.thread ]
  %61 = fptosi float %60 to i8
  %62 = getelementptr inbounds i8, ptr %32, i64 %indvars.iv
  store i8 %61, ptr %62, align 1, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z28getSymmetricQuantizeScaleI32jjPKiPf(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #5 = { inlinehint 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 #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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 14223, i64 14266, i64 14299, i64 14354, i64 14409, i64 14464, i64 14518, i64 14548, i64 14604, i64 14661, i64 14715, i64 14769, i64 14817, i64 14872, i64 14929, i64 14983, i64 15046, i64 15109, i64 15172, i64 15235, i64 15286, i64 15340, i64 15393, i64 15447, i64 15501, i64 15557, i64 15611}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass