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

; 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.3 = external hidden unnamed_addr constant [141 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_ = external hidden unnamed_addr constant [128 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [69 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_(double noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #1 align 2 {
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.double_conversion::Vector", align 8
  %18 = alloca %"class.double_conversion::Double", align 8
  %19 = alloca %"class.double_conversion::Double", align 8
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca %"class.double_conversion::Vector", align 8
  %23 = alloca %"class.double_conversion::Vector", align 8
  %24 = alloca %"class.double_conversion::Vector", align 8
  %25 = alloca %"class.double_conversion::Vector", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.double_conversion::Vector", 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 %3, ptr %12, align 8, !tbaa !13
  store i32 %4, ptr %13, align 4, !tbaa !11
  store ptr %5, ptr %14, align 8, !tbaa !13
  store ptr %6, ptr %15, align 8, !tbaa !13
  store ptr %7, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %28 = load ptr, ptr %12, align 8, !tbaa !13
  %29 = load i32, ptr %13, align 4, !tbaa !11
  call void @_ZN17double_conversion6VectorIcEC2EPci(ptr noundef nonnull align 8 dereferenceable(12) %17, ptr noundef %28, i32 noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %30 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %18, double noundef %30)
  %31 = call noundef zeroext i1 @_ZNK17double_conversion6Double9IsSpecialEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  %32 = xor i1 %31, true
  br i1 %32, label %33, label %34

33:                                               ; preds = %8
  br label %36

34:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.3, i32 noundef 395, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_) #7
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %45, label %39

39:                                               ; preds = %36
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %45, label %42

42:                                               ; preds = %39
  %43 = load i32, ptr %11, align 4, !tbaa !11
  %44 = icmp sge i32 %43, 0
  br label %45

45:                                               ; preds = %42, %39, %36
  %46 = phi i1 [ true, %39 ], [ true, %36 ], [ %44, %42 ]
  br i1 %46, label %47, label %48

47:                                               ; preds = %45
  br label %50

48:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.3, i32 noundef 396, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_) #7
  unreachable

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49, %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %51 = load double, ptr %9, align 8, !tbaa !5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %19, double noundef %51)
  %52 = call noundef i32 @_ZNK17double_conversion6Double4SignEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %53 = icmp slt i32 %52, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br i1 %53, label %54, label %58

54:                                               ; preds = %50
  %55 = load ptr, ptr %14, align 8, !tbaa !13
  store i8 1, ptr %55, align 1, !tbaa !15
  %56 = load double, ptr %9, align 8, !tbaa !5
  %57 = fneg double %56
  store double %57, ptr %9, align 8, !tbaa !5
  br label %60

58:                                               ; preds = %50
  %59 = load ptr, ptr %14, align 8, !tbaa !13
  store i8 0, ptr %59, align 1, !tbaa !15
  br label %60

60:                                               ; preds = %58, %54
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = icmp eq i32 %61, 3
  br i1 %62, label %63, label %69

63:                                               ; preds = %60
  %64 = load i32, ptr %11, align 4, !tbaa !11
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %63
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %17, i32 noundef 0)
  store i8 0, ptr %67, align 1, !tbaa !17
  %68 = load ptr, ptr %15, align 8, !tbaa !13
  store i32 0, ptr %68, align 4, !tbaa !11
  store i32 1, ptr %20, align 4
  br label %142

69:                                               ; preds = %63, %60
  %70 = load double, ptr %9, align 8, !tbaa !5
  %71 = fcmp oeq double %70, 0.000000e+00
  br i1 %71, label %72, label %77

72:                                               ; preds = %69
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %17, i32 noundef 0)
  store i8 48, ptr %73, align 1, !tbaa !17
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %17, i32 noundef 1)
  store i8 0, ptr %74, align 1, !tbaa !17
  %75 = load ptr, ptr %15, align 8, !tbaa !13
  store i32 1, ptr %75, align 4, !tbaa !11
  %76 = load ptr, ptr %16, align 8, !tbaa !13
  store i32 1, ptr %76, align 4, !tbaa !11
  store i32 1, ptr %20, align 4
  br label %142

77:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %78 = load i32, ptr %10, align 4, !tbaa !9
  switch i32 %78, label %121 [
    i32 0, label %79
    i32 1, label %89
    i32 2, label %99
    i32 3, label %110
  ]

79:                                               ; preds = %77
  %80 = load double, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !18
  %81 = load ptr, ptr %15, align 8, !tbaa !13
  %82 = load ptr, ptr %16, align 8, !tbaa !13
  %83 = getelementptr inbounds { ptr, i32 }, ptr %22, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8
  %85 = getelementptr inbounds { ptr, i32 }, ptr %22, i32 0, i32 1
  %86 = load i32, ptr %85, align 8
  %87 = call noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %80, i32 noundef 0, i32 noundef 0, ptr %84, i32 %86, ptr noundef %81, ptr noundef %82)
  %88 = zext i1 %87 to i8
  store i8 %88, ptr %21, align 1, !tbaa !15
  br label %122

89:                                               ; preds = %77
  %90 = load double, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !18
  %91 = load ptr, ptr %15, align 8, !tbaa !13
  %92 = load ptr, ptr %16, align 8, !tbaa !13
  %93 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8
  %95 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 1
  %96 = load i32, ptr %95, align 8
  %97 = call noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %90, i32 noundef 1, i32 noundef 0, ptr %94, i32 %96, ptr noundef %91, ptr noundef %92)
  %98 = zext i1 %97 to i8
  store i8 %98, ptr %21, align 1, !tbaa !15
  br label %122

99:                                               ; preds = %77
  %100 = load double, ptr %9, align 8, !tbaa !5
  %101 = load i32, ptr %11, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !18
  %102 = load ptr, ptr %15, align 8, !tbaa !13
  %103 = load ptr, ptr %16, align 8, !tbaa !13
  %104 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8
  %106 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 1
  %107 = load i32, ptr %106, align 8
  %108 = call noundef zeroext i1 @_ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_(double noundef %100, i32 noundef %101, ptr %105, i32 %107, ptr noundef %102, ptr noundef %103)
  %109 = zext i1 %108 to i8
  store i8 %109, ptr %21, align 1, !tbaa !15
  br label %122

110:                                              ; preds = %77
  %111 = load double, ptr %9, align 8, !tbaa !5
  %112 = load i32, ptr %11, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !18
  %113 = load ptr, ptr %15, align 8, !tbaa !13
  %114 = load ptr, ptr %16, align 8, !tbaa !13
  %115 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8
  %117 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 1
  %118 = load i32, ptr %117, align 8
  %119 = call noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %111, i32 noundef 2, i32 noundef %112, ptr %116, i32 %118, ptr noundef %113, ptr noundef %114)
  %120 = zext i1 %119 to i8
  store i8 %120, ptr %21, align 1, !tbaa !15
  br label %122

121:                                              ; preds = %77
  store i8 0, ptr %21, align 1, !tbaa !15
  call void @abort() #7
  unreachable

122:                                              ; preds = %110, %99, %89, %79
  %123 = load i8, ptr %21, align 1, !tbaa !15, !range !19, !noundef !20
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %126

125:                                              ; preds = %122
  store i32 1, ptr %20, align 4
  br label %141

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %127 = load i32, ptr %10, align 4, !tbaa !9
  %128 = call noundef i32 @_ZN17double_conversionL20DtoaToBignumDtoaModeENS_23DoubleToStringConverter8DtoaModeE(i32 noundef %127)
  store i32 %128, ptr %26, align 4, !tbaa !21
  %129 = load double, ptr %9, align 8, !tbaa !5
  %130 = load i32, ptr %26, align 4, !tbaa !21
  %131 = load i32, ptr %11, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !18
  %132 = load ptr, ptr %15, align 8, !tbaa !13
  %133 = load ptr, ptr %16, align 8, !tbaa !13
  %134 = getelementptr inbounds { ptr, i32 }, ptr %27, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i32 }, ptr %27, i32 0, i32 1
  %137 = load i32, ptr %136, align 8
  call void @_ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %129, i32 noundef %130, i32 noundef %131, ptr %135, i32 %137, ptr noundef %132, ptr noundef %133)
  %138 = load ptr, ptr %15, align 8, !tbaa !13
  %139 = load i32, ptr %138, align 4, !tbaa !11
  %140 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %17, i32 noundef %139)
  store i8 0, ptr %140, align 1, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  store i32 0, ptr %20, align 4
  br label %141

141:                                              ; preds = %126, %125
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %142

142:                                              ; preds = %141, %72, %66
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  %143 = load i32, ptr %20, align 4
  switch i32 %143, label %145 [
    i32 0, label %144
    i32 1, label %144
  ]

144:                                              ; preds = %142, %142
  ret void

145:                                              ; preds = %142
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17double_conversion6VectorIcEC2EPci(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

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

; 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

declare noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef, i32 noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) #4

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

declare noundef zeroext i1 @_ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_(double noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) #4

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

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

declare void @_ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_(double noundef, i32 noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"_ZTSN17double_conversion23DoubleToStringConverter8DtoaModeE", !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 = !{!"bool", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{i64 0, i64 8, !13, i64 8, i64 4, !11}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTSN17double_conversion14BignumDtoaModeE", !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 }

@.str.3 = external hidden unnamed_addr constant [141 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_ = external hidden unnamed_addr constant [128 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [69 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_(double noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr nocapture noundef writeonly %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #1 align 2 {
  %9 = alloca %"class.double_conversion::Vector", align 8
  %10 = alloca %"class.double_conversion::Double", align 8
  %11 = alloca %"class.double_conversion::Double", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @_ZN17double_conversion6VectorIcEC2EPci(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef %3, i32 noundef %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %10, double noundef %0)
  %12 = call noundef zeroext i1 @_ZNK17double_conversion6Double9IsSpecialEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  br i1 %12, label %13, label %14

13:                                               ; preds = %8
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.3, i32 noundef 395, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_) #6
  unreachable

14:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %or.cond = icmp ult i32 %1, 2
  %15 = icmp sgt i32 %2, -1
  %or.cond5 = or i1 %or.cond, %15
  br i1 %or.cond5, label %.critedge, label %16

16:                                               ; preds = %14
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.3, i32 noundef 396, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion23DoubleToStringConverter13DoubleToAsciiEdNS0_8DtoaModeEiPciPbPiS4_) #6
  unreachable

.critedge:                                        ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @_ZN17double_conversion6DoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %11, double noundef %0)
  %17 = call noundef i32 @_ZNK17double_conversion6Double4SignEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %18 = icmp slt i32 %17, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  %19 = fneg double %0
  %.lobit = lshr i32 %17, 31
  %.sink = trunc nuw nsw i32 %.lobit to i8
  %.0 = select i1 %18, double %19, double %0
  store i8 %.sink, ptr %5, align 1
  %20 = icmp eq i32 %1, 3
  %21 = icmp eq i32 %2, 0
  %or.cond3 = and i1 %20, %21
  br i1 %or.cond3, label %22, label %24

22:                                               ; preds = %.critedge
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef 0)
  store i8 0, ptr %23, align 1, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %43

24:                                               ; preds = %.critedge
  %25 = fcmp oeq double %0, 0.000000e+00
  br i1 %25, label %26, label %29

26:                                               ; preds = %24
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef 0)
  store i8 48, ptr %27, align 1, !tbaa !5
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef 1)
  store i8 0, ptr %28, align 1, !tbaa !5
  store i32 1, ptr %6, align 4, !tbaa !8
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %43

29:                                               ; preds = %24
  switch i32 %1, label %36 [
    i32 0, label %37
    i32 1, label %30
    i32 2, label %32
    i32 3, label %34
  ]

30:                                               ; preds = %29
  %.sroa.012.0.copyload = load ptr, ptr %9, align 8, !tbaa !10
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.213.0.copyload = load i32, ptr %.sroa.213.0..sroa_idx, align 8, !tbaa !8
  %31 = call noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %.0, i32 noundef 1, i32 noundef 0, ptr %.sroa.012.0.copyload, i32 %.sroa.213.0.copyload, ptr noundef %6, ptr noundef %7)
  br i1 %31, label %43, label %39

32:                                               ; preds = %29
  %.sroa.09.0.copyload = load ptr, ptr %9, align 8, !tbaa !10
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.210.0.copyload = load i32, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !8
  %33 = call noundef zeroext i1 @_ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_(double noundef %.0, i32 noundef %2, ptr %.sroa.09.0.copyload, i32 %.sroa.210.0.copyload, ptr noundef %6, ptr noundef %7)
  br i1 %33, label %43, label %39

34:                                               ; preds = %29
  %.sroa.06.0.copyload = load ptr, ptr %9, align 8, !tbaa !10
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.27.0.copyload = load i32, ptr %.sroa.27.0..sroa_idx, align 8, !tbaa !8
  %35 = call noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %.0, i32 noundef 2, i32 noundef %2, ptr %.sroa.06.0.copyload, i32 %.sroa.27.0.copyload, ptr noundef %6, ptr noundef %7)
  br i1 %35, label %43, label %39

36:                                               ; preds = %29
  call void @abort() #6
  unreachable

37:                                               ; preds = %29
  %.sroa.015.0.copyload = load ptr, ptr %9, align 8, !tbaa !10
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.216.0.copyload = load i32, ptr %.sroa.216.0..sroa_idx, align 8, !tbaa !8
  %38 = call noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %.0, i32 noundef 0, i32 noundef 0, ptr %.sroa.015.0.copyload, i32 %.sroa.216.0.copyload, ptr noundef %6, ptr noundef %7)
  br i1 %38, label %43, label %39

39:                                               ; preds = %30, %32, %34, %37
  %40 = call noundef i32 @_ZN17double_conversionL20DtoaToBignumDtoaModeENS_23DoubleToStringConverter8DtoaModeE(i32 noundef %1)
  %.sroa.0.0.copyload = load ptr, ptr %9, align 8, !tbaa !10
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.2.0.copyload = load i32, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !8
  call void @_ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_(double noundef %.0, i32 noundef %40, i32 noundef %2, ptr %.sroa.0.0.copyload, i32 %.sroa.2.0.copyload, ptr noundef %6, ptr noundef %7)
  %41 = load i32, ptr %6, align 4, !tbaa !8
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK17double_conversion6VectorIcEixEi(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef %41)
  store i8 0, ptr %42, align 1, !tbaa !5
  br label %43

43:                                               ; preds = %30, %32, %34, %39, %37, %26, %22
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17double_conversion6VectorIcEC2EPci(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

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

; 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

declare noundef zeroext i1 @_ZN17double_conversion8FastDtoaEdNS_12FastDtoaModeEiNS_6VectorIcEEPiS3_(double noundef, i32 noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN17double_conversion13FastFixedDtoaEdiNS_6VectorIcEEPiS2_(double noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZN17double_conversion10BignumDtoaEdNS_14BignumDtoaModeEiNS_6VectorIcEEPiS3_(double noundef, i32 noundef, i32 noundef, ptr, i32, ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { "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 = !{!"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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass