; LLVM IR from zsiciarz/aquila :: aquila/transform/Dct.ll (ZN6Aquila3Dct16getCachedCosinesEmm)

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

%"struct.std::pair" = type { i64, i64 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.Aquila::Dct" = type { %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<unsigned long, unsigned long>, std::pair<const std::pair<unsigned long, unsigned long>, double **>, std::_Select1st<std::pair<const std::pair<unsigned long, unsigned long>, double **>>, std::less<std::pair<unsigned long, unsigned long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<unsigned long, unsigned long>, std::pair<const std::pair<unsigned long, unsigned long>, double **>, std::_Select1st<std::pair<const std::pair<unsigned long, unsigned long>, double **>>, std::less<std::pair<unsigned long, unsigned long>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6Aquila3Dct16getCachedCosinesEmm(ptr noundef nonnull align 8 dereferenceable(48) %0, i64 noundef %1, i64 noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !9
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %16 = call { i64, i64 } @_ZSt9make_pairIRmS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %17 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %18 = extractvalue { i64, i64 } %16, 0
  store i64 %18, ptr %17, align 8
  %19 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %20 = extractvalue { i64, i64 } %16, 1
  store i64 %20, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %21 = getelementptr inbounds %"class.Aquila::Dct", ptr %15, i32 0, i32 0
  %22 = call ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE4findERS6_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %23 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %9, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %24 = getelementptr inbounds %"class.Aquila::Dct", ptr %15, i32 0, i32 0
  %25 = call ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %24) #6
  %26 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %10, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  %27 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_ImmEPPdEES8_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br i1 %27, label %28, label %32

28:                                               ; preds = %3
  %29 = getelementptr inbounds %"class.Aquila::Dct", ptr %15, i32 0, i32 0
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %29, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %31, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %91

32:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %33, i64 8)
  %35 = extractvalue { i64, i1 } %34, 1
  %36 = extractvalue { i64, i1 } %34, 0
  %37 = select i1 %35, i64 -1, i64 %36
  %38 = call noalias noundef nonnull ptr @_Znam(i64 noundef %37) #7
  store ptr %38, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %83, %32
  %40 = load i64, ptr %13, align 8, !tbaa !9
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %42 = icmp ult i64 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %86

44:                                               ; preds = %39
  %45 = load i64, ptr %6, align 8, !tbaa !9
  %46 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %45, i64 8)
  %47 = extractvalue { i64, i1 } %46, 1
  %48 = extractvalue { i64, i1 } %46, 0
  %49 = select i1 %47, i64 -1, i64 %48
  %50 = call noalias noundef nonnull ptr @_Znam(i64 noundef %49) #7
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load i64, ptr %13, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %51, i64 %52
  store ptr %50, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %79, %44
  %55 = load i64, ptr %14, align 8, !tbaa !9
  %56 = load i64, ptr %6, align 8, !tbaa !9
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %82

59:                                               ; preds = %54
  %60 = load i64, ptr %14, align 8, !tbaa !9
  %61 = mul i64 2, %60
  %62 = add i64 %61, 1
  %63 = uitofp i64 %62 to double
  %64 = fmul double 0x400921FB54442D18, %63
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = uitofp i64 %65 to double
  %67 = fmul double %64, %66
  %68 = load i64, ptr %6, align 8, !tbaa !9
  %69 = uitofp i64 %68 to double
  %70 = fmul double 2.000000e+00, %69
  %71 = fdiv double %67, %70
  %72 = call double @cos(double noundef %71) #6
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = load i64, ptr %13, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %73, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = load i64, ptr %14, align 8, !tbaa !9
  %78 = getelementptr inbounds double, ptr %76, i64 %77
  store double %72, ptr %78, align 8, !tbaa !11
  br label %79

79:                                               ; preds = %59
  %80 = load i64, ptr %14, align 8, !tbaa !9
  %81 = add i64 %80, 1
  store i64 %81, ptr %14, align 8, !tbaa !9
  br label %54, !llvm.loop !13

82:                                               ; preds = %58
  br label %83

83:                                               ; preds = %82
  %84 = load i64, ptr %13, align 8, !tbaa !9
  %85 = add i64 %84, 1
  store i64 %85, ptr %13, align 8, !tbaa !9
  br label %39, !llvm.loop !15

86:                                               ; preds = %43
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = getelementptr inbounds %"class.Aquila::Dct", ptr %15, i32 0, i32 0
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %88, ptr noundef nonnull align 8 dereferenceable(16) %8)
  store ptr %87, ptr %89, align 8, !tbaa !5
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %90, ptr %4, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %91

91:                                               ; preds = %86, %28
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  %92 = load ptr, ptr %4, align 8
  ret ptr %92
}

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRmS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE4findERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; Function Attrs: nounwind
declare double @cos(double noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

%"struct.std::pair" = type { i64, i64 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6Aquila3Dct16getCachedCosinesEmm(ptr noundef nonnull align 8 dereferenceable(48) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store i64 %1, ptr %4, align 8, !tbaa !5
  store i64 %2, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %9 = call { i64, i64 } @_ZSt9make_pairIRmS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %10 = extractvalue { i64, i64 } %9, 0
  store i64 %10, ptr %6, align 8
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  %12 = extractvalue { i64, i64 } %9, 1
  store i64 %12, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %13 = call ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE4findERS6_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
  store ptr %13, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %14 = call ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %14, ptr %8, align 8
  %15 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_ImmEPPdEES8_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %15, label %16, label %19

16:                                               ; preds = %3
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  br label %59

19:                                               ; preds = %3
  %20 = load i64, ptr %5, align 8
  %21 = icmp ugt i64 %20, 2305843009213693951
  %22 = shl i64 %20, 3
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = call noalias noundef nonnull ptr @_Znam(i64 noundef %23) #6
  %.not = icmp eq i64 %20, 0
  br i1 %.not, label %._crit_edge21, label %.lr.ph20

.lr.ph20:                                         ; preds = %19
  %25 = load i64, ptr %4, align 8, !tbaa !5
  %.not22 = icmp eq i64 %25, 0
  br i1 %.not22, label %.lr.ph20.split.us, label %.lr.ph20.split

.lr.ph20.split.us:                                ; preds = %.lr.ph20, %.lr.ph20.split.us
  %.01418.us = phi i64 [ %28, %.lr.ph20.split.us ], [ 0, %.lr.ph20 ]
  %26 = call noalias noundef nonnull ptr @_Znam(i64 noundef 0) #6
  %27 = getelementptr inbounds ptr, ptr %24, i64 %.01418.us
  store ptr %26, ptr %27, align 8, !tbaa !9
  %28 = add nuw i64 %.01418.us, 1
  %exitcond.not = icmp eq i64 %28, %20
  br i1 %exitcond.not, label %._crit_edge21, label %.lr.ph20.split.us, !llvm.loop !11

._crit_edge21:                                    ; preds = %._crit_edge, %.lr.ph20.split.us, %19
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
  store ptr %24, ptr %29, align 8, !tbaa !9
  br label %59

.lr.ph20.split:                                   ; preds = %.lr.ph20, %._crit_edge
  %30 = phi i64 [ %38, %._crit_edge ], [ %20, %.lr.ph20 ]
  %31 = phi i64 [ %39, %._crit_edge ], [ %25, %.lr.ph20 ]
  %.01418 = phi i64 [ %40, %._crit_edge ], [ 0, %.lr.ph20 ]
  %32 = icmp ugt i64 %31, 2305843009213693951
  %33 = shl i64 %31, 3
  %34 = select i1 %32, i64 -1, i64 %33
  %35 = call noalias noundef nonnull ptr @_Znam(i64 noundef %34) #6
  %36 = getelementptr inbounds ptr, ptr %24, i64 %.01418
  store ptr %35, ptr %36, align 8, !tbaa !9
  %.not23 = icmp eq i64 %31, 0
  br i1 %.not23, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph20.split
  %37 = uitofp i64 %.01418 to double
  br label %42

._crit_edge.loopexit:                             ; preds = %42
  %.pre = load i64, ptr %5, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph20.split
  %38 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %30, %.lr.ph20.split ]
  %39 = phi i64 [ %57, %._crit_edge.loopexit ], [ 0, %.lr.ph20.split ]
  %40 = add nuw i64 %.01418, 1
  %41 = icmp ult i64 %40, %38
  br i1 %41, label %.lr.ph20.split, label %._crit_edge21, !llvm.loop !13

42:                                               ; preds = %.lr.ph, %42
  %43 = phi i64 [ %31, %.lr.ph ], [ %57, %42 ]
  %.017 = phi i64 [ 0, %.lr.ph ], [ %56, %42 ]
  %44 = shl i64 %.017, 1
  %45 = or disjoint i64 %44, 1
  %46 = insertelement <2 x i64> poison, i64 %45, i64 0
  %47 = insertelement <2 x i64> %46, i64 %43, i64 1
  %48 = uitofp <2 x i64> %47 to <2 x double>
  %49 = fmul <2 x double> %48, <double 0x400921FB54442D18, double 2.000000e+00>
  %50 = extractelement <2 x double> %49, i64 0
  %51 = fmul double %50, %37
  %52 = extractelement <2 x double> %49, i64 1
  %53 = fdiv double %51, %52
  %54 = call double @cos(double noundef %53) #5
  %55 = getelementptr inbounds double, ptr %35, i64 %.017
  store double %54, ptr %55, align 8, !tbaa !15
  %56 = add nuw i64 %.017, 1
  %57 = load i64, ptr %4, align 8, !tbaa !5
  %58 = icmp ult i64 %56, %57
  br i1 %58, label %42, label %._crit_edge.loopexit, !llvm.loop !17

59:                                               ; preds = %._crit_edge21, %16
  %.015 = phi ptr [ %18, %16 ], [ %24, %._crit_edge21 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret ptr %.015
}

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRmS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE4findERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairImmEPPdSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nobuiltin allocsize(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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass