; 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
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_ = external hidden unnamed_addr constant [74 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

; 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) #0 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 void @_ZN17double_conversion6Bignum5ClampEv(ptr noundef nonnull align 4 dereferenceable(516)) #0 align 2

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

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

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

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

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

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

14:                                               ; preds = %2
  br label %17

15:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 503, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

16:                                               ; No predecessors!
  br label %17

17:                                               ; preds = %16, %14
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %18)
  br i1 %19, label %20, label %21

20:                                               ; preds = %17
  br label %23

21:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 504, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %24, i32 0, i32 0
  %26 = load i16, ptr %25, align 4, !tbaa !9
  %27 = sext i16 %26 to i32
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %23
  br label %32

30:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 505, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

31:                                               ; No predecessors!
  br label %32

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

37:                                               ; preds = %32
  store i16 0, ptr %3, align 2
  br label %185

38:                                               ; preds = %32
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN17double_conversion6Bignum5AlignERKS0_(ptr noundef nonnull align 4 dereferenceable(516) %12, ptr noundef nonnull align 4 dereferenceable(516) %39)
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #5
  store i16 0, ptr %6, align 2, !tbaa !12
  br label %40

40:                                               ; preds = %69, %38
  %41 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %12)
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %42)
  %44 = icmp sgt i32 %41, %43
  br i1 %44, label %45, label %89

45:                                               ; preds = %40
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %47, i32 0, i32 0
  %49 = load i16, ptr %48, align 4, !tbaa !9
  %50 = sext i16 %49 to i32
  %51 = sub nsw i32 %50, 1
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %46, i32 noundef %51)
  %53 = load i32, ptr %52, align 4, !tbaa !13
  %54 = icmp uge i32 %53, 16777216
  br i1 %54, label %55, label %56

55:                                               ; preds = %45
  br label %58

56:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 523, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

57:                                               ; No predecessors!
  br label %58

58:                                               ; preds = %57, %55
  %59 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 0
  %60 = load i16, ptr %59, align 4, !tbaa !9
  %61 = sext i16 %60 to i32
  %62 = sub nsw i32 %61, 1
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %12, i32 noundef %62)
  %64 = load i32, ptr %63, align 4, !tbaa !13
  %65 = icmp ult i32 %64, 65536
  br i1 %65, label %66, label %67

66:                                               ; preds = %58
  br label %69

67:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 524, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %66
  %70 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 0
  %71 = load i16, ptr %70, align 4, !tbaa !9
  %72 = sext i16 %71 to i32
  %73 = sub nsw i32 %72, 1
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %12, i32 noundef %73)
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = trunc i32 %75 to i16
  %77 = zext i16 %76 to i32
  %78 = load i16, ptr %6, align 2, !tbaa !12
  %79 = zext i16 %78 to i32
  %80 = add nsw i32 %79, %77
  %81 = trunc i32 %80 to i16
  store i16 %81, ptr %6, align 2, !tbaa !12
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 0
  %84 = load i16, ptr %83, align 4, !tbaa !9
  %85 = sext i16 %84 to i32
  %86 = sub nsw i32 %85, 1
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %12, i32 noundef %86)
  %88 = load i32, ptr %87, align 4, !tbaa !13
  call void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 4 dereferenceable(516) %12, ptr noundef nonnull align 4 dereferenceable(516) %82, i32 noundef %88)
  br label %40, !llvm.loop !15

89:                                               ; preds = %40
  %90 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %12)
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %91)
  %93 = icmp eq i32 %90, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %89
  br label %97

95:                                               ; preds = %89
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 531, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

96:                                               ; No predecessors!
  br label %97

97:                                               ; preds = %96, %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %98 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 0
  %99 = load i16, ptr %98, align 4, !tbaa !9
  %100 = sext i16 %99 to i32
  %101 = sub nsw i32 %100, 1
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %12, i32 noundef %101)
  %103 = load i32, ptr %102, align 4, !tbaa !13
  store i32 %103, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %105, i32 0, i32 0
  %107 = load i16, ptr %106, align 4, !tbaa !9
  %108 = sext i16 %107 to i32
  %109 = sub nsw i32 %108, 1
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %104, i32 noundef %109)
  %111 = load i32, ptr %110, align 4, !tbaa !13
  store i32 %111, ptr %8, align 4, !tbaa !13
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %112, i32 0, i32 0
  %114 = load i16, ptr %113, align 4, !tbaa !9
  %115 = sext i16 %114 to i32
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %117, label %145

117:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %118 = load i32, ptr %7, align 4, !tbaa !13
  %119 = load i32, ptr %8, align 4, !tbaa !13
  %120 = udiv i32 %118, %119
  store i32 %120, ptr %9, align 4, !tbaa !13
  %121 = load i32, ptr %7, align 4, !tbaa !13
  %122 = load i32, ptr %8, align 4, !tbaa !13
  %123 = load i32, ptr %9, align 4, !tbaa !13
  %124 = mul i32 %122, %123
  %125 = sub i32 %121, %124
  %126 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 0
  %127 = load i16, ptr %126, align 4, !tbaa !9
  %128 = sext i16 %127 to i32
  %129 = sub nsw i32 %128, 1
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %12, i32 noundef %129)
  store i32 %125, ptr %130, align 4, !tbaa !13
  %131 = load i32, ptr %9, align 4, !tbaa !13
  %132 = icmp slt i32 %131, 65536
  br i1 %132, label %133, label %134

133:                                              ; preds = %117
  br label %136

134:                                              ; preds = %117
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 543, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

135:                                              ; No predecessors!
  br label %136

136:                                              ; preds = %135, %133
  %137 = load i32, ptr %9, align 4, !tbaa !13
  %138 = trunc i32 %137 to i16
  %139 = zext i16 %138 to i32
  %140 = load i16, ptr %6, align 2, !tbaa !12
  %141 = zext i16 %140 to i32
  %142 = add nsw i32 %141, %139
  %143 = trunc i32 %142 to i16
  store i16 %143, ptr %6, align 2, !tbaa !12
  call void @_ZN17double_conversion6Bignum5ClampEv(ptr noundef nonnull align 4 dereferenceable(516) %12)
  %144 = load i16, ptr %6, align 2, !tbaa !12
  store i16 %144, ptr %3, align 2
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %184

145:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %146 = load i32, ptr %7, align 4, !tbaa !13
  %147 = load i32, ptr %8, align 4, !tbaa !13
  %148 = add i32 %147, 1
  %149 = udiv i32 %146, %148
  store i32 %149, ptr %11, align 4, !tbaa !13
  %150 = load i32, ptr %11, align 4, !tbaa !13
  %151 = icmp slt i32 %150, 65536
  br i1 %151, label %152, label %153

152:                                              ; preds = %145
  br label %155

153:                                              ; preds = %145
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 550, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

154:                                              ; No predecessors!
  br label %155

155:                                              ; preds = %154, %152
  %156 = load i32, ptr %11, align 4, !tbaa !13
  %157 = trunc i32 %156 to i16
  %158 = zext i16 %157 to i32
  %159 = load i16, ptr %6, align 2, !tbaa !12
  %160 = zext i16 %159 to i32
  %161 = add nsw i32 %160, %158
  %162 = trunc i32 %161 to i16
  store i16 %162, ptr %6, align 2, !tbaa !12
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load i32, ptr %11, align 4, !tbaa !13
  call void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 4 dereferenceable(516) %12, ptr noundef nonnull align 4 dereferenceable(516) %163, i32 noundef %164)
  %165 = load i32, ptr %8, align 4, !tbaa !13
  %166 = load i32, ptr %11, align 4, !tbaa !13
  %167 = add nsw i32 %166, 1
  %168 = mul i32 %165, %167
  %169 = load i32, ptr %7, align 4, !tbaa !13
  %170 = icmp ugt i32 %168, %169
  br i1 %170, label %171, label %173

171:                                              ; preds = %155
  %172 = load i16, ptr %6, align 2, !tbaa !12
  store i16 %172, ptr %3, align 2
  store i32 1, ptr %10, align 4
  br label %183

173:                                              ; preds = %155
  br label %174

174:                                              ; preds = %177, %173
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = call noundef zeroext i1 @_ZN17double_conversion6Bignum9LessEqualERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(516) %175, ptr noundef nonnull align 4 dereferenceable(516) %12)
  br i1 %176, label %177, label %181

177:                                              ; preds = %174
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN17double_conversion6Bignum14SubtractBignumERKS0_(ptr noundef nonnull align 4 dereferenceable(516) %12, ptr noundef nonnull align 4 dereferenceable(516) %178)
  %179 = load i16, ptr %6, align 2, !tbaa !12
  %180 = add i16 %179, 1
  store i16 %180, ptr %6, align 2, !tbaa !12
  br label %174, !llvm.loop !17

181:                                              ; preds = %174
  %182 = load i16, ptr %6, align 2, !tbaa !12
  store i16 %182, ptr %3, align 2
  store i32 1, ptr %10, align 4
  br label %183

183:                                              ; preds = %181, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %184

184:                                              ; preds = %183, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #5
  br label %185

185:                                              ; preds = %184, %37
  %186 = load i16, ptr %3, align 2
  ret i16 %186
}

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

attributes #0 = { 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 #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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, !11, i64 0}
!10 = !{!"_ZTSN17double_conversion6BignumE", !11, i64 0, !11, i64 2, !7, i64 4}
!11 = !{!"short", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!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.1 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_ = external hidden unnamed_addr constant [74 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17double_conversion6Bignum5ClampEv(ptr noundef nonnull align 4 dereferenceable(516)) local_unnamed_addr #0 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion6Bignum5AlignERKS0_(ptr noundef nonnull align 4 dereferenceable(516), ptr noundef nonnull align 4 dereferenceable(516)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion6Bignum14SubtractBignumERKS0_(ptr noundef nonnull align 4 dereferenceable(516), ptr noundef nonnull align 4 dereferenceable(516)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i16 @_ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1) local_unnamed_addr #2 align 2 {
  %3 = tail call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  br i1 %3, label %5, label %4

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

5:                                                ; preds = %2
  %6 = tail call noundef zeroext i1 @_ZNK17double_conversion6Bignum9IsClampedEv(ptr noundef nonnull align 4 dereferenceable(516) %1)
  br i1 %6, label %8, label %7

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

8:                                                ; preds = %5
  %9 = load i16, ptr %1, align 4, !tbaa !5
  %10 = icmp sgt i16 %9, 0
  br i1 %10, label %12, label %11

11:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 505, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

12:                                               ; preds = %8
  %13 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  %14 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %1)
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %.loopexit, label %16

16:                                               ; preds = %12
  tail call void @_ZN17double_conversion6Bignum5AlignERKS0_(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1)
  %17 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  %18 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %1)
  %19 = icmp sgt i32 %17, %18
  br i1 %19, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %16, %35
  %.03844 = phi i16 [ %42, %35 ], [ 0, %16 ]
  %20 = load i16, ptr %1, align 4, !tbaa !5
  %21 = sext i16 %20 to i32
  %22 = add nsw i32 %21, -1
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %1, i32 noundef %22)
  %24 = load i32, ptr %23, align 4, !tbaa !10
  %25 = icmp ugt i32 %24, 16777215
  br i1 %25, label %27, label %26

26:                                               ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 523, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

27:                                               ; preds = %.lr.ph
  %28 = load i16, ptr %0, align 4, !tbaa !5
  %29 = sext i16 %28 to i32
  %30 = add nsw i32 %29, -1
  %31 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %30)
  %32 = load i32, ptr %31, align 4, !tbaa !10
  %33 = icmp ult i32 %32, 65536
  br i1 %33, label %35, label %34

34:                                               ; preds = %27
  tail call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 524, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

35:                                               ; preds = %27
  %36 = load i16, ptr %0, align 4, !tbaa !5
  %37 = sext i16 %36 to i32
  %38 = add nsw i32 %37, -1
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %38)
  %40 = load i32, ptr %39, align 4, !tbaa !10
  %41 = trunc i32 %40 to i16
  %42 = add i16 %.03844, %41
  %43 = load i16, ptr %0, align 4, !tbaa !5
  %44 = sext i16 %43 to i32
  %45 = add nsw i32 %44, -1
  %46 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %45)
  %47 = load i32, ptr %46, align 4, !tbaa !10
  tail call void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1, i32 noundef %47)
  %48 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  %49 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %1)
  %50 = icmp sgt i32 %48, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %35, %16
  %.038.lcssa = phi i16 [ 0, %16 ], [ %42, %35 ]
  %51 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  %52 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 4 dereferenceable(516) %1)
  %53 = icmp eq i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 531, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

55:                                               ; preds = %._crit_edge
  %56 = load i16, ptr %0, align 4, !tbaa !5
  %57 = sext i16 %56 to i32
  %58 = add nsw i32 %57, -1
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %58)
  %60 = load i32, ptr %59, align 4, !tbaa !10
  %61 = load i16, ptr %1, align 4, !tbaa !5
  %62 = sext i16 %61 to i32
  %63 = add nsw i32 %62, -1
  %64 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %1, i32 noundef %63)
  %65 = load i32, ptr %64, align 4, !tbaa !10
  %66 = load i16, ptr %1, align 4, !tbaa !5
  %67 = icmp eq i16 %66, 1
  br i1 %67, label %68, label %80

68:                                               ; preds = %55
  %69 = udiv i32 %60, %65
  %70 = mul i32 %69, %65
  %.recomposed = urem i32 %60, %65
  %71 = load i16, ptr %0, align 4, !tbaa !5
  %72 = sext i16 %71 to i32
  %73 = add nsw i32 %72, -1
  %74 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN17double_conversion6Bignum8RawBigitEi(ptr noundef nonnull align 4 dereferenceable(516) %0, i32 noundef %73)
  store i32 %.recomposed, ptr %74, align 4, !tbaa !10
  %75 = icmp slt i32 %69, 65536
  br i1 %75, label %77, label %76

76:                                               ; preds = %68
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.1, i32 noundef 543, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

77:                                               ; preds = %68
  %78 = trunc i32 %69 to i16
  %79 = add i16 %.038.lcssa, %78
  tail call void @_ZN17double_conversion6Bignum5ClampEv(ptr noundef nonnull align 4 dereferenceable(516) %0)
  br label %.loopexit

80:                                               ; preds = %55
  %81 = add i32 %65, 1
  %82 = udiv i32 %60, %81
  %83 = icmp slt i32 %82, 65536
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 550, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

85:                                               ; preds = %80
  %86 = trunc i32 %82 to i16
  %87 = add i16 %.038.lcssa, %86
  tail call void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1, i32 noundef %82)
  %88 = add nsw i32 %82, 1
  %89 = mul i32 %88, %65
  %90 = icmp ugt i32 %89, %60
  br i1 %90, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %85
  %91 = tail call noundef zeroext i1 @_ZN17double_conversion6Bignum9LessEqualERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(516) %1, ptr noundef nonnull align 4 dereferenceable(516) %0)
  br i1 %91, label %.lr.ph46, label %.loopexit

.lr.ph46:                                         ; preds = %.preheader, %.lr.ph46
  %.13945 = phi i16 [ %92, %.lr.ph46 ], [ %87, %.preheader ]
  tail call void @_ZN17double_conversion6Bignum14SubtractBignumERKS0_(ptr noundef nonnull align 4 dereferenceable(516) %0, ptr noundef nonnull align 4 dereferenceable(516) %1)
  %92 = add i16 %.13945, 1
  %93 = tail call noundef zeroext i1 @_ZN17double_conversion6Bignum9LessEqualERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(516) %1, ptr noundef nonnull align 4 dereferenceable(516) %0)
  br i1 %93, label %.lr.ph46, label %.loopexit, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph46, %.preheader, %77, %85, %12
  %.2 = phi i16 [ 0, %12 ], [ %79, %77 ], [ %87, %85 ], [ %87, %.preheader ], [ %92, %.lr.ph46 ]
  ret i16 %.2
}

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

attributes #0 = { 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 #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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