; LLVM IR from nubot-nudt/simatch :: src/robot_code/world_model/rtdb/rtdb_api.ll (Z18read_configurationP15RTDBconf_agents)

; 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_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { 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.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 }
%struct.RTDBconf_agents = type { i32, [100 x %struct.RTDBconf_var], i32, [100 x %struct.RTDBconf_var] }
%struct.RTDBconf_var = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [97 x i8], align 1
@__FUNCTION__._Z18read_configurationP15RTDBconf_agents = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z18read_configurationP15RTDBconf_agents(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [100 x i8], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 100, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 -1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %20 = call ptr @getenv(ptr noundef @.str) #7
  store ptr %20, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 392, ptr %14) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14)
  %21 = getelementptr inbounds i8, ptr %14, i64 16
  %22 = load ptr, ptr %13, align 8, !tbaa !5
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef %22)
          to label %24 unwind label %37

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(128) %14)
          to label %25 unwind label %41

25:                                               ; preds = %24
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.1)
          to label %26 unwind label %45

26:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  %27 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  %28 = invoke noalias ptr @fopen(ptr noundef %27, ptr noundef @.str.2)
          to label %29 unwind label %50

29:                                               ; preds = %26
  store ptr %28, ptr %4, align 8, !tbaa !5
  %30 = icmp eq ptr %28, null
  br i1 %30, label %31, label %54

31:                                               ; preds = %29
  %32 = call ptr @__errno_location() #8
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = call ptr @strerror(i32 noundef %33) #7
  %35 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @__FUNCTION__._Z18read_configurationP15RTDBconf_agents, ptr noundef %34)
          to label %36 unwind label %50

36:                                               ; preds = %31
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %19, align 4
  br label %245

37:                                               ; preds = %1
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %15, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %16, align 4
  br label %248

41:                                               ; preds = %24
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %15, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %16, align 4
  br label %49

45:                                               ; preds = %25
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %15, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %49

49:                                               ; preds = %45, %41
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %247

50:                                               ; preds = %238, %216, %201, %59, %55, %31, %26
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %15, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %247

54:                                               ; preds = %29
  br label %55

55:                                               ; preds = %235, %54
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %58 = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %56, ptr noundef @.str.5, ptr noundef %57)
          to label %59 unwind label %50

59:                                               ; preds = %55
  store i32 %58, ptr %5, align 4, !tbaa !9
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = invoke i32 @fgetc(ptr noundef %60)
          to label %62 unwind label %50

62:                                               ; preds = %59
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = icmp eq i32 %63, -1
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  br label %238

66:                                               ; preds = %62
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %234

69:                                               ; preds = %66
  %70 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %71 = load i8, ptr %70, align 16, !tbaa !11
  %72 = sext i8 %71 to i32
  %73 = icmp ne i32 %72, 35
  br i1 %73, label %74, label %205

74:                                               ; preds = %69
  %75 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %76 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %75, ptr noundef @.str.6, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) #7
  %77 = load i8, ptr %12, align 1, !tbaa !11
  %78 = sext i8 %77 to i32
  %79 = icmp eq i32 %78, 115
  br i1 %79, label %80, label %133

80:                                               ; preds = %74
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %struct.RTDBconf_agents, ptr %82, i64 %84
  %86 = getelementptr inbounds %struct.RTDBconf_agents, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %struct.RTDBconf_agents, ptr %87, i64 %89
  %91 = getelementptr inbounds %struct.RTDBconf_agents, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 4, !tbaa !12
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %86, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.RTDBconf_var, ptr %94, i32 0, i32 0
  store i32 %81, ptr %95, align 4, !tbaa !14
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds %struct.RTDBconf_agents, ptr %97, i64 %99
  %101 = getelementptr inbounds %struct.RTDBconf_agents, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %struct.RTDBconf_agents, ptr %102, i64 %104
  %106 = getelementptr inbounds %struct.RTDBconf_agents, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 4, !tbaa !12
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %101, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.RTDBconf_var, ptr %109, i32 0, i32 1
  store i32 %96, ptr %110, align 4, !tbaa !16
  %111 = load i32, ptr %11, align 4, !tbaa !9
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %struct.RTDBconf_agents, ptr %112, i64 %114
  %116 = getelementptr inbounds %struct.RTDBconf_agents, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds %struct.RTDBconf_agents, ptr %117, i64 %119
  %121 = getelementptr inbounds %struct.RTDBconf_agents, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 4, !tbaa !12
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %116, i64 0, i64 %123
  %125 = getelementptr inbounds %struct.RTDBconf_var, ptr %124, i32 0, i32 2
  store i32 %111, ptr %125, align 4, !tbaa !17
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds %struct.RTDBconf_agents, ptr %126, i64 %128
  %130 = getelementptr inbounds %struct.RTDBconf_agents, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 4, !tbaa !12
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %130, align 4, !tbaa !12
  br label %186

133:                                              ; preds = %74
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = load i32, ptr %8, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.RTDBconf_agents, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.RTDBconf_agents, ptr %138, i32 0, i32 3
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = load i32, ptr %8, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds %struct.RTDBconf_agents, ptr %140, i64 %142
  %144 = getelementptr inbounds %struct.RTDBconf_agents, ptr %143, i32 0, i32 2
  %145 = load i32, ptr %144, align 4, !tbaa !18
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %139, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.RTDBconf_var, ptr %147, i32 0, i32 0
  store i32 %134, ptr %148, align 4, !tbaa !14
  %149 = load i32, ptr %10, align 4, !tbaa !9
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = load i32, ptr %8, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.RTDBconf_agents, ptr %150, i64 %152
  %154 = getelementptr inbounds %struct.RTDBconf_agents, ptr %153, i32 0, i32 3
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds %struct.RTDBconf_agents, ptr %155, i64 %157
  %159 = getelementptr inbounds %struct.RTDBconf_agents, ptr %158, i32 0, i32 2
  %160 = load i32, ptr %159, align 4, !tbaa !18
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %154, i64 0, i64 %161
  %163 = getelementptr inbounds %struct.RTDBconf_var, ptr %162, i32 0, i32 1
  store i32 %149, ptr %163, align 4, !tbaa !16
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = load i32, ptr %8, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds %struct.RTDBconf_agents, ptr %165, i64 %167
  %169 = getelementptr inbounds %struct.RTDBconf_agents, ptr %168, i32 0, i32 3
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds %struct.RTDBconf_agents, ptr %170, i64 %172
  %174 = getelementptr inbounds %struct.RTDBconf_agents, ptr %173, i32 0, i32 2
  %175 = load i32, ptr %174, align 4, !tbaa !18
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %169, i64 0, i64 %176
  %178 = getelementptr inbounds %struct.RTDBconf_var, ptr %177, i32 0, i32 2
  store i32 %164, ptr %178, align 4, !tbaa !17
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = load i32, ptr %8, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds %struct.RTDBconf_agents, ptr %179, i64 %181
  %183 = getelementptr inbounds %struct.RTDBconf_agents, ptr %182, i32 0, i32 2
  %184 = load i32, ptr %183, align 4, !tbaa !18
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %183, align 4, !tbaa !18
  br label %186

186:                                              ; preds = %133, %80
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = load i32, ptr %8, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds %struct.RTDBconf_agents, ptr %187, i64 %189
  %191 = getelementptr inbounds %struct.RTDBconf_agents, ptr %190, i32 0, i32 0
  %192 = load i32, ptr %191, align 4, !tbaa !12
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = load i32, ptr %8, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds %struct.RTDBconf_agents, ptr %193, i64 %195
  %197 = getelementptr inbounds %struct.RTDBconf_agents, ptr %196, i32 0, i32 2
  %198 = load i32, ptr %197, align 4, !tbaa !18
  %199 = add nsw i32 %192, %198
  %200 = icmp sgt i32 %199, 100
  br i1 %200, label %201, label %204

201:                                              ; preds = %186
  %202 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @.str.4, ptr noundef @__FUNCTION__._Z18read_configurationP15RTDBconf_agents)
          to label %203 unwind label %50

203:                                              ; preds = %201
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %19, align 4
  br label %245

204:                                              ; preds = %186
  br label %233

205:                                              ; preds = %69
  %206 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 1
  %207 = load i8, ptr %206, align 1, !tbaa !11
  %208 = sext i8 %207 to i32
  %209 = icmp ne i32 %208, 35
  br i1 %209, label %210, label %232

210:                                              ; preds = %205
  %211 = getelementptr inbounds [100 x i8], ptr %6, i64 0, i64 0
  %212 = getelementptr inbounds i8, ptr %211, i64 1
  %213 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %212, ptr noundef @.str.8, ptr noundef %8) #7
  %214 = load i32, ptr %8, align 4, !tbaa !9
  %215 = icmp sge i32 %214, 10
  br i1 %215, label %216, label %219

216:                                              ; preds = %210
  %217 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @.str.4, ptr noundef @__FUNCTION__._Z18read_configurationP15RTDBconf_agents)
          to label %218 unwind label %50

218:                                              ; preds = %216
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %19, align 4
  br label %245

219:                                              ; preds = %210
  %220 = load i32, ptr %7, align 4, !tbaa !9
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %7, align 4, !tbaa !9
  %222 = load ptr, ptr %3, align 8, !tbaa !5
  %223 = load i32, ptr %7, align 4, !tbaa !9
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds %struct.RTDBconf_agents, ptr %222, i64 %224
  %226 = getelementptr inbounds %struct.RTDBconf_agents, ptr %225, i32 0, i32 0
  store i32 0, ptr %226, align 4, !tbaa !12
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = load i32, ptr %7, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds %struct.RTDBconf_agents, ptr %227, i64 %229
  %231 = getelementptr inbounds %struct.RTDBconf_agents, ptr %230, i32 0, i32 2
  store i32 0, ptr %231, align 4, !tbaa !18
  br label %232

232:                                              ; preds = %219, %205
  br label %233

233:                                              ; preds = %232, %204
  br label %234

234:                                              ; preds = %233, %66
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %5, align 4, !tbaa !9
  %237 = icmp ne i32 %236, -1
  br i1 %237, label %55, label %238, !llvm.loop !19

238:                                              ; preds = %235, %65
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = invoke i32 @fclose(ptr noundef %239)
          to label %241 unwind label %50

241:                                              ; preds = %238
  %242 = load i32, ptr %7, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %7, align 4, !tbaa !9
  %244 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %244, ptr %2, align 4
  store i32 1, ptr %19, align 4
  br label %245

245:                                              ; preds = %241, %218, %203, %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 100, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %246 = load i32, ptr %2, align 4
  ret i32 %246

247:                                              ; preds = %50, %49
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %248

248:                                              ; preds = %247, %37
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 100, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %249

249:                                              ; preds = %248
  %250 = load ptr, ptr %15, align 8
  %251 = load i32, ptr %16, align 4
  %252 = insertvalue { ptr, i32 } poison, ptr %250, 0
  %253 = insertvalue { ptr, i32 } %252, i32 %251, 1
  resume { ptr, i32 } %253
}

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

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

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

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

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

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

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

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

declare i32 @fgetc(ptr noundef) #5

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #2

declare i32 @fclose(ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind willreturn memory(none) "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(none) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTS15RTDBconf_agents", !10, i64 0, !7, i64 4, !10, i64 1204, !7, i64 1208}
!14 = !{!15, !10, i64 0}
!15 = !{!"_ZTS12RTDBconf_var", !10, i64 0, !10, i64 4, !10, i64 8}
!16 = !{!15, !10, i64 4}
!17 = !{!15, !10, i64 8}
!18 = !{!13, !10, i64 1204}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { 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.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 }
%struct.RTDBconf_agents = type { i32, [100 x %struct.RTDBconf_var], i32, [100 x %struct.RTDBconf_var] }
%struct.RTDBconf_var = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [97 x i8], align 1
@__FUNCTION__._Z18read_configurationP15RTDBconf_agents = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -2147483647, -2147483648) i32 @_Z18read_configurationP15RTDBconf_agents(ptr nocapture noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca [100 x i8], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #9
  %11 = tail call ptr @getenv(ptr noundef nonnull @.str) #9
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %8) #9
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8)
  %12 = getelementptr inbounds i8, ptr %8, i64 16
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %11)
          to label %14 unwind label %26

14:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #9
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %8)
          to label %15 unwind label %28

15:                                               ; preds = %14
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.1)
          to label %16 unwind label %30

16:                                               ; preds = %15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  %17 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  %18 = call noalias ptr @fopen(ptr noundef %17, ptr noundef nonnull @.str.2)
  %19 = icmp eq ptr %18, null
  br i1 %19, label %21, label %.preheader

.preheader:                                       ; preds = %16
  %20 = getelementptr inbounds i8, ptr %2, i64 1
  br label %.outer

.outer:                                           ; preds = %86, %.preheader
  %.036.ph = phi i32 [ %87, %86 ], [ -1, %.preheader ]
  br label %35

21:                                               ; preds = %16
  %22 = tail call ptr @__errno_location() #10
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = call ptr @strerror(i32 noundef %23) #9
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @__FUNCTION__._Z18read_configurationP15RTDBconf_agents, ptr noundef %24)
  br label %94

26:                                               ; preds = %1
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %96

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %15
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  br label %32

32:                                               ; preds = %30, %28
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  br label %95

33:                                               ; preds = %35
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %95

35:                                               ; preds = %.backedge, %.outer
  %36 = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %18, ptr noundef nonnull @.str.5, ptr noundef nonnull %2)
          to label %37 unwind label %33

37:                                               ; preds = %35
  %38 = call i32 @fgetc(ptr noundef nonnull %18)
  switch i32 %36, label %39 [
    i32 -1, label %91
    i32 0, label %.backedge
  ]

.backedge:                                        ; preds = %37, %78, %71
  br label %35

39:                                               ; preds = %37
  %40 = load i8, ptr %2, align 16, !tbaa !9
  %.not44 = icmp eq i8 %40, 35
  br i1 %.not44, label %78, label %41

41:                                               ; preds = %39
  %42 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %2, ptr noundef nonnull @.str.6, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7) #9
  %43 = load i8, ptr %7, align 1, !tbaa !9
  %44 = icmp eq i8 %43, 115
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.RTDBconf_agents, ptr %0, i64 %47
  br i1 %44, label %49, label %59

49:                                               ; preds = %41
  %50 = getelementptr inbounds i8, ptr %48, i64 4
  %51 = load i32, ptr %48, align 4, !tbaa !10
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %50, i64 0, i64 %52
  store i32 %45, ptr %53, align 4, !tbaa !12
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %50, i64 0, i64 %52, i32 1
  store i32 %54, ptr %55, align 4, !tbaa !14
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %50, i64 0, i64 %52, i32 2
  store i32 %56, ptr %57, align 4, !tbaa !15
  %58 = add nsw i32 %51, 1
  store i32 %58, ptr %48, align 4, !tbaa !10
  %.phi.trans.insert = getelementptr inbounds i8, ptr %48, i64 1204
  %.pre52 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !16
  br label %71

59:                                               ; preds = %41
  %60 = getelementptr inbounds i8, ptr %48, i64 1208
  %61 = getelementptr inbounds i8, ptr %48, i64 1204
  %62 = load i32, ptr %61, align 4, !tbaa !16
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %60, i64 0, i64 %63
  store i32 %45, ptr %64, align 4, !tbaa !12
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %60, i64 0, i64 %63, i32 1
  store i32 %65, ptr %66, align 4, !tbaa !14
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = getelementptr inbounds [100 x %struct.RTDBconf_var], ptr %60, i64 0, i64 %63, i32 2
  store i32 %67, ptr %68, align 4, !tbaa !15
  %69 = getelementptr inbounds %struct.RTDBconf_agents, ptr %0, i64 %47, i32 2
  %70 = add nsw i32 %62, 1
  store i32 %70, ptr %69, align 4, !tbaa !16
  %.pre = load i32, ptr %48, align 4, !tbaa !10
  br label %71

71:                                               ; preds = %59, %49
  %72 = phi i32 [ %70, %59 ], [ %.pre52, %49 ]
  %73 = phi i32 [ %.pre, %59 ], [ %58, %49 ]
  %74 = add nsw i32 %72, %73
  %75 = icmp sgt i32 %74, 100
  br i1 %75, label %76, label %.backedge

76:                                               ; preds = %71
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull @.str.4, ptr noundef nonnull @__FUNCTION__._Z18read_configurationP15RTDBconf_agents)
  br label %94

78:                                               ; preds = %39
  %79 = load i8, ptr %20, align 1, !tbaa !9
  %.not45 = icmp eq i8 %79, 35
  br i1 %.not45, label %.backedge, label %80

80:                                               ; preds = %78
  %81 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %20, ptr noundef nonnull @.str.8, ptr noundef nonnull %3) #9
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = icmp sgt i32 %82, 9
  br i1 %83, label %84, label %86

84:                                               ; preds = %80
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @.str.4, ptr noundef nonnull @__FUNCTION__._Z18read_configurationP15RTDBconf_agents)
  br label %94

86:                                               ; preds = %80
  %87 = add nsw i32 %.036.ph, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %struct.RTDBconf_agents, ptr %0, i64 %88
  store i32 0, ptr %89, align 4, !tbaa !10
  %90 = getelementptr inbounds i8, ptr %89, i64 1204
  store i32 0, ptr %90, align 4, !tbaa !16
  br label %.outer

91:                                               ; preds = %37
  %92 = call i32 @fclose(ptr noundef nonnull %18)
  %93 = add nsw i32 %.036.ph, 1
  br label %94

94:                                               ; preds = %91, %84, %76, %21
  %.035 = phi i32 [ -1, %21 ], [ %93, %91 ], [ -1, %76 ], [ -1, %84 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #9
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %2) #9
  ret i32 %.035

95:                                               ; preds = %33, %32
  %.pn41 = phi { ptr, i32 } [ %34, %33 ], [ %.pn, %32 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  br label %96

96:                                               ; preds = %95, %26
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %95 ], [ %27, %26 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #9
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn41.pn
}

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

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #7

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4 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 = { nofree nounwind 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 #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { "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(none) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"_ZTS15RTDBconf_agents", !6, i64 0, !7, i64 4, !6, i64 1204, !7, i64 1208}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS12RTDBconf_var", !6, i64 0, !6, i64 4, !6, i64 8}
!14 = !{!13, !6, i64 4}
!15 = !{!13, !6, i64 8}
!16 = !{!11, !6, i64 1204}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass