; LLVM IR from adventure-db/adventure :: tests/struct (list_tests)

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

@test1 = external dso_local global ptr, align 8
@test2 = external dso_local global ptr, align 8
@test3 = external dso_local global ptr, align 8
@list = external hidden global ptr, align 8
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #1

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @list_last(ptr noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @list_count(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @test_shift_unshift() #4 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = load ptr, ptr @list, align 8, !tbaa !5
  %5 = load ptr, ptr @test1, align 8, !tbaa !5
  call void @list_unshift(ptr noundef %4, ptr noundef %5)
  %6 = load ptr, ptr @list, align 8, !tbaa !5
  %7 = call ptr @list_last(ptr noundef %6)
  %8 = load ptr, ptr @test1, align 8, !tbaa !5
  %9 = icmp eq ptr %7, %8
  br i1 %9, label %23, label %10

10:                                               ; preds = %0
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = call ptr @__errno_location() #6
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %10
  br label %20

16:                                               ; preds = %10
  %17 = call ptr @__errno_location() #6
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = call ptr @strerror(i32 noundef %18) #7
  br label %20

20:                                               ; preds = %16, %15
  %21 = phi ptr [ @.str.5, %15 ], [ %19, %16 ]
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef @.str.7, ptr noundef @.str.4, i32 noundef 50, ptr noundef %21) #7
  store ptr @.str.8, ptr %1, align 8
  br label %175

23:                                               ; preds = %0
  %24 = load ptr, ptr @list, align 8, !tbaa !5
  %25 = load ptr, ptr @test2, align 8, !tbaa !5
  call void @list_unshift(ptr noundef %24, ptr noundef %25)
  %26 = load ptr, ptr @list, align 8, !tbaa !5
  %27 = call ptr @list_first(ptr noundef %26)
  %28 = load ptr, ptr @test2, align 8, !tbaa !5
  %29 = icmp eq ptr %27, %28
  br i1 %29, label %43, label %30

30:                                               ; preds = %23
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call ptr @__errno_location() #6
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  br label %40

36:                                               ; preds = %30
  %37 = call ptr @__errno_location() #6
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = call ptr @strerror(i32 noundef %38) #7
  br label %40

40:                                               ; preds = %36, %35
  %41 = phi ptr [ @.str.5, %35 ], [ %39, %36 ]
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.13, ptr noundef @.str.4, i32 noundef 53, ptr noundef %41) #7
  store ptr @.str.14, ptr %1, align 8
  br label %175

43:                                               ; preds = %23
  %44 = load ptr, ptr @list, align 8, !tbaa !5
  %45 = call ptr @list_last(ptr noundef %44)
  %46 = load ptr, ptr @test1, align 8, !tbaa !5
  %47 = icmp eq ptr %45, %46
  br i1 %47, label %61, label %48

48:                                               ; preds = %43
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call ptr @__errno_location() #6
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  br label %58

54:                                               ; preds = %48
  %55 = call ptr @__errno_location() #6
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = call ptr @strerror(i32 noundef %56) #7
  br label %58

58:                                               ; preds = %54, %53
  %59 = phi ptr [ @.str.5, %53 ], [ %57, %54 ]
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.7, ptr noundef @.str.4, i32 noundef 54, ptr noundef %59) #7
  store ptr @.str.8, ptr %1, align 8
  br label %175

61:                                               ; preds = %43
  %62 = load ptr, ptr @list, align 8, !tbaa !5
  %63 = load ptr, ptr @test3, align 8, !tbaa !5
  call void @list_unshift(ptr noundef %62, ptr noundef %63)
  %64 = load ptr, ptr @list, align 8, !tbaa !5
  %65 = call ptr @list_first(ptr noundef %64)
  %66 = load ptr, ptr @test3, align 8, !tbaa !5
  %67 = icmp eq ptr %65, %66
  br i1 %67, label %81, label %68

68:                                               ; preds = %61
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = call ptr @__errno_location() #6
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  br label %78

74:                                               ; preds = %68
  %75 = call ptr @__errno_location() #6
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = call ptr @strerror(i32 noundef %76) #7
  br label %78

78:                                               ; preds = %74, %73
  %79 = phi ptr [ @.str.5, %73 ], [ %77, %74 ]
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.13, ptr noundef @.str.4, i32 noundef 57, ptr noundef %79) #7
  store ptr @.str.14, ptr %1, align 8
  br label %175

81:                                               ; preds = %61
  %82 = load ptr, ptr @list, align 8, !tbaa !5
  %83 = call ptr @list_last(ptr noundef %82)
  %84 = load ptr, ptr @test1, align 8, !tbaa !5
  %85 = icmp eq ptr %83, %84
  br i1 %85, label %99, label %86

86:                                               ; preds = %81
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call ptr @__errno_location() #6
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %86
  br label %96

92:                                               ; preds = %86
  %93 = call ptr @__errno_location() #6
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = call ptr @strerror(i32 noundef %94) #7
  br label %96

96:                                               ; preds = %92, %91
  %97 = phi ptr [ @.str.5, %91 ], [ %95, %92 ]
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.7, ptr noundef @.str.4, i32 noundef 58, ptr noundef %97) #7
  store ptr @.str.8, ptr %1, align 8
  br label %175

99:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %100 = load ptr, ptr @list, align 8, !tbaa !5
  %101 = call ptr @list_shift(ptr noundef %100)
  store ptr %101, ptr %2, align 8, !tbaa !5
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = load ptr, ptr @test3, align 8, !tbaa !5
  %104 = icmp eq ptr %102, %103
  br i1 %104, label %118, label %105

105:                                              ; preds = %99
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = call ptr @__errno_location() #6
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  br label %115

111:                                              ; preds = %105
  %112 = call ptr @__errno_location() #6
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = call ptr @strerror(i32 noundef %113) #7
  br label %115

115:                                              ; preds = %111, %110
  %116 = phi ptr [ @.str.5, %110 ], [ %114, %111 ]
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.15, ptr noundef @.str.4, i32 noundef 61, ptr noundef %116) #7
  store ptr @.str.16, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %174

118:                                              ; preds = %99
  %119 = load ptr, ptr @list, align 8, !tbaa !5
  %120 = call ptr @list_shift(ptr noundef %119)
  store ptr %120, ptr %2, align 8, !tbaa !5
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = load ptr, ptr @test2, align 8, !tbaa !5
  %123 = icmp eq ptr %121, %122
  br i1 %123, label %137, label %124

124:                                              ; preds = %118
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = call ptr @__errno_location() #6
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %130

129:                                              ; preds = %124
  br label %134

130:                                              ; preds = %124
  %131 = call ptr @__errno_location() #6
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = call ptr @strerror(i32 noundef %132) #7
  br label %134

134:                                              ; preds = %130, %129
  %135 = phi ptr [ @.str.5, %129 ], [ %133, %130 ]
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.15, ptr noundef @.str.4, i32 noundef 64, ptr noundef %135) #7
  store ptr @.str.16, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %174

137:                                              ; preds = %118
  %138 = load ptr, ptr @list, align 8, !tbaa !5
  %139 = call ptr @list_shift(ptr noundef %138)
  store ptr %139, ptr %2, align 8, !tbaa !5
  %140 = load ptr, ptr %2, align 8, !tbaa !5
  %141 = load ptr, ptr @test1, align 8, !tbaa !5
  %142 = icmp eq ptr %140, %141
  br i1 %142, label %156, label %143

143:                                              ; preds = %137
  %144 = load ptr, ptr @stderr, align 8, !tbaa !5
  %145 = call ptr @__errno_location() #6
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = icmp eq i32 %146, 0
  br i1 %147, label %148, label %149

148:                                              ; preds = %143
  br label %153

149:                                              ; preds = %143
  %150 = call ptr @__errno_location() #6
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = call ptr @strerror(i32 noundef %151) #7
  br label %153

153:                                              ; preds = %149, %148
  %154 = phi ptr [ @.str.5, %148 ], [ %152, %149 ]
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.15, ptr noundef @.str.4, i32 noundef 67, ptr noundef %154) #7
  store ptr @.str.16, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %174

156:                                              ; preds = %137
  %157 = load ptr, ptr @list, align 8, !tbaa !5
  %158 = call i64 @list_count(ptr noundef %157)
  %159 = icmp eq i64 %158, 0
  br i1 %159, label %173, label %160

160:                                              ; preds = %156
  %161 = load ptr, ptr @stderr, align 8, !tbaa !5
  %162 = call ptr @__errno_location() #6
  %163 = load i32, ptr %162, align 4, !tbaa !9
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %160
  br label %170

166:                                              ; preds = %160
  %167 = call ptr @__errno_location() #6
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = call ptr @strerror(i32 noundef %168) #7
  br label %170

170:                                              ; preds = %166, %165
  %171 = phi ptr [ @.str.5, %165 ], [ %169, %166 ]
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.11, ptr noundef @.str.4, i32 noundef 68, ptr noundef %171) #7
  store ptr @.str.12, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %174

173:                                              ; preds = %156
  store ptr null, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %174

174:                                              ; preds = %173, %170, %153, %134, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %175

175:                                              ; preds = %174, %96, %78, %58, %40, %20
  %176 = load ptr, ptr %1, align 8
  ret ptr %176
}

declare void @list_unshift(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @list_first(ptr noundef) #2

declare ptr @list_shift(ptr noundef) #5

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}


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

@test1 = external dso_local local_unnamed_addr global ptr, align 8
@test2 = external dso_local local_unnamed_addr global ptr, align 8
@test3 = external dso_local local_unnamed_addr global ptr, align 8
@list = external hidden local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #1

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @list_last(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @list_count(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @test_shift_unshift() local_unnamed_addr #4 {
  %1 = load ptr, ptr @list, align 8, !tbaa !5
  %2 = load ptr, ptr @test1, align 8, !tbaa !5
  tail call void @list_unshift(ptr noundef %1, ptr noundef %2) #6
  %3 = load ptr, ptr @list, align 8, !tbaa !5
  %4 = tail call ptr @list_last(ptr noundef %3)
  %5 = load ptr, ptr @test1, align 8, !tbaa !5
  %6 = icmp eq ptr %4, %5
  br i1 %6, label %17, label %7

7:                                                ; preds = %0
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call ptr @__errno_location() #7
  %10 = load i32, ptr %9, align 4, !tbaa !9
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %14, label %12

12:                                               ; preds = %7
  %13 = tail call ptr @strerror(i32 noundef %10) #6
  br label %14

14:                                               ; preds = %7, %12
  %15 = phi ptr [ %13, %12 ], [ @.str.5, %7 ]
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.4, i32 noundef 50, ptr noundef %15) #8
  br label %140

17:                                               ; preds = %0
  %18 = load ptr, ptr @list, align 8, !tbaa !5
  %19 = load ptr, ptr @test2, align 8, !tbaa !5
  tail call void @list_unshift(ptr noundef %18, ptr noundef %19) #6
  %20 = load ptr, ptr @list, align 8, !tbaa !5
  %21 = tail call ptr @list_first(ptr noundef %20)
  %22 = load ptr, ptr @test2, align 8, !tbaa !5
  %23 = icmp eq ptr %21, %22
  br i1 %23, label %34, label %24

24:                                               ; preds = %17
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = tail call ptr @__errno_location() #7
  %27 = load i32, ptr %26, align 4, !tbaa !9
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %31, label %29

29:                                               ; preds = %24
  %30 = tail call ptr @strerror(i32 noundef %27) #6
  br label %31

31:                                               ; preds = %24, %29
  %32 = phi ptr [ %30, %29 ], [ @.str.5, %24 ]
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.4, i32 noundef 53, ptr noundef %32) #8
  br label %140

34:                                               ; preds = %17
  %35 = load ptr, ptr @list, align 8, !tbaa !5
  %36 = tail call ptr @list_last(ptr noundef %35)
  %37 = load ptr, ptr @test1, align 8, !tbaa !5
  %38 = icmp eq ptr %36, %37
  br i1 %38, label %49, label %39

39:                                               ; preds = %34
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = tail call ptr @__errno_location() #7
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %46, label %44

44:                                               ; preds = %39
  %45 = tail call ptr @strerror(i32 noundef %42) #6
  br label %46

46:                                               ; preds = %39, %44
  %47 = phi ptr [ %45, %44 ], [ @.str.5, %39 ]
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.4, i32 noundef 54, ptr noundef %47) #8
  br label %140

49:                                               ; preds = %34
  %50 = load ptr, ptr @list, align 8, !tbaa !5
  %51 = load ptr, ptr @test3, align 8, !tbaa !5
  tail call void @list_unshift(ptr noundef %50, ptr noundef %51) #6
  %52 = load ptr, ptr @list, align 8, !tbaa !5
  %53 = tail call ptr @list_first(ptr noundef %52)
  %54 = load ptr, ptr @test3, align 8, !tbaa !5
  %55 = icmp eq ptr %53, %54
  br i1 %55, label %66, label %56

56:                                               ; preds = %49
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = tail call ptr @__errno_location() #7
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %63, label %61

61:                                               ; preds = %56
  %62 = tail call ptr @strerror(i32 noundef %59) #6
  br label %63

63:                                               ; preds = %56, %61
  %64 = phi ptr [ %62, %61 ], [ @.str.5, %56 ]
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.4, i32 noundef 57, ptr noundef %64) #8
  br label %140

66:                                               ; preds = %49
  %67 = load ptr, ptr @list, align 8, !tbaa !5
  %68 = tail call ptr @list_last(ptr noundef %67)
  %69 = load ptr, ptr @test1, align 8, !tbaa !5
  %70 = icmp eq ptr %68, %69
  br i1 %70, label %81, label %71

71:                                               ; preds = %66
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = tail call ptr @__errno_location() #7
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %78, label %76

76:                                               ; preds = %71
  %77 = tail call ptr @strerror(i32 noundef %74) #6
  br label %78

78:                                               ; preds = %71, %76
  %79 = phi ptr [ %77, %76 ], [ @.str.5, %71 ]
  %80 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.4, i32 noundef 58, ptr noundef %79) #8
  br label %140

81:                                               ; preds = %66
  %82 = load ptr, ptr @list, align 8, !tbaa !5
  %83 = tail call ptr @list_shift(ptr noundef %82) #6
  %84 = load ptr, ptr @test3, align 8, !tbaa !5
  %85 = icmp eq ptr %83, %84
  br i1 %85, label %96, label %86

86:                                               ; preds = %81
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = tail call ptr @__errno_location() #7
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %93, label %91

91:                                               ; preds = %86
  %92 = tail call ptr @strerror(i32 noundef %89) #6
  br label %93

93:                                               ; preds = %86, %91
  %94 = phi ptr [ %92, %91 ], [ @.str.5, %86 ]
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.4, i32 noundef 61, ptr noundef %94) #8
  br label %140

96:                                               ; preds = %81
  %97 = load ptr, ptr @list, align 8, !tbaa !5
  %98 = tail call ptr @list_shift(ptr noundef %97) #6
  %99 = load ptr, ptr @test2, align 8, !tbaa !5
  %100 = icmp eq ptr %98, %99
  br i1 %100, label %111, label %101

101:                                              ; preds = %96
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = tail call ptr @__errno_location() #7
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %108, label %106

106:                                              ; preds = %101
  %107 = tail call ptr @strerror(i32 noundef %104) #6
  br label %108

108:                                              ; preds = %101, %106
  %109 = phi ptr [ %107, %106 ], [ @.str.5, %101 ]
  %110 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.4, i32 noundef 64, ptr noundef %109) #8
  br label %140

111:                                              ; preds = %96
  %112 = load ptr, ptr @list, align 8, !tbaa !5
  %113 = tail call ptr @list_shift(ptr noundef %112) #6
  %114 = load ptr, ptr @test1, align 8, !tbaa !5
  %115 = icmp eq ptr %113, %114
  br i1 %115, label %126, label %116

116:                                              ; preds = %111
  %117 = load ptr, ptr @stderr, align 8, !tbaa !5
  %118 = tail call ptr @__errno_location() #7
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %123, label %121

121:                                              ; preds = %116
  %122 = tail call ptr @strerror(i32 noundef %119) #6
  br label %123

123:                                              ; preds = %116, %121
  %124 = phi ptr [ %122, %121 ], [ @.str.5, %116 ]
  %125 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.4, i32 noundef 67, ptr noundef %124) #8
  br label %140

126:                                              ; preds = %111
  %127 = load ptr, ptr @list, align 8, !tbaa !5
  %128 = tail call i64 @list_count(ptr noundef %127)
  %129 = icmp eq i64 %128, 0
  br i1 %129, label %140, label %130

130:                                              ; preds = %126
  %131 = load ptr, ptr @stderr, align 8, !tbaa !5
  %132 = tail call ptr @__errno_location() #7
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %137, label %135

135:                                              ; preds = %130
  %136 = tail call ptr @strerror(i32 noundef %133) #6
  br label %137

137:                                              ; preds = %130, %135
  %138 = phi ptr [ %136, %135 ], [ @.str.5, %130 ]
  %139 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.4, i32 noundef 68, ptr noundef %138) #8
  br label %140

140:                                              ; preds = %93, %108, %123, %137, %126, %78, %63, %46, %31, %14
  %.1 = phi ptr [ @.str.8, %78 ], [ @.str.14, %63 ], [ @.str.8, %46 ], [ @.str.14, %31 ], [ @.str.8, %14 ], [ @.str.12, %137 ], [ @.str.16, %123 ], [ @.str.16, %108 ], [ @.str.16, %93 ], [ null, %126 ]
  ret ptr %.1
}

declare void @list_unshift(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @list_first(ptr noundef) local_unnamed_addr #3

declare ptr @list_shift(ptr noundef) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 "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 = { 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 #4 = { 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 = { "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 willreturn memory(none) }
attributes #8 = { cold nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass