; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/qpoases/src/Options.ll (ZN7qpOASES7Options8setToMPCEv)

; 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.qpOASES::Options" = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, double, double, double, i32, i32, i32, i32, i32, [4 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7qpOASES7Options12setToDefaultEv(ptr noundef nonnull align 8 dereferenceable(220)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN7qpOASES7Options8setToMPCEv(ptr noundef nonnull align 8 dereferenceable(220) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = call noundef i32 @_ZN7qpOASES7Options12setToDefaultEv(ptr noundef nonnull align 8 dereferenceable(220) %3)
  %5 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 1
  store i32 0, ptr %5, align 4, !tbaa !9
  %6 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 2
  store i32 1, ptr %6, align 8, !tbaa !16
  %7 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 3
  store i32 0, ptr %7, align 4, !tbaa !17
  %8 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 4
  store i32 1, ptr %8, align 8, !tbaa !18
  %9 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 6
  store i32 0, ptr %9, align 8, !tbaa !19
  %10 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 7
  store i32 0, ptr %10, align 4, !tbaa !20
  %11 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 9
  store i32 1, ptr %11, align 4, !tbaa !21
  %12 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 10
  store double 2.221000e-07, ptr %12, align 8, !tbaa !22
  %13 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 21
  store i32 0, ptr %13, align 8, !tbaa !23
  %14 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 24
  store i32 1, ptr %14, align 8, !tbaa !24
  %15 = getelementptr inbounds %"class.qpOASES::Options", ptr %3, i32 0, i32 27
  store i32 0, ptr %15, align 8, !tbaa !25
  ret i32 0
}

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

!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, !12, i64 4}
!10 = !{!"_ZTSN7qpOASES7OptionsE", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !13, i64 28, !13, i64 32, !12, i64 36, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !15, i64 128, !14, i64 136, !13, i64 144, !14, i64 152, !13, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !12, i64 200, !12, i64 204, !13, i64 208, !13, i64 212, !13, i64 216}
!11 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!12 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!16 = !{!10, !12, i64 8}
!17 = !{!10, !12, i64 12}
!18 = !{!10, !12, i64 16}
!19 = !{!10, !12, i64 24}
!20 = !{!10, !13, i64 28}
!21 = !{!10, !12, i64 36}
!22 = !{!10, !14, i64 40}
!23 = !{!10, !15, i64 128}
!24 = !{!10, !13, i64 144}
!25 = !{!10, !13, i64 160}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7qpOASES7Options12setToDefaultEv(ptr noundef nonnull align 8 dereferenceable(220)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN7qpOASES7Options8setToMPCEv(ptr noundef nonnull align 8 dereferenceable(220) %0) local_unnamed_addr #0 align 2 {
  %2 = tail call noundef i32 @_ZN7qpOASES7Options12setToDefaultEv(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  store <4 x i32> <i32 0, i32 1, i32 0, i32 1>, ptr %3, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %4, align 8, !tbaa !9
  %5 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 0, ptr %5, align 4, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 1, ptr %6, align 4, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  store double 2.221000e-07, ptr %7, align 8, !tbaa !17
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  store i32 0, ptr %8, align 8, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 1, ptr %9, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 160
  store i32 0, ptr %10, align 8, !tbaa !20
  ret i32 0
}

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

!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 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"_ZTSN7qpOASES7OptionsE", !11, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !12, i64 28, !12, i64 32, !6, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !14, i64 128, !13, i64 136, !12, i64 144, !13, i64 152, !12, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !6, i64 200, !6, i64 204, !12, i64 208, !12, i64 212, !12, i64 216}
!11 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!15 = !{!10, !12, i64 28}
!16 = !{!10, !6, i64 36}
!17 = !{!10, !13, i64 40}
!18 = !{!10, !14, i64 128}
!19 = !{!10, !12, i64 144}
!20 = !{!10, !12, i64 160}


; Effective O3 passes: GlobalOptPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass