; LLVM IR from tanakamasayuki/Arduino_TensorFlowLite_ESP32 :: src/tensorflow/lite/micro/memory_planner (greedy_memory_planner)

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

%"class.tflite::GreedyMemoryPlanner" = type <{ %"class.tflite::MicroMemoryPlanner", i32, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, i8, [7 x i8] }>
%"class.tflite::MicroMemoryPlanner" = type { ptr }
%"struct.tflite::GreedyMemoryPlanner::BufferRequirements" = type { i32, i32, i32, i32 }

@.str.6 = external hidden unnamed_addr constant [52 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

declare noundef i32 @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ...) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite19GreedyMemoryPlanner24CalculateOffsetsIfNeededEv(ptr noundef nonnull align 8 dereferenceable(65)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6tflite19GreedyMemoryPlanner19DoAnyBuffersOverlapEPNS_13ErrorReporterE(ptr noundef nonnull align 8 dereferenceable(65) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  call void @_ZN6tflite19GreedyMemoryPlanner24CalculateOffsetsIfNeededEv(ptr noundef nonnull align 8 dereferenceable(65) %19)
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %20

20:                                               ; preds = %123, %2
  %21 = load i32, ptr %6, align 4, !tbaa !11
  %22 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %19, i32 0, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = icmp slt i32 %21, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %126

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %27 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %19, i32 0, i32 3
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = load i32, ptr %6, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %28, i64 %30
  store ptr %31, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %32 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %19, i32 0, i32 9
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = load i32, ptr %6, align 4, !tbaa !11
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %33, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !11
  store i32 %37, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %38, i32 0, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !18
  store i32 %40, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %41, i32 0, i32 3
  %43 = load i32, ptr %42, align 4, !tbaa !20
  store i32 %43, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %44 = load i32, ptr %9, align 4, !tbaa !11
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 4, !tbaa !21
  %48 = add nsw i32 %44, %47
  store i32 %48, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %49

49:                                               ; preds = %119, %26
  %50 = load i32, ptr %13, align 4, !tbaa !11
  %51 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %19, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !13
  %53 = icmp slt i32 %50, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %49
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %122

55:                                               ; preds = %49
  %56 = load i32, ptr %6, align 4, !tbaa !11
  %57 = load i32, ptr %13, align 4, !tbaa !11
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %55
  br label %119

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %61 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %19, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = load i32, ptr %13, align 4, !tbaa !11
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %62, i64 %64
  store ptr %65, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %66 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %19, i32 0, i32 9
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  %68 = load i32, ptr %13, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %67, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !11
  store i32 %71, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 4, !tbaa !18
  store i32 %74, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %75, i32 0, i32 3
  %77 = load i32, ptr %76, align 4, !tbaa !20
  store i32 %77, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %78 = load i32, ptr %15, align 4, !tbaa !11
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !21
  %82 = add nsw i32 %78, %81
  store i32 %82, ptr %18, align 4, !tbaa !11
  %83 = load i32, ptr %10, align 4, !tbaa !11
  %84 = load i32, ptr %17, align 4, !tbaa !11
  %85 = icmp sgt i32 %83, %84
  br i1 %85, label %90, label %86

86:                                               ; preds = %60
  %87 = load i32, ptr %16, align 4, !tbaa !11
  %88 = load i32, ptr %11, align 4, !tbaa !11
  %89 = icmp sgt i32 %87, %88
  br i1 %89, label %90, label %91

90:                                               ; preds = %86, %60
  store i32 7, ptr %7, align 4
  br label %116

91:                                               ; preds = %86
  %92 = load i32, ptr %9, align 4, !tbaa !11
  %93 = load i32, ptr %18, align 4, !tbaa !11
  %94 = icmp sge i32 %92, %93
  br i1 %94, label %99, label %95

95:                                               ; preds = %91
  %96 = load i32, ptr %15, align 4, !tbaa !11
  %97 = load i32, ptr %12, align 4, !tbaa !11
  %98 = icmp sge i32 %96, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %95, %91
  store i32 7, ptr %7, align 4
  br label %116

100:                                              ; preds = %95
  store i8 1, ptr %5, align 1, !tbaa !9
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = load i32, ptr %6, align 4, !tbaa !11
  %104 = load i32, ptr %10, align 4, !tbaa !11
  %105 = load i32, ptr %11, align 4, !tbaa !11
  %106 = load i32, ptr %9, align 4, !tbaa !11
  %107 = load i32, ptr %12, align 4, !tbaa !11
  %108 = load i32, ptr %13, align 4, !tbaa !11
  %109 = load i32, ptr %16, align 4, !tbaa !11
  %110 = load i32, ptr %17, align 4, !tbaa !11
  %111 = load i32, ptr %15, align 4, !tbaa !11
  %112 = load i32, ptr %18, align 4, !tbaa !11
  %113 = call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @.str.6, i32 noundef %103, i32 noundef %104, i32 noundef %105, i32 noundef %106, i32 noundef %107, i32 noundef %108, i32 noundef %109, i32 noundef %110, i32 noundef %111, i32 noundef %112)
  br label %114

114:                                              ; preds = %101
  br label %115

115:                                              ; preds = %114
  store i32 0, ptr %7, align 4
  br label %116

116:                                              ; preds = %115, %99, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %117 = load i32, ptr %7, align 4
  switch i32 %117, label %129 [
    i32 0, label %118
    i32 7, label %119
  ]

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118, %116, %59
  %120 = load i32, ptr %13, align 4, !tbaa !11
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %13, align 4, !tbaa !11
  br label %49, !llvm.loop !22

122:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %6, align 4, !tbaa !11
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %6, align 4, !tbaa !11
  br label %20, !llvm.loop !24

126:                                              ; preds = %25
  %127 = load i8, ptr %5, align 1, !tbaa !9, !range !25, !noundef !26
  %128 = trunc i8 %127 to i1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret i1 %128

129:                                              ; preds = %116
  unreachable
}

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

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

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


; 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.tflite::GreedyMemoryPlanner::BufferRequirements" = type { i32, i32, i32, i32 }

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

declare noundef i32 @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite19GreedyMemoryPlanner24CalculateOffsetsIfNeededEv(ptr noundef nonnull align 8 dereferenceable(65)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6tflite19GreedyMemoryPlanner19DoAnyBuffersOverlapEPNS_13ErrorReporterE(ptr noundef nonnull align 8 dereferenceable(65) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  tail call void @_ZN6tflite19GreedyMemoryPlanner24CalculateOffsetsIfNeededEv(ptr noundef nonnull align 8 dereferenceable(65) %0)
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph55.split.preheader, label %._crit_edge56

.lr.ph55.split.preheader:                         ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  br label %.lr.ph55.split

._crit_edge56:                                    ; preds = %._crit_edge, %2
  %.0.lcssa = phi i1 [ false, %2 ], [ %.1.lcssa, %._crit_edge ]
  ret i1 %.0.lcssa

.lr.ph55.split:                                   ; preds = %.lr.ph55.split.preheader, %._crit_edge
  %8 = phi i32 [ %4, %.lr.ph55.split.preheader ], [ %22, %._crit_edge ]
  %indvars.iv59 = phi i64 [ 0, %.lr.ph55.split.preheader ], [ %indvars.iv.next60, %._crit_edge ]
  %.053 = phi i1 [ false, %.lr.ph55.split.preheader ], [ %.1.lcssa, %._crit_edge ]
  %9 = load ptr, ptr %6, align 8, !tbaa !13
  %10 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %9, i64 %indvars.iv59
  %11 = load ptr, ptr %7, align 8, !tbaa !14
  %12 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv59
  %13 = load i32, ptr %12, align 4, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %10, i64 8
  %15 = load i32, ptr %14, align 4, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %10, i64 12
  %17 = load i32, ptr %16, align 4, !tbaa !18
  %18 = load i32, ptr %10, align 4, !tbaa !19
  %19 = add nsw i32 %18, %13
  %20 = icmp sgt i32 %8, 0
  br i1 %20, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph55.split
  %21 = trunc nuw nsw i64 %indvars.iv59 to i32
  br label %.lr.ph

._crit_edge:                                      ; preds = %46, %.lr.ph55.split
  %22 = phi i32 [ %8, %.lr.ph55.split ], [ %47, %46 ]
  %.1.lcssa = phi i1 [ %.053, %.lr.ph55.split ], [ %.3, %46 ]
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next60, %23
  br i1 %24, label %.lr.ph55.split, label %._crit_edge56, !llvm.loop !20

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %25 = phi i32 [ %8, %.lr.ph.preheader ], [ %47, %46 ]
  %26 = phi i32 [ %8, %.lr.ph.preheader ], [ %48, %46 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %46 ]
  %.151 = phi i1 [ %.053, %.lr.ph.preheader ], [ %.3, %46 ]
  %27 = icmp eq i64 %indvars.iv59, %indvars.iv
  br i1 %27, label %46, label %28

28:                                               ; preds = %.lr.ph
  %29 = load ptr, ptr %6, align 8, !tbaa !13
  %30 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %29, i64 %indvars.iv
  %31 = load ptr, ptr %7, align 8, !tbaa !14
  %32 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  %33 = load i32, ptr %32, align 4, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %30, i64 8
  %35 = load i32, ptr %34, align 4, !tbaa !16
  %36 = getelementptr inbounds i8, ptr %30, i64 12
  %37 = load i32, ptr %36, align 4, !tbaa !18
  %38 = load i32, ptr %30, align 4, !tbaa !19
  %39 = add nsw i32 %38, %33
  %40 = icmp sgt i32 %15, %37
  %41 = icmp sgt i32 %35, %17
  %or.cond = select i1 %40, i1 true, i1 %41
  br i1 %or.cond, label %46, label %42

42:                                               ; preds = %28
  %.not = icmp slt i32 %13, %39
  %.not48 = icmp slt i32 %33, %19
  %or.cond49 = select i1 %.not, i1 %.not48, i1 false
  br i1 %or.cond49, label %43, label %46

43:                                               ; preds = %42
  %44 = trunc nuw nsw i64 %indvars.iv to i32
  %45 = tail call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.6, i32 noundef %21, i32 noundef %15, i32 noundef %17, i32 noundef %13, i32 noundef %19, i32 noundef %44, i32 noundef %35, i32 noundef %37, i32 noundef %33, i32 noundef %39)
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %43, %28, %42, %.lr.ph
  %47 = phi i32 [ %25, %.lr.ph ], [ %.pre, %43 ], [ %25, %28 ], [ %25, %42 ]
  %48 = phi i32 [ %26, %.lr.ph ], [ %.pre, %43 ], [ %26, %28 ], [ %26, %42 ]
  %.3 = phi i1 [ %.151, %.lr.ph ], [ true, %43 ], [ %.151, %28 ], [ %.151, %42 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !23
}

attributes #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 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 = { mustprogress 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" }

!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, !8, i64 12}
!6 = !{!"_ZTSN6tflite19GreedyMemoryPlannerE", !7, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !8, i64 48, !8, i64 52, !11, i64 56, !12, i64 64}
!7 = !{!"_ZTSN6tflite18MicroMemoryPlannerE"}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!6, !11, i64 16}
!14 = !{!6, !11, i64 56}
!15 = !{!8, !8, i64 0}
!16 = !{!17, !8, i64 8}
!17 = !{!"_ZTSN6tflite19GreedyMemoryPlanner18BufferRequirementsE", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12}
!18 = !{!17, !8, i64 12}
!19 = !{!17, !8, i64 0}
!20 = distinct !{!20, !21, !22}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.unswitch.partial.disable"}
!23 = distinct !{!23, !21}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass