; LLVM IR from maksimandrianov/cdcontainers :: src (list)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.cdc_list_iter = type { ptr, ptr }
%struct.cdc_list_node = type { ptr, ptr, ptr }
%struct.cdc_list = type { ptr, ptr, i64, ptr }

@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.cdc_list_splice = external hidden unnamed_addr constant [66 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @cdc_list_splice(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.cdc_list_iter, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %3
  br label %13

12:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 466, ptr noundef @__PRETTY_FUNCTION__.cdc_list_splice) #5
  unreachable

13:                                               ; preds = %11
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  br label %18

17:                                               ; preds = %13
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 467, ptr noundef @__PRETTY_FUNCTION__.cdc_list_splice) #5
  unreachable

18:                                               ; preds = %16
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  br label %23

22:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 468, ptr noundef @__PRETTY_FUNCTION__.cdc_list_splice) #5
  unreachable

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.cdc_list_iter, ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !10
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.cdc_list_iter, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !10
  %31 = call i64 @distance(ptr noundef %27, ptr noundef %30)
  store i64 %31, ptr %8, align 8, !tbaa !12
  call void @cdc_list_iter_prev(ptr noundef %7)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.cdc_list_iter, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !10
  %35 = getelementptr inbounds %struct.cdc_list_node, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !14
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %79

38:                                               ; preds = %23
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.cdc_list_iter, ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !10
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %62

43:                                               ; preds = %38
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.cdc_list_iter, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !10
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.cdc_list_iter, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !10
  %50 = getelementptr inbounds %struct.cdc_list_node, ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  %52 = getelementptr inbounds %struct.cdc_list_node, ptr %51, i32 0, i32 0
  store ptr %46, ptr %52, align 8, !tbaa !16
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.cdc_list_iter, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !10
  %56 = getelementptr inbounds %struct.cdc_list_node, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !14
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.cdc_list_iter, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !10
  %61 = getelementptr inbounds %struct.cdc_list_node, ptr %60, i32 0, i32 1
  store ptr %57, ptr %61, align 8, !tbaa !14
  br label %78

62:                                               ; preds = %38
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.cdc_list_iter, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !10
  %66 = getelementptr inbounds %struct.cdc_list_node, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.cdc_list_iter, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds %struct.cdc_list, ptr %70, i32 0, i32 1
  store ptr %67, ptr %71, align 8, !tbaa !18
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.cdc_list_iter, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = getelementptr inbounds %struct.cdc_list, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !18
  %77 = getelementptr inbounds %struct.cdc_list_node, ptr %76, i32 0, i32 0
  store ptr null, ptr %77, align 8, !tbaa !16
  br label %78

78:                                               ; preds = %62, %43
  br label %108

79:                                               ; preds = %23
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.cdc_list_iter, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !10
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %98

84:                                               ; preds = %79
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.cdc_list_iter, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !10
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.cdc_list_iter, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !17
  %91 = getelementptr inbounds %struct.cdc_list, ptr %90, i32 0, i32 0
  store ptr %87, ptr %91, align 8, !tbaa !20
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.cdc_list_iter, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  %95 = getelementptr inbounds %struct.cdc_list, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !20
  %97 = getelementptr inbounds %struct.cdc_list_node, ptr %96, i32 0, i32 1
  store ptr null, ptr %97, align 8, !tbaa !14
  br label %107

98:                                               ; preds = %79
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.cdc_list_iter, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  %102 = getelementptr inbounds %struct.cdc_list, ptr %101, i32 0, i32 0
  store ptr null, ptr %102, align 8, !tbaa !20
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.cdc_list_iter, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = getelementptr inbounds %struct.cdc_list, ptr %105, i32 0, i32 1
  store ptr null, ptr %106, align 8, !tbaa !18
  br label %107

107:                                              ; preds = %98, %84
  br label %108

108:                                              ; preds = %107, %78
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.cdc_list_iter, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !10
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %180

113:                                              ; preds = %108
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.cdc_list_iter, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !10
  %117 = getelementptr inbounds %struct.cdc_list_node, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !14
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %151

120:                                              ; preds = %113
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.cdc_list_iter, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !10
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.cdc_list_iter, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !10
  %127 = getelementptr inbounds %struct.cdc_list_node, ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !14
  %129 = getelementptr inbounds %struct.cdc_list_node, ptr %128, i32 0, i32 0
  store ptr %123, ptr %129, align 8, !tbaa !16
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.cdc_list_iter, ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !10
  %133 = getelementptr inbounds %struct.cdc_list_node, ptr %132, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !14
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.cdc_list_iter, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !10
  %138 = getelementptr inbounds %struct.cdc_list_node, ptr %137, i32 0, i32 1
  store ptr %134, ptr %138, align 8, !tbaa !14
  %139 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !10
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.cdc_list_iter, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 8, !tbaa !10
  %144 = getelementptr inbounds %struct.cdc_list_node, ptr %143, i32 0, i32 1
  store ptr %140, ptr %144, align 8, !tbaa !14
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.cdc_list_iter, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !10
  %148 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !10
  %150 = getelementptr inbounds %struct.cdc_list_node, ptr %149, i32 0, i32 0
  store ptr %147, ptr %150, align 8, !tbaa !16
  br label %179

151:                                              ; preds = %113
  %152 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !10
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.cdc_list_iter, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !17
  %157 = getelementptr inbounds %struct.cdc_list, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !20
  %159 = getelementptr inbounds %struct.cdc_list_node, ptr %158, i32 0, i32 1
  store ptr %153, ptr %159, align 8, !tbaa !14
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.cdc_list_iter, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !17
  %163 = getelementptr inbounds %struct.cdc_list, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !20
  %165 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !10
  %167 = getelementptr inbounds %struct.cdc_list_node, ptr %166, i32 0, i32 0
  store ptr %164, ptr %167, align 8, !tbaa !16
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.cdc_list_iter, ptr %168, i32 0, i32 1
  %170 = load ptr, ptr %169, align 8, !tbaa !10
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.cdc_list_iter, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = getelementptr inbounds %struct.cdc_list, ptr %173, i32 0, i32 0
  store ptr %170, ptr %174, align 8, !tbaa !20
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.cdc_list_iter, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !10
  %178 = getelementptr inbounds %struct.cdc_list_node, ptr %177, i32 0, i32 1
  store ptr null, ptr %178, align 8, !tbaa !14
  br label %179

179:                                              ; preds = %151, %120
  br label %234

180:                                              ; preds = %108
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.cdc_list_iter, ptr %181, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !17
  %184 = getelementptr inbounds %struct.cdc_list, ptr %183, i32 0, i32 1
  %185 = load ptr, ptr %184, align 8, !tbaa !18
  %186 = icmp ne ptr %185, null
  br i1 %186, label %187, label %212

187:                                              ; preds = %180
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.cdc_list_iter, ptr %188, i32 0, i32 1
  %190 = load ptr, ptr %189, align 8, !tbaa !10
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.cdc_list_iter, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !17
  %194 = getelementptr inbounds %struct.cdc_list, ptr %193, i32 0, i32 1
  %195 = load ptr, ptr %194, align 8, !tbaa !18
  %196 = getelementptr inbounds %struct.cdc_list_node, ptr %195, i32 0, i32 0
  store ptr %190, ptr %196, align 8, !tbaa !16
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.cdc_list_iter, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !17
  %200 = getelementptr inbounds %struct.cdc_list, ptr %199, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !18
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.cdc_list_iter, ptr %202, i32 0, i32 1
  %204 = load ptr, ptr %203, align 8, !tbaa !10
  %205 = getelementptr inbounds %struct.cdc_list_node, ptr %204, i32 0, i32 1
  store ptr %201, ptr %205, align 8, !tbaa !14
  %206 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %207 = load ptr, ptr %206, align 8, !tbaa !10
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.cdc_list_iter, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !17
  %211 = getelementptr inbounds %struct.cdc_list, ptr %210, i32 0, i32 1
  store ptr %207, ptr %211, align 8, !tbaa !18
  br label %233

212:                                              ; preds = %180
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.cdc_list_iter, ptr %213, i32 0, i32 1
  %215 = load ptr, ptr %214, align 8, !tbaa !10
  %216 = getelementptr inbounds %struct.cdc_list_node, ptr %215, i32 0, i32 1
  store ptr null, ptr %216, align 8, !tbaa !14
  %217 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %218 = load ptr, ptr %217, align 8, !tbaa !10
  %219 = getelementptr inbounds %struct.cdc_list_node, ptr %218, i32 0, i32 0
  store ptr null, ptr %219, align 8, !tbaa !16
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.cdc_list_iter, ptr %220, i32 0, i32 1
  %222 = load ptr, ptr %221, align 8, !tbaa !10
  %223 = load ptr, ptr %4, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.cdc_list_iter, ptr %223, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !17
  %226 = getelementptr inbounds %struct.cdc_list, ptr %225, i32 0, i32 0
  store ptr %222, ptr %226, align 8, !tbaa !20
  %227 = getelementptr inbounds %struct.cdc_list_iter, ptr %7, i32 0, i32 1
  %228 = load ptr, ptr %227, align 8, !tbaa !10
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.cdc_list_iter, ptr %229, i32 0, i32 0
  %231 = load ptr, ptr %230, align 8, !tbaa !17
  %232 = getelementptr inbounds %struct.cdc_list, ptr %231, i32 0, i32 1
  store ptr %228, ptr %232, align 8, !tbaa !18
  br label %233

233:                                              ; preds = %212, %187
  br label %234

234:                                              ; preds = %233, %179
  %235 = load i64, ptr %8, align 8, !tbaa !12
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.cdc_list_iter, ptr %236, i32 0, i32 0
  %238 = load ptr, ptr %237, align 8, !tbaa !17
  %239 = getelementptr inbounds %struct.cdc_list, ptr %238, i32 0, i32 2
  %240 = load i64, ptr %239, align 8, !tbaa !21
  %241 = add i64 %240, %235
  store i64 %241, ptr %239, align 8, !tbaa !21
  %242 = load i64, ptr %8, align 8, !tbaa !12
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.cdc_list_iter, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !17
  %246 = getelementptr inbounds %struct.cdc_list, ptr %245, i32 0, i32 2
  %247 = load i64, ptr %246, align 8, !tbaa !21
  %248 = sub i64 %247, %242
  store i64 %248, ptr %246, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cdc_list_iter_prev(ptr noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { 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 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!10 = !{!11, !6, i64 8}
!11 = !{!"cdc_list_iter", !6, i64 0, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"cdc_list_node", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!15, !6, i64 0}
!17 = !{!11, !6, i64 0}
!18 = !{!19, !6, i64 8}
!19 = !{!"cdc_list", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24}
!20 = !{!19, !6, i64 0}
!21 = !{!19, !13, i64 16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.cdc_list_iter = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.cdc_list_splice = external hidden unnamed_addr constant [66 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @cdc_list_splice(ptr noundef readonly %0, ptr noundef readonly %1, ptr noundef readonly %2) local_unnamed_addr #2 {
  %4 = alloca %struct.cdc_list_iter, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %5, label %6

5:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 466, ptr noundef nonnull @__PRETTY_FUNCTION__.cdc_list_splice) #6
  unreachable

6:                                                ; preds = %3
  %.not55 = icmp eq ptr %1, null
  br i1 %.not55, label %7, label %8

7:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 467, ptr noundef nonnull @__PRETTY_FUNCTION__.cdc_list_splice) #6
  unreachable

8:                                                ; preds = %6
  %.not56 = icmp eq ptr %2, null
  br i1 %.not56, label %9, label %10

9:                                                ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 468, ptr noundef nonnull @__PRETTY_FUNCTION__.cdc_list_splice) #6
  unreachable

10:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %2, i64 16, i1 false), !tbaa.struct !5
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !10
  %13 = getelementptr inbounds i8, ptr %2, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !10
  %15 = tail call i64 @distance(ptr noundef %12, ptr noundef %14)
  call void @cdc_list_iter_prev(ptr noundef nonnull %4)
  %16 = load ptr, ptr %11, align 8, !tbaa !10
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %.not57 = icmp eq ptr %18, null
  %19 = load ptr, ptr %13, align 8, !tbaa !10
  %.not58 = icmp eq ptr %19, null
  br i1 %.not57, label %26, label %20

20:                                               ; preds = %10
  br i1 %.not58, label %23, label %21

21:                                               ; preds = %20
  store ptr %19, ptr %18, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %19, i64 8
  store ptr %18, ptr %22, align 8, !tbaa !12
  br label %31

23:                                               ; preds = %20
  %24 = load ptr, ptr %2, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  store ptr %18, ptr %25, align 8, !tbaa !16
  store ptr null, ptr %18, align 8, !tbaa !14
  br label %31

26:                                               ; preds = %10
  %27 = load ptr, ptr %2, align 8, !tbaa !15
  br i1 %.not58, label %30, label %28

28:                                               ; preds = %26
  store ptr %19, ptr %27, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %19, i64 8
  store ptr null, ptr %29, align 8, !tbaa !12
  br label %31

30:                                               ; preds = %26
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %27, i8 0, i64 16, i1 false)
  br label %31

31:                                               ; preds = %28, %30, %21, %23
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !10
  %.not60 = icmp eq ptr %33, null
  br i1 %.not60, label %46, label %34

34:                                               ; preds = %31
  %35 = getelementptr inbounds i8, ptr %33, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %.not62 = icmp eq ptr %36, null
  br i1 %.not62, label %40, label %37

37:                                               ; preds = %34
  store ptr %16, ptr %36, align 8, !tbaa !14
  store ptr %36, ptr %17, align 8, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %4, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !10
  store ptr %39, ptr %35, align 8, !tbaa !12
  store ptr %33, ptr %39, align 8, !tbaa !14
  %.pre = load ptr, ptr %0, align 8, !tbaa !15
  br label %56

40:                                               ; preds = %34
  %41 = getelementptr inbounds i8, ptr %4, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !10
  %43 = load ptr, ptr %0, align 8, !tbaa !15
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  store ptr %42, ptr %45, align 8, !tbaa !12
  store ptr %44, ptr %42, align 8, !tbaa !14
  store ptr %16, ptr %43, align 8, !tbaa !19
  store ptr null, ptr %17, align 8, !tbaa !12
  br label %56

46:                                               ; preds = %31
  %47 = load ptr, ptr %0, align 8, !tbaa !15
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  %.not61 = icmp eq ptr %49, null
  br i1 %.not61, label %53, label %50

50:                                               ; preds = %46
  store ptr %16, ptr %49, align 8, !tbaa !14
  store ptr %49, ptr %17, align 8, !tbaa !12
  %51 = getelementptr inbounds i8, ptr %4, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !10
  store ptr %52, ptr %48, align 8, !tbaa !16
  br label %56

53:                                               ; preds = %46
  store ptr null, ptr %17, align 8, !tbaa !12
  %54 = getelementptr inbounds i8, ptr %4, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !10
  store ptr null, ptr %55, align 8, !tbaa !14
  store ptr %16, ptr %47, align 8, !tbaa !19
  store ptr %55, ptr %48, align 8, !tbaa !16
  br label %56

56:                                               ; preds = %50, %53, %37, %40
  %57 = phi ptr [ %47, %50 ], [ %47, %53 ], [ %.pre, %37 ], [ %43, %40 ]
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %59 = load i64, ptr %58, align 8, !tbaa !20
  %60 = add i64 %59, %15
  store i64 %60, ptr %58, align 8, !tbaa !20
  %61 = load ptr, ptr %1, align 8, !tbaa !15
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load i64, ptr %62, align 8, !tbaa !20
  %64 = sub i64 %63, %15
  store i64 %64, ptr %62, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare hidden i64 @distance(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cdc_list_iter_prev(ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { noreturn nounwind }
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 = !{i64 0, i64 8, !6, i64 8, i64 8, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 8}
!11 = !{!"cdc_list_iter", !7, i64 0, !7, i64 8}
!12 = !{!13, !7, i64 8}
!13 = !{!"cdc_list_node", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!13, !7, i64 0}
!15 = !{!11, !7, i64 0}
!16 = !{!17, !7, i64 8}
!17 = !{!"cdc_list", !7, i64 0, !7, i64 8, !18, i64 16, !7, i64 24}
!18 = !{!"long", !8, i64 0}
!19 = !{!17, !7, i64 0}
!20 = !{!17, !18, i64 16}


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