; LLVM IR from tensorflow/tflite-micro :: 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.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 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 void @_Z11MicroPrintfPKcz(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 void @_ZN6tflite19GreedyMemoryPlanner15PrintMemoryPlanEv(ptr noundef nonnull align 8 dereferenceable(65) %0) unnamed_addr #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [81 x i8], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %25 = load ptr, ptr %2, align 8
  call void @_ZN6tflite19GreedyMemoryPlanner24CalculateOffsetsIfNeededEv(ptr noundef nonnull align 8 dereferenceable(65) %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %82, %1
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 2
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = icmp slt i32 %27, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %85

32:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 42, ptr %4, align 1, !tbaa !15
  %33 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %34, i64 %36
  %38 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %37, i32 0, i32 2
  %39 = load i32, ptr %38, align 4, !tbaa !17
  %40 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %41, i64 %43
  %45 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %44, i32 0, i32 3
  %46 = load i32, ptr %45, align 4, !tbaa !19
  %47 = icmp ne i32 %39, %46
  br i1 %47, label %48, label %51

48:                                               ; preds = %32
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = call noundef signext i8 @_ZN6tflite12_GLOBAL__N_119GetOrdinalCharacterEi(i32 noundef %49)
  store i8 %50, ptr %4, align 1, !tbaa !15
  br label %51

51:                                               ; preds = %48, %32
  %52 = load i8, ptr %4, align 1, !tbaa !15
  %53 = sext i8 %52 to i32
  %54 = load i32, ptr %3, align 4, !tbaa !9
  %55 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = load i32, ptr %3, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %56, i64 %58
  %60 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !20
  %62 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 9
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %63, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %69, i64 %71
  %73 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 4, !tbaa !17
  %75 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %76, i64 %78
  %80 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %79, i32 0, i32 3
  %81 = load i32, ptr %80, align 4, !tbaa !19
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.1, i32 noundef %53, i32 noundef %54, i32 noundef %61, i32 noundef %67, i32 noundef %74, i32 noundef %81)
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  br label %82

82:                                               ; preds = %51
  %83 = load i32, ptr %3, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %3, align 4, !tbaa !9
  br label %26, !llvm.loop !22

85:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 80, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 80, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %124, %85
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = icmp slt i32 %87, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %127

92:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %93 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !16
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %94, i64 %96
  store ptr %97, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %98 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 9
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  store i32 %103, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %104, i32 0, i32 3
  %106 = load i32, ptr %105, align 4, !tbaa !19
  store i32 %106, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !20
  %111 = add nsw i32 %107, %110
  store i32 %111, ptr %12, align 4, !tbaa !9
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = icmp sgt i32 %112, %113
  br i1 %114, label %115, label %117

115:                                              ; preds = %92
  %116 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %116, ptr %6, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %115, %92
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = load i32, ptr %7, align 4, !tbaa !9
  %120 = icmp sgt i32 %118, %119
  br i1 %120, label %121, label %123

121:                                              ; preds = %117
  %122 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %122, ptr %7, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %121, %117
  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 8, ptr %9) #4
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %8, align 4, !tbaa !9
  br label %86, !llvm.loop !24

127:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 81, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %252, %127
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = icmp sle i32 %129, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %128
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %255

133:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %142, %133
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = icmp slt i32 %135, 80
  br i1 %136, label %138, label %137

137:                                              ; preds = %134
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %145

138:                                              ; preds = %134
  %139 = load i32, ptr %16, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 %140
  store i8 46, ptr %141, align 1, !tbaa !15
  br label %142

142:                                              ; preds = %138
  %143 = load i32, ptr %16, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %16, align 4, !tbaa !9
  br label %134, !llvm.loop !25

145:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %242, %145
  %147 = load i32, ptr %18, align 4, !tbaa !9
  %148 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 2
  %149 = load i32, ptr %148, align 4, !tbaa !11
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %146
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %245

152:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %153 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 3
  %154 = load ptr, ptr %153, align 8, !tbaa !16
  %155 = load i32, ptr %18, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %154, i64 %156
  store ptr %157, ptr %19, align 8, !tbaa !5
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = load ptr, ptr %19, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %159, i32 0, i32 2
  %161 = load i32, ptr %160, align 4, !tbaa !17
  %162 = icmp slt i32 %158, %161
  br i1 %162, label %169, label %163

163:                                              ; preds = %152
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = load ptr, ptr %19, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %165, i32 0, i32 3
  %167 = load i32, ptr %166, align 4, !tbaa !19
  %168 = icmp sgt i32 %164, %167
  br i1 %168, label %169, label %170

169:                                              ; preds = %163, %152
  store i32 16, ptr %15, align 4
  br label %239

170:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %171 = getelementptr inbounds %"class.tflite::GreedyMemoryPlanner", ptr %25, i32 0, i32 9
  %172 = load ptr, ptr %171, align 8, !tbaa !21
  %173 = load i32, ptr %18, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %172, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !9
  store i32 %176, ptr %20, align 4, !tbaa !9
  %177 = load i32, ptr %20, align 4, !tbaa !9
  %178 = icmp eq i32 %177, -1
  br i1 %178, label %179, label %180

179:                                              ; preds = %170
  store i32 16, ptr %15, align 4
  br label %238

180:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %181 = load ptr, ptr %19, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %181, i32 0, i32 0
  %183 = load i32, ptr %182, align 4, !tbaa !20
  store i32 %183, ptr %21, align 4, !tbaa !9
  %184 = load i32, ptr %21, align 4, !tbaa !9
  %185 = load i32, ptr %17, align 4, !tbaa !9
  %186 = add nsw i32 %185, %184
  store i32 %186, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %187 = load i32, ptr %20, align 4, !tbaa !9
  %188 = mul nsw i32 %187, 80
  %189 = load i32, ptr %6, align 4, !tbaa !9
  %190 = sdiv i32 %188, %189
  store i32 %190, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %191 = load i32, ptr %20, align 4, !tbaa !9
  %192 = load i32, ptr %21, align 4, !tbaa !9
  %193 = add nsw i32 %191, %192
  %194 = mul nsw i32 %193, 80
  %195 = load i32, ptr %6, align 4, !tbaa !9
  %196 = sdiv i32 %194, %195
  store i32 %196, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %197 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %197, ptr %24, align 4, !tbaa !9
  br label %198

198:                                              ; preds = %234, %180
  %199 = load i32, ptr %24, align 4, !tbaa !9
  %200 = load i32, ptr %23, align 4, !tbaa !9
  %201 = icmp slt i32 %199, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %198
  store i32 17, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %237

203:                                              ; preds = %198
  %204 = load i32, ptr %24, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 %205
  %207 = load i8, ptr %206, align 1, !tbaa !15
  %208 = sext i8 %207 to i32
  %209 = icmp eq i32 %208, 46
  br i1 %209, label %210, label %229

210:                                              ; preds = %203
  %211 = load ptr, ptr %19, align 8, !tbaa !5
  %212 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %211, i32 0, i32 2
  %213 = load i32, ptr %212, align 4, !tbaa !17
  %214 = load ptr, ptr %19, align 8, !tbaa !5
  %215 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %214, i32 0, i32 3
  %216 = load i32, ptr %215, align 4, !tbaa !19
  %217 = icmp eq i32 %213, %216
  br i1 %217, label %218, label %222

218:                                              ; preds = %210
  %219 = load i32, ptr %24, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 %220
  store i8 42, ptr %221, align 1, !tbaa !15
  br label %228

222:                                              ; preds = %210
  %223 = load i32, ptr %18, align 4, !tbaa !9
  %224 = call noundef signext i8 @_ZN6tflite12_GLOBAL__N_119GetOrdinalCharacterEi(i32 noundef %223)
  %225 = load i32, ptr %24, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 %226
  store i8 %224, ptr %227, align 1, !tbaa !15
  br label %228

228:                                              ; preds = %222, %218
  br label %233

229:                                              ; preds = %203
  %230 = load i32, ptr %24, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 %231
  store i8 33, ptr %232, align 1, !tbaa !15
  br label %233

233:                                              ; preds = %229, %228
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %24, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %24, align 4, !tbaa !9
  br label %198, !llvm.loop !26

237:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  store i32 0, ptr %15, align 4
  br label %238

238:                                              ; preds = %237, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %239

239:                                              ; preds = %238, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  %240 = load i32, ptr %15, align 4
  switch i32 %240, label %256 [
    i32 0, label %241
    i32 16, label %242
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241, %239
  %243 = load i32, ptr %18, align 4, !tbaa !9
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %18, align 4, !tbaa !9
  br label %146, !llvm.loop !27

245:                                              ; preds = %151
  %246 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 80
  store i8 0, ptr %246, align 16, !tbaa !15
  %247 = load i32, ptr %14, align 4, !tbaa !9
  %248 = getelementptr inbounds [81 x i8], ptr %13, i64 0, i64 0
  %249 = load i32, ptr %17, align 4, !tbaa !9
  %250 = add nsw i32 %249, 1023
  %251 = sdiv i32 %250, 1024
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.2, i32 noundef %247, ptr noundef %248, i32 noundef %251)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %252

252:                                              ; preds = %245
  %253 = load i32, ptr %14, align 4, !tbaa !9
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %14, align 4, !tbaa !9
  br label %128, !llvm.loop !28

255:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 81, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void

256:                                              ; preds = %239
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden noundef signext i8 @_ZN6tflite12_GLOBAL__N_119GetOrdinalCharacterEi(i32 noundef) #3

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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 12}
!12 = !{!"_ZTSN6tflite19GreedyMemoryPlannerE", !13, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !6, i64 56, !14, i64 64}
!13 = !{!"_ZTSN6tflite18MicroMemoryPlannerE"}
!14 = !{!"bool", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!12, !6, i64 16}
!17 = !{!18, !10, i64 8}
!18 = !{!"_ZTSN6tflite19GreedyMemoryPlanner18BufferRequirementsE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!19 = !{!18, !10, i64 12}
!20 = !{!18, !10, i64 0}
!21 = !{!12, !6, i64 56}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !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.tflite::GreedyMemoryPlanner::BufferRequirements" = type { i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 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

declare void @_Z11MicroPrintfPKcz(ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tflite19GreedyMemoryPlanner15PrintMemoryPlanEv(ptr noundef nonnull align 8 dereferenceable(65) %0) unnamed_addr #3 align 2 {
  %2 = alloca [81 x i8], align 16
  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.ph, label %.preheader75.lr.ph

.lr.ph:                                           ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  br label %79

.preheader76:                                     ; preds = %._crit_edge118
  %8 = icmp sgt i32 %97, 0
  br i1 %8, label %.lr.ph82, label %.preheader75.lr.ph

.lr.ph82:                                         ; preds = %.preheader76
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %wide.trip.count = zext nneg i32 %97 to i64
  %min.iters.check = icmp ult i32 %97, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph82
  %indvars.iv99.ph = phi i64 [ 0, %.lr.ph82 ], [ %n.vec, %middle.block ]
  %.06281.ph = phi i32 [ 80, %.lr.ph82 ], [ %77, %middle.block ]
  %.06380.ph = phi i32 [ 0, %.lr.ph82 ], [ %78, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph82
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 80, i32 80, i32 80, i32 80>, %vector.ph ], [ %72, %vector.body ]
  %vec.phi121 = phi <4 x i32> [ <i32 80, i32 80, i32 80, i32 80>, %vector.ph ], [ %73, %vector.body ]
  %vec.phi122 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %74, %vector.body ]
  %vec.phi123 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %75, %vector.body ]
  %13 = or disjoint i64 %index, 1
  %14 = or disjoint i64 %index, 2
  %15 = or disjoint i64 %index, 3
  %16 = or disjoint i64 %index, 4
  %17 = or disjoint i64 %index, 5
  %18 = or disjoint i64 %index, 6
  %19 = or disjoint i64 %index, 7
  %20 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %index
  %21 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %13
  %22 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %14
  %23 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %15
  %24 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %16
  %25 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %17
  %26 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %18
  %27 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %19
  %28 = getelementptr inbounds i32, ptr %12, i64 %index
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load = load <4 x i32>, ptr %28, align 4, !tbaa !15
  %wide.load124 = load <4 x i32>, ptr %29, align 4, !tbaa !15
  %30 = getelementptr inbounds i8, ptr %20, i64 12
  %31 = getelementptr inbounds i8, ptr %21, i64 12
  %32 = getelementptr inbounds i8, ptr %22, i64 12
  %33 = getelementptr inbounds i8, ptr %23, i64 12
  %34 = getelementptr inbounds i8, ptr %24, i64 12
  %35 = getelementptr inbounds i8, ptr %25, i64 12
  %36 = getelementptr inbounds i8, ptr %26, i64 12
  %37 = getelementptr inbounds i8, ptr %27, i64 12
  %38 = load i32, ptr %30, align 4, !tbaa !16
  %39 = load i32, ptr %31, align 4, !tbaa !16
  %40 = load i32, ptr %32, align 4, !tbaa !16
  %41 = load i32, ptr %33, align 4, !tbaa !16
  %42 = insertelement <4 x i32> poison, i32 %38, i64 0
  %43 = insertelement <4 x i32> %42, i32 %39, i64 1
  %44 = insertelement <4 x i32> %43, i32 %40, i64 2
  %45 = insertelement <4 x i32> %44, i32 %41, i64 3
  %46 = load i32, ptr %34, align 4, !tbaa !16
  %47 = load i32, ptr %35, align 4, !tbaa !16
  %48 = load i32, ptr %36, align 4, !tbaa !16
  %49 = load i32, ptr %37, align 4, !tbaa !16
  %50 = insertelement <4 x i32> poison, i32 %46, i64 0
  %51 = insertelement <4 x i32> %50, i32 %47, i64 1
  %52 = insertelement <4 x i32> %51, i32 %48, i64 2
  %53 = insertelement <4 x i32> %52, i32 %49, i64 3
  %54 = load i32, ptr %20, align 4, !tbaa !18
  %55 = load i32, ptr %21, align 4, !tbaa !18
  %56 = load i32, ptr %22, align 4, !tbaa !18
  %57 = load i32, ptr %23, align 4, !tbaa !18
  %58 = insertelement <4 x i32> poison, i32 %54, i64 0
  %59 = insertelement <4 x i32> %58, i32 %55, i64 1
  %60 = insertelement <4 x i32> %59, i32 %56, i64 2
  %61 = insertelement <4 x i32> %60, i32 %57, i64 3
  %62 = load i32, ptr %24, align 4, !tbaa !18
  %63 = load i32, ptr %25, align 4, !tbaa !18
  %64 = load i32, ptr %26, align 4, !tbaa !18
  %65 = load i32, ptr %27, align 4, !tbaa !18
  %66 = insertelement <4 x i32> poison, i32 %62, i64 0
  %67 = insertelement <4 x i32> %66, i32 %63, i64 1
  %68 = insertelement <4 x i32> %67, i32 %64, i64 2
  %69 = insertelement <4 x i32> %68, i32 %65, i64 3
  %70 = add nsw <4 x i32> %61, %wide.load
  %71 = add nsw <4 x i32> %69, %wide.load124
  %72 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %70, <4 x i32> %vec.phi)
  %73 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %71, <4 x i32> %vec.phi121)
  %74 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %45, <4 x i32> %vec.phi122)
  %75 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %53, <4 x i32> %vec.phi123)
  %index.next = add nuw i64 %index, 8
  %76 = icmp eq i64 %index.next, %n.vec
  br i1 %76, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %72, <4 x i32> %73)
  %77 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  %rdx.minmax125 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %74, <4 x i32> %75)
  %78 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax125)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge.loopexit, label %scalar.ph.preheader

79:                                               ; preds = %.lr.ph, %._crit_edge118
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %._crit_edge118 ]
  %80 = load ptr, ptr %6, align 8, !tbaa !13
  %81 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %80, i64 %indvars.iv
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = load i32, ptr %82, align 4, !tbaa !23
  %84 = getelementptr inbounds i8, ptr %81, i64 12
  %85 = load i32, ptr %84, align 4, !tbaa !16
  %.not74 = icmp eq i32 %83, %85
  %.pre119 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %.not74, label %._crit_edge118, label %86

86:                                               ; preds = %79
  %87 = tail call noundef signext i8 @_ZN6tflite12_GLOBAL__N_119GetOrdinalCharacterEi(i32 noundef %.pre119)
  %.pre = load ptr, ptr %6, align 8, !tbaa !13
  %.phi.trans.insert = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %.pre, i64 %indvars.iv
  %.phi.trans.insert113 = getelementptr inbounds i8, ptr %.phi.trans.insert, i64 8
  %.pre114 = load i32, ptr %.phi.trans.insert113, align 4, !tbaa !23
  %.phi.trans.insert115 = getelementptr inbounds i8, ptr %.phi.trans.insert, i64 12
  %.pre116 = load i32, ptr %.phi.trans.insert115, align 4, !tbaa !16
  br label %._crit_edge118

._crit_edge118:                                   ; preds = %79, %86
  %88 = phi i32 [ %.pre116, %86 ], [ %83, %79 ]
  %89 = phi i32 [ %.pre114, %86 ], [ %83, %79 ]
  %90 = phi ptr [ %.pre, %86 ], [ %80, %79 ]
  %.061 = phi i8 [ %87, %86 ], [ 42, %79 ]
  %91 = sext i8 %.061 to i32
  %92 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %90, i64 %indvars.iv
  %93 = load i32, ptr %92, align 4, !tbaa !18
  %94 = load ptr, ptr %7, align 8, !tbaa !14
  %95 = getelementptr inbounds i32, ptr %94, i64 %indvars.iv
  %96 = load i32, ptr %95, align 4, !tbaa !15
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.1, i32 noundef %91, i32 noundef %.pre119, i32 noundef %93, i32 noundef %96, i32 noundef %89, i32 noundef %88)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next, %98
  br i1 %99, label %79, label %.preheader76, !llvm.loop !24

._crit_edge.loopexit:                             ; preds = %scalar.ph, %middle.block
  %spec.select.lcssa = phi i32 [ %77, %middle.block ], [ %spec.select, %scalar.ph ]
  %.164.lcssa = phi i32 [ %78, %middle.block ], [ %.164, %scalar.ph ]
  %100 = add nuw i32 %.164.lcssa, 1
  br label %.preheader75.lr.ph

.preheader75.lr.ph:                               ; preds = %1, %.preheader76, %._crit_edge.loopexit
  %.063.lcssa = phi i32 [ 1, %.preheader76 ], [ %100, %._crit_edge.loopexit ], [ 1, %1 ]
  %.062.lcssa = phi i32 [ 80, %.preheader76 ], [ %spec.select.lcssa, %._crit_edge.loopexit ], [ 80, %1 ]
  call void @llvm.lifetime.start.p0(i64 81, ptr nonnull %2) #6
  %101 = getelementptr inbounds i8, ptr %0, i64 16
  %102 = getelementptr inbounds i8, ptr %0, i64 56
  %103 = getelementptr inbounds i8, ptr %2, i64 80
  br label %.preheader75

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %scalar.ph ], [ %indvars.iv99.ph, %scalar.ph.preheader ]
  %.06281 = phi i32 [ %spec.select, %scalar.ph ], [ %.06281.ph, %scalar.ph.preheader ]
  %.06380 = phi i32 [ %.164, %scalar.ph ], [ %.06380.ph, %scalar.ph.preheader ]
  %104 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %10, i64 %indvars.iv99
  %105 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv99
  %106 = load i32, ptr %105, align 4, !tbaa !15
  %107 = getelementptr inbounds i8, ptr %104, i64 12
  %108 = load i32, ptr %107, align 4, !tbaa !16
  %109 = load i32, ptr %104, align 4, !tbaa !18
  %110 = add nsw i32 %109, %106
  %spec.select = tail call i32 @llvm.smax.i32(i32 %110, i32 %.06281)
  %.164 = tail call i32 @llvm.smax.i32(i32 %108, i32 %.06380)
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next100, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %scalar.ph, !llvm.loop !25

.preheader75:                                     ; preds = %.preheader75.lr.ph, %._crit_edge92
  %.07095 = phi i32 [ 0, %.preheader75.lr.ph ], [ %115, %._crit_edge92 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) %2, i8 46, i64 80, i1 false), !tbaa !26
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %.lr.ph91, label %._crit_edge92

._crit_edge96:                                    ; preds = %._crit_edge92
  call void @llvm.lifetime.end.p0(i64 81, ptr nonnull %2) #6
  ret void

._crit_edge92:                                    ; preds = %.loopexit, %.preheader75
  %.067.lcssa = phi i32 [ 0, %.preheader75 ], [ %.2, %.loopexit ]
  store i8 0, ptr %103, align 16, !tbaa !26
  %113 = add nsw i32 %.067.lcssa, 1023
  %114 = sdiv i32 %113, 1024
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.2, i32 noundef %.07095, ptr noundef nonnull %2, i32 noundef %114)
  %115 = add nuw i32 %.07095, 1
  %exitcond112.not = icmp eq i32 %115, %.063.lcssa
  br i1 %exitcond112.not, label %._crit_edge96, label %.preheader75, !llvm.loop !27

.lr.ph91:                                         ; preds = %.preheader75, %.loopexit
  %116 = phi i32 [ %152, %.loopexit ], [ %111, %.preheader75 ]
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %.loopexit ], [ 0, %.preheader75 ]
  %.06789 = phi i32 [ %.2, %.loopexit ], [ 0, %.preheader75 ]
  %117 = load ptr, ptr %101, align 8, !tbaa !13
  %118 = getelementptr inbounds %"struct.tflite::GreedyMemoryPlanner::BufferRequirements", ptr %117, i64 %indvars.iv109
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  %120 = load i32, ptr %119, align 4, !tbaa !23
  %121 = icmp slt i32 %.07095, %120
  br i1 %121, label %.loopexit, label %122

122:                                              ; preds = %.lr.ph91
  %123 = getelementptr inbounds i8, ptr %118, i64 12
  %124 = load i32, ptr %123, align 4, !tbaa !16
  %125 = icmp sgt i32 %.07095, %124
  br i1 %125, label %.loopexit, label %126

126:                                              ; preds = %122
  %127 = load ptr, ptr %102, align 8, !tbaa !14
  %128 = getelementptr inbounds i32, ptr %127, i64 %indvars.iv109
  %129 = load i32, ptr %128, align 4, !tbaa !15
  %130 = icmp eq i32 %129, -1
  br i1 %130, label %.loopexit, label %131

131:                                              ; preds = %126
  %132 = load i32, ptr %118, align 4, !tbaa !18
  %133 = add nsw i32 %132, %.06789
  %134 = mul nsw i32 %129, 80
  %135 = sdiv i32 %134, %.062.lcssa
  %136 = add nsw i32 %132, %129
  %137 = mul nsw i32 %136, 80
  %138 = sdiv i32 %137, %.062.lcssa
  %139 = icmp slt i32 %135, %138
  br i1 %139, label %.lr.ph88.preheader, label %.loopexit

.lr.ph88.preheader:                               ; preds = %131
  %140 = sext i32 %135 to i64
  %141 = trunc nuw nsw i64 %indvars.iv109 to i32
  br label %.lr.ph88

.lr.ph88:                                         ; preds = %.lr.ph88.preheader, %151
  %indvars.iv105 = phi i64 [ %140, %.lr.ph88.preheader ], [ %indvars.iv.next106, %151 ]
  %142 = getelementptr inbounds [81 x i8], ptr %2, i64 0, i64 %indvars.iv105
  %143 = load i8, ptr %142, align 1, !tbaa !26
  %144 = icmp eq i8 %143, 46
  br i1 %144, label %145, label %151

145:                                              ; preds = %.lr.ph88
  %146 = load i32, ptr %119, align 4, !tbaa !23
  %147 = load i32, ptr %123, align 4, !tbaa !16
  %148 = icmp eq i32 %146, %147
  br i1 %148, label %151, label %149

149:                                              ; preds = %145
  %150 = call noundef signext i8 @_ZN6tflite12_GLOBAL__N_119GetOrdinalCharacterEi(i32 noundef %141)
  br label %151

151:                                              ; preds = %.lr.ph88, %145, %149
  %.sink = phi i8 [ %150, %149 ], [ 42, %145 ], [ 33, %.lr.ph88 ]
  store i8 %.sink, ptr %142, align 1, !tbaa !26
  %indvars.iv.next106 = add nsw i64 %indvars.iv105, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next106 to i32
  %exitcond108.not = icmp eq i32 %138, %lftr.wideiv
  br i1 %exitcond108.not, label %.loopexit.loopexit, label %.lr.ph88, !llvm.loop !28

.loopexit.loopexit:                               ; preds = %151
  %.pre117 = load i32, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %131, %126, %.lr.ph91, %122
  %152 = phi i32 [ %116, %122 ], [ %116, %.lr.ph91 ], [ %116, %126 ], [ %116, %131 ], [ %.pre117, %.loopexit.loopexit ]
  %.2 = phi i32 [ %.06789, %122 ], [ %.06789, %.lr.ph91 ], [ %.06789, %126 ], [ %133, %131 ], [ %133, %.loopexit.loopexit ]
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %153 = sext i32 %152 to i64
  %154 = icmp slt i64 %indvars.iv.next110, %153
  br i1 %154, label %.lr.ph91, label %._crit_edge92, !llvm.loop !29
}

; Function Attrs: mustprogress uwtable
declare hidden noundef signext i8 @_ZN6tflite12_GLOBAL__N_119GetOrdinalCharacterEi(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #4

attributes #0 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !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 12}
!17 = !{!"_ZTSN6tflite19GreedyMemoryPlanner18BufferRequirementsE", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12}
!18 = !{!17, !8, i64 0}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = !{!17, !8, i64 8}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20, !22, !21}
!26 = !{!9, !9, i64 0}
!27 = distinct !{!27, !20}
!28 = distinct !{!28, !20}
!29 = distinct !{!29, !20}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass