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

; 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.tflite::StridedSliceParams" = type { i8, [5 x i32], i8, [5 x i32], i8, [5 x i32], i16, i16, i16, i16, i16 }
%"class.tflite::RuntimeShape" = type { i32, %union.anon }
%union.anon = type { ptr, [16 x i8] }
%"struct.tflite::ops::micro::strided_slice::StridedSliceContext" = type <{ ptr, ptr, ptr, ptr, ptr, ptr, i32, [4 x i8] }>
%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.TfLiteContext = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.TfLiteStridedSliceParams = type { i32, i32, i32, i32, i32 }
%struct.TfLiteIntArray = type { i32, [0 x i32] }

@.str = external hidden unnamed_addr constant [173 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [141 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6tflite3ops5micro13strided_slice23BuildStridedSliceParamsEPNS2_19StridedSliceContextE(ptr dead_on_unwind noalias writable sret(%"struct.tflite::StridedSliceParams") align 4, ptr noundef) #0

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

; 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 @_ZN6tflite3ops5micro13strided_slice15CheckOutputSizeEP13TfLiteContextPNS2_19StridedSliceContextE(ptr noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %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 %"struct.tflite::StridedSliceParams", align 4
  %9 = alloca %"class.tflite::RuntimeShape", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = 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) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.tflite::ops::micro::strided_slice::StridedSliceContext", ptr %19, i32 0, i32 5
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.TfLiteTensor, ptr %21, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  store ptr %23, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 84, ptr %8) #5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN6tflite3ops5micro13strided_slice23BuildStridedSliceParamsEPNS2_19StridedSliceContextE(ptr dead_on_unwind writable sret(%"struct.tflite::StridedSliceParams") align 4 %8, ptr noundef %24)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.tflite::ops::micro::strided_slice::StridedSliceContext", ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !23
  call void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %9, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !22
  br label %28

28:                                               ; preds = %154, %2
  %29 = load i32, ptr %10, align 4, !tbaa !22
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.tflite::ops::micro::strided_slice::StridedSliceContext", ptr %30, i32 0, i32 6
  %32 = load i32, ptr %31, align 8, !tbaa !24
  %33 = icmp slt i32 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  store i32 2, ptr %11, align 4
  br label %160

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.tflite::ops::micro::strided_slice::StridedSliceContext", ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !25
  %39 = invoke noundef ptr @_ZN6tflite13GetTensorDataIiEEPKT_PK12TfLiteTensor(ptr noundef %38)
          to label %40 unwind label %57

40:                                               ; preds = %35
  %41 = load i32, ptr %10, align 4, !tbaa !22
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %39, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !22
  store i32 %44, ptr %12, align 4, !tbaa !22
  br label %45

45:                                               ; preds = %40
  %46 = load i32, ptr %12, align 4, !tbaa !22
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %61, label %48

48:                                               ; preds = %45
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.TfLiteContext, ptr %50, i32 0, i32 5
  %52 = load ptr, ptr %51, align 8, !tbaa !26
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void (ptr, ptr, ...) %52(ptr noundef %53, ptr noundef @.str)
          to label %54 unwind label %57

54:                                               ; preds = %49
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  store i32 1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %151

57:                                               ; preds = %49, %35
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %13, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %14, align 4
  br label %159

61:                                               ; preds = %45
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %64 = load i32, ptr %10, align 4, !tbaa !22
  %65 = invoke noundef i32 @_ZN6tflite13strided_slice12StartForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEi(ptr noundef nonnull align 4 dereferenceable(84) %8, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %64)
          to label %66 unwind label %86

66:                                               ; preds = %63
  store i32 %65, ptr %15, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %67 = load i32, ptr %10, align 4, !tbaa !22
  %68 = load i32, ptr %15, align 4, !tbaa !22
  %69 = invoke noundef i32 @_ZN6tflite13strided_slice11StopForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEii(ptr noundef nonnull align 4 dereferenceable(84) %8, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %67, i32 noundef %68)
          to label %70 unwind label %90

70:                                               ; preds = %66
  store i32 %69, ptr %16, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.tflite::ops::micro::strided_slice::StridedSliceContext", ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !28
  %74 = getelementptr inbounds %struct.TfLiteStridedSliceParams, ptr %73, i32 0, i32 4
  %75 = load i32, ptr %74, align 4, !tbaa !29
  %76 = load i32, ptr %10, align 4, !tbaa !22
  %77 = shl i32 1, %76
  %78 = and i32 %75, %77
  %79 = icmp ne i32 %78, 0
  %80 = zext i1 %79 to i8
  store i8 %80, ptr %17, align 1, !tbaa !31
  %81 = load i8, ptr %17, align 1, !tbaa !31, !range !32, !noundef !33
  %82 = trunc i8 %81 to i1
  br i1 %82, label %83, label %94

83:                                               ; preds = %70
  %84 = load i32, ptr %15, align 4, !tbaa !22
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %16, align 4, !tbaa !22
  br label %94

86:                                               ; preds = %63
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %13, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %14, align 4
  br label %158

90:                                               ; preds = %66
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %13, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %14, align 4
  br label %157

94:                                               ; preds = %83, %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %95 = load i32, ptr %16, align 4, !tbaa !22
  %96 = load i32, ptr %15, align 4, !tbaa !22
  %97 = sub nsw i32 %95, %96
  %98 = sitofp i32 %97 to float
  %99 = load i32, ptr %12, align 4, !tbaa !22
  %100 = sitofp i32 %99 to float
  %101 = fdiv float %98, %100
  %102 = invoke noundef float @_ZSt4ceilf(float noundef %101)
          to label %103 unwind label %140

103:                                              ; preds = %94
  %104 = fptosi float %102 to i32
  store i32 %104, ptr %18, align 4, !tbaa !22
  %105 = load i32, ptr %18, align 4, !tbaa !22
  %106 = icmp slt i32 %105, 0
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  br label %110

108:                                              ; preds = %103
  %109 = load i32, ptr %18, align 4, !tbaa !22
  br label %110

110:                                              ; preds = %108, %107
  %111 = phi i32 [ 0, %107 ], [ %109, %108 ]
  store i32 %111, ptr %18, align 4, !tbaa !22
  %112 = load i8, ptr %17, align 1, !tbaa !31, !range !32, !noundef !33
  %113 = trunc i8 %112 to i1
  br i1 %113, label %149, label %114

114:                                              ; preds = %110
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.TfLiteIntArray, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %7, align 4, !tbaa !22
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [0 x i32], ptr %117, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !22
  %122 = load i32, ptr %18, align 4, !tbaa !22
  %123 = icmp ne i32 %121, %122
  br i1 %123, label %124, label %144

124:                                              ; preds = %115
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.TfLiteContext, ptr %126, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !26
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.TfLiteIntArray, ptr %130, i32 0, i32 1
  %132 = load i32, ptr %7, align 4, !tbaa !22
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [0 x i32], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !22
  %136 = load i32, ptr %18, align 4, !tbaa !22
  invoke void (ptr, ptr, ...) %128(ptr noundef %129, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 115, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef %135, i32 noundef %136)
          to label %137 unwind label %140

137:                                              ; preds = %125
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  store i32 1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

140:                                              ; preds = %125, %94
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %13, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %157

144:                                              ; preds = %115
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %7, align 4, !tbaa !22
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %7, align 4, !tbaa !22
  br label %149

149:                                              ; preds = %146, %110
  store i32 0, ptr %11, align 4
  br label %150

150:                                              ; preds = %149, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %151

151:                                              ; preds = %150, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %152 = load i32, ptr %11, align 4
  switch i32 %152, label %160 [
    i32 0, label %153
  ]

153:                                              ; preds = %151
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %10, align 4, !tbaa !22
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %10, align 4, !tbaa !22
  br label %28, !llvm.loop !34

157:                                              ; preds = %140, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %158

158:                                              ; preds = %157, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %159

159:                                              ; preds = %158, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %191

160:                                              ; preds = %151, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %161 = load i32, ptr %11, align 4
  switch i32 %161, label %189 [
    i32 2, label %162
  ]

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.TfLiteIntArray, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 4, !tbaa !22
  %167 = load i32, ptr %7, align 4, !tbaa !22
  %168 = icmp ne i32 %166, %167
  br i1 %168, label %169, label %186

169:                                              ; preds = %163
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.TfLiteContext, ptr %171, i32 0, i32 5
  %173 = load ptr, ptr %172, align 8, !tbaa !26
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.TfLiteIntArray, ptr %175, i32 0, i32 0
  %177 = load i32, ptr %176, align 4, !tbaa !22
  %178 = load i32, ptr %7, align 4, !tbaa !22
  invoke void (ptr, ptr, ...) %173(ptr noundef %174, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 119, ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef %177, i32 noundef %178)
          to label %179 unwind label %182

179:                                              ; preds = %170
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  store i32 1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %189

182:                                              ; preds = %170
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %13, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %14, align 4
  br label %191

186:                                              ; preds = %163
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %189

189:                                              ; preds = %188, %181, %160
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 84, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %190 = load i32, ptr %3, align 4
  ret i32 %190

191:                                              ; preds = %182, %159
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 84, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %192

192:                                              ; preds = %191
  %193 = load ptr, ptr %13, align 8
  %194 = load i32, ptr %14, align 4
  %195 = insertvalue { ptr, i32 } poison, ptr %193, 0
  %196 = insertvalue { ptr, i32 } %195, i32 %194, 1
  resume { ptr, i32 } %196
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind noalias writable sret(%"class.tflite::RuntimeShape") align 8, ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6tflite13strided_slice12StartForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEi(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6tflite13strided_slice11StopForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEii(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4ceilf(float noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 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 = { 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 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

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

%"struct.tflite::StridedSliceParams" = type { i8, [5 x i32], i8, [5 x i32], i8, [5 x i32], i16, i16, i16, i16, i16 }
%"class.tflite::RuntimeShape" = type { i32, %union.anon }
%union.anon = type { ptr, [16 x i8] }

@.str = external hidden unnamed_addr constant [173 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [141 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6tflite3ops5micro13strided_slice23BuildStridedSliceParamsEPNS2_19StridedSliceContextE(ptr dead_on_unwind noalias writable sret(%"struct.tflite::StridedSliceParams") align 4, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite13GetTensorDataIiEEPKT_PK12TfLiteTensor(ptr 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) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6tflite3ops5micro13strided_slice15CheckOutputSizeEP13TfLiteContextPNS2_19StridedSliceContextE(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.tflite::StridedSliceParams", align 4
  %4 = alloca %"class.tflite::RuntimeShape", align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 40
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %3) #6
  call void @_ZN6tflite3ops5micro13strided_slice23BuildStridedSliceParamsEPNS2_19StridedSliceContextE(ptr dead_on_unwind nonnull writable sret(%"struct.tflite::StridedSliceParams") align 4 %3, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !21
  call void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %4, ptr noundef %10)
  %11 = getelementptr inbounds i8, ptr %1, i64 48
  %12 = load i32, ptr %11, align 8, !tbaa !22
  %.not6883 = icmp sgt i32 %12, 0
  br i1 %.not6883, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %14 = getelementptr inbounds i8, ptr %8, i64 4
  br label %15

15:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %.04585 = phi i32 [ 0, %.lr.ph ], [ %.348.ph, %56 ]
  %16 = load ptr, ptr %13, align 8, !tbaa !23
  %17 = call noundef ptr @_ZN6tflite13GetTensorDataIiEEPKT_PK12TfLiteTensor(ptr noundef %16)
  %18 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv
  %19 = load i32, ptr %18, align 4, !tbaa !24
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %20, label %25

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  %22 = load ptr, ptr %21, align 8, !tbaa !25
  invoke void (ptr, ptr, ...) %22(ptr noundef nonnull %0, ptr noundef nonnull @.str)
          to label %.thread77 unwind label %23

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %65

25:                                               ; preds = %15
  %26 = trunc nuw nsw i64 %indvars.iv to i32
  %27 = invoke noundef i32 @_ZN6tflite13strided_slice12StartForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEi(ptr noundef nonnull align 4 dereferenceable(84) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %26)
          to label %28 unwind label %41

28:                                               ; preds = %25
  %29 = call noundef i32 @_ZN6tflite13strided_slice11StopForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEii(ptr noundef nonnull align 4 dereferenceable(84) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %26, i32 noundef %27)
  %30 = load ptr, ptr %1, align 8, !tbaa !27
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load i32, ptr %31, align 4, !tbaa !28
  %33 = shl nuw i32 1, %26
  %34 = and i32 %32, %33
  %.not64 = icmp eq i32 %34, 0
  %35 = add nsw i32 %27, 1
  %spec.select = select i1 %.not64, i32 %29, i32 %35
  %36 = sub nsw i32 %spec.select, %27
  %37 = sitofp i32 %36 to float
  %38 = sitofp i32 %19 to float
  %39 = fdiv float %37, %38
  %40 = call noundef float @_ZSt4ceilf(float noundef %39)
  br i1 %.not64, label %43, label %56

41:                                               ; preds = %25
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %65

43:                                               ; preds = %28
  %44 = fptosi float %40 to i32
  %45 = call i32 @llvm.smax.i32(i32 %44, i32 0)
  %46 = sext i32 %.04585 to i64
  %47 = getelementptr inbounds [0 x i32], ptr %14, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !24
  %.not65 = icmp eq i32 %48, %45
  br i1 %.not65, label %54, label %49

49:                                               ; preds = %43
  %50 = getelementptr inbounds i8, ptr %0, i64 40
  %51 = load ptr, ptr %50, align 8, !tbaa !25
  invoke void (ptr, ptr, ...) %51(ptr noundef nonnull %0, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 115, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef %48, i32 noundef %45)
          to label %.thread77 unwind label %52

52:                                               ; preds = %49
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %65

54:                                               ; preds = %43
  %55 = add nsw i32 %.04585, 1
  br label %56

56:                                               ; preds = %54, %28
  %.348.ph = phi i32 [ %55, %54 ], [ %.04585, %28 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %57 = load i32, ptr %11, align 8, !tbaa !22
  %58 = sext i32 %57 to i64
  %.not68 = icmp slt i64 %indvars.iv.next, %58
  br i1 %.not68, label %15, label %._crit_edge, !llvm.loop !30

._crit_edge:                                      ; preds = %56, %2
  %.045.lcssa = phi i32 [ 0, %2 ], [ %.348.ph, %56 ]
  %59 = load i32, ptr %8, align 4, !tbaa !24
  %.not69 = icmp eq i32 %59, %.045.lcssa
  br i1 %.not69, label %.thread77, label %60

60:                                               ; preds = %._crit_edge
  %61 = getelementptr inbounds i8, ptr %0, i64 40
  %62 = load ptr, ptr %61, align 8, !tbaa !25
  invoke void (ptr, ptr, ...) %62(ptr noundef nonnull %0, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 119, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef %59, i32 noundef %.045.lcssa)
          to label %.thread77 unwind label %63

63:                                               ; preds = %60
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %65

.thread77:                                        ; preds = %49, %20, %._crit_edge, %60
  %.4 = phi i32 [ 1, %60 ], [ 0, %._crit_edge ], [ 1, %20 ], [ 1, %49 ]
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %3) #6
  ret i32 %.4

65:                                               ; preds = %23, %52, %41, %63
  %.pn70 = phi { ptr, i32 } [ %64, %63 ], [ %24, %23 ], [ %53, %52 ], [ %42, %41 ]
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn70
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind noalias writable sret(%"class.tflite::RuntimeShape") align 8, ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6tflite13strided_slice12StartForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEi(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6tflite13strided_slice11StopForAxisERKNS_18StridedSliceParamsERKNS_12RuntimeShapeEii(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4ceilf(float noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 40}
!6 = !{!"_ZTSN6tflite3ops5micro13strided_slice19StridedSliceContextE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48}
!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 16}
!12 = !{!"_ZTS12TfLiteTensor", !13, i64 0, !8, i64 8, !7, i64 16, !14, i64 24, !16, i64 32, !17, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !18, i64 76, !18, i64 77, !19, i64 80, !7, i64 96, !7, i64 104}
!13 = !{!"_ZTS10TfLiteType", !8, i64 0}
!14 = !{!"_ZTS24TfLiteQuantizationParams", !15, i64 0, !10, i64 4}
!15 = !{!"float", !8, i64 0}
!16 = !{!"_ZTS20TfLiteAllocationType", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"_ZTS18TfLiteQuantization", !20, i64 0, !7, i64 8}
!20 = !{!"_ZTS22TfLiteQuantizationType", !8, i64 0}
!21 = !{!6, !7, i64 8}
!22 = !{!6, !10, i64 48}
!23 = !{!6, !7, i64 32}
!24 = !{!10, !10, i64 0}
!25 = !{!26, !7, i64 40}
!26 = !{!"_ZTS13TfLiteContext", !17, 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, !18, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152}
!27 = !{!6, !7, i64 0}
!28 = !{!29, !10, i64 16}
!29 = !{!"_ZTS24TfLiteStridedSliceParams", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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