; LLVM IR from fmela/libdict :: src (skiplist)

; 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.skiplist = type { ptr, i32, i32, ptr, i64 }
%struct.skip_node = type { ptr, ptr, ptr, i32, [0 x ptr] }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@__func__.skiplist_verify = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @skiplist_verify(ptr noundef %0) #3 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.skiplist, ptr %11, i32 0, i32 4
  %13 = load i64, ptr %12, align 8, !tbaa !9
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %15, label %30

15:                                               ; preds = %1
  br label %16

16:                                               ; preds = %15
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.skiplist, ptr %17, i32 0, i32 2
  %19 = load i32, ptr %18, align 4, !tbaa !13
  %20 = icmp eq i32 %19, 0
  %21 = zext i1 %20 to i32
  %22 = sext i32 %21 to i64
  %23 = call i64 @llvm.expect.i64(i64 %22, i64 1)
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %16
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 451, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.8) #4
  store i1 false, ptr %2, align 1
  br label %270

28:                                               ; preds = %16
  br label %29

29:                                               ; preds = %28
  br label %45

30:                                               ; preds = %1
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.skiplist, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = icmp ugt i32 %34, 0
  %36 = zext i1 %35 to i32
  %37 = sext i32 %36 to i64
  %38 = call i64 @llvm.expect.i64(i64 %37, i64 1)
  %39 = icmp ne i64 %38, 0
  br i1 %39, label %43, label %40

40:                                               ; preds = %31
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 453, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.9) #4
  store i1 false, ptr %2, align 1
  br label %270

43:                                               ; preds = %31
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44, %29
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.skiplist, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.skiplist, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 8, !tbaa !14
  %53 = icmp ult i32 %49, %52
  %54 = zext i1 %53 to i32
  %55 = sext i32 %54 to i64
  %56 = call i64 @llvm.expect.i64(i64 %55, i64 1)
  %57 = icmp ne i64 %56, 0
  br i1 %57, label %61, label %58

58:                                               ; preds = %46
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 455, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.10) #4
  store i1 false, ptr %2, align 1
  br label %270

61:                                               ; preds = %46
  br label %62

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !15
  br label %63

63:                                               ; preds = %91, %62
  %64 = load i32, ptr %4, align 4, !tbaa !15
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.skiplist, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = icmp ult i32 %64, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %63
  store i32 8, ptr %5, align 4
  br label %94

70:                                               ; preds = %63
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.skiplist, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  %75 = getelementptr inbounds %struct.skip_node, ptr %74, i32 0, i32 4
  %76 = load i32, ptr %4, align 4, !tbaa !15
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds [0 x ptr], ptr %75, i64 0, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  %81 = zext i1 %80 to i32
  %82 = sext i32 %81 to i64
  %83 = call i64 @llvm.expect.i64(i64 %82, i64 1)
  %84 = icmp ne i64 %83, 0
  br i1 %84, label %88, label %85

85:                                               ; preds = %71
  %86 = load ptr, ptr @stderr, align 8, !tbaa !5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 457, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.11) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %94

88:                                               ; preds = %71
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %4, align 4, !tbaa !15
  %93 = add i32 %92, 1
  store i32 %93, ptr %4, align 4, !tbaa !15
  br label %63, !llvm.loop !17

94:                                               ; preds = %85, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %95 = load i32, ptr %5, align 4
  switch i32 %95, label %272 [
    i32 8, label %96
    i32 1, label %270
  ]

96:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.skiplist, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !13
  store i32 %99, ptr %6, align 4, !tbaa !15
  br label %100

100:                                              ; preds = %128, %96
  %101 = load i32, ptr %6, align 4, !tbaa !15
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.skiplist, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 8, !tbaa !14
  %105 = icmp ult i32 %101, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %100
  store i32 13, ptr %5, align 4
  br label %131

107:                                              ; preds = %100
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.skiplist, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !16
  %112 = getelementptr inbounds %struct.skip_node, ptr %111, i32 0, i32 4
  %113 = load i32, ptr %6, align 4, !tbaa !15
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds [0 x ptr], ptr %112, i64 0, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = icmp eq ptr %116, null
  %118 = zext i1 %117 to i32
  %119 = sext i32 %118 to i64
  %120 = call i64 @llvm.expect.i64(i64 %119, i64 1)
  %121 = icmp ne i64 %120, 0
  br i1 %121, label %125, label %122

122:                                              ; preds = %108
  %123 = load ptr, ptr @stderr, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 460, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.12) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %131

125:                                              ; preds = %108
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %6, align 4, !tbaa !15
  %130 = add i32 %129, 1
  store i32 %130, ptr %6, align 4, !tbaa !15
  br label %100, !llvm.loop !19

131:                                              ; preds = %122, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %132 = load i32, ptr %5, align 4
  switch i32 %132, label %272 [
    i32 13, label %133
    i32 1, label %270
  ]

133:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.skiplist, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !16
  %137 = getelementptr inbounds %struct.skip_node, ptr %136, i32 0, i32 4
  %138 = getelementptr inbounds [0 x ptr], ptr %137, i64 0, i64 0
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  store ptr %139, ptr %9, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %246, %133
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %252

143:                                              ; preds = %140
  %144 = load i32, ptr %7, align 4, !tbaa !15
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.skip_node, ptr %145, i32 0, i32 3
  %147 = load i32, ptr %146, align 8, !tbaa !15
  %148 = icmp ult i32 %144, %147
  br i1 %148, label %149, label %153

149:                                              ; preds = %143
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.skip_node, ptr %150, i32 0, i32 3
  %152 = load i32, ptr %151, align 8, !tbaa !15
  store i32 %152, ptr %7, align 4, !tbaa !15
  br label %153

153:                                              ; preds = %149, %143
  br label %154

154:                                              ; preds = %153
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.skip_node, ptr %155, i32 0, i32 2
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = icmp eq ptr %157, %158
  %160 = zext i1 %159 to i32
  %161 = sext i32 %160 to i64
  %162 = call i64 @llvm.expect.i64(i64 %161, i64 1)
  %163 = icmp ne i64 %162, 0
  br i1 %163, label %167, label %164

164:                                              ; preds = %154
  %165 = load ptr, ptr @stderr, align 8, !tbaa !5
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 470, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.13) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %269

167:                                              ; preds = %154
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.skip_node, ptr %171, i32 0, i32 3
  %173 = load i32, ptr %172, align 8, !tbaa !15
  %174 = icmp uge i32 %173, 1
  %175 = zext i1 %174 to i32
  %176 = sext i32 %175 to i64
  %177 = call i64 @llvm.expect.i64(i64 %176, i64 1)
  %178 = icmp ne i64 %177, 0
  br i1 %178, label %182, label %179

179:                                              ; preds = %170
  %180 = load ptr, ptr @stderr, align 8, !tbaa !5
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 471, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.14) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %269

182:                                              ; preds = %170
  br label %183

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.skip_node, ptr %186, i32 0, i32 3
  %188 = load i32, ptr %187, align 8, !tbaa !15
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.skiplist, ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 4, !tbaa !13
  %192 = icmp ule i32 %188, %191
  %193 = zext i1 %192 to i32
  %194 = sext i32 %193 to i64
  %195 = call i64 @llvm.expect.i64(i64 %194, i64 1)
  %196 = icmp ne i64 %195, 0
  br i1 %196, label %200, label %197

197:                                              ; preds = %185
  %198 = load ptr, ptr @stderr, align 8, !tbaa !5
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 472, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.15) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %269

200:                                              ; preds = %185
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !15
  br label %203

203:                                              ; preds = %241, %202
  %204 = load i32, ptr %10, align 4, !tbaa !15
  %205 = load ptr, ptr %9, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.skip_node, ptr %205, i32 0, i32 3
  %207 = load i32, ptr %206, align 8, !tbaa !15
  %208 = icmp ult i32 %204, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %203
  store i32 26, ptr %5, align 4
  br label %244

210:                                              ; preds = %203
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.skip_node, ptr %211, i32 0, i32 4
  %213 = load i32, ptr %10, align 4, !tbaa !15
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds [0 x ptr], ptr %212, i64 0, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %240

218:                                              ; preds = %210
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.skip_node, ptr %220, i32 0, i32 4
  %222 = load i32, ptr %10, align 4, !tbaa !15
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds [0 x ptr], ptr %221, i64 0, i64 %223
  %225 = load ptr, ptr %224, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.skip_node, ptr %225, i32 0, i32 3
  %227 = load i32, ptr %226, align 8, !tbaa !15
  %228 = load i32, ptr %10, align 4, !tbaa !15
  %229 = icmp uge i32 %227, %228
  %230 = zext i1 %229 to i32
  %231 = sext i32 %230 to i64
  %232 = call i64 @llvm.expect.i64(i64 %231, i64 1)
  %233 = icmp ne i64 %232, 0
  br i1 %233, label %237, label %234

234:                                              ; preds = %219
  %235 = load ptr, ptr @stderr, align 8, !tbaa !5
  %236 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %235, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 475, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.16) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %244

237:                                              ; preds = %219
  br label %238

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238
  br label %240

240:                                              ; preds = %239, %210
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %10, align 4, !tbaa !15
  %243 = add i32 %242, 1
  store i32 %243, ptr %10, align 4, !tbaa !15
  br label %203, !llvm.loop !20

244:                                              ; preds = %234, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %245 = load i32, ptr %5, align 4
  switch i32 %245, label %269 [
    i32 26, label %246
  ]

246:                                              ; preds = %244
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %247, ptr %8, align 8, !tbaa !5
  %248 = load ptr, ptr %9, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.skip_node, ptr %248, i32 0, i32 4
  %250 = getelementptr inbounds [0 x ptr], ptr %249, i64 0, i64 0
  %251 = load ptr, ptr %250, align 8, !tbaa !5
  store ptr %251, ptr %9, align 8, !tbaa !5
  br label %140, !llvm.loop !21

252:                                              ; preds = %140
  br label %253

253:                                              ; preds = %252
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.skiplist, ptr %254, i32 0, i32 2
  %256 = load i32, ptr %255, align 4, !tbaa !13
  %257 = load i32, ptr %7, align 4, !tbaa !15
  %258 = icmp eq i32 %256, %257
  %259 = zext i1 %258 to i32
  %260 = sext i32 %259 to i64
  %261 = call i64 @llvm.expect.i64(i64 %260, i64 1)
  %262 = icmp ne i64 %261, 0
  br i1 %262, label %266, label %263

263:                                              ; preds = %253
  %264 = load ptr, ptr @stderr, align 8, !tbaa !5
  %265 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %264, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 482, ptr noundef @__func__.skiplist_verify, ptr noundef @.str.17) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %269

266:                                              ; preds = %253
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  store i1 true, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %269

269:                                              ; preds = %268, %263, %244, %197, %179, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %270

270:                                              ; preds = %269, %131, %94, %58, %40, %25
  %271 = load i1, ptr %2, align 1
  ret i1 %271

272:                                              ; preds = %131, %94
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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 24}
!10 = !{!"skiplist", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !12, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!10, !11, i64 8}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !6, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@__func__.skiplist_verify = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local noundef zeroext i1 @skiplist_verify(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 24
  %3 = load i64, ptr %2, align 8, !tbaa !5
  %4 = icmp eq i64 %3, 0
  %5 = getelementptr inbounds i8, ptr %0, i64 12
  %6 = load i32, ptr %5, align 4, !tbaa !12
  %7 = icmp eq i32 %6, 0
  br i1 %4, label %8, label %12

8:                                                ; preds = %1
  br i1 %7, label %.thread, label %9, !prof !13

9:                                                ; preds = %8
  %10 = load ptr, ptr @stderr, align 8, !tbaa !14
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 451, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.8) #3
  br label %79

12:                                               ; preds = %1
  br i1 %7, label %13, label %16, !prof !15

13:                                               ; preds = %12
  %14 = load ptr, ptr @stderr, align 8, !tbaa !14
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 453, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.9) #3
  br label %79

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !16
  %19 = icmp ult i32 %6, %18
  br i1 %19, label %.lr.ph, label %24, !prof !13

.thread:                                          ; preds = %8
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %24, label %.lr.ph78, !prof !15

.lr.ph:                                           ; preds = %16
  %22 = load ptr, ptr %0, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %22, i64 32
  %wide.trip.count = zext i32 %6 to i64
  br label %28

24:                                               ; preds = %.thread, %16
  %25 = load ptr, ptr @stderr, align 8, !tbaa !14
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 455, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.10) #3
  br label %79

27:                                               ; preds = %28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.lr.ph78, label %28, !llvm.loop !18

28:                                               ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %27 ]
  %29 = getelementptr inbounds [0 x ptr], ptr %23, i64 0, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %.not54 = icmp eq ptr %30, null
  br i1 %.not54, label %31, label %27, !prof !15

31:                                               ; preds = %28
  %32 = load ptr, ptr @stderr, align 8, !tbaa !14
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 457, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.11) #3
  br label %79

.lr.ph78:                                         ; preds = %27, %.thread
  %34 = phi i32 [ 0, %.thread ], [ %6, %27 ]
  %35 = phi i32 [ %21, %.thread ], [ %18, %27 ]
  %36 = load ptr, ptr %0, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %36, i64 32
  %38 = zext i32 %34 to i64
  %wide.trip.count98 = zext i32 %35 to i64
  br label %40

39:                                               ; preds = %40
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count98
  br i1 %exitcond99.not, label %._crit_edge79, label %40, !llvm.loop !20

40:                                               ; preds = %.lr.ph78, %39
  %indvars.iv95 = phi i64 [ %38, %.lr.ph78 ], [ %indvars.iv.next96, %39 ]
  %41 = getelementptr inbounds [0 x ptr], ptr %37, i64 0, i64 %indvars.iv95
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = icmp eq ptr %42, null
  br i1 %43, label %39, label %44, !prof !13

44:                                               ; preds = %40
  %45 = load ptr, ptr @stderr, align 8, !tbaa !14
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 460, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.12) #3
  br label %79

._crit_edge79:                                    ; preds = %39
  %.04182.pre = load ptr, ptr %37, align 8, !tbaa !14
  %.not5583 = icmp eq ptr %.04182.pre, null
  br i1 %.not5583, label %.critedge._crit_edge, label %.lr.ph88

.critedge.loopexit:                               ; preds = %74
  %.041 = load ptr, ptr %60, align 8, !tbaa !14
  %.not55 = icmp eq ptr %.041, null
  br i1 %.not55, label %.critedge._crit_edge, label %.lr.ph88, !llvm.loop !21

.lr.ph88:                                         ; preds = %._crit_edge79, %.critedge.loopexit
  %.04186 = phi ptr [ %.041, %.critedge.loopexit ], [ %.04182.pre, %._crit_edge79 ]
  %.04285 = phi ptr [ %.04186, %.critedge.loopexit ], [ null, %._crit_edge79 ]
  %.04384 = phi i32 [ %spec.select, %.critedge.loopexit ], [ 0, %._crit_edge79 ]
  %47 = getelementptr inbounds i8, ptr %.04186, i64 24
  %48 = load i32, ptr %47, align 8, !tbaa !22
  %spec.select = tail call i32 @llvm.umax.i32(i32 %.04384, i32 %48)
  %49 = getelementptr inbounds i8, ptr %.04186, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  %51 = icmp eq ptr %50, %.04285
  br i1 %51, label %55, label %52, !prof !13

52:                                               ; preds = %.lr.ph88
  %53 = load ptr, ptr @stderr, align 8, !tbaa !14
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 470, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.13) #3
  br label %79

55:                                               ; preds = %.lr.ph88
  %.not56 = icmp eq i32 %48, 0
  br i1 %.not56, label %56, label %59, !prof !15

56:                                               ; preds = %55
  %57 = load ptr, ptr @stderr, align 8, !tbaa !14
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 471, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.14) #3
  br label %79

59:                                               ; preds = %55
  %.not57 = icmp ugt i32 %48, %34
  br i1 %.not57, label %61, label %.preheader, !prof !15

.preheader:                                       ; preds = %59
  %60 = getelementptr inbounds i8, ptr %.04186, i64 32
  %wide.trip.count103 = zext i32 %48 to i64
  br label %64

61:                                               ; preds = %59
  %62 = load ptr, ptr @stderr, align 8, !tbaa !14
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 472, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.15) #3
  br label %79

64:                                               ; preds = %.preheader, %74
  %indvars.iv100 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next101, %74 ]
  %65 = getelementptr inbounds [0 x ptr], ptr %60, i64 0, i64 %indvars.iv100
  %66 = load ptr, ptr %65, align 8, !tbaa !14
  %.not58 = icmp eq ptr %66, null
  br i1 %.not58, label %74, label %67

67:                                               ; preds = %64
  %68 = getelementptr inbounds i8, ptr %66, i64 24
  %69 = load i32, ptr %68, align 8, !tbaa !22
  %70 = zext i32 %69 to i64
  %.not59 = icmp ugt i64 %indvars.iv100, %70
  br i1 %.not59, label %71, label %74, !prof !15

71:                                               ; preds = %67
  %72 = load ptr, ptr @stderr, align 8, !tbaa !14
  %73 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 475, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.16) #3
  br label %79

74:                                               ; preds = %64, %67
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next101, %wide.trip.count103
  br i1 %exitcond104.not, label %.critedge.loopexit, label %64, !llvm.loop !23

.critedge._crit_edge:                             ; preds = %.critedge.loopexit, %._crit_edge79
  %.043.lcssa = phi i32 [ 0, %._crit_edge79 ], [ %spec.select, %.critedge.loopexit ]
  %75 = icmp eq i32 %34, %.043.lcssa
  br i1 %75, label %79, label %76, !prof !13

76:                                               ; preds = %.critedge._crit_edge
  %77 = load ptr, ptr @stderr, align 8, !tbaa !14
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 482, ptr noundef nonnull @__func__.skiplist_verify, ptr noundef nonnull @.str.17) #3
  br label %79

79:                                               ; preds = %71, %44, %31, %52, %56, %61, %76, %.critedge._crit_edge, %24, %13, %9
  %.5 = phi i1 [ false, %31 ], [ false, %44 ], [ false, %24 ], [ false, %9 ], [ false, %13 ], [ false, %71 ], [ false, %61 ], [ false, %56 ], [ false, %52 ], [ false, %76 ], [ true, %.critedge._crit_edge ]
  ret i1 %.5
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #2

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 24}
!6 = !{!"skiplist", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !11, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !10, i64 12}
!13 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!14 = !{!7, !7, i64 0}
!15 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !19}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass