; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/DoubleConversion/src/double-conversion (bignum-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 }
%"class.double_conversion::Single" = type { i32 }
%"class.double_conversion::Bignum" = type { i16, i16, [128 x i32] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [136 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_ = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %0, i32 noundef %1, i32 noundef %2, ptr %3, i32 %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca %"class.double_conversion::Vector", align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.double_conversion::Double", align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca float, align 4
  %19 = alloca %"class.double_conversion::Single", align 4
  %20 = alloca %"class.double_conversion::Single", align 4
  %21 = alloca %"class.double_conversion::Single", align 4
  %22 = alloca %"class.double_conversion::Double", align 8
  %23 = alloca %"class.double_conversion::Double", align 8
  %24 = alloca %"class.double_conversion::Double", align 8
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.double_conversion::Bignum", align 4
  %31 = alloca %"class.double_conversion::Bignum", align 4
  %32 = alloca %"class.double_conversion::Bignum", align 4
  %33 = alloca %"class.double_conversion::Bignum", align 4
  %34 = alloca %"class.double_conversion::Vector", align 8
  %35 = alloca %"class.double_conversion::Vector", align 8
  %36 = alloca %"class.double_conversion::Vector", align 8
  %37 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  store ptr %3, ptr %37, align 8
  %38 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  store i32 %4, ptr %38, align 8
  store double %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store i32 %2, ptr %11, align 4, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !13
  store ptr %6, ptr %13, align 8, !tbaa !13
  %39 = load double, ptr %9, align 8, !tbaa !5
  %40 = fcmp ogt double %39, 0.000000e+00
  br i1 %40, label %41, label %42

41:                                               ; preds = %7
  br label %44

42:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 91, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_) #5
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %45 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %14, double noundef %45)
  %46 = call noundef zeroext i1 @_ZNK17double_conversion6Double9IsSpecialEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %47 = xor i1 %46, true
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  br label %51

49:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 92, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_) #5
  unreachable

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %73

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %55 = load double, ptr %9, align 8, !tbaa !5
  %56 = fptrunc double %55 to float
  store float %56, ptr %18, align 4, !tbaa !15
  %57 = load float, ptr %18, align 4, !tbaa !15
  %58 = fpext float %57 to double
  %59 = load double, ptr %9, align 8, !tbaa !5
  %60 = fcmp oeq double %58, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %54
  br label %64

62:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 98, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_) #5
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %65 = load float, ptr %18, align 4, !tbaa !15
  call void @_ZN17double_conversion6SingleC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %19, float noundef %65)
  %66 = call noundef i32 @_ZNK17double_conversion6Single11SignificandEv(ptr noundef nonnull align 4 dereferenceable(4) %19)
  %67 = zext i32 %66 to i64
  store i64 %67, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %68 = load float, ptr %18, align 4, !tbaa !15
  call void @_ZN17double_conversion6SingleC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %20, float noundef %68)
  %69 = call noundef i32 @_ZNK17double_conversion6Single8ExponentEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i32 %69, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %70 = load float, ptr %18, align 4, !tbaa !15
  call void @_ZN17double_conversion6SingleC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %21, float noundef %70)
  %71 = call noundef zeroext i1 @_ZNK17double_conversion6Single21LowerBoundaryIsCloserEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
  %72 = zext i1 %71 to i8
  store i8 %72, ptr %17, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %81

73:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %74 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %22, double noundef %74)
  %75 = call noundef i64 @_ZNK17double_conversion6Double11SignificandEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
  store i64 %75, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %76 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %23, double noundef %76)
  %77 = call noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  store i32 %77, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %78 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %24, double noundef %78)
  %79 = call noundef zeroext i1 @_ZNK17double_conversion6Double21LowerBoundaryIsCloserEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %80 = zext i1 %79 to i8
  store i8 %80, ptr %17, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %81

81:                                               ; preds = %73, %64
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %87, label %84

84:                                               ; preds = %81
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = icmp eq i32 %85, 1
  br label %87

87:                                               ; preds = %84, %81
  %88 = phi i1 [ true, %81 ], [ %86, %84 ]
  %89 = zext i1 %88 to i8
  store i8 %89, ptr %25, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  %90 = load i64, ptr %15, align 8, !tbaa !17
  %91 = and i64 %90, 1
  %92 = icmp eq i64 %91, 0
  %93 = zext i1 %92 to i8
  store i8 %93, ptr %26, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %94 = load i64, ptr %15, align 8, !tbaa !17
  %95 = load i32, ptr %16, align 4, !tbaa !11
  %96 = call noundef i32 @_ZN17double_conversionL18NormalizedExponentEmi(i64 noundef %94, i32 noundef %95)
  store i32 %96, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %97 = load i32, ptr %27, align 4, !tbaa !11
  %98 = call noundef i32 @_ZN17double_conversionL13EstimatePowerEi(i32 noundef %97)
  store i32 %98, ptr %28, align 4, !tbaa !11
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = icmp eq i32 %99, 2
  br i1 %100, label %101, label %113

101:                                              ; preds = %87
  %102 = load i32, ptr %28, align 4, !tbaa !11
  %103 = sub nsw i32 0, %102
  %104 = sub nsw i32 %103, 1
  %105 = load i32, ptr %11, align 4, !tbaa !11
  %106 = icmp sgt i32 %104, %105
  br i1 %106, label %107, label %113

107:                                              ; preds = %101
  %108 = 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 %108, align 1, !tbaa !21
  %109 = load ptr, ptr %12, align 8, !tbaa !13
  store i32 0, ptr %109, align 4, !tbaa !11
  %110 = load i32, ptr %11, align 4, !tbaa !11
  %111 = sub nsw i32 0, %110
  %112 = load ptr, ptr %13, align 8, !tbaa !13
  store i32 %111, ptr %112, align 4, !tbaa !11
  store i32 1, ptr %29, align 4
  br label %151

113:                                              ; preds = %101, %87
  call void @llvm.lifetime.start.p0(i64 516, ptr %30) #6
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %30)
  call void @llvm.lifetime.start.p0(i64 516, ptr %31) #6
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %31)
  call void @llvm.lifetime.start.p0(i64 516, ptr %32) #6
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %32)
  call void @llvm.lifetime.start.p0(i64 516, ptr %33) #6
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %33)
  %114 = load i64, ptr %15, align 8, !tbaa !17
  %115 = load i32, ptr %16, align 4, !tbaa !11
  %116 = load i8, ptr %17, align 1, !tbaa !19, !range !22, !noundef !23
  %117 = trunc i8 %116 to i1
  %118 = load i32, ptr %28, align 4, !tbaa !11
  %119 = load i8, ptr %25, align 1, !tbaa !19, !range !22, !noundef !23
  %120 = trunc i8 %119 to i1
  call void @_ZN17double_conversionL24InitialScaledStartValuesEmibibPNS_6BignumES1_S1_S1_(i64 noundef %114, i32 noundef %115, i1 noundef zeroext %117, i32 noundef %118, i1 noundef zeroext %120, ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33)
  %121 = load i32, ptr %28, align 4, !tbaa !11
  %122 = load i8, ptr %26, align 1, !tbaa !19, !range !22, !noundef !23
  %123 = trunc i8 %122 to i1
  %124 = load ptr, ptr %13, align 8, !tbaa !13
  call void @_ZN17double_conversionL15FixupMultiply10EibPiPNS_6BignumES2_S2_S2_(i32 noundef %121, i1 noundef zeroext %123, ptr noundef %124, ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33)
  %125 = load i32, ptr %10, align 4, !tbaa !9
  switch i32 %125, label %146 [
    i32 0, label %126
    i32 1, label %126
    i32 2, label %130
    i32 3, label %138
  ]

126:                                              ; preds = %113, %113
  %127 = load i8, ptr %26, align 1, !tbaa !19, !range !22, !noundef !23
  %128 = trunc i8 %127 to i1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !24
  %129 = load ptr, ptr %12, align 8, !tbaa !13
  call void @_ZN17double_conversionL22GenerateShortestDigitsEPNS_6BignumES1_S1_S1_bNS_6VectorIcEEPi(ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33, i1 noundef zeroext %128, ptr noundef byval(%"class.double_conversion::Vector") align 8 %34, ptr noundef %129)
  br label %147

130:                                              ; preds = %113
  %131 = load i32, ptr %11, align 4, !tbaa !11
  %132 = load ptr, ptr %13, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !24
  %133 = load ptr, ptr %12, align 8, !tbaa !13
  %134 = getelementptr inbounds { ptr, i32 }, ptr %35, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i32 }, ptr %35, i32 0, i32 1
  %137 = load i32, ptr %136, align 8
  call void @_ZN17double_conversionL13BignumToFixedEiPiPNS_6BignumES2_NS_6VectorIcEES0_(i32 noundef %131, ptr noundef %132, ptr noundef %30, ptr noundef %31, ptr %135, i32 %137, ptr noundef %133)
  br label %147

138:                                              ; preds = %113
  %139 = load i32, ptr %11, align 4, !tbaa !11
  %140 = load ptr, ptr %13, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !24
  %141 = load ptr, ptr %12, align 8, !tbaa !13
  %142 = getelementptr inbounds { ptr, i32 }, ptr %36, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i32 }, ptr %36, i32 0, i32 1
  %145 = load i32, ptr %144, align 8
  call void @_ZN17double_conversionL21GenerateCountedDigitsEiPiPNS_6BignumES2_NS_6VectorIcEES0_(i32 noundef %139, ptr noundef %140, ptr noundef %30, ptr noundef %31, ptr %143, i32 %145, ptr noundef %141)
  br label %147

146:                                              ; preds = %113
  call void @abort() #5
  unreachable

147:                                              ; preds = %138, %130, %126
  %148 = load ptr, ptr %12, align 8, !tbaa !13
  %149 = load i32, ptr %148, align 4, !tbaa !11
  %150 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %8, i32 noundef %149)
  store i8 0, ptr %150, align 1, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 516, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 516, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 516, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 516, ptr %30) #6
  store i32 0, ptr %29, align 4
  br label %151

151:                                              ; preds = %147, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %152 = load i32, ptr %29, align 4
  switch i32 %152, label %154 [
    i32 0, label %153
    i32 1, label %153
  ]

153:                                              ; preds = %151, %151
  ret void

154:                                              ; preds = %151
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #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 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 zeroext i1 @_ZNK17double_conversion6Double9IsSpecialEv(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) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK17double_conversion6Single21LowerBoundaryIsCloserEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN17double_conversionL18NormalizedExponentEmi(i64 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN17double_conversionL13EstimatePowerEi(i32 noundef) #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL22GenerateShortestDigitsEPNS_6BignumES1_S1_S1_bNS_6VectorIcEEPi(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef byval(%"class.double_conversion::Vector") align 8, 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) #4

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

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

; Function Attrs: noreturn nounwind
declare void @abort() #1

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 = { 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 #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 = { noreturn nounwind }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN17double_conversion14BignumDtoaModeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{i64 0, i64 8, !13, i64 8, i64 4, !11}


; 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 }
%"class.double_conversion::Single" = type { i32 }
%"class.double_conversion::Bignum" = type { i16, i16, [128 x i32] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [136 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_ = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %0, i32 noundef %1, i32 noundef %2, ptr %3, i32 %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #0 {
  %8 = alloca %"class.double_conversion::Vector", align 8
  %9 = alloca %"class.double_conversion::Double", align 8
  %10 = alloca %"class.double_conversion::Single", align 4
  %11 = alloca %"class.double_conversion::Single", align 4
  %12 = alloca %"class.double_conversion::Single", align 4
  %13 = alloca %"class.double_conversion::Double", align 8
  %14 = alloca %"class.double_conversion::Double", align 8
  %15 = alloca %"class.double_conversion::Double", align 8
  %16 = alloca %"class.double_conversion::Bignum", align 4
  %17 = alloca %"class.double_conversion::Bignum", align 4
  %18 = alloca %"class.double_conversion::Bignum", align 4
  %19 = alloca %"class.double_conversion::Bignum", align 4
  store ptr %3, ptr %8, align 8
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  store i32 %4, ptr %20, align 8
  %21 = fcmp ogt double %0, 0.000000e+00
  br i1 %21, label %23, label %22

22:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 91, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_) #4
  unreachable

23:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %0)
  %24 = call noundef zeroext i1 @_ZNK17double_conversion6Double9IsSpecialEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  br i1 %24, label %25, label %26

25:                                               ; preds = %23
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 92, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_) #4
  unreachable

26:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %27 = icmp eq i32 %1, 1
  br i1 %27, label %28, label %38

28:                                               ; preds = %26
  %29 = fptrunc double %0 to float
  %30 = fpext float %29 to double
  %31 = fcmp oeq double %30, %0
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 98, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_) #4
  unreachable

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @_ZN17double_conversion6SingleC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %10, float noundef %29)
  %34 = call noundef i32 @_ZNK17double_conversion6Single11SignificandEv(ptr noundef nonnull align 4 dereferenceable(4) %10)
  %35 = zext i32 %34 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  call void @_ZN17double_conversion6SingleC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %11, float noundef %29)
  %36 = call noundef i32 @_ZNK17double_conversion6Single8ExponentEv(ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  call void @_ZN17double_conversion6SingleC2Ef(ptr noundef nonnull align 4 dereferenceable(4) %12, float noundef %29)
  %37 = call noundef zeroext i1 @_ZNK17double_conversion6Single21LowerBoundaryIsCloserEv(ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %42

38:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %13, double noundef %0)
  %39 = call noundef i64 @_ZNK17double_conversion6Double11SignificandEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %14, double noundef %0)
  %40 = call noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %15, double noundef %0)
  %41 = call noundef zeroext i1 @_ZNK17double_conversion6Double21LowerBoundaryIsCloserEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %42

42:                                               ; preds = %38, %33
  %.045.in = phi i1 [ %37, %33 ], [ %41, %38 ]
  %.044 = phi i32 [ %36, %33 ], [ %40, %38 ]
  %.0 = phi i64 [ %35, %33 ], [ %39, %38 ]
  %43 = and i64 %.0, 1
  %44 = icmp eq i64 %43, 0
  %45 = call noundef i32 @_ZN17double_conversionL18NormalizedExponentEmi(i64 noundef %.0, i32 noundef %.044)
  %46 = call noundef i32 @_ZN17double_conversionL13EstimatePowerEi(i32 noundef %45)
  %47 = icmp eq i32 %1, 2
  %48 = xor i32 %46, -1
  %49 = icmp sgt i32 %48, %2
  %or.cond = and i1 %47, %49
  br i1 %or.cond, label %50, label %53

50:                                               ; preds = %42
  %51 = 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 %51, align 1, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !8
  %52 = sub nsw i32 0, %2
  store i32 %52, ptr %6, align 4, !tbaa !8
  br label %62

53:                                               ; preds = %42
  %54 = icmp ult i32 %1, 2
  call void @llvm.lifetime.start.p0(i64 516, ptr nonnull %16) #5
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %16)
  call void @llvm.lifetime.start.p0(i64 516, ptr nonnull %17) #5
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %17)
  call void @llvm.lifetime.start.p0(i64 516, ptr nonnull %18) #5
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %18)
  call void @llvm.lifetime.start.p0(i64 516, ptr nonnull %19) #5
  call void @_ZN17double_conversion6BignumC2Ev(ptr noundef nonnull align 4 dereferenceable(516) %19)
  call void @_ZN17double_conversionL24InitialScaledStartValuesEmibibPNS_6BignumES1_S1_S1_(i64 noundef %.0, i32 noundef %.044, i1 noundef zeroext %.045.in, i32 noundef %46, i1 noundef zeroext %54, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19)
  call void @_ZN17double_conversionL15FixupMultiply10EibPiPNS_6BignumES2_S2_S2_(i32 noundef %46, i1 noundef zeroext %44, ptr noundef %6, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19)
  switch i32 %1, label %58 [
    i32 0, label %55
    i32 1, label %55
    i32 2, label %56
    i32 3, label %57
  ]

55:                                               ; preds = %53, %53
  call void @_ZN17double_conversionL22GenerateShortestDigitsEPNS_6BignumES1_S1_S1_bNS_6VectorIcEEPi(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, i1 noundef zeroext %44, ptr noundef nonnull byval(%"class.double_conversion::Vector") align 8 %8, ptr noundef %5)
  br label %59

56:                                               ; preds = %53
  %.sroa.01.0.copyload = load ptr, ptr %8, align 8, !tbaa !10
  %.sroa.22.0.copyload = load i32, ptr %20, align 8, !tbaa !8
  call void @_ZN17double_conversionL13BignumToFixedEiPiPNS_6BignumES2_NS_6VectorIcEES0_(i32 noundef %2, ptr noundef %6, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr %.sroa.01.0.copyload, i32 %.sroa.22.0.copyload, ptr noundef %5)
  br label %59

57:                                               ; preds = %53
  %.sroa.0.0.copyload = load ptr, ptr %8, align 8, !tbaa !10
  %.sroa.2.0.copyload = load i32, ptr %20, align 8, !tbaa !8
  call void @_ZN17double_conversionL21GenerateCountedDigitsEiPiPNS_6BignumES2_NS_6VectorIcEES0_(i32 noundef %2, ptr noundef %6, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr %.sroa.0.0.copyload, i32 %.sroa.2.0.copyload, ptr noundef %5)
  br label %59

58:                                               ; preds = %53
  call void @abort() #4
  unreachable

59:                                               ; preds = %57, %56, %55
  %60 = load i32, ptr %5, align 4, !tbaa !8
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %8, i32 noundef %60)
  store i8 0, ptr %61, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 516, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 516, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 516, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 516, ptr nonnull %16) #5
  br label %62

62:                                               ; preds = %59, %50
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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 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 zeroext i1 @_ZNK17double_conversion6Double9IsSpecialEv(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) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK17double_conversion6Single21LowerBoundaryIsCloserEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK17double_conversion6Double8ExponentEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN17double_conversionL18NormalizedExponentEmi(i64 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN17double_conversionL13EstimatePowerEi(i32 noundef) local_unnamed_addr #3

; 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 #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN17double_conversionL22GenerateShortestDigitsEPNS_6BignumES1_S1_S1_bNS_6VectorIcEEPi(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef byval(%"class.double_conversion::Vector") align 8, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #1

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 = { 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 #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 = { noreturn nounwind }
attributes #5 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass