; LLVM IR from yourtion/LearningMasteringAlgorithms-C :: Example/clist (main)

; 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.CList_ = type { i32, ptr, ptr, ptr }
%struct.CListElmt_ = type { ptr, ptr }

@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [64 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.CList_, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #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 4, ptr %9) #5
  call void @clist_init(ptr noundef %6, ptr noundef @free)
  %11 = getelementptr inbounds %struct.CList_, ptr %6, i32 0, i32 3
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  store ptr %12, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %42, %2
  %14 = load i32, ptr %9, align 4, !tbaa !5
  %15 = icmp slt i32 %14, 10
  br i1 %15, label %16, label %45

16:                                               ; preds = %13
  %17 = call noalias ptr @malloc(i64 noundef 4) #6
  store ptr %17, ptr %8, align 8, !tbaa !9
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %105

20:                                               ; preds = %16
  %21 = load i32, ptr %9, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  %23 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 %22, ptr %23, align 4, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !9
  %25 = load ptr, ptr %8, align 8, !tbaa !9
  %26 = call i32 @clist_ins_next(ptr noundef %6, ptr noundef %24, ptr noundef %25)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %20
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %105

29:                                               ; preds = %20
  %30 = load ptr, ptr %7, align 8, !tbaa !9
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %37

32:                                               ; preds = %29
  %33 = getelementptr inbounds %struct.CList_, ptr %6, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.CListElmt_, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !13
  store ptr %36, ptr %7, align 8, !tbaa !9
  br label %41

37:                                               ; preds = %29
  %38 = load ptr, ptr %7, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.CListElmt_, ptr %38, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !13
  store ptr %40, ptr %7, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %37, %32
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !5
  br label %13, !llvm.loop !15

45:                                               ; preds = %13
  call void @print_list(ptr noundef %6)
  %46 = getelementptr inbounds %struct.CList_, ptr %6, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  store ptr %47, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %55, %45
  %49 = load i32, ptr %9, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 10
  br i1 %50, label %51, label %58

51:                                               ; preds = %48
  %52 = load ptr, ptr %7, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.CListElmt_, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  store ptr %54, ptr %7, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %51
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %9, align 4, !tbaa !5
  br label %48, !llvm.loop !17

58:                                               ; preds = %48
  %59 = load ptr, ptr %7, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.CListElmt_, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  store ptr %61, ptr %8, align 8, !tbaa !9
  %62 = load ptr, ptr @stdout, align 8, !tbaa !9
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str, i32 noundef %64) #5
  %66 = load ptr, ptr %7, align 8, !tbaa !9
  %67 = call i32 @clist_rem_next(ptr noundef %6, ptr noundef %66, ptr noundef %8)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %58
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %105

70:                                               ; preds = %58
  %71 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %71) #5
  call void @print_list(ptr noundef %6)
  %72 = getelementptr inbounds %struct.CList_, ptr %6, i32 0, i32 3
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  store ptr %73, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %81, %70
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = icmp slt i32 %75, 15
  br i1 %76, label %77, label %84

77:                                               ; preds = %74
  %78 = load ptr, ptr %7, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.CListElmt_, ptr %78, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  store ptr %80, ptr %7, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %77
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %9, align 4, !tbaa !5
  br label %74, !llvm.loop !19

84:                                               ; preds = %74
  %85 = load ptr, ptr %7, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.CListElmt_, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  store ptr %87, ptr %8, align 8, !tbaa !9
  %88 = load ptr, ptr @stdout, align 8, !tbaa !9
  %89 = load ptr, ptr %8, align 8, !tbaa !9
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.1, i32 noundef %90) #5
  %92 = call noalias ptr @malloc(i64 noundef 4) #6
  store ptr %92, ptr %8, align 8, !tbaa !9
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %95

94:                                               ; preds = %84
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %105

95:                                               ; preds = %84
  %96 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 11, ptr %96, align 4, !tbaa !5
  %97 = load ptr, ptr %7, align 8, !tbaa !9
  %98 = load ptr, ptr %8, align 8, !tbaa !9
  %99 = call i32 @clist_ins_next(ptr noundef %6, ptr noundef %97, ptr noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %102

101:                                              ; preds = %95
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %105

102:                                              ; preds = %95
  call void @print_list(ptr noundef %6)
  %103 = load ptr, ptr @stdout, align 8, !tbaa !9
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.2) #5
  call void @clist_destroy(ptr noundef %6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %105

105:                                              ; preds = %102, %101, %94, %69, %28, %19
  call void @llvm.lifetime.end.p0(i64 4, 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 32, ptr %6) #5
  %106 = load i32, ptr %3, align 4
  ret i32 %106
}

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

declare void @clist_init(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

declare i32 @clist_ins_next(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @print_list(ptr noundef) #0

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

declare i32 @clist_rem_next(ptr noundef, ptr noundef, ptr noundef) #2

declare void @clist_destroy(ptr noundef) #2

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

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

!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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"CList_", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!13 = !{!14, !10, i64 8}
!14 = !{!"CListElmt_", !10, i64 0, !10, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!14, !10, i64 0}
!19 = distinct !{!19, !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.CList_ = type { i32, ptr, ptr, ptr }

@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [64 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca %struct.CList_, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @clist_init(ptr noundef nonnull %3, ptr noundef nonnull @free) #6
  %5 = getelementptr inbounds i8, ptr %3, i64 24
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %8 = icmp eq ptr %7, null
  br i1 %8, label %.loopexit, label %9

9:                                                ; preds = %2
  store i32 1, ptr %7, align 4, !tbaa !11
  %10 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %6, ptr noundef nonnull %7) #6
  %.not23 = icmp eq i32 %10, 0
  br i1 %.not23, label %11, label %.loopexit

11:                                               ; preds = %9
  %12 = icmp eq ptr %6, null
  %13 = load ptr, ptr %5, align 8
  %.pn = select i1 %12, ptr %13, ptr %6
  %.117.in = getelementptr inbounds i8, ptr %.pn, i64 8
  %.117 = load ptr, ptr %.117.in, align 8, !tbaa !12
  %14 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %15 = icmp eq ptr %14, null
  br i1 %15, label %.loopexit, label %16

16:                                               ; preds = %11
  store i32 2, ptr %14, align 4, !tbaa !11
  %17 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117, ptr noundef nonnull %14) #6
  %.not23.1 = icmp eq i32 %17, 0
  br i1 %.not23.1, label %18, label %.loopexit

18:                                               ; preds = %16
  %19 = icmp eq ptr %.117, null
  %20 = load ptr, ptr %5, align 8
  %.pn.1 = select i1 %19, ptr %20, ptr %.117
  %.117.in.1 = getelementptr inbounds i8, ptr %.pn.1, i64 8
  %.117.1 = load ptr, ptr %.117.in.1, align 8, !tbaa !12
  %21 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %22 = icmp eq ptr %21, null
  br i1 %22, label %.loopexit, label %23

23:                                               ; preds = %18
  store i32 3, ptr %21, align 4, !tbaa !11
  %24 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.1, ptr noundef nonnull %21) #6
  %.not23.2 = icmp eq i32 %24, 0
  br i1 %.not23.2, label %25, label %.loopexit

25:                                               ; preds = %23
  %26 = icmp eq ptr %.117.1, null
  %27 = load ptr, ptr %5, align 8
  %.pn.2 = select i1 %26, ptr %27, ptr %.117.1
  %.117.in.2 = getelementptr inbounds i8, ptr %.pn.2, i64 8
  %.117.2 = load ptr, ptr %.117.in.2, align 8, !tbaa !12
  %28 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %29 = icmp eq ptr %28, null
  br i1 %29, label %.loopexit, label %30

30:                                               ; preds = %25
  store i32 4, ptr %28, align 4, !tbaa !11
  %31 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.2, ptr noundef nonnull %28) #6
  %.not23.3 = icmp eq i32 %31, 0
  br i1 %.not23.3, label %32, label %.loopexit

32:                                               ; preds = %30
  %33 = icmp eq ptr %.117.2, null
  %34 = load ptr, ptr %5, align 8
  %.pn.3 = select i1 %33, ptr %34, ptr %.117.2
  %.117.in.3 = getelementptr inbounds i8, ptr %.pn.3, i64 8
  %.117.3 = load ptr, ptr %.117.in.3, align 8, !tbaa !12
  %35 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %36 = icmp eq ptr %35, null
  br i1 %36, label %.loopexit, label %37

37:                                               ; preds = %32
  store i32 5, ptr %35, align 4, !tbaa !11
  %38 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.3, ptr noundef nonnull %35) #6
  %.not23.4 = icmp eq i32 %38, 0
  br i1 %.not23.4, label %39, label %.loopexit

39:                                               ; preds = %37
  %40 = icmp eq ptr %.117.3, null
  %41 = load ptr, ptr %5, align 8
  %.pn.4 = select i1 %40, ptr %41, ptr %.117.3
  %.117.in.4 = getelementptr inbounds i8, ptr %.pn.4, i64 8
  %.117.4 = load ptr, ptr %.117.in.4, align 8, !tbaa !12
  %42 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  store ptr %42, ptr %4, align 8, !tbaa !14
  %43 = icmp eq ptr %42, null
  br i1 %43, label %.loopexit, label %44

