; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/utils/sc_report/log_file (log_file)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.M = type { %"class.sc_core::sc_module", %"class.sc_core::sc_event", %"class.sc_core::sc_event" }
%"class.sc_core::sc_module" = type { %"class.sc_core::sc_object", %"class.sc_core::sc_process_host", %"class.sc_core::sc_sensitive", %"class.sc_core::sc_sensitive_pos", %"class.sc_core::sc_sensitive_neg", i8, ptr, i32, ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.0", %"class.std::__cxx11::basic_string", ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_event" = type { %"class.std::__cxx11::basic_string", ptr, ptr, i32, i32, ptr, %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.13" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@__const.sc_main.fname = external hidden unnamed_addr constant [16 x i8], align 16
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @sc_main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [16 x i8], align 16
  %7 = alloca %struct.M, align 8
  %8 = alloca %"class.sc_core::sc_module_name", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.sc_main.fname, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 552, ptr %7) #8
  call void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %8, ptr noundef @.str)
  invoke void @_ZN1MC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(552) %7, ptr noundef %8)
          to label %14 unwind label %65

14:                                               ; preds = %2
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #8
  %15 = invoke noundef i32 @_ZN7sc_core17sc_report_handler10stop_afterENS_11sc_severityEi(i32 noundef 2, i32 noundef 0)
          to label %16 unwind label %69

16:                                               ; preds = %14
  %17 = invoke noundef i32 @_ZN7sc_core17sc_report_handler10stop_afterENS_11sc_severityEi(i32 noundef 3, i32 noundef 0)
          to label %18 unwind label %69

18:                                               ; preds = %16
  %19 = invoke noundef i32 @_ZN7sc_core17sc_report_handler8suppressEj(i32 noundef 192)
          to label %20 unwind label %69

20:                                               ; preds = %18
  %21 = invoke noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsEPKcj(ptr noundef @.str.2, i32 noundef 12)
          to label %22 unwind label %69

22:                                               ; preds = %20
  %23 = invoke noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsEPKcj(ptr noundef @.str.3, i32 noundef 12)
          to label %24 unwind label %69

24:                                               ; preds = %22
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef @.str.2, ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 0)
          to label %25 unwind label %69

25:                                               ; preds = %24
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @.str.2, ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 0)
          to label %26 unwind label %69

26:                                               ; preds = %25
  %27 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %28 = invoke noundef zeroext i1 @_ZN7sc_core17sc_report_handler17set_log_file_nameEPKc(ptr noundef %27)
          to label %29 unwind label %69

29:                                               ; preds = %26
  %30 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %31 = invoke noundef ptr @_ZN7sc_core17sc_report_handler17get_log_file_nameEv()
          to label %32 unwind label %69

32:                                               ; preds = %29
  %33 = call i32 @strcmp(ptr noundef %30, ptr noundef %31) #9
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  br label %38

36:                                               ; preds = %32
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 89)
          to label %37 unwind label %69

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37, %35
  %39 = phi i32 [ 0, %35 ], [ 0, %37 ]
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef @.str.2, ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 1)
          to label %40 unwind label %69

40:                                               ; preds = %38
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @.str.3, ptr noundef @.str.8, ptr noundef @.str.10, i32 noundef 2)
          to label %41 unwind label %69

41:                                               ; preds = %40
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @.str.2, ptr noundef @.str.8, ptr noundef @.str.11, i32 noundef 3)
          to label %42 unwind label %69

42:                                               ; preds = %41
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @.str.3, ptr noundef @.str.8, ptr noundef @.str.12, i32 noundef 4)
          to label %43 unwind label %69

43:                                               ; preds = %42
  %44 = getelementptr inbounds %struct.M, ptr %7, i32 0, i32 2
  invoke void @_ZN7sc_core8sc_event6notifyEdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(160) %44, double noundef 2.000000e+01, i32 noundef 2)
          to label %45 unwind label %69

45:                                               ; preds = %43
  %46 = getelementptr inbounds %struct.M, ptr %7, i32 0, i32 1
  invoke void @_ZN7sc_core8sc_event6notifyEdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(160) %46, double noundef 3.000000e+01, i32 noundef 2)
          to label %47 unwind label %69

47:                                               ; preds = %45
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %48 unwind label %69

48:                                               ; preds = %47
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @.str.2, ptr noundef @.str.8, ptr noundef @.str.11, i32 noundef 5)
          to label %49 unwind label %69

49:                                               ; preds = %48
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 100, i32 noundef 2, i32 noundef 1)
          to label %50 unwind label %69

50:                                               ; preds = %49
  %51 = invoke noundef zeroext i1 @_ZN7sc_core27sc_report_close_default_logEv()
          to label %52 unwind label %69

52:                                               ; preds = %50
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef @.str.2, ptr noundef @.str.13, ptr noundef @.str.5, i32 noundef 0)
          to label %53 unwind label %69

53:                                               ; preds = %52
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @.str.2, ptr noundef @.str.13, ptr noundef @.str.5, i32 noundef 0)
          to label %54 unwind label %69

54:                                               ; preds = %53
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.14)
          to label %56 unwind label %69

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %57 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %58 = invoke noalias ptr @fopen(ptr noundef %57, ptr noundef @.str.15)
          to label %59 unwind label %73

59:                                               ; preds = %56
  store ptr %58, ptr %11, align 8, !tbaa !9
  %60 = load ptr, ptr %11, align 8, !tbaa !9
  %61 = icmp ne ptr %60, null
  br i1 %61, label %77, label %62

62:                                               ; preds = %59
  %63 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @.str.16, ptr noundef %63, ptr noundef @.str.7, i32 noundef 114)
          to label %64 unwind label %73

64:                                               ; preds = %62
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %102

65:                                               ; preds = %2
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #8
  br label %106

69:                                               ; preds = %54, %53, %52, %50, %49, %48, %47, %45, %43, %42, %41, %40, %38, %36, %29, %26, %25, %24, %22, %20, %18, %16, %14
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %9, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %10, align 4
  br label %105

73:                                               ; preds = %98, %62, %56
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  br label %104

77:                                               ; preds = %59
  br label %78

78:                                               ; preds = %97, %77
  br label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %80 = load ptr, ptr %11, align 8, !tbaa !9
  %81 = invoke i32 @fgetc(ptr noundef %80)
          to label %82 unwind label %86

82:                                               ; preds = %79
  store i32 %81, ptr %13, align 4, !tbaa !5
  %83 = load i32, ptr %13, align 4, !tbaa !5
  %84 = icmp eq i32 %83, -1
  br i1 %84, label %85, label %90

85:                                               ; preds = %82
  store i32 3, ptr %12, align 4
  br label %95

86:                                               ; preds = %90, %79
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %104

90:                                               ; preds = %82
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = trunc i32 %91 to i8
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %92)
          to label %94 unwind label %86

94:                                               ; preds = %90
  store i32 0, ptr %12, align 4
  br label %95

95:                                               ; preds = %94, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %96 = load i32, ptr %12, align 4
  switch i32 %96, label %112 [
    i32 0, label %97
    i32 3, label %98
  ]

97:                                               ; preds = %95
  br label %78, !llvm.loop !11

98:                                               ; preds = %95
  %99 = load ptr, ptr %11, align 8, !tbaa !9
  %100 = invoke i32 @fclose(ptr noundef %99)
          to label %101 unwind label %73

101:                                              ; preds = %98
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %102

102:                                              ; preds = %101, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZN1MD2Ev(ptr noundef nonnull align 8 dereferenceable(552) %7) #8
  call void @llvm.lifetime.end.p0(i64 552, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  %103 = load i32, ptr %3, align 4
  ret i32 %103

104:                                              ; preds = %86, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %105

105:                                              ; preds = %104, %69
  call void @_ZN1MD2Ev(ptr noundef nonnull align 8 dereferenceable(552) %7) #8
  br label %106

106:                                              ; preds = %105, %65
  call void @llvm.lifetime.end.p0(i64 552, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  br label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %9, align 8
  %109 = load i32, ptr %10, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111

112:                                              ; preds = %95
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #4

declare noundef i32 @_ZN7sc_core17sc_report_handler10stop_afterENS_11sc_severityEi(i32 noundef, i32 noundef) #3

declare noundef i32 @_ZN7sc_core17sc_report_handler8suppressEj(i32 noundef) #3

declare noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsEPKcj(ptr noundef, i32 noundef) #3

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

declare noundef zeroext i1 @_ZN7sc_core17sc_report_handler17set_log_file_nameEPKc(ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #5

declare noundef ptr @_ZN7sc_core17sc_report_handler17get_log_file_nameEv() #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_event6notifyEdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(160), double noundef, i32 noundef) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef, i32 noundef, i32 noundef) #6

declare noundef zeroext i1 @_ZN7sc_core27sc_report_close_default_logEv() #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

declare i32 @fgetc(ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

; 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) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN1MD2Ev(ptr noundef nonnull align 8 dereferenceable(552)) unnamed_addr #7 align 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 "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 willreturn memory(read) "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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.M = type { %"class.sc_core::sc_module", %"class.sc_core::sc_event", %"class.sc_core::sc_event" }
%"class.sc_core::sc_module" = type { %"class.sc_core::sc_object", %"class.sc_core::sc_process_host", %"class.sc_core::sc_sensitive", %"class.sc_core::sc_sensitive_pos", %"class.sc_core::sc_sensitive_neg", i8, ptr, i32, ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.0", %"class.std::__cxx11::basic_string", ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_event" = type { %"class.std::__cxx11::basic_string", ptr, ptr, i32, i32, ptr, %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.13" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@__const.sc_main.fname = external hidden unnamed_addr constant [16 x i8], align 16
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local range(i32 0, 2) i32 @sc_main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca [16 x i8], align 16
  %4 = alloca %struct.M, align 8
  %5 = alloca %"class.sc_core::sc_module_name", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) @__const.sc_main.fname, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 552, ptr nonnull %4) #9
  call void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull @.str)
  invoke void @_ZN1MC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(552) %4, ptr noundef nonnull %5)
          to label %6 unwind label %46

6:                                                ; preds = %2
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %5) #9
  %7 = invoke noundef i32 @_ZN7sc_core17sc_report_handler10stop_afterENS_11sc_severityEi(i32 noundef 2, i32 noundef 0)
          to label %8 unwind label %48

8:                                                ; preds = %6
  %9 = invoke noundef i32 @_ZN7sc_core17sc_report_handler10stop_afterENS_11sc_severityEi(i32 noundef 3, i32 noundef 0)
          to label %10 unwind label %48

10:                                               ; preds = %8
  %11 = invoke noundef i32 @_ZN7sc_core17sc_report_handler8suppressEj(i32 noundef 192)
          to label %12 unwind label %48

12:                                               ; preds = %10
  %13 = invoke noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsEPKcj(ptr noundef nonnull @.str.2, i32 noundef 12)
          to label %14 unwind label %48

14:                                               ; preds = %12
  %15 = invoke noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsEPKcj(ptr noundef nonnull @.str.3, i32 noundef 12)
          to label %16 unwind label %48

16:                                               ; preds = %14
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 0)
          to label %17 unwind label %48

17:                                               ; preds = %16
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 0)
          to label %18 unwind label %48

18:                                               ; preds = %17
  %19 = invoke noundef zeroext i1 @_ZN7sc_core17sc_report_handler17set_log_file_nameEPKc(ptr noundef nonnull %3)
          to label %20 unwind label %48

20:                                               ; preds = %18
  %21 = invoke noundef ptr @_ZN7sc_core17sc_report_handler17get_log_file_nameEv()
          to label %22 unwind label %48

22:                                               ; preds = %20
  %23 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %21) #10
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 89)
          to label %26 unwind label %48

26:                                               ; preds = %25, %22
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 1)
          to label %27 unwind label %48

27:                                               ; preds = %26
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.10, i32 noundef 2)
          to label %28 unwind label %48

28:                                               ; preds = %27
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.11, i32 noundef 3)
          to label %29 unwind label %48

29:                                               ; preds = %28
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.12, i32 noundef 4)
          to label %30 unwind label %48

30:                                               ; preds = %29
  %31 = getelementptr inbounds i8, ptr %4, i64 392
  invoke void @_ZN7sc_core8sc_event6notifyEdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(160) %31, double noundef 2.000000e+01, i32 noundef 2)
          to label %32 unwind label %48

32:                                               ; preds = %30
  %33 = getelementptr inbounds i8, ptr %4, i64 232
  invoke void @_ZN7sc_core8sc_event6notifyEdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(160) %33, double noundef 3.000000e+01, i32 noundef 2)
          to label %34 unwind label %48

34:                                               ; preds = %32
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %35 unwind label %48

35:                                               ; preds = %34
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.11, i32 noundef 5)
          to label %36 unwind label %48

36:                                               ; preds = %35
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 100, i32 noundef 2, i32 noundef 1)
          to label %37 unwind label %48

37:                                               ; preds = %36
  %38 = invoke noundef zeroext i1 @_ZN7sc_core27sc_report_close_default_logEv()
          to label %39 unwind label %48

39:                                               ; preds = %37
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.5, i32 noundef 0)
          to label %40 unwind label %48

40:                                               ; preds = %39
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.5, i32 noundef 0)
          to label %41 unwind label %48

41:                                               ; preds = %40
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.14)
          to label %43 unwind label %48

43:                                               ; preds = %41
  %44 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.15)
  %.not = icmp eq ptr %44, null
  br i1 %.not, label %45, label %.preheader

45:                                               ; preds = %43
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @.str.16, ptr noundef nonnull %3, ptr noundef nonnull @.str.7, i32 noundef 114)
          to label %61 unwind label %50

46:                                               ; preds = %2
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %5) #9
  br label %63

48:                                               ; preds = %41, %40, %39, %37, %36, %35, %34, %32, %30, %29, %28, %27, %26, %25, %20, %18, %17, %16, %14, %12, %10, %8, %6
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %62

50:                                               ; preds = %45
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %62

.preheader:                                       ; preds = %43, %56
  %52 = call i32 @fgetc(ptr noundef nonnull %44)
  %53 = icmp eq i32 %52, -1
  br i1 %53, label %59, label %56

54:                                               ; preds = %56
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %62

56:                                               ; preds = %.preheader
  %57 = trunc i32 %52 to i8
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %57)
          to label %.preheader unwind label %54

59:                                               ; preds = %.preheader
  %60 = call i32 @fclose(ptr noundef nonnull %44)
  br label %61

61:                                               ; preds = %45, %59
  %.0 = phi i32 [ 0, %59 ], [ 1, %45 ]
  call void @_ZN1MD2Ev(ptr noundef nonnull align 8 dereferenceable(552) %4) #9
  call void @llvm.lifetime.end.p0(i64 552, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  ret i32 %.0

62:                                               ; preds = %50, %54, %48
  %.pn.pn = phi { ptr, i32 } [ %49, %48 ], [ %55, %54 ], [ %51, %50 ]
  call void @_ZN1MD2Ev(ptr noundef nonnull align 8 dereferenceable(552) %4) #9
  br label %63

63:                                               ; preds = %62, %46
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %62 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 552, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn.pn.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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #4

declare noundef i32 @_ZN7sc_core17sc_report_handler10stop_afterENS_11sc_severityEi(i32 noundef, i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7sc_core17sc_report_handler8suppressEj(i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsEPKcj(ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN7sc_core17sc_report_handler17set_log_file_nameEPKc(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5

declare noundef ptr @_ZN7sc_core17sc_report_handler17get_log_file_nameEv() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_event6notifyEdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(160), double noundef, i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare noundef zeroext i1 @_ZN7sc_core27sc_report_close_default_logEv() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN1MD2Ev(ptr noundef nonnull align 8 dereferenceable(552)) unnamed_addr #8 align 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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)"}


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