; 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::DoubleToStringConverter" = type { i32, ptr, ptr, i8, i32, i32, i32, i32, i32 }

@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [141 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE = external hidden unnamed_addr constant [128 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 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_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20), i8 noundef signext) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca [6 x i8], align 1
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %6, align 8
  %15 = load i32, ptr %8, align 4, !tbaa !9
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %5
  br label %20

18:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 80, ptr noundef @__PRETTY_FUNCTION__._ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE) #4
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 0
  %24 = load i8, ptr %23, align 1, !tbaa !11
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %21, i8 noundef signext %24)
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %42

27:                                               ; preds = %20
  %28 = getelementptr inbounds %"class.double_conversion::DoubleToStringConverter", ptr %14, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !12
  %30 = and i32 %29, 32
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %41

32:                                               ; preds = %27
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %33, i8 noundef signext 46)
  %34 = getelementptr inbounds %"class.double_conversion::DoubleToStringConverter", ptr %14, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !12
  %36 = and i32 %35, 64
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %32
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %39, i8 noundef signext 48)
  br label %40

40:                                               ; preds = %38, %32
  br label %41

41:                                               ; preds = %40, %27
  br label %49

42:                                               ; preds = %20
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %43, i8 noundef signext 46)
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 1
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = sub nsw i32 %47, 1
  call void @_ZN17double_conversion13StringBuilder12AddSubstringEPKci(ptr noundef nonnull align 8 dereferenceable(20) %44, ptr noundef %46, i32 noundef %48)
  br label %49

49:                                               ; preds = %42, %41
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.double_conversion::DoubleToStringConverter", ptr %14, i32 0, i32 3
  %52 = load i8, ptr %51, align 8, !tbaa !14
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %50, i8 noundef signext %52)
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %59

55:                                               ; preds = %49
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %56, i8 noundef signext 45)
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = sub nsw i32 0, %57
  store i32 %58, ptr %9, align 4, !tbaa !9
  br label %67

59:                                               ; preds = %49
  %60 = getelementptr inbounds %"class.double_conversion::DoubleToStringConverter", ptr %14, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !12
  %62 = and i32 %61, 1
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %66

64:                                               ; preds = %59
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %65, i8 noundef signext 43)
  br label %66

66:                                               ; preds = %64, %59
  br label %67

67:                                               ; preds = %66, %55
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = sitofp i32 %68 to double
  %70 = fcmp olt double %69, 1.000000e+04
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  br label %74

72:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 102, ptr noundef @__PRETTY_FUNCTION__._ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE) #4
  unreachable

73:                                               ; No predecessors!
  br label %74

74:                                               ; preds = %73, %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 5, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 6, ptr %12) #5
  %75 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 5
  store i8 0, ptr %75, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 5, ptr %13, align 4, !tbaa !9
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %83

78:                                               ; preds = %74
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr %13, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 %81
  store i8 48, ptr %82, align 1, !tbaa !11
  br label %99

83:                                               ; preds = %74
  br label %84

84:                                               ; preds = %87, %83
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %87, label %98

87:                                               ; preds = %84
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = srem i32 %88, 10
  %90 = add nsw i32 48, %89
  %91 = trunc i32 %90 to i8
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr %13, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 %94
  store i8 %91, ptr %95, align 1, !tbaa !11
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = sdiv i32 %96, 10
  store i32 %97, ptr %9, align 4, !tbaa !9
  br label %84, !llvm.loop !15

98:                                               ; preds = %84
  br label %99

99:                                               ; preds = %98, %78
  br label %100

100:                                              ; preds = %107, %99
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = sub nsw i32 5, %101
  %103 = getelementptr inbounds %"class.double_conversion::DoubleToStringConverter", ptr %14, i32 0, i32 8
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %103, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = icmp slt i32 %102, %105
  br i1 %106, label %107, label %112

107:                                              ; preds = %100
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %13, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 %110
  store i8 48, ptr %111, align 1, !tbaa !11
  br label %100, !llvm.loop !17

112:                                              ; preds = %100
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 %115
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = sub nsw i32 5, %117
  call void @_ZN17double_conversion13StringBuilder12AddSubstringEPKci(ptr noundef nonnull align 8 dereferenceable(20) %113, ptr noundef %116, i32 noundef %118)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 6, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion13StringBuilder12AddSubstringEPKci(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef) #1 align 2

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTSN17double_conversion23DoubleToStringConverterE", !10, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!14 = !{!13, !7, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [141 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE = external hidden unnamed_addr constant [128 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 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_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20), i8 noundef signext) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #1 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca [6 x i8], align 1
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %8, label %9

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 80, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE) #4
  unreachable

9:                                                ; preds = %5
  %10 = load i8, ptr %1, align 1, !tbaa !5
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext %10)
  %11 = icmp eq i32 %2, 1
  br i1 %11, label %12, label %19

12:                                               ; preds = %9
  %13 = load i32, ptr %0, align 8, !tbaa !8
  %14 = and i32 %13, 32
  %.not33 = icmp eq i32 %14, 0
  br i1 %.not33, label %22, label %15

15:                                               ; preds = %12
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext 46)
  %16 = load i32, ptr %0, align 8, !tbaa !8
  %17 = and i32 %16, 64
  %.not34 = icmp eq i32 %17, 0
  br i1 %.not34, label %22, label %18

18:                                               ; preds = %15
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext 48)
  br label %22

19:                                               ; preds = %9
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext 46)
  %20 = getelementptr inbounds i8, ptr %1, i64 1
  %21 = add nsw i32 %2, -1
  tail call void @_ZN17double_conversion13StringBuilder12AddSubstringEPKci(ptr noundef nonnull align 8 dereferenceable(20) %4, ptr noundef nonnull %20, i32 noundef %21)
  br label %22

22:                                               ; preds = %12, %18, %15, %19
  %23 = getelementptr inbounds i8, ptr %0, i64 24
  %24 = load i8, ptr %23, align 8, !tbaa !12
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext %24)
  %25 = icmp slt i32 %3, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %22
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext 45)
  %27 = sub nsw i32 0, %3
  br label %32

28:                                               ; preds = %22
  %29 = load i32, ptr %0, align 8, !tbaa !8
  %30 = and i32 %29, 1
  %.not35 = icmp eq i32 %30, 0
  br i1 %.not35, label %32, label %31

31:                                               ; preds = %28
  tail call void @_ZN17double_conversion13StringBuilder12AddCharacterEc(ptr noundef nonnull align 8 dereferenceable(20) %4, i8 noundef signext 43)
  br label %32

32:                                               ; preds = %28, %31, %26
  %.027 = phi i32 [ %27, %26 ], [ %3, %31 ], [ %3, %28 ]
  %33 = icmp ult i32 %.027, 10000
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 102, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17double_conversion23DoubleToStringConverter31CreateExponentialRepresentationEPKciiPNS_13StringBuilderE) #4
  unreachable

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 5, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %7) #5
  %36 = getelementptr inbounds i8, ptr %7, i64 5
  store i8 0, ptr %36, align 1, !tbaa !5
  %37 = icmp eq i32 %.027, 0
  br i1 %37, label %38, label %.lr.ph

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %7, i64 4
  store i8 48, ptr %39, align 1, !tbaa !5
  br label %.loopexit

.lr.ph:                                           ; preds = %35, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 5, %35 ]
  %.12836 = phi i32 [ %44, %.lr.ph ], [ %.027, %35 ]
  %40 = urem i32 %.12836, 10
  %41 = trunc nuw nsw i32 %40 to i8
  %42 = or disjoint i8 %41, 48
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %43 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 %indvars.iv.next
  store i8 %42, ptr %43, align 1, !tbaa !5
  %44 = udiv i32 %.12836, 10
  %.not42 = icmp ult i32 %.12836, 10
  br i1 %.not42, label %.loopexit.loopexit, label %.lr.ph, !llvm.loop !14

.loopexit.loopexit:                               ; preds = %.lr.ph
  %45 = trunc nsw i64 %indvars.iv.next to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %38
  %.1 = phi i32 [ 4, %38 ], [ %45, %.loopexit.loopexit ]
  %46 = getelementptr inbounds i8, ptr %0, i64 44
  %47 = sub nsw i32 5, %.1
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %.lr.ph39.preheader, label %._crit_edge

.lr.ph39.preheader:                               ; preds = %.loopexit
  %51 = sext i32 %.1 to i64
  br label %.lr.ph39

.lr.ph39:                                         ; preds = %.lr.ph39.preheader, %.lr.ph39
  %indvars.iv47 = phi i64 [ %51, %.lr.ph39.preheader ], [ %indvars.iv.next48, %.lr.ph39 ]
  %indvars.iv.next48 = add nsw i64 %indvars.iv47, -1
  %52 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 %indvars.iv.next48
  store i8 48, ptr %52, align 1, !tbaa !5
  %53 = sub nsw i64 6, %indvars.iv47
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %55 = load i32, ptr %54, align 4, !tbaa !13
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %53, %56
  br i1 %57, label %.lr.ph39, label %._crit_edge.loopexit, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %.lr.ph39
  %58 = trunc nsw i64 %53 to i32
  %59 = trunc nsw i64 %indvars.iv.next48 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit
  %.2.lcssa = phi i32 [ %.1, %.loopexit ], [ %59, %._crit_edge.loopexit ]
  %.lcssa = phi i32 [ %47, %.loopexit ], [ %58, %._crit_edge.loopexit ]
  %60 = sext i32 %.2.lcssa to i64
  %61 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 %60
  call void @_ZN17double_conversion13StringBuilder12AddSubstringEPKci(ptr noundef nonnull align 8 dereferenceable(20) %4, ptr noundef nonnull %61, i32 noundef %.lcssa)
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion13StringBuilder12AddSubstringEPKci(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !10, i64 0}
!9 = !{!"_ZTSN17double_conversion23DoubleToStringConverterE", !10, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!10 = !{!"int", !6, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!9, !6, i64 24}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass