; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/test/test_malloc_pools.ll (Z19TestPoolGranularityv)

; 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.rml::MemPoolPolicy" = type { ptr, ptr, i64, i32, i32 }

@.str.20 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@__const._Z19TestPoolGranularityv.grans = external hidden unnamed_addr constant [4 x i64], align 16
@_ZL15currGranularity = external hidden global i64, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [31 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #2 align 2

declare noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef, ptr noundef, ptr noundef) #3

declare noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef, i64 noundef) #3

declare noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef) #3

declare noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19TestPoolGranularityv() #1 {
  %1 = alloca %"struct.rml::MemPoolPolicy", align 8
  %2 = alloca [4 x i64], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #5
  call void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef @_ZL10getGranMemlRm, ptr noundef @_ZL10putGranMemlPvm, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const._Z19TestPoolGranularityv.grans, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %50, %0
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = zext i32 %10 to i64
  %12 = icmp ult i64 %11, 4
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %53

14:                                               ; preds = %9
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = zext i32 %15 to i64
  %17 = getelementptr inbounds [4 x i64], ptr %2, i64 0, i64 %16
  %18 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %18, ptr @_ZL15currGranularity, align 8, !tbaa !9
  %19 = getelementptr inbounds %"struct.rml::MemPoolPolicy", ptr %1, i32 0, i32 2
  store i64 %18, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %20 = call noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef 0, ptr noundef %1, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 512000, ptr %6, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %38, %14
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = icmp slt i32 %22, 16777216
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %41

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !14
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = call noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %26, i64 noundef %28)
  store ptr %29, ptr %7, align 8, !tbaa !14
  %30 = load ptr, ptr %7, align 8, !tbaa !14
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %25
  br label %34

33:                                               ; preds = %25
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 495, ptr noundef @.str.42, ptr noundef @.str.43)
  br label %34

34:                                               ; preds = %33, %32
  %35 = load ptr, ptr %5, align 8, !tbaa !14
  %36 = load ptr, ptr %7, align 8, !tbaa !14
  %37 = call noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %35, ptr noundef %36)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %38

38:                                               ; preds = %34
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = add nsw i32 %39, 103424
  store i32 %40, ptr %6, align 4, !tbaa !5
  br label %21, !llvm.loop !15

41:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  %42 = load ptr, ptr %5, align 8, !tbaa !14
  %43 = call noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %42)
  %44 = zext i1 %43 to i8
  store i8 %44, ptr %8, align 1, !tbaa !17
  %45 = load i8, ptr %8, align 1, !tbaa !17, !range !19, !noundef !20
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %48

47:                                               ; preds = %41
  br label %49

48:                                               ; preds = %41
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 499, ptr noundef @.str.23, ptr noundef null)
  br label %49

49:                                               ; preds = %48, %47
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = add i32 %51, 1
  store i32 %52, ptr %3, align 4, !tbaa !5
  br label %9, !llvm.loop !21

53:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10getGranMemlRm(i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10putGranMemlPvm(i64 noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !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 16}
!12 = !{!"_ZTSN3rml13MemPoolPolicyE", !13, i64 0, !13, i64 8, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 28, !6, i64 28}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !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"

%"struct.rml::MemPoolPolicy" = type { ptr, ptr, i64, i32, i32 }

@.str.20 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@__const._Z19TestPoolGranularityv.grans = external hidden unnamed_addr constant [4 x i64], align 16
@_ZL15currGranularity = external hidden local_unnamed_addr global i64, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [31 x i8], align 1

; 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
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #2 align 2

declare noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef, i64 noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19TestPoolGranularityv() local_unnamed_addr #1 {
  %1 = alloca %"struct.rml::MemPoolPolicy", align 8
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #4
  call void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @_ZL10getGranMemlRm, ptr noundef nonnull @_ZL10putGranMemlPvm, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false)
  %3 = getelementptr inbounds i8, ptr %1, i64 16
  %4 = load i64, ptr @__const._Z19TestPoolGranularityv.grans, align 16, !tbaa !5
  store i64 %4, ptr @_ZL15currGranularity, align 8, !tbaa !5
  store i64 %4, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %5 = call noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef 0, ptr noundef nonnull %1, ptr noundef nonnull %2)
  br label %9

6:                                                ; preds = %13
  %7 = load ptr, ptr %2, align 8, !tbaa !13
  %8 = call noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %7)
  br i1 %8, label %18, label %17

9:                                                ; preds = %0, %13
  %indvars.iv = phi i64 [ 512000, %0 ], [ %indvars.iv.next, %13 ]
  %10 = load ptr, ptr %2, align 8, !tbaa !13
  %11 = call noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %10, i64 noundef %indvars.iv)
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %9
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 495, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %13

13:                                               ; preds = %9, %12
  %14 = load ptr, ptr %2, align 8, !tbaa !13
  %15 = call noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %14, ptr noundef %11)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 103424
  %16 = icmp ult i64 %indvars.iv, 16673792
  br i1 %16, label %9, label %6, !llvm.loop !14

17:                                               ; preds = %6
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 499, ptr noundef nonnull @.str.23, ptr noundef null)
  br label %18

18:                                               ; preds = %6, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %19 = load i64, ptr getelementptr inbounds (i8, ptr @__const._Z19TestPoolGranularityv.grans, i64 8), align 8, !tbaa !5
  store i64 %19, ptr @_ZL15currGranularity, align 8, !tbaa !5
  store i64 %19, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %20 = call noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef 0, ptr noundef nonnull %1, ptr noundef nonnull %2)
  br label %21

21:                                               ; preds = %25, %18
  %indvars.iv.1 = phi i64 [ 512000, %18 ], [ %indvars.iv.next.1, %25 ]
  %22 = load ptr, ptr %2, align 8, !tbaa !13
  %23 = call noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %22, i64 noundef %indvars.iv.1)
  %.not.1 = icmp eq ptr %23, null
  br i1 %.not.1, label %24, label %25

24:                                               ; preds = %21
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 495, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %25

25:                                               ; preds = %24, %21
  %26 = load ptr, ptr %2, align 8, !tbaa !13
  %27 = call noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %26, ptr noundef %23)
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 103424
  %28 = icmp ult i64 %indvars.iv.1, 16673792
  br i1 %28, label %21, label %29, !llvm.loop !14

29:                                               ; preds = %25
  %30 = load ptr, ptr %2, align 8, !tbaa !13
  %31 = call noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %30)
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 499, ptr noundef nonnull @.str.23, ptr noundef null)
  br label %33

33:                                               ; preds = %32, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %34 = load i64, ptr getelementptr inbounds (i8, ptr @__const._Z19TestPoolGranularityv.grans, i64 16), align 16, !tbaa !5
  store i64 %34, ptr @_ZL15currGranularity, align 8, !tbaa !5
  store i64 %34, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %35 = call noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef 0, ptr noundef nonnull %1, ptr noundef nonnull %2)
  br label %36

36:                                               ; preds = %40, %33
  %indvars.iv.2 = phi i64 [ 512000, %33 ], [ %indvars.iv.next.2, %40 ]
  %37 = load ptr, ptr %2, align 8, !tbaa !13
  %38 = call noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %37, i64 noundef %indvars.iv.2)
  %.not.2 = icmp eq ptr %38, null
  br i1 %.not.2, label %39, label %40

39:                                               ; preds = %36
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 495, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %40

40:                                               ; preds = %39, %36
  %41 = load ptr, ptr %2, align 8, !tbaa !13
  %42 = call noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %41, ptr noundef %38)
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 103424
  %43 = icmp ult i64 %indvars.iv.2, 16673792
  br i1 %43, label %36, label %44, !llvm.loop !14

44:                                               ; preds = %40
  %45 = load ptr, ptr %2, align 8, !tbaa !13
  %46 = call noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %45)
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 499, ptr noundef nonnull @.str.23, ptr noundef null)
  br label %48

48:                                               ; preds = %47, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %49 = load i64, ptr getelementptr inbounds (i8, ptr @__const._Z19TestPoolGranularityv.grans, i64 24), align 8, !tbaa !5
  store i64 %49, ptr @_ZL15currGranularity, align 8, !tbaa !5
  store i64 %49, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %50 = call noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef 0, ptr noundef nonnull %1, ptr noundef nonnull %2)
  br label %51

51:                                               ; preds = %55, %48
  %indvars.iv.3 = phi i64 [ 512000, %48 ], [ %indvars.iv.next.3, %55 ]
  %52 = load ptr, ptr %2, align 8, !tbaa !13
  %53 = call noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %52, i64 noundef %indvars.iv.3)
  %.not.3 = icmp eq ptr %53, null
  br i1 %.not.3, label %54, label %55

54:                                               ; preds = %51
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 495, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %55

55:                                               ; preds = %54, %51
  %56 = load ptr, ptr %2, align 8, !tbaa !13
  %57 = call noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %56, ptr noundef %53)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 103424
  %58 = icmp ult i64 %indvars.iv.3, 16673792
  br i1 %58, label %51, label %59, !llvm.loop !14

59:                                               ; preds = %55
  %60 = load ptr, ptr %2, align 8, !tbaa !13
  %61 = call noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %60)
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 499, ptr noundef nonnull @.str.23, ptr noundef null)
  br label %63

63:                                               ; preds = %62, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10getGranMemlRm(i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10putGranMemlPvm(i64 noundef, ptr noundef, i64 noundef) #1

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 = { "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 }

!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, !6, i64 16}
!10 = !{!"_ZTSN3rml13MemPoolPolicyE", !11, i64 0, !11, i64 8, !6, i64 16, !12, i64 24, !12, i64 28, !12, i64 28, !12, i64 28}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass