; LLVM IR from LeoVen/C-Macro-Collections :: tests (types)

; 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.struct_s = type { i32, i32, ptr, ptr, [10 x double] }
%struct.treeset1 = type { ptr, i64, i32, ptr, ptr }
%struct.treeset1_node = type { %struct.struct_s, i8, ptr, ptr, ptr }
%struct.cmc_alloc_node = type { ptr, ptr, ptr, ptr }

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

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

; 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) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @ts1_empty(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @ts1_remove(ptr noundef %0, ptr noundef byval(%struct.struct_s) align 8 %1) #2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca %struct.struct_s, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = call zeroext i1 @ts1_empty(ptr noundef %11)
  br i1 %12, label %13, label %16

13:                                               ; preds = %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.treeset1, ptr %14, i32 0, i32 2
  store i32 2, ptr %15, align 8, !tbaa !9
  store i1 false, ptr %3, align 1
  br label %350

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call ptr @ts1_impl_get_node(ptr noundef %17, ptr noundef byval(%struct.struct_s) align 8 %1)
  store ptr %18, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %24, label %21

21:                                               ; preds = %16
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.treeset1, ptr %22, i32 0, i32 2
  store i32 3, ptr %23, align 8, !tbaa !9
  store i1 false, ptr %3, align 1
  store i32 1, ptr %6, align 4
  br label %349

24:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.treeset1_node, ptr %25, i32 0, i32 4
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = icmp eq ptr %27, null
  %29 = zext i1 %28 to i8
  store i8 %29, ptr %9, align 1, !tbaa !16
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.treeset1_node, ptr %30, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !18
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %74

34:                                               ; preds = %24
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.treeset1_node, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %74

39:                                               ; preds = %34
  %40 = load i8, ptr %9, align 1, !tbaa !16, !range !20, !noundef !21
  %41 = trunc i8 %40 to i1
  br i1 %41, label %42, label %45

42:                                               ; preds = %39
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.treeset1, ptr %43, i32 0, i32 0
  store ptr null, ptr %44, align 8, !tbaa !22
  br label %67

45:                                               ; preds = %39
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.treeset1_node, ptr %46, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  store ptr %48, ptr %8, align 8, !tbaa !5
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.treeset1_node, ptr %49, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = getelementptr inbounds %struct.treeset1_node, ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = icmp eq ptr %53, %54
  br i1 %55, label %56, label %61

56:                                               ; preds = %45
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.treeset1_node, ptr %57, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  %60 = getelementptr inbounds %struct.treeset1_node, ptr %59, i32 0, i32 2
  store ptr null, ptr %60, align 8, !tbaa !19
  br label %66

61:                                               ; preds = %45
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.treeset1_node, ptr %62, i32 0, i32 4
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = getelementptr inbounds %struct.treeset1_node, ptr %64, i32 0, i32 3
  store ptr null, ptr %65, align 8, !tbaa !18
  br label %66

66:                                               ; preds = %61, %56
  br label %67

67:                                               ; preds = %66, %42
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.treeset1, ptr %68, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  %71 = getelementptr inbounds %struct.cmc_alloc_node, ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !24
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  call void %72(ptr noundef %73)
  br label %328

74:                                               ; preds = %34, %24
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.treeset1_node, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = icmp eq ptr %77, null
  br i1 %78, label %79, label %134

79:                                               ; preds = %74
  %80 = load i8, ptr %9, align 1, !tbaa !16, !range !20, !noundef !21
  %81 = trunc i8 %80 to i1
  br i1 %81, label %82, label %92

82:                                               ; preds = %79
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.treeset1_node, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.treeset1, ptr %86, i32 0, i32 0
  store ptr %85, ptr %87, align 8, !tbaa !22
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.treeset1, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !22
  %91 = getelementptr inbounds %struct.treeset1_node, ptr %90, i32 0, i32 4
  store ptr null, ptr %91, align 8, !tbaa !13
  br label %127

92:                                               ; preds = %79
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.treeset1_node, ptr %93, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !13
  store ptr %95, ptr %8, align 8, !tbaa !5
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.treeset1_node, ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.treeset1_node, ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !19
  %102 = getelementptr inbounds %struct.treeset1_node, ptr %101, i32 0, i32 4
  store ptr %98, ptr %102, align 8, !tbaa !13
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.treeset1_node, ptr %103, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !13
  %106 = getelementptr inbounds %struct.treeset1_node, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = icmp eq ptr %107, %108
  br i1 %109, label %110, label %118

110:                                              ; preds = %92
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.treeset1_node, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !19
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.treeset1_node, ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = getelementptr inbounds %struct.treeset1_node, ptr %116, i32 0, i32 2
  store ptr %113, ptr %117, align 8, !tbaa !19
  br label %126

118:                                              ; preds = %92
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.treeset1_node, ptr %119, i32 0, i32 2
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.treeset1_node, ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  %125 = getelementptr inbounds %struct.treeset1_node, ptr %124, i32 0, i32 3
  store ptr %121, ptr %125, align 8, !tbaa !18
  br label %126

126:                                              ; preds = %118, %110
  br label %127

127:                                              ; preds = %126, %82
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.treeset1, ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !23
  %131 = getelementptr inbounds %struct.cmc_alloc_node, ptr %130, i32 0, i32 3
  %132 = load ptr, ptr %131, align 8, !tbaa !24
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  call void %132(ptr noundef %133)
  br label %327

134:                                              ; preds = %74
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.treeset1_node, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !19
  %138 = icmp eq ptr %137, null
  br i1 %138, label %139, label %194

139:                                              ; preds = %134
  %140 = load i8, ptr %9, align 1, !tbaa !16, !range !20, !noundef !21
  %141 = trunc i8 %140 to i1
  br i1 %141, label %142, label %152

142:                                              ; preds = %139
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.treeset1_node, ptr %143, i32 0, i32 3
  %145 = load ptr, ptr %144, align 8, !tbaa !18
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.treeset1, ptr %146, i32 0, i32 0
  store ptr %145, ptr %147, align 8, !tbaa !22
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.treeset1, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !22
  %151 = getelementptr inbounds %struct.treeset1_node, ptr %150, i32 0, i32 4
  store ptr null, ptr %151, align 8, !tbaa !13
  br label %187

152:                                              ; preds = %139
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.treeset1_node, ptr %153, i32 0, i32 4
  %155 = load ptr, ptr %154, align 8, !tbaa !13
  store ptr %155, ptr %8, align 8, !tbaa !5
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.treeset1_node, ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !13
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.treeset1_node, ptr %159, i32 0, i32 3
  %161 = load ptr, ptr %160, align 8, !tbaa !18
  %162 = getelementptr inbounds %struct.treeset1_node, ptr %161, i32 0, i32 4
  store ptr %158, ptr %162, align 8, !tbaa !13
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.treeset1_node, ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = getelementptr inbounds %struct.treeset1_node, ptr %165, i32 0, i32 2
  %167 = load ptr, ptr %166, align 8, !tbaa !19
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = icmp eq ptr %167, %168
  br i1 %169, label %170, label %178

170:                                              ; preds = %152
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.treeset1_node, ptr %171, i32 0, i32 3
  %173 = load ptr, ptr %172, align 8, !tbaa !18
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.treeset1_node, ptr %174, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !13
  %177 = getelementptr inbounds %struct.treeset1_node, ptr %176, i32 0, i32 2
  store ptr %173, ptr %177, align 8, !tbaa !19
  br label %186

178:                                              ; preds = %152
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.treeset1_node, ptr %179, i32 0, i32 3
  %181 = load ptr, ptr %180, align 8, !tbaa !18
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.treeset1_node, ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !13
  %185 = getelementptr inbounds %struct.treeset1_node, ptr %184, i32 0, i32 3
  store ptr %181, ptr %185, align 8, !tbaa !18
  br label %186

186:                                              ; preds = %178, %170
  br label %187

187:                                              ; preds = %186, %142
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.treeset1, ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !23
  %191 = getelementptr inbounds %struct.cmc_alloc_node, ptr %190, i32 0, i32 3
  %192 = load ptr, ptr %191, align 8, !tbaa !24
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  call void %192(ptr noundef %193)
  br label %326

194:                                              ; preds = %134
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.treeset1_node, ptr %195, i32 0, i32 2
  %197 = load ptr, ptr %196, align 8, !tbaa !19
  store ptr %197, ptr %7, align 8, !tbaa !5
  br label %198

198:                                              ; preds = %203, %194
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.treeset1_node, ptr %199, i32 0, i32 3
  %201 = load ptr, ptr %200, align 8, !tbaa !18
  %202 = icmp ne ptr %201, null
  br i1 %202, label %203, label %207

203:                                              ; preds = %198
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.treeset1_node, ptr %204, i32 0, i32 3
  %206 = load ptr, ptr %205, align 8, !tbaa !18
  store ptr %206, ptr %7, align 8, !tbaa !5
  br label %198, !llvm.loop !26

207:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 104, ptr %10) #3
  %208 = load ptr, ptr %7, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.treeset1_node, ptr %208, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %209, i64 104, i1 false), !tbaa.struct !28
  %210 = load ptr, ptr %7, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.treeset1_node, ptr %210, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !13
  store ptr %212, ptr %8, align 8, !tbaa !5
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.treeset1_node, ptr %213, i32 0, i32 3
  %215 = load ptr, ptr %214, align 8, !tbaa !18
  %216 = icmp eq ptr %215, null
  br i1 %216, label %217, label %241

217:                                              ; preds = %207
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.treeset1_node, ptr %218, i32 0, i32 2
  %220 = load ptr, ptr %219, align 8, !tbaa !19
  %221 = icmp eq ptr %220, null
  br i1 %221, label %222, label %241

222:                                              ; preds = %217
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.treeset1_node, ptr %223, i32 0, i32 4
  %225 = load ptr, ptr %224, align 8, !tbaa !13
  %226 = getelementptr inbounds %struct.treeset1_node, ptr %225, i32 0, i32 2
  %227 = load ptr, ptr %226, align 8, !tbaa !19
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = icmp eq ptr %227, %228
  br i1 %229, label %230, label %235

230:                                              ; preds = %222
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.treeset1_node, ptr %231, i32 0, i32 4
  %233 = load ptr, ptr %232, align 8, !tbaa !13
  %234 = getelementptr inbounds %struct.treeset1_node, ptr %233, i32 0, i32 2
  store ptr null, ptr %234, align 8, !tbaa !19
  br label %240

235:                                              ; preds = %222
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.treeset1_node, ptr %236, i32 0, i32 4
  %238 = load ptr, ptr %237, align 8, !tbaa !13
  %239 = getelementptr inbounds %struct.treeset1_node, ptr %238, i32 0, i32 3
  store ptr null, ptr %239, align 8, !tbaa !18
  br label %240

240:                                              ; preds = %235, %230
  br label %317

241:                                              ; preds = %217, %207
  %242 = load ptr, ptr %7, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.treeset1_node, ptr %242, i32 0, i32 3
  %244 = load ptr, ptr %243, align 8, !tbaa !18
  %245 = icmp eq ptr %244, null
  br i1 %245, label %246, label %278

246:                                              ; preds = %241
  %247 = load ptr, ptr %7, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.treeset1_node, ptr %247, i32 0, i32 4
  %249 = load ptr, ptr %248, align 8, !tbaa !13
  %250 = load ptr, ptr %7, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.treeset1_node, ptr %250, i32 0, i32 2
  %252 = load ptr, ptr %251, align 8, !tbaa !19
  %253 = getelementptr inbounds %struct.treeset1_node, ptr %252, i32 0, i32 4
  store ptr %249, ptr %253, align 8, !tbaa !13
  %254 = load ptr, ptr %7, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.treeset1_node, ptr %254, i32 0, i32 4
  %256 = load ptr, ptr %255, align 8, !tbaa !13
  %257 = getelementptr inbounds %struct.treeset1_node, ptr %256, i32 0, i32 2
  %258 = load ptr, ptr %257, align 8, !tbaa !19
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = icmp eq ptr %258, %259
  br i1 %260, label %261, label %269

261:                                              ; preds = %246
  %262 = load ptr, ptr %7, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.treeset1_node, ptr %262, i32 0, i32 2
  %264 = load ptr, ptr %263, align 8, !tbaa !19
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.treeset1_node, ptr %265, i32 0, i32 4
  %267 = load ptr, ptr %266, align 8, !tbaa !13
  %268 = getelementptr inbounds %struct.treeset1_node, ptr %267, i32 0, i32 2
  store ptr %264, ptr %268, align 8, !tbaa !19
  br label %277

269:                                              ; preds = %246
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.treeset1_node, ptr %270, i32 0, i32 2
  %272 = load ptr, ptr %271, align 8, !tbaa !19
  %273 = load ptr, ptr %7, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.treeset1_node, ptr %273, i32 0, i32 4
  %275 = load ptr, ptr %274, align 8, !tbaa !13
  %276 = getelementptr inbounds %struct.treeset1_node, ptr %275, i32 0, i32 3
  store ptr %272, ptr %276, align 8, !tbaa !18
  br label %277

277:                                              ; preds = %269, %261
  br label %316

278:                                              ; preds = %241
  %279 = load ptr, ptr %7, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.treeset1_node, ptr %279, i32 0, i32 2
  %281 = load ptr, ptr %280, align 8, !tbaa !19
  %282 = icmp eq ptr %281, null
  br i1 %282, label %283, label %315

283:                                              ; preds = %278
  %284 = load ptr, ptr %7, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.treeset1_node, ptr %284, i32 0, i32 4
  %286 = load ptr, ptr %285, align 8, !tbaa !13
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.treeset1_node, ptr %287, i32 0, i32 3
  %289 = load ptr, ptr %288, align 8, !tbaa !18
  %290 = getelementptr inbounds %struct.treeset1_node, ptr %289, i32 0, i32 4
  store ptr %286, ptr %290, align 8, !tbaa !13
  %291 = load ptr, ptr %7, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.treeset1_node, ptr %291, i32 0, i32 4
  %293 = load ptr, ptr %292, align 8, !tbaa !13
  %294 = getelementptr inbounds %struct.treeset1_node, ptr %293, i32 0, i32 2
  %295 = load ptr, ptr %294, align 8, !tbaa !19
  %296 = load ptr, ptr %7, align 8, !tbaa !5
  %297 = icmp eq ptr %295, %296
  br i1 %297, label %298, label %306

298:                                              ; preds = %283
  %299 = load ptr, ptr %7, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.treeset1_node, ptr %299, i32 0, i32 3
  %301 = load ptr, ptr %300, align 8, !tbaa !18
  %302 = load ptr, ptr %7, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.treeset1_node, ptr %302, i32 0, i32 4
  %304 = load ptr, ptr %303, align 8, !tbaa !13
  %305 = getelementptr inbounds %struct.treeset1_node, ptr %304, i32 0, i32 2
  store ptr %301, ptr %305, align 8, !tbaa !19
  br label %314

306:                                              ; preds = %283
  %307 = load ptr, ptr %7, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.treeset1_node, ptr %307, i32 0, i32 3
  %309 = load ptr, ptr %308, align 8, !tbaa !18
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.treeset1_node, ptr %310, i32 0, i32 4
  %312 = load ptr, ptr %311, align 8, !tbaa !13
  %313 = getelementptr inbounds %struct.treeset1_node, ptr %312, i32 0, i32 3
  store ptr %309, ptr %313, align 8, !tbaa !18
  br label %314

314:                                              ; preds = %306, %298
  br label %315

315:                                              ; preds = %314, %278
  br label %316

316:                                              ; preds = %315, %277
  br label %317

317:                                              ; preds = %316, %240
  %318 = load ptr, ptr %4, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.treeset1, ptr %318, i32 0, i32 4
  %320 = load ptr, ptr %319, align 8, !tbaa !23
  %321 = getelementptr inbounds %struct.cmc_alloc_node, ptr %320, i32 0, i32 3
  %322 = load ptr, ptr %321, align 8, !tbaa !24
  %323 = load ptr, ptr %7, align 8, !tbaa !5
  call void %322(ptr noundef %323)
  %324 = load ptr, ptr %5, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.treeset1_node, ptr %324, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %325, ptr align 8 %10, i64 104, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 104, ptr %10) #3
  br label %326

326:                                              ; preds = %317, %187
  br label %327

327:                                              ; preds = %326, %127
  br label %328

328:                                              ; preds = %327, %67
  %329 = load ptr, ptr %8, align 8, !tbaa !5
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %334

331:                                              ; preds = %328
  %332 = load ptr, ptr %4, align 8, !tbaa !5
  %333 = load ptr, ptr %8, align 8, !tbaa !5
  call void @ts1_impl_rebalance(ptr noundef %332, ptr noundef %333)
  br label %334

334:                                              ; preds = %331, %328
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.treeset1, ptr %335, i32 0, i32 1
  %337 = load i64, ptr %336, align 8, !tbaa !31
  %338 = icmp eq i64 %337, 0
  br i1 %338, label %339, label %342

339:                                              ; preds = %334
  %340 = load ptr, ptr %4, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.treeset1, ptr %340, i32 0, i32 0
  store ptr null, ptr %341, align 8, !tbaa !22
  br label %342

342:                                              ; preds = %339, %334
  %343 = load ptr, ptr %4, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.treeset1, ptr %343, i32 0, i32 1
  %345 = load i64, ptr %344, align 8, !tbaa !31
  %346 = add i64 %345, -1
  store i64 %346, ptr %344, align 8, !tbaa !31
  %347 = load ptr, ptr %4, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.treeset1, ptr %347, i32 0, i32 2
  store i32 0, ptr %348, align 8, !tbaa !9
  store i1 true, ptr %3, align 1
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %349

349:                                              ; preds = %342, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %350

350:                                              ; preds = %349, %13
  %351 = load i1, ptr %3, align 1
  ret i1 %351
}

; Function Attrs: nounwind uwtable
declare hidden ptr @ts1_impl_get_node(ptr noundef, ptr noundef byval(%struct.struct_s) align 8) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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, !12, i64 16}
!10 = !{!"treeset1", !6, i64 0, !11, i64 8, !12, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 128}
!14 = !{!"treeset1_node", !15, i64 0, !7, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!15 = !{!"struct_s", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16, !7, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!14, !6, i64 120}
!19 = !{!14, !6, i64 112}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!10, !6, i64 0}
!23 = !{!10, !6, i64 32}
!24 = !{!25, !6, i64 24}
!25 = !{!"cmc_alloc_node", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{i64 0, i64 4, !29, i64 4, i64 4, !29, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 80, !30}
!29 = !{!12, !12, i64 0}
!30 = !{!7, !7, i64 0}
!31 = !{!10, !11, i64 8}


; 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.struct_s = type { i32, i32, ptr, ptr, [10 x double] }

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

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

; 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) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @ts1_empty(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @ts1_remove(ptr noundef %0, ptr noundef byval(%struct.struct_s) align 8 %1) local_unnamed_addr #2 {
  %3 = alloca %struct.struct_s, align 8
  %4 = tail call zeroext i1 @ts1_empty(ptr noundef %0)
  br i1 %4, label %102, label %5

5:                                                ; preds = %2
  %6 = tail call ptr @ts1_impl_get_node(ptr noundef %0, ptr noundef nonnull byval(%struct.struct_s) align 8 %1)
  %.not.not = icmp eq ptr %6, null
  br i1 %.not.not, label %102, label %7

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %6, i64 128
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  %11 = getelementptr inbounds i8, ptr %6, i64 120
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = icmp eq ptr %12, null
  %14 = getelementptr inbounds i8, ptr %6, i64 112
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = icmp eq ptr %15, null
  br i1 %13, label %17, label %46

17:                                               ; preds = %7
  br i1 %16, label %18, label %29

18:                                               ; preds = %17
  br i1 %10, label %24, label %19

19:                                               ; preds = %18
  %20 = getelementptr inbounds i8, ptr %9, i64 112
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = icmp eq ptr %21, %6
  %23 = getelementptr inbounds i8, ptr %9, i64 120
  %spec.select = select i1 %22, ptr %20, ptr %23
  br label %24

24:                                               ; preds = %19, %18
  %.sink = phi ptr [ %0, %18 ], [ %spec.select, %19 ]
  store ptr null, ptr %.sink, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  tail call void %28(ptr noundef nonnull %6) #3
  br label %93

29:                                               ; preds = %17
  br i1 %10, label %30, label %32

30:                                               ; preds = %29
  store ptr %15, ptr %0, align 8, !tbaa !20
  %31 = getelementptr inbounds i8, ptr %15, i64 128
  store ptr null, ptr %31, align 8, !tbaa !5
  br label %41

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %15, i64 128
  store ptr %9, ptr %33, align 8, !tbaa !5
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 112
  %36 = load ptr, ptr %35, align 8, !tbaa !13
  %37 = icmp eq ptr %36, %6
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  store ptr %15, ptr %35, align 8, !tbaa !13
  br label %41

39:                                               ; preds = %32
  %40 = getelementptr inbounds i8, ptr %34, i64 120
  store ptr %15, ptr %40, align 8, !tbaa !12
  br label %41

41:                                               ; preds = %38, %39, %30
  %42 = getelementptr inbounds i8, ptr %0, i64 32
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = getelementptr inbounds i8, ptr %43, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  tail call void %45(ptr noundef nonnull %6) #3
  br label %93

46:                                               ; preds = %7
  br i1 %16, label %47, label %.preheader

47:                                               ; preds = %46
  br i1 %10, label %48, label %50

48:                                               ; preds = %47
  store ptr %12, ptr %0, align 8, !tbaa !20
  %49 = getelementptr inbounds i8, ptr %12, i64 128
  store ptr null, ptr %49, align 8, !tbaa !5
  br label %59

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %12, i64 128
  store ptr %9, ptr %51, align 8, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 112
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  %55 = icmp eq ptr %54, %6
  br i1 %55, label %56, label %57

56:                                               ; preds = %50
  store ptr %12, ptr %53, align 8, !tbaa !13
  br label %59

57:                                               ; preds = %50
  %58 = getelementptr inbounds i8, ptr %52, i64 120
  store ptr %12, ptr %58, align 8, !tbaa !12
  br label %59

59:                                               ; preds = %56, %57, %48
  %60 = getelementptr inbounds i8, ptr %0, i64 32
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = getelementptr inbounds i8, ptr %61, i64 24
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  tail call void %63(ptr noundef nonnull %6) #3
  br label %93

.preheader:                                       ; preds = %46, %.preheader
  %.090 = phi ptr [ %65, %.preheader ], [ %15, %46 ]
  %64 = getelementptr inbounds i8, ptr %.090, i64 120
  %65 = load ptr, ptr %64, align 8, !tbaa !12
  %.not97 = icmp eq ptr %65, null
  br i1 %.not97, label %66, label %.preheader, !llvm.loop !21

66:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %3)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %3, ptr noundef nonnull align 8 dereferenceable(104) %.090, i64 104, i1 false), !tbaa.struct !23
  %67 = getelementptr inbounds i8, ptr %.090, i64 128
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %.090, i64 112
  %70 = load ptr, ptr %69, align 8, !tbaa !13
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %79

72:                                               ; preds = %66
  %73 = getelementptr inbounds i8, ptr %68, i64 112
  %74 = load ptr, ptr %73, align 8, !tbaa !13
  %75 = icmp eq ptr %74, %.090
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  store ptr null, ptr %73, align 8, !tbaa !13
  br label %88

77:                                               ; preds = %72
  %78 = getelementptr inbounds i8, ptr %68, i64 120
  store ptr null, ptr %78, align 8, !tbaa !12
  br label %88

79:                                               ; preds = %66
  %80 = getelementptr inbounds i8, ptr %70, i64 128
  store ptr %68, ptr %80, align 8, !tbaa !5
  %81 = load ptr, ptr %67, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 112
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = icmp eq ptr %83, %.090
  br i1 %84, label %85, label %86

85:                                               ; preds = %79
  store ptr %70, ptr %82, align 8, !tbaa !13
  br label %88

86:                                               ; preds = %79
  %87 = getelementptr inbounds i8, ptr %81, i64 120
  store ptr %70, ptr %87, align 8, !tbaa !12
  br label %88

88:                                               ; preds = %86, %85, %76, %77
  %89 = getelementptr inbounds i8, ptr %0, i64 32
  %90 = load ptr, ptr %89, align 8, !tbaa !15
  %91 = getelementptr inbounds i8, ptr %90, i64 24
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  tail call void %92(ptr noundef nonnull %.090) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %6, ptr noundef nonnull align 8 dereferenceable(104) %3, i64 104, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %3)
  br label %93

93:                                               ; preds = %41, %88, %59, %24
  %.3 = phi ptr [ %9, %24 ], [ %9, %41 ], [ %9, %59 ], [ %68, %88 ]
  %.not98 = icmp eq ptr %.3, null
  br i1 %.not98, label %95, label %94

94:                                               ; preds = %93
  tail call void @ts1_impl_rebalance(ptr noundef nonnull %0, ptr noundef nonnull %.3)
  br label %95

95:                                               ; preds = %94, %93
  %96 = getelementptr inbounds i8, ptr %0, i64 8
  %97 = load i64, ptr %96, align 8, !tbaa !26
  %98 = icmp eq i64 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  store ptr null, ptr %0, align 8, !tbaa !20
  br label %100

100:                                              ; preds = %99, %95
  %101 = add i64 %97, -1
  store i64 %101, ptr %96, align 8, !tbaa !26
  br label %102

102:                                              ; preds = %5, %2, %100
  %.sink99 = phi i32 [ 0, %100 ], [ 2, %2 ], [ 3, %5 ]
  %.1 = phi i1 [ true, %100 ], [ false, %2 ], [ false, %5 ]
  %103 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %.sink99, ptr %103, align 8, !tbaa !27
  ret i1 %.1
}

; Function Attrs: nounwind uwtable
declare hidden ptr @ts1_impl_get_node(ptr noundef, ptr noundef byval(%struct.struct_s) align 8) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 128}
!6 = !{!"treeset1_node", !7, i64 0, !9, i64 104, !11, i64 112, !11, i64 120, !11, i64 128}
!7 = !{!"struct_s", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 16, !9, i64 24}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!6, !11, i64 120}
!13 = !{!6, !11, i64 112}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !11, i64 32}
!16 = !{!"treeset1", !11, i64 0, !17, i64 8, !8, i64 16, !11, i64 24, !11, i64 32}
!17 = !{!"long", !9, i64 0}
!18 = !{!19, !11, i64 24}
!19 = !{!"cmc_alloc_node", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!20 = !{!16, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{i64 0, i64 4, !24, i64 4, i64 4, !24, i64 8, i64 8, !14, i64 16, i64 8, !14, i64 24, i64 80, !25}
!24 = !{!8, !8, i64 0}
!25 = !{!9, !9, i64 0}
!26 = !{!16, !17, i64 8}
!27 = !{!16, !8, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass