; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/descriptor/EdgeDetector._86d4d9de (Z13smoothSegmentP7Segment)

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

%class.Segment = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl" }
%"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ChainPoint = type { i32, i32, float, float }

@_ZL2gs = external hidden constant [5 x float], 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13smoothSegmentP7Segment(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 2, ptr %3, align 4, !tbaa !9
  br label %4

4:                                                ; preds = %211, %1
  %5 = load i32, ptr %3, align 4, !tbaa !9
  %6 = zext i32 %5 to i64
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %class.Segment, ptr %7, i32 0, i32 0
  %9 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %10 = sub i64 %9, 2
  %11 = icmp ult i64 %6, %10
  br i1 %11, label %13, label %12

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

13:                                               ; preds = %4
  %14 = load float, ptr @_ZL2gs, align 16, !tbaa !11
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.Segment, ptr %15, i32 0, i32 0
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = sub i32 %17, 2
  %19 = zext i32 %18 to i64
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %19) #4
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.ChainPoint, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = sitofp i32 %23 to float
  %25 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 1), align 4, !tbaa !11
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.Segment, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = sub i32 %28, 1
  %30 = zext i32 %29 to i64
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %30) #4
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.ChainPoint, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = sitofp i32 %34 to float
  %36 = fmul float %25, %35
  %37 = call float @llvm.fmuladd.f32(float %14, float %24, float %36)
  %38 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 2), align 8, !tbaa !11
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.Segment, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42) #4
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds %class.ChainPoint, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = sitofp i32 %46 to float
  %48 = call float @llvm.fmuladd.f32(float %38, float %47, float %37)
  %49 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 3), align 4, !tbaa !11
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %class.Segment, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %3, align 4, !tbaa !9
  %53 = add i32 %52, 1
  %54 = zext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %54) #4
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds %class.ChainPoint, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 4, !tbaa !13
  %59 = sitofp i32 %58 to float
  %60 = call float @llvm.fmuladd.f32(float %49, float %59, float %48)
  %61 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 4), align 16, !tbaa !11
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.Segment, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = add i32 %64, 2
  %66 = zext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %66) #4
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.ChainPoint, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = sitofp i32 %70 to float
  %72 = call float @llvm.fmuladd.f32(float %61, float %71, float %60)
  %73 = call noundef float @_ZSt4rintf(float noundef %72)
  %74 = fptosi float %73 to i32
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %class.Segment, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #4
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.ChainPoint, ptr %80, i32 0, i32 0
  store i32 %74, ptr %81, align 4, !tbaa !13
  %82 = load float, ptr @_ZL2gs, align 16, !tbaa !11
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = getelementptr inbounds %class.Segment, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %3, align 4, !tbaa !9
  %86 = sub i32 %85, 2
  %87 = zext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %87) #4
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds %class.ChainPoint, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !15
  %92 = sitofp i32 %91 to float
  %93 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 1), align 4, !tbaa !11
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.Segment, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %3, align 4, !tbaa !9
  %97 = sub i32 %96, 1
  %98 = zext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %98) #4
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds %class.ChainPoint, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !15
  %103 = sitofp i32 %102 to float
  %104 = fmul float %93, %103
  %105 = call float @llvm.fmuladd.f32(float %82, float %92, float %104)
  %106 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 2), align 8, !tbaa !11
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %class.Segment, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %3, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %110) #4
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = getelementptr inbounds %class.ChainPoint, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !15
  %115 = sitofp i32 %114 to float
  %116 = call float @llvm.fmuladd.f32(float %106, float %115, float %105)
  %117 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 3), align 4, !tbaa !11
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %class.Segment, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %3, align 4, !tbaa !9
  %121 = add i32 %120, 1
  %122 = zext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %122) #4
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds %class.ChainPoint, ptr %124, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !15
  %127 = sitofp i32 %126 to float
  %128 = call float @llvm.fmuladd.f32(float %117, float %127, float %116)
  %129 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 4), align 16, !tbaa !11
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = getelementptr inbounds %class.Segment, ptr %130, i32 0, i32 0
  %132 = load i32, ptr %3, align 4, !tbaa !9
  %133 = add i32 %132, 2
  %134 = zext i32 %133 to i64
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %134) #4
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds %class.ChainPoint, ptr %136, i32 0, i32 1
  %138 = load i32, ptr %137, align 4, !tbaa !15
  %139 = sitofp i32 %138 to float
  %140 = call float @llvm.fmuladd.f32(float %129, float %139, float %128)
  %141 = call noundef float @_ZSt4rintf(float noundef %140)
  %142 = fptosi float %141 to i32
  %143 = load ptr, ptr %2, align 8, !tbaa !5
  %144 = getelementptr inbounds %class.Segment, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %3, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %146) #4
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = getelementptr inbounds %class.ChainPoint, ptr %148, i32 0, i32 1
  store i32 %142, ptr %149, align 4, !tbaa !15
  %150 = load float, ptr @_ZL2gs, align 16, !tbaa !11
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  %152 = getelementptr inbounds %class.Segment, ptr %151, i32 0, i32 0
  %153 = load i32, ptr %3, align 4, !tbaa !9
  %154 = sub i32 %153, 2
  %155 = zext i32 %154 to i64
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %155) #4
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = getelementptr inbounds %class.ChainPoint, ptr %157, i32 0, i32 3
  %159 = load float, ptr %158, align 4, !tbaa !16
  %160 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 1), align 4, !tbaa !11
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %class.Segment, ptr %161, i32 0, i32 0
  %163 = load i32, ptr %3, align 4, !tbaa !9
  %164 = sub i32 %163, 1
  %165 = zext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %165) #4
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = getelementptr inbounds %class.ChainPoint, ptr %167, i32 0, i32 3
  %169 = load float, ptr %168, align 4, !tbaa !16
  %170 = fmul float %160, %169
  %171 = call float @llvm.fmuladd.f32(float %150, float %159, float %170)
  %172 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 2), align 8, !tbaa !11
  %173 = load ptr, ptr %2, align 8, !tbaa !5
  %174 = getelementptr inbounds %class.Segment, ptr %173, i32 0, i32 0
  %175 = load i32, ptr %3, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %174, i64 noundef %176) #4
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  %179 = getelementptr inbounds %class.ChainPoint, ptr %178, i32 0, i32 3
  %180 = load float, ptr %179, align 4, !tbaa !16
  %181 = call float @llvm.fmuladd.f32(float %172, float %180, float %171)
  %182 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 3), align 4, !tbaa !11
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  %184 = getelementptr inbounds %class.Segment, ptr %183, i32 0, i32 0
  %185 = load i32, ptr %3, align 4, !tbaa !9
  %186 = add i32 %185, 1
  %187 = zext i32 %186 to i64
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %187) #4
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = getelementptr inbounds %class.ChainPoint, ptr %189, i32 0, i32 3
  %191 = load float, ptr %190, align 4, !tbaa !16
  %192 = call float @llvm.fmuladd.f32(float %182, float %191, float %181)
  %193 = load float, ptr getelementptr inbounds ([5 x float], ptr @_ZL2gs, i64 0, i64 4), align 16, !tbaa !11
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds %class.Segment, ptr %194, i32 0, i32 0
  %196 = load i32, ptr %3, align 4, !tbaa !9
  %197 = add i32 %196, 2
  %198 = zext i32 %197 to i64
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %198) #4
  %200 = load ptr, ptr %199, align 8, !tbaa !5
  %201 = getelementptr inbounds %class.ChainPoint, ptr %200, i32 0, i32 3
  %202 = load float, ptr %201, align 4, !tbaa !16
  %203 = call float @llvm.fmuladd.f32(float %193, float %202, float %192)
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %class.Segment, ptr %204, i32 0, i32 0
  %206 = load i32, ptr %3, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %205, i64 noundef %207) #4
  %209 = load ptr, ptr %208, align 8, !tbaa !5
  %210 = getelementptr inbounds %class.ChainPoint, ptr %209, i32 0, i32 3
  store float %203, ptr %210, align 4, !tbaa !16
  br label %211

211:                                              ; preds = %13
  %212 = load i32, ptr %3, align 4, !tbaa !9
  %213 = add i32 %212, 1
  store i32 %213, ptr %3, align 4, !tbaa !9
  br label %4, !llvm.loop !17

214:                                              ; preds = %12
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4rintf(float noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS10ChainPoint", !10, i64 0, !10, i64 4, !12, i64 8, !12, i64 12}
!15 = !{!14, !10, i64 4}
!16 = !{!14, !12, i64 12}
!17 = distinct !{!17, !18}
!18 = !{!"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"

@_ZL2gs = external hidden local_unnamed_addr constant [5 x float], align 16

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z13smoothSegmentP7Segment(ptr noundef nonnull %0) local_unnamed_addr #1 {
  %2 = tail call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #2
  %3 = add i64 %2, -5
  %4 = icmp ult i64 %3, -3
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %5 = load float, ptr @_ZL2gs, align 16, !tbaa !5
  %6 = load float, ptr getelementptr inbounds (i8, ptr @_ZL2gs, i64 4), align 4
  %7 = load float, ptr getelementptr inbounds (i8, ptr @_ZL2gs, i64 8), align 8
  %8 = load float, ptr getelementptr inbounds (i8, ptr @_ZL2gs, i64 12), align 4
  %9 = load float, ptr getelementptr inbounds (i8, ptr @_ZL2gs, i64 16), align 16
  br label %10

._crit_edge:                                      ; preds = %10, %1
  ret void

10:                                               ; preds = %.lr.ph, %10
  %11 = phi i64 [ 2, %.lr.ph ], [ %32, %10 ]
  %.039 = phi i32 [ 2, %.lr.ph ], [ %31, %10 ]
  %12 = add i32 %.039, -2
  %13 = zext i32 %12 to i64
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %13) #2
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = load i32, ptr %15, align 4, !tbaa !11
  %17 = sitofp i32 %16 to float
  %18 = add i32 %.039, -1
  %19 = zext i32 %18 to i64
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19) #2
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = sitofp i32 %22 to float
  %24 = fmul float %6, %23
  %25 = tail call float @llvm.fmuladd.f32(float %5, float %17, float %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11) #2
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = load i32, ptr %27, align 4, !tbaa !11
  %29 = sitofp i32 %28 to float
  %30 = tail call float @llvm.fmuladd.f32(float %7, float %29, float %25)
  %31 = add i32 %.039, 1
  %32 = zext i32 %31 to i64
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32) #2
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = sitofp i32 %35 to float
  %37 = tail call float @llvm.fmuladd.f32(float %8, float %36, float %30)
  %38 = add i32 %.039, 2
  %39 = zext i32 %38 to i64
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %39) #2
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = sitofp i32 %42 to float
  %44 = tail call float @llvm.fmuladd.f32(float %9, float %43, float %37)
  %45 = tail call noundef float @_ZSt4rintf(float noundef %44)
  %46 = fptosi float %45 to i32
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11) #2
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  store i32 %46, ptr %48, align 4, !tbaa !11
  %49 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %13) #2
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !14
  %53 = sitofp i32 %52 to float
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19) #2
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %55, i64 4
  %57 = load i32, ptr %56, align 4, !tbaa !14
  %58 = sitofp i32 %57 to float
  %59 = fmul float %6, %58
  %60 = tail call float @llvm.fmuladd.f32(float %5, float %53, float %59)
  %61 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11) #2
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 4
  %64 = load i32, ptr %63, align 4, !tbaa !14
  %65 = sitofp i32 %64 to float
  %66 = tail call float @llvm.fmuladd.f32(float %7, float %65, float %60)
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32) #2
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %68, i64 4
  %70 = load i32, ptr %69, align 4, !tbaa !14
  %71 = sitofp i32 %70 to float
  %72 = tail call float @llvm.fmuladd.f32(float %8, float %71, float %66)
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %39) #2
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %74, i64 4
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = sitofp i32 %76 to float
  %78 = tail call float @llvm.fmuladd.f32(float %9, float %77, float %72)
  %79 = tail call noundef float @_ZSt4rintf(float noundef %78)
  %80 = fptosi float %79 to i32
  %81 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11) #2
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = getelementptr inbounds i8, ptr %82, i64 4
  store i32 %80, ptr %83, align 4, !tbaa !14
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %13) #2
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %85, i64 12
  %87 = load float, ptr %86, align 4, !tbaa !15
  %88 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19) #2
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %89, i64 12
  %91 = load float, ptr %90, align 4, !tbaa !15
  %92 = fmul float %6, %91
  %93 = tail call float @llvm.fmuladd.f32(float %5, float %87, float %92)
  %94 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11) #2
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds i8, ptr %95, i64 12
  %97 = load float, ptr %96, align 4, !tbaa !15
  %98 = tail call float @llvm.fmuladd.f32(float %7, float %97, float %93)
  %99 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32) #2
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds i8, ptr %100, i64 12
  %102 = load float, ptr %101, align 4, !tbaa !15
  %103 = tail call float @llvm.fmuladd.f32(float %8, float %102, float %98)
  %104 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %39) #2
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds i8, ptr %105, i64 12
  %107 = load float, ptr %106, align 4, !tbaa !15
  %108 = tail call float @llvm.fmuladd.f32(float %9, float %107, float %103)
  %109 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11) #2
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds i8, ptr %110, i64 12
  store float %108, ptr %111, align 4, !tbaa !15
  %112 = tail call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #2
  %113 = add i64 %112, -2
  %114 = icmp ugt i64 %113, %32
  br i1 %114, label %10, label %._crit_edge, !llvm.loop !16
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS10ChainPoint", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !6, i64 12}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass