; LLVM IR from NVIDIA/tensorflow :: tensorflow/lite/experimental/micro/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 }
%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 [65 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 %70

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

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

75:                                               ; preds = %70
  %76 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !21
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.TfLiteTensor, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !24
  %81 = call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @.str.2, i32 noundef %80)
  store i32 1, ptr %7, align 4
  br label %303

82:                                               ; preds = %70
  %83 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %84 = call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %83)
  br i1 %84, label %101, label %85

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

92:                                               ; preds = %85
  %93 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !21
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue5frontEv(ptr noundef nonnull align 8 dereferenceable(416) %96)
  %98 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !25
  %100 = call noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef @.str.3, i32 noundef %95, i32 noundef %99)
  store i32 1, ptr %7, align 4
  br label %303

101:                                              ; preds = %85, %82
  %102 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.TfLiteTensor, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !27
  call void @_ZN20PreviousResultsQueue6ResultC2EiPh(ptr noundef nonnull align 4 dereferenceable(8) %14, i32 noundef %103, ptr noundef %106)
  call void @_ZN20PreviousResultsQueue9push_backERKNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(416) %102, 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
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !28
  %110 = sub nsw i32 %107, %109
  %111 = sext i32 %110 to i64
  store i64 %111, ptr %15, align 8, !tbaa !29
  br label %112

112:                                              ; preds = %125, %101
  %113 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %114 = call noundef zeroext i1 @_ZN20PreviousResultsQueue5emptyEv(ptr noundef nonnull align 8 dereferenceable(416) %113)
  br i1 %114, label %123, label %115

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

123:                                              ; preds = %115, %112
  %124 = phi i1 [ false, %112 ], [ %122, %115 ]
  br i1 %124, label %125, label %128

125:                                              ; preds = %123
  %126 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %127 = call i64 @_ZN20PreviousResultsQueue9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(416) %126)
  store i64 %127, ptr %16, align 4
  br label %112, !llvm.loop !30

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

146:                                              ; preds = %128
  %147 = load i64, ptr %19, align 8, !tbaa !29
  %148 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 1
  %149 = load i32, ptr %148, align 8, !tbaa !28
  %150 = sdiv i32 %149, 4
  %151 = sext i32 %150 to i64
  %152 = icmp slt i64 %147, %151
  br i1 %152, label %153, label %159

153:                                              ; preds = %146, %128
  %154 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  %155 = load ptr, ptr %154, align 8, !tbaa !33
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %155, ptr %156, align 8, !tbaa !5
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 0, ptr %157, align 1, !tbaa !27
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 0, ptr %158, align 1, !tbaa !34
  store i32 0, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %302

159:                                              ; preds = %146
  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 %160

160:                                              ; preds = %206, %159
  %161 = load i32, ptr %22, align 4, !tbaa !9
  %162 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %163 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %162)
  %164 = icmp slt i32 %161, %163
  br i1 %164, label %166, label %165

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

166:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %167 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 6
  %168 = load i32, ptr %22, align 4, !tbaa !9
  %169 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416) %167, i32 noundef %168)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %169, i64 8, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %170 = getelementptr inbounds %"struct.PreviousResultsQueue::Result", ptr %23, i32 0, i32 1
  %171 = getelementptr inbounds [4 x i8], ptr %170, i64 0, i64 0
  store ptr %171, 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 %172

172:                                              ; preds = %202, %166
  %173 = load i32, ptr %25, align 4, !tbaa !9
  %174 = icmp slt i32 %173, 4
  br i1 %174, label %176, label %175

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

176:                                              ; preds = %172
  %177 = load i32, ptr %22, align 4, !tbaa !9
  %178 = icmp eq i32 %177, 0
  br i1 %178, label %179, label %189

179:                                              ; preds = %176
  %180 = load ptr, ptr %24, align 8, !tbaa !5
  %181 = load i32, ptr %25, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i8, ptr %180, i64 %182
  %184 = load i8, ptr %183, align 1, !tbaa !27
  %185 = zext i8 %184 to i32
  %186 = load i32, ptr %25, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %187
  store i32 %185, ptr %188, align 4, !tbaa !9
  br label %201

189:                                              ; preds = %176
  %190 = load ptr, ptr %24, align 8, !tbaa !5
  %191 = load i32, ptr %25, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i8, ptr %190, i64 %192
  %194 = load i8, ptr %193, align 1, !tbaa !27
  %195 = zext i8 %194 to i32
  %196 = load i32, ptr %25, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = add nsw i32 %199, %195
  store i32 %200, ptr %198, align 4, !tbaa !9
  br label %201

201:                                              ; preds = %189, %179
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %25, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %25, align 4, !tbaa !9
  br label %172, !llvm.loop !36

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

206:                                              ; preds = %205
  %207 = load i32, ptr %22, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %22, align 4, !tbaa !9
  br label %160, !llvm.loop !37

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

210:                                              ; preds = %223, %209
  %211 = load i32, ptr %26, align 4, !tbaa !9
  %212 = icmp slt i32 %211, 4
  br i1 %212, label %214, label %213

213:                                              ; preds = %210
  store i32 10, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %226

214:                                              ; preds = %210
  %215 = load i64, ptr %17, align 8, !tbaa !29
  %216 = load i32, ptr %26, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = sdiv i64 %220, %215
  %222 = trunc i64 %221 to i32
  store i32 %222, ptr %218, align 4, !tbaa !9
  br label %223

223:                                              ; preds = %214
  %224 = load i32, ptr %26, align 4, !tbaa !9
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %26, align 4, !tbaa !9
  br label %210, !llvm.loop !38

226:                                              ; preds = %213
  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 %227

227:                                              ; preds = %245, %226
  %228 = load i32, ptr %29, align 4, !tbaa !9
  %229 = icmp slt i32 %228, 4
  br i1 %229, label %231, label %230

230:                                              ; preds = %227
  store i32 13, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %248

231:                                              ; preds = %227
  %232 = load i32, ptr %29, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = load i32, ptr %28, align 4, !tbaa !9
  %237 = icmp sgt i32 %235, %236
  br i1 %237, label %238, label %244

238:                                              ; preds = %231
  %239 = load i32, ptr %29, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [4 x i32], ptr %21, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !9
  store i32 %242, ptr %28, align 4, !tbaa !9
  %243 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %243, ptr %27, align 4, !tbaa !9
  br label %244

244:                                              ; preds = %238, %231
  br label %245

245:                                              ; preds = %244
  %246 = load i32, ptr %29, align 4, !tbaa !9
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %29, align 4, !tbaa !9
  br label %227, !llvm.loop !39

248:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %249 = load i32, ptr %27, align 4, !tbaa !9
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [4 x ptr], ptr @kCategoryLabels, i64 0, i64 %250
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  store ptr %252, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %253 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  %254 = load ptr, ptr %253, align 8, !tbaa !33
  %255 = load ptr, ptr @kCategoryLabels, align 16, !tbaa !5
  %256 = icmp eq ptr %254, %255
  br i1 %256, label %262, label %257

257:                                              ; preds = %248
  %258 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 8
  %259 = load i32, ptr %258, align 8, !tbaa !40
  %260 = call noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #5
  %261 = icmp eq i32 %259, %260
  br i1 %261, label %262, label %265

262:                                              ; preds = %257, %248
  %263 = call noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #5
  %264 = sext i32 %263 to i64
  store i64 %264, ptr %31, align 8, !tbaa !29
  br label %271

265:                                              ; preds = %257
  %266 = load i32, ptr %10, align 4, !tbaa !9
  %267 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 8
  %268 = load i32, ptr %267, align 8, !tbaa !40
  %269 = sub nsw i32 %266, %268
  %270 = sext i32 %269 to i64
  store i64 %270, ptr %31, align 8, !tbaa !29
  br label %271

271:                                              ; preds = %265, %262
  %272 = load i32, ptr %28, align 4, !tbaa !9
  %273 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 2
  %274 = load i8, ptr %273, align 4, !tbaa !41
  %275 = zext i8 %274 to i32
  %276 = icmp sgt i32 %272, %275
  br i1 %276, label %277, label %294

277:                                              ; preds = %271
  %278 = load ptr, ptr %30, align 8, !tbaa !5
  %279 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  %280 = load ptr, ptr %279, align 8, !tbaa !33
  %281 = icmp ne ptr %278, %280
  br i1 %281, label %288, label %282

282:                                              ; preds = %277
  %283 = load i64, ptr %31, align 8, !tbaa !29
  %284 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 4
  %285 = load i32, ptr %284, align 8, !tbaa !42
  %286 = sext i32 %285 to i64
  %287 = icmp sgt i64 %283, %286
  br i1 %287, label %288, label %294

288:                                              ; preds = %282, %277
  %289 = load ptr, ptr %30, align 8, !tbaa !5
  %290 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 7
  store ptr %289, ptr %290, align 8, !tbaa !33
  %291 = load i32, ptr %10, align 4, !tbaa !9
  %292 = getelementptr inbounds %class.RecognizeCommands, ptr %32, i32 0, i32 8
  store i32 %291, ptr %292, align 8, !tbaa !40
  %293 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 1, ptr %293, align 1, !tbaa !34
  br label %296

294:                                              ; preds = %282, %271
  %295 = load ptr, ptr %13, align 8, !tbaa !5
  store i8 0, ptr %295, align 1, !tbaa !34
  br label %296

296:                                              ; preds = %294, %288
  %297 = load ptr, ptr %30, align 8, !tbaa !5
  %298 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %297, ptr %298, align 8, !tbaa !5
  %299 = load i32, ptr %28, align 4, !tbaa !9
  %300 = trunc i32 %299 to i8
  %301 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %300, ptr %301, 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 %302

302:                                              ; preds = %296, %153
  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 %303

303:                                              ; preds = %302, %92, %75, %55
  %304 = load i32, ptr %7, align 4
  ret i32 %304
}

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 @_ZN20PreviousResultsQueue6ResultC2EiPh(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}
!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 [65 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 = %14, %11, %6
  %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 %137

22:                                               ; preds = %14
  %23 = load i32, ptr %1, align 8, !tbaa !23
  %.not71 = icmp eq i32 %23, 3
  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 %137

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 %137

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 @_ZN20PreviousResultsQueue6ResultC2EiPh(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 %137

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
  %.sroa.18.0.extract.shift109 = lshr i64 %74, 56
  %.sroa.18.0.extract.trunc110 = trunc nuw nsw i64 %.sroa.18.0.extract.shift109 to i32
  %.sroa.14.0.extract.shift104 = lshr i64 %74, 48
  %.sroa.14.0.extract.trunc105 = trunc nuw nsw i64 %.sroa.14.0.extract.shift104 to i32
  %.sroa.10.0.extract.shift99 = lshr i64 %74, 40
  %.sroa.10.0.extract.trunc100 = trunc nuw nsw i64 %.sroa.10.0.extract.shift99 to i32
  %.sroa.6.0.extract.shift94 = lshr i64 %74, 32
  %.sroa.6.0.extract.trunc95 = trunc nuw i64 %.sroa.6.0.extract.shift94 to i32
  %75 = and i32 %.sroa.6.0.extract.trunc95, 255
  %76 = and i32 %.sroa.10.0.extract.trunc100, 255
  %77 = and i32 %.sroa.14.0.extract.trunc105, 255
  %78 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %79 = icmp sgt i32 %78, 1
  br i1 %79, label %.split80.us, label %.preheader76.loopexit

.preheader76.loopexit:                            ; preds = %.split80.us, %.split80.us.peel
  %.sroa.29.1 = phi i32 [ %.sroa.18.0.extract.trunc110, %.split80.us.peel ], [ %109, %.split80.us ]
  %.sroa.20.1 = phi i32 [ %77, %.split80.us.peel ], [ %108, %.split80.us ]
  %.sroa.11.1 = phi i32 [ %76, %.split80.us.peel ], [ %106, %.split80.us ]
  %.sroa.0114.1 = phi i32 [ %75, %.split80.us.peel ], [ %104, %.split80.us ]
  %80 = sext i32 %.sroa.0114.1 to i64
  %81 = sext i32 %.sroa.11.1 to i64
  %82 = sext i32 %.sroa.20.1 to i64
  %83 = sext i32 %.sroa.29.1 to i64
  br label %.preheader76

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

.split80.us:                                      ; preds = %.split80.us.peel, %.split80.us
  %.sroa.29.3 = phi i32 [ %109, %.split80.us ], [ %.sroa.18.0.extract.trunc110, %.split80.us.peel ]
  %.sroa.20.3 = phi i32 [ %108, %.split80.us ], [ %77, %.split80.us.peel ]
  %.sroa.11.3 = phi i32 [ %106, %.split80.us ], [ %76, %.split80.us.peel ]
  %.sroa.0114.3 = phi i32 [ %104, %.split80.us ], [ %75, %.split80.us.peel ]
  %.06481 = phi i32 [ %110, %.split80.us ], [ 1, %.split80.us.peel ]
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN20PreviousResultsQueue10from_frontEi(ptr noundef nonnull align 8 dereferenceable(416) %28, i32 noundef %.06481)
  %102 = load i64, ptr %101, align 4
  %.sroa.18.0.extract.shift = lshr i64 %102, 56
  %.sroa.18.0.extract.trunc = trunc nuw nsw i64 %.sroa.18.0.extract.shift to i32
  %.sroa.14.0.extract.shift = lshr i64 %102, 48
  %.sroa.14.0.extract.trunc = trunc nuw nsw i64 %.sroa.14.0.extract.shift to i32
  %.sroa.10.0.extract.shift = lshr i64 %102, 40
  %.sroa.10.0.extract.trunc = trunc nuw nsw i64 %.sroa.10.0.extract.shift to i32
  %.sroa.6.0.extract.shift = lshr i64 %102, 32
  %.sroa.6.0.extract.trunc = trunc nuw i64 %.sroa.6.0.extract.shift to i32
  %103 = and i32 %.sroa.6.0.extract.trunc, 255
  %104 = add nuw nsw i32 %.sroa.0114.3, %103
  %105 = and i32 %.sroa.10.0.extract.trunc, 255
  %106 = add nuw nsw i32 %.sroa.11.3, %105
  %107 = and i32 %.sroa.14.0.extract.trunc, 255
  %108 = add nuw nsw i32 %.sroa.20.3, %107
  %109 = add nuw nsw i32 %.sroa.29.3, %.sroa.18.0.extract.trunc
  %110 = add nuw nsw i32 %.06481, 1
  %111 = call noundef i32 @_ZN20PreviousResultsQueue4sizeEv(ptr noundef nonnull align 8 dereferenceable(416) %28)
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %.split80.us, label %.preheader76.loopexit, !llvm.loop !34

113:                                              ; preds = %.preheader76
  %114 = getelementptr inbounds i8, ptr %0, i64 448
  %115 = load i32, ptr %114, align 8, !tbaa !36
  %116 = call noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #5
  %117 = icmp eq i32 %115, %116
  br i1 %117, label %118, label %120

118:                                              ; preds = %113, %.preheader76
  %119 = call noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #5
  br label %123

120:                                              ; preds = %113
  %121 = load i32, ptr %114, align 8, !tbaa !36
  %122 = sub nsw i32 %2, %121
  br label %123

123:                                              ; preds = %120, %118
  %.0.in = phi i32 [ %119, %118 ], [ %122, %120 ]
  %124 = getelementptr inbounds i8, ptr %0, i64 12
  %125 = load i8, ptr %124, align 4, !tbaa !37
  %126 = zext i8 %125 to i32
  %127 = icmp ugt i32 %spec.select73.3, %126
  br i1 %127, label %128, label %135

128:                                              ; preds = %123
  %129 = load ptr, ptr %97, align 8, !tbaa !31
  %.not72 = icmp ne ptr %96, %129
  %130 = getelementptr inbounds i8, ptr %0, i64 16
  %131 = load i32, ptr %130, align 8
  %132 = icmp sgt i32 %.0.in, %131
  %or.cond = select i1 %.not72, i1 true, i1 %132
  br i1 %or.cond, label %133, label %135

133:                                              ; preds = %128
  store ptr %96, ptr %97, align 8, !tbaa !31
  %134 = getelementptr inbounds i8, ptr %0, i64 448
  store i32 %2, ptr %134, align 8, !tbaa !36
  br label %135

135:                                              ; preds = %123, %128, %133
  %storemerge = phi i8 [ 1, %133 ], [ 0, %128 ], [ 0, %123 ]
  store i8 %storemerge, ptr %5, align 1, !tbaa !33
  store ptr %96, ptr %3, align 8, !tbaa !32
  %136 = trunc i32 %spec.select73.3 to i8
  store i8 %136, ptr %4, align 1, !tbaa !26
  br label %137

137:                                              ; preds = %67, %135, %34, %24, %17
  %.1 = phi i32 [ 1, %17 ], [ 1, %24 ], [ 1, %34 ], [ 0, %135 ], [ 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 @_ZN20PreviousResultsQueue6ResultC2EiPh(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}
!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,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass