; LLVM IR from JessonYue/LeetCodeLearning :: Array/caiweixiong/c (homework_037)

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

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.intersection_2 = external hidden unnamed_addr constant [51 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: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @intersection_2(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %32, label %23

23:                                               ; preds = %5
  %24 = load i32, ptr %10, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %32, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %32

29:                                               ; preds = %26
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %34, label %32

32:                                               ; preds = %29, %26, %23, %5
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %33, align 4, !tbaa !9
  store ptr null, ptr %6, align 8
  br label %111

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %40

38:                                               ; preds = %34
  %39 = load i32, ptr %8, align 4, !tbaa !9
  br label %42

40:                                               ; preds = %34
  %41 = load i32, ptr %10, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %40, %38
  %43 = phi i32 [ %39, %38 ], [ %41, %40 ]
  store i32 %43, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %44, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %45, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = call noalias ptr @calloc(i64 noundef %47, i64 noundef 4) #6
  store ptr %48, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %49 = call noalias ptr @calloc(i64 noundef 1024, i64 noundef 4) #6
  store ptr %49, ptr %17, align 8, !tbaa !5
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %56

52:                                               ; preds = %42
  %53 = load ptr, ptr %17, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  br label %57

56:                                               ; preds = %52, %42
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 60, ptr noundef @__PRETTY_FUNCTION__.intersection_2) #7
  unreachable

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %64, %57
  %59 = load i32, ptr %18, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %75

63:                                               ; preds = %58
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds i32, ptr %66, i32 1
  store ptr %67, ptr %14, align 8, !tbaa !5
  %68 = load i32, ptr %66, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %65, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %70, align 4, !tbaa !9
  %73 = load i32, ptr %18, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %18, align 4, !tbaa !9
  br label %58, !llvm.loop !11

75:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %103, %75
  %77 = load i32, ptr %19, align 4, !tbaa !9
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

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

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = getelementptr inbounds i32, ptr %82, i32 1
  store ptr %83, ptr %15, align 8, !tbaa !5
  %84 = load i32, ptr %82, align 4, !tbaa !9
  store i32 %84, ptr %20, align 4, !tbaa !9
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = load i32, ptr %20, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %85, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %102

91:                                               ; preds = %81
  %92 = load ptr, ptr %17, align 8, !tbaa !5
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  store i32 0, ptr %95, align 4, !tbaa !9
  %96 = load i32, ptr %20, align 4, !tbaa !9
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %13, align 4, !tbaa !9
  %100 = sext i32 %98 to i64
  %101 = getelementptr inbounds i32, ptr %97, i64 %100
  store i32 %96, ptr %101, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %91, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %19, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %19, align 4, !tbaa !9
  br label %76, !llvm.loop !13

106:                                              ; preds = %80
  %107 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %107) #5
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %108, ptr %109, align 4, !tbaa !9
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %110, ptr %6, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %111

111:                                              ; preds = %106, %32
  %112 = load ptr, ptr %6, align 8
  ret ptr %112
}

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0,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 = { noreturn 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 #3 = { 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 "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 = { nounwind allocsize(0,1) }
attributes #7 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.intersection_2 = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @intersection_2(ptr noundef readonly %0, i32 noundef %1, ptr noundef readonly %2, i32 noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #2 {
  %6 = icmp ne i32 %1, 0
  %7 = icmp ne i32 %3, 0
  %or.cond.not51 = and i1 %6, %7
  %8 = icmp ne ptr %0, null
  %or.cond3 = and i1 %8, %or.cond.not51
  %9 = icmp ne ptr %2, null
  %or.cond5 = and i1 %9, %or.cond3
  br i1 %or.cond5, label %10, label %79

10:                                               ; preds = %5
  %11 = tail call i32 @llvm.smin.i32(i32 %1, i32 %3)
  %12 = sext i32 %11 to i64
  %13 = tail call noalias ptr @calloc(i64 noundef %12, i64 noundef 4) #5
  %14 = tail call noalias dereferenceable_or_null(4096) ptr @calloc(i64 noundef 1024, i64 noundef 4) #5
  %15 = icmp ne ptr %13, null
  %16 = icmp ne ptr %14, null
  %or.cond7 = and i1 %15, %16
  br i1 %or.cond7, label %.preheader52, label %19

.preheader52:                                     ; preds = %10
  %17 = icmp sgt i32 %1, 0
  br i1 %17, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %.preheader52
  %xtraiter = and i32 %1, 3
  %18 = icmp ult i32 %1, 4
  br i1 %18, label %.preheader.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %1, 2147483644
  br label %.lr.ph

19:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 60, ptr noundef nonnull @__PRETTY_FUNCTION__.intersection_2) #6
  unreachable

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph, %.lr.ph.preheader
  %.04453.unr = phi ptr [ %0, %.lr.ph.preheader ], [ %46, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph.epil
  %.04453.epil = phi ptr [ %20, %.lr.ph.epil ], [ %.04453.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %20 = getelementptr inbounds i8, ptr %.04453.epil, i64 4
  %21 = load i32, ptr %.04453.epil, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i32, ptr %14, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %23, align 4, !tbaa !5
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph.epil, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph.epil, %.preheader52
  %26 = icmp sgt i32 %3, 0
  br i1 %26, label %.lr.ph58.preheader, label %._crit_edge

.lr.ph58.preheader:                               ; preds = %.preheader
  %xtraiter60 = and i32 %3, 1
  %27 = icmp eq i32 %3, 1
  br i1 %27, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph58.preheader.new

.lr.ph58.preheader.new:                           ; preds = %.lr.ph58.preheader
  %unroll_iter64 = and i32 %3, 2147483646
  br label %.lr.ph58

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.04453 = phi ptr [ %0, %.lr.ph.preheader.new ], [ %46, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %28 = getelementptr inbounds i8, ptr %.04453, i64 4
  %29 = load i32, ptr %.04453, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %14, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %.04453, i64 8
  %35 = load i32, ptr %28, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %14, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %.04453, i64 12
  %41 = load i32, ptr %34, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %14, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %43, align 4, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %.04453, i64 16
  %47 = load i32, ptr %40, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %14, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %49, align 4, !tbaa !5
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

._crit_edge.loopexit.unr-lcssa:                   ; preds = %78, %.lr.ph58.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph58.preheader ], [ %.1.1, %78 ]
  %.04356.unr = phi i32 [ 0, %.lr.ph58.preheader ], [ %.1.1, %78 ]
  %.04555.unr = phi ptr [ %2, %.lr.ph58.preheader ], [ %69, %78 ]
  %lcmp.mod62.not = icmp eq i32 %xtraiter60, 0
  br i1 %lcmp.mod62.not, label %._crit_edge, label %.lr.ph58.epil

.lr.ph58.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %52 = load i32, ptr %.04555.unr, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %14, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %.not.epil = icmp eq i32 %55, 0
  br i1 %.not.epil, label %._crit_edge, label %56

56:                                               ; preds = %.lr.ph58.epil
  store i32 0, ptr %54, align 4, !tbaa !5
  %57 = add nsw i32 %.04356.unr, 1
  %58 = sext i32 %.04356.unr to i64
  %59 = getelementptr inbounds i32, ptr %13, i64 %58
  store i32 %52, ptr %59, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %56, %.lr.ph58.epil, %.preheader
  %.043.lcssa = phi i32 [ 0, %.preheader ], [ %.1.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %57, %56 ], [ %.04356.unr, %.lr.ph58.epil ]
  tail call void @free(ptr noundef nonnull %14) #7
  br label %79

.lr.ph58:                                         ; preds = %78, %.lr.ph58.preheader.new
  %.04356 = phi i32 [ 0, %.lr.ph58.preheader.new ], [ %.1.1, %78 ]
  %.04555 = phi ptr [ %2, %.lr.ph58.preheader.new ], [ %69, %78 ]
  %niter65 = phi i32 [ 0, %.lr.ph58.preheader.new ], [ %niter65.next.1, %78 ]
  %60 = getelementptr inbounds i8, ptr %.04555, i64 4
  %61 = load i32, ptr %.04555, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %14, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %.not = icmp eq i32 %64, 0
  br i1 %.not, label %.lr.ph58.1, label %65

65:                                               ; preds = %.lr.ph58
  store i32 0, ptr %63, align 4, !tbaa !5
  %66 = add nsw i32 %.04356, 1
  %67 = sext i32 %.04356 to i64
  %68 = getelementptr inbounds i32, ptr %13, i64 %67
  store i32 %61, ptr %68, align 4, !tbaa !5
  br label %.lr.ph58.1

.lr.ph58.1:                                       ; preds = %65, %.lr.ph58
  %.1 = phi i32 [ %66, %65 ], [ %.04356, %.lr.ph58 ]
  %69 = getelementptr inbounds i8, ptr %.04555, i64 8
  %70 = load i32, ptr %60, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %14, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %73, 0
  br i1 %.not.1, label %78, label %74

74:                                               ; preds = %.lr.ph58.1
  store i32 0, ptr %72, align 4, !tbaa !5
  %75 = add nsw i32 %.1, 1
  %76 = sext i32 %.1 to i64
  %77 = getelementptr inbounds i32, ptr %13, i64 %76
  store i32 %70, ptr %77, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %74, %.lr.ph58.1
  %.1.1 = phi i32 [ %75, %74 ], [ %.1, %.lr.ph58.1 ]
  %niter65.next.1 = add i32 %niter65, 2
  %niter65.ncmp.1 = icmp eq i32 %niter65.next.1, %unroll_iter64
  br i1 %niter65.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph58, !llvm.loop !13

79:                                               ; preds = %5, %._crit_edge
  %storemerge = phi i32 [ %.043.lcssa, %._crit_edge ], [ 0, %5 ]
  %.0 = phi ptr [ %13, %._crit_edge ], [ null, %5 ]
  store i32 %storemerge, ptr %4, align 4, !tbaa !5
  ret ptr %.0
}

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { noreturn 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 #2 = { 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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind allocsize(0,1) }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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