; LLVM IR from zeux/meshoptimizer :: gltf/stream.ll (Z27prepareQuantizationPositionRKSt6vectorI4MeshSaIS0_EERK8Settings)

; 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.QuantizationPosition = type { [3 x float], float, i32, i8, float }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl" }
%"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl" = type { %"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.Bounds = type { %struct.Attr, %struct.Attr }
%struct.Attr = type { [4 x float] }
%struct.Settings = type { i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, float, float, i8, i8, i8, float, i32, i8, i8, i8, i8, i8, [4 x float], [4 x i32], [4 x i32], [4 x i32], i32, i8, i8, i8, i8, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [127 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z27prepareQuantizationPositionRKSt6vectorI4MeshSaIS0_EERK8Settings(ptr dead_on_unwind noalias writable sret(%struct.QuantizationPosition) align 4 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(148) %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %struct.Bounds, align 4
  %12 = alloca %struct.Bounds, align 4
  %13 = alloca i64, align 8
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i64, align 8
  %17 = alloca float, align 4
  store ptr %1, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %5, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 28, i1 false)
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.Settings, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 2
  store i32 %20, ptr %21, align 4, !tbaa !14
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Settings, ptr %22, i32 0, i32 4
  %24 = load i8, ptr %23, align 4, !tbaa !16, !range !17, !noundef !18
  %25 = trunc i8 %24 to i1
  %26 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 3
  %27 = zext i1 %25 to i8
  store i8 %27, ptr %26, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  call void @_ZNSaI6BoundsEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt6vectorI6BoundsSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %29, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %30 unwind label %37

30:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorI6BoundsED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !20
  br label %31

31:                                               ; preds = %48, %30
  %32 = load i64, ptr %10, align 8, !tbaa !20
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  %35 = icmp ult i64 %32, %34
  br i1 %35, label %41, label %36

36:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %55

37:                                               ; preds = %3
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %8, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %9, align 4
  call void @_ZNSt15__new_allocatorI6BoundsED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  br label %194

41:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = load i64, ptr %10, align 8, !tbaa !20
  %44 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNKSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %43) #7
  invoke void @_ZL13computeBoundsRK4Mesh20cgltf_attribute_type(ptr dead_on_unwind writable sret(%struct.Bounds) align 4 %11, ptr noundef nonnull align 8 dereferenceable(256) %44, i32 noundef 1)
          to label %45 unwind label %51

45:                                               ; preds = %41
  %46 = load i64, ptr %10, align 8, !tbaa !20
  %47 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %46) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %11, i64 32, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %48

48:                                               ; preds = %45
  %49 = load i64, ptr %10, align 8, !tbaa !20
  %50 = add i64 %49, 1
  store i64 %50, ptr %10, align 8, !tbaa !20
  br label %31, !llvm.loop !24

51:                                               ; preds = %41
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %8, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %193

55:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  invoke void @_ZN6BoundsC2Ev(ptr noundef nonnull align 4 dereferenceable(32) %12)
          to label %56 unwind label %63

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !20
  br label %57

57:                                               ; preds = %71, %56
  %58 = load i64, ptr %13, align 8, !tbaa !20
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #7
  %61 = icmp ult i64 %58, %60
  br i1 %61, label %67, label %62

62:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %78

63:                                               ; preds = %103, %81, %78, %55
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %8, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %9, align 4
  br label %192

67:                                               ; preds = %57
  %68 = load i64, ptr %13, align 8, !tbaa !20
  %69 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %68) #7
  invoke void @_ZN6Bounds5mergeERKS_(ptr noundef nonnull align 4 dereferenceable(32) %12, ptr noundef nonnull align 4 dereferenceable(32) %69)
          to label %70 unwind label %74

70:                                               ; preds = %67
  br label %71

71:                                               ; preds = %70
  %72 = load i64, ptr %13, align 8, !tbaa !20
  %73 = add i64 %72, 1
  store i64 %73, ptr %13, align 8, !tbaa !20
  br label %57, !llvm.loop !26

74:                                               ; preds = %67
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %8, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %192

78:                                               ; preds = %62
  %79 = invoke noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32) %12)
          to label %80 unwind label %63

80:                                               ; preds = %78
  br i1 %79, label %81, label %103

81:                                               ; preds = %80
  %82 = getelementptr inbounds %struct.Bounds, ptr %12, i32 0, i32 0
  %83 = getelementptr inbounds %struct.Attr, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds [4 x float], ptr %83, i64 0, i64 0
  %85 = load float, ptr %84, align 4, !tbaa !27
  %86 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 0
  %87 = getelementptr inbounds [3 x float], ptr %86, i64 0, i64 0
  store float %85, ptr %87, align 4, !tbaa !27
  %88 = getelementptr inbounds %struct.Bounds, ptr %12, i32 0, i32 0
  %89 = getelementptr inbounds %struct.Attr, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds [4 x float], ptr %89, i64 0, i64 1
  %91 = load float, ptr %90, align 4, !tbaa !27
  %92 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 0
  %93 = getelementptr inbounds [3 x float], ptr %92, i64 0, i64 1
  store float %91, ptr %93, align 4, !tbaa !27
  %94 = getelementptr inbounds %struct.Bounds, ptr %12, i32 0, i32 0
  %95 = getelementptr inbounds %struct.Attr, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds [4 x float], ptr %95, i64 0, i64 2
  %97 = load float, ptr %96, align 4, !tbaa !27
  %98 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 0
  %99 = getelementptr inbounds [3 x float], ptr %98, i64 0, i64 2
  store float %97, ptr %99, align 4, !tbaa !27
  %100 = invoke noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32) %12)
          to label %101 unwind label %63

101:                                              ; preds = %81
  %102 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 1
  store float %100, ptr %102, align 4, !tbaa !28
  br label %103

103:                                              ; preds = %101, %80
  %104 = invoke noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32) %12)
          to label %105 unwind label %63

105:                                              ; preds = %103
  br i1 %104, label %106, label %176

106:                                              ; preds = %105
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.Settings, ptr %107, i32 0, i32 37
  %109 = load i8, ptr %108, align 4, !tbaa !29, !range !17, !noundef !18
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %176

111:                                              ; preds = %106
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.Settings, ptr %112, i32 0, i32 5
  %114 = load i8, ptr %113, align 1, !tbaa !30, !range !17, !noundef !18
  %115 = trunc i8 %114 to i1
  br i1 %115, label %176, label %116

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %117 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 1
  %118 = load float, ptr %117, align 4, !tbaa !28
  %119 = fmul float %118, 5.000000e-01
  %120 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 2
  %121 = load i32, ptr %120, align 4, !tbaa !14
  %122 = sub nsw i32 %121, 1
  %123 = shl i32 1, %122
  %124 = sitofp i32 %123 to float
  %125 = fdiv float %119, %124
  store float %125, ptr %14, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store float 0.000000e+00, ptr %15, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !20
  br label %126

126:                                              ; preds = %162, %116
  %127 = load i64, ptr %16, align 8, !tbaa !20
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #7
  %130 = icmp ult i64 %127, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %166

132:                                              ; preds = %126
  %133 = load i64, ptr %16, align 8, !tbaa !20
  %134 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %133) #7
  %135 = invoke noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32) %134)
          to label %136 unwind label %153

136:                                              ; preds = %132
  br i1 %135, label %137, label %161

137:                                              ; preds = %136
  %138 = load i64, ptr %16, align 8, !tbaa !20
  %139 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %138) #7
  %140 = invoke noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32) %139)
          to label %141 unwind label %153

141:                                              ; preds = %137
  %142 = fcmp ogt float %140, 0x3F847AE140000000
  br i1 %142, label %143, label %161

143:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %144 = load float, ptr %14, align 4, !tbaa !27
  %145 = load i64, ptr %16, align 8, !tbaa !20
  %146 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %145) #7
  %147 = invoke noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32) %146)
          to label %148 unwind label %157

148:                                              ; preds = %143
  %149 = fdiv float %144, %147
  store float %149, ptr %17, align 4, !tbaa !27
  %150 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %151 unwind label %157

151:                                              ; preds = %148
  %152 = load float, ptr %150, align 4, !tbaa !27
  store float %152, ptr %15, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %161

153:                                              ; preds = %137, %132
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %8, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %9, align 4
  br label %165

157:                                              ; preds = %148, %143
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %8, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %165

161:                                              ; preds = %151, %141, %136
  br label %162

162:                                              ; preds = %161
  %163 = load i64, ptr %16, align 8, !tbaa !20
  %164 = add i64 %163, 1
  store i64 %164, ptr %16, align 8, !tbaa !20
  br label %126, !llvm.loop !31

165:                                              ; preds = %157, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %192

166:                                              ; preds = %131
  %167 = load float, ptr %15, align 4, !tbaa !27
  %168 = fcmp ogt float %167, 0x3FA99999A0000000
  br i1 %168, label %169, label %175

169:                                              ; preds = %166
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  %171 = load float, ptr %15, align 4, !tbaa !27
  %172 = fmul float %171, 1.000000e+02
  %173 = fpext float %172 to double
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str, double noundef %173) #7
  br label %175

175:                                              ; preds = %169, %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %176

176:                                              ; preds = %175, %111, %106, %105
  %177 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 1
  %178 = load float, ptr %177, align 4, !tbaa !28
  %179 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 2
  %180 = load i32, ptr %179, align 4, !tbaa !14
  %181 = shl i32 1, %180
  %182 = sub nsw i32 %181, 1
  %183 = sitofp i32 %182 to float
  %184 = fdiv float %178, %183
  %185 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 3
  %186 = load i8, ptr %185, align 4, !tbaa !19, !range !17, !noundef !18
  %187 = trunc i8 %186 to i1
  %188 = zext i1 %187 to i64
  %189 = select i1 %187, float 6.553500e+04, float 1.000000e+00
  %190 = fmul float %184, %189
  %191 = getelementptr inbounds %struct.QuantizationPosition, ptr %0, i32 0, i32 4
  store float %190, ptr %191, align 4, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZNSt6vectorI6BoundsSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  ret void

192:                                              ; preds = %165, %74, %63
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  br label %193

193:                                              ; preds = %192, %51
  call void @_ZNSt6vectorI6BoundsSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %194

194:                                              ; preds = %193, %37
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %8, align 8
  %197 = load i32, ptr %9, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI6BoundsEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6BoundsSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13computeBoundsRK4Mesh20cgltf_attribute_type(ptr dead_on_unwind noalias writable sret(%struct.Bounds) align 4, ptr noundef nonnull align 8 dereferenceable(256), i32 noundef) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6BoundsC2Ev(ptr noundef nonnull align 4 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Bounds5mergeERKS_(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI6BoundsSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6BoundsED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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, !11, i64 0}
!10 = !{!"_ZTS8Settings", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 17, !12, i64 18, !12, i64 19, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !12, i64 36, !12, i64 37, !12, i64 38, !12, i64 39, !12, i64 40, !12, i64 41, !12, i64 42, !12, i64 43, !13, i64 44, !13, i64 48, !12, i64 52, !12, i64 53, !12, i64 54, !13, i64 56, !11, i64 60, !12, i64 64, !12, i64 65, !12, i64 66, !12, i64 67, !12, i64 68, !7, i64 72, !7, i64 88, !7, i64 104, !7, i64 120, !11, i64 136, !12, i64 140, !12, i64 141, !12, i64 142, !12, i64 143, !11, i64 144}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !11, i64 16}
!15 = !{!"_ZTS20QuantizationPosition", !7, i64 0, !13, i64 12, !11, i64 16, !12, i64 20, !13, i64 24}
!16 = !{!10, !12, i64 16}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!15, !12, i64 20}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{i64 0, i64 16, !23, i64 16, i64 16, !23}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!13, !13, i64 0}
!28 = !{!15, !13, i64 12}
!29 = !{!10, !12, i64 140}
!30 = !{!10, !12, i64 17}
!31 = distinct !{!31, !25}
!32 = !{!15, !13, i64 24}


; 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.QuantizationPosition = type { [3 x float], float, i32, i8, float }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl" }
%"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl" = type { %"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Bounds, std::allocator<Bounds>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.Bounds = type { %struct.Attr, %struct.Attr }
%struct.Attr = type { [4 x float] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [127 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z27prepareQuantizationPositionRKSt6vectorI4MeshSaIS0_EERK8Settings(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.QuantizationPosition) align 4 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(148) %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %struct.Bounds, align 4
  %7 = alloca %struct.Bounds, align 8
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %0, i8 0, i64 28, i1 false)
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %10, ptr %11, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %2, i64 16
  %13 = load i8, ptr %12, align 4, !tbaa !14, !range !15, !noundef !16
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  store i8 %13, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %15 = tail call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaI6BoundsEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorI6BoundsSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %16 unwind label %19

16:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorI6BoundsED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  %17 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %22, %16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_ZN6BoundsC2Ev(ptr noundef nonnull align 4 dereferenceable(32) %7)
  %18 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %.not46 = icmp eq i64 %18, 0
  br i1 %.not46, label %._crit_edge41, label %.lr.ph40

19:                                               ; preds = %3
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6BoundsED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %104

.lr.ph:                                           ; preds = %16, %22
  %.02537 = phi i64 [ %24, %22 ], [ 0, %16 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %21 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNKSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02537) #7
  invoke void @_ZL13computeBoundsRK4Mesh20cgltf_attribute_type(ptr dead_on_unwind nonnull writable sret(%struct.Bounds) align 4 %6, ptr noundef nonnull align 8 dereferenceable(256) %21, i32 noundef 1)
          to label %22 unwind label %27

22:                                               ; preds = %.lr.ph
  %23 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.02537) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %23, ptr noundef nonnull align 4 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  %24 = add nuw i64 %.02537, 1
  %25 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !20

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %103

._crit_edge41:                                    ; preds = %33, %._crit_edge
  %29 = call noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32) %7)
  br i1 %29, label %39, label %47

30:                                               ; preds = %39
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %102

.lr.ph40:                                         ; preds = %._crit_edge, %33
  %.02438 = phi i64 [ %34, %33 ], [ 0, %._crit_edge ]
  %32 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.02438) #7
  invoke void @_ZN6Bounds5mergeERKS_(ptr noundef nonnull align 4 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(32) %32)
          to label %33 unwind label %37

33:                                               ; preds = %.lr.ph40
  %34 = add nuw i64 %.02438, 1
  %35 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %.lr.ph40, label %._crit_edge41, !llvm.loop !22

37:                                               ; preds = %.lr.ph40
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %102

39:                                               ; preds = %._crit_edge41
  %40 = load <2 x float>, ptr %7, align 8, !tbaa !23
  store <2 x float> %40, ptr %0, align 4, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %7, i64 8
  %42 = load float, ptr %41, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  store float %42, ptr %43, align 4, !tbaa !23
  %44 = invoke noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32) %7)
          to label %45 unwind label %30

45:                                               ; preds = %39
  %46 = getelementptr inbounds i8, ptr %0, i64 12
  store float %44, ptr %46, align 4, !tbaa !24
  br label %47

47:                                               ; preds = %45, %._crit_edge41
  %48 = phi float [ %44, %45 ], [ 0.000000e+00, %._crit_edge41 ]
  %49 = call noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32) %7)
  br i1 %49, label %50, label %94

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %2, i64 140
  %52 = load i8, ptr %51, align 4, !tbaa !25, !range !15, !noundef !16
  %53 = trunc nuw i8 %52 to i1
  br i1 %53, label %54, label %94

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %2, i64 17
  %56 = load i8, ptr %55, align 1, !tbaa !26, !range !15, !noundef !16
  %57 = trunc nuw i8 %56 to i1
  br i1 %57, label %94, label %58

58:                                               ; preds = %54
  %59 = fmul float %48, 5.000000e-01
  %60 = add nsw i32 %10, -1
  %61 = shl nuw i32 1, %60
  %62 = sitofp i32 %61 to float
  %63 = fdiv float %59, %62
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store float 0.000000e+00, ptr %8, align 4, !tbaa !23
  %64 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %.not47 = icmp eq i64 %64, 0
  br i1 %.not47, label %._crit_edge45.thread, label %.lr.ph44

._crit_edge45:                                    ; preds = %84
  %.pre = load float, ptr %8, align 4, !tbaa !23
  %65 = fcmp ogt float %.pre, 0x3FA99999A0000000
  br i1 %65, label %89, label %._crit_edge45.thread

.lr.ph44:                                         ; preds = %58, %84
  %.042 = phi i64 [ %85, %84 ], [ 0, %58 ]
  %66 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.042) #7
  %67 = call noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32) %66)
  br i1 %67, label %68, label %84

68:                                               ; preds = %.lr.ph44
  %69 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.042) #7
  %70 = invoke noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32) %69)
          to label %71 unwind label %80

71:                                               ; preds = %68
  %72 = fcmp ogt float %70, 0x3F847AE140000000
  br i1 %72, label %73, label %84

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %74 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNSt6vectorI6BoundsSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.042) #7
  %75 = invoke noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32) %74)
          to label %76 unwind label %82

76:                                               ; preds = %73
  %77 = fdiv float %63, %75
  store float %77, ptr %9, align 4, !tbaa !23
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %79 = load float, ptr %78, align 4, !tbaa !23
  store float %79, ptr %8, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %84

80:                                               ; preds = %68
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %88

82:                                               ; preds = %73
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %88

84:                                               ; preds = %.lr.ph44, %71, %76
  %85 = add nuw i64 %.042, 1
  %86 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %87 = icmp ult i64 %85, %86
  br i1 %87, label %.lr.ph44, label %._crit_edge45, !llvm.loop !27

88:                                               ; preds = %82, %80
  %.pn = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %102

89:                                               ; preds = %._crit_edge45
  %90 = load ptr, ptr @stderr, align 8, !tbaa !28
  %91 = fmul float %.pre, 1.000000e+02
  %92 = fpext float %91 to double
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef nonnull @.str, double noundef %92) #8
  br label %._crit_edge45.thread

._crit_edge45.thread:                             ; preds = %58, %89, %._crit_edge45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %94

94:                                               ; preds = %._crit_edge45.thread, %54, %50, %47
  %notmask = shl nsw i32 -1, %10
  %95 = xor i32 %notmask, -1
  %96 = uitofp nneg i32 %95 to float
  %97 = fdiv float %48, %96
  %98 = trunc nuw i8 %13 to i1
  %99 = select i1 %98, float 6.553500e+04, float 1.000000e+00
  %100 = fmul float %99, %97
  %101 = getelementptr inbounds i8, ptr %0, i64 24
  store float %100, ptr %101, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt6vectorI6BoundsSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  ret void

102:                                              ; preds = %88, %37, %30
  %.pn32 = phi { ptr, i32 } [ %38, %37 ], [ %.pn, %88 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %103

103:                                              ; preds = %102, %27
  %.pn34 = phi { ptr, i32 } [ %28, %27 ], [ %.pn32, %102 ]
  call void @_ZNSt6vectorI6BoundsSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %104

104:                                              ; preds = %103, %19
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %103 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn34.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI6BoundsEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6BoundsSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13computeBoundsRK4Mesh20cgltf_attribute_type(ptr dead_on_unwind noalias writable sret(%struct.Bounds) align 4, ptr noundef nonnull align 8 dereferenceable(256), i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6BoundsC2Ev(ptr noundef nonnull align 4 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Bounds5mergeERKS_(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6Bounds7isValidEv(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK6Bounds9getExtentEv(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI6BoundsSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6BoundsED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { cold 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, !7, i64 0}
!6 = !{!"_ZTS8Settings", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 17, !10, i64 18, !10, i64 19, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !10, i64 36, !10, i64 37, !10, i64 38, !10, i64 39, !10, i64 40, !10, i64 41, !10, i64 42, !10, i64 43, !11, i64 44, !11, i64 48, !10, i64 52, !10, i64 53, !10, i64 54, !11, i64 56, !7, i64 60, !10, i64 64, !10, i64 65, !10, i64 66, !10, i64 67, !10, i64 68, !8, i64 72, !8, i64 88, !8, i64 104, !8, i64 120, !7, i64 136, !10, i64 140, !10, i64 141, !10, i64 142, !10, i64 143, !7, i64 144}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !7, i64 16}
!13 = !{!"_ZTS20QuantizationPosition", !8, i64 0, !11, i64 12, !7, i64 16, !10, i64 20, !11, i64 24}
!14 = !{!6, !10, i64 16}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!13, !10, i64 20}
!18 = !{i64 0, i64 16, !19, i64 16, i64 16, !19}
!19 = !{!8, !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!11, !11, i64 0}
!24 = !{!13, !11, i64 12}
!25 = !{!6, !10, i64 140}
!26 = !{!6, !10, i64 17}
!27 = distinct !{!27, !21}
!28 = !{!29, !29, i64 0}
!29 = !{!"any pointer", !8, i64 0}
!30 = !{!13, !11, i64 24}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass