; LLVM IR from pupnp/pupnp :: upnp/test (test_list)

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

@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @list_test_item__new(i32 noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.UpnpListHead, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #5
  call void @UpnpListInit(ptr noundef %3)
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %22, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp slt i32 %13, 10
  br i1 %14, label %15, label %25

15:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = call ptr @list_test_item__new(i32 noundef %16)
  store ptr %17, ptr %4, align 8, !tbaa !9
  %18 = call ptr @UpnpListEnd(ptr noundef %3)
  %19 = load ptr, ptr %4, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.list_test_item, ptr %19, i32 0, i32 0
  %21 = call ptr @UpnpListInsert(ptr noundef %3, ptr noundef %18, ptr noundef %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %22

22:                                               ; preds = %15
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !11

25:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %26 = call ptr @UpnpListBegin(ptr noundef %3)
  store ptr %26, ptr %6, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %45, %25
  %28 = load ptr, ptr %6, align 8, !tbaa !9
  %29 = call ptr @UpnpListEnd(ptr noundef %3)
  %30 = icmp ne ptr %28, %29
  br i1 %30, label %31, label %50

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %32, ptr %7, align 8, !tbaa !9
  %33 = load ptr, ptr %7, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.list_test_item, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 8, !tbaa !13
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %35, i32 noundef %36)
  %38 = load ptr, ptr %7, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.list_test_item, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = icmp eq i32 %40, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %31
  br label %45

44:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 51, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

45:                                               ; preds = %43
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !5
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = call ptr @UpnpListNext(ptr noundef %3, ptr noundef %48)
  store ptr %49, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %27, !llvm.loop !16

50:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %51 = call ptr @UpnpListBegin(ptr noundef %3)
  %52 = call ptr @UpnpListEnd(ptr noundef %3)
  %53 = icmp ne ptr %51, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  br label %56

55:                                               ; preds = %50
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 59, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

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

58:                                               ; preds = %76, %56
  %59 = load ptr, ptr %9, align 8, !tbaa !9
  %60 = call ptr @UpnpListEnd(ptr noundef %3)
  %61 = icmp ne ptr %59, %60
  br i1 %61, label %62, label %82

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  store ptr %63, ptr %10, align 8, !tbaa !9
  %64 = load ptr, ptr %10, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.list_test_item, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !13
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %66, i32 noundef %67)
  %69 = load ptr, ptr %10, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.list_test_item, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 8, !tbaa !13
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = icmp eq i32 %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %62
  br label %76

75:                                               ; preds = %62
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 72, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

76:                                               ; preds = %74
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %8, align 4, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !9
  %80 = call ptr @UpnpListErase(ptr noundef %3, ptr noundef %79)
  store ptr %80, ptr %9, align 8, !tbaa !9
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  call void @free(ptr noundef %81) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %58, !llvm.loop !17

82:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %83 = call ptr @UpnpListBegin(ptr noundef %3)
  %84 = call ptr @UpnpListEnd(ptr noundef %3)
  %85 = icmp eq ptr %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %82
  br label %88

87:                                               ; preds = %82
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 81, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %89 = call ptr @UpnpListBegin(ptr noundef %3)
  store ptr %89, ptr %11, align 8, !tbaa !9
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = call ptr @UpnpListNext(ptr noundef %3, ptr noundef %90)
  %92 = call ptr @UpnpListEnd(ptr noundef %3)
  %93 = icmp eq ptr %91, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %88
  br label %96

95:                                               ; preds = %88
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 84, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

96:                                               ; preds = %94
  %97 = load ptr, ptr %11, align 8, !tbaa !9
  %98 = call ptr @UpnpListEnd(ptr noundef %3)
  %99 = icmp eq ptr %97, %98
  br i1 %99, label %100, label %101

100:                                              ; preds = %96
  br label %102

101:                                              ; preds = %96
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 85, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

102:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

declare void @UpnpListInit(ptr noundef) #3

declare ptr @UpnpListInsert(ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @UpnpListEnd(ptr noundef) #3

declare ptr @UpnpListBegin(ptr noundef) #3

declare i32 @printf(ptr noundef, ...) #3

declare ptr @UpnpListNext(ptr noundef, ptr noundef) #3

declare ptr @UpnpListErase(ptr noundef, ptr noundef) #3

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

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 = { 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 = { "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 = { 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 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 16}
!14 = !{!"list_test_item", !15, i64 0, !6, i64 16}
!15 = !{!"UpnpListHead", !10, i64 0, !10, i64 8}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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"

%struct.UpnpListHead = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @list_test_item__new(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.UpnpListHead, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #6
  call void @UpnpListInit(ptr noundef nonnull %1) #6
  %2 = call ptr @list_test_item__new(i32 noundef 0)
  %3 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %4 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %3, ptr noundef %2) #6
  %5 = call ptr @list_test_item__new(i32 noundef 1)
  %6 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %7 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %6, ptr noundef %5) #6
  %8 = call ptr @list_test_item__new(i32 noundef 2)
  %9 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %10 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %9, ptr noundef %8) #6
  %11 = call ptr @list_test_item__new(i32 noundef 3)
  %12 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %13 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %12, ptr noundef %11) #6
  %14 = call ptr @list_test_item__new(i32 noundef 4)
  %15 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %16 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %15, ptr noundef %14) #6
  %17 = call ptr @list_test_item__new(i32 noundef 5)
  %18 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %19 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %18, ptr noundef %17) #6
  %20 = call ptr @list_test_item__new(i32 noundef 6)
  %21 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %22 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %21, ptr noundef %20) #6
  %23 = call ptr @list_test_item__new(i32 noundef 7)
  %24 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %25 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %24, ptr noundef %23) #6
  %26 = call ptr @list_test_item__new(i32 noundef 8)
  %27 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %28 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %27, ptr noundef %26) #6
  %29 = call ptr @list_test_item__new(i32 noundef 9)
  %30 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %31 = call ptr @UpnpListInsert(ptr noundef nonnull %1, ptr noundef %30, ptr noundef %29) #6
  %32 = call ptr @UpnpListBegin(ptr noundef nonnull %1) #6
  %33 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %.not29 = icmp eq ptr %32, %33
  br i1 %.not29, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %40
  %.02231 = phi i32 [ %41, %40 ], [ 0, %0 ]
  %.02530 = phi ptr [ %42, %40 ], [ %32, %0 ]
  %34 = getelementptr inbounds i8, ptr %.02530, i64 16
  %35 = load i32, ptr %34, align 8, !tbaa !5
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %35, i32 noundef %.02231)
  %37 = load i32, ptr %34, align 8, !tbaa !5
  %38 = icmp eq i32 %37, %.02231
  br i1 %38, label %40, label %39

39:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 51, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

40:                                               ; preds = %.lr.ph
  %41 = add nuw nsw i32 %.02231, 1
  %42 = call ptr @UpnpListNext(ptr noundef nonnull %1, ptr noundef nonnull %.02530) #6
  %43 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %.not = icmp eq ptr %42, %43
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %40, %0
  %44 = call ptr @UpnpListBegin(ptr noundef nonnull %1) #6
  %45 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %.not26 = icmp eq ptr %44, %45
  br i1 %.not26, label %46, label %47

46:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 59, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

47:                                               ; preds = %._crit_edge
  %48 = call ptr @UpnpListBegin(ptr noundef nonnull %1) #6
  %49 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %.not2732 = icmp eq ptr %48, %49
  br i1 %.not2732, label %._crit_edge37, label %.lr.ph36

.lr.ph36:                                         ; preds = %47, %56
  %.02334 = phi ptr [ %58, %56 ], [ %48, %47 ]
  %.02433 = phi i32 [ %57, %56 ], [ 0, %47 ]
  %50 = getelementptr inbounds i8, ptr %.02334, i64 16
  %51 = load i32, ptr %50, align 8, !tbaa !5
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %51, i32 noundef %.02433)
  %53 = load i32, ptr %50, align 8, !tbaa !5
  %54 = icmp eq i32 %53, %.02433
  br i1 %54, label %56, label %55

55:                                               ; preds = %.lr.ph36
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 72, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

56:                                               ; preds = %.lr.ph36
  %57 = add nuw nsw i32 %.02433, 1
  %58 = call ptr @UpnpListErase(ptr noundef nonnull %1, ptr noundef nonnull %.02334) #6
  call void @free(ptr noundef nonnull %.02334) #6
  %59 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %.not27 = icmp eq ptr %58, %59
  br i1 %.not27, label %._crit_edge37, label %.lr.ph36, !llvm.loop !14

._crit_edge37:                                    ; preds = %56, %47
  %60 = call ptr @UpnpListBegin(ptr noundef nonnull %1) #6
  %61 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %62 = icmp eq ptr %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %._crit_edge37
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 81, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

64:                                               ; preds = %._crit_edge37
  %65 = call ptr @UpnpListBegin(ptr noundef nonnull %1) #6
  %66 = call ptr @UpnpListNext(ptr noundef nonnull %1, ptr noundef %65) #6
  %67 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %68 = icmp eq ptr %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 84, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

70:                                               ; preds = %64
  %71 = call ptr @UpnpListEnd(ptr noundef nonnull %1) #6
  %72 = icmp eq ptr %65, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 85, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

74:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  ret i32 0
}

declare void @UpnpListInit(ptr noundef) local_unnamed_addr #3

declare ptr @UpnpListInsert(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @UpnpListEnd(ptr noundef) local_unnamed_addr #3

declare ptr @UpnpListBegin(ptr noundef) local_unnamed_addr #3

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

declare ptr @UpnpListNext(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @UpnpListErase(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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 = { 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 = { "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 = { 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 #5 = { 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 #6 = { nounwind }
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, !11, i64 16}
!6 = !{!"list_test_item", !7, i64 0, !11, i64 16}
!7 = !{!"UpnpListHead", !8, i64 0, !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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