; LLVM IR from ChampSim/ChampSim :: tracer/cvp_converter/cvp2champsim.ll (Z9transformy)

; 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.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, bool>, std::_Select1st<std::pair<const unsigned long long, bool>>, std::less<unsigned long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, bool>, std::_Select1st<std::pair<const unsigned long long, bool>>, std::less<unsigned long 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 }
%"class.std::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, unsigned long long>, std::_Select1st<std::pair<const unsigned long long, unsigned long long>>, std::less<unsigned long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, unsigned long long>, std::_Select1st<std::pair<const unsigned long long, unsigned long long>>, std::less<unsigned long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@code_pages = external dso_local global %"class.std::map", align 8
@data_pages = external dso_local global %"class.std::map", align 8
@remapped_pages = external dso_local global %"class.std::map.0", align 8
@bump_page = external dso_local global i64, align 8
@stderr = external global ptr, align 8
@_ZZ9transformyE10num_allocs = external hidden global i32, align 4
@.str.33 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

declare i32 @fflush(ptr noundef) #1

; 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 uwtable
define dso_local noundef i64 @_Z9transformy(i64 noundef %0) #3 {
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %12 = lshr i64 %11, 12
  store i64 %12, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %13 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %13, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %14 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) @code_pages, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %15 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %5, i32 0, i32 0
  store ptr %14, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %16 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @code_pages) #5
  %17 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %6, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  %18 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKybEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br i1 %18, label %19, label %58

19:                                               ; preds = %1
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIyySt4lessIyESaISt4pairIKyyEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @remapped_pages, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %21 = load i64, ptr %20, align 8, !tbaa !5
  store i64 %21, ptr %4, align 8, !tbaa !5
  %22 = load i64, ptr %4, align 8, !tbaa !5
  %23 = icmp eq i64 %22, 0
  br i1 %23, label %24, label %57

24:                                               ; preds = %19
  %25 = load i32, ptr @_ZZ9transformyE10num_allocs, align 4, !tbaa !9
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr @_ZZ9transformyE10num_allocs, align 4, !tbaa !9
  %27 = load ptr, ptr @stderr, align 8, !tbaa !11
  %28 = load i32, ptr @_ZZ9transformyE10num_allocs, align 4, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.33, i32 noundef %28) #5
  %30 = load ptr, ptr @stderr, align 8, !tbaa !11
  %31 = call i32 @fflush(ptr noundef %30)
  %32 = load i64, ptr @bump_page, align 8, !tbaa !5
  store i64 %32, ptr %4, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %51, %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %34 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) @code_pages, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %35 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %7, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %36 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @code_pages) #5
  %37 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %8, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  %38 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKybEES5_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  br i1 %38, label %45, label %39

39:                                               ; preds = %33
  %40 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) @data_pages, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %9, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @data_pages) #5
  %43 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %10, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  %44 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKybEES5_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %45

45:                                               ; preds = %39, %33
  %46 = phi i1 [ true, %33 ], [ %44, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br i1 %46, label %47, label %50

47:                                               ; preds = %45
  %48 = load i64, ptr %4, align 8, !tbaa !5
  %49 = add i64 %48, 1
  store i64 %49, ptr %4, align 8, !tbaa !5
  br label %51

50:                                               ; preds = %45
  br label %52

51:                                               ; preds = %47
  br label %33, !llvm.loop !13

52:                                               ; preds = %50
  %53 = load i64, ptr %4, align 8, !tbaa !5
  %54 = add i64 %53, 1
  store i64 %54, ptr @bump_page, align 8, !tbaa !5
  %55 = load i64, ptr %4, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIyySt4lessIyESaISt4pairIKyyEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @remapped_pages, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store i64 %55, ptr %56, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %52, %19
  br label %58

58:                                               ; preds = %57, %1
  %59 = load i64, ptr %4, align 8, !tbaa !5
  %60 = shl i64 %59, 12
  %61 = load i64, ptr %2, align 8, !tbaa !5
  %62 = and i64 %61, 4095
  %63 = or i64 %60, %62
  store i64 %63, ptr %2, align 8, !tbaa !5
  %64 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret i64 %64
}

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

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

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

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

attributes #0 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, bool>, std::_Select1st<std::pair<const unsigned long long, bool>>, std::less<unsigned long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, bool>, std::_Select1st<std::pair<const unsigned long long, bool>>, std::less<unsigned long 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 }
%"class.std::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, unsigned long long>, std::_Select1st<std::pair<const unsigned long long, unsigned long long>>, std::less<unsigned long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, unsigned long long>, std::_Select1st<std::pair<const unsigned long long, unsigned long long>>, std::less<unsigned long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@code_pages = external dso_local global %"class.std::map", align 8
@data_pages = external dso_local global %"class.std::map", align 8
@remapped_pages = external dso_local global %"class.std::map.0", align 8
@bump_page = external dso_local local_unnamed_addr global i64, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@_ZZ9transformyE10num_allocs = external hidden local_unnamed_addr global i32, align 4
@.str.33 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z9transformy(i64 noundef %0) local_unnamed_addr #2 {
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %10 = lshr i64 %0, 12
  store i64 %10, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %11 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) @code_pages, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store ptr %11, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %12 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @code_pages) #4
  store ptr %12, ptr %5, align 8
  %13 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKybEES5_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br i1 %13, label %14, label %41

14:                                               ; preds = %1
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIyySt4lessIyESaISt4pairIKyyEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @remapped_pages, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %16 = load i64, ptr %15, align 8, !tbaa !5
  %17 = icmp eq i64 %16, 0
  br i1 %17, label %18, label %41

18:                                               ; preds = %14
  %19 = load i32, ptr @_ZZ9transformyE10num_allocs, align 4, !tbaa !9
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr @_ZZ9transformyE10num_allocs, align 4, !tbaa !9
  %21 = load ptr, ptr @stderr, align 8, !tbaa !11
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.33, i32 noundef %20) #5
  %23 = load ptr, ptr @stderr, align 8, !tbaa !11
  %24 = call i32 @fflush(ptr noundef %23)
  %25 = load i64, ptr @bump_page, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %34, %18
  %storemerge = phi i64 [ %25, %18 ], [ %36, %34 ]
  store i64 %storemerge, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %27 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) @code_pages, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %27, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %28 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @code_pages) #4
  store ptr %28, ptr %7, align 8
  %29 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKybEES5_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  br i1 %29, label %.critedge, label %30

30:                                               ; preds = %26
  %31 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) @data_pages, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %31, ptr %8, align 8
  %32 = call ptr @_ZNSt3mapIybSt4lessIyESaISt4pairIKybEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @data_pages) #4
  store ptr %32, ptr %9, align 8
  %33 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKybEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %33, label %34, label %37

.critedge:                                        ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %34

34:                                               ; preds = %.critedge, %30
  %35 = load i64, ptr %3, align 8, !tbaa !5
  %36 = add i64 %35, 1
  br label %26, !llvm.loop !13

37:                                               ; preds = %30
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = add i64 %38, 1
  store i64 %39, ptr @bump_page, align 8, !tbaa !5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIyySt4lessIyESaISt4pairIKyyEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @remapped_pages, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %38, ptr %40, align 8, !tbaa !5
  %.pre = load i64, ptr %3, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %14, %37, %1
  %42 = phi i64 [ %16, %14 ], [ %.pre, %37 ], [ %10, %1 ]
  %43 = shl i64 %42, 12
  %44 = and i64 %0, 4095
  %45 = or disjoint i64 %43, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  ret i64 %45
}

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

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

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

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass