; LLVM IR from XiaoMi/mace :: micro/ops/activation.ll (ZN5micro3ops12ActivationOp3RunEv)

; 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.micro::base::Logger" = type { i32 }
%"class.micro::ops::ActivationOp" = type <{ %"class.micro::framework::Operator", ptr, ptr, i32, [4 x i8], ptr, %"class.micro::ops::Activation", [4 x i8] }>
%"class.micro::framework::Operator" = type { ptr, ptr, ptr, ptr }
%"class.micro::ops::Activation" = type { i32, float, float }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops12ActivationOp3RunEv(ptr noundef nonnull align 8 dereferenceable(76) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.micro::base::Logger", align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.micro::base::Logger", align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %15 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 3
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 2
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  %19 = call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef 0, i32 noundef %16, ptr noundef %18)
  store i32 %19, ptr %4, align 4, !tbaa !17
  %20 = load i32, ptr %4, align 4, !tbaa !17
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %41

22:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef @.str, i32 noundef 53, i32 noundef 1)
  %23 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = invoke noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef 0, i32 noundef %24, ptr noundef %26)
          to label %28 unwind label %37

28:                                               ; preds = %22
  %29 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %27)
          to label %30 unwind label %37

30:                                               ; preds = %28
  %31 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef @.str.1)
          to label %32 unwind label %37

32:                                               ; preds = %30
  %33 = load i32, ptr %4, align 4, !tbaa !17
  %34 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %31, i32 noundef %33)
          to label %35 unwind label %37

35:                                               ; preds = %32
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %36 = load i32, ptr %4, align 4, !tbaa !17
  store i32 %36, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %42

37:                                               ; preds = %32, %30, %28, %22
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %96

41:                                               ; preds = %1
  store i32 0, ptr %8, align 4
  br label %42

42:                                               ; preds = %41, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %43 = load i32, ptr %8, align 4
  switch i32 %43, label %101 [
    i32 0, label %44
    i32 1, label %94
  ]

44:                                               ; preds = %42
  %45 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 6
  %46 = call noundef i32 @_ZN5micro3ops10Activation17GetActivationTypeEv(ptr noundef nonnull align 4 dereferenceable(12) %45)
  %47 = icmp eq i32 %46, 3
  br i1 %47, label %48, label %81

48:                                               ; preds = %44
  %49 = call noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %50 = icmp ugt i32 %49, 1
  br i1 %50, label %58, label %51

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef @.str, i32 noundef 55, i32 noundef 4)
  %52 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef @.str.2)
          to label %53 unwind label %54

53:                                               ; preds = %51
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %58

54:                                               ; preds = %51
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %96

58:                                               ; preds = %53, %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %59 = call noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef 1)
  store ptr %59, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %60 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !16
  %62 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = sub i32 %63, 1
  %65 = call noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef %61, i32 noundef 0, i32 noundef %64)
  store i32 %65, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %66 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !16
  %68 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 3
  %69 = load i32, ptr %68, align 8, !tbaa !9
  %70 = sub i32 %69, 1
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %67, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !19
  store i32 %73, ptr %12, align 4, !tbaa !19
  %74 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = load i32, ptr %11, align 4, !tbaa !19
  %77 = load i32, ptr %12, align 4, !tbaa !19
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 5
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  call void @_ZN5micro3ops12_GLOBAL__N_115PReLUActivationIfEEvPKT_iiS5_PS3_(ptr noundef %75, i32 noundef %76, i32 noundef %77, ptr noundef %78, ptr noundef %80)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %94

81:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %82 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 3
  %83 = load i32, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = call noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %83, ptr noundef %85)
  store i32 %86, ptr %13, align 4, !tbaa !19
  %87 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 6
  %88 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  %90 = load i32, ptr %13, align 4, !tbaa !19
  %91 = getelementptr inbounds %"class.micro::ops::ActivationOp", ptr %14, i32 0, i32 5
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  %93 = call noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %87, ptr noundef %89, i32 noundef %90, ptr noundef %92)
  store i32 %93, ptr %2, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %94

94:                                               ; preds = %81, %58, %42
  %95 = load i32, ptr %2, align 4
  ret i32 %95

96:                                               ; preds = %54, %37
  %97 = load ptr, ptr %6, align 8
  %98 = load i32, ptr %7, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100

101:                                              ; preds = %42
  unreachable
}

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

declare noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef) #2

declare void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #2

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #2

; Function Attrs: nounwind
declare void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

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

declare noundef i32 @_ZN5micro3ops10Activation17GetActivationTypeEv(ptr noundef nonnull align 4 dereferenceable(12)) #2

declare noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN5micro3ops12_GLOBAL__N_115PReLUActivationIfEEvPKT_iiS5_PS3_(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

declare noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef, ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 48}
!10 = !{!"_ZTSN5micro3ops12ActivationOpE", !11, i64 0, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56, !13, i64 64}
!11 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN5micro3ops10ActivationE", !14, i64 0, !15, i64 4, !15, i64 8}
!14 = !{!"_ZTSN5micro3ops14ActivationTypeE", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!10, !6, i64 40}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTSN5micro10MaceStatusE", !7, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!10, !6, i64 32}
!21 = !{!10, !6, i64 56}


; 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.micro::base::Logger" = type { i32 }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops12ActivationOp3RunEv(ptr noundef nonnull align 8 dereferenceable(76) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.micro::base::Logger", align 4
  %3 = alloca %"class.micro::base::Logger", align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = load ptr, ptr %6, align 8, !tbaa !15
  %8 = tail call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0, i32 noundef %5, ptr noundef %7)
  %.not.not = icmp eq i32 %8, 0
  br i1 %.not.not, label %22, label %9

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull @.str, i32 noundef 53, i32 noundef 1)
  %10 = load i32, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %6, align 8, !tbaa !15
  %12 = invoke noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0, i32 noundef %10, ptr noundef %11)
          to label %13 unwind label %19

13:                                               ; preds = %9
  %14 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef %12)
          to label %15 unwind label %19

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull @.str.1)
          to label %17 unwind label %19

17:                                               ; preds = %15
  %18 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef %8)
          to label %21 unwind label %19

19:                                               ; preds = %17, %15, %13, %9
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %60

21:                                               ; preds = %17
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %59

22:                                               ; preds = %1
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  %24 = tail call noundef i32 @_ZN5micro3ops10Activation17GetActivationTypeEv(ptr noundef nonnull align 4 dereferenceable(12) %23)
  %25 = icmp eq i32 %24, 3
  br i1 %25, label %26, label %50

26:                                               ; preds = %22
  %27 = tail call noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %28 = icmp ugt i32 %27, 1
  br i1 %28, label %34, label %29

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str, i32 noundef 55, i32 noundef 4)
  %30 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str.2)
          to label %31 unwind label %32

31:                                               ; preds = %29
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %34

32:                                               ; preds = %29
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %60

34:                                               ; preds = %31, %26
  %35 = call noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 1)
  %36 = load ptr, ptr %6, align 8, !tbaa !15
  %37 = load i32, ptr %4, align 8, !tbaa !5
  %38 = add i32 %37, -1
  %39 = call noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef %36, i32 noundef 0, i32 noundef %38)
  %40 = load ptr, ptr %6, align 8, !tbaa !15
  %41 = load i32, ptr %4, align 8, !tbaa !5
  %42 = add i32 %41, -1
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr %40, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !16
  %46 = getelementptr inbounds i8, ptr %0, i64 32
  %47 = load ptr, ptr %46, align 8, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %0, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  call void @_ZN5micro3ops12_GLOBAL__N_115PReLUActivationIfEEvPKT_iiS5_PS3_(ptr noundef %47, i32 noundef %39, i32 noundef %45, ptr noundef %35, ptr noundef %49)
  br label %59

50:                                               ; preds = %22
  %51 = load i32, ptr %4, align 8, !tbaa !5
  %52 = load ptr, ptr %6, align 8, !tbaa !15
  %53 = tail call noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %51, ptr noundef %52)
  %54 = getelementptr inbounds i8, ptr %0, i64 32
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %0, i64 56
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = tail call noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef %55, i32 noundef %53, ptr noundef %57)
  br label %59

59:                                               ; preds = %21, %50, %34
  %.1 = phi i32 [ %8, %21 ], [ 0, %34 ], [ %58, %50 ]
  ret i32 %.1

60:                                               ; preds = %32, %19
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %20, %19 ]
  resume { ptr, i32 } %.pn
}

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

declare noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

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

declare noundef i32 @_ZN5micro3ops10Activation17GetActivationTypeEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

declare noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN5micro3ops12_GLOBAL__N_115PReLUActivationIfEEvPKT_iiS5_PS3_(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 48}
!6 = !{!"_ZTSN5micro3ops12ActivationOpE", !7, i64 0, !8, i64 32, !8, i64 40, !11, i64 48, !8, i64 56, !12, i64 64}
!7 = !{!"_ZTSN5micro9framework8OperatorE", !8, i64 8, !8, i64 16, !8, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSN5micro3ops10ActivationE", !13, i64 0, !14, i64 4, !14, i64 8}
!13 = !{!"_ZTSN5micro3ops14ActivationTypeE", !9, i64 0}
!14 = !{!"float", !9, i64 0}
!15 = !{!6, !8, i64 40}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !8, i64 32}
!18 = !{!6, !8, i64 56}


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