44:                                               ; preds = %39
  store i32 6, ptr %42, align 4, !tbaa !11
  %45 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.4, ptr noundef nonnull %42) #6
  %.not23.5 = icmp eq i32 %45, 0
  br i1 %.not23.5, label %46, label %.loopexit

46:                                               ; preds = %44
  %47 = icmp eq ptr %.117.4, null
  %48 = load ptr, ptr %5, align 8
  %.pn.5 = select i1 %47, ptr %48, ptr %.117.4
  %.117.in.5 = getelementptr inbounds i8, ptr %.pn.5, i64 8
  %.117.5 = load ptr, ptr %.117.in.5, align 8, !tbaa !12
  %49 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %50 = icmp eq ptr %49, null
  br i1 %50, label %.loopexit, label %51

51:                                               ; preds = %46
  store i32 7, ptr %49, align 4, !tbaa !11
  %52 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.5, ptr noundef nonnull %49) #6
  %.not23.6 = icmp eq i32 %52, 0
  br i1 %.not23.6, label %53, label %.loopexit

53:                                               ; preds = %51
  %54 = icmp eq ptr %.117.5, null
  %55 = load ptr, ptr %5, align 8
  %.pn.6 = select i1 %54, ptr %55, ptr %.117.5
  %.117.in.6 = getelementptr inbounds i8, ptr %.pn.6, i64 8
  %.117.6 = load ptr, ptr %.117.in.6, align 8, !tbaa !12
  %56 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %57 = icmp eq ptr %56, null
  br i1 %57, label %.loopexit, label %58

58:                                               ; preds = %53
  store i32 8, ptr %56, align 4, !tbaa !11
  %59 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.6, ptr noundef nonnull %56) #6
  %.not23.7 = icmp eq i32 %59, 0
  br i1 %.not23.7, label %60, label %.loopexit

60:                                               ; preds = %58
  %61 = icmp eq ptr %.117.6, null
  %62 = load ptr, ptr %5, align 8
  %.pn.7 = select i1 %61, ptr %62, ptr %.117.6
  %.117.in.7 = getelementptr inbounds i8, ptr %.pn.7, i64 8
  %.117.7 = load ptr, ptr %.117.in.7, align 8, !tbaa !12
  %63 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %64 = icmp eq ptr %63, null
  br i1 %64, label %.loopexit, label %65

65:                                               ; preds = %60
  store i32 9, ptr %63, align 4, !tbaa !11
  %66 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.7, ptr noundef nonnull %63) #6
  %.not23.8 = icmp eq i32 %66, 0
  br i1 %.not23.8, label %67, label %.loopexit

67:                                               ; preds = %65
  %68 = icmp eq ptr %.117.7, null
  %69 = load ptr, ptr %5, align 8
  %.pn.8 = select i1 %68, ptr %69, ptr %.117.7
  %.117.in.8 = getelementptr inbounds i8, ptr %.pn.8, i64 8
  %.117.8 = load ptr, ptr %.117.in.8, align 8, !tbaa !12
  %70 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  %71 = icmp eq ptr %70, null
  br i1 %71, label %.loopexit, label %72

72:                                               ; preds = %67
  store i32 10, ptr %70, align 4, !tbaa !11
  %73 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef %.117.8, ptr noundef nonnull %70) #6
  %.not23.9 = icmp eq i32 %73, 0
  br i1 %.not23.9, label %74, label %.loopexit

74:                                               ; preds = %72
  call void @print_list(ptr noundef nonnull %3)
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !12
  %78 = getelementptr inbounds i8, ptr %77, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !12
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !12
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = load ptr, ptr %82, align 8, !tbaa !12
  %84 = getelementptr inbounds i8, ptr %83, i64 8
  %85 = load ptr, ptr %84, align 8, !tbaa !12
  %86 = getelementptr inbounds i8, ptr %85, i64 8
  %87 = load ptr, ptr %86, align 8, !tbaa !12
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = load ptr, ptr %88, align 8, !tbaa !12
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = load ptr, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds i8, ptr %91, i64 8
  %93 = load ptr, ptr %92, align 8, !tbaa !12
  %94 = getelementptr inbounds i8, ptr %93, i64 8
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  store ptr %96, ptr %4, align 8, !tbaa !14
  %97 = load ptr, ptr @stdout, align 8, !tbaa !14
  %98 = load i32, ptr %96, align 4, !tbaa !11
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef nonnull @.str, i32 noundef %98) #6
  %100 = call i32 @clist_rem_next(ptr noundef nonnull %3, ptr noundef nonnull %95, ptr noundef nonnull %4) #6
  %.not = icmp eq i32 %100, 0
  br i1 %.not, label %101, label %.loopexit

101:                                              ; preds = %74
  %102 = load ptr, ptr %4, align 8, !tbaa !14
  call void @free(ptr noundef %102) #6
  call void @print_list(ptr noundef nonnull %3)
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 8
  %105 = load ptr, ptr %104, align 8, !tbaa !12
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = load ptr, ptr %106, align 8, !tbaa !12
  %108 = getelementptr inbounds i8, ptr %107, i64 8
  %109 = load ptr, ptr %108, align 8, !tbaa !12
  %110 = getelementptr inbounds i8, ptr %109, i64 8
  %111 = load ptr, ptr %110, align 8, !tbaa !12
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  %113 = load ptr, ptr %112, align 8, !tbaa !12
  %114 = getelementptr inbounds i8, ptr %113, i64 8
  %115 = load ptr, ptr %114, align 8, !tbaa !12
  %116 = getelementptr inbounds i8, ptr %115, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !12
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  %119 = load ptr, ptr %118, align 8, !tbaa !12
  %120 = getelementptr inbounds i8, ptr %119, i64 8
  %121 = load ptr, ptr %120, align 8, !tbaa !12
  %122 = getelementptr inbounds i8, ptr %121, i64 8
  %123 = load ptr, ptr %122, align 8, !tbaa !12
  %124 = getelementptr inbounds i8, ptr %123, i64 8
  %125 = load ptr, ptr %124, align 8, !tbaa !12
  %126 = getelementptr inbounds i8, ptr %125, i64 8
  %127 = load ptr, ptr %126, align 8, !tbaa !12
  %128 = getelementptr inbounds i8, ptr %127, i64 8
  %129 = load ptr, ptr %128, align 8, !tbaa !12
  %130 = getelementptr inbounds i8, ptr %129, i64 8
  %131 = load ptr, ptr %130, align 8, !tbaa !12
  %132 = getelementptr inbounds i8, ptr %131, i64 8
  %133 = load ptr, ptr %132, align 8, !tbaa !12
  %134 = load ptr, ptr %133, align 8, !tbaa !15
  store ptr %134, ptr %4, align 8, !tbaa !14
  %135 = load ptr, ptr @stdout, align 8, !tbaa !14
  %136 = load i32, ptr %134, align 4, !tbaa !11
  %137 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef nonnull @.str.1, i32 noundef %136) #6
  %138 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #7
  store ptr %138, ptr %4, align 8, !tbaa !14
  %139 = icmp eq ptr %138, null
  br i1 %139, label %.loopexit, label %140

140:                                              ; preds = %101
  store i32 11, ptr %138, align 4, !tbaa !11
  %141 = call i32 @clist_ins_next(ptr noundef nonnull %3, ptr noundef nonnull %133, ptr noundef nonnull %138) #6
  %.not22 = icmp eq i32 %141, 0
  br i1 %.not22, label %142, label %.loopexit

142:                                              ; preds = %140
  call void @print_list(ptr noundef nonnull %3)
  %143 = load ptr, ptr @stdout, align 8, !tbaa !14
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef nonnull @.str.2) #6
  call void @clist_destroy(ptr noundef nonnull %3) #6
  br label %.loopexit

.loopexit:                                        ; preds = %9, %2, %11, %16, %18, %23, %25, %30, %32, %37, %39, %44, %46, %51, %53, %58, %60, %65, %67, %72, %140, %101, %74, %142
  %.019 = phi i32 [ 0, %142 ], [ 1, %74 ], [ 1, %101 ], [ 1, %140 ], [ 1, %72 ], [ 1, %67 ], [ 1, %65 ], [ 1, %60 ], [ 1, %58 ], [ 1, %53 ], [ 1, %51 ], [ 1, %46 ], [ 1, %44 ], [ 1, %39 ], [ 1, %37 ], [ 1, %32 ], [ 1, %30 ], [ 1, %25 ], [ 1, %23 ], [ 1, %18 ], [ 1, %16 ], [ 1, %11 ], [ 1, %2 ], [ 1, %9 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret i32 %.019
}

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

declare void @clist_init(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

declare i32 @clist_ins_next(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @print_list(ptr noundef) local_unnamed_addr #0

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

declare i32 @clist_rem_next(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @clist_destroy(ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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, !10, i64 24}
!6 = !{!"CList_", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 8}
!13 = !{!"CListElmt_", !10, i64 0, !10, i64 8}
!14 = !{!10, !10, i64 0}
!15 = !{!13, !10, i64 0}


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