; 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.20 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_ = external hidden unnamed_addr constant [98 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1, ptr noundef nonnull align 4 dereferenceable(516) %2) #3 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %16)
  br i1 %17, label %18, label %19

18:                                               ; preds = %3
  br label %21

19:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 671, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_) #5
  unreachable

20:                                               ; No predecessors!
  br label %21

21:                                               ; preds = %20, %18
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %22)
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  br label %27

25:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.1, i32 noundef 672, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_) #5
  unreachable

26:                                               ; No predecessors!
  br label %27

27:                                               ; preds = %26, %24
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %28)
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  br label %33

31:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 673, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_) #5
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %34)
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %36)
  %38 = icmp slt i32 %35, %37
  br i1 %38, label %39, label %44

39:                                               ; preds = %33
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call noundef i32 @_ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_(ptr noundef nonnull align 4 dereferenceable(516) %40, ptr noundef nonnull align 4 dereferenceable(516) %41, ptr noundef nonnull align 4 dereferenceable(516) %42)
  store i32 %43, ptr %4, align 4
  br label %139

44:                                               ; preds = %33
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %45)
  %47 = add nsw i32 %46, 1
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %48)
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  store i32 -1, ptr %4, align 4
  br label %139

52:                                               ; preds = %44
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %53)
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %55)
  %57 = icmp sgt i32 %54, %56
  br i1 %57, label %58, label %59

58:                                               ; preds = %52
  store i32 1, ptr %4, align 4
  br label %139

59:                                               ; preds = %52
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %60, i32 0, i32 1
  %62 = load i16, ptr %61, align 2, !tbaa !9
  %63 = sext i16 %62 to i32
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %64)
  %66 = icmp sge i32 %63, %65
  br i1 %66, label %67, label %74

67:                                               ; preds = %59
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %68)
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %70)
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %67
  store i32 -1, ptr %4, align 4
  br label %139

74:                                               ; preds = %67, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %77, i32 0, i32 1
  %79 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minIsERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %76, ptr noundef nonnull align 2 dereferenceable(2) %78)
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %80, i32 0, i32 1
  %82 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minIsERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %79, ptr noundef nonnull align 2 dereferenceable(2) %81)
  %83 = load i16, ptr %82, align 2, !tbaa !14
  %84 = sext i16 %83 to i32
  store i32 %84, ptr %9, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %85)
  %87 = sub nsw i32 %86, 1
  store i32 %87, ptr %10, align 4, !tbaa !12
  br label %88

88:                                               ; preds = %128, %74
  %89 = load i32, ptr %10, align 4, !tbaa !12
  %90 = load i32, ptr %9, align 4, !tbaa !12
  %91 = icmp sge i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 2, ptr %11, align 4
  br label %131

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load i32, ptr %10, align 4, !tbaa !12
  %96 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516) %94, i32 noundef %95)
  store i32 %96, ptr %12, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = load i32, ptr %10, align 4, !tbaa !12
  %99 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516) %97, i32 noundef %98)
  store i32 %99, ptr %13, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i32, ptr %10, align 4, !tbaa !12
  %102 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516) %100, i32 noundef %101)
  store i32 %102, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %103 = load i32, ptr %12, align 4, !tbaa !12
  %104 = load i32, ptr %13, align 4, !tbaa !12
  %105 = add i32 %103, %104
  store i32 %105, ptr %15, align 4, !tbaa !12
  %106 = load i32, ptr %15, align 4, !tbaa !12
  %107 = load i32, ptr %14, align 4, !tbaa !12
  %108 = load i32, ptr %8, align 4, !tbaa !12
  %109 = add i32 %107, %108
  %110 = icmp ugt i32 %106, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %93
  store i32 1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %125

112:                                              ; preds = %93
  %113 = load i32, ptr %14, align 4, !tbaa !12
  %114 = load i32, ptr %8, align 4, !tbaa !12
  %115 = add i32 %113, %114
  %116 = load i32, ptr %15, align 4, !tbaa !12
  %117 = sub i32 %115, %116
  store i32 %117, ptr %8, align 4, !tbaa !12
  %118 = load i32, ptr %8, align 4, !tbaa !12
  %119 = icmp ugt i32 %118, 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %112
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %125

121:                                              ; preds = %112
  %122 = load i32, ptr %8, align 4, !tbaa !12
  %123 = shl i32 %122, 28
  store i32 %123, ptr %8, align 4, !tbaa !12
  br label %124

124:                                              ; preds = %121
  store i32 0, ptr %11, align 4
  br label %125

125:                                              ; preds = %124, %120, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %126 = load i32, ptr %11, align 4
  switch i32 %126, label %131 [
    i32 0, label %127
  ]

127:                                              ; preds = %125
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %10, align 4, !tbaa !12
  %130 = add nsw i32 %129, -1
  store i32 %130, ptr %10, align 4, !tbaa !12
  br label %88, !llvm.loop !15

131:                                              ; preds = %125, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %132 = load i32, ptr %11, align 4
  switch i32 %132, label %138 [
    i32 2, label %133
  ]

133:                                              ; preds = %131
  %134 = load i32, ptr %8, align 4, !tbaa !12
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %133
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %138

137:                                              ; preds = %133
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %138

138:                                              ; preds = %137, %136, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %139

139:                                              ; preds = %138, %73, %58, %51, %39
  %140 = load i32, ptr %4, align 4
  ret i32 %140
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 2}
!10 = !{!"_ZTSN17double_conversion6BignumE", !11, i64 0, !11, i64 2, !7, i64 4}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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.20 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_ = external hidden unnamed_addr constant [98 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 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 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 uwtable
declare dso_local noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1, ptr noundef nonnull align 4 dereferenceable(516) %2) local_unnamed_addr #2 align 2 {
  br label %tailrecurse

tailrecurse:                                      ; preds = %12, %3
  %.tr = phi ptr [ %0, %3 ], [ %.tr57, %12 ]
  %.tr57 = phi ptr [ %1, %3 ], [ %.tr, %12 ]
  %4 = tail call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr)
  br i1 %4, label %6, label %5

5:                                                ; preds = %tailrecurse
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 671, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_) #4
  unreachable

6:                                                ; preds = %tailrecurse
  %7 = tail call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr57)
  br i1 %7, label %9, label %8

8:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.1, i32 noundef 672, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_) #4
  unreachable

9:                                                ; preds = %6
  %10 = tail call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %2)
  br i1 %10, label %12, label %11

11:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 673, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum11PlusCompareERKS0_S2_S2_) #4
  unreachable

12:                                               ; preds = %9
  %13 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr)
  %14 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr57)
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %tailrecurse, label %16

16:                                               ; preds = %12
  %17 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr)
  %18 = add nsw i32 %17, 1
  %19 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %2)
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %.thread, label %21

21:                                               ; preds = %16
  %22 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr)
  %23 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %2)
  %24 = icmp sgt i32 %22, %23
  br i1 %24, label %.thread, label %25

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %.tr, i64 2
  %27 = load i16, ptr %26, align 2, !tbaa !5
  %28 = sext i16 %27 to i32
  %29 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr57)
  %.not = icmp sgt i32 %29, %28
  br i1 %.not, label %34, label %30

30:                                               ; preds = %25
  %31 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %.tr)
  %32 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %2)
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %.thread, label %34

34:                                               ; preds = %30, %25
  %35 = getelementptr inbounds i8, ptr %.tr57, i64 2
  %36 = tail call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minIsERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %26, ptr noundef nonnull align 2 dereferenceable(2) %35)
  %37 = getelementptr inbounds i8, ptr %2, i64 2
  %38 = tail call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minIsERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %36, ptr noundef nonnull align 2 dereferenceable(2) %37)
  %39 = load i16, ptr %38, align 2, !tbaa !10
  %40 = sext i16 %39 to i32
  %41 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %2)
  %.not53.not.not66 = icmp sgt i32 %41, %40
  br i1 %.not53.not.not66, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %34, %51
  %.04668.in = phi i32 [ %.04668, %51 ], [ %41, %34 ]
  %.04367 = phi i32 [ %52, %51 ], [ 0, %34 ]
  %.04668 = add nsw i32 %.04668.in, -1
  %42 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516) %.tr, i32 noundef %.04668)
  %43 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516) %.tr57, i32 noundef %.04668)
  %44 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitOrZeroEi(ptr noundef nonnull align 4 dereferenceable(516) %2, i32 noundef %.04668)
  %45 = add i32 %43, %42
  %46 = add i32 %44, %.04367
  %47 = icmp ugt i32 %45, %46
  br i1 %47, label %.thread, label %48

48:                                               ; preds = %.lr.ph
  %49 = sub i32 %46, %45
  %50 = icmp ugt i32 %49, 1
  br i1 %50, label %.thread, label %51

51:                                               ; preds = %48
  %52 = shl nuw nsw i32 %49, 28
  %.not53.not.not = icmp sgt i32 %.04668, %40
  br i1 %.not53.not.not, label %.lr.ph, label %.thread.loopexit, !llvm.loop !11

.thread.loopexit:                                 ; preds = %51
  %53 = icmp ne i32 %46, %45
  %54 = sext i1 %53 to i32
  br label %.thread

.thread:                                          ; preds = %48, %.lr.ph, %34, %.thread.loopexit, %30, %21, %16
  %.4 = phi i32 [ -1, %16 ], [ 1, %21 ], [ -1, %30 ], [ 0, %34 ], [ %54, %.thread.loopexit ], [ 1, %.lr.ph ], [ -1, %48 ]
  ret i32 %.4
}

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 = { 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 #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 }

!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 2}
!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 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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