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

; 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.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.TfLiteIntArray = type { i32, [0 x i32] }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [132 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 [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6tflite3ops5micro4ceil7PrepareEP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = call noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef %10, ptr noundef %11, i32 noundef 0)
  store ptr %12, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %13, ptr noundef %14, i32 noundef 0)
  store ptr %15, ptr %7, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %2
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef %17)
  %19 = icmp ne i32 %18, 1
  br i1 %19, label %20, label %30

20:                                               ; preds = %16
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.TfLiteContext, ptr %22, i32 0, i32 5
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef %26)
  call void (ptr, ptr, ...) %24(ptr noundef %25, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 33, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef %27, i32 noundef 1)
  br label %28

28:                                               ; preds = %21
  br label %29

29:                                               ; preds = %28
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

30:                                               ; preds = %16
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef %34)
  %36 = icmp ne i32 %35, 1
  br i1 %36, label %37, label %47

37:                                               ; preds = %33
  br label %38

38:                                               ; preds = %37
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.TfLiteContext, ptr %39, i32 0, i32 5
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef %43)
  call void (ptr, ptr, ...) %41(ptr noundef %42, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 34, ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef %44, i32 noundef 1)
  br label %45

45:                                               ; preds = %38
  br label %46

46:                                               ; preds = %45
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

47:                                               ; preds = %33
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.TfLiteTensor, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !14
  %54 = icmp ne i32 %53, 1
  br i1 %54, label %55, label %68

55:                                               ; preds = %50
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.TfLiteContext, ptr %57, i32 0, i32 5
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.TfLiteTensor, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !14
  %64 = call ptr @TfLiteTypeGetName(i32 noundef %63)
  %65 = call ptr @TfLiteTypeGetName(i32 noundef 1)
  call void (ptr, ptr, ...) %59(ptr noundef %60, ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 35, ptr noundef @.str.6, ptr noundef @.str.7, ptr noundef %64, ptr noundef %65)
  br label %66

66:                                               ; preds = %56
  br label %67

67:                                               ; preds = %66
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

68:                                               ; preds = %50
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.TfLiteTensor, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !14
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.TfLiteTensor, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !14
  %78 = icmp ne i32 %74, %77
  br i1 %78, label %79, label %95

79:                                               ; preds = %71
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.TfLiteContext, ptr %81, i32 0, i32 5
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.TfLiteTensor, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !14
  %88 = call ptr @TfLiteTypeGetName(i32 noundef %87)
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.TfLiteTensor, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !14
  %92 = call ptr @TfLiteTypeGetName(i32 noundef %91)
  call void (ptr, ptr, ...) %83(ptr noundef %84, ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 36, ptr noundef @.str.8, ptr noundef @.str.6, ptr noundef %88, ptr noundef %92)
  br label %93

93:                                               ; preds = %80
  br label %94

94:                                               ; preds = %93
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

95:                                               ; preds = %71
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.TfLiteTensor, ptr %99, i32 0, i32 5
  %101 = load i64, ptr %100, align 8, !tbaa !22
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.TfLiteTensor, ptr %102, i32 0, i32 5
  %104 = load i64, ptr %103, align 8, !tbaa !22
  %105 = icmp ne i64 %101, %104
  br i1 %105, label %106, label %120

106:                                              ; preds = %98
  br label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.TfLiteContext, ptr %108, i32 0, i32 5
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.TfLiteTensor, ptr %112, i32 0, i32 5
  %114 = load i64, ptr %113, align 8, !tbaa !22
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.TfLiteTensor, ptr %115, i32 0, i32 5
  %117 = load i64, ptr %116, align 8, !tbaa !22
  call void (ptr, ptr, ...) %110(ptr noundef %111, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 37, ptr noundef @.str.9, ptr noundef @.str.10, i64 noundef %114, i64 noundef %117)
  br label %118

118:                                              ; preds = %107
  br label %119

119:                                              ; preds = %118
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

120:                                              ; preds = %98
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.TfLiteTensor, ptr %124, i32 0, i32 2
  %126 = load ptr, ptr %125, align 8, !tbaa !23
  %127 = getelementptr inbounds %struct.TfLiteIntArray, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 4, !tbaa !24
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.TfLiteTensor, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !23
  %132 = getelementptr inbounds %struct.TfLiteIntArray, ptr %131, i32 0, i32 0
  %133 = load i32, ptr %132, align 4, !tbaa !24
  %134 = icmp ne i32 %128, %133
  br i1 %134, label %135, label %153

135:                                              ; preds = %123
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.TfLiteContext, ptr %137, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.TfLiteTensor, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !23
  %144 = getelementptr inbounds %struct.TfLiteIntArray, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 4, !tbaa !24
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.TfLiteTensor, ptr %146, i32 0, i32 2
  %148 = load ptr, ptr %147, align 8, !tbaa !23
  %149 = getelementptr inbounds %struct.TfLiteIntArray, ptr %148, i32 0, i32 0
  %150 = load i32, ptr %149, align 4, !tbaa !24
  call void (ptr, ptr, ...) %139(ptr noundef %140, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 38, ptr noundef @.str.11, ptr noundef @.str.12, i32 noundef %145, i32 noundef %150)
  br label %151

151:                                              ; preds = %136
  br label %152

152:                                              ; preds = %151
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

153:                                              ; preds = %123
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !24
  br label %156

156:                                              ; preds = %211, %155
  %157 = load i32, ptr %9, align 4, !tbaa !24
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.TfLiteTensor, ptr %158, i32 0, i32 2
  %160 = load ptr, ptr %159, align 8, !tbaa !23
  %161 = getelementptr inbounds %struct.TfLiteIntArray, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 4, !tbaa !24
  %163 = icmp slt i32 %157, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %156
  store i32 26, ptr %8, align 4
  br label %214

165:                                              ; preds = %156
  br label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.TfLiteTensor, ptr %167, i32 0, i32 2
  %169 = load ptr, ptr %168, align 8, !tbaa !23
  %170 = getelementptr inbounds %struct.TfLiteIntArray, ptr %169, i32 0, i32 1
  %171 = load i32, ptr %9, align 4, !tbaa !24
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [0 x i32], ptr %170, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !24
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.TfLiteTensor, ptr %175, i32 0, i32 2
  %177 = load ptr, ptr %176, align 8, !tbaa !23
  %178 = getelementptr inbounds %struct.TfLiteIntArray, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %9, align 4, !tbaa !24
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [0 x i32], ptr %178, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !24
  %183 = icmp ne i32 %174, %182
  br i1 %183, label %184, label %208

184:                                              ; preds = %166
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.TfLiteContext, ptr %186, i32 0, i32 5
  %188 = load ptr, ptr %187, align 8, !tbaa !9
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.TfLiteTensor, ptr %190, i32 0, i32 2
  %192 = load ptr, ptr %191, align 8, !tbaa !23
  %193 = getelementptr inbounds %struct.TfLiteIntArray, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %9, align 4, !tbaa !24
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [0 x i32], ptr %193, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !24
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.TfLiteTensor, ptr %198, i32 0, i32 2
  %200 = load ptr, ptr %199, align 8, !tbaa !23
  %201 = getelementptr inbounds %struct.TfLiteIntArray, ptr %200, i32 0, i32 1
  %202 = load i32, ptr %9, align 4, !tbaa !24
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [0 x i32], ptr %201, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !24
  call void (ptr, ptr, ...) %188(ptr noundef %189, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 40, ptr noundef @.str.13, ptr noundef @.str.14, i32 noundef %197, i32 noundef %205)
  br label %206

206:                                              ; preds = %185
  br label %207

207:                                              ; preds = %206
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %214

208:                                              ; preds = %166
  br label %209

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209
  br label %211

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

214:                                              ; preds = %207, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %215 = load i32, ptr %8, align 4
  switch i32 %215, label %217 [
    i32 26, label %216
  ]

216:                                              ; preds = %214
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %217

217:                                              ; preds = %216, %214, %152, %119, %94, %67, %46, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %218 = load i32, ptr %3, align 4
  ret i32 %218
}

; 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 noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef, ptr noundef, i32 noundef) #2

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

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

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

declare ptr @TfLiteTypeGetName(i32 noundef) #3

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

attributes #0 = { 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 #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 = { 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 40}
!10 = !{!"_ZTS13TfLiteContext", !11, 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, !12, i64 72, !6, i64 80, !6, i64 88, !13, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTS12TfLiteTensor", !16, i64 0, !7, i64 8, !6, i64 16, !17, i64 24, !19, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !13, i64 76, !13, i64 77, !20, i64 80, !6, i64 96, !6, i64 104}
!16 = !{!"_ZTS10TfLiteType", !7, i64 0}
!17 = !{!"_ZTS24TfLiteQuantizationParams", !18, i64 0, !12, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTS20TfLiteAllocationType", !7, i64 0}
!20 = !{!"_ZTS18TfLiteQuantization", !21, i64 0, !6, i64 8}
!21 = !{!"_ZTS22TfLiteQuantizationType", !7, i64 0}
!22 = !{!15, !11, i64 40}
!23 = !{!15, !6, i64 16}
!24 = !{!12, !12, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; 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 [132 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 [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN6tflite3ops5micro4ceil7PrepareEP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef %0, ptr noundef %1, i32 noundef 0)
  %4 = tail call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %0, ptr noundef %1, i32 noundef 0)
  %5 = tail call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef %1)
  %.not = icmp eq i32 %5, 1
  br i1 %.not, label %10, label %6

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

10:                                               ; preds = %2
  %11 = tail call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef %1)
  %.not59 = icmp eq i32 %11, 1
  br i1 %.not59, label %16, label %12

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = tail call noundef i32 @_ZN6tflite10NumOutputsEPK10TfLiteNode(ptr noundef %1)
  tail call void (ptr, ptr, ...) %14(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 34, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef %15, i32 noundef 1)
  br label %61

16:                                               ; preds = %10
  %17 = load i32, ptr %3, align 8, !tbaa !13
  %.not60 = icmp eq i32 %17, 1
  br i1 %.not60, label %23, label %18

18:                                               ; preds = %16
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = tail call ptr @TfLiteTypeGetName(i32 noundef %17)
  %22 = tail call ptr @TfLiteTypeGetName(i32 noundef 1)
  tail call void (ptr, ptr, ...) %20(ptr noundef %0, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 35, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, ptr noundef %21, ptr noundef %22)
  br label %61

23:                                               ; preds = %16
  %24 = load i32, ptr %4, align 8, !tbaa !13
  %.not61 = icmp eq i32 %24, 1
  br i1 %.not61, label %31, label %25

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = tail call ptr @TfLiteTypeGetName(i32 noundef %24)
  %29 = load i32, ptr %3, align 8, !tbaa !13
  %30 = tail call ptr @TfLiteTypeGetName(i32 noundef %29)
  tail call void (ptr, ptr, ...) %27(ptr noundef %0, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 36, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.6, ptr noundef %28, ptr noundef %30)
  br label %61

31:                                               ; preds = %23
  %32 = getelementptr inbounds i8, ptr %4, i64 40
  %33 = load i64, ptr %32, align 8, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %3, i64 40
  %35 = load i64, ptr %34, align 8, !tbaa !21
  %.not62 = icmp eq i64 %33, %35
  br i1 %.not62, label %39, label %36

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %0, i64 40
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  tail call void (ptr, ptr, ...) %38(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 37, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, i64 noundef %33, i64 noundef %35)
  br label %61

39:                                               ; preds = %31
  %40 = getelementptr inbounds i8, ptr %4, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !22
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %3, i64 16
  %44 = load ptr, ptr %43, align 8, !tbaa !22
  %45 = load i32, ptr %44, align 4, !tbaa !23
  %.not63 = icmp eq i32 %42, %45
  br i1 %.not63, label %.preheader, label %51

.preheader:                                       ; preds = %39
  %.not6569 = icmp sgt i32 %42, 0
  br i1 %.not6569, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %46 = getelementptr inbounds i8, ptr %41, i64 4
  %47 = getelementptr inbounds i8, ptr %44, i64 4
  %48 = zext nneg i32 %42 to i64
  %wide.trip.count = zext nneg i32 %42 to i64
  %49 = load i32, ptr %46, align 4, !tbaa !23
  %50 = load i32, ptr %47, align 4, !tbaa !23
  %.not6484 = icmp eq i32 %49, %50
  br i1 %.not6484, label %.lr.ph86, label %._crit_edge

51:                                               ; preds = %39
  %52 = getelementptr inbounds i8, ptr %0, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  tail call void (ptr, ptr, ...) %53(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 38, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i32 noundef %42, i32 noundef %45)
  br label %61

.lr.ph86:                                         ; preds = %.lr.ph, %54
  %indvars.iv85 = phi i64 [ %indvars.iv.next, %54 ], [ 0, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv85, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit.loopexit, label %54, !llvm.loop !24

54:                                               ; preds = %.lr.ph86
  %55 = getelementptr inbounds [0 x i32], ptr %46, i64 0, i64 %indvars.iv.next
  %56 = load i32, ptr %55, align 4, !tbaa !23
  %57 = getelementptr inbounds [0 x i32], ptr %47, i64 0, i64 %indvars.iv.next
  %58 = load i32, ptr %57, align 4, !tbaa !23
  %.not64 = icmp eq i32 %56, %58
  br i1 %.not64, label %.lr.ph86, label %._crit_edge.loopexit, !llvm.loop !24

._crit_edge.loopexit:                             ; preds = %54
  %.not65.le = icmp ult i64 %indvars.iv.next, %48
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph
  %.not6571.lcssa = phi i1 [ true, %.lr.ph ], [ %.not65.le, %._crit_edge.loopexit ]
  %.lcssa81 = phi i32 [ %49, %.lr.ph ], [ %56, %._crit_edge.loopexit ]
  %.lcssa = phi i32 [ %50, %.lr.ph ], [ %58, %._crit_edge.loopexit ]
  %59 = getelementptr inbounds i8, ptr %0, i64 40
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  tail call void (ptr, ptr, ...) %60(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 40, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, i32 noundef %.lcssa81, i32 noundef %.lcssa)
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %.lr.ph86
  %.not65.le95 = icmp ult i64 %indvars.iv.next, %48
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.preheader, %._crit_edge
  %.not6567 = phi i1 [ %.not6571.lcssa, %._crit_edge ], [ false, %.preheader ], [ %.not65.le95, %.loopexit.loopexit ]
  %spec.select = zext i1 %.not6567 to i32
  br label %61

61:                                               ; preds = %.loopexit, %51, %36, %25, %18, %12, %6
  %.1 = phi i32 [ 1, %6 ], [ 1, %12 ], [ 1, %18 ], [ 1, %25 ], [ 1, %36 ], [ 1, %51 ], [ %spec.select, %.loopexit ]
  ret i32 %.1
}

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

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

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

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

declare ptr @TfLiteTypeGetName(i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { 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 #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" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 40}
!6 = !{!"_ZTS13TfLiteContext", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !10, i64 80, !10, i64 88, !12, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS12TfLiteTensor", !15, i64 0, !8, i64 8, !10, i64 16, !16, i64 24, !18, i64 32, !7, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !12, i64 76, !12, i64 77, !19, i64 80, !10, i64 96, !10, i64 104}
!15 = !{!"_ZTS10TfLiteType", !8, i64 0}
!16 = !{!"_ZTS24TfLiteQuantizationParams", !17, i64 0, !11, i64 4}
!17 = !{!"float", !8, i64 0}
!18 = !{!"_ZTS20TfLiteAllocationType", !8, i64 0}
!19 = !{!"_ZTS18TfLiteQuantization", !20, i64 0, !10, i64 8}
!20 = !{!"_ZTS22TfLiteQuantizationType", !8, i64 0}
!21 = !{!14, !7, i64 40}
!22 = !{!14, !10, i64 16}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass