; LLVM IR from Yinxiaoli/iros2015_folding :: src/folding_planner/src (Registration)

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

%struct.SSolverVars = type { i32, double, %struct.SVar, %struct.SVar, i32, i32, i32, %"class.Eigen::Matrix.71", double, %"class.Eigen::Matrix.27", %"class.Eigen::Matrix.27", %"class.Eigen::Matrix.71", %"class.Eigen::Matrix.27", double, %"class.Eigen::Matrix.71", i8, i32 }
%struct.SVar = type { %"class.Eigen::Matrix.53", %"class.Eigen::Matrix.27" }
%"class.Eigen::Matrix.53" = type { %"class.Eigen::PlainObjectBase.54" }
%"class.Eigen::PlainObjectBase.54" = type { %"class.Eigen::DenseStorage.62" }
%"class.Eigen::DenseStorage.62" = type { ptr, i64 }
%"class.Eigen::Matrix.27" = type { %"class.Eigen::PlainObjectBase.28" }
%"class.Eigen::PlainObjectBase.28" = type { %"class.Eigen::DenseStorage.36" }
%"class.Eigen::DenseStorage.36" = type { ptr, i64 }
%"class.Eigen::Matrix.71" = type { %"class.Eigen::PlainObjectBase.72" }
%"class.Eigen::PlainObjectBase.72" = type { %"class.Eigen::DenseStorage.80" }
%"class.Eigen::DenseStorage.80" = type { ptr, i64, i64 }

@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z22UpdateCurveSubdivisionPK11SParametersR4SVarS3_P6SCurveR11SSolverVars(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(240)) #0

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

declare void @_Z14initSolverVarsPK11SParametersPK6SCurveRK4SVarR11SSolverVarsb(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(240), i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z26SecantLMMethodSingleUpdatePK11SParametersPK6SCurveRK4SVarR11SSolverVarsRS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(32)) #0

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17ShowFeaturePointsPK6SCurveRK4SVar(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14SecantLMMethodPK11SParametersP6SCurveR4SVarR11SSolverVarsS5_(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(240) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  %14 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_Z14initSolverVarsPK11SParametersPK6SCurveRK4SVarR11SSolverVarsb(ptr noundef %11, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(240) %14, i1 noundef zeroext false)
  br label %15

15:                                               ; preds = %23, %5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_Z26SecantLMMethodSingleUpdatePK11SParametersPK6SCurveRK4SVarR11SSolverVarsRS5_(ptr noundef %16, ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(240) %19, ptr noundef nonnull align 8 dereferenceable(32) %20)
  br i1 %21, label %22, label %23

22:                                               ; preds = %15
  br label %29

23:                                               ; preds = %15
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_Z22UpdateCurveSubdivisionPK11SParametersR4SVarS3_P6SCurveR11SSolverVars(ptr noundef %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef %27, ptr noundef nonnull align 8 dereferenceable(240) %28)
  br label %15, !llvm.loop !9

29:                                               ; preds = %22
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.SSolverVars, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %32)
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.SSolverVars, ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4SVaraSERKS_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(32) %35)
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_Z17ShowFeaturePointsPK6SCurveRK4SVar(ptr noundef %38, ptr noundef nonnull align 8 dereferenceable(32) %39)
  ret void
}

attributes #0 = { 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 #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!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"}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS11SSolverVars", !13, i64 0, !14, i64 8, !15, i64 16, !15, i64 48, !13, i64 80, !13, i64 84, !13, i64 88, !23, i64 96, !14, i64 120, !20, i64 128, !20, i64 144, !23, i64 160, !20, i64 184, !14, i64 200, !23, i64 208, !26, i64 232, !13, i64 236}
!13 = !{!"int", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTS4SVar", !16, i64 0, !20, i64 16}
!16 = !{!"_ZTSN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEE", !17, i64 0}
!17 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEEE", !18, i64 0}
!18 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELi2ELin1ELi0EEE", !6, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN5Eigen6MatrixIdLin1ELi1ELi0ELin1ELi1EEE", !21, i64 0}
!21 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEEE", !22, i64 0}
!22 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELin1ELi1ELi0EEE", !6, i64 0, !19, i64 8}
!23 = !{!"_ZTSN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEE", !24, i64 0}
!24 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEEE", !25, i64 0}
!25 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELin1ELin1ELi0EEE", !6, i64 0, !19, i64 8, !19, i64 16}
!26 = !{!"bool", !7, i64 0}


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

@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z22UpdateCurveSubdivisionPK11SParametersR4SVarS3_P6SCurveR11SSolverVars(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(240)) local_unnamed_addr #0

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

declare void @_Z14initSolverVarsPK11SParametersPK6SCurveRK4SVarR11SSolverVarsb(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(240), i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z26SecantLMMethodSingleUpdatePK11SParametersPK6SCurveRK4SVarR11SSolverVarsRS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17ShowFeaturePointsPK6SCurveRK4SVar(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14SecantLMMethodPK11SParametersP6SCurveR4SVarR11SSolverVarsS5_(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(240) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) local_unnamed_addr #0 {
  tail call void @_Z14initSolverVarsPK11SParametersPK6SCurveRK4SVarR11SSolverVarsb(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(240) %3, i1 noundef zeroext false)
  %6 = tail call noundef zeroext i1 @_Z26SecantLMMethodSingleUpdatePK11SParametersPK6SCurveRK4SVarR11SSolverVarsRS5_(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(240) %3, ptr noundef nonnull align 8 dereferenceable(32) %4)
  br i1 %6, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5, %.lr.ph
  tail call void @_Z22UpdateCurveSubdivisionPK11SParametersR4SVarS3_P6SCurveR11SSolverVars(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(240) %3)
  %7 = tail call noundef zeroext i1 @_Z26SecantLMMethodSingleUpdatePK11SParametersPK6SCurveRK4SVarR11SSolverVarsRS5_(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(240) %3, ptr noundef nonnull align 8 dereferenceable(32) %4)
  br i1 %7, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %5
  %8 = load i32, ptr %3, align 8, !tbaa !7
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %8)
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  %11 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4SVaraSERKS_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %10)
  tail call void @_Z17ShowFeaturePointsPK6SCurveRK4SVar(ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %4)
  ret void
}

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTS11SSolverVars", !9, i64 0, !12, i64 8, !13, i64 16, !13, i64 48, !9, i64 80, !9, i64 84, !9, i64 88, !22, i64 96, !12, i64 120, !19, i64 128, !19, i64 144, !22, i64 160, !19, i64 184, !12, i64 200, !22, i64 208, !25, i64 232, !9, i64 236}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"double", !10, i64 0}
!13 = !{!"_ZTS4SVar", !14, i64 0, !19, i64 16}
!14 = !{!"_ZTSN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEE", !15, i64 0}
!15 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEEE", !16, i64 0}
!16 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELi2ELin1ELi0EEE", !17, i64 0, !18, i64 8}
!17 = !{!"any pointer", !10, i64 0}
!18 = !{!"long", !10, i64 0}
!19 = !{!"_ZTSN5Eigen6MatrixIdLin1ELi1ELi0ELin1ELi1EEE", !20, i64 0}
!20 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEEE", !21, i64 0}
!21 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELin1ELi1ELi0EEE", !17, i64 0, !18, i64 8}
!22 = !{!"_ZTSN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEE", !23, i64 0}
!23 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEEEE", !24, i64 0}
!24 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELin1ELin1ELi0EEE", !17, i64 0, !18, i64 8, !18, i64 16}
!25 = !{!"bool", !10, i64 0}


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