; 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._Z15quantizeF32ToI810TensorDescPKfPS_PaPfi.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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15quantizeF32ToI810TensorDescPKfPS_PaPfi(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #3 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %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 %struct.TensorDesc, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca [32 x i8], align 16
  %19 = alloca i32, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !9
  %20 = load ptr, ptr %11, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %6
  store i32 2, ptr %7, align 4
  br label %130

23:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !11
  %24 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %14)
  store i32 %24, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %25 = load i32, ptr %13, align 4, !tbaa !9
  %26 = udiv i32 %25, 8
  store i32 %26, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = urem i32 %27, 8
  store i32 %28, ptr %16, align 4, !tbaa !9
  %29 = load i32, ptr %12, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %35

31:                                               ; preds = %23
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load float, ptr %32, align 4, !tbaa !17
  %34 = fcmp olt float %33, 0.000000e+00
  br i1 %34, label %35, label %54

35:                                               ; preds = %31, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load float, ptr %36, align 4, !tbaa !17
  store float %37, ptr %17, align 4, !tbaa !17
  %38 = load i32, ptr %15, align 4, !tbaa !9
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef %38, i32 noundef %39, ptr noundef %40, ptr noundef %41)
  %42 = load float, ptr %17, align 4, !tbaa !17
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = load float, ptr %43, align 4, !tbaa !17
  %45 = fcmp ogt float %42, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %35
  %47 = load float, ptr %17, align 4, !tbaa !17
  br label %51

48:                                               ; preds = %35
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load float, ptr %49, align 4, !tbaa !17
  br label %51

51:                                               ; preds = %48, %46
  %52 = phi float [ %47, %46 ], [ %50, %48 ]
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  store float %52, ptr %53, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %54

54:                                               ; preds = %51, %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 @__const._Z15quantizeF32ToI810TensorDescPKfPS_PaPfi.index, i64 32, i1 false)
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = getelementptr inbounds [32 x i8], ptr %18, i64 0, i64 0
  %60 = call { ptr, ptr, ptr } asm sideeffect "vmovups ($4), %ymm6                    \0A\09vbroadcastss ($2), %ymm0              \0A\09mov $$127, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm4            \0A\09mov $$-127, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm5            \0A\09mov $3, %ebx \0A\09cmp $$0x0, %ebx                         \0A\09je 1f                                    \0A\09.align 16                              \0A\090:                                     \0A\09vmulps ($0), %ymm0, %ymm3            \0A\09vcvtps2dq %ymm3, %ymm1   \0A\09vpmaxsd %ymm5, %ymm1, %ymm1          \0A\09vpminsd %ymm4, %ymm1, %ymm1          \0A\09vpshufb %ymm6, %ymm1, %ymm3                 \0A\09vpermd  %ymm3, %ymm6, %ymm1                 \0A\09movq  %xmm1, ($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,2,~{ebx},~{ymm0},~{ymm1},~{ymm2},~{ymm3},~{ymm4},~{ymm5},~{ymm6},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %58, ptr %59, ptr %55, ptr %56, ptr %57) #4, !srcloc !19
  %61 = extractvalue { ptr, ptr, ptr } %60, 0
  %62 = extractvalue { ptr, ptr, ptr } %60, 1
  %63 = extractvalue { ptr, ptr, ptr } %60, 2
  store ptr %61, ptr %8, align 8, !tbaa !5
  store ptr %62, ptr %10, align 8, !tbaa !5
  store ptr %63, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %126, %54
  %65 = load i32, ptr %19, align 4, !tbaa !9
  %66 = load i32, ptr %16, align 4, !tbaa !9
  %67 = icmp ult i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %129

69:                                               ; preds = %64
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load i32, ptr %19, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds float, ptr %70, i64 %72
  %74 = load float, ptr %73, align 4, !tbaa !17
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = getelementptr inbounds float, ptr %75, i64 0
  %77 = load float, ptr %76, align 4, !tbaa !17
  %78 = fmul float %74, %77
  %79 = fcmp olt float %78, 1.270000e+02
  br i1 %79, label %80, label %90

80:                                               ; preds = %69
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i32, ptr %19, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds float, ptr %81, i64 %83
  %85 = load float, ptr %84, align 4, !tbaa !17
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds float, ptr %86, i64 0
  %88 = load float, ptr %87, align 4, !tbaa !17
  %89 = fmul float %85, %88
  br label %91

90:                                               ; preds = %69
  br label %91

91:                                               ; preds = %90, %80
  %92 = phi float [ %89, %80 ], [ 1.270000e+02, %90 ]
  %93 = fcmp ogt float %92, -1.270000e+02
  br i1 %93, label %94, label %118

94:                                               ; preds = %91
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load i32, ptr %19, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds float, ptr %95, i64 %97
  %99 = load float, ptr %98, align 4, !tbaa !17
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds float, ptr %100, i64 0
  %102 = load float, ptr %101, align 4, !tbaa !17
  %103 = fmul float %99, %102
  %104 = fcmp olt float %103, 1.270000e+02
  br i1 %104, label %105, label %115

105:                                              ; preds = %94
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds float, ptr %106, i64 %108
  %110 = load float, ptr %109, align 4, !tbaa !17
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds float, ptr %111, i64 0
  %113 = load float, ptr %112, align 4, !tbaa !17
  %114 = fmul float %110, %113
  br label %116

115:                                              ; preds = %94
  br label %116

116:                                              ; preds = %115, %105
  %117 = phi float [ %114, %105 ], [ 1.270000e+02, %115 ]
  br label %119

118:                                              ; preds = %91
  br label %119

119:                                              ; preds = %118, %116
  %120 = phi float [ %117, %116 ], [ -1.270000e+02, %118 ]
  %121 = fptosi float %120 to i8
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = load i32, ptr %19, align 4, !tbaa !9
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds i8, ptr %122, i64 %124
  store i8 %121, ptr %125, align 1, !tbaa !16
  br label %126

126:                                              ; preds = %119
  %127 = load i32, ptr %19, align 4, !tbaa !9
  %128 = add i32 %127, 1
  store i32 %128, ptr %19, align 4, !tbaa !9
  br label %64, !llvm.loop !20

129:                                              ; preds = %68
  store i32 0, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %130

130:                                              ; preds = %129, %22
  %131 = load i32, ptr %7, align 4
  ret i32 %131
}

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 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !14, i64 8, i64 4, !9, i64 12, i64 80, !16}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS8DataType", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS10DataFormat", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{i64 9117, i64 9160, i64 9215, i64 9247, i64 9302, i64 9357, i64 9390, i64 9445, i64 9500, i64 9530, i64 9586, i64 9643, i64 9698, i64 9753, i64 9808, i64 9851, i64 9907, i64 9963, i64 10026, i64 10089, i64 10140, i64 10195, i64 10249, i64 10304, i64 10359, i64 10416, i64 10471}
!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._Z15quantizeF32ToI810TensorDescPKfPS_PaPfi.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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef, i32 noundef, ptr noundef, ptr noundef) 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) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 3) i32 @_Z15quantizeF32ToI810TensorDescPKfPS_PaPfi(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr nocapture noundef readnone %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #3 {
  %7 = alloca [32 x i8], align 16
  %8 = icmp eq ptr %4, null
  br i1 %8, label %97, label %9

9:                                                ; preds = %6
  %10 = tail call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %11 = lshr i32 %10, 3
  %12 = and i32 %10, 7
  %.not = icmp eq i32 %5, 0
  %.pre = load float, ptr %4, align 4, !tbaa !5
  %13 = fcmp olt float %.pre, 0.000000e+00
  %or.cond = select i1 %.not, i1 true, i1 %13
  br i1 %or.cond, label %14, label %17

14:                                               ; preds = %9
  tail call void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef %11, i32 noundef %12, ptr noundef %1, ptr noundef nonnull %4)
  %15 = load float, ptr %4, align 4, !tbaa !5
  %16 = fcmp ogt float %.pre, %15
  %. = select i1 %16, float %.pre, float %15
  store float %., ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %9, %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 16 dereferenceable(32) @__const._Z15quantizeF32ToI810TensorDescPKfPS_PaPfi.index, i64 32, i1 false)
  %18 = call { ptr, ptr, ptr } asm sideeffect "vmovups ($4), %ymm6                    \0A\09vbroadcastss ($2), %ymm0              \0A\09mov $$127, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm4            \0A\09mov $$-127, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm5            \0A\09mov $3, %ebx \0A\09cmp $$0x0, %ebx                         \0A\09je 1f                                    \0A\09.align 16                              \0A\090:                                     \0A\09vmulps ($0), %ymm0, %ymm3            \0A\09vcvtps2dq %ymm3, %ymm1   \0A\09vpmaxsd %ymm5, %ymm1, %ymm1          \0A\09vpminsd %ymm4, %ymm1, %ymm1          \0A\09vpshufb %ymm6, %ymm1, %ymm3                 \0A\09vpermd  %ymm3, %ymm6, %ymm1                 \0A\09movq  %xmm1, ($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,2,~{ebx},~{ymm0},~{ymm1},~{ymm2},~{ymm3},~{ymm4},~{ymm5},~{ymm6},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %11, ptr nonnull %7, ptr %1, ptr %3, ptr nonnull %4) #4, !srcloc !9
  %19 = extractvalue { ptr, ptr, ptr } %18, 0
  %20 = extractvalue { ptr, ptr, ptr } %18, 1
  %21 = extractvalue { ptr, ptr, ptr } %18, 2
  %.not45 = icmp eq i32 %12, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph.1, %.lr.ph.2, %.lr.ph.3, %.lr.ph.4, %.lr.ph.5, %.lr.ph.6, %17
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %97

.lr.ph:                                           ; preds = %17
  %22 = load float, ptr %19, align 4, !tbaa !5
  %23 = load float, ptr %21, align 4, !tbaa !5
  %24 = fmul float %22, %23
  %25 = fcmp uge float %24, 1.270000e+02
  %26 = fcmp ogt float %24, -1.270000e+02
  %27 = or i1 %25, %26
  %28 = xor i1 %26, true
  %brmerge = or i1 %25, %28
  %.mux = select i1 %27, float 1.270000e+02, float -1.270000e+02
  %29 = select i1 %brmerge, float %.mux, float %24
  %30 = fptosi float %29 to i8
  store i8 %30, ptr %20, align 1, !tbaa !10
  %exitcond.not = icmp eq i32 %12, 1
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.1, !llvm.loop !11

.lr.ph.1:                                         ; preds = %.lr.ph
  %31 = getelementptr inbounds i8, ptr %19, i64 4
  %32 = load float, ptr %31, align 4, !tbaa !5
  %33 = load float, ptr %21, align 4, !tbaa !5
  %34 = fmul float %32, %33
  %35 = fcmp uge float %34, 1.270000e+02
  %36 = fcmp ogt float %34, -1.270000e+02
  %37 = or i1 %35, %36
  %38 = xor i1 %36, true
  %brmerge.1 = or i1 %35, %38
  %.mux.1 = select i1 %37, float 1.270000e+02, float -1.270000e+02
  %39 = select i1 %brmerge.1, float %.mux.1, float %34
  %40 = fptosi float %39 to i8
  %41 = getelementptr inbounds i8, ptr %20, i64 1
  store i8 %40, ptr %41, align 1, !tbaa !10
  %exitcond.not.1 = icmp eq i32 %12, 2
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph.2, !llvm.loop !11

.lr.ph.2:                                         ; preds = %.lr.ph.1
  %42 = getelementptr inbounds i8, ptr %19, i64 8
  %43 = load float, ptr %42, align 4, !tbaa !5
  %44 = load float, ptr %21, align 4, !tbaa !5
  %45 = fmul float %43, %44
  %46 = fcmp uge float %45, 1.270000e+02
  %47 = fcmp ogt float %45, -1.270000e+02
  %48 = or i1 %46, %47
  %49 = xor i1 %47, true
  %brmerge.2 = or i1 %46, %49
  %.mux.2 = select i1 %48, float 1.270000e+02, float -1.270000e+02
  %50 = select i1 %brmerge.2, float %.mux.2, float %45
  %51 = fptosi float %50 to i8
  %52 = getelementptr inbounds i8, ptr %20, i64 2
  store i8 %51, ptr %52, align 1, !tbaa !10
  %exitcond.not.2 = icmp eq i32 %12, 3
  br i1 %exitcond.not.2, label %._crit_edge, label %.lr.ph.3, !llvm.loop !11

.lr.ph.3:                                         ; preds = %.lr.ph.2
  %53 = getelementptr inbounds i8, ptr %19, i64 12
  %54 = load float, ptr %53, align 4, !tbaa !5
  %55 = load float, ptr %21, align 4, !tbaa !5
  %56 = fmul float %54, %55
  %57 = fcmp uge float %56, 1.270000e+02
  %58 = fcmp ogt float %56, -1.270000e+02
  %59 = or i1 %57, %58
  %60 = xor i1 %58, true
  %brmerge.3 = or i1 %57, %60
  %.mux.3 = select i1 %59, float 1.270000e+02, float -1.270000e+02
  %61 = select i1 %brmerge.3, float %.mux.3, float %56
  %62 = fptosi float %61 to i8
  %63 = getelementptr inbounds i8, ptr %20, i64 3
  store i8 %62, ptr %63, align 1, !tbaa !10
  %exitcond.not.3 = icmp eq i32 %12, 4
  br i1 %exitcond.not.3, label %._crit_edge, label %.lr.ph.4, !llvm.loop !11

.lr.ph.4:                                         ; preds = %.lr.ph.3
  %64 = getelementptr inbounds i8, ptr %19, i64 16
  %65 = load float, ptr %64, align 4, !tbaa !5
  %66 = load float, ptr %21, align 4, !tbaa !5
  %67 = fmul float %65, %66
  %68 = fcmp uge float %67, 1.270000e+02
  %69 = fcmp ogt float %67, -1.270000e+02
  %70 = or i1 %68, %69
  %71 = xor i1 %69, true
  %brmerge.4 = or i1 %68, %71
  %.mux.4 = select i1 %70, float 1.270000e+02, float -1.270000e+02
  %72 = select i1 %brmerge.4, float %.mux.4, float %67
  %73 = fptosi float %72 to i8
  %74 = getelementptr inbounds i8, ptr %20, i64 4
  store i8 %73, ptr %74, align 1, !tbaa !10
  %exitcond.not.4 = icmp eq i32 %12, 5
  br i1 %exitcond.not.4, label %._crit_edge, label %.lr.ph.5, !llvm.loop !11

.lr.ph.5:                                         ; preds = %.lr.ph.4
  %75 = getelementptr inbounds i8, ptr %19, i64 20
  %76 = load float, ptr %75, align 4, !tbaa !5
  %77 = load float, ptr %21, align 4, !tbaa !5
  %78 = fmul float %76, %77
  %79 = fcmp uge float %78, 1.270000e+02
  %80 = fcmp ogt float %78, -1.270000e+02
  %81 = or i1 %79, %80
  %82 = xor i1 %80, true
  %brmerge.5 = or i1 %79, %82
  %.mux.5 = select i1 %81, float 1.270000e+02, float -1.270000e+02
  %83 = select i1 %brmerge.5, float %.mux.5, float %78
  %84 = fptosi float %83 to i8
  %85 = getelementptr inbounds i8, ptr %20, i64 5
  store i8 %84, ptr %85, align 1, !tbaa !10
  %exitcond.not.5 = icmp eq i32 %12, 6
  br i1 %exitcond.not.5, label %._crit_edge, label %.lr.ph.6, !llvm.loop !11

.lr.ph.6:                                         ; preds = %.lr.ph.5
  %86 = getelementptr inbounds i8, ptr %19, i64 24
  %87 = load float, ptr %86, align 4, !tbaa !5
  %88 = load float, ptr %21, align 4, !tbaa !5
  %89 = fmul float %87, %88
  %90 = fcmp uge float %89, 1.270000e+02
  %91 = fcmp ogt float %89, -1.270000e+02
  %92 = or i1 %90, %91
  %93 = xor i1 %91, true
  %brmerge.6 = or i1 %90, %93
  %.mux.6 = select i1 %92, float 1.270000e+02, float -1.270000e+02
  %94 = select i1 %brmerge.6, float %.mux.6, float %89
  %95 = fptosi float %94 to i8
  %96 = getelementptr inbounds i8, ptr %20, i64 6
  store i8 %95, ptr %96, align 1, !tbaa !10
  br label %._crit_edge

97:                                               ; preds = %6, %._crit_edge
  %.036 = phi i32 [ 0, %._crit_edge ], [ 2, %6 ]
  ret i32 %.036
}

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 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 = { 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 9117, i64 9160, i64 9215, i64 9247, i64 9302, i64 9357, i64 9390, i64 9445, i64 9500, i64 9530, i64 9586, i64 9643, i64 9698, i64 9753, i64 9808, i64 9851, i64 9907, i64 9963, i64 10026, i64 10089, i64 10140, i64 10195, i64 10249, i64 10304, i64 10359, i64 10416, i64 10471}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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