; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/examples/aes/aes.ll (ZN11AES_Encrypt7EncryptEv)

; 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.sc_dt::sc_uint.1" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }
%class.AES_Encrypt = type { %struct.AES_Base, %"class.sc_core::sc_in", %"class.sc_core::sc_in", %"class.sc_core::sc_in.15", %"class.sc_core::sc_out", %"class.sc_core::sc_in", %"class.sc_core::sc_in", %"class.sc_core::sc_out.30", %"class.sc_core::sc_in", %"class.sc_core::sc_out", %"class.sc_dt::sc_uint.39", [11 x [4 x [4 x %"class.sc_dt::sc_uint"]]], [4 x [4 x %"class.sc_dt::sc_uint"]] }
%struct.AES_Base = type { %"class.sc_core::sc_module" }
%"class.sc_core::sc_module" = type { %"class.sc_core::sc_object", %"class.sc_core::sc_process_host", %"class.sc_core::sc_sensitive", %"class.sc_core::sc_sensitive_pos", %"class.sc_core::sc_sensitive_neg", i8, ptr, i32, ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.2", %"class.std::__cxx11::basic_string", ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_in.15" = type { %"class.sc_core::sc_port.16", ptr, ptr }
%"class.sc_core::sc_port.16" = type { %"class.sc_core::sc_port_b.17" }
%"class.sc_core::sc_port_b.17" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.18" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out.30" = type { %"class.sc_core::sc_inout.31" }
%"class.sc_core::sc_inout.31" = type { %"class.sc_core::sc_port.32", ptr, ptr, ptr }
%"class.sc_core::sc_port.32" = type { %"class.sc_core::sc_port_b.33" }
%"class.sc_core::sc_port_b.33" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.34" }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_biguint<128>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_in" = type { %"class.sc_core::sc_port", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port" = type { %"class.sc_core::sc_port_b" }
%"class.sc_core::sc_port_b" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.10" }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out" = type { %"class.sc_core::sc_inout" }
%"class.sc_core::sc_inout" = type { %"class.sc_core::sc_port.23", ptr, ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port.23" = type { %"class.sc_core::sc_port_b.24" }
%"class.sc_core::sc_port_b.24" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.25" }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_dt::sc_uint.39" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint" = type { %"class.sc_dt::sc_uint_base" }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef, ptr noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt7sc_uintILi4EEppEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_uint.1") align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt7sc_uintILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11AES_Encrypt7EncryptEv(ptr noundef nonnull align 8 dereferenceable(6512) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.sc_dt::sc_uint.1", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.sc_dt::sc_uint.1", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %9 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %8, i64 0, i64 0
  %10 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 11
  %11 = getelementptr inbounds [11 x [4 x [4 x %"class.sc_dt::sc_uint"]]], ptr %10, i64 0, i64 0
  %12 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %11, i64 0, i64 0
  call void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232) %7, ptr noundef %9, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #3
  call void @_ZN5sc_dt7sc_uintILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 1)
  br label %13

13:                                               ; preds = %41, %1
  %14 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %15 unwind label %18

15:                                               ; preds = %13
  %16 = icmp ult i64 %14, 10
  br i1 %16, label %22, label %17

17:                                               ; preds = %15
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #3
  br label %42

18:                                               ; preds = %40, %36, %31, %28, %25, %22, %13
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %4, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %5, align 4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #3
  br label %52

22:                                               ; preds = %15
  %23 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %24 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %23, i64 0, i64 0
  invoke void @_ZN11AES_Encrypt14Substitution_SEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %7, ptr noundef %24)
          to label %25 unwind label %18

25:                                               ; preds = %22
  %26 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %27 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %26, i64 0, i64 0
  invoke void @_ZN11AES_Encrypt21ShiftRows_Left_RotateEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %7, ptr noundef %27)
          to label %28 unwind label %18

28:                                               ; preds = %25
  %29 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %30 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %29, i64 0, i64 0
  invoke void @_ZN11AES_Encrypt10MixColumnsEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %7, ptr noundef %30)
          to label %31 unwind label %18

31:                                               ; preds = %28
  %32 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %33 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %32, i64 0, i64 0
  %34 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 11
  %35 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %36 unwind label %18

36:                                               ; preds = %31
  %37 = getelementptr inbounds [11 x [4 x [4 x %"class.sc_dt::sc_uint"]]], ptr %34, i64 0, i64 %35
  %38 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %37, i64 0, i64 0
  invoke void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232) %7, ptr noundef %33, ptr noundef %38)
          to label %39 unwind label %18

39:                                               ; preds = %36
  br label %40

40:                                               ; preds = %39
  invoke void @_ZN5sc_dt7sc_uintILi4EEppEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_uint.1") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 0)
          to label %41 unwind label %18

41:                                               ; preds = %40
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %13, !llvm.loop !9

42:                                               ; preds = %17
  %43 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %44 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %43, i64 0, i64 0
  call void @_ZN11AES_Encrypt14Substitution_SEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %7, ptr noundef %44)
  %45 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %46 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %45, i64 0, i64 0
  call void @_ZN11AES_Encrypt21ShiftRows_Left_RotateEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %7, ptr noundef %46)
  %47 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 12
  %48 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %47, i64 0, i64 0
  %49 = getelementptr inbounds %class.AES_Encrypt, ptr %7, i32 0, i32 11
  %50 = getelementptr inbounds [11 x [4 x [4 x %"class.sc_dt::sc_uint"]]], ptr %49, i64 0, i64 10
  %51 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %50, i64 0, i64 0
  call void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232) %7, ptr noundef %48, ptr noundef %51)
  ret void

52:                                               ; preds = %18
  %53 = load ptr, ptr %4, align 8
  %54 = load i32, ptr %5, align 4
  %55 = insertvalue { ptr, i32 } poison, ptr %53, 0
  %56 = insertvalue { ptr, i32 } %55, i32 %54, 1
  resume { ptr, i32 } %56
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11AES_Encrypt14Substitution_SEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11AES_Encrypt21ShiftRows_Left_RotateEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11AES_Encrypt10MixColumnsEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512), ptr noundef) #1 align 2

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

attributes #0 = { 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 #1 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; 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.sc_dt::sc_uint.1" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }
%"class.sc_dt::sc_uint" = type { %"class.sc_dt::sc_uint_base" }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt7sc_uintILi4EEppEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_uint.1") align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt7sc_uintILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11AES_Encrypt7EncryptEv(ptr noundef nonnull align 8 dereferenceable(6512) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.sc_dt::sc_uint.1", align 8
  %3 = alloca %"class.sc_dt::sc_uint.1", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 6128
  %5 = getelementptr inbounds i8, ptr %0, i64 1904
  tail call void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull %4, ptr noundef nonnull %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZN5sc_dt7sc_uintILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1)
  %6 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %7 = icmp ult i64 %6, 10
  br i1 %7, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %17, %1
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @_ZN11AES_Encrypt14Substitution_SEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %0, ptr noundef nonnull %4)
  call void @_ZN11AES_Encrypt21ShiftRows_Left_RotateEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %0, ptr noundef nonnull %4)
  %8 = getelementptr inbounds i8, ptr %0, i64 5744
  call void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull %4, ptr noundef nonnull %8)
  ret void

9:                                                ; preds = %16, %13, %12, %11, %.lr.ph
  %10 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  resume { ptr, i32 } %10

.lr.ph:                                           ; preds = %1, %17
  invoke void @_ZN11AES_Encrypt14Substitution_SEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %0, ptr noundef nonnull %4)
          to label %11 unwind label %9

11:                                               ; preds = %.lr.ph
  invoke void @_ZN11AES_Encrypt21ShiftRows_Left_RotateEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %0, ptr noundef nonnull %4)
          to label %12 unwind label %9

12:                                               ; preds = %11
  invoke void @_ZN11AES_Encrypt10MixColumnsEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512) %0, ptr noundef nonnull %4)
          to label %13 unwind label %9

13:                                               ; preds = %12
  %14 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %15 = getelementptr inbounds [11 x [4 x [4 x %"class.sc_dt::sc_uint"]]], ptr %5, i64 0, i64 %14
  invoke void @_ZN8AES_Base11AddRoundKeyEPA4_N5sc_dt7sc_uintILi8EEEPA4_KS2_(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull %4, ptr noundef nonnull %15)
          to label %16 unwind label %9

16:                                               ; preds = %13
  invoke void @_ZN5sc_dt7sc_uintILi4EEppEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_uint.1") align 8 %3, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 0)
          to label %17 unwind label %9

17:                                               ; preds = %16
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  %18 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %19 = icmp ult i64 %18, 10
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !5
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11AES_Encrypt14Substitution_SEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11AES_Encrypt21ShiftRows_Left_RotateEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11AES_Encrypt10MixColumnsEPA4_N5sc_dt7sc_uintILi8EEE(ptr noundef nonnull align 8 dereferenceable(6512), ptr noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { 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 #1 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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