; LLVM IR from sympiler/nasoq :: src/nasoq_step.ll (ZN5nasoq9NasoqStepC2EmPiS1_PdS2_mmS1_S1_S2_S2_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_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, i64 noundef %12, i64 noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17) unnamed_addr #0 align 2 {
  %19 = alloca ptr, 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
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  store ptr %0, ptr %19, align 8, !tbaa !5
  store i64 %1, ptr %20, align 8, !tbaa !9
  store ptr %2, ptr %21, align 8, !tbaa !5
  store ptr %3, ptr %22, align 8, !tbaa !5
  store ptr %4, ptr %23, align 8, !tbaa !5
  store ptr %5, ptr %24, align 8, !tbaa !5
  store i64 %6, ptr %25, align 8, !tbaa !9
  store i64 %7, ptr %26, align 8, !tbaa !9
  store ptr %8, ptr %27, align 8, !tbaa !5
  store ptr %9, ptr %28, align 8, !tbaa !5
  store ptr %10, ptr %29, align 8, !tbaa !5
  store ptr %11, ptr %30, align 8, !tbaa !5
  store i64 %12, ptr %31, align 8, !tbaa !9
  store i64 %13, ptr %32, align 8, !tbaa !9
  store ptr %14, ptr %33, align 8, !tbaa !5
  store ptr %15, ptr %34, align 8, !tbaa !5
  store ptr %16, ptr %35, align 8, !tbaa !5
  store ptr %17, ptr %36, align 8, !tbaa !5
  %37 = load ptr, ptr %19, align 8
  %38 = load i64, ptr %20, align 8, !tbaa !9
  %39 = load ptr, ptr %21, align 8, !tbaa !5
  %40 = load ptr, ptr %22, align 8, !tbaa !5
  %41 = load ptr, ptr %23, align 8, !tbaa !5
  %42 = load ptr, ptr %24, align 8, !tbaa !5
  %43 = load i64, ptr %25, align 8, !tbaa !9
  %44 = load i64, ptr %26, align 8, !tbaa !9
  %45 = load ptr, ptr %27, align 8, !tbaa !5
  %46 = load ptr, ptr %28, align 8, !tbaa !5
  %47 = load ptr, ptr %29, align 8, !tbaa !5
  %48 = load ptr, ptr %30, align 8, !tbaa !5
  %49 = load i64, ptr %31, align 8, !tbaa !9
  %50 = load i64, ptr %32, align 8, !tbaa !9
  %51 = load ptr, ptr %33, align 8, !tbaa !5
  %52 = load ptr, ptr %34, align 8, !tbaa !5
  %53 = load ptr, ptr %35, align 8, !tbaa !5
  %54 = load ptr, ptr %36, align 8, !tbaa !5
  call void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_mmS1_S1_S2_S2_(ptr noundef nonnull align 8 dereferenceable(624) %37, i64 noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %41, ptr noundef %42, i64 noundef %43, i64 noundef %44, ptr noundef %45, ptr noundef %46, ptr noundef %47, ptr noundef %48, i64 noundef %49, i64 noundef %50, ptr noundef %51, ptr noundef %52, ptr noundef %53, ptr noundef %54)
  %55 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %37, i32 0, i32 1
  store i32 -1, ptr %55, align 8, !tbaa !11
  %56 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %37, i32 0, i32 2
  store i32 -1, ptr %56, align 4, !tbaa !25
  %57 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %37, i32 0, i32 3
  store i32 1, ptr %57, align 8, !tbaa !26
  %58 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %37, i32 0, i32 4
  store i32 0, ptr %58, align 4, !tbaa !27
  %59 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %37, i32 0, i32 5
  store i32 0, ptr %59, align 8, !tbaa !28
  %60 = getelementptr inbounds %"struct.nasoq::NasoqStep", ptr %37, i32 0, i32 10
  store i32 3, ptr %60, align 8, !tbaa !29
  ret void
}

declare void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_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, 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_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, i64 noundef %12, i64 noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17) unnamed_addr #0 align 2 {
  tail call void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_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, i64 noundef %12, i64 noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17)
  %19 = getelementptr inbounds i8, ptr %0, i64 624
  store <4 x i32> <i32 -1, i32 -1, i32 1, i32 0>, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 640
  store i32 0, ptr %20, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %0, i64 672
  store i32 3, ptr %21, align 8, !tbaa !24
  ret void
}

declare void @_ZN5nasoq5NasoqC2EmPiS1_PdS2_mmS1_S1_S2_S2_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, 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