; LLVM IR from kfv/leetcode :: src/2 (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.ListNode = type { i32, ptr }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @insert(ptr noundef, 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: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 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
declare dso_local void @cleanList(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %8 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 16) #6
  store ptr %8, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.ListNode, ptr %9, i32 0, i32 0
  store i32 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %11 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 16) #6
  store ptr %11, ptr %3, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.ListNode, ptr %12, i32 0, i32 0
  store i32 0, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call ptr @addTwoNumbers(ptr noundef %14, ptr noundef %15)
  store ptr %16, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ListNode, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %0
  br label %23

22:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 53, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

23:                                               ; preds = %21
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  call void @cleanList(ptr noundef %24)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cleanList(ptr noundef %25)
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @cleanList(ptr noundef %26)
  store ptr null, ptr %4, align 8, !tbaa !5
  store ptr null, ptr %2, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @insert(ptr noundef %2, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %27

27:                                               ; preds = %32, %23
  %28 = load i32, ptr %5, align 4, !tbaa !12
  %29 = icmp slt i32 %28, 9
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %35

31:                                               ; preds = %27
  call void @insert(ptr noundef %3, i32 noundef 9)
  br label %32

32:                                               ; preds = %31
  %33 = load i32, ptr %5, align 4, !tbaa !12
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %5, align 4, !tbaa !12
  br label %27, !llvm.loop !13

35:                                               ; preds = %30
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call ptr @addTwoNumbers(ptr noundef %36, ptr noundef %37)
  store ptr %38, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %39, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %40

40:                                               ; preds = %55, %35
  %41 = load i32, ptr %7, align 4, !tbaa !12
  %42 = icmp slt i32 %41, 9
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %40
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ListNode, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %44
  br label %51

50:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 68, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

51:                                               ; preds = %49
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ListNode, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  store ptr %54, ptr %6, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %51
  %56 = load i32, ptr %7, align 4, !tbaa !12
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !12
  br label %40, !llvm.loop !16

58:                                               ; preds = %43
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ListNode, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !9
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  br label %65

64:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 71, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

65:                                               ; preds = %63
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  call void @cleanList(ptr noundef %66)
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cleanList(ptr noundef %67)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  call void @cleanList(ptr noundef %68)
  store ptr null, ptr %4, align 8, !tbaa !5
  store ptr null, ptr %2, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @insert(ptr noundef %2, i32 noundef 9)
  call void @insert(ptr noundef %2, i32 noundef 8)
  call void @insert(ptr noundef %2, i32 noundef 7)
  call void @insert(ptr noundef %3, i32 noundef 3)
  call void @insert(ptr noundef %3, i32 noundef 2)
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = call ptr @addTwoNumbers(ptr noundef %69, ptr noundef %70)
  store ptr %71, ptr %4, align 8, !tbaa !5
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ListNode, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !9
  %75 = icmp eq i32 %74, 2
  br i1 %75, label %76, label %77

76:                                               ; preds = %65
  br label %78

77:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

78:                                               ; preds = %76
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ListNode, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = getelementptr inbounds %struct.ListNode, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !9
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %86

85:                                               ; preds = %78
  br label %87

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

87:                                               ; preds = %85
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ListNode, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !15
  %91 = getelementptr inbounds %struct.ListNode, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %93 = getelementptr inbounds %struct.ListNode, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !9
  %95 = icmp eq i32 %94, 8
  br i1 %95, label %96, label %97

96:                                               ; preds = %87
  br label %98

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

98:                                               ; preds = %96
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  call void @cleanList(ptr noundef %99)
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cleanList(ptr noundef %100)
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  call void @cleanList(ptr noundef %101)
  store ptr null, ptr %4, align 8, !tbaa !5
  store ptr null, ptr %2, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @insert(ptr noundef %2, i32 noundef 5)
  call void @insert(ptr noundef %2, i32 noundef 6)
  call void @insert(ptr noundef %2, i32 noundef 7)
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %102, ptr %3, align 8, !tbaa !5
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = call ptr @addTwoNumbers(ptr noundef %103, ptr noundef %104)
  store ptr %105, ptr %4, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ListNode, ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %98
  br label %112

111:                                              ; preds = %98
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 102, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

112:                                              ; preds = %110
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ListNode, ptr %113, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !15
  %116 = getelementptr inbounds %struct.ListNode, ptr %115, i32 0, i32 0
  %117 = load i32, ptr %116, align 8, !tbaa !9
  %118 = icmp eq i32 %117, 3
  br i1 %118, label %119, label %120

119:                                              ; preds = %112
  br label %121

120:                                              ; preds = %112
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

121:                                              ; preds = %119
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ListNode, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !15
  %125 = getelementptr inbounds %struct.ListNode, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !15
  %127 = getelementptr inbounds %struct.ListNode, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !9
  %129 = icmp eq i32 %128, 5
  br i1 %129, label %130, label %131

130:                                              ; preds = %121
  br label %132

131:                                              ; preds = %121
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 104, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

132:                                              ; preds = %130
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ListNode, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  %136 = getelementptr inbounds %struct.ListNode, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !15
  %138 = getelementptr inbounds %struct.ListNode, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !15
  %140 = getelementptr inbounds %struct.ListNode, ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !9
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %143, label %144

143:                                              ; preds = %132
  br label %145

144:                                              ; preds = %132
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 105, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

145:                                              ; preds = %143
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  call void @cleanList(ptr noundef %146)
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  call void @cleanList(ptr noundef %147)
  store ptr null, ptr %4, align 8, !tbaa !5
  store ptr null, ptr %2, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @insert(ptr noundef %2, i32 noundef 5)
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %148, ptr %3, align 8, !tbaa !5
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = call ptr @addTwoNumbers(ptr noundef %149, ptr noundef %150)
  store ptr %151, ptr %4, align 8, !tbaa !5
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.ListNode, ptr %152, i32 0, i32 0
  %154 = load i32, ptr %153, align 8, !tbaa !9
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %157

156:                                              ; preds = %145
  br label %158

157:                                              ; preds = %145
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 116, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

158:                                              ; preds = %156
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.ListNode, ptr %159, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !15
  %162 = getelementptr inbounds %struct.ListNode, ptr %161, i32 0, i32 0
  %163 = load i32, ptr %162, align 8, !tbaa !9
  %164 = icmp eq i32 %163, 1
  br i1 %164, label %165, label %166

165:                                              ; preds = %158
  br label %167

166:                                              ; preds = %158
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 117, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

167:                                              ; preds = %165
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  call void @cleanList(ptr noundef %168)
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  call void @cleanList(ptr noundef %169)
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret i32 0
}

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

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

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

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


; 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 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %3 = tail call noalias dereferenceable_or_null(16) ptr @calloc(i64 noundef 1, i64 noundef 16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %4 = tail call noalias dereferenceable_or_null(16) ptr @calloc(i64 noundef 1, i64 noundef 16) #7
  %5 = tail call ptr @addTwoNumbers(ptr noundef nonnull %3, ptr noundef nonnull %4) #6
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %9, label %8

8:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 53, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

9:                                                ; preds = %0
  tail call void @cleanList(ptr noundef nonnull %3)
  tail call void @cleanList(ptr noundef nonnull %4)
  tail call void @cleanList(ptr noundef nonnull %5)
  store ptr null, ptr %1, align 8, !tbaa !11
  store ptr null, ptr %2, align 8, !tbaa !11
  call void @insert(ptr noundef nonnull %1, i32 noundef 1)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  call void @insert(ptr noundef nonnull %2, i32 noundef 9)
  %10 = load ptr, ptr %1, align 8, !tbaa !11
  %11 = load ptr, ptr %2, align 8, !tbaa !11
  %12 = call ptr @addTwoNumbers(ptr noundef %10, ptr noundef %11) #6
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %16, label %15

15:                                               ; preds = %51, %46, %41, %36, %31, %26, %21, %16, %9
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 68, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

16:                                               ; preds = %9
  %17 = getelementptr inbounds i8, ptr %12, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %15

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %18, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = load i32, ptr %23, align 8, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %15

26:                                               ; preds = %21
  %27 = getelementptr inbounds i8, ptr %23, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  %29 = load i32, ptr %28, align 8, !tbaa !5
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %15

31:                                               ; preds = %26
  %32 = getelementptr inbounds i8, ptr %28, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !12
  %34 = load i32, ptr %33, align 8, !tbaa !5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %15

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %33, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !12
  %39 = load i32, ptr %38, align 8, !tbaa !5
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %15

41:                                               ; preds = %36
  %42 = getelementptr inbounds i8, ptr %38, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !12
  %44 = load i32, ptr %43, align 8, !tbaa !5
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %15

46:                                               ; preds = %41
  %47 = getelementptr inbounds i8, ptr %43, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !12
  %49 = load i32, ptr %48, align 8, !tbaa !5
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %15

51:                                               ; preds = %46
  %52 = getelementptr inbounds i8, ptr %48, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !12
  %54 = load i32, ptr %53, align 8, !tbaa !5
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %15

56:                                               ; preds = %51
  %57 = getelementptr inbounds i8, ptr %53, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !12
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 71, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

62:                                               ; preds = %56
  %63 = load ptr, ptr %1, align 8, !tbaa !11
  call void @cleanList(ptr noundef %63)
  %64 = load ptr, ptr %2, align 8, !tbaa !11
  call void @cleanList(ptr noundef %64)
  call void @cleanList(ptr noundef nonnull %12)
  store ptr null, ptr %1, align 8, !tbaa !11
  store ptr null, ptr %2, align 8, !tbaa !11
  call void @insert(ptr noundef nonnull %1, i32 noundef 9)
  call void @insert(ptr noundef nonnull %1, i32 noundef 8)
  call void @insert(ptr noundef nonnull %1, i32 noundef 7)
  call void @insert(ptr noundef nonnull %2, i32 noundef 3)
  call void @insert(ptr noundef nonnull %2, i32 noundef 2)
  %65 = load ptr, ptr %1, align 8, !tbaa !11
  %66 = load ptr, ptr %2, align 8, !tbaa !11
  %67 = call ptr @addTwoNumbers(ptr noundef %65, ptr noundef %66) #6
  %68 = load i32, ptr %67, align 8, !tbaa !5
  %69 = icmp eq i32 %68, 2
  br i1 %69, label %71, label %70

70:                                               ; preds = %62
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

71:                                               ; preds = %62
  %72 = getelementptr inbounds i8, ptr %67, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !12
  %74 = load i32, ptr %73, align 8, !tbaa !5
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %77, label %76

76:                                               ; preds = %71
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

77:                                               ; preds = %71
  %78 = getelementptr inbounds i8, ptr %73, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !12
  %80 = load i32, ptr %79, align 8, !tbaa !5
  %81 = icmp eq i32 %80, 8
  br i1 %81, label %83, label %82

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

83:                                               ; preds = %77
  %84 = load ptr, ptr %1, align 8, !tbaa !11
  call void @cleanList(ptr noundef %84)
  %85 = load ptr, ptr %2, align 8, !tbaa !11
  call void @cleanList(ptr noundef %85)
  call void @cleanList(ptr noundef nonnull %67)
  store ptr null, ptr %1, align 8, !tbaa !11
  store ptr null, ptr %2, align 8, !tbaa !11
  call void @insert(ptr noundef nonnull %1, i32 noundef 5)
  call void @insert(ptr noundef nonnull %1, i32 noundef 6)
  call void @insert(ptr noundef nonnull %1, i32 noundef 7)
  %86 = load ptr, ptr %1, align 8, !tbaa !11
  store ptr %86, ptr %2, align 8, !tbaa !11
  %87 = call ptr @addTwoNumbers(ptr noundef %86, ptr noundef %86) #6
  %88 = load i32, ptr %87, align 8, !tbaa !5
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %91, label %90

90:                                               ; preds = %83
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 102, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

91:                                               ; preds = %83
  %92 = getelementptr inbounds i8, ptr %87, i64 8
  %93 = load ptr, ptr %92, align 8, !tbaa !12
  %94 = load i32, ptr %93, align 8, !tbaa !5
  %95 = icmp eq i32 %94, 3
  br i1 %95, label %97, label %96

96:                                               ; preds = %91
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

97:                                               ; preds = %91
  %98 = getelementptr inbounds i8, ptr %93, i64 8
  %99 = load ptr, ptr %98, align 8, !tbaa !12
  %100 = load i32, ptr %99, align 8, !tbaa !5
  %101 = icmp eq i32 %100, 5
  br i1 %101, label %103, label %102

102:                                              ; preds = %97
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 104, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

103:                                              ; preds = %97
  %104 = getelementptr inbounds i8, ptr %99, i64 8
  %105 = load ptr, ptr %104, align 8, !tbaa !12
  %106 = load i32, ptr %105, align 8, !tbaa !5
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %109, label %108

108:                                              ; preds = %103
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 105, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

109:                                              ; preds = %103
  %110 = load ptr, ptr %1, align 8, !tbaa !11
  call void @cleanList(ptr noundef %110)
  call void @cleanList(ptr noundef nonnull %87)
  store ptr null, ptr %1, align 8, !tbaa !11
  store ptr null, ptr %2, align 8, !tbaa !11
  call void @insert(ptr noundef nonnull %1, i32 noundef 5)
  %111 = load ptr, ptr %1, align 8, !tbaa !11
  store ptr %111, ptr %2, align 8, !tbaa !11
  %112 = call ptr @addTwoNumbers(ptr noundef %111, ptr noundef %111) #6
  %113 = load i32, ptr %112, align 8, !tbaa !5
  %114 = icmp eq i32 %113, 0
  br i1 %114, label %116, label %115

115:                                              ; preds = %109
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 116, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

116:                                              ; preds = %109
  %117 = getelementptr inbounds i8, ptr %112, i64 8
  %118 = load ptr, ptr %117, align 8, !tbaa !12
  %119 = load i32, ptr %118, align 8, !tbaa !5
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %122, label %121

121:                                              ; preds = %116
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 117, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

122:                                              ; preds = %116
  %123 = load ptr, ptr %1, align 8, !tbaa !11
  call void @cleanList(ptr noundef %123)
  call void @cleanList(ptr noundef nonnull %112)
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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 = { 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 = { "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 = { 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 #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,1) }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"ListNode", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !10, i64 8}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass