; LLVM IR from eclipse-threadx/threadx :: common/src/tx_thread_performance_info_get.ll (tx_thread_performance_info_get)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @_tx_thread_performance_info_get(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #0 {
  %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 ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #2
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %11
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %78

27:                                               ; preds = %11
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %77

31:                                               ; preds = %27
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %31
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %76

35:                                               ; preds = %31
  %36 = load ptr, ptr %15, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %35
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %75

39:                                               ; preds = %35
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %74

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

46:                                               ; preds = %43
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %73

47:                                               ; preds = %43
  %48 = load ptr, ptr %18, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %72

51:                                               ; preds = %47
  %52 = load ptr, ptr %19, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %71

55:                                               ; preds = %51
  %56 = load ptr, ptr %20, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %55
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %70

59:                                               ; preds = %55
  %60 = load ptr, ptr %21, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %69

63:                                               ; preds = %59
  %64 = load ptr, ptr %22, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %68

67:                                               ; preds = %63
  store i32 255, ptr %23, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %67, %66
  br label %69

69:                                               ; preds = %68, %62
  br label %70

70:                                               ; preds = %69, %58
  br label %71

71:                                               ; preds = %70, %54
  br label %72

72:                                               ; preds = %71, %50
  br label %73

73:                                               ; preds = %72, %46
  br label %74

74:                                               ; preds = %73, %42
  br label %75

75:                                               ; preds = %74, %38
  br label %76

76:                                               ; preds = %75, %34
  br label %77

77:                                               ; preds = %76, %30
  br label %78

78:                                               ; preds = %77, %26
  %79 = load i32, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #2
  ret i32 %79
}

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local noundef i32 @_tx_thread_performance_info_get(ptr nocapture noundef readnone %0, ptr nocapture noundef readnone %1, ptr nocapture noundef readnone %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readnone %4, ptr nocapture noundef readnone %5, ptr nocapture noundef readnone %6, ptr nocapture noundef readnone %7, ptr nocapture noundef readnone %8, ptr nocapture noundef readnone %9, ptr nocapture noundef readnone %10) local_unnamed_addr #0 {
  ret i32 255
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) 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" }

!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)"}


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