; LLVM IR from tanakamasayuki/Arduino_TensorFlowLite_ESP32 :: examples/micro_speech (recognize_commands)

; 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.PreviousResultsQueue::Result" = type { i32, [4 x i8] }
%struct.TfLiteTensor = type { i32, %union.TfLitePtrUnion, ptr, %struct.TfLiteQuantizationParams, i32, i64, ptr, ptr, ptr, i32, i8, i8, %struct.TfLiteQuantization, ptr, ptr }
%union.TfLitePtrUnion = type { ptr }
%struct.TfLiteQuantizationParams = type { float, i32 }
%struct.TfLiteQuantization = type { i32, ptr }
%struct.TfLiteIntArray = type { i32, [0 x i32] }
%class.RecognizeCommands = type <{ ptr, i32, i8, [3 x i8], i32, i32, %class.PreviousResultsQueue, ptr, i32, [4 x i8] }>
%class.PreviousResultsQueue = type { ptr, [50 x %"struct.PreviousResultsQueue::Result"], i32, i32 }

@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [122 x i8], align 1
@kCategoryLabels = external global [4 x ptr], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17RecognizeCommands20ProcessLatestResultsEPK12TfLiteTensoriPPKcPhPb(ptr noundef nonnull align 8 dereferenceable(452) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #1 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.PreviousResultsQueue::Result", align 4
  %15 = alloca i64, align 8
  %16 = alloca %"struct.PreviousResultsQueue::Result", align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca [4 x i32], align 16
  %22 = alloca i32, align 4
  %23 = alloca %"struct.PreviousResultsQueue::Result", align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.TfLiteTensor, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.TfLiteIntArray, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 2
  br i1 %38, label %55, label %39

39:                                               ; preds = %6
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.TfLiteTensor, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds %struct.TfLiteIntArray, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds [0 x i32], ptr %43, i64 0, i64 0
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 1
  br i1 %46, label %55, label %47

47:                                               ; preds = %39
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.TfLiteTensor, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.TfLiteIntArray, ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds [0 x i32], ptr %51, i64 0, i64 1
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 4
  br i1 %54, label %55, label %72

55:                                               ; preds = %47, %39, %6
  br label %56

56:                                               ; preds = %55
  %57 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.TfLiteTensor, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.TfLiteIntArray, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds [0 x i32], ptr %62, i64 0, i64 1
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.TfLiteTensor, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct.TfLiteIntArray, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str.1, i32 noundef 4, i32 noundef %64, i32 noundef %69)
  br label %71

71:                                               ; preds = %56
  store i32 1, ptr %7, align 4
  br label %311

72:                                               ; preds = %47
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.TfLiteTensor, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !24
  %76 = icmp ne i32 %75, 9
  br i1 %76, label %77, label %86

77:                                               ; preds = %72
  br label %78

78:                                               ; preds = %77
  %79 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.TfLiteTensor, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !24
  %84 = call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef @.str.2, i32 noundef %83)
  br label %85

85:                                               ; preds = %78
  store i32 1, ptr %7, align 4
  br label %311

86:                                               ; preds = %72
  %87 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %88 = call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %87)
  br i1 %88, label %107, label %89

89:                                               ; preds = %86
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %92 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %91)
  %93 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 4, !tbaa !25
  %95 = icmp slt i32 %90, %94
  br i1 %95, label %96, label %107

96:                                               ; preds = %89
  br label %97

97:                                               ; preds = %96
  %98 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %102 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %101)
  %103 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 4, !tbaa !25
  %105 = call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef @.str.3, i32 noundef %100, i32 noundef %104)
  br label %106

106:                                              ; preds = %97
  store i32 1, ptr %7, align 4
  br label %311

107:                                              ; preds = %89, %86
  %108 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.TfLiteTensor, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  call void @_ZN20PreviousResultsQueue6ResultC2EiPa(ptr noundef nonnull align 4 dereferenceable(8) %14, i32 noundef %109, ptr noundef %112)
  call void @_ZN20PreviousResultsQueue9push_backERKNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(416) %108, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 1
  %115 = load i32, ptr %114, align 8, !tbaa !28
  %116 = sub nsw i32 %113, %115
  %117 = sext i32 %116 to i64
  store i64 %117, ptr %15, align 8, !tbaa !29
  br label %118

118:                                              ; preds = %131, %107
  %119 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %120 = call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %119)
  br i1 %120, label %129, label %121

121:                                              ; preds = %118
  %122 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %123 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %122)
  %124 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 4, !tbaa !25
  %126 = sext i32 %125 to i64
  %127 = load i64, ptr %15, align 8, !tbaa !29
  %128 = icmp slt i64 %126, %127
  br label %129

129:                                              ; preds = %121, %118
  %130 = phi i1 [ false, %118 ], [ %128, %121 ]
  br i1 %130, label %131, label %134

131:                                              ; preds = %129
  %132 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %133 = call i64 @_ZN20PreviousResultsQueue9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(416) %132)
  store i64 %133, ptr %16, align 4
  br label %118, !llvm.loop !30

134:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %135 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %136 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %135)
  %137 = sext i32 %136 to i64
  store i64 %137, ptr %17, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %138 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %139 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %138)
  %140 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 4, !tbaa !25
  %142 = sext i32 %141 to i64
  store i64 %142, ptr %18, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = load i64, ptr %18, align 8, !tbaa !29
  %146 = sub nsw i64 %144, %145
  store i64 %146, ptr %19, align 8, !tbaa !29
  %147 = load i64, ptr %17, align 8, !tbaa !29
  %148 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 5
  %149 = load i32, ptr %148, align 4, !tbaa !32
  %150 = sext i32 %149 to i64
  %151 = icmp slt i64 %147, %150
  br i1 %151, label %159, label %152

152:                                              ; preds = %134
  %153 = load i64, ptr %19, align 8, !tbaa !29
  %154 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 1
  %155 = load i32, ptr %154, align 8, !tbaa !28
  %156 = sdiv i32 %155, 4
  %157 = sext i32 %156 to i64
  %158 = icmp slt i64 %153, %157
  br i1 %158, label %159, label %165

159:                                              ; preds = %152, %134
  %160 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  %161 = load ptr, ptr %160, align 8, !tbaa !33
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %161, ptr %162, align 8, !tbaa !5
  %163 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 0, ptr %163, align 1, !tbaa !27
  %164 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 0, ptr %164, align 1, !tbaa !34
  store i32 0, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %310

165:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %214, %165
  %167 = load i32, ptr %22, align 4, !tbaa !9
  %168 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %169 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %168)
  %170 = icmp slt i32 %167, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %166
  store i32 10, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %217

172:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %173 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %174 = load i32, ptr %22, align 4, !tbaa !9
  %175 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416) %173, i32 noundef %174)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %175, i64 8, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %176 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %23, i32 0, i32 1
  %177 = getelementptr inbounds [4 x i8], ptr %176, i64 0, i64 0
  store ptr %177, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %178

178:                                              ; preds = %210, %172
  %179 = load i32, ptr %25, align 4, !tbaa !9
  %180 = icmp slt i32 %179, 4
  br i1 %180, label %182, label %181

181:                                              ; preds = %178
  store i32 13, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %213

182:                                              ; preds = %178
  %183 = load i32, ptr %22, align 4, !tbaa !9
  %184 = icmp eq i32 %183, 0
  br i1 %184, label %185, label %196

185:                                              ; preds = %182
  %186 = load ptr, ptr %24, align 8, !tbaa !5
  %187 = load i32, ptr %25, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i8, ptr %186, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !27
  %191 = sext i8 %190 to i32
  %192 = add nsw i32 %191, 128
  %193 = load i32, ptr %25, align 4, !tbaa !9
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %194
  store i32 %192, ptr %195, align 4, !tbaa !9
  br label %209

196:                                              ; preds = %182
  %197 = load ptr, ptr %24, align 8, !tbaa !5
  %198 = load i32, ptr %25, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i8, ptr %197, i64 %199
  %201 = load i8, ptr %200, align 1, !tbaa !27
  %202 = sext i8 %201 to i32
  %203 = add nsw i32 %202, 128
  %204 = load i32, ptr %25, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !9
  %208 = add nsw i32 %207, %203
  store i32 %208, ptr %206, align 4, !tbaa !9
  br label %209

209:                                              ; preds = %196, %185
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %25, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %25, align 4, !tbaa !9
  br label %178, !llvm.loop !36

213:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %22, align 4, !tbaa !9
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %22, align 4, !tbaa !9
  br label %166, !llvm.loop !37

217:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %218

218:                                              ; preds = %231, %217
  %219 = load i32, ptr %26, align 4, !tbaa !9
  %220 = icmp slt i32 %219, 4
  br i1 %220, label %222, label %221

221:                                              ; preds = %218
  store i32 16, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %234

222:                                              ; preds = %218
  %223 = load i64, ptr %17, align 8, !tbaa !29
  %224 = load i32, ptr %26, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !9
  %228 = sext i32 %227 to i64
  %229 = sdiv i64 %228, %223
  %230 = trunc i64 %229 to i32
  store i32 %230, ptr %226, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %222
  %232 = load i32, ptr %26, align 4, !tbaa !9
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %26, align 4, !tbaa !9
  br label %218, !llvm.loop !38

234:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 0, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 0, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %235

235:                                              ; preds = %253, %234
  %236 = load i32, ptr %29, align 4, !tbaa !9
  %237 = icmp slt i32 %236, 4
  br i1 %237, label %239, label %238

238:                                              ; preds = %235
  store i32 19, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %256

239:                                              ; preds = %235
  %240 = load i32, ptr %29, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !9
  %244 = load i32, ptr %28, align 4, !tbaa !9
  %245 = icmp sgt i32 %243, %244
  br i1 %245, label %246, label %252

246:                                              ; preds = %239
  %247 = load i32, ptr %29, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !9
  store i32 %250, ptr %28, align 4, !tbaa !9
  %251 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %251, ptr %27, align 4, !tbaa !9
  br label %252

252:                                              ; preds = %246, %239
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %29, align 4, !tbaa !9
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %29, align 4, !tbaa !9
  br label %235, !llvm.loop !39

256:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %257 = load i32, ptr %27, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [4 x ptr], ptr @kCategoryLabels, i64 0, i64 %258
  %260 = load ptr, ptr %259, align 8, !tbaa !5
  store ptr %260, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %261 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  %262 = load ptr, ptr %261, align 8, !tbaa !33
  %263 = load ptr, ptr @kCategoryLabels, align 16, !tbaa !5
  %264 = icmp eq ptr %262, %263
  br i1 %264, label %270, label %265

265:                                              ; preds = %256
  %266 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 8
  %267 = load i32, ptr %266, align 8, !tbaa !40
  %268 = call noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #5
  %269 = icmp eq i32 %267, %268
  br i1 %269, label %270, label %273

270:                                              ; preds = %265, %256
  %271 = call noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #5
  %272 = sext i32 %271 to i64
  store i64 %272, ptr %31, align 8, !tbaa !29
  br label %279

273:                                              ; preds = %265
  %274 = load i32, ptr %10, align 4, !tbaa !9
  %275 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 8
  %276 = load i32, ptr %275, align 8, !tbaa !40
  %277 = sub nsw i32 %274, %276
  %278 = sext i32 %277 to i64
  store i64 %278, ptr %31, align 8, !tbaa !29
  br label %279

279:                                              ; preds = %273, %270
  %280 = load i32, ptr %28, align 4, !tbaa !9
  %281 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 2
  %282 = load i8, ptr %281, align 4, !tbaa !41
  %283 = zext i8 %282 to i32
  %284 = icmp sgt i32 %280, %283
  br i1 %284, label %285, label %302

285:                                              ; preds = %279
  %286 = load ptr, ptr %30, align 8, !tbaa !5
  %287 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  %288 = load ptr, ptr %287, align 8, !tbaa !33
  %289 = icmp ne ptr %286, %288
  br i1 %289, label %296, label %290

290:                                              ; preds = %285
  %291 = load i64, ptr %31, align 8, !tbaa !29
  %292 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 4
  %293 = load i32, ptr %292, align 8, !tbaa !42
  %294 = sext i32 %293 to i64
  %295 = icmp sgt i64 %291, %294
  br i1 %295, label %296, label %302

296:                                              ; preds = %290, %285
  %297 = load ptr, ptr %30, align 8, !tbaa !5
  %298 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  store ptr %297, ptr %298, align 8, !tbaa !33
  %299 = load i32, ptr %10, align 4, !tbaa !9
  %300 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 8
  store i32 %299, ptr %300, align 8, !tbaa !40
  %301 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 1, ptr %301, align 1, !tbaa !34
  br label %304

302:                                              ; preds = %290, %279
  %303 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 0, ptr %303, align 1, !tbaa !34
  br label %304

304:                                              ; preds = %302, %296
  %305 = load ptr, ptr %30, align 8, !tbaa !5
  %306 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %305, ptr %306, align 8, !tbaa !5
  %307 = load i32, ptr %28, align 4, !tbaa !9
  %308 = trunc i32 %307 to i8
  %309 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %308, ptr %309, align 1, !tbaa !27
  store i32 0, ptr %7, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %310

310:                                              ; preds = %304, %159
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %311

311:                                              ; preds = %310, %106, %85, %71
  %312 = load i32, ptr %7, align 4
  ret i32 %312
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20PreviousResultsQueue9push_backERKNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN20PreviousResultsQueue6ResultC2EiPa(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN20PreviousResultsQueue9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(416)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416), i32 noundef) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #0 align 2

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !6, i64 16}
!12 = !{!"_ZTS12TfLiteTensor", !13, i64 0, !7, i64 8, !6, i64 16, !14, i64 24, !16, i64 32, !17, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !18, i64 76, !18, i64 77, !19, i64 80, !6, i64 96, !6, i64 104}
!13 = !{!"_ZTS10TfLiteType", !7, i64 0}
!14 = !{!"_ZTS24TfLiteQuantizationParams", !15, i64 0, !10, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS20TfLiteAllocationType", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTS18TfLiteQuantization", !20, i64 0, !6, i64 8}
!20 = !{!"_ZTS22TfLiteQuantizationType", !7, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS17RecognizeCommands", !6, i64 0, !10, i64 8, !7, i64 12, !10, i64 16, !10, i64 20, !23, i64 24, !6, i64 440, !10, i64 448}
!23 = !{!"_ZTS20PreviousResultsQueue", !6, i64 0, !7, i64 8, !10, i64 408, !10, i64 412}
!24 = !{!12, !13, i64 0}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTSN20PreviousResultsQueue6ResultE", !10, i64 0, !7, i64 4}
!27 = !{!7, !7, i64 0}
!28 = !{!22, !10, i64 8}
!29 = !{!17, !17, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!22, !10, i64 20}
!33 = !{!22, !6, i64 440}
!34 = !{!18, !18, i64 0}
!35 = !{i64 0, i64 4, !9, i64 4, i64 4, !27}
!36 = distinct !{!36, !31}
!37 = distinct !{!37, !31}
!38 = distinct !{!38, !31}
!39 = distinct !{!39, !31}
!40 = !{!22, !10, i64 448}
!41 = !{!22, !7, i64 12}
!42 = !{!22, !10, i64 16}


; 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.PreviousResultsQueue::Result" = type { i32, [4 x i8] }

@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [122 x i8], align 1
@kCategoryLabels = external local_unnamed_addr global [4 x ptr], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3minEv() local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN17RecognizeCommands20ProcessLatestResultsEPK12TfLiteTensoriPPKcPhPb(ptr noundef nonnull align 8 dereferenceable(452) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #1 align 2 {
  %7 = alloca %"struct.PreviousResultsQueue::Result", align 4
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = load i32, ptr %9, align 4, !tbaa !19
  %.not = icmp eq i32 %10, 2
  br i1 %.not, label %11, label %17

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %9, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !19
  %.not69 = icmp eq i32 %13, 1
  br i1 %.not69, label %14, label %17

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %9, i64 8
  %16 = load i32, ptr %15, align 4, !tbaa !19
  %.not70 = icmp eq i32 %16, 4
  br i1 %.not70, label %22, label %17

17:                                               ; preds = %6, %11, %14
  %18 = load ptr, ptr %0, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %9, i64 8
  %20 = load i32, ptr %19, align 4, !tbaa !19
  %21 = tail call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.1, i32 noundef 4, i32 noundef %20, i32 noundef %10)
  br label %147

22:                                               ; preds = %14
  %23 = load i32, ptr %1, align 8, !tbaa !23
  %.not71 = icmp eq i32 %23, 9
  br i1 %.not71, label %27, label %24

24:                                               ; preds = %22
  %25 = load ptr, ptr %0, align 8, !tbaa !20
  %26 = tail call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.2, i32 noundef %23)
  br label %147

27:                                               ; preds = %22
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %29 = tail call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  br i1 %29, label %39, label %30

30:                                               ; preds = %27
  %31 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %32 = load i32, ptr %31, align 4, !tbaa !24
  %33 = icmp sgt i32 %32, %2
  br i1 %33, label %34, label %39

34:                                               ; preds = %30
  %35 = load ptr, ptr %0, align 8, !tbaa !20
  %36 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %37 = load i32, ptr %36, align 4, !tbaa !24
  %38 = tail call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @.str.3, i32 noundef %2, i32 noundef %37)
  br label %147

39:                                               ; preds = %30, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %40 = getelementptr inbounds i8, ptr %1, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !26
  call void @_ZN20PreviousResultsQueue6ResultC2EiPa(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef %2, ptr noundef %41)
  call void @_ZN20PreviousResultsQueue9push_backERKNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(416) %28, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !27
  %44 = sub nsw i32 %2, %43
  %45 = call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  br i1 %45, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %39, %49
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %47 = load i32, ptr %46, align 4, !tbaa !24
  %48 = icmp slt i32 %47, %44
  br i1 %48, label %49, label %.critedge

49:                                               ; preds = %.lr.ph
  %50 = call i64 @_ZN20PreviousResultsQueue9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %51 = call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  br i1 %51, label %.critedge, label %.lr.ph, !llvm.loop !28

.critedge:                                        ; preds = %.lr.ph, %49, %39
  %52 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %55 = getelementptr inbounds i8, ptr %0, i64 20
  %56 = load i32, ptr %55, align 4, !tbaa !30
  %57 = icmp slt i32 %52, %56
  br i1 %57, label %67, label %58

58:                                               ; preds = %.critedge
  %59 = sext i32 %2 to i64
  %60 = load i32, ptr %54, align 4, !tbaa !24
  %61 = sext i32 %60 to i64
  %62 = sub nsw i64 %59, %61
  %63 = load i32, ptr %42, align 8, !tbaa !27
  %64 = sdiv i32 %63, 4
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %62, %65
  br i1 %66, label %67, label %70

67:                                               ; preds = %58, %.critedge
  %68 = getelementptr inbounds i8, ptr %0, i64 440
  %69 = load ptr, ptr %68, align 8, !tbaa !31
  store ptr %69, ptr %3, align 8, !tbaa !32
  store i8 0, ptr %4, align 1, !tbaa !26
  store i8 0, ptr %5, align 1, !tbaa !33
  br label %147

70:                                               ; preds = %58
  %71 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.split80.us.peel, label %.preheader76

.split80.us.peel:                                 ; preds = %70
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416) %28, i32 noundef 0)
  %74 = load i64, ptr %73, align 4
  %sh.diff = lshr i64 %74, 8
  %tr.sh.diff = trunc i64 %sh.diff to i32
  %75 = ashr i32 %tr.sh.diff, 24
  %76 = add nsw i32 %75, 128
  %sh.diff127 = lshr i64 %74, 16
  %tr.sh.diff128 = trunc i64 %sh.diff127 to i32
  %77 = ashr i32 %tr.sh.diff128, 24
  %78 = add nsw i32 %77, 128
  %sh.diff129 = lshr i64 %74, 24
  %tr.sh.diff130 = trunc i64 %sh.diff129 to i32
  %79 = ashr i32 %tr.sh.diff130, 24
  %80 = add nsw i32 %79, 128
  %sh.diff131 = lshr i64 %74, 32
  %tr.sh.diff132 = trunc nuw i64 %sh.diff131 to i32
  %81 = ashr i32 %tr.sh.diff132, 24
  %82 = add nsw i32 %81, 128
  %83 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %84 = icmp sgt i32 %83, 1
  br i1 %84, label %.split80.us, label %.preheader76.loopexit

.preheader76.loopexit:                            ; preds = %.split80.us, %.split80.us.peel
  %.sroa.29.1 = phi i32 [ %82, %.split80.us.peel ], [ %119, %.split80.us ]
  %.sroa.20.1 = phi i32 [ %80, %.split80.us.peel ], [ %116, %.split80.us ]
  %.sroa.11.1 = phi i32 [ %78, %.split80.us.peel ], [ %113, %.split80.us ]
  %.sroa.0114.1 = phi i32 [ %76, %.split80.us.peel ], [ %110, %.split80.us ]
  %85 = sext i32 %.sroa.0114.1 to i64
  %86 = sext i32 %.sroa.11.1 to i64
  %87 = sext i32 %.sroa.20.1 to i64
  %88 = sext i32 %.sroa.29.1 to i64
  br label %.preheader76

.preheader76:                                     ; preds = %.preheader76.loopexit, %70
  %.sroa.29.2 = phi i64 [ %88, %.preheader76.loopexit ], [ 0, %70 ]
  %.sroa.20.2 = phi i64 [ %87, %.preheader76.loopexit ], [ 0, %70 ]
  %.sroa.11.2 = phi i64 [ %86, %.preheader76.loopexit ], [ 0, %70 ]
  %.sroa.0114.2 = phi i64 [ %85, %.preheader76.loopexit ], [ 0, %70 ]
  %89 = sdiv i64 %.sroa.0114.2, %53
  %90 = trunc i64 %89 to i32
  %91 = sdiv i64 %.sroa.11.2, %53
  %92 = trunc i64 %91 to i32
  %93 = sdiv i64 %.sroa.20.2, %53
  %94 = trunc i64 %93 to i32
  %95 = sdiv i64 %.sroa.29.2, %53
  %96 = trunc i64 %95 to i32
  %spec.select73 = call i32 @llvm.smax.i32(i32 %90, i32 0)
  %97 = icmp slt i32 %spec.select73, %92
  %spec.select.1 = zext i1 %97 to i64
  %spec.select73.1 = call i32 @llvm.smax.i32(i32 %92, i32 %spec.select73)
  %98 = icmp slt i32 %spec.select73.1, %94
  %spec.select.2 = select i1 %98, i64 2, i64 %spec.select.1
  %spec.select73.2 = call i32 @llvm.smax.i32(i32 %94, i32 %spec.select73.1)
  %99 = icmp slt i32 %spec.select73.2, %96
  %spec.select.3 = select i1 %99, i64 3, i64 %spec.select.2
  %spec.select73.3 = call i32 @llvm.smax.i32(i32 %96, i32 %spec.select73.2)
  %100 = getelementptr inbounds [4 x ptr], ptr @kCategoryLabels, i64 0, i64 %spec.select.3
  %101 = load ptr, ptr %100, align 8, !tbaa !32
  %102 = getelementptr inbounds i8, ptr %0, i64 440
  %103 = load ptr, ptr %102, align 8, !tbaa !31
  %104 = load ptr, ptr @kCategoryLabels, align 16, !tbaa !32
  %105 = icmp eq ptr %103, %104
  br i1 %105, label %128, label %123

.split80.us:                                      ; preds = %.split80.us.peel, %.split80.us
  %.sroa.29.3 = phi i32 [ %119, %.split80.us ], [ %82, %.split80.us.peel ]
  %.sroa.20.3 = phi i32 [ %116, %.split80.us ], [ %80, %.split80.us.peel ]
  %.sroa.11.3 = phi i32 [ %113, %.split80.us ], [ %78, %.split80.us.peel ]
  %.sroa.0114.3 = phi i32 [ %110, %.split80.us ], [ %76, %.split80.us.peel ]
  %.06481 = phi i32 [ %120, %.split80.us ], [ 1, %.split80.us.peel ]
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416) %28, i32 noundef %.06481)
  %107 = load i64, ptr %106, align 4
  %sh.diff133 = lshr i64 %107, 8
  %tr.sh.diff134 = trunc i64 %sh.diff133 to i32
  %108 = ashr i32 %tr.sh.diff134, 24
  %109 = add nsw i32 %108, 128
  %110 = add nsw i32 %109, %.sroa.0114.3
  %sh.diff135 = lshr i64 %107, 16
  %tr.sh.diff136 = trunc i64 %sh.diff135 to i32
  %111 = ashr i32 %tr.sh.diff136, 24
  %112 = add nsw i32 %111, 128
  %113 = add nsw i32 %112, %.sroa.11.3
  %sh.diff137 = lshr i64 %107, 24
  %tr.sh.diff138 = trunc i64 %sh.diff137 to i32
  %114 = ashr i32 %tr.sh.diff138, 24
  %115 = add nsw i32 %114, 128
  %116 = add nsw i32 %115, %.sroa.20.3
  %sh.diff139 = lshr i64 %107, 32
  %tr.sh.diff140 = trunc nuw i64 %sh.diff139 to i32
  %117 = ashr i32 %tr.sh.diff140, 24
  %118 = add nsw i32 %117, 128
  %119 = add nsw i32 %118, %.sroa.29.3
  %120 = add nuw nsw i32 %.06481, 1
  %121 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %.split80.us, label %.preheader76.loopexit, !llvm.loop !34

123:                                              ; preds = %.preheader76
  %124 = getelementptr inbounds i8, ptr %0, i64 448
  %125 = load i32, ptr %124, align 8, !tbaa !36
  %126 = call noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #5
  %127 = icmp eq i32 %125, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %123, %.preheader76
  %129 = call noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #5
  br label %133

130:                                              ; preds = %123
  %131 = load i32, ptr %124, align 8, !tbaa !36
  %132 = sub nsw i32 %2, %131
  br label %133

133:                                              ; preds = %130, %128
  %.0.in = phi i32 [ %129, %128 ], [ %132, %130 ]
  %134 = getelementptr inbounds i8, ptr %0, i64 12
  %135 = load i8, ptr %134, align 4, !tbaa !37
  %136 = zext i8 %135 to i32
  %137 = icmp ugt i32 %spec.select73.3, %136
  br i1 %137, label %138, label %145

138:                                              ; preds = %133
  %139 = load ptr, ptr %102, align 8, !tbaa !31
  %.not72 = icmp ne ptr %101, %139
  %140 = getelementptr inbounds i8, ptr %0, i64 16
  %141 = load i32, ptr %140, align 8
  %142 = icmp sgt i32 %.0.in, %141
  %or.cond = select i1 %.not72, i1 true, i1 %142
  br i1 %or.cond, label %143, label %145

143:                                              ; preds = %138
  store ptr %101, ptr %102, align 8, !tbaa !31
  %144 = getelementptr inbounds i8, ptr %0, i64 448
  store i32 %2, ptr %144, align 8, !tbaa !36
  br label %145

145:                                              ; preds = %133, %138, %143
  %storemerge = phi i8 [ 1, %143 ], [ 0, %138 ], [ 0, %133 ]
  store i8 %storemerge, ptr %5, align 1, !tbaa !33
  store ptr %101, ptr %3, align 8, !tbaa !32
  %146 = trunc i32 %spec.select73.3 to i8
  store i8 %146, ptr %4, align 1, !tbaa !26
  br label %147

147:                                              ; preds = %67, %145, %34, %24, %17
  %.1 = phi i32 [ 1, %17 ], [ 1, %24 ], [ 1, %34 ], [ 0, %145 ], [ 0, %67 ]
  ret i32 %.1
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20PreviousResultsQueue9push_backERKNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(416), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN20PreviousResultsQueue6ResultC2EiPa(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN20PreviousResultsQueue9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(416)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { 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 #2 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"_ZTS12TfLiteTensor", !7, i64 0, !8, i64 8, !10, i64 16, !11, i64 24, !14, i64 32, !15, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !13, i64 72, !16, i64 76, !16, i64 77, !17, i64 80, !10, i64 96, !10, i64 104}
!7 = !{!"_ZTS10TfLiteType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS24TfLiteQuantizationParams", !12, i64 0, !13, i64 4}
!12 = !{!"float", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTS20TfLiteAllocationType", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTS18TfLiteQuantization", !18, i64 0, !10, i64 8}
!18 = !{!"_ZTS22TfLiteQuantizationType", !8, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTS17RecognizeCommands", !10, i64 0, !13, i64 8, !8, i64 12, !13, i64 16, !13, i64 20, !22, i64 24, !10, i64 440, !13, i64 448}
!22 = !{!"_ZTS20PreviousResultsQueue", !10, i64 0, !8, i64 8, !13, i64 408, !13, i64 412}
!23 = !{!6, !7, i64 0}
!24 = !{!25, !13, i64 0}
!25 = !{!"_ZTSN20PreviousResultsQueue6ResultE", !13, i64 0, !8, i64 4}
!26 = !{!8, !8, i64 0}
!27 = !{!21, !13, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!21, !13, i64 20}
!31 = !{!21, !10, i64 440}
!32 = !{!10, !10, i64 0}
!33 = !{!16, !16, i64 0}
!34 = distinct !{!34, !29, !35}
!35 = !{!"llvm.loop.peeled.count", i32 1}
!36 = !{!21, !13, i64 448}
!37 = !{!21, !8, i64 12}


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