; LLVM IR from iyinoluwamt/Tensorframe :: main/ios/Pods/DoubleConversion/double-conversion (diy-fp)

; 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::DiyFp" = type <{ i64, i32, [4 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17double_conversion5DiyFp8MultiplyERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef nonnull align 8 dereferenceable(12) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  store i64 4294967295, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  %17 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %16, i32 0, i32 0
  %18 = load i64, ptr %17, align 8, !tbaa !11
  %19 = lshr i64 %18, 32
  store i64 %19, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  %20 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %16, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = and i64 %21, 4294967295
  store i64 %22, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %23, i32 0, i32 0
  %25 = load i64, ptr %24, align 8, !tbaa !11
  %26 = lshr i64 %25, 32
  store i64 %26, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !11
  %30 = and i64 %29, 4294967295
  store i64 %30, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  %31 = load i64, ptr %6, align 8, !tbaa !9
  %32 = load i64, ptr %8, align 8, !tbaa !9
  %33 = mul i64 %31, %32
  store i64 %33, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %34 = load i64, ptr %7, align 8, !tbaa !9
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = mul i64 %34, %35
  store i64 %36, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  %37 = load i64, ptr %6, align 8, !tbaa !9
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = mul i64 %37, %38
  store i64 %39, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  %40 = load i64, ptr %7, align 8, !tbaa !9
  %41 = load i64, ptr %9, align 8, !tbaa !9
  %42 = mul i64 %40, %41
  store i64 %42, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  %43 = load i64, ptr %13, align 8, !tbaa !9
  %44 = lshr i64 %43, 32
  %45 = load i64, ptr %12, align 8, !tbaa !9
  %46 = and i64 %45, 4294967295
  %47 = add i64 %44, %46
  %48 = load i64, ptr %11, align 8, !tbaa !9
  %49 = and i64 %48, 4294967295
  %50 = add i64 %47, %49
  store i64 %50, ptr %14, align 8, !tbaa !9
  %51 = load i64, ptr %14, align 8, !tbaa !9
  %52 = add i64 %51, 2147483648
  store i64 %52, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  %53 = load i64, ptr %10, align 8, !tbaa !9
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = lshr i64 %54, 32
  %56 = add i64 %53, %55
  %57 = load i64, ptr %11, align 8, !tbaa !9
  %58 = lshr i64 %57, 32
  %59 = add i64 %56, %58
  %60 = load i64, ptr %14, align 8, !tbaa !9
  %61 = lshr i64 %60, 32
  %62 = add i64 %59, %61
  store i64 %62, ptr %15, align 8, !tbaa !9
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 8, !tbaa !14
  %66 = add nsw i32 %65, 64
  %67 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %16, i32 0, i32 1
  %68 = load i32, ptr %67, align 8, !tbaa !14
  %69 = add nsw i32 %68, %66
  store i32 %69, ptr %67, align 8, !tbaa !14
  %70 = load i64, ptr %15, align 8, !tbaa !9
  %71 = getelementptr inbounds %"class.double_conversion::DiyFp", ptr %16, i32 0, i32 0
  store i64 %70, ptr %71, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  ret void
}

; 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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN17double_conversion5DiyFpE", !10, i64 0, !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 8}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @_ZN17double_conversion5DiyFp8MultiplyERKS0_(ptr nocapture noundef nonnull align 8 dereferenceable(12) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(12) %1) local_unnamed_addr #0 align 2 {
  %3 = load i64, ptr %0, align 8, !tbaa !5
  %4 = lshr i64 %3, 32
  %5 = and i64 %3, 4294967295
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = lshr i64 %6, 32
  %8 = and i64 %6, 4294967295
  %9 = mul nuw i64 %7, %4
  %10 = mul nuw i64 %7, %5
  %11 = mul nuw i64 %8, %4
  %12 = mul nuw i64 %8, %5
  %13 = lshr i64 %12, 32
  %14 = and i64 %11, 4294967295
  %15 = and i64 %10, 4294967295
  %16 = add nuw nsw i64 %14, 2147483648
  %17 = add nuw nsw i64 %16, %13
  %18 = add nuw nsw i64 %17, %15
  %19 = lshr i64 %11, 32
  %20 = add nuw i64 %19, %9
  %21 = lshr i64 %10, 32
  %22 = add nuw i64 %20, %21
  %23 = lshr i64 %18, 32
  %24 = add i64 %22, %23
  %25 = getelementptr inbounds i8, ptr %1, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !11
  %27 = add nsw i32 %26, 64
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !11
  %30 = add nsw i32 %27, %29
  store i32 %30, ptr %28, align 8, !tbaa !11
  store i64 %24, ptr %0, align 8, !tbaa !5
  ret void
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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" }

!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_conversion5DiyFpE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass