; LLVM IR from iyinoluwamt/Tensorframe :: main/ios/Pods/DoubleConversion/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 { [128 x i32], %"class.double_conversion::Vector", i32, i32 }
%"class.double_conversion::Vector" = type <{ ptr, i32, [4 x i8] }>

@.str.1 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = 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.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [28 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #1 align 2

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

; 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_conversion6Bignum5ClampEv(ptr noundef nonnull align 8 dereferenceable(536)) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i16 @_ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_(ptr noundef nonnull align 8 dereferenceable(536) %0, ptr noundef nonnull align 8 dereferenceable(536) %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 8 dereferenceable(536) %12)
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  br label %17

15:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 487, 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 8 dereferenceable(536) %18)
  br i1 %19, label %20, label %21

20:                                               ; preds = %17
  br label %23

21:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 488, 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 2
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %23
  br label %31

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

30:                                               ; No predecessors!
  br label %31

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

36:                                               ; preds = %31
  store i16 0, ptr %3, align 2
  br label %183

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

39:                                               ; preds = %68, %37
  %40 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 8 dereferenceable(536) %12)
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 8 dereferenceable(536) %41)
  %43 = icmp sgt i32 %40, %42
  br i1 %43, label %44, label %88

44:                                               ; preds = %39
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %45, i32 0, i32 1
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !9
  %50 = sub nsw i32 %49, 1
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %46, i32 noundef %50)
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = icmp uge i32 %52, 16777216
  br i1 %53, label %54, label %55

54:                                               ; preds = %44
  br label %57

55:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 507, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

56:                                               ; No predecessors!
  br label %57

57:                                               ; preds = %56, %54
  %58 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 1
  %59 = getelementptr inbounds %"class.double_conversion::Bignum", ptr %12, i32 0, i32 2
  %60 = load i32, ptr %59, align 8, !tbaa !9
  %61 = sub nsw i32 %60, 1
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %58, i32 noundef %61)
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = icmp ult i32 %63, 65536
  br i1 %64, label %65, label %66

65:                                               ; preds = %57
  br label %68

66:                                               ; preds = %57
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 508, ptr noundef @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #4
  unreachable

67:                                               ; No predecessors!
  br label %68

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

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

93:                                               ; preds = %88
  br label %96

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

95:                                               ; No predecessors!
  br label %96

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

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

131:                                              ; preds = %115
  br label %134

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

133:                                              ; No predecessors!
  br label %134

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

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

150:                                              ; preds = %143
  br label %153

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

152:                                              ; No predecessors!
  br label %153

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

169:                                              ; preds = %153
  %170 = load i16, ptr %6, align 2, !tbaa !13
  store i16 %170, ptr %3, align 2
  store i32 1, ptr %10, align 4
  br label %181

171:                                              ; preds = %153
  br label %172

172:                                              ; preds = %175, %171
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = call noundef zeroext i1 @_ZN17double_conversion6Bignum9LessEqualERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(536) %173, ptr noundef nonnull align 8 dereferenceable(536) %12)
  br i1 %174, label %175, label %179

175:                                              ; preds = %172
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN17double_conversion6Bignum14SubtractBignumERKS0_(ptr noundef nonnull align 8 dereferenceable(536) %12, ptr noundef nonnull align 8 dereferenceable(536) %176)
  %177 = load i16, ptr %6, align 2, !tbaa !13
  %178 = add i16 %177, 1
  store i16 %178, ptr %6, align 2, !tbaa !13
  br label %172, !llvm.loop !18

179:                                              ; preds = %172
  %180 = load i16, ptr %6, align 2, !tbaa !13
  store i16 %180, ptr %3, align 2
  store i32 1, ptr %10, align 4
  br label %181

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

182:                                              ; preds = %181, %134
  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 %183

183:                                              ; preds = %182, %36
  %184 = load i16, ptr %3, align 2
  ret i16 %184
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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, !12, i64 528}
!10 = !{!"_ZTSN17double_conversion6BignumE", !7, i64 0, !11, i64 512, !12, i64 528, !12, i64 532}
!11 = !{!"_ZTSN17double_conversion6VectorIjEE", !6, i64 0, !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!12, !12, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !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 [116 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = 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.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = 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 @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12), 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 uwtable
declare dso_local void @_ZN17double_conversion6Bignum5ClampEv(ptr noundef nonnull align 8 dereferenceable(536)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %1, i64 528
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %13, label %12

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

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

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

.lr.ph:                                           ; preds = %17
  %21 = getelementptr inbounds i8, ptr %1, i64 512
  %22 = getelementptr inbounds i8, ptr %0, i64 512
  %23 = getelementptr inbounds i8, ptr %0, i64 528
  br label %24

24:                                               ; preds = %.lr.ph, %38
  %.03844 = phi i16 [ 0, %.lr.ph ], [ %44, %38 ]
  %25 = load i32, ptr %9, align 8, !tbaa !5
  %26 = add nsw i32 %25, -1
  %27 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %21, i32 noundef %26)
  %28 = load i32, ptr %27, align 4, !tbaa !12
  %29 = icmp ugt i32 %28, 16777215
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 507, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

31:                                               ; preds = %24
  %32 = load i32, ptr %23, align 8, !tbaa !5
  %33 = add nsw i32 %32, -1
  %34 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %22, i32 noundef %33)
  %35 = load i32, ptr %34, align 4, !tbaa !12
  %36 = icmp ult i32 %35, 65536
  br i1 %36, label %38, label %37

37:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 508, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

38:                                               ; preds = %31
  %39 = load i32, ptr %23, align 8, !tbaa !5
  %40 = add nsw i32 %39, -1
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %22, i32 noundef %40)
  %42 = load i32, ptr %41, align 4, !tbaa !12
  %43 = trunc i32 %42 to i16
  %44 = add i16 %.03844, %43
  %45 = load i32, ptr %23, align 8, !tbaa !5
  %46 = add nsw i32 %45, -1
  %47 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %22, i32 noundef %46)
  %48 = load i32, ptr %47, align 4, !tbaa !12
  tail call void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 8 dereferenceable(536) %0, ptr noundef nonnull align 8 dereferenceable(536) %1, i32 noundef %48)
  %49 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 8 dereferenceable(536) %0)
  %50 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 8 dereferenceable(536) %1)
  %51 = icmp sgt i32 %49, %50
  br i1 %51, label %24, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %38, %17
  %.038.lcssa = phi i16 [ 0, %17 ], [ %44, %38 ]
  %52 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 8 dereferenceable(536) %0)
  %53 = tail call noundef i32 @_ZNK17double_conversion6Bignum11BigitLengthEv(ptr noundef nonnull align 8 dereferenceable(536) %1)
  %54 = icmp eq i32 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %._crit_edge
  %57 = getelementptr inbounds i8, ptr %0, i64 512
  %58 = getelementptr inbounds i8, ptr %0, i64 528
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = add nsw i32 %59, -1
  %61 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %57, i32 noundef %60)
  %62 = load i32, ptr %61, align 4, !tbaa !12
  %63 = getelementptr inbounds i8, ptr %1, i64 512
  %64 = load i32, ptr %9, align 8, !tbaa !5
  %65 = add nsw i32 %64, -1
  %66 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %63, i32 noundef %65)
  %67 = load i32, ptr %66, align 4, !tbaa !12
  %68 = load i32, ptr %9, align 8, !tbaa !5
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %81

70:                                               ; preds = %56
  %71 = udiv i32 %62, %67
  %72 = mul i32 %71, %67
  %.recomposed = urem i32 %62, %67
  %73 = load i32, ptr %58, align 8, !tbaa !5
  %74 = add nsw i32 %73, -1
  %75 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK17double_conversion6VectorIjEixEi(ptr noundef nonnull align 8 dereferenceable(12) %57, i32 noundef %74)
  store i32 %.recomposed, ptr %75, align 4, !tbaa !12
  %76 = icmp slt i32 %71, 65536
  br i1 %76, label %78, label %77

77:                                               ; preds = %70
  tail call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 527, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17double_conversion6Bignum21DivideModuloIntBignumERKS0_) #3
  unreachable

78:                                               ; preds = %70
  %79 = trunc i32 %71 to i16
  %80 = add i16 %.038.lcssa, %79
  tail call void @_ZN17double_conversion6Bignum5ClampEv(ptr noundef nonnull align 8 dereferenceable(536) %0)
  br label %.loopexit

81:                                               ; preds = %56
  %82 = add i32 %67, 1
  %83 = udiv i32 %62, %82
  %84 = icmp slt i32 %83, 65536
  br i1 %84, label %86, label %85

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

86:                                               ; preds = %81
  %87 = trunc i32 %83 to i16
  %88 = add i16 %.038.lcssa, %87
  tail call void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 8 dereferenceable(536) %0, ptr noundef nonnull align 8 dereferenceable(536) %1, i32 noundef %83)
  %89 = add nsw i32 %83, 1
  %90 = mul i32 %89, %67
  %91 = icmp ugt i32 %90, %62
  br i1 %91, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %86
  %92 = tail call noundef zeroext i1 @_ZN17double_conversion6Bignum9LessEqualERKS0_S2_(ptr noundef nonnull align 8 dereferenceable(536) %1, ptr noundef nonnull align 8 dereferenceable(536) %0)
  br i1 %92, label %.lr.ph46, label %.loopexit

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

.loopexit:                                        ; preds = %.lr.ph46, %.preheader, %78, %86, %13
  %.2 = phi i16 [ 0, %13 ], [ %80, %78 ], [ %88, %86 ], [ %88, %.preheader ], [ %93, %.lr.ph46 ]
  ret i16 %.2
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17double_conversion6Bignum13SubtractTimesERKS0_i(ptr noundef nonnull align 8 dereferenceable(536), ptr noundef nonnull align 8 dereferenceable(536), 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, !11, i64 528}
!6 = !{!"_ZTSN17double_conversion6BignumE", !7, i64 0, !9, i64 512, !11, i64 528, !11, i64 532}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"_ZTSN17double_conversion6VectorIjEE", !10, i64 0, !11, i64 8}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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