; LLVM IR from NVIDIA/tensorflow :: tensorflow/lite/experimental/microfrontend/lib (noise_reduction_test)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.tflite::MicroErrorReporter" = type { %"class.tflite::ErrorReporter" }
%"class.tflite::ErrorReporter" = type { ptr }
%"class.(anonymous namespace)::NoiseReductionTestConfig" = type { %struct.NoiseReductionConfig }
%struct.NoiseReductionConfig = type { i32, float, float, float }
%struct.NoiseReductionState = type { i32, i16, i16, i16, i32, ptr }

@_ZN10micro_test12tests_passedE = external dso_local global i32, align 4
@_ZN10micro_test12tests_failedE = external dso_local global i32, align 4
@_ZN10micro_test16is_test_completeE = external dso_local global i8, align 1
@_ZN10micro_test13did_test_failE = external dso_local global i8, align 1
@_ZN10micro_test8reporterE = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [122 x i8], align 1
@__const.main.signal = external hidden unnamed_addr constant [2 x i32], align 4
@__const.main.expected = external hidden unnamed_addr constant [2 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [38 x i8], align 1
@__const.main.signal.7 = external hidden unnamed_addr constant [2 x i32], align 4
@__const.main.expected.8 = external hidden unnamed_addr constant [2 x i32], align 4
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.tflite::MicroErrorReporter", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.(anonymous namespace)::NoiseReductionTestConfig", align 4
  %10 = alloca %struct.NoiseReductionState, align 8
  %11 = alloca [2 x i32], align 4
  %12 = alloca [2 x i32], align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.(anonymous namespace)::NoiseReductionTestConfig", align 4
  %15 = alloca %struct.NoiseReductionState, align 8
  %16 = alloca [2 x i32], align 4
  %17 = alloca [2 x i32], align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store i32 0, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  store i32 0, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @_ZN6tflite18MicroErrorReporterC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  store ptr %6, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %19 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %20 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef @.str, ptr noundef @.str.1)
          to label %21 unwind label %37

21:                                               ; preds = %2
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %22

22:                                               ; preds = %120, %21
  %23 = load i8, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11, !range !13, !noundef !14
  %24 = trunc i8 %23 to i1
  %25 = xor i1 %24, true
  br i1 %25, label %26, label %137

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  invoke void @_ZN12_GLOBAL__N_124NoiseReductionTestConfigC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %27 unwind label %41

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  br label %28

28:                                               ; preds = %27
  %29 = getelementptr inbounds %"class.(anonymous namespace)::NoiseReductionTestConfig", ptr %9, i32 0, i32 0
  %30 = invoke i32 @NoiseReductionPopulateState(ptr noundef %29, ptr noundef %10, i32 noundef 2)
          to label %31 unwind label %45

31:                                               ; preds = %28
  %32 = icmp ne i32 %30, 0
  br i1 %32, label %49, label %33

33:                                               ; preds = %31
  %34 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %35 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 45)
          to label %36 unwind label %45

36:                                               ; preds = %33
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %49

37:                                               ; preds = %262, %258, %248, %137, %2
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  br label %268

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  br label %136

45:                                               ; preds = %33, %28
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  br label %135

49:                                               ; preds = %36, %31
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 @__const.main.signal, i64 8, i1 false)
  %52 = getelementptr inbounds [2 x i32], ptr %11, i64 0, i64 0
  invoke void @NoiseReductionApply(ptr noundef %10, ptr noundef %52)
          to label %53 unwind label %65

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 @__const.main.expected, i64 8, i1 false)
  br label %54

54:                                               ; preds = %53
  %55 = getelementptr inbounds %struct.NoiseReductionState, ptr %10, i32 0, i32 4
  %56 = load i32, ptr %55, align 4, !tbaa !15
  %57 = sext i32 %56 to i64
  %58 = icmp ne i64 %57, 2
  br i1 %58, label %59, label %73

59:                                               ; preds = %54
  %60 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.NoiseReductionState, ptr %10, i32 0, i32 4
  %62 = load i32, ptr %61, align 4, !tbaa !15
  %63 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 52, i32 noundef %62, i64 noundef 2)
          to label %64 unwind label %69

64:                                               ; preds = %59
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %73

65:                                               ; preds = %51
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  br label %134

69:                                               ; preds = %59
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %133

73:                                               ; preds = %64, %54
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %115, %75
  %77 = load i32, ptr %13, align 4, !tbaa !5
  %78 = getelementptr inbounds %struct.NoiseReductionState, ptr %10, i32 0, i32 4
  %79 = load i32, ptr %78, align 4, !tbaa !15
  %80 = icmp slt i32 %77, %79
  br i1 %80, label %81, label %118

81:                                               ; preds = %76
  br label %82

82:                                               ; preds = %81
  %83 = getelementptr inbounds %struct.NoiseReductionState, ptr %10, i32 0, i32 5
  %84 = load ptr, ptr %83, align 8, !tbaa !18
  %85 = load i32, ptr %13, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x i32], ptr %12, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = icmp ne i32 %88, %92
  br i1 %93, label %94, label %112

94:                                               ; preds = %82
  %95 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.NoiseReductionState, ptr %10, i32 0, i32 5
  %97 = load ptr, ptr %96, align 8, !tbaa !18
  %98 = load i32, ptr %13, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %97, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %13, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [2 x i32], ptr %12, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 55, i32 noundef %101, i32 noundef %105)
          to label %107 unwind label %108

107:                                              ; preds = %94
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %112

108:                                              ; preds = %118, %94
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %7, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %133

112:                                              ; preds = %107, %82
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %13, align 4, !tbaa !5
  br label %76, !llvm.loop !19

118:                                              ; preds = %76
  invoke void @NoiseReductionFreeStateContents(ptr noundef %10)
          to label %119 unwind label %108

119:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %120

120:                                              ; preds = %119
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %121 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %122 = trunc i8 %121 to i1
  %123 = zext i1 %122 to i64
  %124 = select i1 %122, i32 0, i32 1
  %125 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %126 = add nsw i32 %125, %124
  store i32 %126, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %127 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %128 = trunc i8 %127 to i1
  %129 = zext i1 %128 to i64
  %130 = select i1 %128, i32 1, i32 0
  %131 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %132 = add nsw i32 %131, %130
  store i32 %132, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  br label %22, !llvm.loop !21

133:                                              ; preds = %108, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %134

134:                                              ; preds = %133, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %135

135:                                              ; preds = %134, %45
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  br label %136

136:                                              ; preds = %135, %41
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %268

137:                                              ; preds = %22
  %138 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %139 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef @.str, ptr noundef @.str.6)
          to label %140 unwind label %37

140:                                              ; preds = %137
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %141

141:                                              ; preds = %231, %140
  %142 = load i8, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11, !range !13, !noundef !14
  %143 = trunc i8 %142 to i1
  %144 = xor i1 %143, true
  br i1 %144, label %145, label %248

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  invoke void @_ZN12_GLOBAL__N_124NoiseReductionTestConfigC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %146 unwind label %156

146:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  br label %147

147:                                              ; preds = %146
  %148 = getelementptr inbounds %"class.(anonymous namespace)::NoiseReductionTestConfig", ptr %14, i32 0, i32 0
  %149 = invoke i32 @NoiseReductionPopulateState(ptr noundef %148, ptr noundef %15, i32 noundef 2)
          to label %150 unwind label %160

150:                                              ; preds = %147
  %151 = icmp ne i32 %149, 0
  br i1 %151, label %164, label %152

152:                                              ; preds = %150
  %153 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %154 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 65)
          to label %155 unwind label %160

155:                                              ; preds = %152
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %164

156:                                              ; preds = %145
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %7, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %8, align 4
  br label %247

160:                                              ; preds = %152, %147
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %7, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %8, align 4
  br label %246

164:                                              ; preds = %155, %150
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 @__const.main.signal.7, i64 8, i1 false)
  %167 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 0
  invoke void @NoiseReductionApply(ptr noundef %15, ptr noundef %167)
          to label %168 unwind label %180

168:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 @__const.main.expected.8, i64 8, i1 false)
  br label %169

169:                                              ; preds = %168
  %170 = getelementptr inbounds %struct.NoiseReductionState, ptr %15, i32 0, i32 4
  %171 = load i32, ptr %170, align 4, !tbaa !15
  %172 = sext i32 %171 to i64
  %173 = icmp ne i64 %172, 2
  br i1 %173, label %174, label %188

174:                                              ; preds = %169
  %175 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %176 = getelementptr inbounds %struct.NoiseReductionState, ptr %15, i32 0, i32 4
  %177 = load i32, ptr %176, align 4, !tbaa !15
  %178 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 72, i32 noundef %177, i64 noundef 2)
          to label %179 unwind label %184

179:                                              ; preds = %174
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %188

180:                                              ; preds = %166
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %7, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %8, align 4
  br label %245

184:                                              ; preds = %174
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %7, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %8, align 4
  br label %244

188:                                              ; preds = %179, %169
  br label %189

189:                                              ; preds = %188
  br label %190

190:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %226, %190
  %192 = load i32, ptr %18, align 4, !tbaa !5
  %193 = getelementptr inbounds %struct.NoiseReductionState, ptr %15, i32 0, i32 4
  %194 = load i32, ptr %193, align 4, !tbaa !15
  %195 = icmp slt i32 %192, %194
  br i1 %195, label %196, label %229

196:                                              ; preds = %191
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %18, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = load i32, ptr %18, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = icmp ne i32 %201, %205
  br i1 %206, label %207, label %223

207:                                              ; preds = %197
  %208 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %209 = load i32, ptr %18, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %208, ptr noundef @.str.9, ptr noundef @.str.3, i32 noundef 75, i32 noundef %212, i32 noundef %216)
          to label %218 unwind label %219

218:                                              ; preds = %207
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %223

219:                                              ; preds = %229, %207
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %7, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %244

223:                                              ; preds = %218, %197
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225
  %227 = load i32, ptr %18, align 4, !tbaa !5
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %18, align 4, !tbaa !5
  br label %191, !llvm.loop !22

229:                                              ; preds = %191
  invoke void @NoiseReductionFreeStateContents(ptr noundef %15)
          to label %230 unwind label %219

230:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %231

231:                                              ; preds = %230
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %232 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %233 = trunc i8 %232 to i1
  %234 = zext i1 %233 to i64
  %235 = select i1 %233, i32 0, i32 1
  %236 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %237 = add nsw i32 %236, %235
  store i32 %237, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %238 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %239 = trunc i8 %238 to i1
  %240 = zext i1 %239 to i64
  %241 = select i1 %239, i32 1, i32 0
  %242 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %243 = add nsw i32 %242, %241
  store i32 %243, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  br label %141, !llvm.loop !23

244:                                              ; preds = %219, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %245

245:                                              ; preds = %244, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %246

246:                                              ; preds = %245, %160
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %247

247:                                              ; preds = %246, %156
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %268

248:                                              ; preds = %141
  %249 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %250 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %251 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %252 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %253 = add nsw i32 %251, %252
  %254 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef @.str.10, i32 noundef %250, i32 noundef %253)
          to label %255 unwind label %37

255:                                              ; preds = %248
  %256 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %257 = icmp eq i32 %256, 0
  br i1 %257, label %258, label %262

258:                                              ; preds = %255
  %259 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %260 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef @.str.11)
          to label %261 unwind label %37

261:                                              ; preds = %258
  br label %266

262:                                              ; preds = %255
  %263 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %264 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %263, ptr noundef @.str.12)
          to label %265 unwind label %37

265:                                              ; preds = %262
  br label %266

266:                                              ; preds = %265, %261
  call void @_ZN6tflite13ErrorReporterD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %267 = load i32, ptr %3, align 4
  ret i32 %267

268:                                              ; preds = %247, %136, %37
  call void @_ZN6tflite13ErrorReporterD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %269

269:                                              ; preds = %268
  %270 = load ptr, ptr %7, align 8
  %271 = load i32, ptr %8, align 4
  %272 = insertvalue { ptr, i32 } poison, ptr %270, 0
  %273 = insertvalue { ptr, i32 } %272, i32 %271, 1
  resume { ptr, i32 } %273
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_124NoiseReductionTestConfigC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

declare i32 @NoiseReductionPopulateState(ptr noundef, ptr noundef, i32 noundef) #3

; 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) #5

declare void @NoiseReductionApply(ptr noundef, ptr noundef) #3

declare void @NoiseReductionFreeStateContents(ptr noundef) #3

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

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

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

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

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


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

%"class.tflite::MicroErrorReporter" = type { %"class.tflite::ErrorReporter" }
%"class.tflite::ErrorReporter" = type { ptr }
%"class.(anonymous namespace)::NoiseReductionTestConfig" = type { %struct.NoiseReductionConfig }
%struct.NoiseReductionConfig = type { i32, float, float, float }
%struct.NoiseReductionState = type { i32, i16, i16, i16, i32, ptr }

@_ZN10micro_test12tests_passedE = external dso_local local_unnamed_addr global i32, align 4
@_ZN10micro_test12tests_failedE = external dso_local local_unnamed_addr global i32, align 4
@_ZN10micro_test16is_test_completeE = external dso_local local_unnamed_addr global i8, align 1
@_ZN10micro_test13did_test_failE = external dso_local local_unnamed_addr global i8, align 1
@_ZN10micro_test8reporterE = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [122 x i8], align 1
@__const.main.signal = external hidden unnamed_addr constant [2 x i32], align 4
@__const.main.expected = external hidden unnamed_addr constant [2 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [38 x i8], align 1
@__const.main.signal.7 = external hidden unnamed_addr constant [2 x i32], align 4
@__const.main.expected.8 = external hidden unnamed_addr constant [2 x i32], align 4
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.tflite::MicroErrorReporter", align 8
  %4 = alloca %"class.(anonymous namespace)::NoiseReductionTestConfig", align 4
  %5 = alloca %struct.NoiseReductionState, align 8
  %6 = alloca [2 x i32], align 8
  %7 = alloca %"class.(anonymous namespace)::NoiseReductionTestConfig", align 4
  %8 = alloca %struct.NoiseReductionState, align 8
  %9 = alloca [2 x i32], align 8
  store i32 0, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  store i32 0, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @_ZN6tflite18MicroErrorReporterC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  store ptr %3, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %10 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
          to label %11 unwind label %21

11:                                               ; preds = %2
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  %12 = load i64, ptr @__const.main.signal, align 4
  %13 = getelementptr inbounds i8, ptr %5, i64 12
  %14 = getelementptr inbounds i8, ptr %5, i64 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @_ZN12_GLOBAL__N_124NoiseReductionTestConfigC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %15 = invoke i32 @NoiseReductionPopulateState(ptr noundef nonnull %4, ptr noundef nonnull %5, i32 noundef 2)
          to label %16 unwind label %23

16:                                               ; preds = %11
  %.not32 = icmp eq i32 %15, 0
  br i1 %.not32, label %17, label %25

17:                                               ; preds = %16
  %18 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %19 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 45)
          to label %20 unwind label %23

20:                                               ; preds = %17
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %25

21:                                               ; preds = %.invoke, %._crit_edge56, %._crit_edge49, %2
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %115

23:                                               ; preds = %17, %11
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %52

25:                                               ; preds = %20, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 %12, ptr %6, align 8
  invoke void @NoiseReductionApply(ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %26 unwind label %31

26:                                               ; preds = %25
  %27 = load i32, ptr %13, align 4, !tbaa !13
  %.not33 = icmp eq i32 %27, 2
  br i1 %.not33, label %.lr.ph.preheader, label %28

28:                                               ; preds = %26
  %29 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %30 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 52, i32 noundef %27, i64 noundef 2)
          to label %35 unwind label %33

31:                                               ; preds = %25
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %51

33:                                               ; preds = %28
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %51

35:                                               ; preds = %28
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  %.pre = load i32, ptr %13, align 4, !tbaa !13
  %36 = icmp sgt i32 %.pre, 0
  br i1 %36, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %26, %35
  %.ph69 = phi i32 [ 2, %26 ], [ %.pre, %35 ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %47
  %37 = phi i32 [ %48, %47 ], [ %.ph69, %.lr.ph.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %47 ], [ 0, %.lr.ph.preheader ]
  %38 = load ptr, ptr %14, align 8, !tbaa !16
  %39 = getelementptr inbounds i32, ptr %38, i64 %indvars.iv
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [2 x i32], ptr @__const.main.expected, i64 0, i64 %indvars.iv
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %.not35 = icmp eq i32 %40, %42
  br i1 %.not35, label %47, label %43

43:                                               ; preds = %.lr.ph
  %44 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %45 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 55, i32 noundef %40, i32 noundef %42)
          to label %46 unwind label %.loopexit41

46:                                               ; preds = %43
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  %.pre61 = load i32, ptr %13, align 4, !tbaa !13
  br label %47

.loopexit41:                                      ; preds = %43
  %lpad.loopexit43 = landingpad { ptr, i32 }
          cleanup
  br label %51

.loopexit.split-lp42:                             ; preds = %._crit_edge
  %lpad.loopexit.split-lp44 = landingpad { ptr, i32 }
          cleanup
  br label %51

47:                                               ; preds = %.lr.ph, %46
  %48 = phi i32 [ %37, %.lr.ph ], [ %.pre61, %46 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %47, %35
  invoke void @NoiseReductionFreeStateContents(ptr noundef nonnull %5)
          to label %._crit_edge49 unwind label %.loopexit.split-lp42

51:                                               ; preds = %.loopexit41, %.loopexit.split-lp42, %33, %31
  %.pn36.pn = phi { ptr, i32 } [ %32, %31 ], [ %34, %33 ], [ %lpad.loopexit43, %.loopexit41 ], [ %lpad.loopexit.split-lp44, %.loopexit.split-lp42 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %52

52:                                               ; preds = %51, %23
  %.pn36.pn.pn = phi { ptr, i32 } [ %.pn36.pn, %51 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %115

._crit_edge49:                                    ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %53 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !19, !noundef !20
  %54 = xor i8 %53, 1
  %not.34 = zext nneg i8 %54 to i32
  %55 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %56 = add nsw i32 %55, %not.34
  store i32 %56, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %57 = zext nneg i8 %53 to i32
  %58 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %59 = add nsw i32 %58, %57
  store i32 %59, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %60 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %61 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str, ptr noundef nonnull @.str.6)
          to label %62 unwind label %21

62:                                               ; preds = %._crit_edge49
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  %63 = load i64, ptr @__const.main.signal.7, align 4
  %64 = getelementptr inbounds i8, ptr %8, i64 12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @_ZN12_GLOBAL__N_124NoiseReductionTestConfigC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %65 = invoke i32 @NoiseReductionPopulateState(ptr noundef nonnull %7, ptr noundef nonnull %8, i32 noundef 2)
          to label %66 unwind label %71

66:                                               ; preds = %62
  %.not = icmp eq i32 %65, 0
  br i1 %.not, label %67, label %73

67:                                               ; preds = %66
  %68 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %69 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 65)
          to label %70 unwind label %71

70:                                               ; preds = %67
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %73

71:                                               ; preds = %67, %62
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %99

73:                                               ; preds = %70, %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store i64 %63, ptr %9, align 8
  invoke void @NoiseReductionApply(ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %74 unwind label %79

74:                                               ; preds = %73
  %75 = load i32, ptr %64, align 4, !tbaa !13
  %.not27 = icmp eq i32 %75, 2
  br i1 %.not27, label %.lr.ph52.preheader, label %76

76:                                               ; preds = %74
  %77 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %78 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 72, i32 noundef %75, i64 noundef 2)
          to label %83 unwind label %81

79:                                               ; preds = %73
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %98

81:                                               ; preds = %76
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %98

83:                                               ; preds = %76
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  %.pre63 = load i32, ptr %64, align 4, !tbaa !13
  %84 = icmp sgt i32 %.pre63, 0
  br i1 %84, label %.lr.ph52.preheader, label %._crit_edge53

.lr.ph52.preheader:                               ; preds = %74, %83
  %.ph = phi i32 [ 2, %74 ], [ %.pre63, %83 ]
  br label %.lr.ph52

.lr.ph52:                                         ; preds = %.lr.ph52.preheader, %94
  %85 = phi i32 [ %95, %94 ], [ %.ph, %.lr.ph52.preheader ]
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %94 ], [ 0, %.lr.ph52.preheader ]
  %86 = getelementptr inbounds [2 x i32], ptr %9, i64 0, i64 %indvars.iv58
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = getelementptr inbounds [2 x i32], ptr @__const.main.expected.8, i64 0, i64 %indvars.iv58
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %.not28 = icmp eq i32 %87, %89
  br i1 %.not28, label %94, label %90

90:                                               ; preds = %.lr.ph52
  %91 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %92 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.3, i32 noundef 75, i32 noundef %87, i32 noundef %89)
          to label %93 unwind label %.loopexit

93:                                               ; preds = %90
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  %.pre64 = load i32, ptr %64, align 4, !tbaa !13
  br label %94

.loopexit:                                        ; preds = %90
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %98

.loopexit.split-lp:                               ; preds = %._crit_edge53
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %98

94:                                               ; preds = %.lr.ph52, %93
  %95 = phi i32 [ %85, %.lr.ph52 ], [ %.pre64, %93 ]
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %indvars.iv.next59, %96
  br i1 %97, label %.lr.ph52, label %._crit_edge53, !llvm.loop !21

._crit_edge53:                                    ; preds = %94, %83
  invoke void @NoiseReductionFreeStateContents(ptr noundef nonnull %8)
          to label %._crit_edge56 unwind label %.loopexit.split-lp

98:                                               ; preds = %.loopexit, %.loopexit.split-lp, %81, %79
  %.pn.pn = phi { ptr, i32 } [ %80, %79 ], [ %82, %81 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %99

99:                                               ; preds = %98, %71
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %98 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %115

._crit_edge56:                                    ; preds = %._crit_edge53
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %100 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !19, !noundef !20
  %101 = xor i8 %100, 1
  %not. = zext nneg i8 %101 to i32
  %102 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %103 = add nsw i32 %102, %not.
  store i32 %103, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %104 = zext nneg i8 %100 to i32
  %105 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %106 = add nsw i32 %105, %104
  store i32 %106, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %107 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %108 = add nsw i32 %106, %103
  %109 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull @.str.10, i32 noundef %103, i32 noundef %108)
          to label %.invoke unwind label %21

.invoke:                                          ; preds = %._crit_edge56
  %110 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %111 = icmp eq i32 %110, 0
  %112 = load ptr, ptr @_ZN10micro_test8reporterE, align 8, !tbaa !9
  %.str.11..str.12 = select i1 %111, ptr @.str.11, ptr @.str.12
  %113 = invoke noundef i32 (ptr, ptr, ...) @_ZN6tflite13ErrorReporter6ReportEPKcz(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull %.str.11..str.12)
          to label %114 unwind label %21

114:                                              ; preds = %.invoke
  call void @_ZN6tflite13ErrorReporterD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 0

115:                                              ; preds = %99, %52, %21
  %.pn36.pn.pn.pn = phi { ptr, i32 } [ %.pn36.pn.pn, %52 ], [ %.pn.pn.pn, %99 ], [ %22, %21 ]
  call void @_ZN6tflite13ErrorReporterD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn36.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_124NoiseReductionTestConfigC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

declare i32 @NoiseReductionPopulateState(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @NoiseReductionApply(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @NoiseReductionFreeStateContents(ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 12}
!14 = !{!"_ZTS19NoiseReductionState", !6, i64 0, !15, i64 4, !15, i64 6, !15, i64 8, !6, i64 12, !10, i64 16}
!15 = !{!"short", !7, i64 0}
!16 = !{!14, !10, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass