; LLVM IR from lolosssss/leetcode :: c (57_insert_interval)

; 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.Interval = type { i32, i32 }

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @insert(ptr noundef, i32 noundef, i64, 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: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #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 i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Interval, align 4
  %7 = alloca %struct.Interval, align 4
  %8 = alloca %struct.Interval, align 4
  %9 = alloca %struct.Interval, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %13 = call noalias ptr @malloc(i64 noundef 16) #6
  store ptr %13, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %14 = call noalias ptr @malloc(i64 noundef 40) #6
  store ptr %14, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %15 = call noalias ptr @malloc(i64 noundef 8) #6
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.Interval, ptr %16, i64 0
  %18 = getelementptr inbounds %struct.Interval, ptr %17, i32 0, i32 0
  store i32 1, ptr %18, align 4, !tbaa !11
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.Interval, ptr %19, i64 0
  %21 = getelementptr inbounds %struct.Interval, ptr %20, i32 0, i32 1
  store i32 3, ptr %21, align 4, !tbaa !13
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Interval, ptr %22, i64 1
  %24 = getelementptr inbounds %struct.Interval, ptr %23, i32 0, i32 0
  store i32 6, ptr %24, align 4, !tbaa !11
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.Interval, ptr %25, i64 1
  %27 = getelementptr inbounds %struct.Interval, ptr %26, i32 0, i32 1
  store i32 9, ptr %27, align 4, !tbaa !13
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.Interval, ptr %28, i64 0
  %30 = getelementptr inbounds %struct.Interval, ptr %29, i32 0, i32 0
  store i32 1, ptr %30, align 4, !tbaa !11
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.Interval, ptr %31, i64 0
  %33 = getelementptr inbounds %struct.Interval, ptr %32, i32 0, i32 1
  store i32 2, ptr %33, align 4, !tbaa !13
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Interval, ptr %34, i64 1
  %36 = getelementptr inbounds %struct.Interval, ptr %35, i32 0, i32 0
  store i32 3, ptr %36, align 4, !tbaa !11
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Interval, ptr %37, i64 1
  %39 = getelementptr inbounds %struct.Interval, ptr %38, i32 0, i32 1
  store i32 5, ptr %39, align 4, !tbaa !13
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Interval, ptr %40, i64 2
  %42 = getelementptr inbounds %struct.Interval, ptr %41, i32 0, i32 0
  store i32 6, ptr %42, align 4, !tbaa !11
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Interval, ptr %43, i64 2
  %45 = getelementptr inbounds %struct.Interval, ptr %44, i32 0, i32 1
  store i32 7, ptr %45, align 4, !tbaa !13
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.Interval, ptr %46, i64 3
  %48 = getelementptr inbounds %struct.Interval, ptr %47, i32 0, i32 0
  store i32 8, ptr %48, align 4, !tbaa !11
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Interval, ptr %49, i64 3
  %51 = getelementptr inbounds %struct.Interval, ptr %50, i32 0, i32 1
  store i32 10, ptr %51, align 4, !tbaa !13
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Interval, ptr %52, i64 4
  %54 = getelementptr inbounds %struct.Interval, ptr %53, i32 0, i32 0
  store i32 12, ptr %54, align 4, !tbaa !11
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.Interval, ptr %55, i64 4
  %57 = getelementptr inbounds %struct.Interval, ptr %56, i32 0, i32 1
  store i32 16, ptr %57, align 4, !tbaa !13
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Interval, ptr %58, i64 0
  %60 = getelementptr inbounds %struct.Interval, ptr %59, i32 0, i32 0
  store i32 1, ptr %60, align 4, !tbaa !11
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.Interval, ptr %61, i64 0
  %63 = getelementptr inbounds %struct.Interval, ptr %62, i32 0, i32 1
  store i32 5, ptr %63, align 4, !tbaa !13
  %64 = getelementptr inbounds %struct.Interval, ptr %6, i32 0, i32 0
  store i32 2, ptr %64, align 4, !tbaa !11
  %65 = getelementptr inbounds %struct.Interval, ptr %6, i32 0, i32 1
  store i32 5, ptr %65, align 4, !tbaa !13
  %66 = getelementptr inbounds %struct.Interval, ptr %7, i32 0, i32 0
  store i32 4, ptr %66, align 4, !tbaa !11
  %67 = getelementptr inbounds %struct.Interval, ptr %7, i32 0, i32 1
  store i32 9, ptr %67, align 4, !tbaa !13
  %68 = getelementptr inbounds %struct.Interval, ptr %8, i32 0, i32 0
  store i32 5, ptr %68, align 4, !tbaa !11
  %69 = getelementptr inbounds %struct.Interval, ptr %8, i32 0, i32 1
  store i32 7, ptr %69, align 4, !tbaa !13
  %70 = getelementptr inbounds %struct.Interval, ptr %9, i32 0, i32 0
  store i32 6, ptr %70, align 4, !tbaa !11
  %71 = getelementptr inbounds %struct.Interval, ptr %9, i32 0, i32 1
  store i32 8, ptr %71, align 4, !tbaa !13
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = load i64, ptr %6, align 4
  %74 = call ptr @insert(ptr noundef %72, i32 noundef 2, i64 %73, ptr noundef %11)
  store ptr %74, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %93, %0
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %79, label %96

79:                                               ; preds = %75
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.Interval, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.Interval, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 4, !tbaa !11
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %struct.Interval, ptr %86, i64 %88
  %90 = getelementptr inbounds %struct.Interval, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !13
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %85, i32 noundef %91)
  br label %93

93:                                               ; preds = %79
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %12, align 4, !tbaa !9
  br label %75, !llvm.loop !14

96:                                               ; preds = %75
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %98) #5
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = load i64, ptr %7, align 4
  %101 = call ptr @insert(ptr noundef %99, i32 noundef 5, i64 %100, ptr noundef %11)
  store ptr %101, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %120, %96
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %106, label %123

106:                                              ; preds = %102
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %struct.Interval, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.Interval, ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 4, !tbaa !11
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.Interval, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.Interval, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !13
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %112, i32 noundef %118)
  br label %120

120:                                              ; preds = %106
  %121 = load i32, ptr %12, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %12, align 4, !tbaa !9
  br label %102, !llvm.loop !16

123:                                              ; preds = %102
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %125) #5
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = load i64, ptr %8, align 4
  %128 = call ptr @insert(ptr noundef %126, i32 noundef 0, i64 %127, ptr noundef %11)
  store ptr %128, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %147, %123
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %133, label %150

133:                                              ; preds = %129
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds %struct.Interval, ptr %134, i64 %136
  %138 = getelementptr inbounds %struct.Interval, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 4, !tbaa !11
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds %struct.Interval, ptr %140, i64 %142
  %144 = getelementptr inbounds %struct.Interval, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !13
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %139, i32 noundef %145)
  br label %147

147:                                              ; preds = %133
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %12, align 4, !tbaa !9
  br label %129, !llvm.loop !17

150:                                              ; preds = %129
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %152) #5
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = load i64, ptr %9, align 4
  %155 = call ptr @insert(ptr noundef %153, i32 noundef 1, i64 %154, ptr noundef %11)
  store ptr %155, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %174, %150
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %160, label %177

160:                                              ; preds = %156
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds %struct.Interval, ptr %161, i64 %163
  %165 = getelementptr inbounds %struct.Interval, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 4, !tbaa !11
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = load i32, ptr %12, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.Interval, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.Interval, ptr %170, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !13
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %166, i32 noundef %172)
  br label %174

174:                                              ; preds = %160
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %12, align 4, !tbaa !9
  br label %156, !llvm.loop !18

177:                                              ; preds = %156
  %178 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %179) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret i32 0
}

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

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

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 = { nounwind allocsize(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 = { "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 "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 allocsize(0) }

!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, !10, i64 0}
!12 = !{!"Interval", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !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.Interval = type { i32, i32 }

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @insert(ptr noundef, i32 noundef, i64, 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #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 noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #5
  %3 = tail call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #5
  %4 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 3, i32 6, i32 9>, ptr %2, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 2, i32 3, i32 5>, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %3, i64 16
  store <4 x i32> <i32 6, i32 7, i32 8, i32 10>, ptr %5, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 32
  store i32 12, ptr %6, align 4, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %3, i64 36
  store i32 16, ptr %7, align 4, !tbaa !11
  store i32 1, ptr %4, align 4, !tbaa !9
  %8 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 5, ptr %8, align 4, !tbaa !11
  %9 = call ptr @insert(ptr noundef nonnull %2, i32 noundef 2, i64 21474836482, ptr noundef nonnull %1)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds %struct.Interval, ptr %9, i64 %indvars.iv
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %12, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %13, i32 noundef %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = icmp slt i64 %indvars.iv.next, %18
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %0
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @free(ptr noundef %9) #6
  %21 = call ptr @insert(ptr noundef nonnull %3, i32 noundef 5, i64 38654705668, ptr noundef nonnull %1)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %._crit_edge, %.lr.ph56
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.lr.ph56 ], [ 0, %._crit_edge ]
  %24 = getelementptr inbounds %struct.Interval, ptr %21, i64 %indvars.iv67
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %24, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !11
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %25, i32 noundef %27)
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next68, %30
  br i1 %31, label %.lr.ph56, label %._crit_edge57, !llvm.loop !14

._crit_edge57:                                    ; preds = %.lr.ph56, %._crit_edge
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @free(ptr noundef %21) #6
  %33 = call ptr @insert(ptr noundef null, i32 noundef 0, i64 30064771077, ptr noundef nonnull %1)
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph60, label %._crit_edge61

.lr.ph60:                                         ; preds = %._crit_edge57, %.lr.ph60
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph60 ], [ 0, %._crit_edge57 ]
  %36 = getelementptr inbounds %struct.Interval, ptr %33, i64 %indvars.iv70
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %36, i64 4
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %37, i32 noundef %39)
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %41 = load i32, ptr %1, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next71, %42
  br i1 %43, label %.lr.ph60, label %._crit_edge61, !llvm.loop !15

._crit_edge61:                                    ; preds = %.lr.ph60, %._crit_edge57
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @free(ptr noundef %33) #6
  %45 = call ptr @insert(ptr noundef nonnull %4, i32 noundef 1, i64 34359738374, ptr noundef nonnull %1)
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %._crit_edge61, %.lr.ph64
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph64 ], [ 0, %._crit_edge61 ]
  %48 = getelementptr inbounds %struct.Interval, ptr %45, i64 %indvars.iv73
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %48, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !11
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %49, i32 noundef %51)
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = icmp slt i64 %indvars.iv.next74, %54
  br i1 %55, label %.lr.ph64, label %._crit_edge65, !llvm.loop !16

._crit_edge65:                                    ; preds = %.lr.ph64, %._crit_edge61
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @free(ptr noundef %45) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

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

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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #3 = { 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 #4 = { 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 #5 = { nounwind allocsize(0) }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"Interval", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 4}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass