; LLVM IR from Derek-TH-Wang/quadruped_ctrl :: src/MPC_Ctrl/Gait.ll (ZN18OffsetDurationGait11getMpcTableEv)

; 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.Eigen::Array" = type { %"class.Eigen::PlainObjectBase.3" }
%"class.Eigen::PlainObjectBase.3" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [4 x i32] }
%"class.Eigen::CwiseBinaryOp.77" = type <{ [4 x i8], %"class.Eigen::CwiseNullaryOp.83", [4 x i8], ptr, [8 x i8] }>
%"class.Eigen::CwiseNullaryOp.83" = type { [4 x i8], %"struct.Eigen::internal::scalar_constant_op.88" }
%"struct.Eigen::internal::scalar_constant_op.88" = type { i32 }
%"struct.Eigen::Array<int, 4, 1>::PrivateType" = type { i8 }
%class.OffsetDurationGait = type <{ %class.Gait, ptr, %"class.Eigen::Array", %"class.Eigen::Array", %"class.Eigen::Array.9", %"class.Eigen::Array.9", i32, i32, float, [4 x i8] }>
%class.Gait = type { ptr, %"class.std::__cxx11::basic_string" }
%"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.Eigen::Array.9" = type { %"class.Eigen::PlainObjectBase.10" }
%"class.Eigen::PlainObjectBase.10" = type { %"class.Eigen::DenseStorage.17" }
%"class.Eigen::DenseStorage.17" = type { %"struct.Eigen::internal::plain_array.18" }
%"struct.Eigen::internal::plain_array.18" = type { [4 x float] }

; 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: mustprogress uwtable
define dso_local noundef ptr @_ZN18OffsetDurationGait11getMpcTableEv(ptr noundef nonnull align 16 dereferenceable(124) %0) unnamed_addr #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.Eigen::Array", align 16
  %7 = alloca %"class.Eigen::CwiseBinaryOp.77", align 8
  %8 = alloca %"struct.Eigen::Array<int, 4, 1>::PrivateType", align 1
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %79, %1
  %12 = load i32, ptr %3, align 4, !tbaa !9
  %13 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 7
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = icmp slt i32 %12, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %82

17:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 6
  %20 = load i32, ptr %19, align 16, !tbaa !26
  %21 = add nsw i32 %18, %20
  %22 = add nsw i32 %21, 1
  %23 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 7
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = srem i32 %22, %24
  store i32 %25, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #3
  %26 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 2
  call void @_ZN5EigenmiIiEEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opINS2_18promote_scalar_argIiT_Xsr5Eigen8internal14has_ReturnTypeINS_20ScalarBinaryOpTraitsIS5_iNS3_IS5_iEEEEEE5valueEE4typeEiEEKNS2_19plain_constant_typeINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEESA_E4typeEKSE_EERKS5_RKNS_9ArrayBaseISE_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp.77") align 8 %7, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(1) %26)
  call void @_ZN5Eigen5ArrayIiLi4ELi1ELi0ELi4ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIiiEEKNS_14CwiseNullaryOpINS4_18scalar_constant_opIiEEKS1_EESA_EEEERKNS_9EigenBaseIT_EENS4_9enable_ifIXsr8internal14is_convertibleINSF_6ScalarEiEE5valueENS1_11PrivateTypeEE4typeE(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %75, %17
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = icmp slt i32 %28, 4
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %78

31:                                               ; preds = %27
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %6, i64 noundef %33)
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %37, label %45

37:                                               ; preds = %31
  %38 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 7
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %6, i64 noundef %41)
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = add nsw i32 %43, %39
  store i32 %44, ptr %42, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %37, %31
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %6, i64 noundef %47)
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 3
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %50, i64 noundef %52)
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = icmp slt i32 %49, %54
  br i1 %55, label %56, label %65

56:                                               ; preds = %45
  %57 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !27
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = mul nsw i32 %59, 4
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = add nsw i32 %60, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %58, i64 %63
  store i32 1, ptr %64, align 4, !tbaa !9
  br label %74

65:                                               ; preds = %45
  %66 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !27
  %68 = load i32, ptr %3, align 4, !tbaa !9
  %69 = mul nsw i32 %68, 4
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = add nsw i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %67, i64 %72
  store i32 0, ptr %73, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %65, %56
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %9, align 4, !tbaa !9
  br label %27, !llvm.loop !28

78:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %3, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %3, align 4, !tbaa !9
  br label %11, !llvm.loop !30

82:                                               ; preds = %16
  %83 = getelementptr inbounds %class.OffsetDurationGait, ptr %10, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !27
  ret ptr %84
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5EigenmiIiEEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opINS2_18promote_scalar_argIiT_Xsr5Eigen8internal14has_ReturnTypeINS_20ScalarBinaryOpTraitsIS5_iNS3_IS5_iEEEEEE5valueEE4typeEiEEKNS2_19plain_constant_typeINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEESA_E4typeEKSE_EERKS5_RKNS_9ArrayBaseISE_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp.77") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen5ArrayIiLi4ELi1ELi0ELi4ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIiiEEKNS_14CwiseNullaryOpINS4_18scalar_constant_opIiEEKS1_EESA_EEEERKNS_9EigenBaseIT_EENS4_9enable_ifIXsr8internal14is_convertibleINSF_6ScalarEiEE5valueENS1_11PrivateTypeEE4typeE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 116}
!12 = !{!"_ZTS18OffsetDurationGait", !13, i64 0, !6, i64 40, !17, i64 48, !17, i64 64, !21, i64 80, !21, i64 96, !10, i64 112, !10, i64 116, !25, i64 120}
!13 = !{!"_ZTS4Gait", !14, i64 8}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN5Eigen5ArrayIiLi4ELi1ELi0ELi4ELi1EEE", !18, i64 0}
!18 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEEEE", !19, i64 0}
!19 = !{!"_ZTSN5Eigen12DenseStorageIiLi4ELi4ELi1ELi0EEE", !20, i64 0}
!20 = !{!"_ZTSN5Eigen8internal11plain_arrayIiLi4ELi0ELi16EEE", !7, i64 0}
!21 = !{!"_ZTSN5Eigen5ArrayIfLi4ELi1ELi0ELi4ELi1EEE", !22, i64 0}
!22 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_5ArrayIfLi4ELi1ELi0ELi4ELi1EEEEE", !23, i64 0}
!23 = !{!"_ZTSN5Eigen12DenseStorageIfLi4ELi4ELi1ELi0EEE", !24, i64 0}
!24 = !{!"_ZTSN5Eigen8internal11plain_arrayIfLi4ELi0ELi16EEE", !7, i64 0}
!25 = !{!"float", !7, i64 0}
!26 = !{!12, !10, i64 112}
!27 = !{!12, !6, i64 40}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


; 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.Eigen::Array" = type { %"class.Eigen::PlainObjectBase.3" }
%"class.Eigen::PlainObjectBase.3" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [4 x i32] }
%"class.Eigen::CwiseBinaryOp.77" = type <{ [4 x i8], %"class.Eigen::CwiseNullaryOp.83", [4 x i8], ptr, [8 x i8] }>
%"class.Eigen::CwiseNullaryOp.83" = type { [4 x i8], %"struct.Eigen::internal::scalar_constant_op.88" }
%"struct.Eigen::internal::scalar_constant_op.88" = type { i32 }

; 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: mustprogress uwtable
define dso_local noundef ptr @_ZN18OffsetDurationGait11getMpcTableEv(ptr noundef nonnull align 16 dereferenceable(124) %0) unnamed_addr #1 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.Eigen::Array", align 16
  %4 = alloca %"class.Eigen::CwiseBinaryOp.77", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 116
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 40
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !24
  br label %._crit_edge

.lr.ph:                                           ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 112
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  br label %13

._crit_edge:                                      ; preds = %79, %.._crit_edge_crit_edge
  %12 = phi ptr [ %.pre, %.._crit_edge_crit_edge ], [ %85, %79 ]
  ret ptr %12

13:                                               ; preds = %.lr.ph, %79
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %79 ]
  %14 = phi i32 [ %6, %.lr.ph ], [ %88, %79 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  %15 = load i32, ptr %8, align 16, !tbaa !25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = trunc nuw nsw i64 %indvars.iv.next to i32
  %17 = add i32 %15, %16
  %18 = srem i32 %17, %14
  store i32 %18, ptr %2, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  call void @_ZN5EigenmiIiEEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opINS2_18promote_scalar_argIiT_Xsr5Eigen8internal14has_ReturnTypeINS_20ScalarBinaryOpTraitsIS5_iNS3_IS5_iEEEEEE5valueEE4typeEiEEKNS2_19plain_constant_typeINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEESA_E4typeEKSE_EERKS5_RKNS_9ArrayBaseISE_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp.77") align 8 %4, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 1 dereferenceable(1) %9)
  call void @_ZN5Eigen5ArrayIiLi4ELi1ELi0ELi4ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIiiEEKNS_14CwiseNullaryOpINS4_18scalar_constant_opIiEEKS1_EESA_EEEERKNS_9EigenBaseIT_EENS4_9enable_ifIXsr8internal14is_convertibleINSF_6ScalarEiEE5valueENS1_11PrivateTypeEE4typeE(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  %19 = shl i64 %indvars.iv, 2
  %20 = and i64 %19, 4294967292
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 0)
  %22 = load i32, ptr %21, align 4, !tbaa !26
  %23 = icmp slt i32 %22, 0
  br i1 %23, label %24, label %29

24:                                               ; preds = %13
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 0)
  %27 = load i32, ptr %26, align 4, !tbaa !26
  %28 = add nsw i32 %27, %25
  store i32 %28, ptr %26, align 4, !tbaa !26
  br label %29

29:                                               ; preds = %24, %13
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 0)
  %31 = load i32, ptr %30, align 4, !tbaa !26
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef 0)
  %33 = load i32, ptr %32, align 4, !tbaa !26
  %34 = icmp slt i32 %31, %33
  %35 = load ptr, ptr %11, align 8, !tbaa !24
  %36 = getelementptr inbounds i32, ptr %35, i64 %20
  %. = zext i1 %34 to i32
  store i32 %., ptr %36, align 4, !tbaa !26
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 1)
  %38 = load i32, ptr %37, align 4, !tbaa !26
  %39 = icmp slt i32 %38, 0
  br i1 %39, label %40, label %45

40:                                               ; preds = %29
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 1)
  %43 = load i32, ptr %42, align 4, !tbaa !26
  %44 = add nsw i32 %43, %41
  store i32 %44, ptr %42, align 4, !tbaa !26
  br label %45

45:                                               ; preds = %40, %29
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 1)
  %47 = load i32, ptr %46, align 4, !tbaa !26
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef 1)
  %49 = load i32, ptr %48, align 4, !tbaa !26
  %50 = icmp slt i32 %47, %49
  %51 = load ptr, ptr %11, align 8, !tbaa !24
  %52 = or disjoint i64 %20, 1
  %53 = getelementptr inbounds i32, ptr %51, i64 %52
  %.21 = zext i1 %50 to i32
  store i32 %.21, ptr %53, align 4, !tbaa !26
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 2)
  %55 = load i32, ptr %54, align 4, !tbaa !26
  %56 = icmp slt i32 %55, 0
  br i1 %56, label %57, label %62

57:                                               ; preds = %45
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 2)
  %60 = load i32, ptr %59, align 4, !tbaa !26
  %61 = add nsw i32 %60, %58
  store i32 %61, ptr %59, align 4, !tbaa !26
  br label %62

62:                                               ; preds = %57, %45
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 2)
  %64 = load i32, ptr %63, align 4, !tbaa !26
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef 2)
  %66 = load i32, ptr %65, align 4, !tbaa !26
  %67 = icmp slt i32 %64, %66
  %68 = load ptr, ptr %11, align 8, !tbaa !24
  %69 = or disjoint i64 %20, 2
  %70 = getelementptr inbounds i32, ptr %68, i64 %69
  %.22 = zext i1 %67 to i32
  store i32 %.22, ptr %70, align 4, !tbaa !26
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 3)
  %72 = load i32, ptr %71, align 4, !tbaa !26
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %79

74:                                               ; preds = %62
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 3)
  %77 = load i32, ptr %76, align 4, !tbaa !26
  %78 = add nsw i32 %77, %75
  store i32 %78, ptr %76, align 4, !tbaa !26
  br label %79

79:                                               ; preds = %74, %62
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef 3)
  %81 = load i32, ptr %80, align 4, !tbaa !26
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef 3)
  %83 = load i32, ptr %82, align 4, !tbaa !26
  %84 = icmp slt i32 %81, %83
  %85 = load ptr, ptr %11, align 8, !tbaa !24
  %86 = or disjoint i64 %20, 3
  %87 = getelementptr inbounds i32, ptr %85, i64 %86
  %.23 = zext i1 %84 to i32
  store i32 %.23, ptr %87, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next, %89
  br i1 %90, label %13, label %._crit_edge, !llvm.loop !27
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5EigenmiIiEEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opINS2_18promote_scalar_argIiT_Xsr5Eigen8internal14has_ReturnTypeINS_20ScalarBinaryOpTraitsIS5_iNS3_IS5_iEEEEEE5valueEE4typeEiEEKNS2_19plain_constant_typeINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEESA_E4typeEKSE_EERKS5_RKNS_9ArrayBaseISE_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp.77") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen5ArrayIiLi4ELi1ELi0ELi4ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIiiEEKNS_14CwiseNullaryOpINS4_18scalar_constant_opIiEEKS1_EESA_EEEERKNS_9EigenBaseIT_EENS4_9enable_ifIXsr8internal14is_convertibleINSF_6ScalarEiEE5valueENS1_11PrivateTypeEE4typeE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !22, i64 116}
!6 = !{!"_ZTS18OffsetDurationGait", !7, i64 0, !10, i64 40, !14, i64 48, !14, i64 64, !18, i64 80, !18, i64 96, !22, i64 112, !22, i64 116, !23, i64 120}
!7 = !{!"_ZTS4Gait", !8, i64 8}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSN5Eigen5ArrayIiLi4ELi1ELi0ELi4ELi1EEE", !15, i64 0}
!15 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_5ArrayIiLi4ELi1ELi0ELi4ELi1EEEEE", !16, i64 0}
!16 = !{!"_ZTSN5Eigen12DenseStorageIiLi4ELi4ELi1ELi0EEE", !17, i64 0}
!17 = !{!"_ZTSN5Eigen8internal11plain_arrayIiLi4ELi0ELi16EEE", !11, i64 0}
!18 = !{!"_ZTSN5Eigen5ArrayIfLi4ELi1ELi0ELi4ELi1EEE", !19, i64 0}
!19 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_5ArrayIfLi4ELi1ELi0ELi4ELi1EEEEE", !20, i64 0}
!20 = !{!"_ZTSN5Eigen12DenseStorageIfLi4ELi4ELi1ELi0EEE", !21, i64 0}
!21 = !{!"_ZTSN5Eigen8internal11plain_arrayIfLi4ELi0ELi16EEE", !11, i64 0}
!22 = !{!"int", !11, i64 0}
!23 = !{!"float", !11, i64 0}
!24 = !{!6, !10, i64 40}
!25 = !{!6, !22, i64 112}
!26 = !{!22, !22, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass