; LLVM IR from fdabrandao/vpsolver :: src/arcflow.ll (ZN7Arcflow4readEPKc)

; 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.Arcflow = type <{ i8, [7 x i8], %"class.std::set", %class.NodeSet, %"class.std::vector.8", %"class.std::map", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector", i32, [4 x i8], i64, %class.Instance, i32, i32, i32, [4 x i8], %"class.std::vector.8", %"class.std::vector.23", i32, [4 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<Arc, Arc, std::_Identity<Arc>, std::less<Arc>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Arc, Arc, std::_Identity<Arc>, std::less<Arc>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%class.NodeSet = type { %"class.std::map", %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<std::vector<int>, std::pair<const std::vector<int>, int>, std::_Select1st<std::pair<const std::vector<int>, int>>, std::less<std::vector<int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::vector<int>, std::pair<const std::vector<int>, int>, std::_Select1st<std::pair<const std::vector<int>, int>>, std::less<std::vector<int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<Item, std::allocator<Item>>::_Vector_impl" }
%"struct.std::_Vector_base<Item, std::allocator<Item>>::_Vector_impl" = type { %"struct.std::_Vector_base<Item, std::allocator<Item>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Item, std::allocator<Item>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Instance = type { i32, i32, i32, i32, i32, %"class.std::vector", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", i32, i8, i8, i8, %"class.std::vector.18", %"class.std::vector.8", %"class.std::vector.8" }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_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<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.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<Arc, std::allocator<Arc>>::_Vector_impl" }
%"struct.std::_Vector_base<Arc, std::allocator<Arc>>::_Vector_impl" = type { %"struct.std::_Vector_base<Arc, std::allocator<Arc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Arc, std::allocator<Arc>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [69 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [12 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #1

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare noundef zeroext i1 @_Z9check_extPKcS0_(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Arcflow4readEPKc(ptr noundef nonnull align 8 dereferenceable(604) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [256 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [256 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca [256 x i8], align 16
  %11 = alloca [256 x i8], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  %13 = getelementptr inbounds %class.Arcflow, ptr %12, i32 0, i32 0
  %14 = load i8, ptr %13, align 8, !tbaa !9, !range !49, !noundef !50
  %15 = trunc i8 %14 to i1
  %16 = zext i1 %15 to i32
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %28, label %18

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #4
  %19 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %20 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %19, i64 noundef 256, ptr noundef @.str, ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 620) #4
  %21 = call ptr @__cxa_allocate_exception(i64 16) #4
  %22 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef %22)
          to label %23 unwind label %24

23:                                               ; preds = %18
  call void @__cxa_throw(ptr %21, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

24:                                               ; preds = %18
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %6, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %7, align 4
  call void @__cxa_free_exception(ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #4
  br label %81

28:                                               ; preds = %2
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_Z9check_extPKcS0_(ptr noundef %29, ptr noundef @.str.13)
  br i1 %30, label %41, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #4
  %32 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  %33 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %32, i64 noundef 256, ptr noundef @.str, ptr noundef @.str.61, ptr noundef @.str.2, i32 noundef 621) #4
  %34 = call ptr @__cxa_allocate_exception(i64 16) #4
  %35 = getelementptr inbounds [256 x i8], ptr %8, i64 0, i64 0
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef %35)
          to label %36 unwind label %37

36:                                               ; preds = %31
  call void @__cxa_throw(ptr %34, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

37:                                               ; preds = %31
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  call void @__cxa_free_exception(ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #4
  br label %81

41:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call noalias ptr @fopen(ptr noundef %42, ptr noundef @.str.62)
  store ptr %43, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %47

46:                                               ; preds = %41
  call void @perror(ptr noundef @.str.59)
  br label %47

47:                                               ; preds = %46, %41
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %60, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 256, ptr %10) #4
  %51 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %52 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %51, i64 noundef 256, ptr noundef @.str, ptr noundef @.str.63, ptr noundef @.str.2, i32 noundef 626) #4
  %53 = call ptr @__cxa_allocate_exception(i64 16) #4
  %54 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef %54)
          to label %55 unwind label %56

55:                                               ; preds = %50
  call void @__cxa_throw(ptr %53, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @__cxa_free_exception(ptr %53) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %10) #4
  br label %80

60:                                               ; preds = %47
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN7Arcflow4readEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(604) %12, ptr noundef %61)
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = call i32 @fclose(ptr noundef %62)
  %64 = getelementptr inbounds %class.Arcflow, ptr %12, i32 0, i32 0
  %65 = load i8, ptr %64, align 8, !tbaa !9, !range !49, !noundef !50
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 1
  br i1 %68, label %79, label %69

69:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 256, ptr %11) #4
  %70 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %71 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %70, i64 noundef 256, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 629) #4
  %72 = call ptr @__cxa_allocate_exception(i64 16) #4
  %73 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef %73)
          to label %74 unwind label %75

74:                                               ; preds = %69
  call void @__cxa_throw(ptr %72, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #5
  unreachable

75:                                               ; preds = %69
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  call void @__cxa_free_exception(ptr %72) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %11) #4
  br label %80

79:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void

80:                                               ; preds = %75, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %81

81:                                               ; preds = %80, %37, %24
  %82 = load ptr, ptr %6, align 8
  %83 = load i32, ptr %7, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

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

declare void @perror(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { nounwind }
attributes #5 = { noreturn }

!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 = !{!"_ZTS7Arcflow", !11, i64 0, !12, i64 8, !21, i64 56, !31, i64 128, !22, i64 152, !31, i64 200, !31, i64 224, !31, i64 248, !35, i64 272, !27, i64 296, !39, i64 320, !20, i64 328, !40, i64 336, !39, i64 536, !39, i64 540, !39, i64 544, !31, i64 552, !45, i64 576, !39, i64 600}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt3setI3ArcSt4lessIS0_ESaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeI3ArcS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeI3ArcS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE13_Rb_tree_implIS4_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessI3ArcEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessI3ArcE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !20, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTS7NodeSet", !22, i64 0, !27, i64 48}
!22 = !{!"_ZTSSt3mapISt6vectorIiSaIiEEiSt4lessIS2_ESaISt4pairIKS2_iEEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeISt6vectorIiSaIiEESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeISt6vectorIiSaIiEESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !25, i64 0, !17, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt6vectorIiSaIiEEEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessISt6vectorIiSaIiEEE"}
!27 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt6vectorIiSaIiEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTSSt6vectorI4ItemSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseI4ItemSaIS0_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI4ItemSaIS0_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseI4ItemSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"int", !7, i64 0}
!40 = !{!"_ZTS8Instance", !39, i64 0, !39, i64 4, !39, i64 8, !39, i64 12, !39, i64 16, !27, i64 24, !31, i64 48, !31, i64 72, !35, i64 96, !39, i64 120, !11, i64 124, !11, i64 125, !7, i64 126, !41, i64 128, !31, i64 152, !31, i64 176}
!41 = !{!"_ZTSSt6vectorIcSaIcEE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"_ZTSSt6vectorI3ArcSaIS0_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseI3ArcSaIS0_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseI3ArcSaIS0_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseI3ArcSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{i8 0, i8 2}
!50 = !{}


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

@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [69 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [12 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare noundef zeroext i1 @_Z9check_extPKcS0_(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Arcflow4readEPKc(ptr noundef nonnull align 8 dereferenceable(604) %0, ptr noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [256 x i8], align 16
  %4 = alloca [256 x i8], align 16
  %5 = alloca [256 x i8], align 16
  %6 = alloca [256 x i8], align 16
  %7 = load i8, ptr %0, align 8, !tbaa !5, !range !48, !noundef !49
  %8 = icmp eq i8 %7, 0
  br i1 %8, label %15, label %9

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #5
  %10 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 256, ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 620) #5
  %11 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull %3)
          to label %12 unwind label %13

12:                                               ; preds = %9
  call void @__cxa_throw(ptr nonnull %11, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

13:                                               ; preds = %9
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #5
  br label %42

15:                                               ; preds = %2
  %16 = tail call noundef zeroext i1 @_Z9check_extPKcS0_(ptr noundef %1, ptr noundef nonnull @.str.13)
  br i1 %16, label %23, label %17

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #5
  %18 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %4, i64 noundef 256, ptr noundef nonnull @.str, ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.2, i32 noundef 621) #5
  %19 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull %4)
          to label %20 unwind label %21

20:                                               ; preds = %17
  call void @__cxa_throw(ptr nonnull %19, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

21:                                               ; preds = %17
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #5
  br label %42

23:                                               ; preds = %15
  %24 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.62)
  %cond = icmp eq ptr %24, null
  br i1 %cond, label %25, label %31

25:                                               ; preds = %23
  tail call void @perror(ptr noundef nonnull @.str.59) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #5
  %26 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 256, ptr noundef nonnull @.str, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.2, i32 noundef 626) #5
  %27 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull %5)
          to label %28 unwind label %29

28:                                               ; preds = %25
  call void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

29:                                               ; preds = %25
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #5
  br label %42

31:                                               ; preds = %23
  tail call void @_ZN7Arcflow4readEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(604) %0, ptr noundef nonnull %24)
  %32 = tail call i32 @fclose(ptr noundef nonnull %24)
  %33 = load i8, ptr %0, align 8, !tbaa !5, !range !48, !noundef !49
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %41, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) #5
  %36 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %6, i64 noundef 256, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 629) #5
  %37 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull %6)
          to label %38 unwind label %39

38:                                               ; preds = %35
  call void @__cxa_throw(ptr nonnull %37, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

39:                                               ; preds = %35
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #5
  br label %42

41:                                               ; preds = %31
  ret void

42:                                               ; preds = %29, %39, %21, %13
  %.pn.pn = phi { ptr, i32 } [ %22, %21 ], [ %14, %13 ], [ %40, %39 ], [ %30, %29 ]
  resume { ptr, i32 } %.pn.pn
}

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

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 }
attributes #6 = { noreturn }
attributes #7 = { cold }

!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 = !{!"_ZTS7Arcflow", !7, i64 0, !10, i64 8, !20, i64 56, !30, i64 128, !21, i64 152, !30, i64 200, !30, i64 224, !30, i64 248, !34, i64 272, !26, i64 296, !38, i64 320, !19, i64 328, !39, i64 336, !38, i64 536, !38, i64 540, !38, i64 544, !30, i64 552, !44, i64 576, !38, i64 600}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt3setI3ArcSt4lessIS0_ESaIS0_EE", !11, i64 0}
!11 = !{!"_ZTSSt8_Rb_treeI3ArcS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE", !12, i64 0}
!12 = !{!"_ZTSNSt8_Rb_treeI3ArcS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE13_Rb_tree_implIS4_Lb1EEE", !13, i64 0, !15, i64 8}
!13 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessI3ArcEE", !14, i64 0}
!14 = !{!"_ZTSSt4lessI3ArcE"}
!15 = !{!"_ZTSSt15_Rb_tree_header", !16, i64 0, !19, i64 32}
!16 = !{!"_ZTSSt18_Rb_tree_node_base", !17, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!17 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!"_ZTS7NodeSet", !21, i64 0, !26, i64 48}
!21 = !{!"_ZTSSt3mapISt6vectorIiSaIiEEiSt4lessIS2_ESaISt4pairIKS2_iEEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeISt6vectorIiSaIiEESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeISt6vectorIiSaIiEESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !24, i64 0, !15, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt6vectorIiSaIiEEEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessISt6vectorIiSaIiEEE"}
!26 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!30 = !{!"_ZTSSt6vectorIiSaIiEE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!34 = !{!"_ZTSSt6vectorI4ItemSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseI4ItemSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseI4ItemSaIS0_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI4ItemSaIS0_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!38 = !{!"int", !8, i64 0}
!39 = !{!"_ZTS8Instance", !38, i64 0, !38, i64 4, !38, i64 8, !38, i64 12, !38, i64 16, !26, i64 24, !30, i64 48, !30, i64 72, !34, i64 96, !38, i64 120, !7, i64 124, !7, i64 125, !8, i64 126, !40, i64 128, !30, i64 152, !30, i64 176}
!40 = !{!"_ZTSSt6vectorIcSaIcEE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!44 = !{!"_ZTSSt6vectorI3ArcSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseI3ArcSaIS0_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI3ArcSaIS0_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseI3ArcSaIS0_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!48 = !{i8 0, i8 2}
!49 = !{}


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