; LLVM IR from xtaci/algorithms :: src (double_linked_list_demo)

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

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1

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

10:                                               ; preds = %0
  %11 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  store ptr %2, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 1
  store ptr %2, ptr %12, align 8, !tbaa !10
  br label %13

13:                                               ; preds = %10
  br label %14

14:                                               ; preds = %13
  br label %15

15:                                               ; preds = %14
  %16 = getelementptr inbounds %struct.list_head, ptr %3, i32 0, i32 0
  store ptr %3, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.list_head, ptr %3, i32 0, i32 1
  store ptr %3, ptr %17, align 8, !tbaa !10
  br label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i32 0, ptr %4, align 4, !tbaa !11
  br label %21

21:                                               ; preds = %33, %19
  %22 = load i32, ptr %4, align 4, !tbaa !11
  %23 = icmp slt i32 %22, 10
  br i1 %23, label %24, label %36

24:                                               ; preds = %21
  %25 = call noalias ptr @malloc(i64 noundef 24) #8
  store ptr %25, ptr %5, align 8, !tbaa !13
  %26 = load i32, ptr %4, align 4, !tbaa !11
  %27 = load ptr, ptr %5, align 8, !tbaa !13
  %28 = getelementptr inbounds %struct.DemoNode, ptr %27, i32 0, i32 0
  store i32 %26, ptr %28, align 8, !tbaa !14
  %29 = load ptr, ptr %5, align 8, !tbaa !13
  %30 = getelementptr inbounds %struct.DemoNode, ptr %29, i32 0, i32 1
  call void @_ZL8list_addP9list_headS0_(ptr noundef %30, ptr noundef %2)
  %31 = load i32, ptr %4, align 4, !tbaa !11
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %31)
  br label %33

33:                                               ; preds = %24
  %34 = load i32, ptr %4, align 4, !tbaa !11
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %4, align 4, !tbaa !11
  br label %21, !llvm.loop !16

36:                                               ; preds = %21
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 10, ptr %4, align 4, !tbaa !11
  br label %38

38:                                               ; preds = %50, %36
  %39 = load i32, ptr %4, align 4, !tbaa !11
  %40 = icmp slt i32 %39, 20
  br i1 %40, label %41, label %53

41:                                               ; preds = %38
  %42 = call noalias ptr @malloc(i64 noundef 24) #8
  store ptr %42, ptr %5, align 8, !tbaa !13
  %43 = load i32, ptr %4, align 4, !tbaa !11
  %44 = load ptr, ptr %5, align 8, !tbaa !13
  %45 = getelementptr inbounds %struct.DemoNode, ptr %44, i32 0, i32 0
  store i32 %43, ptr %45, align 8, !tbaa !14
  %46 = load ptr, ptr %5, align 8, !tbaa !13
  %47 = getelementptr inbounds %struct.DemoNode, ptr %46, i32 0, i32 1
  call void @_ZL8list_addP9list_headS0_(ptr noundef %47, ptr noundef %3)
  %48 = load i32, ptr %4, align 4, !tbaa !11
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %48)
  br label %50

50:                                               ; preds = %41
  %51 = load i32, ptr %4, align 4, !tbaa !11
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %4, align 4, !tbaa !11
  br label %38, !llvm.loop !18

53:                                               ; preds = %38
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %55 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  store ptr %56, ptr %6, align 8, !tbaa !13
  br label %57

57:                                               ; preds = %70, %53
  %58 = load ptr, ptr %6, align 8, !tbaa !13
  %59 = icmp ne ptr %58, %2
  br i1 %59, label %60, label %74

60:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %61 = load ptr, ptr %6, align 8, !tbaa !13
  %62 = ptrtoint ptr %61 to i64
  %63 = sub i64 %62, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %64 = add nsw i64 %63, 1
  %65 = inttoptr i64 %64 to ptr
  store ptr %65, ptr %7, align 8, !tbaa !13
  %66 = load ptr, ptr %7, align 8, !tbaa !13
  %67 = getelementptr inbounds %struct.DemoNode, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !14
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %68)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %70

70:                                               ; preds = %60
  %71 = load ptr, ptr %6, align 8, !tbaa !13
  %72 = getelementptr inbounds %struct.list_head, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  store ptr %73, ptr %6, align 8, !tbaa !13
  br label %57, !llvm.loop !19

74:                                               ; preds = %57
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %76 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !10
  store ptr %77, ptr %6, align 8, !tbaa !13
  br label %78

78:                                               ; preds = %91, %74
  %79 = load ptr, ptr %6, align 8, !tbaa !13
  %80 = icmp ne ptr %79, %2
  br i1 %80, label %81, label %95

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %82 = load ptr, ptr %6, align 8, !tbaa !13
  %83 = ptrtoint ptr %82 to i64
  %84 = sub i64 %83, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %85 = add nsw i64 %84, 1
  %86 = inttoptr i64 %85 to ptr
  store ptr %86, ptr %8, align 8, !tbaa !13
  %87 = load ptr, ptr %8, align 8, !tbaa !13
  %88 = getelementptr inbounds %struct.DemoNode, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !14
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %89)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %91

91:                                               ; preds = %81
  %92 = load ptr, ptr %6, align 8, !tbaa !13
  %93 = getelementptr inbounds %struct.list_head, ptr %92, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8, !tbaa !10
  store ptr %94, ptr %6, align 8, !tbaa !13
  br label %78, !llvm.loop !20

95:                                               ; preds = %78
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %97 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = ptrtoint ptr %98 to i64
  %100 = sub i64 %99, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %101 = add nsw i64 %100, 1
  %102 = inttoptr i64 %101 to ptr
  store ptr %102, ptr %5, align 8, !tbaa !13
  br label %103

103:                                              ; preds = %112, %95
  %104 = load ptr, ptr %5, align 8, !tbaa !13
  %105 = getelementptr inbounds %struct.DemoNode, ptr %104, i32 0, i32 1
  %106 = icmp ne ptr %105, %2
  br i1 %106, label %107, label %121

107:                                              ; preds = %103
  %108 = load ptr, ptr %5, align 8, !tbaa !13
  %109 = getelementptr inbounds %struct.DemoNode, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !14
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %110)
  br label %112

112:                                              ; preds = %107
  %113 = load ptr, ptr %5, align 8, !tbaa !13
  %114 = getelementptr inbounds %struct.DemoNode, ptr %113, i32 0, i32 1
  %115 = getelementptr inbounds %struct.list_head, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !21
  %117 = ptrtoint ptr %116 to i64
  %118 = sub i64 %117, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %119 = add nsw i64 %118, 1
  %120 = inttoptr i64 %119 to ptr
  store ptr %120, ptr %5, align 8, !tbaa !13
  br label %103, !llvm.loop !22

121:                                              ; preds = %103
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %123 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.list_head, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  call void @_ZN3algL8list_mtfEP9list_headS1_(ptr noundef %126, ptr noundef %2)
  %127 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = ptrtoint ptr %128 to i64
  %130 = sub i64 %129, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %131 = add nsw i64 %130, 1
  %132 = inttoptr i64 %131 to ptr
  store ptr %132, ptr %5, align 8, !tbaa !13
  br label %133

133:                                              ; preds = %142, %121
  %134 = load ptr, ptr %5, align 8, !tbaa !13
  %135 = getelementptr inbounds %struct.DemoNode, ptr %134, i32 0, i32 1
  %136 = icmp ne ptr %135, %2
  br i1 %136, label %137, label %151

137:                                              ; preds = %133
  %138 = load ptr, ptr %5, align 8, !tbaa !13
  %139 = getelementptr inbounds %struct.DemoNode, ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 8, !tbaa !14
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %140)
  br label %142

142:                                              ; preds = %137
  %143 = load ptr, ptr %5, align 8, !tbaa !13
  %144 = getelementptr inbounds %struct.DemoNode, ptr %143, i32 0, i32 1
  %145 = getelementptr inbounds %struct.list_head, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !21
  %147 = ptrtoint ptr %146 to i64
  %148 = sub i64 %147, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %149 = add nsw i64 %148, 1
  %150 = inttoptr i64 %149 to ptr
  store ptr %150, ptr %5, align 8, !tbaa !13
  br label %133, !llvm.loop !23

151:                                              ; preds = %133
  %152 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %153 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.list_head, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.list_head, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  call void @_ZN3algL8list_maoEP9list_headS1_(ptr noundef %158, ptr noundef %2)
  %159 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = ptrtoint ptr %160 to i64
  %162 = sub i64 %161, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %163 = add nsw i64 %162, 1
  %164 = inttoptr i64 %163 to ptr
  store ptr %164, ptr %5, align 8, !tbaa !13
  br label %165

165:                                              ; preds = %174, %151
  %166 = load ptr, ptr %5, align 8, !tbaa !13
  %167 = getelementptr inbounds %struct.DemoNode, ptr %166, i32 0, i32 1
  %168 = icmp ne ptr %167, %2
  br i1 %168, label %169, label %183

169:                                              ; preds = %165
  %170 = load ptr, ptr %5, align 8, !tbaa !13
  %171 = getelementptr inbounds %struct.DemoNode, ptr %170, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !14
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %172)
  br label %174

174:                                              ; preds = %169
  %175 = load ptr, ptr %5, align 8, !tbaa !13
  %176 = getelementptr inbounds %struct.DemoNode, ptr %175, i32 0, i32 1
  %177 = getelementptr inbounds %struct.list_head, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !21
  %179 = ptrtoint ptr %178 to i64
  %180 = sub i64 %179, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %181 = add nsw i64 %180, 1
  %182 = inttoptr i64 %181 to ptr
  store ptr %182, ptr %5, align 8, !tbaa !13
  br label %165, !llvm.loop !24

183:                                              ; preds = %165
  %184 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %185 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  call void @_ZL9list_moveP9list_headS0_(ptr noundef %186, ptr noundef %3)
  %187 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %188 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = ptrtoint ptr %189 to i64
  %191 = sub i64 %190, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %192 = add nsw i64 %191, 1
  %193 = inttoptr i64 %192 to ptr
  store ptr %193, ptr %5, align 8, !tbaa !13
  br label %194

194:                                              ; preds = %203, %183
  %195 = load ptr, ptr %5, align 8, !tbaa !13
  %196 = getelementptr inbounds %struct.DemoNode, ptr %195, i32 0, i32 1
  %197 = icmp ne ptr %196, %2
  br i1 %197, label %198, label %212

198:                                              ; preds = %194
  %199 = load ptr, ptr %5, align 8, !tbaa !13
  %200 = getelementptr inbounds %struct.DemoNode, ptr %199, i32 0, i32 0
  %201 = load i32, ptr %200, align 8, !tbaa !14
  %202 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %201)
  br label %203

203:                                              ; preds = %198
  %204 = load ptr, ptr %5, align 8, !tbaa !13
  %205 = getelementptr inbounds %struct.DemoNode, ptr %204, i32 0, i32 1
  %206 = getelementptr inbounds %struct.list_head, ptr %205, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8, !tbaa !21
  %208 = ptrtoint ptr %207 to i64
  %209 = sub i64 %208, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %210 = add nsw i64 %209, 1
  %211 = inttoptr i64 %210 to ptr
  store ptr %211, ptr %5, align 8, !tbaa !13
  br label %194, !llvm.loop !25

212:                                              ; preds = %194
  %213 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %214 = getelementptr inbounds %struct.list_head, ptr %3, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8, !tbaa !5
  %216 = ptrtoint ptr %215 to i64
  %217 = sub i64 %216, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %218 = add nsw i64 %217, 1
  %219 = inttoptr i64 %218 to ptr
  store ptr %219, ptr %5, align 8, !tbaa !13
  br label %220

220:                                              ; preds = %229, %212
  %221 = load ptr, ptr %5, align 8, !tbaa !13
  %222 = getelementptr inbounds %struct.DemoNode, ptr %221, i32 0, i32 1
  %223 = icmp ne ptr %222, %3
  br i1 %223, label %224, label %238

224:                                              ; preds = %220
  %225 = load ptr, ptr %5, align 8, !tbaa !13
  %226 = getelementptr inbounds %struct.DemoNode, ptr %225, i32 0, i32 0
  %227 = load i32, ptr %226, align 8, !tbaa !14
  %228 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %227)
  br label %229

229:                                              ; preds = %224
  %230 = load ptr, ptr %5, align 8, !tbaa !13
  %231 = getelementptr inbounds %struct.DemoNode, ptr %230, i32 0, i32 1
  %232 = getelementptr inbounds %struct.list_head, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !21
  %234 = ptrtoint ptr %233 to i64
  %235 = sub i64 %234, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %236 = add nsw i64 %235, 1
  %237 = inttoptr i64 %236 to ptr
  store ptr %237, ptr %5, align 8, !tbaa !13
  br label %220, !llvm.loop !26

238:                                              ; preds = %220
  %239 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  call void @_ZL16list_splice_initP9list_headS0_(ptr noundef %2, ptr noundef %3)
  %240 = getelementptr inbounds %struct.list_head, ptr %3, i32 0, i32 0
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  %242 = ptrtoint ptr %241 to i64
  %243 = sub i64 %242, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %244 = add nsw i64 %243, 1
  %245 = inttoptr i64 %244 to ptr
  store ptr %245, ptr %5, align 8, !tbaa !13
  br label %246

246:                                              ; preds = %255, %238
  %247 = load ptr, ptr %5, align 8, !tbaa !13
  %248 = getelementptr inbounds %struct.DemoNode, ptr %247, i32 0, i32 1
  %249 = icmp ne ptr %248, %3
  br i1 %249, label %250, label %264

250:                                              ; preds = %246
  %251 = load ptr, ptr %5, align 8, !tbaa !13
  %252 = getelementptr inbounds %struct.DemoNode, ptr %251, i32 0, i32 0
  %253 = load i32, ptr %252, align 8, !tbaa !14
  %254 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %253)
  br label %255

255:                                              ; preds = %250
  %256 = load ptr, ptr %5, align 8, !tbaa !13
  %257 = getelementptr inbounds %struct.DemoNode, ptr %256, i32 0, i32 1
  %258 = getelementptr inbounds %struct.list_head, ptr %257, i32 0, i32 0
  %259 = load ptr, ptr %258, align 8, !tbaa !21
  %260 = ptrtoint ptr %259 to i64
  %261 = sub i64 %260, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %262 = add nsw i64 %261, 1
  %263 = inttoptr i64 %262 to ptr
  store ptr %263, ptr %5, align 8, !tbaa !13
  br label %246, !llvm.loop !27

264:                                              ; preds = %246
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %266 = getelementptr inbounds %struct.list_head, ptr %2, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8, !tbaa !5
  %268 = ptrtoint ptr %267 to i64
  %269 = sub i64 %268, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %270 = add nsw i64 %269, 1
  %271 = inttoptr i64 %270 to ptr
  store ptr %271, ptr %5, align 8, !tbaa !13
  %272 = load ptr, ptr %5, align 8, !tbaa !13
  %273 = getelementptr inbounds %struct.DemoNode, ptr %272, i32 0, i32 1
  %274 = getelementptr inbounds %struct.list_head, ptr %273, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8, !tbaa !21
  %276 = ptrtoint ptr %275 to i64
  %277 = sub i64 %276, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %278 = add nsw i64 %277, 1
  %279 = inttoptr i64 %278 to ptr
  store ptr %279, ptr %9, align 8, !tbaa !13
  br label %280

280:                                              ; preds = %292, %264
  %281 = load ptr, ptr %5, align 8, !tbaa !13
  %282 = getelementptr inbounds %struct.DemoNode, ptr %281, i32 0, i32 1
  %283 = icmp ne ptr %282, %2
  br i1 %283, label %284, label %302

284:                                              ; preds = %280
  %285 = load ptr, ptr %5, align 8, !tbaa !13
  %286 = getelementptr inbounds %struct.DemoNode, ptr %285, i32 0, i32 1
  call void @_ZL8list_delP9list_head(ptr noundef %286)
  %287 = load ptr, ptr %5, align 8, !tbaa !13
  %288 = getelementptr inbounds %struct.DemoNode, ptr %287, i32 0, i32 0
  %289 = load i32, ptr %288, align 8, !tbaa !14
  %290 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %289)
  %291 = load ptr, ptr %5, align 8, !tbaa !13
  call void @free(ptr noundef %291) #7
  br label %292

292:                                              ; preds = %284
  %293 = load ptr, ptr %9, align 8, !tbaa !13
  store ptr %293, ptr %5, align 8, !tbaa !13
  %294 = load ptr, ptr %9, align 8, !tbaa !13
  %295 = getelementptr inbounds %struct.DemoNode, ptr %294, i32 0, i32 1
  %296 = getelementptr inbounds %struct.list_head, ptr %295, i32 0, i32 0
  %297 = load ptr, ptr %296, align 8, !tbaa !21
  %298 = ptrtoint ptr %297 to i64
  %299 = sub i64 %298, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %300 = add nsw i64 %299, 1
  %301 = inttoptr i64 %300 to ptr
  store ptr %301, ptr %9, align 8, !tbaa !13
  br label %280, !llvm.loop !28

302:                                              ; preds = %280
  %303 = getelementptr inbounds %struct.list_head, ptr %3, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8, !tbaa !5
  %305 = ptrtoint ptr %304 to i64
  %306 = sub i64 %305, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %307 = add nsw i64 %306, 1
  %308 = inttoptr i64 %307 to ptr
  store ptr %308, ptr %5, align 8, !tbaa !13
  %309 = load ptr, ptr %5, align 8, !tbaa !13
  %310 = getelementptr inbounds %struct.DemoNode, ptr %309, i32 0, i32 1
  %311 = getelementptr inbounds %struct.list_head, ptr %310, i32 0, i32 0
  %312 = load ptr, ptr %311, align 8, !tbaa !21
  %313 = ptrtoint ptr %312 to i64
  %314 = sub i64 %313, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %315 = add nsw i64 %314, 1
  %316 = inttoptr i64 %315 to ptr
  store ptr %316, ptr %9, align 8, !tbaa !13
  br label %317

317:                                              ; preds = %329, %302
  %318 = load ptr, ptr %5, align 8, !tbaa !13
  %319 = getelementptr inbounds %struct.DemoNode, ptr %318, i32 0, i32 1
  %320 = icmp ne ptr %319, %3
  br i1 %320, label %321, label %339

321:                                              ; preds = %317
  %322 = load ptr, ptr %5, align 8, !tbaa !13
  %323 = getelementptr inbounds %struct.DemoNode, ptr %322, i32 0, i32 1
  call void @_ZL8list_delP9list_head(ptr noundef %323)
  %324 = load ptr, ptr %5, align 8, !tbaa !13
  %325 = getelementptr inbounds %struct.DemoNode, ptr %324, i32 0, i32 0
  %326 = load i32, ptr %325, align 8, !tbaa !14
  %327 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %326)
  %328 = load ptr, ptr %5, align 8, !tbaa !13
  call void @free(ptr noundef %328) #7
  br label %329

329:                                              ; preds = %321
  %330 = load ptr, ptr %9, align 8, !tbaa !13
  store ptr %330, ptr %5, align 8, !tbaa !13
  %331 = load ptr, ptr %9, align 8, !tbaa !13
  %332 = getelementptr inbounds %struct.DemoNode, ptr %331, i32 0, i32 1
  %333 = getelementptr inbounds %struct.list_head, ptr %332, i32 0, i32 0
  %334 = load ptr, ptr %333, align 8, !tbaa !21
  %335 = ptrtoint ptr %334 to i64
  %336 = sub i64 %335, ptrtoint (ptr getelementptr inbounds (%struct.DemoNode, ptr inttoptr (i64 1 to ptr), i32 0, i32 1) to i64)
  %337 = add nsw i64 %336, 1
  %338 = inttoptr i64 %337 to ptr
  store ptr %338, ptr %9, align 8, !tbaa !13
  br label %317, !llvm.loop !29

339:                                              ; preds = %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #7
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL8list_addP9list_headS0_(ptr noundef, ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3algL8list_mtfEP9list_headS1_(ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3algL8list_maoEP9list_headS1_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL9list_moveP9list_headS0_(ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL16list_splice_initP9list_headS0_(ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL8list_delP9list_head(ptr noundef) #5

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

attributes #0 = { mustprogress norecurse 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 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 #4 = { inlinehint mustprogress 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 = { inlinehint mustprogress 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"_ZTS9list_head", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !12, i64 0}
!15 = !{!"_ZTS8DemoNode", !12, i64 0, !6, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = !{!15, !7, i64 8}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !17}
!27 = distinct !{!27, !17}
!28 = distinct !{!28, !17}
!29 = distinct !{!29, !17}


; 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.list_head = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.list_head, align 8
  %2 = alloca %struct.list_head, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  store ptr %1, ptr %1, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr %1, ptr %3, align 8, !tbaa !10
  store ptr %2, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %2, ptr %4, align 8, !tbaa !10
  %5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %6 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 0, ptr %6, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %7, ptr noundef nonnull %1)
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 0)
  %9 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 1, ptr %9, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %10, ptr noundef nonnull %1)
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1)
  %12 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 2, ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %13, ptr noundef nonnull %1)
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2)
  %15 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 3, ptr %15, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %16, ptr noundef nonnull %1)
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 3)
  %18 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 4, ptr %18, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %19, ptr noundef nonnull %1)
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4)
  %21 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 5, ptr %21, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %22, ptr noundef nonnull %1)
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 5)
  %24 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 6, ptr %24, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %25, ptr noundef nonnull %1)
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6)
  %27 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 7, ptr %27, align 8, !tbaa !11
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %28, ptr noundef nonnull %1)
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 7)
  %30 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 8, ptr %30, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %31, ptr noundef nonnull %1)
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8)
  %33 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 9, ptr %33, align 8, !tbaa !11
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %34, ptr noundef nonnull %1)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 9)
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %37 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 10, ptr %37, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %38, ptr noundef nonnull %2)
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 10)
  %40 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 11, ptr %40, align 8, !tbaa !11
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %41, ptr noundef nonnull %2)
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 11)
  %43 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 12, ptr %43, align 8, !tbaa !11
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %44, ptr noundef nonnull %2)
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 12)
  %46 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 13, ptr %46, align 8, !tbaa !11
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %47, ptr noundef nonnull %2)
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 13)
  %49 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 14, ptr %49, align 8, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %50, ptr noundef nonnull %2)
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 14)
  %52 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 15, ptr %52, align 8, !tbaa !11
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %53, ptr noundef nonnull %2)
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 15)
  %55 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 16, ptr %55, align 8, !tbaa !11
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %56, ptr noundef nonnull %2)
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 16)
  %58 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 17, ptr %58, align 8, !tbaa !11
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %59, ptr noundef nonnull %2)
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 17)
  %61 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 18, ptr %61, align 8, !tbaa !11
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %62, ptr noundef nonnull %2)
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 18)
  %64 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  store i32 19, ptr %64, align 8, !tbaa !11
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  call void @_ZL8list_addP9list_headS0_(ptr noundef nonnull %65, ptr noundef nonnull %2)
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 19)
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %.05578 = load ptr, ptr %1, align 8, !tbaa !5
  %.not79 = icmp eq ptr %.05578, %1
  br i1 %.not79, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.05580 = phi ptr [ %.055, %.lr.ph ], [ %.05578, %0 ]
  %68 = ptrtoint ptr %.05580 to i64
  %69 = add i64 %68, -8
  %70 = inttoptr i64 %69 to ptr
  %71 = load i32, ptr %70, align 8, !tbaa !11
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %71)
  %.055 = load ptr, ptr %.05580, align 8, !tbaa !5
  %.not = icmp eq ptr %.055, %1
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %0
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %74 = load ptr, ptr %3, align 8, !tbaa !10
  %.not6781 = icmp eq ptr %74, %1
  br i1 %.not6781, label %._crit_edge85, label %.lr.ph84

.lr.ph84:                                         ; preds = %._crit_edge, %.lr.ph84
  %.15682 = phi ptr [ %81, %.lr.ph84 ], [ %74, %._crit_edge ]
  %75 = ptrtoint ptr %.15682 to i64
  %76 = add i64 %75, -8
  %77 = inttoptr i64 %76 to ptr
  %78 = load i32, ptr %77, align 8, !tbaa !11
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %78)
  %80 = getelementptr inbounds i8, ptr %.15682, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !10
  %.not67 = icmp eq ptr %81, %1
  br i1 %.not67, label %._crit_edge85, label %.lr.ph84, !llvm.loop !16

._crit_edge85:                                    ; preds = %.lr.ph84, %._crit_edge
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %.053.in.in.in86 = load ptr, ptr %1, align 8, !tbaa !5
  %.053.in.in87 = ptrtoint ptr %.053.in.in.in86 to i64
  %.053.in88 = add i64 %.053.in.in87, -8
  %.05389 = inttoptr i64 %.053.in88 to ptr
  %83 = getelementptr inbounds i8, ptr %.05389, i64 8
  %.not6890 = icmp eq ptr %83, %1
  br i1 %.not6890, label %._crit_edge94, label %.lr.ph93

.lr.ph93:                                         ; preds = %._crit_edge85, %.lr.ph93
  %84 = phi ptr [ %87, %.lr.ph93 ], [ %83, %._crit_edge85 ]
  %.05391 = phi ptr [ %.053, %.lr.ph93 ], [ %.05389, %._crit_edge85 ]
  %85 = load i32, ptr %.05391, align 8, !tbaa !11
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %85)
  %.053.in.in.in = load ptr, ptr %84, align 8, !tbaa !5
  %.053.in.in = ptrtoint ptr %.053.in.in.in to i64
  %.053.in = add i64 %.053.in.in, -8
  %.053 = inttoptr i64 %.053.in to ptr
  %87 = getelementptr inbounds i8, ptr %.053, i64 8
  %.not68 = icmp eq ptr %87, %1
  br i1 %.not68, label %._crit_edge94, label %.lr.ph93, !llvm.loop !17

._crit_edge94:                                    ; preds = %.lr.ph93, %._crit_edge85
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %89 = load ptr, ptr %1, align 8, !tbaa !5
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  call void @_ZN3algL8list_mtfEP9list_headS1_(ptr noundef %90, ptr noundef nonnull %1)
  %.154.in.in.in95 = load ptr, ptr %1, align 8, !tbaa !5
  %.154.in.in96 = ptrtoint ptr %.154.in.in.in95 to i64
  %.154.in97 = add i64 %.154.in.in96, -8
  %.15498 = inttoptr i64 %.154.in97 to ptr
  %91 = getelementptr inbounds i8, ptr %.15498, i64 8
  %.not6999 = icmp eq ptr %91, %1
  br i1 %.not6999, label %._crit_edge103, label %.lr.ph102

.lr.ph102:                                        ; preds = %._crit_edge94, %.lr.ph102
  %92 = phi ptr [ %95, %.lr.ph102 ], [ %91, %._crit_edge94 ]
  %.154100 = phi ptr [ %.154, %.lr.ph102 ], [ %.15498, %._crit_edge94 ]
  %93 = load i32, ptr %.154100, align 8, !tbaa !11
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %93)
  %.154.in.in.in = load ptr, ptr %92, align 8, !tbaa !5
  %.154.in.in = ptrtoint ptr %.154.in.in.in to i64
  %.154.in = add i64 %.154.in.in, -8
  %.154 = inttoptr i64 %.154.in to ptr
  %95 = getelementptr inbounds i8, ptr %.154, i64 8
  %.not69 = icmp eq ptr %95, %1
  br i1 %.not69, label %._crit_edge103, label %.lr.ph102, !llvm.loop !18

._crit_edge103:                                   ; preds = %.lr.ph102, %._crit_edge94
  %96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %97 = load ptr, ptr %1, align 8, !tbaa !5
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  call void @_ZN3algL8list_maoEP9list_headS1_(ptr noundef %99, ptr noundef nonnull %1)
  %.2.in.in.in104 = load ptr, ptr %1, align 8, !tbaa !5
  %.2.in.in105 = ptrtoint ptr %.2.in.in.in104 to i64
  %.2.in106 = add i64 %.2.in.in105, -8
  %.2107 = inttoptr i64 %.2.in106 to ptr
  %100 = getelementptr inbounds i8, ptr %.2107, i64 8
  %.not70108 = icmp eq ptr %100, %1
  br i1 %.not70108, label %._crit_edge112, label %.lr.ph111

.lr.ph111:                                        ; preds = %._crit_edge103, %.lr.ph111
  %101 = phi ptr [ %104, %.lr.ph111 ], [ %100, %._crit_edge103 ]
  %.2109 = phi ptr [ %.2, %.lr.ph111 ], [ %.2107, %._crit_edge103 ]
  %102 = load i32, ptr %.2109, align 8, !tbaa !11
  %103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %102)
  %.2.in.in.in = load ptr, ptr %101, align 8, !tbaa !5
  %.2.in.in = ptrtoint ptr %.2.in.in.in to i64
  %.2.in = add i64 %.2.in.in, -8
  %.2 = inttoptr i64 %.2.in to ptr
  %104 = getelementptr inbounds i8, ptr %.2, i64 8
  %.not70 = icmp eq ptr %104, %1
  br i1 %.not70, label %._crit_edge112, label %.lr.ph111, !llvm.loop !19

._crit_edge112:                                   ; preds = %.lr.ph111, %._crit_edge103
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %106 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_ZL9list_moveP9list_headS0_(ptr noundef %106, ptr noundef nonnull %2)
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.3.in.in.in113 = load ptr, ptr %1, align 8, !tbaa !5
  %.3.in.in114 = ptrtoint ptr %.3.in.in.in113 to i64
  %.3.in115 = add i64 %.3.in.in114, -8
  %.3116 = inttoptr i64 %.3.in115 to ptr
  %108 = getelementptr inbounds i8, ptr %.3116, i64 8
  %.not71117 = icmp eq ptr %108, %1
  br i1 %.not71117, label %._crit_edge121, label %.lr.ph120

.lr.ph120:                                        ; preds = %._crit_edge112, %.lr.ph120
  %109 = phi ptr [ %112, %.lr.ph120 ], [ %108, %._crit_edge112 ]
  %.3118 = phi ptr [ %.3, %.lr.ph120 ], [ %.3116, %._crit_edge112 ]
  %110 = load i32, ptr %.3118, align 8, !tbaa !11
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %110)
  %.3.in.in.in = load ptr, ptr %109, align 8, !tbaa !5
  %.3.in.in = ptrtoint ptr %.3.in.in.in to i64
  %.3.in = add i64 %.3.in.in, -8
  %.3 = inttoptr i64 %.3.in to ptr
  %112 = getelementptr inbounds i8, ptr %.3, i64 8
  %.not71 = icmp eq ptr %112, %1
  br i1 %.not71, label %._crit_edge121, label %.lr.ph120, !llvm.loop !20

._crit_edge121:                                   ; preds = %.lr.ph120, %._crit_edge112
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.4.in.in.in122 = load ptr, ptr %2, align 8, !tbaa !5
  %.4.in.in123 = ptrtoint ptr %.4.in.in.in122 to i64
  %.4.in124 = add i64 %.4.in.in123, -8
  %.4125 = inttoptr i64 %.4.in124 to ptr
  %114 = getelementptr inbounds i8, ptr %.4125, i64 8
  %.not72126 = icmp eq ptr %114, %2
  br i1 %.not72126, label %._crit_edge130, label %.lr.ph129

.lr.ph129:                                        ; preds = %._crit_edge121, %.lr.ph129
  %115 = phi ptr [ %118, %.lr.ph129 ], [ %114, %._crit_edge121 ]
  %.4127 = phi ptr [ %.4, %.lr.ph129 ], [ %.4125, %._crit_edge121 ]
  %116 = load i32, ptr %.4127, align 8, !tbaa !11
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %116)
  %.4.in.in.in = load ptr, ptr %115, align 8, !tbaa !5
  %.4.in.in = ptrtoint ptr %.4.in.in.in to i64
  %.4.in = add i64 %.4.in.in, -8
  %.4 = inttoptr i64 %.4.in to ptr
  %118 = getelementptr inbounds i8, ptr %.4, i64 8
  %.not72 = icmp eq ptr %118, %2
  br i1 %.not72, label %._crit_edge130, label %.lr.ph129, !llvm.loop !21

._crit_edge130:                                   ; preds = %.lr.ph129, %._crit_edge121
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  call void @_ZL16list_splice_initP9list_headS0_(ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.5.in.in.in131 = load ptr, ptr %2, align 8, !tbaa !5
  %.5.in.in132 = ptrtoint ptr %.5.in.in.in131 to i64
  %.5.in133 = add i64 %.5.in.in132, -8
  %.5134 = inttoptr i64 %.5.in133 to ptr
  %120 = getelementptr inbounds i8, ptr %.5134, i64 8
  %.not73135 = icmp eq ptr %120, %2
  br i1 %.not73135, label %._crit_edge139, label %.lr.ph138

.lr.ph138:                                        ; preds = %._crit_edge130, %.lr.ph138
  %121 = phi ptr [ %124, %.lr.ph138 ], [ %120, %._crit_edge130 ]
  %.5136 = phi ptr [ %.5, %.lr.ph138 ], [ %.5134, %._crit_edge130 ]
  %122 = load i32, ptr %.5136, align 8, !tbaa !11
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %122)
  %.5.in.in.in = load ptr, ptr %121, align 8, !tbaa !5
  %.5.in.in = ptrtoint ptr %.5.in.in.in to i64
  %.5.in = add i64 %.5.in.in, -8
  %.5 = inttoptr i64 %.5.in to ptr
  %124 = getelementptr inbounds i8, ptr %.5, i64 8
  %.not73 = icmp eq ptr %124, %2
  br i1 %.not73, label %._crit_edge139, label %.lr.ph138, !llvm.loop !22

._crit_edge139:                                   ; preds = %.lr.ph138, %._crit_edge130
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %126 = load ptr, ptr %1, align 8, !tbaa !5
  %.6.in.in140 = ptrtoint ptr %126 to i64
  %.6.in141 = add i64 %.6.in.in140, -8
  %.6142 = inttoptr i64 %.6.in141 to ptr
  %127 = getelementptr inbounds i8, ptr %.6142, i64 8
  %.not74143 = icmp eq ptr %127, %1
  br i1 %.not74143, label %._crit_edge147, label %.lr.ph146

.lr.ph146:                                        ; preds = %._crit_edge139, %.lr.ph146
  %128 = phi ptr [ %131, %.lr.ph146 ], [ %127, %._crit_edge139 ]
  %.6144 = phi ptr [ %.6, %.lr.ph146 ], [ %.6142, %._crit_edge139 ]
  %.0.in.in.in = load ptr, ptr %128, align 8, !tbaa !23
  call void @_ZL8list_delP9list_head(ptr noundef nonnull %128)
  %129 = load i32, ptr %.6144, align 8, !tbaa !11
  %130 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %129)
  call void @free(ptr noundef %.6144) #7
  %.6.in.in = ptrtoint ptr %.0.in.in.in to i64
  %.6.in = add i64 %.6.in.in, -8
  %.6 = inttoptr i64 %.6.in to ptr
  %131 = getelementptr inbounds i8, ptr %.6, i64 8
  %.not74 = icmp eq ptr %131, %1
  br i1 %.not74, label %._crit_edge147, label %.lr.ph146, !llvm.loop !24

._crit_edge147:                                   ; preds = %.lr.ph146, %._crit_edge139
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %.7.in.in148 = ptrtoint ptr %132 to i64
  %.7.in149 = add i64 %.7.in.in148, -8
  %.7150 = inttoptr i64 %.7.in149 to ptr
  %133 = getelementptr inbounds i8, ptr %.7150, i64 8
  %.not75151 = icmp eq ptr %133, %2
  br i1 %.not75151, label %._crit_edge155, label %.lr.ph154

.lr.ph154:                                        ; preds = %._crit_edge147, %.lr.ph154
  %134 = phi ptr [ %137, %.lr.ph154 ], [ %133, %._crit_edge147 ]
  %.7152 = phi ptr [ %.7, %.lr.ph154 ], [ %.7150, %._crit_edge147 ]
  %.1.in.in.in = load ptr, ptr %134, align 8, !tbaa !23
  call void @_ZL8list_delP9list_head(ptr noundef nonnull %134)
  %135 = load i32, ptr %.7152, align 8, !tbaa !11
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %135)
  call void @free(ptr noundef %.7152) #7
  %.7.in.in = ptrtoint ptr %.1.in.in.in to i64
  %.7.in = add i64 %.7.in.in, -8
  %.7 = inttoptr i64 %.7.in to ptr
  %137 = getelementptr inbounds i8, ptr %.7, i64 8
  %.not75 = icmp eq ptr %137, %2
  br i1 %.not75, label %._crit_edge155, label %.lr.ph154, !llvm.loop !25

._crit_edge155:                                   ; preds = %.lr.ph154, %._crit_edge147
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #7
  ret i32 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL8list_addP9list_headS0_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3algL8list_mtfEP9list_headS1_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3algL8list_maoEP9list_headS1_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL9list_moveP9list_headS0_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL16list_splice_initP9list_headS0_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL8list_delP9list_head(ptr noundef) local_unnamed_addr #5

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

attributes #0 = { mustprogress norecurse 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 = { 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 #3 = { 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 #4 = { inlinehint mustprogress 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 = { inlinehint mustprogress 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"_ZTS9list_head", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS8DemoNode", !13, i64 0, !6, i64 8}
!13 = !{!"int", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = !{!12, !7, i64 8}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}


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