; LLVM IR from attractivechaos/klib :: test (kavl_test)

; 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.my_node = type { i32, %struct.anon }
%struct.anon = type { [2 x ptr], i8, i32 }
%struct.kavl_itr_my = type { [64 x 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: nounwind uwtable
declare dso_local ptr @kavl_insert_my(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @kavl_erase_my(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @kavl_itr_first_my(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @kavl_itr_next_bidir_my(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @check(ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca [256 x i8], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.my_node, align 8
  %10 = alloca %struct.kavl_itr_my, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 256, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 520, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 33, ptr %3, align 4, !tbaa !9
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %36, %0
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = icmp sle i32 %14, 126
  br i1 %15, label %16, label %39

16:                                               ; preds = %13
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = icmp ne i32 %17, 40
  br i1 %18, label %19, label %35

19:                                               ; preds = %16
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = icmp ne i32 %20, 41
  br i1 %21, label %22, label %35

22:                                               ; preds = %19
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = icmp ne i32 %23, 46
  br i1 %24, label %25, label %35

25:                                               ; preds = %22
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = icmp ne i32 %26, 59
  br i1 %27, label %28, label %35

28:                                               ; preds = %25
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = trunc i32 %29 to i8
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %4, align 4, !tbaa !9
  %33 = sext i32 %31 to i64
  %34 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 %33
  store i8 %30, ptr %34, align 1, !tbaa !11
  br label %35

35:                                               ; preds = %28, %25, %22, %19, %16
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %3, align 4, !tbaa !9
  br label %13, !llvm.loop !12

39:                                               ; preds = %13
  %40 = load i32, ptr %4, align 4, !tbaa !9
  %41 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @shuffle(i32 noundef %40, ptr noundef %41)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %65, %39
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %46, label %68

46:                                               ; preds = %42
  %47 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 32) #6
  store ptr %47, ptr %7, align 8, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !11
  %52 = sext i8 %51 to i32
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.my_node, ptr %53, i32 0, i32 0
  store i32 %52, ptr %54, align 8, !tbaa !14
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call ptr @kavl_insert_my(ptr noundef %6, ptr noundef %55, ptr noundef %11)
  store ptr %56, ptr %8, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = icmp ne ptr %57, %58
  br i1 %59, label %60, label %62

60:                                               ; preds = %46
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %61) #5
  br label %62

62:                                               ; preds = %60, %46
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call i32 @check(ptr noundef %63, ptr noundef %5)
  br label %65

65:                                               ; preds = %62
  %66 = load i32, ptr %3, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %3, align 4, !tbaa !9
  br label %42, !llvm.loop !17

68:                                               ; preds = %42
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @shuffle(i32 noundef %69, ptr noundef %70)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %91, %68
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = load i32, ptr %4, align 4, !tbaa !9
  %74 = sdiv i32 %73, 2
  %75 = icmp slt i32 %72, %74
  br i1 %75, label %76, label %94

76:                                               ; preds = %71
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = sext i8 %80 to i32
  %82 = getelementptr inbounds %struct.my_node, ptr %9, i32 0, i32 0
  store i32 %81, ptr %82, align 8, !tbaa !14
  %83 = call ptr @kavl_erase_my(ptr noundef %6, ptr noundef %9, ptr noundef null)
  store ptr %83, ptr %8, align 8, !tbaa !5
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %88

86:                                               ; preds = %76
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %87) #5
  br label %88

88:                                               ; preds = %86, %76
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = call i32 @check(ptr noundef %89, ptr noundef %5)
  br label %91

91:                                               ; preds = %88
  %92 = load i32, ptr %3, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %3, align 4, !tbaa !9
  br label %71, !llvm.loop !18

94:                                               ; preds = %71
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  call void @kavl_itr_first_my(ptr noundef %95, ptr noundef %10)
  br label %96

96:                                               ; preds = %114, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %97 = getelementptr inbounds %struct.kavl_itr_my, ptr %10, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !19
  %99 = getelementptr inbounds %struct.kavl_itr_my, ptr %10, i32 0, i32 0
  %100 = getelementptr inbounds [64 x ptr], ptr %99, i64 0, i64 0
  %101 = icmp ult ptr %98, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %96
  br label %107

103:                                              ; preds = %96
  %104 = getelementptr inbounds %struct.kavl_itr_my, ptr %10, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !19
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  br label %107

107:                                              ; preds = %103, %102
  %108 = phi ptr [ null, %102 ], [ %106, %103 ]
  store ptr %108, ptr %12, align 8, !tbaa !5
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.my_node, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !14
  %112 = call i32 @putchar(i32 noundef %111)
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %113) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %114

114:                                              ; preds = %107
  %115 = call i32 @kavl_itr_next_bidir_my(ptr noundef %10, i32 noundef 1)
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %96, label %117, !llvm.loop !21

117:                                              ; preds = %114
  %118 = call i32 @putchar(i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 520, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %2) #5
  ret i32 0
}

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare i32 @putchar(i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { inlinehint 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 }
attributes #6 = { nounwind allocsize(0,1) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !10, i64 0}
!15 = !{!"my_node", !10, i64 0, !16, i64 8}
!16 = !{!"", !7, i64 0, !7, i64 16, !10, i64 20}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = !{!20, !6, i64 512}
!20 = !{!"kavl_itr_my", !7, i64 0, !6, i64 512}
!21 = distinct !{!21, !13}


; 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.my_node = type { i32, %struct.anon }
%struct.anon = type { [2 x ptr], i8, i32 }
%struct.kavl_itr_my = type { [64 x ptr], 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: nounwind uwtable
declare dso_local ptr @kavl_insert_my(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @kavl_erase_my(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @kavl_itr_first_my(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @kavl_itr_next_bidir_my(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @check(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @shuffle(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca [256 x i8], align 16
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %struct.my_node, align 8
  %5 = alloca %struct.kavl_itr_my, align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  br label %7

7:                                                ; preds = %20, %0
  %.039 = phi i32 [ 33, %0 ], [ %21, %20 ]
  %.03138 = phi i32 [ 0, %0 ], [ %.132.1, %20 ]
  switch i32 %.039, label %8 [
    i32 59, label %13
    i32 46, label %13
    i32 41, label %13
    i32 40, label %13
  ]

8:                                                ; preds = %7
  %9 = trunc nuw i32 %.039 to i8
  %10 = add nsw i32 %.03138, 1
  %11 = sext i32 %.03138 to i64
  %12 = getelementptr inbounds [256 x i8], ptr %1, i64 0, i64 %11
  store i8 %9, ptr %12, align 1, !tbaa !9
  br label %13

13:                                               ; preds = %7, %7, %7, %7, %8
  %.132 = phi i32 [ %10, %8 ], [ %.03138, %7 ], [ %.03138, %7 ], [ %.03138, %7 ], [ %.03138, %7 ]
  switch i32 %.039, label %14 [
    i32 58, label %20
    i32 45, label %20
    i32 40, label %20
    i32 39, label %20
  ]

14:                                               ; preds = %13
  %15 = trunc i32 %.039 to i8
  %16 = add i8 %15, 1
  %17 = add nsw i32 %.132, 1
  %18 = sext i32 %.132 to i64
  %19 = getelementptr inbounds [256 x i8], ptr %1, i64 0, i64 %18
  store i8 %16, ptr %19, align 1, !tbaa !9
  br label %20

20:                                               ; preds = %14, %13, %13, %13, %13
  %.132.1 = phi i32 [ %17, %14 ], [ %.132, %13 ], [ %.132, %13 ], [ %.132, %13 ], [ %.132, %13 ]
  %21 = add nuw nsw i32 %.039, 2
  %exitcond.not.1 = icmp eq i32 %21, 127
  br i1 %exitcond.not.1, label %22, label %7, !llvm.loop !10

22:                                               ; preds = %20
  call void @shuffle(i32 noundef %.132.1, ptr noundef nonnull %1)
  %23 = icmp sgt i32 %.132.1, 0
  br i1 %23, label %.lr.ph.preheader, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %22
  call void @shuffle(i32 noundef %.132.1, ptr noundef nonnull %1)
  br label %._crit_edge44

.lr.ph.preheader:                                 ; preds = %22
  %wide.trip.count = zext nneg i32 %.132.1 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %30
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %30 ]
  %24 = call noalias dereferenceable_or_null(32) ptr @calloc(i64 noundef 1, i64 noundef 32) #7
  %25 = getelementptr inbounds [256 x i8], ptr %1, i64 0, i64 %indvars.iv
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = sext i8 %26 to i32
  store i32 %27, ptr %24, align 8, !tbaa !12
  %28 = call ptr @kavl_insert_my(ptr noundef nonnull %3, ptr noundef nonnull %24, ptr noundef nonnull %6)
  %.not37 = icmp eq ptr %24, %28
  br i1 %.not37, label %30, label %29

29:                                               ; preds = %.lr.ph
  call void @free(ptr noundef nonnull %24) #6
  br label %30

30:                                               ; preds = %29, %.lr.ph
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call i32 @check(ptr noundef %31, ptr noundef nonnull %2)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond46.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %30
  call void @shuffle(i32 noundef %.132.1, ptr noundef nonnull %1)
  %.not52 = icmp eq i32 %.132.1, 1
  br i1 %.not52, label %._crit_edge44, label %.lr.ph43.preheader

.lr.ph43.preheader:                               ; preds = %._crit_edge
  %33 = lshr i32 %.132.1, 1
  %wide.trip.count50 = zext nneg i32 %33 to i64
  br label %.lr.ph43

.lr.ph43:                                         ; preds = %.lr.ph43.preheader, %39
  %indvars.iv47 = phi i64 [ 0, %.lr.ph43.preheader ], [ %indvars.iv.next48, %39 ]
  %34 = getelementptr inbounds [256 x i8], ptr %1, i64 0, i64 %indvars.iv47
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = sext i8 %35 to i32
  store i32 %36, ptr %4, align 8, !tbaa !12
  %37 = call ptr @kavl_erase_my(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef null)
  %.not36 = icmp eq ptr %37, null
  br i1 %.not36, label %39, label %38

38:                                               ; preds = %.lr.ph43
  call void @free(ptr noundef nonnull %37) #6
  br label %39

39:                                               ; preds = %38, %.lr.ph43
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = call i32 @check(ptr noundef %40, ptr noundef nonnull %2)
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count50
  br i1 %exitcond51.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !17

._crit_edge44:                                    ; preds = %39, %._crit_edge.thread, %._crit_edge
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  call void @kavl_itr_first_my(ptr noundef %42, ptr noundef nonnull %5)
  %43 = getelementptr inbounds i8, ptr %5, i64 512
  br label %44

44:                                               ; preds = %44, %._crit_edge44
  %45 = load ptr, ptr %43, align 8, !tbaa !18
  %46 = icmp uge ptr %45, %5
  call void @llvm.assume(i1 %46)
  %47 = load ptr, ptr %45, align 8, !tbaa !5
  %48 = load i32, ptr %47, align 8, !tbaa !12
  %49 = call i32 @putchar(i32 noundef %48)
  call void @free(ptr noundef %47) #6
  %50 = call i32 @kavl_itr_next_bidir_my(ptr noundef nonnull %5, i32 noundef 1)
  %.not = icmp eq i32 %50, 0
  br i1 %.not, label %51, label %44, !llvm.loop !20

51:                                               ; preds = %44
  %52 = call i32 @putchar(i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %1) #6
  ret i32 0
}

; 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 #2

; 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: inlinehint nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #5

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

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !14, i64 0}
!13 = !{!"my_node", !14, i64 0, !15, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 16, !14, i64 20}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = !{!19, !6, i64 512}
!19 = !{!"kavl_itr_my", !7, i64 0, !6, i64 512}
!20 = distinct !{!20, !11}


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