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

@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @iit_index(i64 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @iit_overlap(i64 noundef, ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @gen_intv(i64 noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 28, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 14, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 11, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 1000000, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !11
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %29, label %35

29:                                               ; preds = %2
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = getelementptr inbounds ptr, ptr %30, i64 1
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call i32 @atoi(ptr noundef %32) #6
  %34 = sext i32 %33 to i64
  store i64 %34, ptr %11, align 8, !tbaa !11
  br label %35

35:                                               ; preds = %29, %2
  %36 = load i64, ptr %11, align 8, !tbaa !11
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = call ptr @gen_intv(i64 noundef %36, ptr noundef %9, i32 noundef %37, i32 noundef %38)
  store ptr %39, ptr %13, align 8, !tbaa !9
  %40 = load i64, ptr %11, align 8, !tbaa !11
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = call ptr @gen_intv(i64 noundef %40, ptr noundef %9, i32 noundef %41, i32 noundef %42)
  store ptr %43, ptr %14, align 8, !tbaa !9
  %44 = load i64, ptr %11, align 8, !tbaa !11
  %45 = load ptr, ptr %13, align 8, !tbaa !9
  %46 = call i32 @iit_index(i64 noundef %44, ptr noundef %45)
  store i32 %46, ptr %8, align 4, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %47

47:                                               ; preds = %178, %35
  %48 = load i64, ptr %10, align 8, !tbaa !11
  %49 = load i64, ptr %11, align 8, !tbaa !11
  %50 = icmp ult i64 %48, %49
  br i1 %50, label %51, label %181

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %52 = load ptr, ptr %14, align 8, !tbaa !9
  %53 = load i64, ptr %10, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.intv_t, ptr %52, i64 %53
  %55 = getelementptr inbounds %struct.intv_t, ptr %54, i32 0, i32 0
  %56 = load i64, ptr %55, align 8, !tbaa !13
  store i64 %56, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %57 = load ptr, ptr %14, align 8, !tbaa !9
  %58 = load i64, ptr %10, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.intv_t, ptr %57, i64 %58
  %60 = getelementptr inbounds %struct.intv_t, ptr %59, i32 0, i32 1
  %61 = load i64, ptr %60, align 8, !tbaa !15
  store i64 %61, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %62 = load i64, ptr %11, align 8, !tbaa !11
  %63 = load ptr, ptr %13, align 8, !tbaa !9
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = load i64, ptr %17, align 8, !tbaa !11
  %66 = load i64, ptr %18, align 8, !tbaa !11
  %67 = call i64 @iit_overlap(i64 noundef %62, ptr noundef %63, i32 noundef %64, i64 noundef %65, i64 noundef %66, ptr noundef %15, ptr noundef %12)
  store i64 %67, ptr %22, align 8, !tbaa !11
  %68 = load i64, ptr %22, align 8, !tbaa !11
  %69 = icmp eq i64 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %51
  store i32 4, ptr %24, align 4
  br label %175

71:                                               ; preds = %51
  %72 = load ptr, ptr %15, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.intv_t, ptr %72, i64 0
  %74 = getelementptr inbounds %struct.intv_t, ptr %73, i32 0, i32 0
  %75 = load i64, ptr %74, align 8, !tbaa !13
  %76 = load i64, ptr %17, align 8, !tbaa !11
  %77 = icmp sgt i64 %75, %76
  br i1 %77, label %78, label %83

78:                                               ; preds = %71
  %79 = load ptr, ptr %15, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.intv_t, ptr %79, i64 0
  %81 = getelementptr inbounds %struct.intv_t, ptr %80, i32 0, i32 0
  %82 = load i64, ptr %81, align 8, !tbaa !13
  br label %85

83:                                               ; preds = %71
  %84 = load i64, ptr %17, align 8, !tbaa !11
  br label %85

85:                                               ; preds = %83, %78
  %86 = phi i64 [ %82, %78 ], [ %84, %83 ]
  store i64 %86, ptr %19, align 8, !tbaa !11
  %87 = load ptr, ptr %15, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.intv_t, ptr %87, i64 0
  %89 = getelementptr inbounds %struct.intv_t, ptr %88, i32 0, i32 1
  %90 = load i64, ptr %89, align 8, !tbaa !15
  %91 = load i64, ptr %18, align 8, !tbaa !11
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %93, label %98

93:                                               ; preds = %85
  %94 = load ptr, ptr %15, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.intv_t, ptr %94, i64 0
  %96 = getelementptr inbounds %struct.intv_t, ptr %95, i32 0, i32 1
  %97 = load i64, ptr %96, align 8, !tbaa !15
  br label %100

98:                                               ; preds = %85
  %99 = load i64, ptr %18, align 8, !tbaa !11
  br label %100

100:                                              ; preds = %98, %93
  %101 = phi i64 [ %97, %93 ], [ %99, %98 ]
  store i64 %101, ptr %20, align 8, !tbaa !11
  store i64 1, ptr %23, align 8, !tbaa !11
  br label %102

102:                                              ; preds = %163, %100
  %103 = load i64, ptr %23, align 8, !tbaa !11
  %104 = load i64, ptr %22, align 8, !tbaa !11
  %105 = icmp ult i64 %103, %104
  br i1 %105, label %106, label %166

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %107 = load ptr, ptr %15, align 8, !tbaa !9
  %108 = load i64, ptr %23, align 8, !tbaa !11
  %109 = getelementptr inbounds %struct.intv_t, ptr %107, i64 %108
  %110 = getelementptr inbounds %struct.intv_t, ptr %109, i32 0, i32 0
  %111 = load i64, ptr %110, align 8, !tbaa !13
  %112 = load i64, ptr %17, align 8, !tbaa !11
  %113 = icmp sgt i64 %111, %112
  br i1 %113, label %114, label %120

114:                                              ; preds = %106
  %115 = load ptr, ptr %15, align 8, !tbaa !9
  %116 = load i64, ptr %23, align 8, !tbaa !11
  %117 = getelementptr inbounds %struct.intv_t, ptr %115, i64 %116
  %118 = getelementptr inbounds %struct.intv_t, ptr %117, i32 0, i32 0
  %119 = load i64, ptr %118, align 8, !tbaa !13
  br label %122

120:                                              ; preds = %106
  %121 = load i64, ptr %17, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %120, %114
  %123 = phi i64 [ %119, %114 ], [ %121, %120 ]
  store i64 %123, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %124 = load ptr, ptr %15, align 8, !tbaa !9
  %125 = load i64, ptr %23, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.intv_t, ptr %124, i64 %125
  %127 = getelementptr inbounds %struct.intv_t, ptr %126, i32 0, i32 1
  %128 = load i64, ptr %127, align 8, !tbaa !15
  %129 = load i64, ptr %18, align 8, !tbaa !11
  %130 = icmp slt i64 %128, %129
  br i1 %130, label %131, label %137

131:                                              ; preds = %122
  %132 = load ptr, ptr %15, align 8, !tbaa !9
  %133 = load i64, ptr %23, align 8, !tbaa !11
  %134 = getelementptr inbounds %struct.intv_t, ptr %132, i64 %133
  %135 = getelementptr inbounds %struct.intv_t, ptr %134, i32 0, i32 1
  %136 = load i64, ptr %135, align 8, !tbaa !15
  br label %139

137:                                              ; preds = %122
  %138 = load i64, ptr %18, align 8, !tbaa !11
  br label %139

139:                                              ; preds = %137, %131
  %140 = phi i64 [ %136, %131 ], [ %138, %137 ]
  store i64 %140, ptr %26, align 8, !tbaa !11
  %141 = load i64, ptr %25, align 8, !tbaa !11
  %142 = load i64, ptr %20, align 8, !tbaa !11
  %143 = icmp sgt i64 %141, %142
  br i1 %143, label %144, label %152

144:                                              ; preds = %139
  %145 = load i64, ptr %20, align 8, !tbaa !11
  %146 = load i64, ptr %19, align 8, !tbaa !11
  %147 = sub nsw i64 %145, %146
  %148 = load i64, ptr %21, align 8, !tbaa !11
  %149 = add nsw i64 %148, %147
  store i64 %149, ptr %21, align 8, !tbaa !11
  %150 = load i64, ptr %25, align 8, !tbaa !11
  store i64 %150, ptr %19, align 8, !tbaa !11
  %151 = load i64, ptr %26, align 8, !tbaa !11
  store i64 %151, ptr %20, align 8, !tbaa !11
  br label %162

152:                                              ; preds = %139
  %153 = load i64, ptr %20, align 8, !tbaa !11
  %154 = load i64, ptr %26, align 8, !tbaa !11
  %155 = icmp sgt i64 %153, %154
  br i1 %155, label %156, label %158

156:                                              ; preds = %152
  %157 = load i64, ptr %20, align 8, !tbaa !11
  br label %160

158:                                              ; preds = %152
  %159 = load i64, ptr %26, align 8, !tbaa !11
  br label %160

160:                                              ; preds = %158, %156
  %161 = phi i64 [ %157, %156 ], [ %159, %158 ]
  store i64 %161, ptr %20, align 8, !tbaa !11
  br label %162

162:                                              ; preds = %160, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %163

163:                                              ; preds = %162
  %164 = load i64, ptr %23, align 8, !tbaa !11
  %165 = add i64 %164, 1
  store i64 %165, ptr %23, align 8, !tbaa !11
  br label %102, !llvm.loop !16

166:                                              ; preds = %102
  %167 = load i64, ptr %20, align 8, !tbaa !11
  %168 = load i64, ptr %19, align 8, !tbaa !11
  %169 = sub nsw i64 %167, %168
  %170 = load i64, ptr %21, align 8, !tbaa !11
  %171 = add nsw i64 %170, %169
  store i64 %171, ptr %21, align 8, !tbaa !11
  %172 = load i64, ptr %21, align 8, !tbaa !11
  %173 = load i64, ptr %16, align 8, !tbaa !11
  %174 = add nsw i64 %173, %172
  store i64 %174, ptr %16, align 8, !tbaa !11
  store i32 0, ptr %24, align 4
  br label %175

175:                                              ; preds = %166, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %176 = load i32, ptr %24, align 4
  switch i32 %176, label %187 [
    i32 0, label %177
    i32 4, label %178
  ]

177:                                              ; preds = %175
  br label %178

178:                                              ; preds = %177, %175
  %179 = load i64, ptr %10, align 8, !tbaa !11
  %180 = add i64 %179, 1
  store i64 %180, ptr %10, align 8, !tbaa !11
  br label %47, !llvm.loop !18

181:                                              ; preds = %47
  %182 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %182) #5
  %183 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %183) #5
  %184 = load i64, ptr %16, align 8, !tbaa !11
  %185 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %184)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %186 = load i32, ptr %3, align 4
  ret i32 %186

187:                                              ; preds = %175
  unreachable
}

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare i32 @printf(ptr noundef, ...) #4

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

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


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

@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @iit_index(i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @iit_overlap(i64 noundef, ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @gen_intv(i64 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 11, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr null, ptr %5, align 8, !tbaa !11
  %6 = icmp sgt i32 %0, 1
  br i1 %6, label %7, label %12

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = tail call i32 @atoi(ptr nocapture noundef %9) #7
  %11 = sext i32 %10 to i64
  br label %12

12:                                               ; preds = %7, %2
  %.058 = phi i64 [ %11, %7 ], [ 1000000, %2 ]
  %13 = call ptr @gen_intv(i64 noundef %.058, ptr noundef nonnull %3, i32 noundef 28, i32 noundef 14)
  %14 = call ptr @gen_intv(i64 noundef %.058, ptr noundef nonnull %3, i32 noundef 28, i32 noundef 14)
  %15 = call i32 @iit_index(i64 noundef %.058, ptr noundef %13)
  %.not = icmp eq i64 %.058, 0
  br i1 %.not, label %._crit_edge89, label %.lr.ph88

.lr.ph88:                                         ; preds = %12, %44
  %.086 = phi i64 [ %45, %44 ], [ 0, %12 ]
  %.06485 = phi i64 [ %.165, %44 ], [ 0, %12 ]
  %16 = getelementptr inbounds %struct.intv_t, ptr %14, i64 %.086
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %16, i64 8
  %19 = load i64, ptr %18, align 8, !tbaa !15
  %20 = call i64 @iit_overlap(i64 noundef %.058, ptr noundef %13, i32 noundef %15, i64 noundef %17, i64 noundef %19, ptr noundef nonnull %5, ptr noundef nonnull %4)
  %21 = icmp eq i64 %20, 0
  br i1 %21, label %44, label %22

22:                                               ; preds = %.lr.ph88
  %23 = load ptr, ptr %5, align 8, !tbaa !11
  %24 = load i64, ptr %23, align 8, !tbaa !13
  %. = call i64 @llvm.smax.i64(i64 %24, i64 %17)
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load i64, ptr %25, align 8, !tbaa !15
  %27 = call i64 @llvm.smin.i64(i64 %26, i64 %19)
  %.062.neg77 = sub i64 0, %.
  %.not91 = icmp eq i64 %20, 1
  br i1 %.not91, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22, %39
  %.062.neg82 = phi i64 [ %.062.neg, %39 ], [ %.062.neg77, %22 ]
  %.05781 = phi i64 [ %40, %39 ], [ 1, %22 ]
  %.05980 = phi i64 [ %.1, %39 ], [ 0, %22 ]
  %.06079 = phi i64 [ %.161, %39 ], [ %27, %22 ]
  %.06278 = phi i64 [ %.163, %39 ], [ %., %22 ]
  %28 = getelementptr inbounds %struct.intv_t, ptr %23, i64 %.05781
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %.76 = call i64 @llvm.smax.i64(i64 %29, i64 %17)
  %30 = getelementptr inbounds %struct.intv_t, ptr %23, i64 %.05781, i32 1
  %31 = load i64, ptr %30, align 8, !tbaa !15
  %32 = call i64 @llvm.smin.i64(i64 %31, i64 %19)
  %33 = icmp sgt i64 %.76, %.06079
  br i1 %33, label %34, label %37

34:                                               ; preds = %.lr.ph
  %35 = add i64 %.06079, %.062.neg82
  %36 = add nsw i64 %35, %.05980
  br label %39

37:                                               ; preds = %.lr.ph
  %38 = call i64 @llvm.smax.i64(i64 %.06079, i64 %32)
  br label %39

39:                                               ; preds = %37, %34
  %.163 = phi i64 [ %.76, %34 ], [ %.06278, %37 ]
  %.161 = phi i64 [ %32, %34 ], [ %38, %37 ]
  %.1 = phi i64 [ %36, %34 ], [ %.05980, %37 ]
  %40 = add nuw i64 %.05781, 1
  %.062.neg = sub i64 0, %.163
  %exitcond.not = icmp eq i64 %40, %20
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %39, %22
  %.060.lcssa = phi i64 [ %27, %22 ], [ %.161, %39 ]
  %.059.lcssa = phi i64 [ 0, %22 ], [ %.1, %39 ]
  %.062.neg.lcssa = phi i64 [ %.062.neg77, %22 ], [ %.062.neg, %39 ]
  %41 = add i64 %.062.neg.lcssa, %.06485
  %42 = add i64 %41, %.060.lcssa
  %43 = add i64 %42, %.059.lcssa
  br label %44

44:                                               ; preds = %.lr.ph88, %._crit_edge
  %.165 = phi i64 [ %43, %._crit_edge ], [ %.06485, %.lr.ph88 ]
  %45 = add nuw i64 %.086, 1
  %exitcond93.not = icmp eq i64 %45, %.058
  br i1 %exitcond93.not, label %._crit_edge89, label %.lr.ph88, !llvm.loop !18

._crit_edge89:                                    ; preds = %44, %12
  %.064.lcssa = phi i64 [ 0, %12 ], [ %.165, %44 ]
  call void @free(ptr noundef %13) #6
  call void @free(ptr noundef %14) #6
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.064.lcssa)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

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

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!15 = !{!14, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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