; LLVM IR from XiaoMi/mace :: micro/framework/micro_engine.ll (ZN5micro15MaceMicroEngine17RegisterInputDataEjPKvPKi)

; 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::MaceMicroEngine" = type <{ ptr, i8, [7 x i8] }>
%"struct.micro::MaceMicroEngineConfig" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [77 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 noundef i32 @_ZN5micro15MaceMicroEngine17RegisterInputDataEjPKvPKi(ptr noundef nonnull align 8 dereferenceable(9) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.micro::base::Logger", align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.micro::base::Logger", align 4
  %13 = alloca %"class.micro::base::Logger", align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.micro::base::Logger", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = getelementptr inbounds %"class.micro::MaceMicroEngine", ptr %19, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %"struct.micro::MaceMicroEngineConfig", ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = call noundef i32 @_ZNK5micro5model6NetDef15input_info_sizeEv(ptr noundef nonnull align 4 dereferenceable(44) %24)
  %26 = icmp ult i32 %20, %25
  br i1 %26, label %34, label %27

27:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef @.str, i32 noundef 52, i32 noundef 4)
  %28 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef @.str.5)
          to label %29 unwind label %30

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

30:                                               ; preds = %27
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %10, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %106

34:                                               ; preds = %29, %4
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %44, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef @.str, i32 noundef 53, i32 noundef 4)
  %38 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef @.str.6)
          to label %39 unwind label %40

39:                                               ; preds = %37
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %44

40:                                               ; preds = %37
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %10, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %106

44:                                               ; preds = %39, %34
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %54, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str, i32 noundef 54, i32 noundef 4)
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str.7)
          to label %49 unwind label %50

49:                                               ; preds = %47
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %54

50:                                               ; preds = %47
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %10, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %106

54:                                               ; preds = %49, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %55 = getelementptr inbounds %"class.micro::MaceMicroEngine", ptr %19, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %"struct.micro::MaceMicroEngineConfig", ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !14
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = call noundef ptr @_ZNK5micro5model6NetDef10input_infoEj(ptr noundef nonnull align 4 dereferenceable(44) %58, i32 noundef %59)
  store ptr %60, ptr %16, align 8, !tbaa !5
  %61 = load ptr, ptr %16, align 8, !tbaa !5
  %62 = call noundef i32 @_ZNK5micro5model15InputOutputInfo8dim_sizeEv(ptr noundef nonnull align 4 dereferenceable(40) %61)
  store i32 %62, ptr %14, align 4, !tbaa !9
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = call noundef ptr @_ZNK5micro5model15InputOutputInfo3dimEv(ptr noundef nonnull align 4 dereferenceable(40) %63)
  store ptr %64, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %92, %54
  %66 = load i32, ptr %17, align 4, !tbaa !9
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = icmp ult i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %95

70:                                               ; preds = %65
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = load i32, ptr %17, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds i32, ptr %71, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load i32, ptr %17, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %76, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = icmp eq i32 %75, %80
  br i1 %81, label %91, label %82

82:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef @.str, i32 noundef 64, i32 noundef 4)
  %83 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef @.str.8)
          to label %84 unwind label %87

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef @.str.9)
          to label %86 unwind label %87

86:                                               ; preds = %84
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %91

87:                                               ; preds = %84, %82
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %10, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %106

91:                                               ; preds = %86, %70
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = add i32 %93, 1
  store i32 %94, ptr %17, align 4, !tbaa !9
  br label %65, !llvm.loop !16

95:                                               ; preds = %69
  %96 = getelementptr inbounds %"class.micro::MaceMicroEngine", ptr %19, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds %"struct.micro::MaceMicroEngineConfig", ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = getelementptr inbounds %"class.micro::MaceMicroEngine", ptr %19, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = call noundef i32 @_ZN5micro9framework5Graph17RegisterInputDataEPNS_21MaceMicroEngineConfigEjPKvPKi(ptr noundef nonnull align 4 dereferenceable(24) %99, ptr noundef %101, i32 noundef %102, ptr noundef %103, ptr noundef %104)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  ret i32 %105

106:                                              ; preds = %87, %50, %40, %30
  %107 = load ptr, ptr %10, align 8
  %108 = load i32, ptr %11, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110
}

declare noundef i32 @_ZNK5micro5model6NetDef15input_info_sizeEv(ptr noundef nonnull align 4 dereferenceable(44)) #1

declare noundef ptr @_ZNK5micro5model6NetDef10input_infoEj(ptr noundef nonnull align 4 dereferenceable(44), i32 noundef) #1

declare noundef i32 @_ZNK5micro5model15InputOutputInfo8dim_sizeEv(ptr noundef nonnull align 4 dereferenceable(40)) #1

declare noundef ptr @_ZNK5micro5model15InputOutputInfo3dimEv(ptr noundef nonnull align 4 dereferenceable(40)) #1

declare noundef i32 @_ZN5micro9framework5Graph17RegisterInputDataEPNS_21MaceMicroEngineConfigEjPKvPKi(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN5micro15MaceMicroEngineE", !6, i64 0, !13, i64 8}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN5micro21MaceMicroEngineConfigE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!15, !6, i64 16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.micro::base::Logger" = type { i32 }

@.str = external hidden unnamed_addr constant [77 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 noundef i32 @_ZN5micro15MaceMicroEngine17RegisterInputDataEjPKvPKi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(9) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.micro::base::Logger", align 4
  %6 = alloca %"class.micro::base::Logger", align 4
  %7 = alloca %"class.micro::base::Logger", align 4
  %8 = alloca %"class.micro::base::Logger", align 4
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = tail call noundef i32 @_ZNK5micro5model6NetDef15input_info_sizeEv(ptr noundef nonnull align 4 dereferenceable(44) %10)
  %12 = icmp ugt i32 %11, %1
  br i1 %12, label %18, label %13

13:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull @.str, i32 noundef 52, i32 noundef 4)
  %14 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull @.str.5)
          to label %15 unwind label %16

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

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

18:                                               ; preds = %15, %4
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %19, label %24

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull @.str, i32 noundef 53, i32 noundef 4)
  %20 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull @.str.6)
          to label %21 unwind label %22

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

22:                                               ; preds = %19
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %53

24:                                               ; preds = %21, %18
  %.not20 = icmp eq ptr %3, null
  br i1 %.not20, label %25, label %30

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull @.str, i32 noundef 54, i32 noundef 4)
  %26 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull @.str.7)
          to label %27 unwind label %28

27:                                               ; preds = %25
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %30

28:                                               ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %53

30:                                               ; preds = %27, %24
  %31 = load ptr, ptr %0, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = call noundef ptr @_ZNK5micro5model6NetDef10input_infoEj(ptr noundef nonnull align 4 dereferenceable(44) %32, i32 noundef %1)
  %34 = call noundef i32 @_ZNK5micro5model15InputOutputInfo8dim_sizeEv(ptr noundef nonnull align 4 dereferenceable(40) %33)
  %35 = call noundef ptr @_ZNK5micro5model15InputOutputInfo3dimEv(ptr noundef nonnull align 4 dereferenceable(40) %33)
  %.not23 = icmp eq i32 %34, 0
  br i1 %.not23, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %30
  %wide.trip.count = zext i32 %34 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %52, %30
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  %39 = call noundef i32 @_ZN5micro9framework5Graph17RegisterInputDataEPNS_21MaceMicroEngineConfigEjPKvPKi(ptr noundef nonnull align 4 dereferenceable(24) %38, ptr noundef %36, i32 noundef %1, ptr noundef %2, ptr noundef %3)
  ret i32 %39

.lr.ph:                                           ; preds = %.lr.ph.preheader, %52
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %52 ]
  %40 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv
  %41 = load i32, ptr %40, align 4, !tbaa !15
  %42 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv
  %43 = load i32, ptr %42, align 4, !tbaa !15
  %44 = icmp eq i32 %41, %43
  br i1 %44, label %52, label %45

45:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull @.str, i32 noundef 64, i32 noundef 4)
  %46 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull @.str.8)
          to label %47 unwind label %50

47:                                               ; preds = %45
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull @.str.9)
          to label %49 unwind label %50

49:                                               ; preds = %47
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %52

50:                                               ; preds = %47, %45
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %53

52:                                               ; preds = %.lr.ph, %49
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

53:                                               ; preds = %50, %28, %22, %16
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %29, %28 ], [ %23, %22 ], [ %17, %16 ]
  resume { ptr, i32 } %.pn
}

declare noundef i32 @_ZNK5micro5model6NetDef15input_info_sizeEv(ptr noundef nonnull align 4 dereferenceable(44)) local_unnamed_addr #1

declare noundef ptr @_ZNK5micro5model6NetDef10input_infoEj(ptr noundef nonnull align 4 dereferenceable(44), i32 noundef) local_unnamed_addr #1

declare noundef i32 @_ZNK5micro5model15InputOutputInfo8dim_sizeEv(ptr noundef nonnull align 4 dereferenceable(40)) local_unnamed_addr #1

declare noundef ptr @_ZNK5micro5model15InputOutputInfo3dimEv(ptr noundef nonnull align 4 dereferenceable(40)) local_unnamed_addr #1

declare noundef i32 @_ZN5micro9framework5Graph17RegisterInputDataEPNS_21MaceMicroEngineConfigEjPKvPKi(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"_ZTSN5micro15MaceMicroEngineE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_ZTSN5micro21MaceMicroEngineConfigE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !13, i64 64}
!13 = !{!"int", !8, i64 0}
!14 = !{!12, !7, i64 16}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass