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

; 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::ops::micro::activations::(anonymous namespace)::OpData" = type { i32, i32, i32, i32 }
%"class.tflite::RuntimeShape" = type { i32, %union.anon }
%union.anon = type { ptr, [16 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 }

@.str = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6tflite3ops5micro11activations12LogisticEvalEP13TfLiteContextP10TfLiteNode(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 ptr, align 8
  %8 = alloca %"struct.tflite::ops::micro::activations::(anonymous namespace)::OpData", align 4
  %9 = alloca %"class.tflite::RuntimeShape", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.tflite::RuntimeShape", align 8
  %13 = 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) #6
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef %14, ptr noundef %15, i32 noundef 0)
  store ptr %16, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %17, ptr noundef %18, i32 noundef 0)
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef i32 @_ZN6tflite3ops5micro11activations12_GLOBAL__N_125CalculateArithmeticOpDataEP13TfLiteContextP10TfLiteNodePNS3_6OpDataE(ptr noundef %20, ptr noundef %21, ptr noundef %8)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.TfLiteTensor, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %72

27:                                               ; preds = %2
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.TfLiteTensor, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !9
  switch i32 %30, label %56 [
    i32 1, label %31
  ]

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %9, ptr noundef %32)
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = invoke noundef ptr @_ZN6tflite13GetTensorDataIfEEPKT_PK12TfLiteTensor(ptr noundef %33)
          to label %35 unwind label %42

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %12, ptr noundef %36)
          to label %37 unwind label %46

37:                                               ; preds = %35
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = invoke noundef ptr @_ZN6tflite13GetTensorDataIfEEPT_P12TfLiteTensor(ptr noundef %38)
          to label %40 unwind label %50

40:                                               ; preds = %37
  invoke void @_ZN6tflite13reference_ops8LogisticERKNS_12RuntimeShapeEPKfS3_Pf(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %34, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %40
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %133

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %10, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %11, align 4
  br label %55

46:                                               ; preds = %35
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %10, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %11, align 4
  br label %54

50:                                               ; preds = %40, %37
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %10, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %11, align 4
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %54

54:                                               ; preds = %50, %46
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %55

55:                                               ; preds = %54, %42
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %135

56:                                               ; preds = %27
  br label %57

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

70:                                               ; preds = %57
  br label %71

71:                                               ; preds = %70
  store i32 1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %133

72:                                               ; preds = %2
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.TfLiteTensor, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !9
  %76 = icmp eq i32 %75, 9
  br i1 %76, label %77, label %117

77:                                               ; preds = %72
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.TfLiteTensor, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !9
  switch i32 %80, label %101 [
    i32 9, label %81
  ]

81:                                               ; preds = %77
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.TfLiteTensor, ptr %82, i32 0, i32 3
  %84 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 4, !tbaa !22
  %86 = getelementptr inbounds %"struct.tflite::ops::micro::activations::(anonymous namespace)::OpData", ptr %8, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !23
  %88 = getelementptr inbounds %"struct.tflite::ops::micro::activations::(anonymous namespace)::OpData", ptr %8, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !25
  %90 = getelementptr inbounds %"struct.tflite::ops::micro::activations::(anonymous namespace)::OpData", ptr %8, i32 0, i32 3
  %91 = load i32, ptr %90, align 4, !tbaa !26
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.TfLiteTensor, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !27
  %95 = call noundef i64 @_ZN6tflite11NumElementsEPK14TfLiteIntArray(ptr noundef %94)
  %96 = trunc i64 %95 to i32
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPKT_PK12TfLiteTensor(ptr noundef %97)
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPT_P12TfLiteTensor(ptr noundef %99)
  call void @_ZN6tflite21reference_integer_ops8LogisticEiiiiiPKaPa(i32 noundef %85, i32 noundef %87, i32 noundef %89, i32 noundef %91, i32 noundef %96, ptr noundef %98, ptr noundef %100)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %133

101:                                              ; preds = %77
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TfLiteContext, ptr %103, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !20
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.TfLiteTensor, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %108, align 8, !tbaa !9
  %110 = call ptr @TfLiteTypeGetName(i32 noundef %109)
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.TfLiteTensor, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 8, !tbaa !9
  %114 = call ptr @TfLiteTypeGetName(i32 noundef %113)
  call void (ptr, ptr, ...) %105(ptr noundef %106, ptr noundef @.str, ptr noundef %110, ptr noundef %114)
  br label %115

115:                                              ; preds = %102
  br label %116

116:                                              ; preds = %115
  store i32 1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %133

117:                                              ; preds = %72
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.TfLiteContext, ptr %119, i32 0, i32 5
  %121 = load ptr, ptr %120, align 8, !tbaa !20
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.TfLiteTensor, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 8, !tbaa !9
  %126 = call ptr @TfLiteTypeGetName(i32 noundef %125)
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.TfLiteTensor, ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 8, !tbaa !9
  %130 = call ptr @TfLiteTypeGetName(i32 noundef %129)
  call void (ptr, ptr, ...) %121(ptr noundef %122, ptr noundef @.str, ptr noundef %126, ptr noundef %130)
  br label %131

131:                                              ; preds = %118
  br label %132

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

133:                                              ; preds = %132, %116, %81, %71, %41
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %134 = load i32, ptr %3, align 4
  ret i32 %134

135:                                              ; preds = %55
  %136 = load ptr, ptr %10, align 8
  %137 = load i32, ptr %11, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

; 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: mustprogress uwtable
declare hidden noundef i32 @_ZN6tflite3ops5micro11activations12_GLOBAL__N_125CalculateArithmeticOpDataEP13TfLiteContextP10TfLiteNodePNS3_6OpDataE(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite13reference_ops8LogisticERKNS_12RuntimeShapeEPKfS3_Pf(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

; 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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite13GetTensorDataIfEEPT_P12TfLiteTensor(ptr noundef) #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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare ptr @TfLiteTypeGetName(i32 noundef) #5

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite13GetTensorDataIaEEPT_P12TfLiteTensor(ptr noundef) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


; 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::ops::micro::activations::(anonymous namespace)::OpData" = type { i32, i32, i32, i32 }
%"class.tflite::RuntimeShape" = type { i32, %union.anon }
%union.anon = type { ptr, [16 x i8] }

@.str = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN6tflite3ops5micro11activations12LogisticEvalEP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.tflite::ops::micro::activations::(anonymous namespace)::OpData", align 4
  %4 = alloca %"class.tflite::RuntimeShape", align 8
  %5 = alloca %"class.tflite::RuntimeShape", align 8
  %6 = tail call noundef ptr @_ZN6tflite8GetInputEPK13TfLiteContextPK10TfLiteNodei(ptr noundef %0, ptr noundef %1, i32 noundef 0)
  %7 = tail call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %0, ptr noundef %1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %8 = call noundef i32 @_ZN6tflite3ops5micro11activations12_GLOBAL__N_125CalculateArithmeticOpDataEP13TfLiteContextP10TfLiteNodePNS3_6OpDataE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %3)
  %9 = load i32, ptr %6, align 8, !tbaa !5
  switch i32 %9, label %51 [
    i32 1, label %10
    i32 9, label %28
  ]

10:                                               ; preds = %2
  %11 = load i32, ptr %7, align 8, !tbaa !5
  %cond1 = icmp eq i32 %11, 1
  br i1 %cond1, label %12, label %22

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %4, ptr noundef nonnull %6)
  %13 = call noundef ptr @_ZN6tflite13GetTensorDataIfEEPKT_PK12TfLiteTensor(ptr noundef nonnull %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %5, ptr noundef nonnull %7)
          to label %14 unwind label %17

14:                                               ; preds = %12
  %15 = call noundef ptr @_ZN6tflite13GetTensorDataIfEEPT_P12TfLiteTensor(ptr noundef nonnull %7)
  invoke void @_ZN6tflite13reference_ops8LogisticERKNS_12RuntimeShapeEPKfS3_Pf(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %13, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %15)
          to label %16 unwind label %19

16:                                               ; preds = %14
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %57

17:                                               ; preds = %12
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

19:                                               ; preds = %14
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  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 16, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn

22:                                               ; preds = %10
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %25 = call ptr @TfLiteTypeGetName(i32 noundef 1)
  %26 = load i32, ptr %7, align 8, !tbaa !5
  %27 = call ptr @TfLiteTypeGetName(i32 noundef %26)
  call void (ptr, ptr, ...) %24(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef %25, ptr noundef %27)
  br label %57

28:                                               ; preds = %2
  %29 = load i32, ptr %7, align 8, !tbaa !5
  %cond = icmp eq i32 %29, 9
  br i1 %cond, label %30, label %45

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %6, i64 28
  %32 = load i32, ptr %31, align 4, !tbaa !21
  %33 = getelementptr inbounds i8, ptr %3, i64 4
  %34 = load i32, ptr %33, align 4, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %3, i64 8
  %36 = load i32, ptr %35, align 4, !tbaa !24
  %37 = getelementptr inbounds i8, ptr %3, i64 12
  %38 = load i32, ptr %37, align 4, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %6, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !26
  %41 = call noundef i64 @_ZN6tflite11NumElementsEPK14TfLiteIntArray(ptr noundef %40)
  %42 = trunc i64 %41 to i32
  %43 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPKT_PK12TfLiteTensor(ptr noundef nonnull %6)
  %44 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPT_P12TfLiteTensor(ptr noundef nonnull %7)
  call void @_ZN6tflite21reference_integer_ops8LogisticEiiiiiPKaPa(i32 noundef %32, i32 noundef %34, i32 noundef %36, i32 noundef %38, i32 noundef %42, ptr noundef %43, ptr noundef %44)
  br label %57

45:                                               ; preds = %28
  %46 = getelementptr inbounds i8, ptr %0, i64 40
  %47 = load ptr, ptr %46, align 8, !tbaa !19
  %48 = call ptr @TfLiteTypeGetName(i32 noundef 9)
  %49 = load i32, ptr %7, align 8, !tbaa !5
  %50 = call ptr @TfLiteTypeGetName(i32 noundef %49)
  call void (ptr, ptr, ...) %47(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef %48, ptr noundef %50)
  br label %57

51:                                               ; preds = %2
  %52 = getelementptr inbounds i8, ptr %0, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = call ptr @TfLiteTypeGetName(i32 noundef %9)
  %55 = load i32, ptr %7, align 8, !tbaa !5
  %56 = call ptr @TfLiteTypeGetName(i32 noundef %55)
  call void (ptr, ptr, ...) %53(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef %54, ptr noundef %56)
  br label %57

57:                                               ; preds = %51, %45, %30, %22, %16
  %.034 = phi i32 [ 0, %16 ], [ 1, %22 ], [ 0, %30 ], [ 1, %45 ], [ 1, %51 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  ret i32 %.034
}

; 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 @_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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN6tflite3ops5micro11activations12_GLOBAL__N_125CalculateArithmeticOpDataEP13TfLiteContextP10TfLiteNodePNS3_6OpDataE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite13reference_ops8LogisticERKNS_12RuntimeShapeEPKfS3_Pf(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

; 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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite13GetTensorDataIfEEPT_P12TfLiteTensor(ptr 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare ptr @TfLiteTypeGetName(i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite21reference_integer_ops8LogisticEiiiiiPKaPa(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6tflite13GetTensorDataIaEEPT_P12TfLiteTensor(ptr 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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