; LLVM IR from Seeed-Studio/Seeed_Arduino_edgeimpulse :: src/edge-impulse-sdk/tensorflow/lite/micro/kernels (quantize)

; 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.TfLiteNode = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr }
%struct.TfLiteContext = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.TfLiteTensor = type { i32, %union.TfLitePtrUnion, ptr, %struct.TfLiteQuantizationParams, i32, i64, ptr, ptr, ptr, i32, i8, i8, %struct.TfLiteQuantization, ptr, ptr }
%union.TfLitePtrUnion = type { ptr }
%struct.TfLiteQuantizationParams = type { float, i32 }
%struct.TfLiteQuantization = type { i32, ptr }
%struct.TfLiteAffineQuantization = type { ptr, ptr, i32 }
%struct.TfLiteFloatArray = type { i32, [0 x float] }
%"struct.tflite::ops::micro::quantize::OpData" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [136 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @abort() #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6tflite3ops5micro8quantize7PrepareEP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.TfLiteNode, ptr %12, i32 0, i32 4
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  br label %19

17:                                               ; preds = %2
  call void @abort() #5
  unreachable

18:                                               ; No predecessors!
  br label %19

19:                                               ; preds = %18, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.TfLiteNode, ptr %20, i32 0, i32 4
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  store ptr %22, ptr %6, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %19
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef %24)
  %26 = icmp ne i32 %25, 1
  br i1 %26, label %27, label %37

27:                                               ; preds = %23
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.TfLiteContext, ptr %29, i32 0, i32 5
  %31 = load ptr, ptr %30, align 8, !tbaa !12
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef %33)
  call void (ptr, ptr, ...) %31(ptr noundef %32, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 50, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef %34, i32 noundef 1)
  br label %35

35:                                               ; preds = %28
  br label %36

36:                                               ; preds = %35
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %216

37:                                               ; preds = %23
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef %41)
  %43 = icmp ne i32 %42, 1
  br i1 %43, label %44, label %54

44:                                               ; preds = %40
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.TfLiteContext, ptr %46, i32 0, i32 5
  %48 = load ptr, ptr %47, align 8, !tbaa !12
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef %50)
  call void (ptr, ptr, ...) %48(ptr noundef %49, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 51, ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef %51, i32 noundef 1)
  br label %52

52:                                               ; preds = %45
  br label %53

53:                                               ; preds = %52
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %216

54:                                               ; preds = %40
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = call noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef %57, ptr noundef %58, i32 noundef 0)
  store ptr %59, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %60, ptr noundef %61, i32 noundef 0)
  store ptr %62, ptr %9, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %56
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.TfLiteTensor, ptr %64, i32 0, i32 12
  %66 = getelementptr inbounds %struct.TfLiteQuantization, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !16
  %68 = icmp ne i32 %67, 1
  br i1 %68, label %69, label %81

69:                                               ; preds = %63
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.TfLiteContext, ptr %71, i32 0, i32 5
  %73 = load ptr, ptr %72, align 8, !tbaa !12
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.TfLiteTensor, ptr %75, i32 0, i32 12
  %77 = getelementptr inbounds %struct.TfLiteQuantization, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !16
  call void (ptr, ptr, ...) %73(ptr noundef %74, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 59, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef %78, i32 noundef 1)
  br label %79

79:                                               ; preds = %70
  br label %80

80:                                               ; preds = %79
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %215

81:                                               ; preds = %63
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.TfLiteTensor, ptr %84, i32 0, i32 12
  %86 = getelementptr inbounds %struct.TfLiteQuantization, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !24
  store ptr %87, ptr %10, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %83
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = icmp ne ptr %89, null
  br i1 %90, label %99, label %91

91:                                               ; preds = %88
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.TfLiteContext, ptr %93, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) %95(ptr noundef %96, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 62, ptr noundef @.str.8)
  br label %97

97:                                               ; preds = %92
  br label %98

98:                                               ; preds = %97
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %214

99:                                               ; preds = %88
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TfLiteAffineQuantization, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !25
  %106 = icmp ne ptr %105, null
  br i1 %106, label %115, label %107

107:                                              ; preds = %102
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.TfLiteContext, ptr %109, i32 0, i32 5
  %111 = load ptr, ptr %110, align 8, !tbaa !12
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) %111(ptr noundef %112, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 63, ptr noundef @.str.9)
  br label %113

113:                                              ; preds = %108
  br label %114

114:                                              ; preds = %113
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %214

115:                                              ; preds = %102
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.TfLiteAffineQuantization, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !25
  %122 = getelementptr inbounds %struct.TfLiteFloatArray, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !27
  %124 = icmp eq i32 %123, 1
  br i1 %124, label %133, label %125

125:                                              ; preds = %118
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.TfLiteContext, ptr %127, i32 0, i32 5
  %129 = load ptr, ptr %128, align 8, !tbaa !12
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) %129(ptr noundef %130, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 64, ptr noundef @.str.10)
  br label %131

131:                                              ; preds = %126
  br label %132

132:                                              ; preds = %131
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %214

133:                                              ; preds = %118
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.TfLiteTensor, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !28
  %140 = icmp eq i32 %139, 1
  br i1 %140, label %159, label %141

141:                                              ; preds = %136
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.TfLiteTensor, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %143, align 8, !tbaa !28
  %145 = icmp eq i32 %144, 7
  br i1 %145, label %159, label %146

146:                                              ; preds = %141
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.TfLiteTensor, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 8, !tbaa !28
  %150 = icmp eq i32 %149, 9
  br i1 %150, label %159, label %151

151:                                              ; preds = %146
  br label %152

152:                                              ; preds = %151
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.TfLiteContext, ptr %153, i32 0, i32 5
  %155 = load ptr, ptr %154, align 8, !tbaa !12
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) %155(ptr noundef %156, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 68, ptr noundef @.str.11)
  br label %157

157:                                              ; preds = %152
  br label %158

158:                                              ; preds = %157
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %214

159:                                              ; preds = %146, %141, %136
  br label %160

160:                                              ; preds = %159
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.TfLiteTensor, ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !28
  %166 = icmp eq i32 %165, 3
  br i1 %166, label %180, label %167

167:                                              ; preds = %162
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.TfLiteTensor, ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 8, !tbaa !28
  %171 = icmp eq i32 %170, 9
  br i1 %171, label %180, label %172

172:                                              ; preds = %167
  br label %173

173:                                              ; preds = %172
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.TfLiteContext, ptr %174, i32 0, i32 5
  %176 = load ptr, ptr %175, align 8, !tbaa !12
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) %176(ptr noundef %177, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 70, ptr noundef @.str.12)
  br label %178

178:                                              ; preds = %173
  br label %179

179:                                              ; preds = %178
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %214

180:                                              ; preds = %167, %162
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.TfLiteTensor, ptr %183, i32 0, i32 0
  %185 = load i32, ptr %184, align 8, !tbaa !28
  %186 = icmp eq i32 %185, 7
  br i1 %186, label %192, label %187

187:                                              ; preds = %182
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.TfLiteTensor, ptr %188, i32 0, i32 0
  %190 = load i32, ptr %189, align 8, !tbaa !28
  %191 = icmp eq i32 %190, 9
  br i1 %191, label %192, label %213

192:                                              ; preds = %187, %182
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.TfLiteTensor, ptr %193, i32 0, i32 0
  %195 = load i32, ptr %194, align 8, !tbaa !28
  %196 = icmp eq i32 %195, 9
  br i1 %196, label %197, label %213

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.TfLiteTensor, ptr %198, i32 0, i32 3
  %200 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %199, i32 0, i32 0
  %201 = load float, ptr %200, align 8, !tbaa !29
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.TfLiteTensor, ptr %202, i32 0, i32 3
  %204 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %203, i32 0, i32 0
  %205 = load float, ptr %204, align 8, !tbaa !29
  %206 = fdiv float %201, %205
  %207 = fpext float %206 to double
  store double %207, ptr %11, align 8, !tbaa !30
  %208 = load double, ptr %11, align 8, !tbaa !30
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.tflite::ops::micro::quantize::OpData", ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %"struct.tflite::ops::micro::quantize::OpData", ptr %211, i32 0, i32 1
  call void @_ZN6tflite18QuantizeMultiplierEdPiS0_(double noundef %208, ptr noundef %210, ptr noundef %212)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %213

213:                                              ; preds = %197, %192, %187
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %214

214:                                              ; preds = %213, %179, %158, %132, %114, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %215

215:                                              ; preds = %214, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %216

216:                                              ; preds = %215, %53, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %217 = load i32, ptr %3, align 4
  ret i32 %217
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef, ptr noundef, i32 noundef) #3

declare void @_ZN6tflite18QuantizeMultiplierEdPiS0_(double noundef, ptr noundef, ptr noundef) #4

attributes #0 = { noreturn nounwind "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 = { 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 #3 = { 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 #4 = { "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 = { noreturn nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTS10TfLiteNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 40}
!13 = !{!"_ZTS13TfLiteContext", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !15, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152}
!14 = !{!"long", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!17, !23, i64 80}
!17 = !{!"_ZTS12TfLiteTensor", !18, i64 0, !7, i64 8, !6, i64 16, !19, i64 24, !21, i64 32, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !15, i64 76, !15, i64 77, !22, i64 80, !6, i64 96, !6, i64 104}
!18 = !{!"_ZTS10TfLiteType", !7, i64 0}
!19 = !{!"_ZTS24TfLiteQuantizationParams", !20, i64 0, !11, i64 4}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTS20TfLiteAllocationType", !7, i64 0}
!22 = !{!"_ZTS18TfLiteQuantization", !23, i64 0, !6, i64 8}
!23 = !{!"_ZTS22TfLiteQuantizationType", !7, i64 0}
!24 = !{!17, !6, i64 88}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTS24TfLiteAffineQuantization", !6, i64 0, !6, i64 8, !11, i64 16}
!27 = !{!11, !11, i64 0}
!28 = !{!17, !18, i64 0}
!29 = !{!17, !20, i64 24}
!30 = !{!31, !31, i64 0}
!31 = !{!"double", !7, i64 0}


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

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [136 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN6tflite3ops5micro8quantize7PrepareEP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %1, i64 32
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %5, label %6

5:                                                ; preds = %2
  tail call void @abort() #4
  unreachable

6:                                                ; preds = %2
  %7 = tail call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef nonnull %1)
  %.not52 = icmp eq i32 %7, 1
  br i1 %.not52, label %12, label %8

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = tail call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef nonnull %1)
  tail call void (ptr, ptr, ...) %10(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 50, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef %11, i32 noundef 1)
  br label %64

12:                                               ; preds = %6
  %13 = tail call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef nonnull %1)
  %.not53 = icmp eq i32 %13, 1
  br i1 %.not53, label %18, label %14

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = tail call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef nonnull %1)
  tail call void (ptr, ptr, ...) %16(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 51, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef %17, i32 noundef 1)
  br label %64

18:                                               ; preds = %12
  %19 = tail call noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef %0, ptr noundef nonnull %1, i32 noundef 0)
  %20 = tail call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %0, ptr noundef nonnull %1, i32 noundef 0)
  %21 = getelementptr inbounds i8, ptr %20, i64 80
  %22 = load i32, ptr %21, align 8, !tbaa !15
  %.not54 = icmp eq i32 %22, 1
  br i1 %.not54, label %26, label %23

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %0, i64 40
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  tail call void (ptr, ptr, ...) %25(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 59, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef %22, i32 noundef 1)
  br label %64

26:                                               ; preds = %18
  %27 = getelementptr inbounds i8, ptr %20, i64 88
  %28 = load ptr, ptr %27, align 8, !tbaa !23
  %.not55 = icmp eq ptr %28, null
  br i1 %.not55, label %29, label %32

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  tail call void (ptr, ptr, ...) %31(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 62, ptr noundef nonnull @.str.8)
  br label %64

32:                                               ; preds = %26
  %33 = load ptr, ptr %28, align 8, !tbaa !24
  %.not56 = icmp eq ptr %33, null
  br i1 %.not56, label %34, label %37

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  tail call void (ptr, ptr, ...) %36(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 63, ptr noundef nonnull @.str.9)
  br label %64

37:                                               ; preds = %32
  %38 = load i32, ptr %33, align 4, !tbaa !26
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %43, label %40

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 40
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  tail call void (ptr, ptr, ...) %42(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 64, ptr noundef nonnull @.str.10)
  br label %64

43:                                               ; preds = %37
  %44 = load i32, ptr %19, align 8, !tbaa !27
  switch i32 %44, label %45 [
    i32 1, label %48
    i32 7, label %48
    i32 9, label %48
  ]

45:                                               ; preds = %43
  %46 = getelementptr inbounds i8, ptr %0, i64 40
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  tail call void (ptr, ptr, ...) %47(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 68, ptr noundef nonnull @.str.11)
  br label %64

48:                                               ; preds = %43, %43, %43
  %49 = load i32, ptr %20, align 8, !tbaa !27
  switch i32 %49, label %50 [
    i32 3, label %53
    i32 9, label %53
  ]

50:                                               ; preds = %48
  %51 = getelementptr inbounds i8, ptr %0, i64 40
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  tail call void (ptr, ptr, ...) %52(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 70, ptr noundef nonnull @.str.12)
  br label %64

53:                                               ; preds = %48, %48
  switch i32 %44, label %64 [
    i32 7, label %54
    i32 9, label %54
  ]

54:                                               ; preds = %53, %53
  %55 = icmp eq i32 %49, 9
  br i1 %55, label %56, label %64

56:                                               ; preds = %54
  %57 = getelementptr inbounds i8, ptr %19, i64 24
  %58 = load float, ptr %57, align 8, !tbaa !28
  %59 = getelementptr inbounds i8, ptr %20, i64 24
  %60 = load float, ptr %59, align 8, !tbaa !28
  %61 = fdiv float %58, %60
  %62 = fpext float %61 to double
  %63 = getelementptr inbounds i8, ptr %4, i64 4
  tail call void @_ZN6tflite18QuantizeMultiplierEdPiS0_(double noundef %62, ptr noundef nonnull %4, ptr noundef nonnull %63)
  br label %64

64:                                               ; preds = %23, %54, %56, %53, %50, %45, %40, %34, %29, %14, %8
  %.2 = phi i32 [ 1, %8 ], [ 1, %14 ], [ 1, %23 ], [ 1, %50 ], [ 1, %45 ], [ 1, %40 ], [ 1, %34 ], [ 1, %29 ], [ 0, %53 ], [ 0, %56 ], [ 0, %54 ]
  ret i32 %.2
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @_ZN6tflite18QuantizeMultiplierEdPiS0_(double noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { noreturn nounwind "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 = { 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 = { noreturn 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, !7, i64 32}
!6 = !{!"_ZTS10TfLiteNode", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !7, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 40}
!12 = !{!"_ZTS13TfLiteContext", !13, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !7, i64 80, !7, i64 88, !14, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152}
!13 = !{!"long", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!16, !22, i64 80}
!16 = !{!"_ZTS12TfLiteTensor", !17, i64 0, !8, i64 8, !7, i64 16, !18, i64 24, !20, i64 32, !13, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !14, i64 76, !14, i64 77, !21, i64 80, !7, i64 96, !7, i64 104}
!17 = !{!"_ZTS10TfLiteType", !8, i64 0}
!18 = !{!"_ZTS24TfLiteQuantizationParams", !19, i64 0, !10, i64 4}
!19 = !{!"float", !8, i64 0}
!20 = !{!"_ZTS20TfLiteAllocationType", !8, i64 0}
!21 = !{!"_ZTS18TfLiteQuantization", !22, i64 0, !7, i64 8}
!22 = !{!"_ZTS22TfLiteQuantizationType", !8, i64 0}
!23 = !{!16, !7, i64 88}
!24 = !{!25, !7, i64 0}
!25 = !{!"_ZTS24TfLiteAffineQuantization", !7, i64 0, !7, i64 8, !10, i64 16}
!26 = !{!10, !10, i64 0}
!27 = !{!16, !17, i64 0}
!28 = !{!16, !19, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass