; LLVM IR from ERGO-Code/HiGHS :: src/lp_data/HighsSolution.ll (Z28resetModelStatusAndHighsInfoR19HighsLpSolverObject)

; 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.HighsLpSolverObject = type <{ ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, [4 x i8] }>
%struct.HighsInfoStruct = type { i8, i64, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, i32, double, double, i32, double, double, double, double, double }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z28resetModelStatusAndHighsInfoR19HighsLpSolverObject(ptr noundef nonnull align 8 dereferenceable(68) %0) #0 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds %class.HighsLpSolverObject, ptr %3, i32 0, i32 8
  store i32 0, ptr %4, align 8, !tbaa !9
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %class.HighsLpSolverObject, ptr %5, i32 0, i32 3
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = getelementptr inbounds %struct.HighsInfoStruct, ptr %8, i32 0, i32 10
  store double 0.000000e+00, ptr %9, align 8, !tbaa !13
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds %class.HighsLpSolverObject, ptr %10, i32 0, i32 3
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = getelementptr inbounds %struct.HighsInfoStruct, ptr %13, i32 0, i32 7
  store i32 0, ptr %14, align 4, !tbaa !19
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.HighsLpSolverObject, ptr %15, i32 0, i32 3
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = getelementptr inbounds %struct.HighsInfoStruct, ptr %18, i32 0, i32 8
  store i32 0, ptr %19, align 8, !tbaa !20
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %class.HighsLpSolverObject, ptr %20, i32 0, i32 3
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = getelementptr inbounds %struct.HighsInfoStruct, ptr %23, i32 0, i32 14
  store i32 -1, ptr %24, align 8, !tbaa !21
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %class.HighsLpSolverObject, ptr %25, i32 0, i32 3
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = getelementptr inbounds %struct.HighsInfoStruct, ptr %28, i32 0, i32 15
  store double 0x7FF0000000000000, ptr %29, align 8, !tbaa !22
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.HighsLpSolverObject, ptr %30, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = getelementptr inbounds %struct.HighsInfoStruct, ptr %33, i32 0, i32 16
  store double 0x7FF0000000000000, ptr %34, align 8, !tbaa !23
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %class.HighsLpSolverObject, ptr %35, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = getelementptr inbounds %struct.HighsInfoStruct, ptr %38, i32 0, i32 17
  store i32 -1, ptr %39, align 8, !tbaa !24
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.HighsLpSolverObject, ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !12
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = getelementptr inbounds %struct.HighsInfoStruct, ptr %43, i32 0, i32 18
  store double 0x7FF0000000000000, ptr %44, align 8, !tbaa !25
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.HighsLpSolverObject, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !12
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = getelementptr inbounds %struct.HighsInfoStruct, ptr %48, i32 0, i32 19
  store double 0x7FF0000000000000, ptr %49, align 8, !tbaa !26
  ret void
}

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, !11, i64 64}
!10 = !{!"_ZTS19HighsLpSolverObject", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64}
!11 = !{!"_ZTS16HighsModelStatus", !7, i64 0}
!12 = !{!10, !6, i64 24}
!13 = !{!14, !18, i64 48}
!14 = !{!"_ZTS15HighsInfoStruct", !15, i64 0, !16, i64 8, !17, i64 16, !17, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !17, i64 40, !17, i64 44, !18, i64 48, !18, i64 56, !18, i64 64, !18, i64 72, !17, i64 80, !18, i64 88, !18, i64 96, !17, i64 104, !18, i64 112, !18, i64 120, !18, i64 128, !18, i64 136, !18, i64 144}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!14, !17, i64 36}
!20 = !{!14, !17, i64 40}
!21 = !{!14, !17, i64 80}
!22 = !{!14, !18, i64 88}
!23 = !{!14, !18, i64 96}
!24 = !{!14, !17, i64 104}
!25 = !{!14, !18, i64 112}
!26 = !{!14, !18, i64 120}


; 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 nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local void @_Z28resetModelStatusAndHighsInfoR19HighsLpSolverObject(ptr nocapture noundef nonnull align 8 dereferenceable(68) %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 0, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  %4 = load ptr, ptr %3, align 8, !tbaa !11
  %5 = getelementptr inbounds i8, ptr %4, i64 56
  store double 0.000000e+00, ptr %5, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %4, i64 44
  store i32 0, ptr %6, align 4, !tbaa !18
  %7 = getelementptr inbounds i8, ptr %4, i64 48
  store i32 0, ptr %7, align 8, !tbaa !19
  %8 = getelementptr inbounds i8, ptr %4, i64 88
  store i32 -1, ptr %8, align 8, !tbaa !20
  %9 = getelementptr inbounds i8, ptr %4, i64 96
  store <2 x double> <double 0x7FF0000000000000, double 0x7FF0000000000000>, ptr %9, align 8, !tbaa !21
  %10 = getelementptr inbounds i8, ptr %4, i64 112
  store i32 -1, ptr %10, align 8, !tbaa !22
  %11 = getelementptr inbounds i8, ptr %4, i64 120
  store <2 x double> <double 0x7FF0000000000000, double 0x7FF0000000000000>, ptr %11, align 8, !tbaa !21
  ret void
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) 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, !10, i64 64}
!6 = !{!"_ZTS19HighsLpSolverObject", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS16HighsModelStatus", !8, i64 0}
!11 = !{!6, !7, i64 24}
!12 = !{!13, !17, i64 48}
!13 = !{!"_ZTS15HighsInfoStruct", !14, i64 0, !15, i64 8, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !16, i64 44, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !16, i64 80, !17, i64 88, !17, i64 96, !16, i64 104, !17, i64 112, !17, i64 120, !17, i64 128, !17, i64 136, !17, i64 144}
!14 = !{!"bool", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = !{!13, !16, i64 36}
!19 = !{!13, !16, i64 40}
!20 = !{!13, !16, i64 80}
!21 = !{!17, !17, i64 0}
!22 = !{!13, !16, i64 104}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass