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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @iit_overlap(i64 noundef %0, ptr noundef %1, i32 noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca [64 x %struct.stackcell_t], align 16
  %18 = alloca %struct.stackcell_t, align 8
  %19 = alloca %struct.stackcell_t, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca %struct.stackcell_t, align 8
  %25 = alloca %struct.stackcell_t, align 8
  %26 = alloca %struct.stackcell_t, align 8
  store i64 %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !11
  store i64 %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1024, ptr %17) #4
  %27 = load i32, ptr %16, align 4, !tbaa !11
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %16, align 4, !tbaa !11
  %29 = sext i32 %27 to i64
  %30 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %17, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.stackcell_t, ptr %18, i32 0, i32 0
  %32 = load i32, ptr %10, align 4, !tbaa !11
  %33 = zext i32 %32 to i64
  %34 = shl i64 1, %33
  %35 = sub i64 %34, 1
  store i64 %35, ptr %31, align 8, !tbaa !13
  %36 = getelementptr inbounds %struct.stackcell_t, ptr %18, i32 0, i32 1
  %37 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %37, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds %struct.stackcell_t, ptr %18, i32 0, i32 2
  store i32 0, ptr %38, align 4, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !17
  br label %39

39:                                               ; preds = %210, %7
  %40 = load i32, ptr %16, align 4, !tbaa !11
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %211

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %43 = load i32, ptr %16, align 4, !tbaa !11
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr %16, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %17, i64 0, i64 %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 16 %46, i64 16, i1 false), !tbaa.struct !17
  %47 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !15
  %49 = icmp sle i32 %48, 3
  br i1 %49, label %50, label %110

50:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %51 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %52 = load i64, ptr %51, align 8, !tbaa !13
  %53 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !15
  %55 = zext i32 %54 to i64
  %56 = lshr i64 %52, %55
  %57 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %58 = load i32, ptr %57, align 8, !tbaa !15
  %59 = zext i32 %58 to i64
  %60 = shl i64 %56, %59
  store i64 %60, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %61 = load i64, ptr %21, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !15
  %64 = add nsw i32 %63, 1
  %65 = zext i32 %64 to i64
  %66 = shl i64 1, %65
  %67 = add i64 %61, %66
  %68 = sub i64 %67, 1
  store i64 %68, ptr %22, align 8, !tbaa !5
  %69 = load i64, ptr %22, align 8, !tbaa !5
  %70 = load i64, ptr %8, align 8, !tbaa !5
  %71 = icmp uge i64 %69, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %50
  %73 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %73, ptr %22, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %72, %50
  %75 = load i64, ptr %21, align 8, !tbaa !5
  store i64 %75, ptr %20, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %106, %74
  %77 = load i64, ptr %20, align 8, !tbaa !5
  %78 = load i64, ptr %22, align 8, !tbaa !5
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %80, label %88

80:                                               ; preds = %76
  %81 = load ptr, ptr %9, align 8, !tbaa !9
  %82 = load i64, ptr %20, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.intv_t, ptr %81, i64 %82
  %84 = getelementptr inbounds %struct.intv_t, ptr %83, i32 0, i32 0
  %85 = load i64, ptr %84, align 8, !tbaa !18
  %86 = load i64, ptr %12, align 8, !tbaa !5
  %87 = icmp slt i64 %85, %86
  br label %88

88:                                               ; preds = %80, %76
  %89 = phi i1 [ false, %76 ], [ %87, %80 ]
  br i1 %89, label %90, label %109

90:                                               ; preds = %88
  %91 = load i64, ptr %11, align 8, !tbaa !5
  %92 = load ptr, ptr %9, align 8, !tbaa !9
  %93 = load i64, ptr %20, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.intv_t, ptr %92, i64 %93
  %95 = getelementptr inbounds %struct.intv_t, ptr %94, i32 0, i32 1
  %96 = load i64, ptr %95, align 8, !tbaa !20
  %97 = icmp slt i64 %91, %96
  br i1 %97, label %98, label %105

98:                                               ; preds = %90
  %99 = load ptr, ptr %13, align 8, !tbaa !9
  %100 = load ptr, ptr %14, align 8, !tbaa !9
  %101 = call ptr @iit_push_back(ptr noundef %99, ptr noundef %15, ptr noundef %100)
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = load i64, ptr %20, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.intv_t, ptr %102, i64 %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %101, ptr align 8 %104, i64 32, i1 false), !tbaa.struct !21
  br label %105

105:                                              ; preds = %98, %90
  br label %106

106:                                              ; preds = %105
  %107 = load i64, ptr %20, align 8, !tbaa !5
  %108 = add i64 %107, 1
  store i64 %108, ptr %20, align 8, !tbaa !5
  br label %76, !llvm.loop !22

109:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %210

110:                                              ; preds = %42
  %111 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 2
  %112 = load i32, ptr %111, align 4, !tbaa !16
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %158

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %115 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %116 = load i64, ptr %115, align 8, !tbaa !13
  %117 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %118 = load i32, ptr %117, align 8, !tbaa !15
  %119 = sub nsw i32 %118, 1
  %120 = zext i32 %119 to i64
  %121 = shl i64 1, %120
  %122 = sub i64 %116, %121
  store i64 %122, ptr %23, align 8, !tbaa !5
  %123 = load i32, ptr %16, align 4, !tbaa !11
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %16, align 4, !tbaa !11
  %125 = sext i32 %123 to i64
  %126 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %17, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.stackcell_t, ptr %24, i32 0, i32 0
  %128 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %129 = load i64, ptr %128, align 8, !tbaa !13
  store i64 %129, ptr %127, align 8, !tbaa !13
  %130 = getelementptr inbounds %struct.stackcell_t, ptr %24, i32 0, i32 1
  %131 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %132 = load i32, ptr %131, align 8, !tbaa !15
  store i32 %132, ptr %130, align 8, !tbaa !15
  %133 = getelementptr inbounds %struct.stackcell_t, ptr %24, i32 0, i32 2
  store i32 1, ptr %133, align 4, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %126, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !17
  %134 = load i64, ptr %23, align 8, !tbaa !5
  %135 = load i64, ptr %8, align 8, !tbaa !5
  %136 = icmp uge i64 %134, %135
  br i1 %136, label %145, label %137

137:                                              ; preds = %114
  %138 = load ptr, ptr %9, align 8, !tbaa !9
  %139 = load i64, ptr %23, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.intv_t, ptr %138, i64 %139
  %141 = getelementptr inbounds %struct.intv_t, ptr %140, i32 0, i32 2
  %142 = load i64, ptr %141, align 8, !tbaa !24
  %143 = load i64, ptr %11, align 8, !tbaa !5
  %144 = icmp sgt i64 %142, %143
  br i1 %144, label %145, label %157

145:                                              ; preds = %137, %114
  %146 = load i32, ptr %16, align 4, !tbaa !11
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %16, align 4, !tbaa !11
  %148 = sext i32 %146 to i64
  %149 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %17, i64 0, i64 %148
  %150 = getelementptr inbounds %struct.stackcell_t, ptr %25, i32 0, i32 0
  %151 = load i64, ptr %23, align 8, !tbaa !5
  store i64 %151, ptr %150, align 8, !tbaa !13
  %152 = getelementptr inbounds %struct.stackcell_t, ptr %25, i32 0, i32 1
  %153 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %154 = load i32, ptr %153, align 8, !tbaa !15
  %155 = sub nsw i32 %154, 1
  store i32 %155, ptr %152, align 8, !tbaa !15
  %156 = getelementptr inbounds %struct.stackcell_t, ptr %25, i32 0, i32 2
  store i32 0, ptr %156, align 4, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %149, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !17
  br label %157

157:                                              ; preds = %145, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %209

158:                                              ; preds = %110
  %159 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %160 = load i64, ptr %159, align 8, !tbaa !13
  %161 = load i64, ptr %8, align 8, !tbaa !5
  %162 = icmp ult i64 %160, %161
  br i1 %162, label %163, label %208

163:                                              ; preds = %158
  %164 = load ptr, ptr %9, align 8, !tbaa !9
  %165 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %166 = load i64, ptr %165, align 8, !tbaa !13
  %167 = getelementptr inbounds %struct.intv_t, ptr %164, i64 %166
  %168 = getelementptr inbounds %struct.intv_t, ptr %167, i32 0, i32 0
  %169 = load i64, ptr %168, align 8, !tbaa !18
  %170 = load i64, ptr %12, align 8, !tbaa !5
  %171 = icmp slt i64 %169, %170
  br i1 %171, label %172, label %208

172:                                              ; preds = %163
  %173 = load i64, ptr %11, align 8, !tbaa !5
  %174 = load ptr, ptr %9, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %176 = load i64, ptr %175, align 8, !tbaa !13
  %177 = getelementptr inbounds %struct.intv_t, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.intv_t, ptr %177, i32 0, i32 1
  %179 = load i64, ptr %178, align 8, !tbaa !20
  %180 = icmp slt i64 %173, %179
  br i1 %180, label %181, label %189

181:                                              ; preds = %172
  %182 = load ptr, ptr %13, align 8, !tbaa !9
  %183 = load ptr, ptr %14, align 8, !tbaa !9
  %184 = call ptr @iit_push_back(ptr noundef %182, ptr noundef %15, ptr noundef %183)
  %185 = load ptr, ptr %9, align 8, !tbaa !9
  %186 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %187 = load i64, ptr %186, align 8, !tbaa !13
  %188 = getelementptr inbounds %struct.intv_t, ptr %185, i64 %187
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %184, ptr align 8 %188, i64 32, i1 false), !tbaa.struct !21
  br label %189

189:                                              ; preds = %181, %172
  %190 = load i32, ptr %16, align 4, !tbaa !11
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %16, align 4, !tbaa !11
  %192 = sext i32 %190 to i64
  %193 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %17, i64 0, i64 %192
  %194 = getelementptr inbounds %struct.stackcell_t, ptr %26, i32 0, i32 0
  %195 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 0
  %196 = load i64, ptr %195, align 8, !tbaa !13
  %197 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %198 = load i32, ptr %197, align 8, !tbaa !15
  %199 = sub nsw i32 %198, 1
  %200 = zext i32 %199 to i64
  %201 = shl i64 1, %200
  %202 = add i64 %196, %201
  store i64 %202, ptr %194, align 8, !tbaa !13
  %203 = getelementptr inbounds %struct.stackcell_t, ptr %26, i32 0, i32 1
  %204 = getelementptr inbounds %struct.stackcell_t, ptr %19, i32 0, i32 1
  %205 = load i32, ptr %204, align 8, !tbaa !15
  %206 = sub nsw i32 %205, 1
  store i32 %206, ptr %203, align 8, !tbaa !15
  %207 = getelementptr inbounds %struct.stackcell_t, ptr %26, i32 0, i32 2
  store i32 0, ptr %207, align 4, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %193, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !17
  br label %208

208:                                              ; preds = %189, %163, %158
  br label %209

209:                                              ; preds = %208, %157
  br label %210

210:                                              ; preds = %209, %109
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br label %39, !llvm.loop !25

211:                                              ; preds = %39
  %212 = load i64, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  ret i64 %212
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @iit_push_back(ptr noundef, ptr noundef, ptr noundef) #3

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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !12, i64 8, !12, i64 12}
!15 = !{!14, !12, i64 8}
!16 = !{!14, !12, i64 12}
!17 = !{i64 0, i64 8, !5, i64 8, i64 4, !11, i64 12, i64 4, !11}
!18 = !{!19, !6, i64 0}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!19, !6, i64 8}
!21 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!19, !6, i64 16}
!25 = distinct !{!25, !23}


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

; 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local i64 @iit_overlap(i64 noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca i64, align 8
  %9 = alloca [64 x %struct.stackcell_t], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %9) #5
  %10 = zext nneg i32 %2 to i64
  %notmask = shl nsw i64 -1, %10
  %11 = xor i64 %notmask, -1
  store i64 %11, ptr %9, align 16, !tbaa !5
  %.sroa.235.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %2, ptr %.sroa.235.0..sroa_idx, align 8, !tbaa !9
  %.sroa.336.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 12
  store i32 0, ptr %.sroa.336.0..sroa_idx, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %7, %.critedge
  %.073 = phi i32 [ 1, %7 ], [ %.2, %.critedge ]
  %13 = add nsw i32 %.073, -1
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %9, i64 0, i64 %14
  %.sroa.018.0.copyload = load i64, ptr %15, align 16, !tbaa !5
  %.sroa.11.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.11.0.copyload = load i32, ptr %.sroa.11.0..sroa_idx, align 8, !tbaa !9
  %.sroa.20.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 12
  %16 = icmp slt i32 %.sroa.11.0.copyload, 4
  br i1 %16, label %17, label %37

17:                                               ; preds = %12
  %18 = zext nneg i32 %.sroa.11.0.copyload to i64
  %19 = shl nsw i64 -1, %18
  %20 = and i64 %19, %.sroa.018.0.copyload
  %21 = add nsw i32 %.sroa.11.0.copyload, 1
  %22 = zext nneg i32 %21 to i64
  %notmask74 = shl nsw i64 -1, %22
  %23 = xor i64 %notmask74, -1
  %24 = add i64 %20, %23
  %spec.select = call i64 @llvm.umin.i64(i64 %24, i64 %0)
  %25 = icmp ult i64 %20, %spec.select
  br i1 %25, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %17, %35
  %.06471 = phi i64 [ %36, %35 ], [ %20, %17 ]
  %26 = getelementptr inbounds %struct.intv_t, ptr %1, i64 %.06471
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = icmp slt i64 %27, %4
  br i1 %28, label %29, label %.critedge

29:                                               ; preds = %.lr.ph
  %30 = getelementptr inbounds i8, ptr %26, i64 8
  %31 = load i64, ptr %30, align 8, !tbaa !13
  %32 = icmp sgt i64 %31, %3
  br i1 %32, label %33, label %35

33:                                               ; preds = %29
  %34 = call ptr @iit_push_back(ptr noundef %5, ptr noundef nonnull %8, ptr noundef %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %26, i64 32, i1 false), !tbaa.struct !14
  br label %35

35:                                               ; preds = %29, %33
  %36 = add i64 %.06471, 1
  %exitcond.not = icmp eq i64 %36, %spec.select
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !15

37:                                               ; preds = %12
  %.sroa.20.0.copyload = load i32, ptr %.sroa.20.0..sroa_idx, align 4, !tbaa !9
  %38 = icmp eq i32 %.sroa.20.0.copyload, 0
  br i1 %38, label %39, label %51

39:                                               ; preds = %37
  %40 = add nsw i32 %.sroa.11.0.copyload, -1
  %41 = zext nneg i32 %40 to i64
  %.neg = shl nsw i64 -1, %41
  %42 = add i64 %.neg, %.sroa.018.0.copyload
  store i32 1, ptr %.sroa.20.0..sroa_idx, align 4, !tbaa !9
  %.not69 = icmp ult i64 %42, %0
  br i1 %.not69, label %43, label %47

43:                                               ; preds = %39
  %44 = getelementptr inbounds %struct.intv_t, ptr %1, i64 %42, i32 2
  %45 = load i64, ptr %44, align 8, !tbaa !17
  %46 = icmp sgt i64 %45, %3
  br i1 %46, label %47, label %.critedge

47:                                               ; preds = %43, %39
  %48 = add nsw i32 %.073, 1
  %49 = sext i32 %.073 to i64
  %50 = getelementptr inbounds [64 x %struct.stackcell_t], ptr %9, i64 0, i64 %49
  store i64 %42, ptr %50, align 16, !tbaa !5
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 8
  store i32 %40, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !9
  %.sroa.33.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 12
  br label %.critedge.sink.split

51:                                               ; preds = %37
  %52 = icmp ult i64 %.sroa.018.0.copyload, %0
  br i1 %52, label %53, label %.critedge

53:                                               ; preds = %51
  %54 = getelementptr inbounds %struct.intv_t, ptr %1, i64 %.sroa.018.0.copyload
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = icmp slt i64 %55, %4
  br i1 %56, label %57, label %.critedge

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %54, i64 8
  %59 = load i64, ptr %58, align 8, !tbaa !13
  %60 = icmp sgt i64 %59, %3
  br i1 %60, label %61, label %63

61:                                               ; preds = %57
  %62 = call ptr @iit_push_back(ptr noundef %5, ptr noundef nonnull %8, ptr noundef %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(32) %54, i64 32, i1 false), !tbaa.struct !14
  br label %63

63:                                               ; preds = %61, %57
  %64 = add nsw i32 %.sroa.11.0.copyload, -1
  %65 = zext nneg i32 %64 to i64
  %66 = shl nuw i64 1, %65
  %67 = add i64 %66, %.sroa.018.0.copyload
  store i64 %67, ptr %15, align 16, !tbaa !5
  store i32 %64, ptr %.sroa.11.0..sroa_idx, align 8, !tbaa !9
  br label %.critedge.sink.split

.critedge.sink.split:                             ; preds = %63, %47
  %.sroa.33.0..sroa_idx.sink = phi ptr [ %.sroa.33.0..sroa_idx, %47 ], [ %.sroa.20.0..sroa_idx, %63 ]
  %.2.ph = phi i32 [ %48, %47 ], [ %.073, %63 ]
  store i32 0, ptr %.sroa.33.0..sroa_idx.sink, align 4, !tbaa !9
  br label %.critedge

.critedge:                                        ; preds = %35, %.lr.ph, %.critedge.sink.split, %17, %43, %53, %51
  %.2 = phi i32 [ %13, %53 ], [ %13, %51 ], [ %.073, %43 ], [ %13, %17 ], [ %.2.ph, %.critedge.sink.split ], [ %13, %.lr.ph ], [ %13, %35 ]
  %.not = icmp eq i32 %.2, 0
  br i1 %.not, label %68, label %12, !llvm.loop !18

68:                                               ; preds = %.critedge
  %69 = load i64, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  ret i64 %69
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @iit_push_back(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"long", !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 0}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!12, !6, i64 8}
!14 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !6, i64 16}
!18 = distinct !{!18, !16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass