; LLVM IR from stan-dev/math :: lib/boost_1.84.0/tools/build/src/engine (yyacc)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<literal, literal, std::_Identity<literal>, std::less<literal>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<literal, literal, std::_Identity<literal>, std::less<literal>>::_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.std::allocator" = type { i8 }
%struct.literal = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str.55 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11print_usagev() #2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15tokenize_stringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::set", align 8
  %11 = alloca [2048 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %struct.literal, align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca i1, align 1
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %36 = alloca %struct.literal, align 8
  %37 = alloca %"class.std::allocator", align 1
  %38 = alloca %"class.std::allocator", align 1
  %39 = alloca i1, align 1
  store i32 0, ptr %3, 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 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp ne i32 %40, 4
  br i1 %41, label %42, label %43

42:                                               ; preds = %2
  call void @_Z11print_usagev()
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %306

43:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store ptr null, ptr %9, align 8, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 3
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = call noalias ptr @fopen(ptr noundef %46, ptr noundef @.str.55)
  store ptr %47, ptr %9, align 8, !tbaa !9
  %48 = load ptr, ptr %9, align 8, !tbaa !9
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %43
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %50, %43
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %301

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #8
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.start.p0(i64 2048, ptr %11) #8
  br label %55

55:                                               ; preds = %142, %54
  br label %56

56:                                               ; preds = %55
  %57 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  %58 = load ptr, ptr %9, align 8, !tbaa !9
  %59 = invoke ptr @fgets(ptr noundef %57, i32 noundef 2048, ptr noundef %58)
          to label %60 unwind label %99

60:                                               ; preds = %56
  %61 = icmp ne ptr %59, null
  br i1 %61, label %62, label %141

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %63 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  store ptr %63, ptr %14, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %139, %62
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %66 = load ptr, ptr %14, align 8, !tbaa !9
  %67 = call noundef ptr @strchr(ptr noundef %66, i32 noundef 96) #9
  store ptr %67, ptr %15, align 8, !tbaa !9
  %68 = load ptr, ptr %15, align 8, !tbaa !9
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %135

70:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %71 = load ptr, ptr %15, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %71, i64 1
  %73 = call noundef ptr @strchr(ptr noundef %72, i32 noundef 96) #9
  store ptr %73, ptr %16, align 8, !tbaa !9
  %74 = load ptr, ptr %16, align 8, !tbaa !9
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %130

76:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #8
  %77 = load ptr, ptr %15, align 8, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %77, i64 1
  %79 = load ptr, ptr %16, align 8, !tbaa !9
  %80 = load ptr, ptr %15, align 8, !tbaa !9
  %81 = ptrtoint ptr %79 to i64
  %82 = ptrtoint ptr %80 to i64
  %83 = sub i64 %81, %82
  %84 = sub nsw i64 %83, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef %78, i64 noundef %84, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %85 unwind label %103

85:                                               ; preds = %76
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #8
  %86 = getelementptr inbounds %struct.literal, ptr %19, i32 0, i32 0
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %86, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %87 unwind label %107

87:                                               ; preds = %85
  store i1 true, ptr %21, align 1
  %88 = getelementptr inbounds %struct.literal, ptr %19, i32 0, i32 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %89 unwind label %111

89:                                               ; preds = %87
  invoke void @_Z15tokenize_stringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %88, ptr noundef %20)
          to label %90 unwind label %115

90:                                               ; preds = %89
  store i1 false, ptr %21, align 1
  %91 = invoke { ptr, i8 } @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(64) %19)
          to label %92 unwind label %119

92:                                               ; preds = %90
  %93 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 0
  %94 = extractvalue { ptr, i8 } %91, 0
  store ptr %94, ptr %93, align 8
  %95 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 1
  %96 = extractvalue { ptr, i8 } %91, 1
  store i8 %96, ptr %95, align 8
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #8
  %97 = load ptr, ptr %16, align 8, !tbaa !9
  %98 = getelementptr inbounds i8, ptr %97, i64 1
  store ptr %98, ptr %14, align 8, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #8
  br label %131

99:                                               ; preds = %293, %212, %208, %181, %173, %143, %56
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %12, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %13, align 4
  br label %300

103:                                              ; preds = %76
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %12, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  br label %129

107:                                              ; preds = %85
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %12, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %13, align 4
  br label %128

111:                                              ; preds = %87
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %12, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %13, align 4
  br label %124

115:                                              ; preds = %89
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %12, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %13, align 4
  br label %123

119:                                              ; preds = %90
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %12, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %13, align 4
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #8
  br label %123

123:                                              ; preds = %119, %115
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  br label %124

124:                                              ; preds = %123, %111
  %125 = load i1, ptr %21, align 1
  br i1 %125, label %126, label %127

126:                                              ; preds = %124
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %86) #8
  br label %127

127:                                              ; preds = %126, %124
  br label %128

128:                                              ; preds = %127, %107
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  br label %129

129:                                              ; preds = %128, %103
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %300

130:                                              ; preds = %70
  store i32 5, ptr %23, align 4
  br label %132

131:                                              ; preds = %92
  store i32 0, ptr %23, align 4
  br label %132

132:                                              ; preds = %131, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %133 = load i32, ptr %23, align 4
  switch i32 %133, label %137 [
    i32 0, label %134
  ]

134:                                              ; preds = %132
  br label %136

135:                                              ; preds = %65
  store i32 5, ptr %23, align 4
  br label %137

136:                                              ; preds = %134
  store i32 0, ptr %23, align 4
  br label %137

137:                                              ; preds = %136, %135, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %138 = load i32, ptr %23, align 4
  switch i32 %138, label %314 [
    i32 0, label %139
    i32 5, label %140
  ]

139:                                              ; preds = %137
  br label %64, !llvm.loop !11

140:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %142

141:                                              ; preds = %60
  br label %143

142:                                              ; preds = %140
  br label %55, !llvm.loop !13

143:                                              ; preds = %141
  %144 = load ptr, ptr %5, align 8, !tbaa !9
  %145 = getelementptr inbounds ptr, ptr %144, i64 2
  %146 = load ptr, ptr %145, align 8, !tbaa !9
  %147 = invoke noalias ptr @fopen(ptr noundef %146, ptr noundef @.str.56)
          to label %148 unwind label %99

148:                                              ; preds = %143
  store ptr %147, ptr %7, align 8, !tbaa !9
  %149 = load ptr, ptr %7, align 8, !tbaa !9
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %177

151:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store ptr %10, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %152 = load ptr, ptr %24, align 8, !tbaa !9
  %153 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %152) #8
  %154 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %155 = load ptr, ptr %24, align 8, !tbaa !9
  %156 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %155) #8
  %157 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  br label %158

158:                                              ; preds = %171, %151
  %159 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  br i1 %159, label %161, label %160

160:                                              ; preds = %158
  store i32 6, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %173

161:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %162 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt23_Rb_tree_const_iteratorI7literalEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  store ptr %162, ptr %27, align 8, !tbaa !9
  %163 = load ptr, ptr %7, align 8, !tbaa !9
  %164 = load ptr, ptr %27, align 8, !tbaa !9
  %165 = getelementptr inbounds %struct.literal, ptr %164, i32 0, i32 0
  %166 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %165) #8
  %167 = load ptr, ptr %27, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.literal, ptr %167, i32 0, i32 1
  %169 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %168) #8
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.57, ptr noundef %166, ptr noundef %169) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %171

171:                                              ; preds = %161
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI7literalEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  br label %158

173:                                              ; preds = %160
  %174 = load ptr, ptr %7, align 8, !tbaa !9
  %175 = invoke i32 @fclose(ptr noundef %174)
          to label %176 unwind label %99

176:                                              ; preds = %173
  br label %178

177:                                              ; preds = %148
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %177, %176
  %179 = load i32, ptr %6, align 4, !tbaa !5
  %180 = icmp eq i32 %179, 0
  br i1 %180, label %181, label %299

181:                                              ; preds = %178
  %182 = load ptr, ptr %5, align 8, !tbaa !9
  %183 = getelementptr inbounds ptr, ptr %182, i64 1
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = invoke noalias ptr @fopen(ptr noundef %184, ptr noundef @.str.56)
          to label %186 unwind label %99

186:                                              ; preds = %181
  store ptr %185, ptr %8, align 8, !tbaa !9
  %187 = load ptr, ptr %8, align 8, !tbaa !9
  %188 = icmp ne ptr %187, null
  br i1 %188, label %189, label %297

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  store ptr %10, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %190 = load ptr, ptr %28, align 8, !tbaa !9
  %191 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %190) #8
  %192 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %193 = load ptr, ptr %28, align 8, !tbaa !9
  %194 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %193) #8
  %195 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %30, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  br label %196

196:                                              ; preds = %206, %189
  %197 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  br i1 %197, label %199, label %198

198:                                              ; preds = %196
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %208

199:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %200 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt23_Rb_tree_const_iteratorI7literalEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  store ptr %200, ptr %31, align 8, !tbaa !9
  %201 = load ptr, ptr %8, align 8, !tbaa !9
  %202 = load ptr, ptr %31, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.literal, ptr %202, i32 0, i32 1
  %204 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %203) #8
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.58, ptr noundef %204) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %206

206:                                              ; preds = %199
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI7literalEppEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  br label %196

208:                                              ; preds = %198
  %209 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @rewind(ptr noundef %209)
          to label %210 unwind label %99

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %292, %210
  br label %212

212:                                              ; preds = %211
  %213 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  %214 = load ptr, ptr %9, align 8, !tbaa !9
  %215 = invoke ptr @fgets(ptr noundef %213, i32 noundef 2048, ptr noundef %214)
          to label %216 unwind label %99

216:                                              ; preds = %212
  %217 = icmp ne ptr %215, null
  br i1 %217, label %218, label %291

218:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %219 = getelementptr inbounds [2048 x i8], ptr %11, i64 0, i64 0
  store ptr %219, ptr %32, align 8, !tbaa !9
  br label %220

220:                                              ; preds = %289, %218
  br label %221

221:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %222 = load ptr, ptr %32, align 8, !tbaa !9
  %223 = call noundef ptr @strchr(ptr noundef %222, i32 noundef 96) #9
  store ptr %223, ptr %33, align 8, !tbaa !9
  %224 = load ptr, ptr %33, align 8, !tbaa !9
  %225 = icmp ne ptr %224, null
  br i1 %225, label %226, label %282

226:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %227 = load ptr, ptr %33, align 8, !tbaa !9
  %228 = getelementptr inbounds i8, ptr %227, i64 1
  %229 = call noundef ptr @strchr(ptr noundef %228, i32 noundef 96) #9
  store ptr %229, ptr %34, align 8, !tbaa !9
  %230 = load ptr, ptr %34, align 8, !tbaa !9
  %231 = icmp ne ptr %230, null
  br i1 %231, label %232, label %274

232:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %36) #8
  %233 = getelementptr inbounds %struct.literal, ptr %36, i32 0, i32 0
  %234 = load ptr, ptr %33, align 8, !tbaa !9
  %235 = getelementptr inbounds i8, ptr %234, i64 1
  %236 = load ptr, ptr %34, align 8, !tbaa !9
  %237 = load ptr, ptr %33, align 8, !tbaa !9
  %238 = ptrtoint ptr %236 to i64
  %239 = ptrtoint ptr %237 to i64
  %240 = sub i64 %238, %239
  %241 = sub nsw i64 %240, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %233, ptr noundef %235, i64 noundef %241, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %242 unwind label %257

242:                                              ; preds = %232
  store i1 true, ptr %39, align 1
  %243 = getelementptr inbounds %struct.literal, ptr %36, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %243, ptr noundef @.str.59, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %244 unwind label %261

244:                                              ; preds = %242
  store i1 false, ptr %39, align 1
  %245 = invoke ptr @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE4findERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(64) %36)
          to label %246 unwind label %265

246:                                              ; preds = %244
  %247 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %35, i32 0, i32 0
  store ptr %245, ptr %247, align 8
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %36) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #8
  %248 = load ptr, ptr %33, align 8, !tbaa !9
  store i8 0, ptr %248, align 1, !tbaa !14
  %249 = load ptr, ptr %8, align 8, !tbaa !9
  %250 = load ptr, ptr %32, align 8, !tbaa !9
  %251 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI7literalEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #8
  %252 = getelementptr inbounds %struct.literal, ptr %251, i32 0, i32 1
  %253 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %252) #8
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %249, ptr noundef @.str.60, ptr noundef %250, ptr noundef %253) #8
  %255 = load ptr, ptr %34, align 8, !tbaa !9
  %256 = getelementptr inbounds i8, ptr %255, i64 1
  store ptr %256, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  br label %278

257:                                              ; preds = %232
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %12, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %13, align 4
  br label %273

261:                                              ; preds = %242
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %12, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %13, align 4
  br label %269

265:                                              ; preds = %244
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %12, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %13, align 4
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %36) #8
  br label %269

269:                                              ; preds = %265, %261
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #8
  %270 = load i1, ptr %39, align 1
  br i1 %270, label %271, label %272

271:                                              ; preds = %269
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %233) #8
  br label %272

272:                                              ; preds = %271, %269
  br label %273

273:                                              ; preds = %272, %257
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %300

274:                                              ; preds = %226
  %275 = load ptr, ptr %8, align 8, !tbaa !9
  %276 = load ptr, ptr %32, align 8, !tbaa !9
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %275, ptr noundef @.str.61, ptr noundef %276) #8
  store i32 13, ptr %23, align 4
  br label %279

278:                                              ; preds = %246
  store i32 0, ptr %23, align 4
  br label %279

279:                                              ; preds = %278, %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  %280 = load i32, ptr %23, align 4
  switch i32 %280, label %287 [
    i32 0, label %281
  ]

281:                                              ; preds = %279
  br label %286

282:                                              ; preds = %221
  %283 = load ptr, ptr %8, align 8, !tbaa !9
  %284 = load ptr, ptr %32, align 8, !tbaa !9
  %285 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %283, ptr noundef @.str.61, ptr noundef %284) #8
  store i32 13, ptr %23, align 4
  br label %287

286:                                              ; preds = %281
  store i32 0, ptr %23, align 4
  br label %287

287:                                              ; preds = %286, %282, %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  %288 = load i32, ptr %23, align 4
  switch i32 %288, label %314 [
    i32 0, label %289
    i32 13, label %290
  ]

289:                                              ; preds = %287
  br label %220, !llvm.loop !15

290:                                              ; preds = %287
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %292

291:                                              ; preds = %216
  br label %293

292:                                              ; preds = %290
  br label %211, !llvm.loop !16

293:                                              ; preds = %291
  %294 = load ptr, ptr %8, align 8, !tbaa !9
  %295 = invoke i32 @fclose(ptr noundef %294)
          to label %296 unwind label %99

296:                                              ; preds = %293
  br label %298

297:                                              ; preds = %186
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %298

298:                                              ; preds = %297, %296
  br label %299

299:                                              ; preds = %298, %178
  call void @llvm.lifetime.end.p0(i64 2048, ptr %11) #8
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #8
  br label %301

300:                                              ; preds = %273, %129, %99
  call void @llvm.lifetime.end.p0(i64 2048, ptr %11) #8
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %309

301:                                              ; preds = %299, %51
  %302 = load i32, ptr %6, align 4, !tbaa !5
  %303 = icmp ne i32 %302, 0
  br i1 %303, label %304, label %305

304:                                              ; preds = %301
  call void @perror(ptr noundef @.str.62)
  br label %305

305:                                              ; preds = %304, %301
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %306

306:                                              ; preds = %305, %42
  %307 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %307, ptr %3, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %308 = load i32, ptr %3, align 4
  ret i32 %308

309:                                              ; preds = %300
  %310 = load ptr, ptr %12, align 8
  %311 = load i32, ptr %13, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313

314:                                              ; preds = %287, %137
  unreachable
}

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

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

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

declare i32 @fclose(ptr noundef) #4

declare void @rewind(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE4findERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

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

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

declare void @perror(ptr noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress norecurse 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 = { "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 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 #7 = { 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 = { 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"}
!13 = distinct !{!13, !12}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<literal, literal, std::_Identity<literal>, std::less<literal>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<literal, literal, std::_Identity<literal>, std::less<literal>>::_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.std::allocator" = type { i8 }
%struct.literal = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str.55 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11print_usagev() local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15tokenize_stringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::set", align 8
  %4 = alloca [2048 x i8], align 16
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %struct.literal, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %struct.literal, align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::allocator", align 1
  %.not = icmp eq i32 %0, 4
  br i1 %.not, label %18, label %17

17:                                               ; preds = %2
  tail call void @_Z11print_usagev()
  br label %114

18:                                               ; preds = %2
  %19 = getelementptr inbounds i8, ptr %1, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = tail call noalias ptr @fopen(ptr noundef %20, ptr noundef nonnull @.str.55)
  %.not89 = icmp eq ptr %21, null
  br i1 %.not89, label %.thread119, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #7
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %4) #7
  %23 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 2048, ptr noundef nonnull %21)
  %.not90128 = icmp eq ptr %23, null
  br i1 %.not90128, label %._crit_edge, label %.preheader126.lr.ph

.preheader126.lr.ph:                              ; preds = %22
  %24 = getelementptr inbounds i8, ptr %7, i64 32
  br label %.preheader126

.loopexit127:                                     ; preds = %51, %.lr.ph151, %.preheader126
  %25 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 2048, ptr noundef nonnull %21)
  %.not90 = icmp eq ptr %25, null
  br i1 %.not90, label %._crit_edge, label %.preheader126, !llvm.loop !9

.preheader126:                                    ; preds = %.preheader126.lr.ph, %.loopexit127
  %26 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %4, i32 noundef 96) #8
  %.not99150 = icmp eq ptr %26, null
  br i1 %.not99150, label %.loopexit127, label %.lr.ph151

.lr.ph151:                                        ; preds = %.preheader126, %51
  %27 = phi ptr [ %53, %51 ], [ %26, %.preheader126 ]
  %28 = getelementptr inbounds i8, ptr %27, i64 1
  %29 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %28, i32 noundef 96) #8
  %.not100 = icmp eq ptr %29, null
  br i1 %.not100, label %.loopexit127, label %30

30:                                               ; preds = %.lr.ph151
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %31 = ptrtoint ptr %29 to i64
  %32 = ptrtoint ptr %27 to i64
  %33 = xor i64 %32, -1
  %34 = add i64 %31, %33
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %28, i64 noundef %34, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %35 unwind label %40

35:                                               ; preds = %30
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %36 unwind label %42

36:                                               ; preds = %35
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %37 unwind label %.thread

37:                                               ; preds = %36
  invoke void @_Z15tokenize_stringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull %8)
          to label %38 unwind label %.thread112

38:                                               ; preds = %37
  %39 = invoke { ptr, i8 } @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(64) %7)
          to label %51 unwind label %46

40:                                               ; preds = %30
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %50

42:                                               ; preds = %35
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %49

.thread:                                          ; preds = %36
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %48

.thread112:                                       ; preds = %37
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %48

46:                                               ; preds = %38
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %49

48:                                               ; preds = %.thread112, %.thread
  %.pn101.pn111 = phi { ptr, i32 } [ %44, %.thread ], [ %45, %.thread112 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %49

49:                                               ; preds = %46, %48, %42
  %.pn101.pn.pn = phi { ptr, i32 } [ %.pn101.pn111, %48 ], [ %47, %46 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %50

50:                                               ; preds = %49, %40
  %.pn101.pn.pn.pn = phi { ptr, i32 } [ %.pn101.pn.pn, %49 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %112

51:                                               ; preds = %38
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  %52 = getelementptr inbounds i8, ptr %29, i64 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %53 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %52, i32 noundef 96) #8
  %.not99 = icmp eq ptr %53, null
  br i1 %.not99, label %.loopexit127, label %.lr.ph151, !llvm.loop !9

._crit_edge:                                      ; preds = %.loopexit127, %22
  %54 = getelementptr inbounds i8, ptr %1, i64 16
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = call noalias ptr @fopen(ptr noundef %55, ptr noundef nonnull @.str.56)
  %.not91.not = icmp eq ptr %56, null
  br i1 %.not91.not, label %.thread123, label %57

57:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %58 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  store ptr %58, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %59 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  store ptr %59, ptr %10, align 8
  %60 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %60, label %.lr.ph, label %._crit_edge130

.lr.ph:                                           ; preds = %57, %.lr.ph
  %61 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt23_Rb_tree_const_iteratorI7literalEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %62 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %61) #7
  %63 = getelementptr inbounds i8, ptr %61, i64 32
  %64 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %63) #7
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %56, ptr noundef nonnull @.str.57, ptr noundef %62, ptr noundef %64) #7
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI7literalEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %67 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %67, label %.lr.ph, label %._crit_edge130

._crit_edge130:                                   ; preds = %.lr.ph, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %68 = call i32 @fclose(ptr noundef nonnull %56)
  %69 = getelementptr inbounds i8, ptr %1, i64 8
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = call noalias ptr @fopen(ptr noundef %70, ptr noundef nonnull @.str.56)
  %.not92 = icmp eq ptr %71, null
  br i1 %.not92, label %.thread123, label %72

72:                                               ; preds = %._crit_edge130
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %73 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  store ptr %73, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %74 = call ptr @_ZNKSt3setI7literalSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  store ptr %74, ptr %12, align 8
  %75 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br i1 %75, label %.lr.ph132, label %._crit_edge133

._crit_edge133:                                   ; preds = %.lr.ph132, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @rewind(ptr noundef nonnull %21)
  %76 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 2048, ptr noundef nonnull %21)
  %.not93134 = icmp eq ptr %76, null
  br i1 %.not93134, label %._crit_edge135, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge133
  %77 = getelementptr inbounds i8, ptr %14, i64 32
  br label %.preheader

.lr.ph132:                                        ; preds = %72, %.lr.ph132
  %78 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt23_Rb_tree_const_iteratorI7literalEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %79 = getelementptr inbounds i8, ptr %78, i64 32
  %80 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %79) #7
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %71, ptr noundef nonnull @.str.58, ptr noundef %80) #7
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI7literalEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %83 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br i1 %83, label %.lr.ph132, label %._crit_edge133

.loopexit:                                        ; preds = %.lr.ph155, %105, %.preheader
  %.059.lcssa = phi ptr [ %4, %.preheader ], [ %.059154, %.lr.ph155 ], [ %110, %105 ]
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %71, ptr noundef nonnull @.str.61, ptr noundef nonnull %.059.lcssa) #7
  %85 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 2048, ptr noundef nonnull %21)
  %.not93 = icmp eq ptr %85, null
  br i1 %.not93, label %._crit_edge135, label %.preheader, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.lr.ph, %.loopexit
  %86 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %4, i32 noundef 96) #8
  %.not95153 = icmp eq ptr %86, null
  br i1 %.not95153, label %.loopexit, label %.lr.ph155

.lr.ph155:                                        ; preds = %.preheader, %105
  %87 = phi ptr [ %111, %105 ], [ %86, %.preheader ]
  %.059154 = phi ptr [ %110, %105 ], [ %4, %.preheader ]
  %88 = getelementptr inbounds i8, ptr %87, i64 1
  %89 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %88, i32 noundef 96) #8
  %.not96 = icmp eq ptr %89, null
  br i1 %.not96, label %.loopexit, label %90

90:                                               ; preds = %.lr.ph155
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #7
  %91 = ptrtoint ptr %89 to i64
  %92 = ptrtoint ptr %87 to i64
  %93 = xor i64 %92, -1
  %94 = add i64 %91, %93
  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_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull %88, i64 noundef %94, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %95 unwind label %98

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %77, ptr noundef nonnull @.str.59, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %96 unwind label %102

96:                                               ; preds = %95
  %97 = invoke ptr @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE4findERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(64) %14)
          to label %105 unwind label %100

98:                                               ; preds = %90
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %104

100:                                              ; preds = %96
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  br label %104

102:                                              ; preds = %95
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %104

104:                                              ; preds = %100, %102, %98
  %.pn.pn = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ], [ %99, %98 ]
  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
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %112

105:                                              ; preds = %96
  store ptr %97, ptr %13, align 8
  call void @_ZN7literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #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
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #7
  store i8 0, ptr %87, align 1, !tbaa !12
  %106 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI7literalEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %107 = getelementptr inbounds i8, ptr %106, i64 32
  %108 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %107) #7
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %71, ptr noundef nonnull @.str.60, ptr noundef nonnull %.059154, ptr noundef %108) #7
  %110 = getelementptr inbounds i8, ptr %89, i64 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %111 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %110, i32 noundef 96) #8
  %.not95 = icmp eq ptr %111, null
  br i1 %.not95, label %.loopexit, label %.lr.ph155, !llvm.loop !11

112:                                              ; preds = %104, %50
  %.pn101.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn101.pn.pn.pn, %50 ], [ %.pn.pn, %104 ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #7
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn101.pn.pn.pn.pn

.thread123:                                       ; preds = %._crit_edge130, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #7
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #7
  br label %.thread119

._crit_edge135:                                   ; preds = %.loopexit, %._crit_edge133
  %113 = call i32 @fclose(ptr noundef nonnull %71)
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #7
  call void @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #7
  br label %114

.thread119:                                       ; preds = %18, %.thread123
  call void @perror(ptr noundef nonnull @.str.62) #9
  br label %114

114:                                              ; preds = %._crit_edge135, %.thread119, %17
  %.4 = phi i32 [ 1, %17 ], [ 1, %.thread119 ], [ 0, %._crit_edge135 ]
  ret i32 %.4
}

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

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI7literalES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nofree nounwind
declare void @rewind(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3setI7literalSt4lessIS0_ESaIS0_EE4findERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress norecurse 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 = { 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 #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 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!7, !7, i64 0}


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