; LLVM IR from Tinker-Twins/3D-LIDAR-Localization :: fast_gicp/thirdparty/nvbio/contrib/moderngpu/src (sparsematrix)

; 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.std::auto_ptr" = type { ptr }
%"struct.mgpu::SparseMatrix" = type { i32, i32, i32, %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.8" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4mgpu12SparseMatrixC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEaSERS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4mgpu16LoadBinaryMatrixEPKcPSt8auto_ptrINS_12SparseMatrixEE(ptr noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::auto_ptr", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = call noalias ptr @fopen(ptr noundef %11, ptr noundef @.str.7)
  store ptr %12, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %95

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %17 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 88) #7
  call void @_ZN4mgpu12SparseMatrixC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %17) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %17) #6
  %18 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %19 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = invoke i64 @fread(ptr noundef %19, i64 noundef 4, i64 noundef 1, ptr noundef %20)
          to label %22 unwind label %91

22:                                               ; preds = %16
  %23 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %24 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = invoke i64 @fread(ptr noundef %24, i64 noundef 4, i64 noundef 1, ptr noundef %25)
          to label %27 unwind label %91

27:                                               ; preds = %22
  %28 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %29 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %28, i32 0, i32 2
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = invoke i64 @fread(ptr noundef %29, i64 noundef 4, i64 noundef 1, ptr noundef %30)
          to label %32 unwind label %91

32:                                               ; preds = %27
  %33 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %34 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %33, i32 0, i32 3
  %35 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %36 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = add nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %39)
          to label %40 unwind label %91

40:                                               ; preds = %32
  %41 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %42 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %41, i32 0, i32 4
  %43 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %44 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 8, !tbaa !20
  %46 = sext i32 %45 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %46)
          to label %47 unwind label %91

47:                                               ; preds = %40
  %48 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %49 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %48, i32 0, i32 5
  %50 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %51 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %50, i32 0, i32 2
  %52 = load i32, ptr %51, align 8, !tbaa !20
  %53 = sext i32 %52 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %53)
          to label %54 unwind label %91

54:                                               ; preds = %47
  %55 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %56 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %55, i32 0, i32 3
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef 0) #6
  %58 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %59 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !9
  %61 = add nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = invoke i64 @fread(ptr noundef %57, i64 noundef 4, i64 noundef %62, ptr noundef %63)
          to label %65 unwind label %91

65:                                               ; preds = %54
  %66 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %67 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %66, i32 0, i32 4
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef 0) #6
  %69 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %70 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 8, !tbaa !20
  %72 = sext i32 %71 to i64
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = invoke i64 @fread(ptr noundef %68, i64 noundef 4, i64 noundef %72, ptr noundef %73)
          to label %75 unwind label %91

75:                                               ; preds = %65
  %76 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %77 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %76, i32 0, i32 5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef 0) #6
  %79 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %80 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !20
  %82 = sext i32 %81 to i64
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = invoke i64 @fread(ptr noundef %78, i64 noundef 8, i64 noundef %82, ptr noundef %83)
          to label %85 unwind label %91

85:                                               ; preds = %75
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = invoke i32 @fclose(ptr noundef %86)
          to label %88 unwind label %91

88:                                               ; preds = %85
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEaSERS2_(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %95

91:                                               ; preds = %85, %75, %65, %54, %47, %40, %32, %27, %22, %16
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %97

95:                                               ; preds = %88, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %96 = load i1, ptr %3, align 1
  ret i1 %96

97:                                               ; preds = %91
  %98 = load ptr, ptr %9, align 8
  %99 = load i32, ptr %10, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { inlinehint 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" }
attributes #3 = { 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" }
attributes #4 = { 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 #5 = { "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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 0}
!10 = !{!"_ZTSN4mgpu12SparseMatrixE", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 40, !16, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!10, !11, i64 8}


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

%"class.std::auto_ptr" = type { ptr }

@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4mgpu12SparseMatrixC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEaSERS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4mgpu16LoadBinaryMatrixEPKcPSt8auto_ptrINS_12SparseMatrixEE(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::auto_ptr", align 8
  %4 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.7)
  %.not = icmp ne ptr %4, null
  br i1 %.not, label %5, label %64

5:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %6 = tail call noalias noundef nonnull dereferenceable(88) ptr @_Znwm(i64 noundef 88) #7
  tail call void @_ZN4mgpu12SparseMatrixC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %6) #6
  %7 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %8 = call i64 @fread(ptr noundef %7, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %9 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  %11 = call i64 @fread(ptr noundef nonnull %10, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %12 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = call i64 @fread(ptr noundef nonnull %13, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %4)
  %15 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %17 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %18 = load i32, ptr %17, align 8, !tbaa !5
  %19 = add nsw i32 %18, 1
  %20 = sext i32 %19 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %20)
          to label %21 unwind label %62

21:                                               ; preds = %5
  %22 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  %24 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !19
  %27 = sext i32 %26 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %27)
          to label %28 unwind label %62

28:                                               ; preds = %21
  %29 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %30 = getelementptr inbounds i8, ptr %29, i64 64
  %31 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !19
  %34 = sext i32 %33 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %34)
          to label %35 unwind label %62

35:                                               ; preds = %28
  %36 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef 0) #6
  %39 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %40 = load i32, ptr %39, align 8, !tbaa !5
  %41 = add nsw i32 %40, 1
  %42 = sext i32 %41 to i64
  %43 = call i64 @fread(ptr noundef nonnull %38, i64 noundef 4, i64 noundef %42, ptr noundef nonnull %4)
  %44 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %45 = getelementptr inbounds i8, ptr %44, i64 40
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef 0) #6
  %47 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = load i32, ptr %48, align 8, !tbaa !19
  %50 = sext i32 %49 to i64
  %51 = call i64 @fread(ptr noundef nonnull %46, i64 noundef 4, i64 noundef %50, ptr noundef nonnull %4)
  %52 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %53 = getelementptr inbounds i8, ptr %52, i64 64
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef 0) #6
  %55 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !19
  %58 = sext i32 %57 to i64
  %59 = call i64 @fread(ptr noundef nonnull %54, i64 noundef 8, i64 noundef %58, ptr noundef nonnull %4)
  %60 = call i32 @fclose(ptr noundef nonnull %4)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEaSERS2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %64

62:                                               ; preds = %28, %21, %5
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %63

64:                                               ; preds = %2, %35
  ret i1 %.not
}

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { inlinehint 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" }
attributes #3 = { 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" }
attributes #4 = { 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 #5 = { 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" }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !7, i64 0}
!6 = !{!"_ZTSN4mgpu12SparseMatrixE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 40, !15, i64 64}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!6, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass