; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/DoubleConversion/src/double-conversion (fixed-dtoa)

; 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.double_conversion::Vector" = type <{ ptr, i32, [4 x i8] }>
%"class.double_conversion::Double" = type { i64 }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [135 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_ = external hidden unnamed_addr constant [79 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_(double noundef %0, i32 noundef %1, ptr %2, i32 %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca i1, align 1
  %8 = alloca %"class.double_conversion::Vector", align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"class.double_conversion::Double", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.double_conversion::Double", align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca %"class.double_conversion::Vector", align 8
  %26 = alloca %"class.double_conversion::Vector", align 8
  %27 = alloca %"class.double_conversion::Vector", align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca %"class.double_conversion::Vector", align 8
  %31 = alloca %"class.double_conversion::Vector", align 8
  %32 = alloca %"class.double_conversion::Vector", align 8
  %33 = alloca %"class.double_conversion::Vector", align 8
  %34 = alloca %"class.double_conversion::Vector", align 8
  %35 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  store ptr %2, ptr %35, align 8
  %36 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  store i32 %3, ptr %36, align 8
  store double %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 -1, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %37 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %15, double noundef %37)
  %38 = call noundef i64 @_ZNK17double_conversion6Double11SignificandEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  store i64 %38, ptr %14, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %39 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %17, double noundef %39)
  %40 = call noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  store i32 %40, ptr %16, align 4, !tbaa !9
  %41 = load i32, ptr %16, align 4, !tbaa !9
  %42 = icmp sgt i32 %41, 20
  br i1 %42, label %43, label %44

43:                                               ; preds = %6
  store i1 false, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %218

44:                                               ; preds = %6
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = icmp sgt i32 %45, 20
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  store i1 false, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %218

48:                                               ; preds = %44
  %49 = load ptr, ptr %11, align 8, !tbaa !11
  store i32 0, ptr %49, align 4, !tbaa !9
  %50 = load i32, ptr %16, align 4, !tbaa !9
  %51 = add nsw i32 %50, 53
  %52 = icmp sgt i32 %51, 64
  br i1 %52, label %53, label %108

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 762939453125, ptr %19, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 762939453125, ptr %20, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 17, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %54 = load i64, ptr %14, align 8, !tbaa !13
  store i64 %54, ptr %22, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %55 = load i32, ptr %16, align 4, !tbaa !9
  %56 = load i32, ptr %21, align 4, !tbaa !9
  %57 = icmp sgt i32 %55, %56
  br i1 %57, label %58, label %75

58:                                               ; preds = %53
  %59 = load i32, ptr %16, align 4, !tbaa !9
  %60 = load i32, ptr %21, align 4, !tbaa !9
  %61 = sub nsw i32 %59, %60
  %62 = load i64, ptr %22, align 8, !tbaa !13
  %63 = zext i32 %61 to i64
  %64 = shl i64 %62, %63
  store i64 %64, ptr %22, align 8, !tbaa !13
  %65 = load i64, ptr %22, align 8, !tbaa !13
  %66 = load i64, ptr %20, align 8, !tbaa !13
  %67 = udiv i64 %65, %66
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %23, align 4, !tbaa !9
  %69 = load i64, ptr %22, align 8, !tbaa !13
  %70 = load i64, ptr %20, align 8, !tbaa !13
  %71 = urem i64 %69, %70
  %72 = load i32, ptr %21, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = shl i64 %71, %73
  store i64 %74, ptr %24, align 8, !tbaa !13
  br label %92

75:                                               ; preds = %53
  %76 = load i32, ptr %21, align 4, !tbaa !9
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = sub nsw i32 %76, %77
  %79 = load i64, ptr %20, align 8, !tbaa !13
  %80 = zext i32 %78 to i64
  %81 = shl i64 %79, %80
  store i64 %81, ptr %20, align 8, !tbaa !13
  %82 = load i64, ptr %22, align 8, !tbaa !13
  %83 = load i64, ptr %20, align 8, !tbaa !13
  %84 = udiv i64 %82, %83
  %85 = trunc i64 %84 to i32
  store i32 %85, ptr %23, align 4, !tbaa !9
  %86 = load i64, ptr %22, align 8, !tbaa !13
  %87 = load i64, ptr %20, align 8, !tbaa !13
  %88 = urem i64 %86, %87
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = shl i64 %88, %90
  store i64 %91, ptr %24, align 8, !tbaa !13
  br label %92

92:                                               ; preds = %75, %58
  %93 = load i32, ptr %23, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %94 = load ptr, ptr %11, align 8, !tbaa !11
  %95 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8
  %97 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 1
  %98 = load i32, ptr %97, align 8
  call void @_ZN17double_conversionL12FillDigits32EjNS_6VectorIcEEPi(i32 noundef %93, ptr %96, i32 %98, ptr noundef %94)
  %99 = load i64, ptr %24, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %100 = load ptr, ptr %11, align 8, !tbaa !11
  %101 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  %103 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 1
  %104 = load i32, ptr %103, align 8
  call void @_ZN17double_conversionL23FillDigits64FixedLengthEmNS_6VectorIcEEPi(i64 noundef %99, ptr %102, i32 %104, ptr noundef %100)
  %105 = load ptr, ptr %11, align 8, !tbaa !11
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = load ptr, ptr %12, align 8, !tbaa !11
  store i32 %106, ptr %107, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %200

108:                                              ; preds = %48
  %109 = load i32, ptr %16, align 4, !tbaa !9
  %110 = icmp sge i32 %109, 0
  br i1 %110, label %111, label %125

111:                                              ; preds = %108
  %112 = load i32, ptr %16, align 4, !tbaa !9
  %113 = load i64, ptr %14, align 8, !tbaa !13
  %114 = zext i32 %112 to i64
  %115 = shl i64 %113, %114
  store i64 %115, ptr %14, align 8, !tbaa !13
  %116 = load i64, ptr %14, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %117 = load ptr, ptr %11, align 8, !tbaa !11
  %118 = getelementptr inbounds { ptr, i32 }, ptr %27, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8
  %120 = getelementptr inbounds { ptr, i32 }, ptr %27, i32 0, i32 1
  %121 = load i32, ptr %120, align 8
  call void @_ZN17double_conversionL12FillDigits64EmNS_6VectorIcEEPi(i64 noundef %116, ptr %119, i32 %121, ptr noundef %117)
  %122 = load ptr, ptr %11, align 8, !tbaa !11
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = load ptr, ptr %12, align 8, !tbaa !11
  store i32 %123, ptr %124, align 4, !tbaa !9
  br label %199

125:                                              ; preds = %108
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = icmp sgt i32 %126, -53
  br i1 %127, label %128, label %171

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %129 = load i64, ptr %14, align 8, !tbaa !13
  %130 = load i32, ptr %16, align 4, !tbaa !9
  %131 = sub nsw i32 0, %130
  %132 = zext i32 %131 to i64
  %133 = lshr i64 %129, %132
  store i64 %133, ptr %28, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %134 = load i64, ptr %14, align 8, !tbaa !13
  %135 = load i64, ptr %28, align 8, !tbaa !13
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = sub nsw i32 0, %136
  %138 = zext i32 %137 to i64
  %139 = shl i64 %135, %138
  %140 = sub i64 %134, %139
  store i64 %140, ptr %29, align 8, !tbaa !13
  %141 = load i64, ptr %28, align 8, !tbaa !13
  %142 = icmp ugt i64 %141, 4294967295
  br i1 %142, label %143, label %150

143:                                              ; preds = %128
  %144 = load i64, ptr %28, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %145 = load ptr, ptr %11, align 8, !tbaa !11
  %146 = getelementptr inbounds { ptr, i32 }, ptr %30, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8
  %148 = getelementptr inbounds { ptr, i32 }, ptr %30, i32 0, i32 1
  %149 = load i32, ptr %148, align 8
  call void @_ZN17double_conversionL12FillDigits64EmNS_6VectorIcEEPi(i64 noundef %144, ptr %147, i32 %149, ptr noundef %145)
  br label %158

150:                                              ; preds = %128
  %151 = load i64, ptr %28, align 8, !tbaa !13
  %152 = trunc i64 %151 to i32
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %153 = load ptr, ptr %11, align 8, !tbaa !11
  %154 = getelementptr inbounds { ptr, i32 }, ptr %31, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8
  %156 = getelementptr inbounds { ptr, i32 }, ptr %31, i32 0, i32 1
  %157 = load i32, ptr %156, align 8
  call void @_ZN17double_conversionL12FillDigits32EjNS_6VectorIcEEPi(i32 noundef %152, ptr %155, i32 %157, ptr noundef %153)
  br label %158

158:                                              ; preds = %150, %143
  %159 = load ptr, ptr %11, align 8, !tbaa !11
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = load ptr, ptr %12, align 8, !tbaa !11
  store i32 %160, ptr %161, align 4, !tbaa !9
  %162 = load i64, ptr %29, align 8, !tbaa !13
  %163 = load i32, ptr %16, align 4, !tbaa !9
  %164 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %165 = load ptr, ptr %11, align 8, !tbaa !11
  %166 = load ptr, ptr %12, align 8, !tbaa !11
  %167 = getelementptr inbounds { ptr, i32 }, ptr %32, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8
  %169 = getelementptr inbounds { ptr, i32 }, ptr %32, i32 0, i32 1
  %170 = load i32, ptr %169, align 8
  call void @_ZN17double_conversionL15FillFractionalsEmiiNS_6VectorIcEEPiS2_(i64 noundef %162, i32 noundef %163, i32 noundef %164, ptr %168, i32 %170, ptr noundef %165, ptr noundef %166)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %198

171:                                              ; preds = %125
  %172 = load i32, ptr %16, align 4, !tbaa !9
  %173 = icmp slt i32 %172, -128
  br i1 %173, label %174, label %186

174:                                              ; preds = %171
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = icmp sle i32 %175, 20
  br i1 %176, label %177, label %178

177:                                              ; preds = %174
  br label %180

178:                                              ; preds = %174
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 386, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_) #6
  unreachable

179:                                              ; No predecessors!
  br label %180

180:                                              ; preds = %179, %177
  %181 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %8, i32 noundef 0)
  store i8 0, ptr %181, align 1, !tbaa !16
  %182 = load ptr, ptr %11, align 8, !tbaa !11
  store i32 0, ptr %182, align 4, !tbaa !9
  %183 = load i32, ptr %10, align 4, !tbaa !9
  %184 = sub nsw i32 0, %183
  %185 = load ptr, ptr %12, align 8, !tbaa !11
  store i32 %184, ptr %185, align 4, !tbaa !9
  br label %197

186:                                              ; preds = %171
  %187 = load ptr, ptr %12, align 8, !tbaa !11
  store i32 0, ptr %187, align 4, !tbaa !9
  %188 = load i64, ptr %14, align 8, !tbaa !13
  %189 = load i32, ptr %16, align 4, !tbaa !9
  %190 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %191 = load ptr, ptr %11, align 8, !tbaa !11
  %192 = load ptr, ptr %12, align 8, !tbaa !11
  %193 = getelementptr inbounds { ptr, i32 }, ptr %33, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8
  %195 = getelementptr inbounds { ptr, i32 }, ptr %33, i32 0, i32 1
  %196 = load i32, ptr %195, align 8
  call void @_ZN17double_conversionL15FillFractionalsEmiiNS_6VectorIcEEPiS2_(i64 noundef %188, i32 noundef %189, i32 noundef %190, ptr %194, i32 %196, ptr noundef %191, ptr noundef %192)
  br label %197

197:                                              ; preds = %186, %180
  br label %198

198:                                              ; preds = %197, %158
  br label %199

199:                                              ; preds = %198, %111
  br label %200

200:                                              ; preds = %199, %92
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !15
  %201 = load ptr, ptr %11, align 8, !tbaa !11
  %202 = load ptr, ptr %12, align 8, !tbaa !11
  %203 = getelementptr inbounds { ptr, i32 }, ptr %34, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8
  %205 = getelementptr inbounds { ptr, i32 }, ptr %34, i32 0, i32 1
  %206 = load i32, ptr %205, align 8
  call void @_ZN17double_conversionL9TrimZerosENS_6VectorIcEEPiS2_(ptr %204, i32 %206, ptr noundef %201, ptr noundef %202)
  %207 = load ptr, ptr %11, align 8, !tbaa !11
  %208 = load i32, ptr %207, align 4, !tbaa !9
  %209 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %8, i32 noundef %208)
  store i8 0, ptr %209, align 1, !tbaa !16
  %210 = load ptr, ptr %11, align 8, !tbaa !11
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = icmp eq i32 %211, 0
  br i1 %212, label %213, label %217

213:                                              ; preds = %200
  %214 = load i32, ptr %10, align 4, !tbaa !9
  %215 = sub nsw i32 0, %214
  %216 = load ptr, ptr %12, align 8, !tbaa !11
  store i32 %215, ptr %216, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %213, %200
  store i1 true, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %218

218:                                              ; preds = %217, %47, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %219 = load i1, ptr %7, align 1
  ret i1 %219
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8), double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK17double_conversion6Double11SignificandEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL12FillDigits32EjNS_6VectorIcEEPi(i32 noundef, ptr, i32, ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL23FillDigits64FixedLengthEmNS_6VectorIcEEPi(i64 noundef, ptr, i32, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL12FillDigits64EmNS_6VectorIcEEPi(i64 noundef, ptr, i32, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL15FillFractionalsEmiiNS_6VectorIcEEPiS2_(i64 noundef, i32 noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL9TrimZerosENS_6VectorIcEEPiS2_(ptr, i32, ptr noundef, ptr noundef) #0

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 nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"double", !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 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i64 0, i64 8, !11, i64 8, i64 4, !9}
!16 = !{!7, !7, i64 0}


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

%"class.double_conversion::Vector" = type <{ ptr, i32, [4 x i8] }>
%"class.double_conversion::Double" = type { i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_(double noundef %0, i32 noundef %1, ptr %2, i32 %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca %"class.double_conversion::Vector", align 8
  %8 = alloca %"class.double_conversion::Double", align 8
  %9 = alloca %"class.double_conversion::Double", align 8
  store ptr %2, ptr %7, align 8
  %10 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %3, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %8, double noundef %0)
  %11 = call noundef i64 @_ZNK17double_conversion6Double11SignificandEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %0)
  %12 = call noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  %13 = icmp slt i32 %12, 21
  %14 = icmp slt i32 %1, 21
  %or.cond.not = and i1 %14, %13
  br i1 %or.cond.not, label %15, label %69

15:                                               ; preds = %6
  store i32 0, ptr %4, align 4, !tbaa !5
  %16 = icmp sgt i32 %12, 11
  br i1 %16, label %17, label %36

17:                                               ; preds = %15
  %18 = icmp ugt i32 %12, 17
  br i1 %18, label %19, label %26

19:                                               ; preds = %17
  %20 = add nsw i32 %12, -17
  %21 = zext nneg i32 %20 to i64
  %22 = shl i64 %11, %21
  %23 = udiv i64 %22, 762939453125
  %24 = urem i64 %22, 762939453125
  %25 = shl nuw nsw i64 %24, 17
  br label %34

26:                                               ; preds = %17
  %27 = sub nuw nsw i32 17, %12
  %28 = zext nneg i32 %27 to i64
  %29 = shl nuw nsw i64 762939453125, %28
  %30 = udiv i64 %11, %29
  %31 = urem i64 %11, %29
  %32 = zext nneg i32 %12 to i64
  %33 = shl nuw nsw i64 %31, %32
  br label %34

34:                                               ; preds = %26, %19
  %.095 = phi i64 [ %25, %19 ], [ %33, %26 ]
  %.094.in = phi i64 [ %23, %19 ], [ %30, %26 ]
  %.094 = trunc nuw nsw i64 %.094.in to i32
  call void @_ZN17double_conversionL12FillDigits32EjNS_6VectorIcEEPi(i32 noundef %.094, ptr %2, i32 %3, ptr noundef nonnull %4)
  %.sroa.020.0.copyload = load ptr, ptr %7, align 8, !tbaa !9
  %.sroa.221.0.copyload = load i32, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversionL23FillDigits64FixedLengthEmNS_6VectorIcEEPi(i64 noundef %.095, ptr %.sroa.020.0.copyload, i32 %.sroa.221.0.copyload, ptr noundef nonnull %4)
  %35 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %35, ptr %5, align 4, !tbaa !5
  br label %62

36:                                               ; preds = %15
  %37 = icmp sgt i32 %12, -1
  br i1 %37, label %38, label %42

38:                                               ; preds = %36
  %39 = zext nneg i32 %12 to i64
  %40 = shl i64 %11, %39
  call void @_ZN17double_conversionL12FillDigits64EmNS_6VectorIcEEPi(i64 noundef %40, ptr %2, i32 %3, ptr noundef nonnull %4)
  %41 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %41, ptr %5, align 4, !tbaa !5
  br label %62

42:                                               ; preds = %36
  %43 = icmp ugt i32 %12, -53
  br i1 %43, label %44, label %56

44:                                               ; preds = %42
  %45 = sub nsw i32 0, %12
  %46 = zext nneg i32 %45 to i64
  %47 = lshr i64 %11, %46
  %48 = shl i64 %47, %46
  %49 = sub i64 %11, %48
  %50 = icmp ugt i64 %47, 4294967295
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  call void @_ZN17double_conversionL12FillDigits64EmNS_6VectorIcEEPi(i64 noundef %47, ptr %2, i32 %3, ptr noundef nonnull %4)
  br label %54

52:                                               ; preds = %44
  %53 = trunc nuw i64 %47 to i32
  call void @_ZN17double_conversionL12FillDigits32EjNS_6VectorIcEEPi(i32 noundef %53, ptr %2, i32 %3, ptr noundef nonnull %4)
  br label %54

54:                                               ; preds = %52, %51
  %55 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %55, ptr %5, align 4, !tbaa !5
  %.sroa.04.0.copyload = load ptr, ptr %7, align 8, !tbaa !9
  %.sroa.25.0.copyload = load i32, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversionL15FillFractionalsEmiiNS_6VectorIcEEPiS2_(i64 noundef %49, i32 noundef %12, i32 noundef %1, ptr %.sroa.04.0.copyload, i32 %.sroa.25.0.copyload, ptr noundef nonnull %4, ptr noundef nonnull %5)
  br label %62

56:                                               ; preds = %42
  %57 = icmp ult i32 %12, -128
  br i1 %57, label %58, label %61

58:                                               ; preds = %56
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %7, i32 noundef 0)
  store i8 0, ptr %59, align 1, !tbaa !11
  store i32 0, ptr %4, align 4, !tbaa !5
  %60 = sub nsw i32 0, %1
  store i32 %60, ptr %5, align 4, !tbaa !5
  br label %62

61:                                               ; preds = %56
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @_ZN17double_conversionL15FillFractionalsEmiiNS_6VectorIcEEPiS2_(i64 noundef %11, i32 noundef %12, i32 noundef %1, ptr %2, i32 %3, ptr noundef nonnull %4, ptr noundef nonnull %5)
  br label %62

62:                                               ; preds = %38, %58, %61, %54, %34
  %.sroa.0.0.copyload = load ptr, ptr %7, align 8, !tbaa !9
  %.sroa.2.0.copyload = load i32, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversionL9TrimZerosENS_6VectorIcEEPiS2_(ptr %.sroa.0.0.copyload, i32 %.sroa.2.0.copyload, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %7, i32 noundef %63)
  store i8 0, ptr %64, align 1, !tbaa !11
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %62
  %68 = sub nsw i32 0, %1
  store i32 %68, ptr %5, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %62, %67, %6
  ret i1 %or.cond.not
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8), double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK17double_conversion6Double11SignificandEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL12FillDigits32EjNS_6VectorIcEEPi(i32 noundef, ptr, i32, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL23FillDigits64FixedLengthEmNS_6VectorIcEEPi(i64 noundef, ptr, i32, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL12FillDigits64EmNS_6VectorIcEEPi(i64 noundef, ptr, i32, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL15FillFractionalsEmiiNS_6VectorIcEEPiS2_(i64 noundef, i32 noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL9TrimZerosENS_6VectorIcEEPiS2_(ptr, i32, ptr noundef, ptr noundef) local_unnamed_addr #0

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 nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"int", !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 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass