; LLVM IR from sympiler/nasoq :: src/nasoq_step.ll (ZN5nasoq9NasoqStepC2EmPiS1_PdS2_mmS1_S1_S2_S2_)

; 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.nasoq::NasoqStep" = type <{ %"struct.nasoq::Nasoq", i32, i32, i32, i32, i32, [4 x i8], double, double, double, i32, i32, i32, [4 x i8] }>
%"struct.nasoq::Nasoq" = type { %"class.std::__cxx11::basic_string", i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, double, double, double, double, double, double, double, double, double, i32, i32, i32, double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, ptr, ptr, ptr, ptr, ptr, ptr, double, double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::vector", ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, double, double, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double }
%"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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5nasoq9NasoqStepC2EmPiS1_PdS2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(684) %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) unnamed_addr #0 align 2 {
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store i64 %1, ptr %14, align 8, !tbaa !9
  store ptr %2, ptr %15, align 8, !tbaa !5
  store ptr %3, ptr %16, align 8, !tbaa !5
  store ptr %4, ptr %17, align 8, !tbaa !5
  store ptr %5, ptr %18, align 8, !tbaa !5
  store i64 %6, ptr %19, align 8, !tbaa !9
  store i64 %7, ptr %20, align 8, !tbaa !9
  store ptr %8, ptr %21, align 8, !tbaa !5
  store ptr %9, ptr %22, align 8, !tbaa !5
  store ptr %10, ptr %23, align 8, !tbaa !5
  store ptr %11, ptr %24, align 8, !tbaa !5
  %25 = load ptr, ptr %13, align 8
  %26 = load i64, ptr %14, align 8, !tbaa !9
  %27 = load ptr, ptr %15, align 8, !tbaa !5
  %28 = load ptr, ptr %16, align 8, !tbaa !5
  %29 = load ptr, ptr %17, align 8, !tbaa !5
  %30 = load ptr, ptr %18, align 8, !tbaa !5
  %31 = load i64, ptr %19, align 8, !tbaa !9
  %32 = load i64, ptr %20, align 8, !tbaa !9
  %33 = load ptr, ptr %21, align 8, !tbaa !5
  %34 = load ptr, ptr %22, align 8, !tbaa !5
  %35 = load ptr, ptr %23, align 8, !tbaa !5
  %36 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(624) %25, i64 noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, i64 noundef %31, i64 noundef %32, ptr noundef %33, ptr noundef %34, ptr noundef %35, ptr noundef %36)
  %37 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %25, i32 0, i32 1
  store i32 -1, ptr %37, align 8, !tbaa !11
  %38 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %25, i32 0, i32 2
  store i32 -1, ptr %38, align 4, !tbaa !25
  %39 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %25, i32 0, i32 3
  store i32 1, ptr %39, align 8, !tbaa !26
  %40 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %25, i32 0, i32 4
  store i32 0, ptr %40, align 4, !tbaa !27
  %41 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %25, i32 0, i32 5
  store i32 0, ptr %41, align 8, !tbaa !28
  %42 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %25, i32 0, i32 10
  store i32 3, ptr %42, align 8, !tbaa !29
  ret void
}

declare void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(624), i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #1

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 = { "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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !16, i64 624}
!12 = !{!"_ZTSN5nasoq9NasoqStepE", !13, i64 0, !16, i64 624, !16, i64 628, !16, i64 632, !16, i64 636, !16, i64 640, !17, i64 648, !17, i64 656, !17, i64 664, !24, i64 672, !16, i64 676, !16, i64 680}
!13 = !{!"_ZTSN5nasoq5NasoqE", !14, i64 0, !16, i64 32, !16, i64 36, !16, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !16, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !16, i64 200, !16, i64 204, !16, i64 208, !17, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !10, i64 304, !16, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !17, i64 368, !17, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !18, i64 448, !6, i64 472, !16, i64 480, !16, i64 484, !16, i64 488, !16, i64 492, !16, i64 496, !16, i64 500, !16, i64 504, !16, i64 508, !6, i64 512, !17, i64 520, !17, i64 528, !22, i64 536, !23, i64 540, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !17, i64 608, !17, i64 616}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !10, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSN5nasoq10nasoq_modeE", !7, i64 0}
!23 = !{!"_ZTSN5nasoq12nasoq_statusE", !7, i64 0}
!24 = !{!"_ZTSN5nasoq10solve_typeE", !7, i64 0}
!25 = !{!12, !16, i64 628}
!26 = !{!12, !16, i64 632}
!27 = !{!12, !16, i64 636}
!28 = !{!12, !16, i64 640}
!29 = !{!12, !24, i64 672}


; 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 uwtable
define dso_local void @_ZN5nasoq9NasoqStepC2EmPiS1_PdS2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(684) %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) unnamed_addr #0 align 2 {
  tail call void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(624) %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 624
  store <4 x i32> <i32 -1, i32 -1, i32 1, i32 0>, ptr %13, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 640
  store i32 0, ptr %14, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %0, i64 672
  store i32 3, ptr %15, align 8, !tbaa !24
  ret void
}

declare void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(624), i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #1

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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 640}
!10 = !{!"_ZTSN5nasoq9NasoqStepE", !11, i64 0, !6, i64 624, !6, i64 628, !6, i64 632, !6, i64 636, !6, i64 640, !16, i64 648, !16, i64 656, !16, i64 664, !23, i64 672, !6, i64 676, !6, i64 680}
!11 = !{!"_ZTSN5nasoq5NasoqE", !12, i64 0, !6, i64 32, !6, i64 36, !6, 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, !6, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !16, i64 184, !16, i64 192, !6, i64 200, !6, i64 204, !6, i64 208, !16, i64 216, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !14, i64 264, !14, i64 272, !14, i64 280, !14, i64 288, !14, i64 296, !15, i64 304, !6, i64 312, !14, i64 320, !14, i64 328, !14, i64 336, !14, i64 344, !14, i64 352, !14, i64 360, !16, i64 368, !16, i64 376, !14, i64 384, !14, i64 392, !14, i64 400, !14, i64 408, !14, i64 416, !14, i64 424, !14, i64 432, !14, i64 440, !17, i64 448, !14, i64 472, !6, i64 480, !6, i64 484, !6, i64 488, !6, i64 492, !6, i64 496, !6, i64 500, !6, i64 504, !6, i64 508, !14, i64 512, !16, i64 520, !16, i64 528, !21, i64 536, !22, i64 540, !14, i64 544, !14, i64 552, !14, i64 560, !14, i64 568, !14, i64 576, !14, i64 584, !14, i64 592, !14, i64 600, !16, i64 608, !16, i64 616}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!21 = !{!"_ZTSN5nasoq10nasoq_modeE", !7, i64 0}
!22 = !{!"_ZTSN5nasoq12nasoq_statusE", !7, i64 0}
!23 = !{!"_ZTSN5nasoq10solve_typeE", !7, i64 0}
!24 = !{!10, !23, i64 672}


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