; LLVM IR from attractivechaos/plb2 :: src/c (bedcov)

; 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.rsbucket_intv_t = type { ptr, ptr }
%struct.intv_t = type { i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.rs_sort_intv = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @rs_insertsort_intv(ptr 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; 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 @rs_sort_intv(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca [256 x %struct.rsbucket_intv_t], align 16
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.intv_t, align 8
  %17 = alloca %struct.intv_t, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = shl i32 1, %18
  store i32 %19, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %20 = load i32, ptr %10, align 4, !tbaa !9
  %21 = sub nsw i32 %20, 1
  store i32 %21, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4096, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %22 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %22, i64 %24
  store ptr %25, ptr %14, align 8, !tbaa !5
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = icmp sle i32 %26, 8
  br i1 %27, label %28, label %29

28:                                               ; preds = %4
  br label %30

29:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 118, ptr noundef @__PRETTY_FUNCTION__.rs_sort_intv) #5
  unreachable

30:                                               ; preds = %28
  %31 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  store ptr %31, ptr %12, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %42, %30
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  %35 = icmp ne ptr %33, %34
  br i1 %35, label %36, label %45

36:                                               ; preds = %32
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %38, i32 0, i32 1
  store ptr %37, ptr %39, align 8, !tbaa !11
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %40, i32 0, i32 0
  store ptr %37, ptr %41, align 8, !tbaa !13
  br label %42

42:                                               ; preds = %36
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %43, i32 1
  store ptr %44, ptr %12, align 8, !tbaa !5
  br label %32, !llvm.loop !14

45:                                               ; preds = %32
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %46, ptr %9, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %65, %45
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = icmp ne ptr %48, %49
  br i1 %50, label %51, label %68

51:                                               ; preds = %47
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.intv_t, ptr %52, i32 0, i32 0
  %54 = load i64, ptr %53, align 8, !tbaa !16
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = ashr i64 %54, %56
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = and i64 %57, %59
  %61 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 %60
  %62 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.intv_t, ptr %63, i32 1
  store ptr %64, ptr %62, align 8, !tbaa !11
  br label %65

65:                                               ; preds = %51
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.intv_t, ptr %66, i32 1
  store ptr %67, ptr %9, align 8, !tbaa !5
  br label %47, !llvm.loop !19

68:                                               ; preds = %47
  %69 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  %70 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %69, i64 1
  store ptr %70, ptr %12, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %95, %68
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = icmp ne ptr %72, %73
  br i1 %74, label %75, label %98

75:                                               ; preds = %71
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %76, i64 -1
  %78 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = ptrtoint ptr %79 to i64
  %82 = ptrtoint ptr %80 to i64
  %83 = sub i64 %81, %82
  %84 = sdiv exact i64 %83, 32
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds %struct.intv_t, ptr %87, i64 %84
  store ptr %88, ptr %86, align 8, !tbaa !11
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %89, i64 -1
  %91 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %93, i32 0, i32 0
  store ptr %92, ptr %94, align 8, !tbaa !13
  br label %95

95:                                               ; preds = %75
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %96, i32 1
  store ptr %97, ptr %12, align 8, !tbaa !5
  br label %71, !llvm.loop !20

98:                                               ; preds = %71
  %99 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  store ptr %99, ptr %12, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %168, %98
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = icmp ne ptr %101, %102
  br i1 %103, label %104, label %169

104:                                              ; preds = %100
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !13
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %108, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = icmp ne ptr %107, %110
  br i1 %111, label %112, label %165

112:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %113 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = getelementptr inbounds %struct.intv_t, ptr %116, i32 0, i32 0
  %118 = load i64, ptr %117, align 8, !tbaa !16
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = ashr i64 %118, %120
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = and i64 %121, %123
  %125 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %113, i64 %124
  store ptr %125, ptr %15, align 8, !tbaa !5
  %126 = load ptr, ptr %12, align 8, !tbaa !5
  %127 = icmp ne ptr %125, %126
  br i1 %127, label %128, label %159

128:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %131, i64 32, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  br label %132

132:                                              ; preds = %150, %128
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %16, i64 32, i1 false), !tbaa.struct !21
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %135, i64 32, i1 false), !tbaa.struct !21
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !13
  %139 = getelementptr inbounds %struct.intv_t, ptr %138, i32 1
  store ptr %139, ptr %137, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %138, ptr align 8 %17, i64 32, i1 false), !tbaa.struct !21
  %140 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  %141 = getelementptr inbounds %struct.intv_t, ptr %16, i32 0, i32 0
  %142 = load i64, ptr %141, align 8, !tbaa !16
  %143 = load i32, ptr %8, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = ashr i64 %142, %144
  %146 = load i32, ptr %11, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = and i64 %145, %147
  %149 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %140, i64 %148
  store ptr %149, ptr %15, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %132
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = icmp ne ptr %151, %152
  br i1 %153, label %132, label %154, !llvm.loop !23

154:                                              ; preds = %150
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !13
  %158 = getelementptr inbounds %struct.intv_t, ptr %157, i32 1
  store ptr %158, ptr %156, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %157, ptr align 8 %16, i64 32, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %164

159:                                              ; preds = %112
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !13
  %163 = getelementptr inbounds %struct.intv_t, ptr %162, i32 1
  store ptr %163, ptr %161, align 8, !tbaa !13
  br label %164

164:                                              ; preds = %159, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %168

165:                                              ; preds = %104
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %166, i32 1
  store ptr %167, ptr %12, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %165, %164
  br label %100, !llvm.loop !24

169:                                              ; preds = %100
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  %172 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %171, i32 0, i32 0
  store ptr %170, ptr %172, align 16, !tbaa !13
  %173 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  %174 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %173, i64 1
  store ptr %174, ptr %12, align 8, !tbaa !5
  br label %175

175:                                              ; preds = %186, %169
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = load ptr, ptr %14, align 8, !tbaa !5
  %178 = icmp ne ptr %176, %177
  br i1 %178, label %179, label %189

179:                                              ; preds = %175
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %180, i64 -1
  %182 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %181, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8, !tbaa !11
  %184 = load ptr, ptr %12, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %184, i32 0, i32 0
  store ptr %183, ptr %185, align 8, !tbaa !13
  br label %186

186:                                              ; preds = %179
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %187, i32 1
  store ptr %188, ptr %12, align 8, !tbaa !5
  br label %175, !llvm.loop !25

189:                                              ; preds = %175
  %190 = load i32, ptr %8, align 4, !tbaa !9
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %254

192:                                              ; preds = %189
  %193 = load i32, ptr %8, align 4, !tbaa !9
  %194 = load i32, ptr %7, align 4, !tbaa !9
  %195 = icmp sgt i32 %193, %194
  br i1 %195, label %196, label %200

196:                                              ; preds = %192
  %197 = load i32, ptr %8, align 4, !tbaa !9
  %198 = load i32, ptr %7, align 4, !tbaa !9
  %199 = sub nsw i32 %197, %198
  br label %201

200:                                              ; preds = %192
  br label %201

201:                                              ; preds = %200, %196
  %202 = phi i32 [ %199, %196 ], [ 0, %200 ]
  store i32 %202, ptr %8, align 4, !tbaa !9
  %203 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %13, i64 0, i64 0
  store ptr %203, ptr %12, align 8, !tbaa !5
  br label %204

204:                                              ; preds = %250, %201
  %205 = load ptr, ptr %12, align 8, !tbaa !5
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = icmp ne ptr %205, %206
  br i1 %207, label %208, label %253

208:                                              ; preds = %204
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %209, i32 0, i32 1
  %211 = load ptr, ptr %210, align 8, !tbaa !11
  %212 = load ptr, ptr %12, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %212, i32 0, i32 0
  %214 = load ptr, ptr %213, align 8, !tbaa !13
  %215 = ptrtoint ptr %211 to i64
  %216 = ptrtoint ptr %214 to i64
  %217 = sub i64 %215, %216
  %218 = sdiv exact i64 %217, 32
  %219 = icmp sgt i64 %218, 64
  br i1 %219, label %220, label %229

220:                                              ; preds = %208
  %221 = load ptr, ptr %12, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !13
  %224 = load ptr, ptr %12, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %224, i32 0, i32 1
  %226 = load ptr, ptr %225, align 8, !tbaa !11
  %227 = load i32, ptr %7, align 4, !tbaa !9
  %228 = load i32, ptr %8, align 4, !tbaa !9
  call void @rs_sort_intv(ptr noundef %223, ptr noundef %226, i32 noundef %227, i32 noundef %228)
  br label %249

229:                                              ; preds = %208
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %230, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !11
  %233 = load ptr, ptr %12, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %233, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8, !tbaa !13
  %236 = ptrtoint ptr %232 to i64
  %237 = ptrtoint ptr %235 to i64
  %238 = sub i64 %236, %237
  %239 = sdiv exact i64 %238, 32
  %240 = icmp sgt i64 %239, 1
  br i1 %240, label %241, label %248

241:                                              ; preds = %229
  %242 = load ptr, ptr %12, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !13
  %245 = load ptr, ptr %12, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %245, i32 0, i32 1
  %247 = load ptr, ptr %246, align 8, !tbaa !11
  call void @rs_insertsort_intv(ptr noundef %244, ptr noundef %247)
  br label %248

248:                                              ; preds = %241, %229
  br label %249

249:                                              ; preds = %248, %220
  br label %250

250:                                              ; preds = %249
  %251 = load ptr, ptr %12, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %251, i32 1
  store ptr %252, ptr %12, align 8, !tbaa !5
  br label %204, !llvm.loop !26

253:                                              ; preds = %204
  br label %254

254:                                              ; preds = %253, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4096, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

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


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

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.rs_sort_intv = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @rs_insertsort_intv(ptr 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; 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 @rs_sort_intv(ptr noundef %0, ptr noundef readnone %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca [256 x %struct.rsbucket_intv_t], align 16
  %.sroa.7 = alloca { i64, i64, i64 }, align 8
  %.sroa.4 = alloca { i64, i64, i64 }, align 8
  %6 = shl nuw i32 1, %2
  %7 = add nsw i32 %6, -1
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %5) #4
  %8 = sext i32 %6 to i64
  %.idx = shl nsw i64 %8, 4
  %9 = getelementptr inbounds i8, ptr %5, i64 %.idx
  %10 = icmp slt i32 %2, 9
  br i1 %10, label %.lr.ph.preheader, label %17

.lr.ph.preheader:                                 ; preds = %4
  %11 = add nsw i64 %.idx, -16
  %12 = lshr exact i64 %11, 4
  %13 = add nuw nsw i64 %12, 1
  %xtraiter = and i64 %13, 7
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.07493.prol = phi ptr [ %15, %.lr.ph.prol ], [ %5, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %14 = getelementptr inbounds i8, ptr %.07493.prol, i64 8
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %0, ptr %.07493.prol, align 8, !tbaa !10
  %15 = getelementptr inbounds i8, ptr %.07493.prol, i64 16
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !11

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.07493.unr = phi ptr [ %5, %.lr.ph.preheader ], [ %15, %.lr.ph.prol ]
  %16 = icmp ult i64 %11, 112
  br i1 %16, label %.preheader90, label %.lr.ph

17:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 118, ptr noundef nonnull @__PRETTY_FUNCTION__.rs_sort_intv) #5
  unreachable

.preheader90:                                     ; preds = %.lr.ph, %.lr.ph.prol.loopexit
  %.not8194 = icmp eq ptr %0, %1
  br i1 %.not8194, label %._crit_edge, label %.lr.ph96

.lr.ph96:                                         ; preds = %.preheader90
  %18 = zext nneg i32 %3 to i64
  %19 = sext i32 %7 to i64
  br label %36

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.07493 = phi ptr [ %35, %.lr.ph ], [ %.07493.unr, %.lr.ph.prol.loopexit ]
  %20 = getelementptr inbounds i8, ptr %.07493, i64 8
  store ptr %0, ptr %20, align 8, !tbaa !5
  store ptr %0, ptr %.07493, align 8, !tbaa !10
  %21 = getelementptr inbounds i8, ptr %.07493, i64 16
  %22 = getelementptr inbounds i8, ptr %.07493, i64 24
  store ptr %0, ptr %22, align 8, !tbaa !5
  store ptr %0, ptr %21, align 8, !tbaa !10
  %23 = getelementptr inbounds i8, ptr %.07493, i64 32
  %24 = getelementptr inbounds i8, ptr %.07493, i64 40
  store ptr %0, ptr %24, align 8, !tbaa !5
  store ptr %0, ptr %23, align 8, !tbaa !10
  %25 = getelementptr inbounds i8, ptr %.07493, i64 48
  %26 = getelementptr inbounds i8, ptr %.07493, i64 56
  store ptr %0, ptr %26, align 8, !tbaa !5
  store ptr %0, ptr %25, align 8, !tbaa !10
  %27 = getelementptr inbounds i8, ptr %.07493, i64 64
  %28 = getelementptr inbounds i8, ptr %.07493, i64 72
  store ptr %0, ptr %28, align 8, !tbaa !5
  store ptr %0, ptr %27, align 8, !tbaa !10
  %29 = getelementptr inbounds i8, ptr %.07493, i64 80
  %30 = getelementptr inbounds i8, ptr %.07493, i64 88
  store ptr %0, ptr %30, align 8, !tbaa !5
  store ptr %0, ptr %29, align 8, !tbaa !10
  %31 = getelementptr inbounds i8, ptr %.07493, i64 96
  %32 = getelementptr inbounds i8, ptr %.07493, i64 104
  store ptr %0, ptr %32, align 8, !tbaa !5
  store ptr %0, ptr %31, align 8, !tbaa !10
  %33 = getelementptr inbounds i8, ptr %.07493, i64 112
  %34 = getelementptr inbounds i8, ptr %.07493, i64 120
  store ptr %0, ptr %34, align 8, !tbaa !5
  store ptr %0, ptr %33, align 8, !tbaa !10
  %35 = getelementptr inbounds i8, ptr %.07493, i64 128
  %.not.7 = icmp eq ptr %35, %9
  br i1 %.not.7, label %.preheader90, label %.lr.ph, !llvm.loop !13

36:                                               ; preds = %.lr.ph96, %36
  %.07395 = phi ptr [ %0, %.lr.ph96 ], [ %43, %36 ]
  %37 = load i64, ptr %.07395, align 8, !tbaa !15
  %38 = ashr i64 %37, %18
  %39 = and i64 %38, %19
  %40 = getelementptr inbounds [256 x %struct.rsbucket_intv_t], ptr %5, i64 0, i64 %39, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 32
  store ptr %42, ptr %40, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %.07395, i64 32
  %.not81 = icmp eq ptr %43, %1
  br i1 %.not81, label %._crit_edge, label %36, !llvm.loop !18

._crit_edge:                                      ; preds = %36, %.preheader90
  %44 = getelementptr inbounds i8, ptr %5, i64 16
  %.not8297 = icmp eq i32 %2, 0
  br i1 %.not8297, label %.lr.ph103, label %.lr.ph100

.lr.ph100:                                        ; preds = %._crit_edge
  %45 = ptrtoint ptr %0 to i64
  %46 = add nsw i64 %.idx, -32
  %47 = lshr exact i64 %46, 4
  %48 = add nuw nsw i64 %47, 1
  %xtraiter114 = and i64 %48, 3
  %lcmp.mod115.not = icmp eq i64 %xtraiter114, 0
  br i1 %lcmp.mod115.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %.lr.ph100, %.prol.preheader
  %.198.prol = phi ptr [ %56, %.prol.preheader ], [ %44, %.lr.ph100 ]
  %prol.iter116 = phi i64 [ %prol.iter116.next, %.prol.preheader ], [ 0, %.lr.ph100 ]
  %49 = getelementptr inbounds i8, ptr %.198.prol, i64 -8
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = ptrtoint ptr %50 to i64
  %52 = sub i64 %51, %45
  %53 = getelementptr inbounds i8, ptr %.198.prol, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 %52
  store ptr %55, ptr %53, align 8, !tbaa !5
  store ptr %50, ptr %.198.prol, align 8, !tbaa !10
  %56 = getelementptr inbounds i8, ptr %.198.prol, i64 16
  %prol.iter116.next = add i64 %prol.iter116, 1
  %prol.iter116.cmp.not = icmp eq i64 %prol.iter116.next, %xtraiter114
  br i1 %prol.iter116.cmp.not, label %.prol.loopexit, label %.prol.preheader, !llvm.loop !19

.prol.loopexit:                                   ; preds = %.prol.preheader, %.lr.ph100
  %.198.unr = phi ptr [ %44, %.lr.ph100 ], [ %56, %.prol.preheader ]
  %57 = icmp ult i64 %46, 48
  br i1 %57, label %.lr.ph103, label %.lr.ph100.new

.lr.ph103:                                        ; preds = %.prol.loopexit, %.lr.ph100.new, %._crit_edge
  %58 = zext i32 %3 to i64
  %59 = sext i32 %7 to i64
  br label %86

.lr.ph100.new:                                    ; preds = %.prol.loopexit, %.lr.ph100.new
  %.198 = phi ptr [ %85, %.lr.ph100.new ], [ %.198.unr, %.prol.loopexit ]
  %60 = getelementptr inbounds i8, ptr %.198, i64 -8
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = ptrtoint ptr %61 to i64
  %63 = sub i64 %62, %45
  %64 = getelementptr inbounds i8, ptr %.198, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 %63
  store ptr %66, ptr %64, align 8, !tbaa !5
  store ptr %61, ptr %.198, align 8, !tbaa !10
  %67 = getelementptr inbounds i8, ptr %.198, i64 16
  %68 = ptrtoint ptr %66 to i64
  %69 = sub i64 %68, %45
  %70 = getelementptr inbounds i8, ptr %.198, i64 24
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 %69
  store ptr %72, ptr %70, align 8, !tbaa !5
  store ptr %66, ptr %67, align 8, !tbaa !10
  %73 = getelementptr inbounds i8, ptr %.198, i64 32
  %74 = ptrtoint ptr %72 to i64
  %75 = sub i64 %74, %45
  %76 = getelementptr inbounds i8, ptr %.198, i64 40
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 %75
  store ptr %78, ptr %76, align 8, !tbaa !5
  store ptr %72, ptr %73, align 8, !tbaa !10
  %79 = getelementptr inbounds i8, ptr %.198, i64 48
  %80 = ptrtoint ptr %78 to i64
  %81 = sub i64 %80, %45
  %82 = getelementptr inbounds i8, ptr %.198, i64 56
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 %81
  store ptr %84, ptr %82, align 8, !tbaa !5
  store ptr %78, ptr %79, align 8, !tbaa !10
  %85 = getelementptr inbounds i8, ptr %.198, i64 64
  %.not82.3 = icmp eq ptr %85, %9
  br i1 %.not82.3, label %.lr.ph103, label %.lr.ph100.new, !llvm.loop !20

86:                                               ; preds = %.lr.ph103, %109
  %.2102 = phi ptr [ %5, %.lr.ph103 ], [ %.3, %109 ]
  %87 = load ptr, ptr %.2102, align 8, !tbaa !10
  %88 = getelementptr inbounds i8, ptr %.2102, i64 8
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %.not87 = icmp eq ptr %87, %89
  br i1 %.not87, label %107, label %90

90:                                               ; preds = %86
  %91 = load i64, ptr %87, align 8, !tbaa !21
  %92 = ashr i64 %91, %58
  %93 = and i64 %92, %59
  %94 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %5, i64 %93
  %.not88 = icmp eq ptr %94, %.2102
  br i1 %.not88, label %105, label %95

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %.sroa.7)
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %87, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7.0..sroa_idx, i64 24, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %.sroa.4)
  br label %96

96:                                               ; preds = %96, %95
  %.0 = phi ptr [ %94, %95 ], [ %101, %96 ]
  %.sroa.0.0 = phi i64 [ %91, %95 ], [ %.sroa.0.0.copyload2, %96 ]
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.sroa.4, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7, i64 24, i1 false), !tbaa.struct !22
  %97 = load ptr, ptr %.0, align 8, !tbaa !10
  %.sroa.0.0.copyload2 = load i64, ptr %97, align 8, !tbaa !21
  %.sroa.7.0..sroa_idx5 = getelementptr inbounds i8, ptr %97, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7.0..sroa_idx5, i64 24, i1 false), !tbaa.struct !22
  %98 = getelementptr inbounds i8, ptr %97, i64 32
  store ptr %98, ptr %.0, align 8, !tbaa !10
  store i64 %.sroa.0.0, ptr %97, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7.0..sroa_idx5, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.4, i64 24, i1 false), !tbaa.struct !22
  %99 = ashr i64 %.sroa.0.0.copyload2, %58
  %100 = and i64 %99, %59
  %101 = getelementptr inbounds %struct.rsbucket_intv_t, ptr %5, i64 %100
  %.not89 = icmp eq ptr %101, %.2102
  br i1 %.not89, label %102, label %96, !llvm.loop !23

102:                                              ; preds = %96
  %103 = load ptr, ptr %.2102, align 8, !tbaa !10
  %104 = getelementptr inbounds i8, ptr %103, i64 32
  store ptr %104, ptr %.2102, align 8, !tbaa !10
  store i64 %.sroa.0.0.copyload2, ptr %103, align 8, !tbaa !21
  %.sroa.7.0..sroa_idx6 = getelementptr inbounds i8, ptr %103, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7.0..sroa_idx6, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.7, i64 24, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %.sroa.4)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %.sroa.7)
  br label %109

105:                                              ; preds = %90
  %106 = getelementptr inbounds i8, ptr %87, i64 32
  store ptr %106, ptr %.2102, align 8, !tbaa !10
  br label %109

107:                                              ; preds = %86
  %108 = getelementptr inbounds i8, ptr %.2102, i64 16
  br label %109

109:                                              ; preds = %102, %105, %107
  %.3 = phi ptr [ %108, %107 ], [ %.2102, %105 ], [ %.2102, %102 ]
  %.not83 = icmp eq ptr %.3, %9
  br i1 %.not83, label %._crit_edge104, label %86, !llvm.loop !24

._crit_edge104:                                   ; preds = %109
  store ptr %0, ptr %5, align 16, !tbaa !10
  br i1 %.not8297, label %._crit_edge109, label %.lr.ph108.preheader

.lr.ph108.preheader:                              ; preds = %._crit_edge104
  %110 = add nsw i64 %.idx, -32
  %111 = lshr exact i64 %110, 4
  %112 = add nuw nsw i64 %111, 1
  %xtraiter117 = and i64 %112, 7
  %lcmp.mod118.not = icmp eq i64 %xtraiter117, 0
  br i1 %lcmp.mod118.not, label %.lr.ph108.prol.loopexit, label %.lr.ph108.prol

.lr.ph108.prol:                                   ; preds = %.lr.ph108.preheader, %.lr.ph108.prol
  %.4106.prol = phi ptr [ %115, %.lr.ph108.prol ], [ %44, %.lr.ph108.preheader ]
  %prol.iter119 = phi i64 [ %prol.iter119.next, %.lr.ph108.prol ], [ 0, %.lr.ph108.preheader ]
  %113 = getelementptr inbounds i8, ptr %.4106.prol, i64 -8
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  store ptr %114, ptr %.4106.prol, align 8, !tbaa !10
  %115 = getelementptr inbounds i8, ptr %.4106.prol, i64 16
  %prol.iter119.next = add i64 %prol.iter119, 1
  %prol.iter119.cmp.not = icmp eq i64 %prol.iter119.next, %xtraiter117
  br i1 %prol.iter119.cmp.not, label %.lr.ph108.prol.loopexit, label %.lr.ph108.prol, !llvm.loop !25

.lr.ph108.prol.loopexit:                          ; preds = %.lr.ph108.prol, %.lr.ph108.preheader
  %.4106.unr = phi ptr [ %44, %.lr.ph108.preheader ], [ %115, %.lr.ph108.prol ]
  %116 = icmp ult i64 %110, 112
  br i1 %116, label %._crit_edge109, label %.lr.ph108

.lr.ph108:                                        ; preds = %.lr.ph108.prol.loopexit, %.lr.ph108
  %.4106 = phi ptr [ %140, %.lr.ph108 ], [ %.4106.unr, %.lr.ph108.prol.loopexit ]
  %117 = getelementptr inbounds i8, ptr %.4106, i64 -8
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  store ptr %118, ptr %.4106, align 8, !tbaa !10
  %119 = getelementptr inbounds i8, ptr %.4106, i64 16
  %120 = getelementptr inbounds i8, ptr %.4106, i64 8
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  store ptr %121, ptr %119, align 8, !tbaa !10
  %122 = getelementptr inbounds i8, ptr %.4106, i64 32
  %123 = getelementptr inbounds i8, ptr %.4106, i64 24
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  store ptr %124, ptr %122, align 8, !tbaa !10
  %125 = getelementptr inbounds i8, ptr %.4106, i64 48
  %126 = getelementptr inbounds i8, ptr %.4106, i64 40
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  store ptr %127, ptr %125, align 8, !tbaa !10
  %128 = getelementptr inbounds i8, ptr %.4106, i64 64
  %129 = getelementptr inbounds i8, ptr %.4106, i64 56
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  store ptr %130, ptr %128, align 8, !tbaa !10
  %131 = getelementptr inbounds i8, ptr %.4106, i64 80
  %132 = getelementptr inbounds i8, ptr %.4106, i64 72
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  store ptr %133, ptr %131, align 8, !tbaa !10
  %134 = getelementptr inbounds i8, ptr %.4106, i64 96
  %135 = getelementptr inbounds i8, ptr %.4106, i64 88
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  store ptr %136, ptr %134, align 8, !tbaa !10
  %137 = getelementptr inbounds i8, ptr %.4106, i64 112
  %138 = getelementptr inbounds i8, ptr %.4106, i64 104
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  store ptr %139, ptr %137, align 8, !tbaa !10
  %140 = getelementptr inbounds i8, ptr %.4106, i64 128
  %.not84.7 = icmp eq ptr %140, %9
  br i1 %.not84.7, label %._crit_edge109, label %.lr.ph108, !llvm.loop !26

._crit_edge109:                                   ; preds = %.lr.ph108.prol.loopexit, %.lr.ph108, %._crit_edge104
  %.not85 = icmp eq i32 %3, 0
  br i1 %.not85, label %.loopexit, label %.lr.ph113.preheader

.lr.ph113.preheader:                              ; preds = %._crit_edge109
  %141 = icmp sgt i32 %3, %2
  %142 = sub nsw i32 %3, %2
  %143 = select i1 %141, i32 %142, i32 0
  br label %.lr.ph113

.lr.ph113:                                        ; preds = %.lr.ph113.preheader, %156
  %.5111 = phi ptr [ %157, %156 ], [ %5, %.lr.ph113.preheader ]
  %144 = getelementptr inbounds i8, ptr %.5111, i64 8
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = load ptr, ptr %.5111, align 8, !tbaa !10
  %147 = ptrtoint ptr %145 to i64
  %148 = ptrtoint ptr %146 to i64
  %149 = sub i64 %147, %148
  %150 = ashr exact i64 %149, 5
  %151 = icmp sgt i64 %150, 64
  br i1 %151, label %152, label %153

152:                                              ; preds = %.lr.ph113
  call void @rs_sort_intv(ptr noundef %146, ptr noundef %145, i32 noundef %2, i32 noundef %143)
  br label %156

153:                                              ; preds = %.lr.ph113
  %154 = icmp sgt i64 %150, 1
  br i1 %154, label %155, label %156

155:                                              ; preds = %153
  call void @rs_insertsort_intv(ptr noundef %146, ptr noundef %145)
  br label %156

156:                                              ; preds = %152, %155, %153
  %157 = getelementptr inbounds i8, ptr %.5111, i64 16
  %.not86 = icmp eq ptr %157, %9
  br i1 %.not86, label %.loopexit, label %.lr.ph113, !llvm.loop !27

.loopexit:                                        ; preds = %156, %._crit_edge109
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #4
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { noreturn 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, !7, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!17 = !{!"long", !8, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !14}
!21 = !{!17, !17, i64 0}
!22 = !{i64 0, i64 8, !21, i64 8, i64 8, !21, i64 16, i64 8, !21}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}


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