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

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

%"class.tflite::RuntimeShape" = type { i32, %union.anon }
%union.anon = type { ptr, [16 x i8] }
%"struct.tflite::ConcatenationParams" = type { i8, ptr, ptr, i16, i32, float }
%struct.TfLiteNode = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr }
%struct.TfLiteIntArray = type { i32, [0 x i32] }
%struct.TfLiteConcatenationParams = type { i32, i32 }
%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 }

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tflite3ops5micro13concatenation18EvalQuantizedUInt8EP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [10 x %"class.tflite::RuntimeShape"], align 16
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [10 x ptr], align 16
  %9 = alloca [10 x ptr], align 16
  %10 = alloca [10 x float], align 16
  %11 = alloca [10 x i32], align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.tflite::ConcatenationParams", align 8
  %15 = alloca %"class.tflite::RuntimeShape", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 320, ptr %5) #5
  %16 = getelementptr inbounds [10 x %"class.tflite::RuntimeShape"], ptr %5, i32 0, i32 0
  %17 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %16, i64 10
  br label %18

18:                                               ; preds = %20, %2
  %19 = phi ptr [ %16, %2 ], [ %21, %20 ]
  invoke void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %20 unwind label %101

20:                                               ; preds = %18
  %21 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %19, i64 1
  %22 = icmp eq ptr %21, %17
  br i1 %22, label %23, label %18

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #5
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.TfLiteNode, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds [10 x %"class.tflite::RuntimeShape"], ptr %5, i64 0, i64 0
  invoke void @_ZN6tflite3ops5micro13concatenation18GetAllTensorShapesERK13TfLiteContextRK14TfLiteIntArrayPNS_12RuntimeShapeE(ptr noundef nonnull align 8 dereferenceable(160) %24, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef %28)
          to label %29 unwind label %111

29:                                               ; preds = %23
  %30 = getelementptr inbounds [10 x %"class.tflite::RuntimeShape"], ptr %5, i64 0, i64 0
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.TfLiteNode, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.TfLiteIntArray, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 4, !tbaa !12
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [10 x ptr], ptr %8, i64 0, i64 0
  invoke void @_ZN6tflite3ops5micro13concatenation17GetShapesPointersEPKNS_12RuntimeShapeEmPS5_(ptr noundef %30, i64 noundef %36, ptr noundef %37)
          to label %38 unwind label %111

38:                                               ; preds = %29
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.TfLiteNode, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 0
  invoke void @_ZN6tflite3ops5micro13concatenation16GetAllTensorDataIKhEEvRK13TfLiteContextRK14TfLiteIntArrayPPT_(ptr noundef nonnull align 8 dereferenceable(160) %39, ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef %43)
          to label %44 unwind label %111

44:                                               ; preds = %38
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.TfLiteNode, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds [10 x float], ptr %10, i64 0, i64 0
  %50 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  invoke void @_ZN6tflite3ops5micro13concatenation23GetAllQuantizationParamERK13TfLiteContextRK14TfLiteIntArrayPfPi(ptr noundef nonnull align 8 dereferenceable(160) %45, ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef %49, ptr noundef %50)
          to label %51 unwind label %111

51:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef %52, ptr noundef %53, i32 noundef 0)
          to label %55 unwind label %115

55:                                               ; preds = %51
  store ptr %54, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.TfLiteNode, ptr %56, i32 0, i32 5
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  store ptr %58, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #5
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.TfLiteConcatenationParams, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !14
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = invoke noundef i32 @_ZN6tflite3ops5micro13concatenation21CalculatePositiveAxisEiPK12TfLiteTensor(i32 noundef %61, ptr noundef %62)
          to label %64 unwind label %119

64:                                               ; preds = %55
  %65 = trunc i32 %63 to i8
  %66 = getelementptr inbounds %"struct.tflite::ConcatenationParams", ptr %14, i32 0, i32 0
  store i8 %65, ptr %66, align 8, !tbaa !17
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = invoke noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef %67)
          to label %69 unwind label %119

69:                                               ; preds = %64
  %70 = trunc i32 %68 to i16
  %71 = getelementptr inbounds %"struct.tflite::ConcatenationParams", ptr %14, i32 0, i32 3
  store i16 %70, ptr %71, align 8, !tbaa !21
  %72 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %73 = getelementptr inbounds %"struct.tflite::ConcatenationParams", ptr %14, i32 0, i32 1
  store ptr %72, ptr %73, align 8, !tbaa !22
  %74 = getelementptr inbounds [10 x float], ptr %10, i64 0, i64 0
  %75 = getelementptr inbounds %"struct.tflite::ConcatenationParams", ptr %14, i32 0, i32 2
  store ptr %74, ptr %75, align 8, !tbaa !23
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.TfLiteTensor, ptr %76, i32 0, i32 3
  %78 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !24
  %80 = getelementptr inbounds %"struct.tflite::ConcatenationParams", ptr %14, i32 0, i32 4
  store i32 %79, ptr %80, align 4, !tbaa !33
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.TfLiteTensor, ptr %81, i32 0, i32 3
  %83 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %82, i32 0, i32 0
  %84 = load float, ptr %83, align 8, !tbaa !34
  %85 = getelementptr inbounds %"struct.tflite::ConcatenationParams", ptr %14, i32 0, i32 5
  store float %84, ptr %85, align 8, !tbaa !35
  %86 = getelementptr inbounds [10 x ptr], ptr %8, i64 0, i64 0
  %87 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %15, ptr noundef %88)
          to label %89 unwind label %123

89:                                               ; preds = %69
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = invoke noundef ptr @_ZN6tflite13GetTensorDataIhEEPT_P12TfLiteTensor(ptr noundef %90)
          to label %92 unwind label %127

92:                                               ; preds = %89
  invoke void @_ZN6tflite13reference_ops24ConcatenationWithScalingERKNS_19ConcatenationParamsEPKPKNS_12RuntimeShapeEPKPKhRS5_Ph(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef %86, ptr noundef %87, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %91)
          to label %93 unwind label %127

93:                                               ; preds = %92
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #5
  %94 = getelementptr inbounds [10 x %"class.tflite::RuntimeShape"], ptr %5, i32 0, i32 0
  %95 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %94, i64 10
  br label %96

96:                                               ; preds = %96, %93
  %97 = phi ptr [ %95, %93 ], [ %98, %96 ]
  %98 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %97, i64 -1
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %98) #5
  %99 = icmp eq ptr %98, %94
  br i1 %99, label %100, label %96

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 320, ptr %5) #5
  ret void

101:                                              ; preds = %18
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %6, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %7, align 4
  %105 = icmp eq ptr %16, %19
  br i1 %105, label %110, label %106

106:                                              ; preds = %106, %101
  %107 = phi ptr [ %19, %101 ], [ %108, %106 ]
  %108 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %107, i64 -1
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %108) #5
  %109 = icmp eq ptr %108, %16
  br i1 %109, label %110, label %106

110:                                              ; preds = %106, %101
  br label %142

111:                                              ; preds = %44, %38, %29, %23
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %6, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %7, align 4
  br label %134

115:                                              ; preds = %51
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  br label %133

119:                                              ; preds = %64, %55
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %6, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %7, align 4
  br label %132

123:                                              ; preds = %69
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  br label %131

127:                                              ; preds = %92, %89
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %131

131:                                              ; preds = %127, %123
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %132

132:                                              ; preds = %131, %119
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %133

133:                                              ; preds = %132, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %134

134:                                              ; preds = %133, %111
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #5
  %135 = getelementptr inbounds [10 x %"class.tflite::RuntimeShape"], ptr %5, i32 0, i32 0
  %136 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %135, i64 10
  br label %137

137:                                              ; preds = %137, %134
  %138 = phi ptr [ %136, %134 ], [ %139, %137 ]
  %139 = getelementptr inbounds %"class.tflite::RuntimeShape", ptr %138, i64 -1
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %139) #5
  %140 = icmp eq ptr %139, %135
  br i1 %140, label %141, label %137

141:                                              ; preds = %137
  br label %142

142:                                              ; preds = %141, %110
  call void @llvm.lifetime.end.p0(i64 320, ptr %5) #5
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr %6, align 8
  %145 = load i32, ptr %7, align 4
  %146 = insertvalue { ptr, i32 } poison, ptr %144, 0
  %147 = insertvalue { ptr, i32 } %146, i32 %145, 1
  resume { ptr, i32 } %147
}

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation18GetAllTensorShapesERK13TfLiteContextRK14TfLiteIntArrayPNS_12RuntimeShapeE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation17GetShapesPointersEPKNS_12RuntimeShapeEmPS5_(ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation16GetAllTensorDataIKhEEvRK13TfLiteContextRK14TfLiteIntArrayPPT_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation23GetAllQuantizationParamERK13TfLiteContextRK14TfLiteIntArrayPfPi(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef) #1

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 0}
!10 = !{!"_ZTS10TfLiteNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 40}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS25TfLiteConcatenationParams", !11, i64 0, !16, i64 4}
!16 = !{!"_ZTS21TfLiteFusedActivation", !7, i64 0}
!17 = !{!18, !7, i64 0}
!18 = !{!"_ZTSN6tflite19ConcatenationParamsE", !7, i64 0, !6, i64 8, !6, i64 16, !19, i64 24, !11, i64 28, !20, i64 32}
!19 = !{!"short", !7, i64 0}
!20 = !{!"float", !7, i64 0}
!21 = !{!18, !19, i64 24}
!22 = !{!18, !6, i64 8}
!23 = !{!18, !6, i64 16}
!24 = !{!25, !11, i64 28}
!25 = !{!"_ZTS12TfLiteTensor", !26, i64 0, !7, i64 8, !6, i64 16, !27, i64 24, !28, i64 32, !29, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !30, i64 76, !30, i64 77, !31, i64 80, !6, i64 96, !6, i64 104}
!26 = !{!"_ZTS10TfLiteType", !7, i64 0}
!27 = !{!"_ZTS24TfLiteQuantizationParams", !20, i64 0, !11, i64 4}
!28 = !{!"_ZTS20TfLiteAllocationType", !7, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTS18TfLiteQuantization", !32, i64 0, !6, i64 8}
!32 = !{!"_ZTS22TfLiteQuantizationType", !7, i64 0}
!33 = !{!18, !11, i64 28}
!34 = !{!25, !20, i64 24}
!35 = !{!18, !20, i64 32}


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

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

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tflite3ops5micro13concatenation18EvalQuantizedUInt8EP13TfLiteContextP10TfLiteNode(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [10 x %"class.tflite::RuntimeShape"], align 16
  %4 = alloca [10 x ptr], align 16
  %5 = alloca [10 x ptr], align 16
  %6 = alloca [10 x float], align 16
  %7 = alloca [10 x i32], align 16
  %8 = alloca %"struct.tflite::ConcatenationParams", align 8
  %9 = alloca %"class.tflite::RuntimeShape", align 8
  call void @llvm.lifetime.start.p0(i64 320, ptr nonnull %3) #5
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %.ptr.1 = getelementptr inbounds i8, ptr %3, i64 32
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %3, i64 64
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %3, i64 96
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %3, i64 128
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %3, i64 160
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %3, i64 192
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %3, i64 224
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.7)
  %.ptr.8 = getelementptr inbounds i8, ptr %3, i64 256
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.8)
  %.ptr.9 = getelementptr inbounds i8, ptr %3, i64 288
  call void @_ZN6tflite12RuntimeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.9)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  invoke void @_ZN6tflite3ops5micro13concatenation18GetAllTensorShapesERK13TfLiteContextRK14TfLiteIntArrayPNS_12RuntimeShapeE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull %3)
          to label %11 unwind label %47

11:                                               ; preds = %2
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = sext i32 %13 to i64
  call void @_ZN6tflite3ops5micro13concatenation17GetShapesPointersEPKNS_12RuntimeShapeEmPS5_(ptr noundef nonnull %3, i64 noundef %14, ptr noundef nonnull %4)
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  invoke void @_ZN6tflite3ops5micro13concatenation16GetAllTensorDataIKhEEvRK13TfLiteContextRK14TfLiteIntArrayPPT_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull %5)
          to label %16 unwind label %47

16:                                               ; preds = %11
  %17 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_ZN6tflite3ops5micro13concatenation23GetAllQuantizationParamERK13TfLiteContextRK14TfLiteIntArrayPfPi(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %18 = call noundef ptr @_ZN6tflite9GetOutputEP13TfLiteContextPK10TfLiteNodei(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef 0)
  %19 = getelementptr inbounds i8, ptr %1, i64 40
  %20 = load ptr, ptr %19, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #5
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = call noundef i32 @_ZN6tflite3ops5micro13concatenation21CalculatePositiveAxisEiPK12TfLiteTensor(i32 noundef %21, ptr noundef %18)
  %23 = trunc i32 %22 to i8
  store i8 %23, ptr %8, align 8, !tbaa !16
  %24 = call noundef i32 @_ZN6tflite9NumInputsEPK10TfLiteNode(ptr noundef nonnull %1)
  %25 = trunc i32 %24 to i16
  %26 = getelementptr inbounds i8, ptr %8, i64 24
  store i16 %25, ptr %26, align 8, !tbaa !20
  %27 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %7, ptr %27, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %6, ptr %28, align 8, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %18, i64 24
  %30 = getelementptr inbounds i8, ptr %18, i64 28
  %31 = load i32, ptr %30, align 4, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %8, i64 28
  store i32 %31, ptr %32, align 4, !tbaa !32
  %33 = load float, ptr %29, align 8, !tbaa !33
  %34 = getelementptr inbounds i8, ptr %8, i64 32
  store float %33, ptr %34, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %9, ptr noundef nonnull %18)
          to label %35 unwind label %49

35:                                               ; preds = %16
  %36 = call noundef ptr @_ZN6tflite13GetTensorDataIhEEPT_P12TfLiteTensor(ptr noundef nonnull %18)
  invoke void @_ZN6tflite13reference_ops24ConcatenationWithScalingERKNS_19ConcatenationParamsEPKPKNS_12RuntimeShapeEPKPKhRS5_Ph(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %36)
          to label %37 unwind label %51

37:                                               ; preds = %35
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  %38 = getelementptr inbounds i8, ptr %3, i64 288
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #5
  %39 = getelementptr inbounds i8, ptr %3, i64 256
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #5
  %40 = getelementptr inbounds i8, ptr %3, i64 224
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #5
  %41 = getelementptr inbounds i8, ptr %3, i64 192
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #5
  %42 = getelementptr inbounds i8, ptr %3, i64 160
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #5
  %43 = getelementptr inbounds i8, ptr %3, i64 128
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #5
  %44 = getelementptr inbounds i8, ptr %3, i64 96
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #5
  %45 = getelementptr inbounds i8, ptr %3, i64 64
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #5
  %46 = getelementptr inbounds i8, ptr %3, i64 32
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %3) #5
  ret void

47:                                               ; preds = %11, %2
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %54

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

51:                                               ; preds = %35
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %53

53:                                               ; preds = %51, %49
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  br label %54

54:                                               ; preds = %53, %47
  %.pn.pn = phi { ptr, i32 } [ %.pn, %53 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  %55 = getelementptr inbounds i8, ptr %3, i64 288
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #5
  %56 = getelementptr inbounds i8, ptr %3, i64 256
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #5
  %57 = getelementptr inbounds i8, ptr %3, i64 224
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %57) #5
  %58 = getelementptr inbounds i8, ptr %3, i64 192
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #5
  %59 = getelementptr inbounds i8, ptr %3, i64 160
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #5
  %60 = getelementptr inbounds i8, ptr %3, i64 128
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #5
  %61 = getelementptr inbounds i8, ptr %3, i64 96
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %61) #5
  %62 = getelementptr inbounds i8, ptr %3, i64 64
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #5
  %63 = getelementptr inbounds i8, ptr %3, i64 32
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %63) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn
}

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation18GetAllTensorShapesERK13TfLiteContextRK14TfLiteIntArrayPNS_12RuntimeShapeE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation17GetShapesPointersEPKNS_12RuntimeShapeEmPS5_(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation16GetAllTensorDataIKhEEvRK13TfLiteContextRK14TfLiteIntArrayPPT_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6tflite3ops5micro13concatenation23GetAllQuantizationParamERK13TfLiteContextRK14TfLiteIntArrayPfPi(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; 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 #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTS10TfLiteNode", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !7, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !7, i64 40}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS25TfLiteConcatenationParams", !10, i64 0, !15, i64 4}
!15 = !{!"_ZTS21TfLiteFusedActivation", !8, i64 0}
!16 = !{!17, !8, i64 0}
!17 = !{!"_ZTSN6tflite19ConcatenationParamsE", !8, i64 0, !7, i64 8, !7, i64 16, !18, i64 24, !10, i64 28, !19, i64 32}
!18 = !{!"short", !8, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = !{!17, !18, i64 24}
!21 = !{!17, !7, i64 8}
!22 = !{!17, !7, i64 16}
!23 = !{!24, !10, i64 28}
!24 = !{!"_ZTS12TfLiteTensor", !25, i64 0, !8, i64 8, !7, i64 16, !26, i64 24, !27, i64 32, !28, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !29, i64 76, !29, i64 77, !30, i64 80, !7, i64 96, !7, i64 104}
!25 = !{!"_ZTS10TfLiteType", !8, i64 0}
!26 = !{!"_ZTS24TfLiteQuantizationParams", !19, i64 0, !10, i64 4}
!27 = !{!"_ZTS20TfLiteAllocationType", !8, i64 0}
!28 = !{!"long", !8, i64 0}
!29 = !{!"bool", !8, i64 0}
!30 = !{!"_ZTS18TfLiteQuantization", !31, i64 0, !7, i64 8}
!31 = !{!"_ZTS22TfLiteQuantizationType", !8, i64 0}
!32 = !{!17, !10, i64 28}
!33 = !{!24, !19, i64 24}
!34 = !{!17, !19, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass