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

; 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::ConvParams" = type { i8, %"struct.tflite::PaddingValues", i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i32, float, float }
%"struct.tflite::PaddingValues" = type { i16, i16, i16, i16 }
%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.TfLiteConvParams = type { i32, i32, i32, i32, i32, i32 }
%"struct.tflite::ops::micro::conv::OpData" = type { %struct.TfLitePaddingValues, i32, i32, ptr, ptr, i32, i32 }
%struct.TfLitePaddingValues = type { i32, i32, i32, i32 }

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tflite3ops5micro4conv23EvalQuantizedPerChannelEP13TfLiteContextP10TfLiteNodeP16TfLiteConvParamsRKNS2_6OpDataEPK12TfLiteTensorSE_SE_PSC_SF_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #4 personality ptr @__gxx_personality_v0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.tflite::ConvParams", align 4
  %20 = alloca %"class.tflite::RuntimeShape", align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.tflite::RuntimeShape", align 8
  %24 = alloca %"class.tflite::RuntimeShape", align 8
  %25 = alloca %"class.tflite::RuntimeShape", align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #5
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.TfLiteTensor, ptr %26, i32 0, i32 3
  %28 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = sub nsw i32 0, %29
  %31 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 6
  store i32 %30, ptr %31, align 4, !tbaa !20
  %32 = load ptr, ptr %17, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.TfLiteTensor, ptr %32, i32 0, i32 3
  %34 = getelementptr inbounds %struct.TfLiteQuantizationParams, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 8
  store i32 %35, ptr %36, align 4, !tbaa !25
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.TfLiteConvParams, ptr %37, i32 0, i32 2
  %39 = load i32, ptr %38, align 4, !tbaa !26
  %40 = trunc i32 %39 to i16
  %41 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 3
  store i16 %40, ptr %41, align 4, !tbaa !30
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.TfLiteConvParams, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !31
  %45 = trunc i32 %44 to i16
  %46 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 2
  store i16 %45, ptr %46, align 2, !tbaa !32
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.TfLiteConvParams, ptr %47, i32 0, i32 5
  %49 = load i32, ptr %48, align 4, !tbaa !33
  %50 = trunc i32 %49 to i16
  %51 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 5
  store i16 %50, ptr %51, align 4, !tbaa !34
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.TfLiteConvParams, ptr %52, i32 0, i32 4
  %54 = load i32, ptr %53, align 4, !tbaa !35
  %55 = trunc i32 %54 to i16
  %56 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 4
  store i16 %55, ptr %56, align 2, !tbaa !36
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.tflite::ops::micro::conv::OpData", ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds %struct.TfLitePaddingValues, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !37
  %61 = trunc i32 %60 to i16
  %62 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 1
  %63 = getelementptr inbounds %"struct.tflite::PaddingValues", ptr %62, i32 0, i32 1
  store i16 %61, ptr %63, align 2, !tbaa !40
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.tflite::ops::micro::conv::OpData", ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds %struct.TfLitePaddingValues, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !41
  %68 = trunc i32 %67 to i16
  %69 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 1
  %70 = getelementptr inbounds %"struct.tflite::PaddingValues", ptr %69, i32 0, i32 0
  store i16 %68, ptr %70, align 2, !tbaa !42
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.tflite::ops::micro::conv::OpData", ptr %71, i32 0, i32 5
  %73 = load i32, ptr %72, align 8, !tbaa !43
  %74 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 11
  store i32 %73, ptr %74, align 4, !tbaa !44
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.tflite::ops::micro::conv::OpData", ptr %75, i32 0, i32 6
  %77 = load i32, ptr %76, align 4, !tbaa !45
  %78 = getelementptr inbounds %"struct.tflite::ConvParams", ptr %19, i32 0, i32 12
  store i32 %77, ptr %78, align 4, !tbaa !46
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.tflite::ops::micro::conv::OpData", ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !47
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.tflite::ops::micro::conv::OpData", ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %20, ptr noundef %85)
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = invoke noundef ptr @_ZN6tflite13GetTensorDataIaEEPKT_PK12TfLiteTensor(ptr noundef %86)
          to label %88 unwind label %105

88:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #5
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %23, ptr noundef %89)
          to label %90 unwind label %109

90:                                               ; preds = %88
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = invoke noundef ptr @_ZN6tflite13GetTensorDataIaEEPKT_PK12TfLiteTensor(ptr noundef %91)
          to label %93 unwind label %113

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #5
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %24, ptr noundef %94)
          to label %95 unwind label %117

95:                                               ; preds = %93
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = invoke noundef ptr @_ZN6tflite13GetTensorDataIiEEPKT_PK12TfLiteTensor(ptr noundef %96)
          to label %98 unwind label %121

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #5
  %99 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind writable sret(%"class.tflite::RuntimeShape") align 8 %25, ptr noundef %99)
          to label %100 unwind label %125

100:                                              ; preds = %98
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = invoke noundef ptr @_ZN6tflite13GetTensorDataIaEEPT_P12TfLiteTensor(ptr noundef %101)
          to label %103 unwind label %129

103:                                              ; preds = %100
  invoke void @_ZN6tflite21reference_integer_ops14ConvPerChannelERKNS_10ConvParamsEPKiS5_RKNS_12RuntimeShapeEPKaS8_SA_S8_S5_S8_Pa(ptr noundef nonnull align 4 dereferenceable(56) %19, ptr noundef %81, ptr noundef %84, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %87, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef %92, ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef %97, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef %102)
          to label %104 unwind label %129

104:                                              ; preds = %103
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #5
  ret void

105:                                              ; preds = %9
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %21, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %22, align 4
  br label %138

109:                                              ; preds = %88
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %21, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %22, align 4
  br label %137

113:                                              ; preds = %90
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %21, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %22, align 4
  br label %136

117:                                              ; preds = %93
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %21, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %22, align 4
  br label %135

121:                                              ; preds = %95
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %21, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %22, align 4
  br label %134

125:                                              ; preds = %98
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %21, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %22, align 4
  br label %133

129:                                              ; preds = %103, %100
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %21, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %22, align 4
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  br label %133

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #5
  br label %134

134:                                              ; preds = %133, %121
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  br label %135

135:                                              ; preds = %134, %117
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  br label %136

136:                                              ; preds = %135, %113
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  br label %137

137:                                              ; preds = %136, %109
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  br label %138

138:                                              ; preds = %137, %105
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #5
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %21, align 8
  %141 = load i32, ptr %22, align 4
  %142 = insertvalue { ptr, i32 } poison, ptr %140, 0
  %143 = insertvalue { ptr, i32 } %142, i32 %141, 1
  resume { ptr, i32 } %143
}

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

; 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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, !14, i64 28}
!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, !14, i64 20}
!21 = !{!"_ZTSN6tflite10ConvParamsE", !22, i64 0, !23, i64 2, !24, i64 10, !24, i64 12, !24, i64 14, !24, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !13, i64 48, !13, i64 52}
!22 = !{!"_ZTSN6tflite11PaddingTypeE", !7, i64 0}
!23 = !{!"_ZTSN6tflite13PaddingValuesE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6}
!24 = !{!"short", !7, i64 0}
!25 = !{!21, !14, i64 28}
!26 = !{!27, !14, i64 8}
!27 = !{!"_ZTS16TfLiteConvParams", !28, i64 0, !14, i64 4, !14, i64 8, !29, i64 12, !14, i64 16, !14, i64 20}
!28 = !{!"_ZTS13TfLitePadding", !7, i64 0}
!29 = !{!"_ZTS21TfLiteFusedActivation", !7, i64 0}
!30 = !{!21, !24, i64 12}
!31 = !{!27, !14, i64 4}
!32 = !{!21, !24, i64 10}
!33 = !{!27, !14, i64 20}
!34 = !{!21, !24, i64 16}
!35 = !{!27, !14, i64 16}
!36 = !{!21, !24, i64 14}
!37 = !{!38, !14, i64 4}
!38 = !{!"_ZTSN6tflite3ops5micro4conv6OpDataE", !39, i64 0, !14, i64 16, !14, i64 20, !6, i64 24, !6, i64 32, !14, i64 40, !14, i64 44}
!39 = !{!"_ZTS19TfLitePaddingValues", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!40 = !{!21, !24, i64 4}
!41 = !{!38, !14, i64 0}
!42 = !{!21, !24, i64 2}
!43 = !{!38, !14, i64 40}
!44 = !{!21, !14, i64 40}
!45 = !{!38, !14, i64 44}
!46 = !{!21, !14, i64 44}
!47 = !{!38, !6, i64 24}
!48 = !{!38, !6, 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::ConvParams" = type { i8, %"struct.tflite::PaddingValues", i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i32, float, float }
%"struct.tflite::PaddingValues" = type { i16, i16, i16, i16 }

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6tflite3ops5micro4conv23EvalQuantizedPerChannelEP13TfLiteContextP10TfLiteNodeP16TfLiteConvParamsRKNS2_6OpDataEPK12TfLiteTensorSE_SE_PSC_SF_(ptr nocapture noundef readnone %0, ptr nocapture noundef readnone %1, ptr nocapture noundef readonly %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr nocapture noundef readnone %8) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"struct.tflite::ConvParams", align 4
  %11 = alloca %"class.tflite::RuntimeShape", align 8
  %12 = alloca %"class.tflite::RuntimeShape", align 8
  %13 = alloca %"class.tflite::RuntimeShape", align 8
  %14 = alloca %"class.tflite::RuntimeShape", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #5
  %15 = getelementptr inbounds i8, ptr %4, i64 28
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = sub nsw i32 0, %16
  %18 = getelementptr inbounds i8, ptr %10, i64 20
  store i32 %17, ptr %18, align 4, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %7, i64 28
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %10, i64 28
  store i32 %20, ptr %21, align 4, !tbaa !24
  %22 = getelementptr inbounds i8, ptr %2, i64 4
  %23 = getelementptr inbounds i8, ptr %10, i64 10
  %24 = load <2 x i32>, ptr %22, align 4, !tbaa !25
  %25 = trunc <2 x i32> %24 to <2 x i16>
  store <2 x i16> %25, ptr %23, align 2, !tbaa !26
  %26 = getelementptr inbounds i8, ptr %2, i64 16
  %27 = getelementptr inbounds i8, ptr %10, i64 14
  %28 = load <2 x i32>, ptr %26, align 4, !tbaa !25
  %29 = trunc <2 x i32> %28 to <2 x i16>
  store <2 x i16> %29, ptr %27, align 2, !tbaa !26
  %30 = getelementptr inbounds i8, ptr %10, i64 2
  %31 = load <2 x i32>, ptr %3, align 8, !tbaa !25
  %32 = trunc <2 x i32> %31 to <2 x i16>
  store <2 x i16> %32, ptr %30, align 2, !tbaa !26
  %33 = getelementptr inbounds i8, ptr %3, i64 40
  %34 = getelementptr inbounds i8, ptr %10, i64 40
  %35 = load <2 x i32>, ptr %33, align 8, !tbaa !25
  store <2 x i32> %35, ptr %34, align 4, !tbaa !25
  %36 = getelementptr inbounds i8, ptr %3, i64 24
  %37 = load ptr, ptr %36, align 8, !tbaa !27
  %38 = getelementptr inbounds i8, ptr %3, i64 32
  %39 = load ptr, ptr %38, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #5
  call void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %11, ptr noundef %4)
  %40 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPKT_PK12TfLiteTensor(ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %12, ptr noundef %5)
          to label %41 unwind label %48

41:                                               ; preds = %9
  %42 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPKT_PK12TfLiteTensor(ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %13, ptr noundef %6)
          to label %43 unwind label %50

43:                                               ; preds = %41
  %44 = call noundef ptr @_ZN6tflite13GetTensorDataIiEEPKT_PK12TfLiteTensor(ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  invoke void @_ZN6tflite14GetTensorShapeEPK12TfLiteTensor(ptr dead_on_unwind nonnull writable sret(%"class.tflite::RuntimeShape") align 8 %14, ptr noundef nonnull %7)
          to label %45 unwind label %52

45:                                               ; preds = %43
  %46 = call noundef ptr @_ZN6tflite13GetTensorDataIaEEPT_P12TfLiteTensor(ptr noundef nonnull %7)
  invoke void @_ZN6tflite21reference_integer_ops14ConvPerChannelERKNS_10ConvParamsEPKiS5_RKNS_12RuntimeShapeEPKaS8_SA_S8_S5_S8_Pa(ptr noundef nonnull align 4 dereferenceable(56) %10, ptr noundef %37, ptr noundef %39, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %40, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %42, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %44, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %46)
          to label %47 unwind label %54

47:                                               ; preds = %45
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  ret void

48:                                               ; preds = %9
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %58

50:                                               ; preds = %41
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %57

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

54:                                               ; preds = %45
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %57

57:                                               ; preds = %56, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %56 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %58

58:                                               ; preds = %57, %48
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %57 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  call void @_ZN6tflite12RuntimeShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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, !13, i64 28}
!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, !13, i64 20}
!20 = !{!"_ZTSN6tflite10ConvParamsE", !21, i64 0, !22, i64 2, !23, i64 10, !23, i64 12, !23, i64 14, !23, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !12, i64 48, !12, i64 52}
!21 = !{!"_ZTSN6tflite11PaddingTypeE", !8, i64 0}
!22 = !{!"_ZTSN6tflite13PaddingValuesE", !23, i64 0, !23, i64 2, !23, i64 4, !23, i64 6}
!23 = !{!"short", !8, i64 0}
!24 = !{!20, !13, i64 28}
!25 = !{!13, !13, i64 0}
!26 = !{!23, !23, i64 0}
!27 = !{!28, !10, i64 24}
!28 = !{!"_ZTSN6tflite3ops5micro4conv6OpDataE", !29, i64 0, !13, i64 16, !13, i64 20, !10, i64 24, !10, i64 32, !13, i64 40, !13, i64 44}
!29 = !{!"_ZTS19TfLitePaddingValues", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!30 = !{!28, !10, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass