; LLVM IR from kylestach/controls :: ilqr (ilqr_demo)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.ContinuousPendulum = type { i8 }
%struct.QuadraticCost = type { i8 }
%struct.ExponentialFinalCost = type { i8 }
%struct.Discretized = type { double, [8 x i8] }
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [2 x double] }
%struct.Policy = type { %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::Matrix.8" = type { %"class.Eigen::PlainObjectBase.9" }
%"class.Eigen::PlainObjectBase.9" = type { %"class.Eigen::DenseStorage.16" }
%"class.Eigen::DenseStorage.16" = type { %"struct.Eigen::internal::plain_array.17" }
%"struct.Eigen::internal::plain_array.17" = type { [1 x double] }
%"class.Eigen::CwiseUnaryOp" = type { [8 x i8], %"class.Eigen::CwiseBinaryOp", [8 x i8] }
%"class.Eigen::CwiseBinaryOp" = type <{ %"class.Eigen::Product", ptr, [8 x i8] }>
%"class.Eigen::Product" = type { ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.ContinuousPendulum, align 1
  %3 = alloca %struct.QuadraticCost, align 1
  %4 = alloca %struct.ExponentialFinalCost, align 1
  %5 = alloca %struct.Discretized, align 8
  %6 = alloca %"class.Eigen::Matrix", align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Policy, align 8
  %11 = alloca %struct.ContinuousPendulum, align 1
  %12 = alloca %struct.QuadraticCost, align 1
  %13 = alloca %struct.ExponentialFinalCost, align 1
  %14 = alloca %"class.Eigen::Matrix", align 16
  %15 = alloca %"class.Eigen::Matrix", align 16
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.Eigen::Matrix.8", align 8
  %20 = alloca %"class.Eigen::CwiseUnaryOp", align 8
  %21 = alloca %"class.Eigen::CwiseBinaryOp", align 8
  %22 = alloca %"class.Eigen::Product", align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.Eigen::Matrix", align 16
  %26 = alloca %"class.Eigen::Matrix", align 16
  %27 = alloca %"class.Eigen::Matrix.8", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  %28 = getelementptr inbounds %struct.Discretized, ptr %5, i32 0, i32 0
  store double 1.000000e-02, ptr %28, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %5, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 600, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #6
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2ERKS1_(ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 16 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store double 0x400921FB54442D18, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2IdiEERKT_RKT0_(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %30 = load i32, ptr %9, align 4, !tbaa !11
  call void @_Z4ilqrILi2ELi1E18ContinuousPendulum13QuadraticCost20ExponentialFinalCostE6PolicyIXT_EXT0_EET1_T2_T3_N5Eigen6MatrixIdXT_ELi1EXorLNS8_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELSA_1EquaaeqLi1ELi1EneT_Li1ELSA_0ELSA_0EEXT_ELi1EEESB_i(ptr dead_on_unwind writable sret(%struct.Policy) align 8 %10, ptr noundef %14, ptr noundef %15, i32 noundef %30)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %31

31:                                               ; preds = %81, %0
  %32 = load i32, ptr %18, align 4, !tbaa !11
  %33 = load i32, ptr %9, align 4, !tbaa !11
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %97

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  %37 = getelementptr inbounds %struct.Policy, ptr %10, i32 0, i32 0
  %38 = load i32, ptr %18, align 4, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi1ELi2ELi1ELi1ELi2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #6
  %41 = invoke { ptr, ptr } @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEEEmlINS1_IdLi2ELi1ELi0ELi2ELi1EEEEEKNS_7ProductIS2_T_Li0EEERKNS0_IS7_EE(ptr noundef nonnull align 1 dereferenceable(1) %40, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %42 unwind label %84

42:                                               ; preds = %36
  %43 = getelementptr inbounds { ptr, ptr }, ptr %22, i32 0, i32 0
  %44 = extractvalue { ptr, ptr } %41, 0
  store ptr %44, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, ptr }, ptr %22, i32 0, i32 1
  %46 = extractvalue { ptr, ptr } %41, 1
  store ptr %46, ptr %45, align 8
  %47 = getelementptr inbounds %struct.Policy, ptr %10, i32 0, i32 1
  %48 = load i32, ptr %18, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi1ELi1ELi0ELi1ELi1EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #6
  invoke void @_ZNK5Eigen10MatrixBaseINS_7ProductINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEENS2_IdLi2ELi1ELi0ELi2ELi1EEELi0EEEEplINS2_IdLi1ELi1ELi0ELi1ELi1EEEEEKNS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdNSA_6traitsIT_E6ScalarEEEKS5_KSD_EERKNS0_ISD_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp") align 8 %21, ptr noundef nonnull align 1 dereferenceable(1) %22, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %51 unwind label %84

51:                                               ; preds = %42
  invoke void @_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_sum_opIddEEKNS_7ProductINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEENS6_IdLi2ELi1ELi0ELi2ELi1EEELi0EEEKNS6_IdLi1ELi1ELi0ELi1ELi1EEEEEEngEv(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryOp") align 8 %20, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %52 unwind label %84

52:                                               ; preds = %51
  invoke void @_ZN5Eigen6MatrixIdLi1ELi1ELi0ELi1ELi1EEC2INS_12CwiseUnaryOpINS_8internal18scalar_opposite_opIdEEKNS_13CwiseBinaryOpINS4_13scalar_sum_opIddEEKNS_7ProductINS0_IdLi1ELi2ELi1ELi1ELi2EEENS0_IdLi2ELi1ELi0ELi2ELi1EEELi0EEEKS1_EEEEEERKNS_9EigenBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %53 unwind label %84

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %20) #6
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %6, i64 noundef 0)
          to label %55 unwind label %88

55:                                               ; preds = %53
  %56 = load double, ptr %54, align 8, !tbaa !13
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %56)
          to label %58 unwind label %88

58:                                               ; preds = %55
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef @.str)
          to label %60 unwind label %88

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %6, i64 noundef 1)
          to label %62 unwind label %88

62:                                               ; preds = %60
  %63 = load double, ptr %61, align 8, !tbaa !13
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %59, double noundef %63)
          to label %65 unwind label %88

65:                                               ; preds = %62
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @.str)
          to label %67 unwind label %88

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi1ELi1ELi0ELi1ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %19, i64 noundef 0)
          to label %69 unwind label %88

69:                                               ; preds = %67
  %70 = load double, ptr %68, align 8, !tbaa !13
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %66, double noundef %70)
          to label %72 unwind label %88

72:                                               ; preds = %69
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %74 unwind label %88

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  invoke void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2ERKS1_(ptr noundef nonnull align 16 dereferenceable(16) %26, ptr noundef nonnull align 16 dereferenceable(16) %6)
          to label %75 unwind label %92

75:                                               ; preds = %74
  invoke void @_ZN5Eigen6MatrixIdLi1ELi1ELi0ELi1ELi1EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %76 unwind label %92

76:                                               ; preds = %75
  %77 = load i32, ptr %18, align 4, !tbaa !11
  %78 = sitofp i32 %77 to double
  invoke void @_ZN11DiscretizedILi2ELi1E18ContinuousPendulumEclEN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEENS3_IdLi1ELi1ELi0ELi1ELi1EEEd(ptr dead_on_unwind writable sret(%"class.Eigen::Matrix") align 16 %25, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %26, ptr noundef %27, double noundef %78)
          to label %79 unwind label %92

79:                                               ; preds = %76
  %80 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEaSEOS1_(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %81

81:                                               ; preds = %79
  %82 = load i32, ptr %18, align 4, !tbaa !11
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %18, align 4, !tbaa !11
  br label %31, !llvm.loop !14

84:                                               ; preds = %52, %51, %42, %36
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %23, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %20) #6
  br label %96

88:                                               ; preds = %72, %69, %67, %65, %62, %60, %58, %55, %53
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %23, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %24, align 4
  br label %96

92:                                               ; preds = %76, %75, %74
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %23, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  br label %96

96:                                               ; preds = %92, %88, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZN6PolicyILi2ELi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  br label %99

97:                                               ; preds = %35
  call void @_ZN6PolicyILi2ELi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  %98 = load i32, ptr %1, align 4
  ret i32 %98

99:                                               ; preds = %96
  %100 = load ptr, ptr %23, align 8
  %101 = load i32, ptr %24, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4ilqrILi2ELi1E18ContinuousPendulum13QuadraticCost20ExponentialFinalCostE6PolicyIXT_EXT0_EET1_T2_T3_N5Eigen6MatrixIdXT_ELi1EXorLNS8_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELSA_1EquaaeqLi1ELi1EneT_Li1ELSA_0ELSA_0EEXT_ELi1EEESB_i(ptr dead_on_unwind noalias writable sret(%struct.Policy) align 8, ptr noundef, ptr noundef, i32 noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi1ELi2ELi1ELi1ELi2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEEEmlINS1_IdLi2ELi1ELi0ELi2ELi1EEEEEKNS_7ProductIS2_T_Li0EEERKNS0_IS7_EE(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11DiscretizedILi2ELi1E18ContinuousPendulumEclEN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEENS3_IdLi1ELi1ELi0ELi1ELi1EEEd(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Matrix") align 16, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, double noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEaSEOS1_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6PolicyILi2ELi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse 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 = { 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 = { 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 = { 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 = { inlinehint 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 #6 = { 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 = !{!"_ZTS11DiscretizedILi2ELi1E18ContinuousPendulumE", !7, i64 0, !10, i64 8}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS18ContinuousPendulum"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.Discretized = type { double, [8 x i8] }
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [2 x double] }
%struct.Policy = type { %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 2>, std::allocator<Eigen::Matrix<double, 1, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 1, 1>, std::allocator<Eigen::Matrix<double, 1, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::Matrix.8" = type { %"class.Eigen::PlainObjectBase.9" }
%"class.Eigen::PlainObjectBase.9" = type { %"class.Eigen::DenseStorage.16" }
%"class.Eigen::DenseStorage.16" = type { %"struct.Eigen::internal::plain_array.17" }
%"struct.Eigen::internal::plain_array.17" = type { [1 x double] }
%"class.Eigen::CwiseUnaryOp" = type { [8 x i8], %"class.Eigen::CwiseBinaryOp", [8 x i8] }
%"class.Eigen::CwiseBinaryOp" = type <{ %"class.Eigen::Product", ptr, [8 x i8] }>
%"class.Eigen::Product" = type { ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.Discretized, align 8
  %2 = alloca %"class.Eigen::Matrix", align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.Policy, align 8
  %6 = alloca %"class.Eigen::Matrix", align 16
  %7 = alloca %"class.Eigen::Matrix", align 16
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.Eigen::Matrix.8", align 8
  %11 = alloca %"class.Eigen::CwiseUnaryOp", align 8
  %12 = alloca %"class.Eigen::CwiseBinaryOp", align 8
  %13 = alloca %"class.Eigen::Product", align 8
  %14 = alloca %"class.Eigen::Matrix", align 16
  %15 = alloca %"class.Eigen::Matrix", align 16
  %16 = alloca %"class.Eigen::Matrix.8", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #6
  store double 1.000000e-02, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 0, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 0, ptr %4, align 4, !tbaa !11
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 16 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2ERKS1_(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store double 0x400921FB54442D18, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 0, ptr %9, align 4, !tbaa !11
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2IdiEERKT_RKT0_(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @_Z4ilqrILi2ELi1E18ContinuousPendulum13QuadraticCost20ExponentialFinalCostE6PolicyIXT_EXT0_EET1_T2_T3_N5Eigen6MatrixIdXT_ELi1EXorLNS8_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELSA_1EquaaeqLi1ELi1EneT_Li1ELSA_0ELSA_0EEXT_ELi1EEESB_i(ptr dead_on_unwind nonnull writable sret(%struct.Policy) align 8 %5, ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef 600)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %17 = getelementptr inbounds i8, ptr %13, i64 8
  %18 = getelementptr inbounds i8, ptr %5, i64 24
  br label %20

19:                                               ; preds = %55
  call void @_ZN6PolicyILi2ELi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  ret i32 0

20:                                               ; preds = %0, %55
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %55 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %21 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi1ELi2ELi1ELi1ELi2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #6
  %22 = invoke { ptr, ptr } @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEEEmlINS1_IdLi2ELi1ELi0ELi2ELi1EEEEEKNS_7ProductIS2_T_Li0EEERKNS0_IS7_EE(ptr noundef nonnull align 1 dereferenceable(1) %21, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %23 unwind label %57

23:                                               ; preds = %20
  %24 = extractvalue { ptr, ptr } %22, 0
  store ptr %24, ptr %13, align 8
  %25 = extractvalue { ptr, ptr } %22, 1
  store ptr %25, ptr %17, align 8
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi1ELi1ELi0ELi1ELi1EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #6
  invoke void @_ZNK5Eigen10MatrixBaseINS_7ProductINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEENS2_IdLi2ELi1ELi0ELi2ELi1EEELi0EEEEplINS2_IdLi1ELi1ELi0ELi1ELi1EEEEEKNS_13CwiseBinaryOpINS_8internal13scalar_sum_opIdNSA_6traitsIT_E6ScalarEEEKS5_KSD_EERKNS0_ISD_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp") align 8 %12, ptr noundef nonnull align 1 dereferenceable(1) %13, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %27 unwind label %57

27:                                               ; preds = %23
  invoke void @_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_sum_opIddEEKNS_7ProductINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEENS6_IdLi2ELi1ELi0ELi2ELi1EEELi0EEEKNS6_IdLi1ELi1ELi0ELi1ELi1EEEEEEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryOp") align 8 %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %28 unwind label %57

28:                                               ; preds = %27
  invoke void @_ZN5Eigen6MatrixIdLi1ELi1ELi0ELi1ELi1EEC2INS_12CwiseUnaryOpINS_8internal18scalar_opposite_opIdEEKNS_13CwiseBinaryOpINS4_13scalar_sum_opIddEEKNS_7ProductINS0_IdLi1ELi2ELi1ELi1ELi2EEENS0_IdLi2ELi1ELi0ELi2ELi1EEELi0EEEKS1_EEEEEERKNS_9EigenBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %29 unwind label %57

29:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %2, i64 noundef 0)
          to label %31 unwind label %59

31:                                               ; preds = %29
  %32 = load double, ptr %30, align 8, !tbaa !13
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %32)
          to label %34 unwind label %59

34:                                               ; preds = %31
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull @.str)
          to label %36 unwind label %59

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %2, i64 noundef 1)
          to label %38 unwind label %59

38:                                               ; preds = %36
  %39 = load double, ptr %37, align 8, !tbaa !13
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %35, double noundef %39)
          to label %41 unwind label %59

41:                                               ; preds = %38
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @.str)
          to label %43 unwind label %59

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi1ELi1ELi0ELi1ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef 0)
          to label %45 unwind label %59

45:                                               ; preds = %43
  %46 = load double, ptr %44, align 8, !tbaa !13
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %42, double noundef %46)
          to label %48 unwind label %59

48:                                               ; preds = %45
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %50 unwind label %59

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  invoke void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2ERKS1_(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) %2)
          to label %51 unwind label %61

51:                                               ; preds = %50
  invoke void @_ZN5Eigen6MatrixIdLi1ELi1ELi0ELi1ELi1EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %52 unwind label %61

52:                                               ; preds = %51
  %53 = trunc nuw nsw i64 %indvars.iv to i32
  %54 = uitofp nneg i32 %53 to double
  invoke void @_ZN11DiscretizedILi2ELi1E18ContinuousPendulumEclEN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEENS3_IdLi1ELi1ELi0ELi1ELi1EEEd(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Matrix") align 16 %14, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull %15, ptr noundef nonnull %16, double noundef %54)
          to label %55 unwind label %61

55:                                               ; preds = %52
  %56 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEaSEOS1_(ptr noundef nonnull align 16 dereferenceable(16) %2, ptr noundef nonnull align 16 dereferenceable(16) %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 600
  br i1 %exitcond.not, label %19, label %20, !llvm.loop !14

57:                                               ; preds = %28, %27, %23, %20
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  br label %63

59:                                               ; preds = %48, %45, %43, %41, %38, %36, %34, %31, %29
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %63

61:                                               ; preds = %52, %51, %50
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br label %63

63:                                               ; preds = %61, %59, %57
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN6PolicyILi2ELi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4ilqrILi2ELi1E18ContinuousPendulum13QuadraticCost20ExponentialFinalCostE6PolicyIXT_EXT0_EET1_T2_T3_N5Eigen6MatrixIdXT_ELi1EXorLNS8_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELSA_1EquaaeqLi1ELi1EneT_Li1ELSA_0ELSA_0EEXT_ELi1EEESB_i(ptr dead_on_unwind noalias writable sret(%struct.Policy) align 8, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi1ELi2ELi1ELi1ELi2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi1ELi2ELi1ELi1ELi2EEEEmlINS1_IdLi2ELi1ELi0ELi2ELi1EEEEEKNS_7ProductIS2_T_Li0EEERKNS0_IS7_EE(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11DiscretizedILi2ELi1E18ContinuousPendulumEclEN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEENS3_IdLi1ELi1ELi0ELi1ELi1EEEd(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Matrix") align 16, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, double noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEaSEOS1_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6PolicyILi2ELi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse 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 = { 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 = { 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 = { 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 = { inlinehint 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 #6 = { 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 = !{!"_ZTS11DiscretizedILi2ELi1E18ContinuousPendulumE", !7, i64 0, !10, i64 8}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS18ContinuousPendulum"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass