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

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

@.str.1 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17double_conversion6Bignum11ToHexStringEPci = external hidden unnamed_addr constant [69 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516), i32 noundef) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK17double_conversion6Bignum11ToHexStringEPci(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef %1, i32 noundef %2) #3 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %17 = load ptr, ptr %5, align 8
  %18 = call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %17)
  br i1 %18, label %19, label %20

19:                                               ; preds = %3
  br label %22

20:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 590, ptr noundef @__PRETTY_FUNCTION__._ZNK17double_conversion6Bignum11ToHexStringEPci) #4
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %17, i32 0, i32 0
  %24 = load i16, ptr %23, align 4, !tbaa !11
  %25 = sext i16 %24 to i32
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %36

27:                                               ; preds = %22
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp slt i32 %28, 2
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  store i1 false, ptr %4, align 1
  br label %144

31:                                               ; preds = %27
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 0
  store i8 48, ptr %33, align 1, !tbaa !14
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 1
  store i8 0, ptr %35, align 1, !tbaa !14
  store i1 true, ptr %4, align 1
  br label %144

36:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %37 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %17)
  %38 = sub nsw i32 %37, 1
  %39 = mul nsw i32 %38, 7
  %40 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %17, i32 0, i32 0
  %41 = load i16, ptr %40, align 4, !tbaa !11
  %42 = sext i16 %41 to i32
  %43 = sub nsw i32 %42, 1
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %17, i32 noundef %43)
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = call noundef i32 @_ZN17double_conversionL14SizeInHexCharsIjEEiT_(i32 noundef %45)
  %47 = add nsw i32 %39, %46
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %8, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = icmp sgt i32 %49, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %36
  store i1 false, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %143

53:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = sub nsw i32 %54, 1
  store i32 %55, ptr %10, align 4, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = add nsw i32 %57, -1
  store i32 %58, ptr %10, align 4, !tbaa !9
  %59 = sext i32 %57 to i64
  %60 = getelementptr inbounds i8, ptr %56, i64 %59
  store i8 0, ptr %60, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %83, %53
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %17, i32 0, i32 1
  %64 = load i16, ptr %63, align 2, !tbaa !15
  %65 = sext i16 %64 to i32
  %66 = icmp slt i32 %62, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %61
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %86

68:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %79, %68
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = icmp slt i32 %70, 7
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %82

73:                                               ; preds = %69
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load i32, ptr %10, align 4, !tbaa !9
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr %10, align 4, !tbaa !9
  %77 = sext i32 %75 to i64
  %78 = getelementptr inbounds i8, ptr %74, i64 %77
  store i8 48, ptr %78, align 1, !tbaa !14
  br label %79

79:                                               ; preds = %73
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %12, align 4, !tbaa !9
  br label %69, !llvm.loop !16

82:                                               ; preds = %72
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %11, align 4, !tbaa !9
  br label %61, !llvm.loop !18

86:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %118, %86
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %17, i32 0, i32 0
  %90 = load i16, ptr %89, align 4, !tbaa !11
  %91 = sext i16 %90 to i32
  %92 = sub nsw i32 %91, 1
  %93 = icmp slt i32 %88, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %87
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %121

95:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %17, i32 noundef %96)
  %98 = load i32, ptr %97, align 4, !tbaa !9
  store i32 %98, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %114, %95
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = icmp slt i32 %100, 7
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %117

103:                                              ; preds = %99
  %104 = load i32, ptr %14, align 4, !tbaa !9
  %105 = and i32 %104, 15
  %106 = call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %105)
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %10, align 4, !tbaa !9
  %110 = sext i32 %108 to i64
  %111 = getelementptr inbounds i8, ptr %107, i64 %110
  store i8 %106, ptr %111, align 1, !tbaa !14
  %112 = load i32, ptr %14, align 4, !tbaa !9
  %113 = lshr i32 %112, 4
  store i32 %113, ptr %14, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %103
  %115 = load i32, ptr %15, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %15, align 4, !tbaa !9
  br label %99, !llvm.loop !19

117:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %13, align 4, !tbaa !9
  br label %87, !llvm.loop !20

121:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %122 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %17, i32 0, i32 0
  %123 = load i16, ptr %122, align 4, !tbaa !11
  %124 = sext i16 %123 to i32
  %125 = sub nsw i32 %124, 1
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %17, i32 noundef %125)
  %127 = load i32, ptr %126, align 4, !tbaa !9
  store i32 %127, ptr %16, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %131, %121
  %129 = load i32, ptr %16, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %142

131:                                              ; preds = %128
  %132 = load i32, ptr %16, align 4, !tbaa !9
  %133 = and i32 %132, 15
  %134 = call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %133)
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = load i32, ptr %10, align 4, !tbaa !9
  %137 = add nsw i32 %136, -1
  store i32 %137, ptr %10, align 4, !tbaa !9
  %138 = sext i32 %136 to i64
  %139 = getelementptr inbounds i8, ptr %135, i64 %138
  store i8 %134, ptr %139, align 1, !tbaa !14
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = lshr i32 %140, 4
  store i32 %141, ptr %16, align 4, !tbaa !9
  br label %128, !llvm.loop !21

142:                                              ; preds = %128
  store i1 true, ptr %4, align 1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %143

143:                                              ; preds = %142, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %144

144:                                              ; preds = %143, %31, %30
  %145 = load i1, ptr %4, align 1
  ret i1 %145
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN17double_conversionL14SizeInHexCharsIjEEiT_(i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef) #1

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN17double_conversion6BignumE", !13, i64 0, !13, i64 2, !7, i64 4}
!13 = !{!"short", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!12, !13, i64 2}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


; 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.1 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17double_conversion6Bignum11ToHexStringEPci = external hidden unnamed_addr constant [69 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK17double_conversion6Bignum11ToHexStringEPci(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr nocapture noundef writeonly %1, i32 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = tail call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  br i1 %4, label %6, label %5

5:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 590, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17double_conversion6Bignum11ToHexStringEPci) #3
  unreachable

6:                                                ; preds = %3
  %7 = load i16, ptr %0, align 4, !tbaa !5
  %8 = icmp eq i16 %7, 0
  br i1 %8, label %9, label %13

9:                                                ; preds = %6
  %10 = icmp slt i32 %2, 2
  br i1 %10, label %.loopexit, label %11

11:                                               ; preds = %9
  store i8 48, ptr %1, align 1, !tbaa !10
  %12 = getelementptr inbounds i8, ptr %1, i64 1
  store i8 0, ptr %12, align 1, !tbaa !10
  br label %.loopexit

13:                                               ; preds = %6
  %14 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  %15 = mul i32 %14, 7
  %16 = add i32 %15, -7
  %17 = load i16, ptr %0, align 4, !tbaa !5
  %18 = sext i16 %17 to i32
  %19 = add nsw i32 %18, -1
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %19)
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = tail call noundef i32 @_ZN17double_conversionL14SizeInHexCharsIjEEiT_(i32 noundef %21)
  %23 = add nsw i32 %16, %22
  %.not = icmp slt i32 %23, %2
  br i1 %.not, label %24, label %.loopexit

24:                                               ; preds = %13
  %25 = add nsw i32 %23, -1
  %26 = sext i32 %23 to i64
  %27 = getelementptr inbounds i8, ptr %1, i64 %26
  store i8 0, ptr %27, align 1, !tbaa !10
  %28 = getelementptr inbounds i8, ptr %0, i64 2
  %29 = load i16, ptr %28, align 2, !tbaa !13
  %30 = icmp sgt i16 %29, 0
  br i1 %30, label %.preheader39.preheader, label %.preheader

.preheader39.preheader:                           ; preds = %24
  %scevgep = getelementptr i8, ptr %1, i64 -6
  br label %.preheader39

.preheader39:                                     ; preds = %.preheader39.preheader, %.preheader39
  %.03343 = phi i32 [ %33, %.preheader39 ], [ 0, %.preheader39.preheader ]
  %.03442 = phi i32 [ %32, %.preheader39 ], [ %25, %.preheader39.preheader ]
  %31 = sext i32 %.03442 to i64
  %scevgep59 = getelementptr i8, ptr %scevgep, i64 %31
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %scevgep59, i8 48, i64 7, i1 false), !tbaa !10
  %32 = add i32 %.03442, -7
  %33 = add nuw nsw i32 %.03343, 1
  %34 = load i16, ptr %28, align 2, !tbaa !13
  %35 = sext i16 %34 to i32
  %36 = icmp slt i32 %33, %35
  br i1 %36, label %.preheader39, label %.preheader, !llvm.loop !14

.preheader:                                       ; preds = %.preheader39, %24
  %.034.lcssa = phi i32 [ %25, %24 ], [ %32, %.preheader39 ]
  %37 = load i16, ptr %0, align 4, !tbaa !5
  %38 = sext i16 %37 to i32
  %39 = add nsw i32 %38, -1
  %40 = icmp sgt i16 %37, 1
  br i1 %40, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %invariant.gep = getelementptr i8, ptr %1, i64 -1
  %invariant.gep66 = getelementptr i8, ptr %1, i64 -2
  %invariant.gep68 = getelementptr i8, ptr %1, i64 -3
  %invariant.gep70 = getelementptr i8, ptr %1, i64 -4
  %invariant.gep72 = getelementptr i8, ptr %1, i64 -5
  %invariant.gep74 = getelementptr i8, ptr %1, i64 -6
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %.2.lcssa = phi i32 [ %.034.lcssa, %.preheader ], [ %indvars.iv.next.6, %.lr.ph ]
  %.lcssa = phi i32 [ %39, %.preheader ], [ %71, %.lr.ph ]
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %.lcssa)
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %.not3851 = icmp eq i32 %42, 0
  br i1 %.not3851, label %.loopexit, label %.lr.ph55.preheader

.lr.ph55.preheader:                               ; preds = %._crit_edge
  %43 = sext i32 %.2.lcssa to i64
  br label %.lr.ph55

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.03148 = phi i32 [ %68, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %.247 = phi i32 [ %indvars.iv.next.6, %.lr.ph ], [ %.034.lcssa, %.lr.ph.preheader ]
  %44 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %.03148)
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = sext i32 %.247 to i64
  %47 = and i32 %45, 15
  %48 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %47)
  %49 = getelementptr inbounds i8, ptr %1, i64 %46
  store i8 %48, ptr %49, align 1, !tbaa !10
  %50 = lshr i32 %45, 4
  %51 = and i32 %50, 15
  %52 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %51)
  %gep = getelementptr i8, ptr %invariant.gep, i64 %46
  store i8 %52, ptr %gep, align 1, !tbaa !10
  %53 = lshr i32 %45, 8
  %54 = and i32 %53, 15
  %55 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %54)
  %gep67 = getelementptr i8, ptr %invariant.gep66, i64 %46
  store i8 %55, ptr %gep67, align 1, !tbaa !10
  %56 = lshr i32 %45, 12
  %57 = and i32 %56, 15
  %58 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %57)
  %gep69 = getelementptr i8, ptr %invariant.gep68, i64 %46
  store i8 %58, ptr %gep69, align 1, !tbaa !10
  %59 = lshr i32 %45, 16
  %60 = and i32 %59, 15
  %61 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %60)
  %gep71 = getelementptr i8, ptr %invariant.gep70, i64 %46
  store i8 %61, ptr %gep71, align 1, !tbaa !10
  %62 = lshr i32 %45, 20
  %63 = and i32 %62, 15
  %64 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %63)
  %gep73 = getelementptr i8, ptr %invariant.gep72, i64 %46
  store i8 %64, ptr %gep73, align 1, !tbaa !10
  %65 = lshr i32 %45, 24
  %66 = and i32 %65, 15
  %67 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %66)
  %indvars.iv.next.6 = add i32 %.247, -7
  %gep75 = getelementptr i8, ptr %invariant.gep74, i64 %46
  store i8 %67, ptr %gep75, align 1, !tbaa !10
  %68 = add nuw nsw i32 %.03148, 1
  %69 = load i16, ptr %0, align 4, !tbaa !5
  %70 = sext i16 %69 to i32
  %71 = add nsw i32 %70, -1
  %72 = icmp slt i32 %68, %71
  br i1 %72, label %.lr.ph, label %._crit_edge, !llvm.loop !16

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %.lr.ph55
  %indvars.iv = phi i64 [ %43, %.lr.ph55.preheader ], [ %indvars.iv.next62, %.lr.ph55 ]
  %.053 = phi i32 [ %42, %.lr.ph55.preheader ], [ %76, %.lr.ph55 ]
  %73 = and i32 %.053, 15
  %74 = tail call noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef %73)
  %indvars.iv.next62 = add nsw i64 %indvars.iv, -1
  %75 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
  store i8 %74, ptr %75, align 1, !tbaa !10
  %76 = lshr i32 %.053, 4
  %.not38 = icmp ult i32 %.053, 16
  br i1 %.not38, label %.loopexit, label %.lr.ph55, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph55, %._crit_edge, %13, %9, %11
  %.136 = phi i1 [ true, %11 ], [ false, %9 ], [ false, %13 ], [ true, %._crit_edge ], [ true, %.lr.ph55 ]
  ret i1 %.136
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef signext i8 @_ZN17double_conversionL14HexCharOfValueEi(i32 noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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, !7, i64 0}
!6 = !{!"_ZTSN17double_conversion6BignumE", !7, i64 0, !7, i64 2, !8, i64 4}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!6, !7, i64 2}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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