; LLVM IR from tensorflow/tflite-micro :: tensorflow/lite/experimental/microfrontend/lib (fft_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"

%struct.complex_int16_t = type { i16, i16 }
%struct.FftState = type { ptr, ptr, i64, i64, ptr, i64 }

@_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
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [116 x i8], align 1
@_ZN12_GLOBAL__N_111kFakeWindowE = external hidden constant [25 x i16], align 16
@__const.main.expected = external hidden unnamed_addr constant [17 x %struct.complex_int16_t], align 16
@.str.3 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.13 = 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 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.FftState, align 8
  %7 = alloca [17 x %struct.complex_int16_t], align 16
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i16, align 2
  %15 = alloca i16, align 2
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i16, align 2
  %20 = alloca i16, align 2
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = 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 @_ZN6tflite14InitializeTestEv()
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str)
  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 %24

24:                                               ; preds = %239, %2
  %25 = load i8, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11, !range !13, !noundef !14
  %26 = trunc i8 %25 to i1
  %27 = xor i1 %26, true
  br i1 %27, label %28, label %252

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

29:                                               ; preds = %28
  %30 = call i32 @FftPopulateState(ptr noundef %6, i64 noundef 25)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 34)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %33

33:                                               ; preds = %32, %29
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  call void @FftInit(ptr noundef %6)
  call void @FftCompute(ptr noundef %6, ptr noundef @_ZN12_GLOBAL__N_111kFakeWindowE, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 68, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.main.expected, i64 68, i1 false)
  br label %36

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %37 = getelementptr inbounds %struct.FftState, ptr %6, i32 0, i32 2
  %38 = load i64, ptr %37, align 8, !tbaa !15
  %39 = udiv i64 %38, 2
  %40 = add i64 %39, 1
  store i64 %40, ptr %8, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 17, ptr %9, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 0, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !11
  %41 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %42 = trunc i8 %41 to i1
  br i1 %42, label %43, label %69

43:                                               ; preds = %36
  %44 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %69

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %47 = load i64, ptr %8, align 8, !tbaa !18
  %48 = load i64, ptr %9, align 8, !tbaa !18
  %49 = icmp ugt i64 %47, %48
  br i1 %49, label %50, label %54

50:                                               ; preds = %46
  %51 = load i64, ptr %8, align 8, !tbaa !18
  %52 = load i64, ptr %9, align 8, !tbaa !18
  %53 = sub i64 %51, %52
  br label %58

54:                                               ; preds = %46
  %55 = load i64, ptr %9, align 8, !tbaa !18
  %56 = load i64, ptr %8, align 8, !tbaa !18
  %57 = sub i64 %55, %56
  br label %58

58:                                               ; preds = %54, %50
  %59 = phi i64 [ %53, %50 ], [ %57, %54 ]
  store i64 %59, ptr %12, align 8, !tbaa !18
  %60 = load i64, ptr %12, align 8, !tbaa !18
  %61 = call noundef i64 @_ZNSt14numeric_limitsImE7epsilonEv() #6
  %62 = icmp ugt i64 %60, %61
  br i1 %62, label %63, label %68

63:                                               ; preds = %58
  %64 = load i64, ptr %8, align 8, !tbaa !18
  %65 = uitofp i64 %64 to double
  %66 = load i64, ptr %9, align 8, !tbaa !18
  %67 = uitofp i64 %66 to double
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 44, double noundef %65, double noundef %67)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %68

68:                                               ; preds = %63, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %86

69:                                               ; preds = %43, %36
  %70 = load i64, ptr %8, align 8, !tbaa !18
  %71 = load i64, ptr %9, align 8, !tbaa !18
  %72 = icmp ne i64 %70, %71
  br i1 %72, label %73, label %85

73:                                               ; preds = %69
  %74 = load i64, ptr %8, align 8, !tbaa !18
  %75 = trunc i64 %74 to i32
  %76 = load i64, ptr %9, align 8, !tbaa !18
  %77 = trunc i64 %76 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 44, i32 noundef %75, i32 noundef %77)
  %78 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %79 = trunc i8 %78 to i1
  br i1 %79, label %83, label %80

80:                                               ; preds = %73
  %81 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %82 = trunc i8 %81 to i1
  br i1 %82, label %83, label %84

83:                                               ; preds = %80, %73
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.5)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.6)
  br label %84

84:                                               ; preds = %83, %80
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %85

85:                                               ; preds = %84, %69
  br label %86

86:                                               ; preds = %85, %68
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %87

87:                                               ; preds = %86
  br label %88

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

89:                                               ; preds = %235, %88
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = zext i32 %90 to i64
  %92 = getelementptr inbounds %struct.FftState, ptr %6, i32 0, i32 2
  %93 = load i64, ptr %92, align 8, !tbaa !15
  %94 = udiv i64 %93, 2
  %95 = icmp ule i64 %91, %94
  br i1 %95, label %96, label %238

96:                                               ; preds = %89
  br label %97

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #6
  %98 = getelementptr inbounds %struct.FftState, ptr %6, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds %struct.complex_int16_t, ptr %99, i64 %101
  %103 = getelementptr inbounds %struct.complex_int16_t, ptr %102, i32 0, i32 0
  %104 = load i16, ptr %103, align 2, !tbaa !20
  store i16 %104, ptr %14, align 2, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #6
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [17 x %struct.complex_int16_t], ptr %7, i64 0, i64 %106
  %108 = getelementptr inbounds %struct.complex_int16_t, ptr %107, i32 0, i32 0
  %109 = load i16, ptr %108, align 4, !tbaa !20
  store i16 %109, ptr %15, align 2, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i8 0, ptr %16, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !11
  %110 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %144

112:                                              ; preds = %97
  %113 = load i8, ptr %17, align 1, !tbaa !11, !range !13, !noundef !14
  %114 = trunc i8 %113 to i1
  br i1 %114, label %115, label %144

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %116 = load i16, ptr %14, align 2, !tbaa !23
  %117 = sext i16 %116 to i32
  %118 = load i16, ptr %15, align 2, !tbaa !23
  %119 = sext i16 %118 to i32
  %120 = icmp sgt i32 %117, %119
  br i1 %120, label %121, label %127

121:                                              ; preds = %115
  %122 = load i16, ptr %14, align 2, !tbaa !23
  %123 = sext i16 %122 to i32
  %124 = load i16, ptr %15, align 2, !tbaa !23
  %125 = sext i16 %124 to i32
  %126 = sub nsw i32 %123, %125
  br label %133

127:                                              ; preds = %115
  %128 = load i16, ptr %15, align 2, !tbaa !23
  %129 = sext i16 %128 to i32
  %130 = load i16, ptr %14, align 2, !tbaa !23
  %131 = sext i16 %130 to i32
  %132 = sub nsw i32 %129, %131
  br label %133

133:                                              ; preds = %127, %121
  %134 = phi i32 [ %126, %121 ], [ %132, %127 ]
  store i32 %134, ptr %18, align 4, !tbaa !5
  %135 = load i32, ptr %18, align 4, !tbaa !5
  %136 = call noundef i32 @_ZNSt14numeric_limitsIiE7epsilonEv() #6
  %137 = icmp sgt i32 %135, %136
  br i1 %137, label %138, label %143

138:                                              ; preds = %133
  %139 = load i16, ptr %14, align 2, !tbaa !23
  %140 = sitofp i16 %139 to double
  %141 = load i16, ptr %15, align 2, !tbaa !23
  %142 = sitofp i16 %141 to double
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 47, double noundef %140, double noundef %142)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %143

143:                                              ; preds = %138, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %163

144:                                              ; preds = %112, %97
  %145 = load i16, ptr %14, align 2, !tbaa !23
  %146 = sext i16 %145 to i32
  %147 = load i16, ptr %15, align 2, !tbaa !23
  %148 = sext i16 %147 to i32
  %149 = icmp ne i32 %146, %148
  br i1 %149, label %150, label %162

150:                                              ; preds = %144
  %151 = load i16, ptr %14, align 2, !tbaa !23
  %152 = sext i16 %151 to i32
  %153 = load i16, ptr %15, align 2, !tbaa !23
  %154 = sext i16 %153 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.8, ptr noundef @.str.2, i32 noundef 47, i32 noundef %152, i32 noundef %154)
  %155 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %156 = trunc i8 %155 to i1
  br i1 %156, label %160, label %157

157:                                              ; preds = %150
  %158 = load i8, ptr %17, align 1, !tbaa !11, !range !13, !noundef !14
  %159 = trunc i8 %158 to i1
  br i1 %159, label %160, label %161

160:                                              ; preds = %157, %150
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.5)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.6)
  br label %161

161:                                              ; preds = %160, %157
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %162

162:                                              ; preds = %161, %144
  br label %163

163:                                              ; preds = %162, %143
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #6
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #6
  %167 = getelementptr inbounds %struct.FftState, ptr %6, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !19
  %169 = load i32, ptr %13, align 4, !tbaa !5
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds %struct.complex_int16_t, ptr %168, i64 %170
  %172 = getelementptr inbounds %struct.complex_int16_t, ptr %171, i32 0, i32 1
  %173 = load i16, ptr %172, align 2, !tbaa !24
  store i16 %173, ptr %19, align 2, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #6
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds [17 x %struct.complex_int16_t], ptr %7, i64 0, i64 %175
  %177 = getelementptr inbounds %struct.complex_int16_t, ptr %176, i32 0, i32 1
  %178 = load i16, ptr %177, align 2, !tbaa !24
  store i16 %178, ptr %20, align 2, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i8 0, ptr %21, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  store i8 0, ptr %22, align 1, !tbaa !11
  %179 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %180 = trunc i8 %179 to i1
  br i1 %180, label %181, label %213

181:                                              ; preds = %166
  %182 = load i8, ptr %22, align 1, !tbaa !11, !range !13, !noundef !14
  %183 = trunc i8 %182 to i1
  br i1 %183, label %184, label %213

184:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %185 = load i16, ptr %19, align 2, !tbaa !23
  %186 = sext i16 %185 to i32
  %187 = load i16, ptr %20, align 2, !tbaa !23
  %188 = sext i16 %187 to i32
  %189 = icmp sgt i32 %186, %188
  br i1 %189, label %190, label %196

190:                                              ; preds = %184
  %191 = load i16, ptr %19, align 2, !tbaa !23
  %192 = sext i16 %191 to i32
  %193 = load i16, ptr %20, align 2, !tbaa !23
  %194 = sext i16 %193 to i32
  %195 = sub nsw i32 %192, %194
  br label %202

196:                                              ; preds = %184
  %197 = load i16, ptr %20, align 2, !tbaa !23
  %198 = sext i16 %197 to i32
  %199 = load i16, ptr %19, align 2, !tbaa !23
  %200 = sext i16 %199 to i32
  %201 = sub nsw i32 %198, %200
  br label %202

202:                                              ; preds = %196, %190
  %203 = phi i32 [ %195, %190 ], [ %201, %196 ]
  store i32 %203, ptr %23, align 4, !tbaa !5
  %204 = load i32, ptr %23, align 4, !tbaa !5
  %205 = call noundef i32 @_ZNSt14numeric_limitsIiE7epsilonEv() #6
  %206 = icmp sgt i32 %204, %205
  br i1 %206, label %207, label %212

207:                                              ; preds = %202
  %208 = load i16, ptr %19, align 2, !tbaa !23
  %209 = sitofp i16 %208 to double
  %210 = load i16, ptr %20, align 2, !tbaa !23
  %211 = sitofp i16 %210 to double
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.9, ptr noundef @.str.2, i32 noundef 48, double noundef %209, double noundef %211)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %212

212:                                              ; preds = %207, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %232

213:                                              ; preds = %181, %166
  %214 = load i16, ptr %19, align 2, !tbaa !23
  %215 = sext i16 %214 to i32
  %216 = load i16, ptr %20, align 2, !tbaa !23
  %217 = sext i16 %216 to i32
  %218 = icmp ne i32 %215, %217
  br i1 %218, label %219, label %231

219:                                              ; preds = %213
  %220 = load i16, ptr %19, align 2, !tbaa !23
  %221 = sext i16 %220 to i32
  %222 = load i16, ptr %20, align 2, !tbaa !23
  %223 = sext i16 %222 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.10, ptr noundef @.str.2, i32 noundef 48, i32 noundef %221, i32 noundef %223)
  %224 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %225 = trunc i8 %224 to i1
  br i1 %225, label %229, label %226

226:                                              ; preds = %219
  %227 = load i8, ptr %22, align 1, !tbaa !11, !range !13, !noundef !14
  %228 = trunc i8 %227 to i1
  br i1 %228, label %229, label %230

229:                                              ; preds = %226, %219
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.5)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.6)
  br label %230

230:                                              ; preds = %229, %226
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %231

231:                                              ; preds = %230, %213
  br label %232

232:                                              ; preds = %231, %212
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #6
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %13, align 4, !tbaa !5
  %237 = add i32 %236, 1
  store i32 %237, ptr %13, align 4, !tbaa !5
  br label %89, !llvm.loop !25

238:                                              ; preds = %89
  call void @FftFreeStateContents(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 68, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #6
  br label %239

239:                                              ; preds = %238
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %240 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %241 = trunc i8 %240 to i1
  %242 = zext i1 %241 to i64
  %243 = select i1 %241, i32 0, i32 1
  %244 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %245 = add nsw i32 %244, %243
  store i32 %245, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %246 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %247 = trunc i8 %246 to i1
  %248 = zext i1 %247 to i64
  %249 = select i1 %247, i32 1, i32 0
  %250 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %251 = add nsw i32 %250, %249
  store i32 %251, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  br label %24, !llvm.loop !27

252:                                              ; preds = %24
  %253 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %254 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %255 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %256 = add nsw i32 %254, %255
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.11, i32 noundef %253, i32 noundef %256)
  %257 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %258 = icmp eq i32 %257, 0
  br i1 %258, label %259, label %260

259:                                              ; preds = %252
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.12)
  store i32 0, ptr %3, align 4
  br label %261

260:                                              ; preds = %252
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.13)
  store i32 1, ptr %3, align 4
  br label %261

261:                                              ; preds = %260, %259
  %262 = load i32, ptr %3, align 4
  ret i32 %262
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite14InitializeTestEv() #1

declare void @_Z11MicroPrintfPKcz(ptr noundef, ...) #2

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

declare i32 @FftPopulateState(ptr noundef, i64 noundef) #2

declare void @FftInit(ptr noundef) #2

declare void @FftCompute(ptr noundef, ptr noundef, i32 noundef) #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 i64 @_ZNSt14numeric_limitsImE7epsilonEv() #5 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 nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE7epsilonEv() #5 align 2

declare void @FftFreeStateContents(ptr noundef) #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 = { inlinehint 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 = { 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 #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, !17, i64 16}
!16 = !{!"_ZTS8FftState", !10, i64 0, !10, i64 8, !17, i64 16, !17, i64 24, !10, i64 32, !17, i64 40}
!17 = !{!"long", !7, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!16, !10, i64 8}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTS15complex_int16_t", !22, i64 0, !22, i64 2}
!22 = !{!"short", !7, i64 0}
!23 = !{!22, !22, i64 0}
!24 = !{!21, !22, i64 2}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.complex_int16_t = type { i16, i16 }
%struct.FftState = type { ptr, ptr, i64, i64, ptr, i64 }

@_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
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [116 x i8], align 1
@_ZN12_GLOBAL__N_111kFakeWindowE = external hidden constant [25 x i16], align 16
@__const.main.expected = external hidden unnamed_addr constant [17 x %struct.complex_int16_t], align 16
@.str.4 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca %struct.FftState, align 8
  store i32 0, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  store i32 0, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  tail call void @_ZN6tflite14InitializeTestEv()
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str)
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !9
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  %4 = getelementptr inbounds i8, ptr %3, i64 16
  %5 = getelementptr inbounds i8, ptr %3, i64 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #4
  %6 = call i32 @FftPopulateState(ptr noundef nonnull %3, i64 noundef 25)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %8

7:                                                ; preds = %2
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 34)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  br label %8

8:                                                ; preds = %7, %2
  call void @FftInit(ptr noundef nonnull %3)
  call void @FftCompute(ptr noundef nonnull %3, ptr noundef nonnull @_ZN12_GLOBAL__N_111kFakeWindowE, i32 noundef 0)
  %9 = load i64, ptr %4, align 8, !tbaa !11
  %10 = lshr i64 %9, 1
  %11 = add nuw i64 %10, 1
  %.not73 = icmp eq i64 %11, 17
  br i1 %.not73, label %.preheader, label %12

12:                                               ; preds = %8
  %13 = trunc i64 %11 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 44, i32 noundef %13, i32 noundef 17)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  br label %.preheader

.preheader:                                       ; preds = %8, %12
  br label %14

14:                                               ; preds = %.preheader, %33
  %15 = phi i64 [ %35, %33 ], [ 0, %.preheader ]
  %.05877 = phi i32 [ %34, %33 ], [ 0, %.preheader ]
  %16 = getelementptr inbounds [17 x %struct.complex_int16_t], ptr @__const.main.expected, i64 0, i64 %15
  %17 = load i16, ptr %16, align 4, !tbaa !15
  %18 = load ptr, ptr %5, align 8, !tbaa !18
  %19 = getelementptr inbounds %struct.complex_int16_t, ptr %18, i64 %15
  %20 = load i16, ptr %19, align 2, !tbaa !15
  %.not75 = icmp eq i16 %20, %17
  br i1 %.not75, label %24, label %21

21:                                               ; preds = %14
  %22 = sext i16 %17 to i32
  %23 = sext i16 %20 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.2, i32 noundef 47, i32 noundef %23, i32 noundef %22)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  %.pre = load ptr, ptr %5, align 8, !tbaa !18
  br label %24

24:                                               ; preds = %21, %14
  %25 = phi ptr [ %.pre, %21 ], [ %18, %14 ]
  %26 = getelementptr inbounds i8, ptr %16, i64 2
  %27 = load i16, ptr %26, align 2, !tbaa !19
  %28 = getelementptr inbounds %struct.complex_int16_t, ptr %25, i64 %15, i32 1
  %29 = load i16, ptr %28, align 2, !tbaa !19
  %.not76 = icmp eq i16 %29, %27
  br i1 %.not76, label %33, label %30

30:                                               ; preds = %24
  %31 = sext i16 %27 to i32
  %32 = sext i16 %29 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, i32 noundef 48, i32 noundef %32, i32 noundef %31)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  br label %33

33:                                               ; preds = %24, %30
  %34 = add i32 %.05877, 1
  %35 = zext i32 %34 to i64
  %36 = load i64, ptr %4, align 8, !tbaa !11
  %37 = lshr i64 %36, 1
  %.not74 = icmp ult i64 %37, %35
  br i1 %.not74, label %._crit_edge, label %14, !llvm.loop !20

._crit_edge:                                      ; preds = %33
  call void @FftFreeStateContents(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #4
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !9
  %38 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9, !range !22, !noundef !23
  %39 = xor i8 %38, 1
  %not. = zext nneg i8 %39 to i32
  %40 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %41 = add nsw i32 %40, %not.
  store i32 %41, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %42 = zext nneg i8 %38 to i32
  %43 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %45 = add nsw i32 %44, %41
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.11, i32 noundef %41, i32 noundef %45)
  %46 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %47 = icmp ne i32 %46, 0
  %.str.12..str.13 = select i1 %47, ptr @.str.13, ptr @.str.12
  %. = zext i1 %47 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull %.str.12..str.13)
  ret i32 %.
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite14InitializeTestEv() local_unnamed_addr #1

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

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

declare i32 @FftPopulateState(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @FftInit(ptr noundef) local_unnamed_addr #2

declare void @FftCompute(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare void @FftFreeStateContents(ptr noundef) local_unnamed_addr #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 = { inlinehint 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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 16}
!12 = !{!"_ZTS8FftState", !13, i64 0, !13, i64 8, !14, i64 16, !14, i64 24, !13, i64 32, !14, i64 40}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS15complex_int16_t", !17, i64 0, !17, i64 2}
!17 = !{!"short", !7, i64 0}
!18 = !{!12, !13, i64 8}
!19 = !{!16, !17, i64 2}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{i8 0, i8 2}
!23 = !{}


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