; LLVM IR from gunrock/gunrock :: include/gunrock/io/detail (mmio)

; 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::__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::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @mm_read_unsymmetric_sparse(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca [4 x i8], align 1
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call noalias ptr @fopen(ptr noundef %32, ptr noundef @.str)
  store ptr %33, ptr %16, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %36

35:                                               ; preds = %7
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %162

36:                                               ; preds = %7
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  %38 = call i32 @mm_read_banner(ptr noundef %37, ptr noundef %17)
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %36
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %42)
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %162

44:                                               ; preds = %36
  %45 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 2
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 82
  br i1 %48, label %49, label %59

49:                                               ; preds = %44
  %50 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = sext i8 %51 to i32
  %53 = icmp eq i32 %52, 77
  br i1 %53, label %54, label %59

54:                                               ; preds = %49
  %55 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 1
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 67
  br i1 %58, label %66, label %59

59:                                               ; preds = %54, %49, %44
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.3) #7
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %64 = call ptr @mm_typecode_to_str(ptr noundef %63)
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.4, ptr noundef %64) #7
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %162

66:                                               ; preds = %54
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = call i32 @mm_read_mtx_crd_size(ptr noundef %67, ptr noundef %18, ptr noundef %19, ptr noundef %20)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %73

70:                                               ; preds = %66
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.5) #7
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %162

73:                                               ; preds = %66
  %74 = load i64, ptr %18, align 8, !tbaa !10
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %74, ptr %75, align 8, !tbaa !10
  %76 = load i64, ptr %19, align 8, !tbaa !10
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 %76, ptr %77, align 8, !tbaa !10
  %78 = load i64, ptr %20, align 8, !tbaa !10
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 %78, ptr %79, align 8, !tbaa !10
  %80 = load i64, ptr %20, align 8, !tbaa !10
  %81 = mul i64 %80, 8
  %82 = call noalias ptr @malloc(i64 noundef %81) #8
  store ptr %82, ptr %23, align 8, !tbaa !5
  %83 = load i64, ptr %20, align 8, !tbaa !10
  %84 = mul i64 %83, 8
  %85 = call noalias ptr @malloc(i64 noundef %84) #8
  store ptr %85, ptr %24, align 8, !tbaa !5
  %86 = load i64, ptr %20, align 8, !tbaa !10
  %87 = mul i64 %86, 8
  %88 = call noalias ptr @malloc(i64 noundef %87) #8
  store ptr %88, ptr %22, align 8, !tbaa !5
  %89 = load ptr, ptr %22, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %89, ptr %90, align 8, !tbaa !5
  %91 = load ptr, ptr %23, align 8, !tbaa !5
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %91, ptr %92, align 8, !tbaa !5
  %93 = load ptr, ptr %24, align 8, !tbaa !5
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %93, ptr %94, align 8, !tbaa !5
  store i64 0, ptr %21, align 8, !tbaa !10
  br label %95

95:                                               ; preds = %138, %73
  %96 = load i64, ptr %21, align 8, !tbaa !10
  %97 = load i64, ptr %20, align 8, !tbaa !10
  %98 = icmp ult i64 %96, %97
  br i1 %98, label %99, label %159

99:                                               ; preds = %95
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load ptr, ptr %23, align 8, !tbaa !5
  %102 = load i64, ptr %21, align 8, !tbaa !10
  %103 = getelementptr inbounds i64, ptr %101, i64 %102
  %104 = load ptr, ptr %24, align 8, !tbaa !5
  %105 = load i64, ptr %21, align 8, !tbaa !10
  %106 = getelementptr inbounds i64, ptr %104, i64 %105
  %107 = load ptr, ptr %22, align 8, !tbaa !5
  %108 = load i64, ptr %21, align 8, !tbaa !10
  %109 = getelementptr inbounds double, ptr %107, i64 %108
  %110 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %100, ptr noundef @.str.6, ptr noundef %103, ptr noundef %106, ptr noundef %109)
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %99
  br label %113

113:                                              ; preds = %112, %99
  %114 = load ptr, ptr %23, align 8, !tbaa !5
  %115 = load i64, ptr %21, align 8, !tbaa !10
  %116 = getelementptr inbounds i64, ptr %114, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !10
  %118 = icmp eq i64 %117, 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %119 unwind label %141

119:                                              ; preds = %113
  invoke void @_ZN7gunrock5error18throw_if_exceptionEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %118, ptr noundef %26)
          to label %120 unwind label %145

120:                                              ; preds = %119
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  %121 = load ptr, ptr %24, align 8, !tbaa !5
  %122 = load i64, ptr %21, align 8, !tbaa !10
  %123 = getelementptr inbounds i64, ptr %121, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !10
  %125 = icmp eq i64 %124, 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %126 unwind label %150

126:                                              ; preds = %120
  invoke void @_ZN7gunrock5error18throw_if_exceptionEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %125, ptr noundef %30)
          to label %127 unwind label %154

127:                                              ; preds = %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #7
  %128 = load ptr, ptr %23, align 8, !tbaa !5
  %129 = load i64, ptr %21, align 8, !tbaa !10
  %130 = getelementptr inbounds i64, ptr %128, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !10
  %132 = add i64 %131, -1
  store i64 %132, ptr %130, align 8, !tbaa !10
  %133 = load ptr, ptr %24, align 8, !tbaa !5
  %134 = load i64, ptr %21, align 8, !tbaa !10
  %135 = getelementptr inbounds i64, ptr %133, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !10
  %137 = add i64 %136, -1
  store i64 %137, ptr %135, align 8, !tbaa !10
  br label %138

138:                                              ; preds = %127
  %139 = load i64, ptr %21, align 8, !tbaa !10
  %140 = add i64 %139, 1
  store i64 %140, ptr %21, align 8, !tbaa !10
  br label %95, !llvm.loop !12

141:                                              ; preds = %113
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %28, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %29, align 4
  br label %149

145:                                              ; preds = %119
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %28, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %29, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %149

149:                                              ; preds = %145, %141
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  br label %164

150:                                              ; preds = %120
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %28, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %29, align 4
  br label %158

154:                                              ; preds = %126
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %28, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %29, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  br label %158

158:                                              ; preds = %154, %150
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #7
  br label %164

159:                                              ; preds = %95
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  %161 = call i32 @fclose(ptr noundef %160)
  store i32 0, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %162

162:                                              ; preds = %159, %70, %59, %40, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %163 = load i32, ptr %8, align 4
  ret i32 %163

164:                                              ; preds = %158, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %28, align 8
  %167 = load i32, ptr %29, align 4
  %168 = insertvalue { ptr, i32 } poison, ptr %166, 0
  %169 = insertvalue { ptr, i32 } %168, i32 %167, 1
  resume { ptr, i32 } %169
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @mm_read_banner(ptr noundef, ptr noundef) #0

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @mm_typecode_to_str(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @mm_read_mtx_crd_size(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7gunrock5error18throw_if_exceptionEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

declare i32 @fclose(ptr noundef) #2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 #4 = { 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 #5 = { nounwind 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 #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { nounwind 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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::__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::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -1, 1) i32 @mm_read_unsymmetric_sparse(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca [4 x i8], align 1
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %16 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str)
  %17 = icmp eq ptr %16, null
  br i1 %17, label %81, label %18

18:                                               ; preds = %7
  %19 = call i32 @mm_read_banner(ptr noundef nonnull %16, ptr noundef nonnull %8)
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %23, label %20

20:                                               ; preds = %18
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %0)
  br label %81

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %8, i64 2
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = icmp eq i8 %25, 82
  %27 = load i8, ptr %8, align 1
  %28 = icmp eq i8 %27, 77
  %or.cond = select i1 %26, i1 %28, i1 false
  %29 = getelementptr inbounds i8, ptr %8, i64 1
  %30 = load i8, ptr %29, align 1
  %31 = icmp eq i8 %30, 67
  %or.cond7 = select i1 %or.cond, i1 %31, i1 false
  br i1 %or.cond7, label %38, label %32

32:                                               ; preds = %23
  %33 = load ptr, ptr @stderr, align 8, !tbaa !8
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.3) #8
  %35 = load ptr, ptr @stderr, align 8, !tbaa !8
  %36 = call ptr @mm_typecode_to_str(ptr noundef nonnull %8)
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.4, ptr noundef %36) #8
  br label %81

38:                                               ; preds = %23
  %39 = call i32 @mm_read_mtx_crd_size(ptr noundef nonnull %16, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not46 = icmp eq i32 %39, 0
  br i1 %.not46, label %43, label %40

40:                                               ; preds = %38
  %41 = load ptr, ptr @stderr, align 8, !tbaa !8
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.5) #8
  br label %81

43:                                               ; preds = %38
  %44 = load i64, ptr %9, align 8, !tbaa !10
  store i64 %44, ptr %1, align 8, !tbaa !10
  %45 = load i64, ptr %10, align 8, !tbaa !10
  store i64 %45, ptr %2, align 8, !tbaa !10
  %46 = load i64, ptr %11, align 8, !tbaa !10
  store i64 %46, ptr %3, align 8, !tbaa !10
  %47 = shl i64 %46, 3
  %48 = call noalias ptr @malloc(i64 noundef %47) #9
  %49 = call noalias ptr @malloc(i64 noundef %47) #9
  %50 = call noalias ptr @malloc(i64 noundef %47) #9
  store ptr %50, ptr %4, align 8, !tbaa !8
  store ptr %48, ptr %5, align 8, !tbaa !8
  store ptr %49, ptr %6, align 8, !tbaa !8
  %.not52 = icmp eq i64 %46, 0
  br i1 %.not52, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %43, %62
  %.04451 = phi i64 [ %67, %62 ], [ 0, %43 ]
  %51 = getelementptr inbounds i64, ptr %48, i64 %.04451
  %52 = getelementptr inbounds i64, ptr %49, i64 %.04451
  %53 = getelementptr inbounds double, ptr %50, i64 %.04451
  %54 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %16, ptr noundef nonnull @.str.6, ptr noundef %51, ptr noundef %52, ptr noundef %53)
  %55 = load i64, ptr %51, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %56 unwind label %70

56:                                               ; preds = %.lr.ph
  %57 = icmp eq i64 %55, 0
  invoke void @_ZN7gunrock5error18throw_if_exceptionEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %57, ptr noundef nonnull %12)
          to label %58 unwind label %72

58:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  %59 = load i64, ptr %52, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %60 unwind label %75

60:                                               ; preds = %58
  %61 = icmp eq i64 %59, 0
  invoke void @_ZN7gunrock5error18throw_if_exceptionEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext %61, ptr noundef nonnull %14)
          to label %62 unwind label %77

62:                                               ; preds = %60
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  %63 = load i64, ptr %51, align 8, !tbaa !10
  %64 = add i64 %63, -1
  store i64 %64, ptr %51, align 8, !tbaa !10
  %65 = load i64, ptr %52, align 8, !tbaa !10
  %66 = add i64 %65, -1
  store i64 %66, ptr %52, align 8, !tbaa !10
  %67 = add nuw i64 %.04451, 1
  %68 = load i64, ptr %11, align 8, !tbaa !10
  %69 = icmp ult i64 %67, %68
  br i1 %69, label %.lr.ph, label %._crit_edge, !llvm.loop !12

70:                                               ; preds = %.lr.ph
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %56
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %74

74:                                               ; preds = %72, %70
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  br label %82

75:                                               ; preds = %58
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %60
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %79

79:                                               ; preds = %77, %75
  %.pn48 = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  br label %82

._crit_edge:                                      ; preds = %62, %43
  %80 = call i32 @fclose(ptr noundef nonnull %16)
  br label %81

81:                                               ; preds = %7, %._crit_edge, %40, %32, %20
  %.043 = phi i32 [ -1, %20 ], [ -1, %40 ], [ 0, %._crit_edge ], [ -1, %32 ], [ -1, %7 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  ret i32 %.043

82:                                               ; preds = %79, %74
  %.pn48.pn = phi { ptr, i32 } [ %.pn48, %79 ], [ %.pn, %74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  resume { ptr, i32 } %.pn48.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @mm_read_banner(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @mm_typecode_to_str(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local i32 @mm_read_mtx_crd_size(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7gunrock5error18throw_if_exceptionEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i1 noundef zeroext, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { nounwind 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass