; LLVM IR from taichi-dev/taichi :: taichi/runtime/llvm/runtime_module (runtime)

; 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.range_task_helper_context = type { ptr, ptr, ptr, ptr, i64, i32, i32, i32, i32 }
%struct.RuntimeContext = type { ptr, ptr, i32, 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: 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) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: mustprogress uwtable
define dso_local void @cpu_parallel_range_for_task(ptr noundef %0, i32 noundef %1, i32 noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.range_task_helper_context, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.RuntimeContext, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %20, i64 56, i1 false), !tbaa.struct !11
  %21 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 4
  %22 = load i64, ptr %21, align 8, !tbaa !14
  %23 = call ptr @llvm.stacksave.p0()
  store ptr %23, ptr %8, align 8
  %24 = alloca i8, i64 %22, align 8
  store i64 %22, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %25 = getelementptr inbounds i8, ptr %24, i64 0
  store ptr %25, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !16
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %35

29:                                               ; preds = %3
  %30 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  call void %31(ptr noundef %33, ptr noundef %34)
  br label %35

35:                                               ; preds = %29, %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  %36 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %37, i64 32, i1 false), !tbaa.struct !18
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = getelementptr inbounds %struct.RuntimeContext, ptr %11, i32 0, i32 2
  store i32 %38, ptr %39, align 8, !tbaa !19
  %40 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 8
  %41 = load i32, ptr %40, align 4, !tbaa !21
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %73

43:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %44 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 5
  %45 = load i32, ptr %44, align 8, !tbaa !22
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 7
  %48 = load i32, ptr %47, align 8, !tbaa !23
  %49 = mul nsw i32 %46, %48
  %50 = add nsw i32 %45, %49
  store i32 %50, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 7
  %53 = load i32, ptr %52, align 8, !tbaa !23
  %54 = add nsw i32 %51, %53
  store i32 %54, ptr %14, align 4, !tbaa !9
  %55 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 6
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %57 = load i32, ptr %56, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  store i32 %57, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %58 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %58, ptr %15, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %69, %43
  %60 = load i32, ptr %15, align 4, !tbaa !9
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %72

64:                                               ; preds = %59
  %65 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load i32, ptr %15, align 4, !tbaa !9
  call void %66(ptr noundef %11, ptr noundef %67, i32 noundef %68)
  br label %69

69:                                               ; preds = %64
  %70 = load i32, ptr %15, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %15, align 4, !tbaa !9
  br label %59, !llvm.loop !25

72:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %109

73:                                               ; preds = %35
  %74 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 8
  %75 = load i32, ptr %74, align 4, !tbaa !21
  %76 = icmp eq i32 %75, -1
  br i1 %76, label %77, label %108

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %78 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 6
  %79 = load i32, ptr %78, align 4, !tbaa !27
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 7
  %82 = load i32, ptr %81, align 8, !tbaa !23
  %83 = mul nsw i32 %80, %82
  %84 = sub nsw i32 %79, %83
  store i32 %84, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %85 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %86 = load i32, ptr %16, align 4, !tbaa !9
  %87 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 7
  %88 = load i32, ptr %87, align 8, !tbaa !23
  %89 = mul nsw i32 %86, %88
  store i32 %89, ptr %18, align 4, !tbaa !9
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %91 = load i32, ptr %90, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  store i32 %91, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = sub nsw i32 %92, 1
  store i32 %93, ptr %19, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %104, %77
  %95 = load i32, ptr %19, align 4, !tbaa !9
  %96 = load i32, ptr %17, align 4, !tbaa !9
  %97 = icmp sge i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %107

99:                                               ; preds = %94
  %100 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !24
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i32, ptr %19, align 4, !tbaa !9
  call void %101(ptr noundef %11, ptr noundef %102, i32 noundef %103)
  br label %104

104:                                              ; preds = %99
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %19, align 4, !tbaa !9
  br label %94, !llvm.loop !28

107:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %108

108:                                              ; preds = %107, %73
  br label %109

109:                                              ; preds = %108, %72
  %110 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 3
  %111 = load ptr, ptr %110, align 8, !tbaa !29
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %119

113:                                              ; preds = %109
  %114 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 3
  %115 = load ptr, ptr %114, align 8, !tbaa !29
  %116 = getelementptr inbounds %struct.range_task_helper_context, ptr %7, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !17
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  call void %115(ptr noundef %117, ptr noundef %118)
  br label %119

119:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %120 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %120)
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 willreturn }
attributes #4 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !12, i64 40, i64 4, !9, i64 44, i64 4, !9, i64 48, i64 4, !9, i64 52, i64 4, !9}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 32}
!15 = !{!"_ZTS25range_task_helper_context", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!16 = !{!15, !6, i64 8}
!17 = !{!15, !6, i64 0}
!18 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 4, !9, i64 24, i64 8, !5}
!19 = !{!20, !10, i64 16}
!20 = !{!"_ZTS14RuntimeContext", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24}
!21 = !{!15, !10, i64 52}
!22 = !{!15, !10, i64 40}
!23 = !{!15, !10, i64 48}
!24 = !{!15, !6, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!15, !10, i64 44}
!28 = distinct !{!28, !26}
!29 = !{!15, !6, i64 24}


; 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.range_task_helper_context = type { ptr, ptr, ptr, ptr, i64, i32, i32, i32, i32 }
%struct.RuntimeContext = type { ptr, ptr, i32, 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 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) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: mustprogress uwtable
define dso_local void @cpu_parallel_range_for_task(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #4 {
  %4 = alloca %struct.range_task_helper_context, align 8
  %5 = alloca %struct.RuntimeContext, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(56) %0, i64 56, i1 false), !tbaa.struct !5
  %8 = getelementptr inbounds i8, ptr %4, i64 32
  %9 = load i64, ptr %8, align 8, !tbaa !14
  %10 = tail call ptr @llvm.stacksave.p0()
  %11 = alloca i8, i64 %9, align 8
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !16
  %.not = icmp eq ptr %13, null
  %.pre = load ptr, ptr %4, align 8, !tbaa !17
  br i1 %.not, label %15, label %14

14:                                               ; preds = %3
  call void %13(ptr noundef %.pre, ptr noundef nonnull %11)
  br label %15

15:                                               ; preds = %14, %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %.pre, i64 32, i1 false), !tbaa.struct !18
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 %1, ptr %16, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %4, i64 52
  %18 = load i32, ptr %17, align 4, !tbaa !21
  switch i32 %18, label %.loopexit [
    i32 1, label %19
    i32 -1, label %36
  ]

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %4, i64 40
  %21 = load i32, ptr %20, align 8, !tbaa !22
  %22 = getelementptr inbounds i8, ptr %4, i64 48
  %23 = load i32, ptr %22, align 8, !tbaa !23
  %24 = mul nsw i32 %23, %2
  %25 = add nsw i32 %24, %21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %26 = add nsw i32 %25, %23
  store i32 %26, ptr %6, align 4, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %4, i64 44
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = load i32, ptr %28, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %30 = icmp slt i32 %25, %29
  br i1 %30, label %.lr.ph30, label %.loopexit

.lr.ph30:                                         ; preds = %19
  %31 = getelementptr inbounds i8, ptr %4, i64 16
  br label %32

32:                                               ; preds = %.lr.ph30, %32
  %.02029 = phi i32 [ %25, %.lr.ph30 ], [ %34, %32 ]
  %33 = load ptr, ptr %31, align 8, !tbaa !24
  call void %33(ptr noundef nonnull %5, ptr noundef nonnull %11, i32 noundef %.02029)
  %34 = add nsw i32 %.02029, 1
  %35 = icmp slt i32 %34, %29
  br i1 %35, label %32, label %.loopexit, !llvm.loop !25

36:                                               ; preds = %15
  %37 = getelementptr inbounds i8, ptr %4, i64 44
  %38 = load i32, ptr %37, align 4, !tbaa !27
  %39 = getelementptr inbounds i8, ptr %4, i64 48
  %40 = load i32, ptr %39, align 8, !tbaa !23
  %41 = mul nsw i32 %40, %2
  %42 = sub nsw i32 %38, %41
  %43 = getelementptr inbounds i8, ptr %4, i64 40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %44 = mul nsw i32 %42, %40
  store i32 %44, ptr %7, align 4, !tbaa !12
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %43, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %46 = load i32, ptr %45, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  %.not24.not27 = icmp sgt i32 %42, %46
  br i1 %.not24.not27, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %36
  %47 = getelementptr inbounds i8, ptr %4, i64 16
  br label %48

48:                                               ; preds = %.lr.ph, %48
  %.0.in28 = phi i32 [ %42, %.lr.ph ], [ %.0, %48 ]
  %.0 = add nsw i32 %.0.in28, -1
  %49 = load ptr, ptr %47, align 8, !tbaa !24
  call void %49(ptr noundef nonnull %5, ptr noundef nonnull %11, i32 noundef %.0)
  %.not24.not = icmp sgt i32 %.0, %46
  br i1 %.not24.not, label %48, label %.loopexit, !llvm.loop !28

.loopexit:                                        ; preds = %48, %32, %36, %19, %15
  %50 = getelementptr inbounds i8, ptr %4, i64 24
  %51 = load ptr, ptr %50, align 8, !tbaa !29
  %.not25 = icmp eq ptr %51, null
  br i1 %.not25, label %54, label %52

52:                                               ; preds = %.loopexit
  %53 = load ptr, ptr %4, align 8, !tbaa !17
  call void %51(ptr noundef %53, ptr noundef nonnull %11)
  br label %54

54:                                               ; preds = %52, %.loopexit
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #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 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !6, i64 32, i64 8, !10, i64 40, i64 4, !12, i64 44, i64 4, !12, i64 48, i64 4, !12, i64 52, i64 4, !12}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!15, !11, i64 32}
!15 = !{!"_ZTS25range_task_helper_context", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52}
!16 = !{!15, !7, i64 8}
!17 = !{!15, !7, i64 0}
!18 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 4, !12, i64 24, i64 8, !6}
!19 = !{!20, !13, i64 16}
!20 = !{!"_ZTS14RuntimeContext", !7, i64 0, !7, i64 8, !13, i64 16, !7, i64 24}
!21 = !{!15, !13, i64 52}
!22 = !{!15, !13, i64 40}
!23 = !{!15, !13, i64 48}
!24 = !{!15, !7, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!15, !13, i64 44}
!28 = distinct !{!28, !26}
!29 = !{!15, !7, i64 24}


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