; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/datatypes/bit/sc_bv_base.ll (ZN5sc_dt14convert_to_binB5cxx11EPKc)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.sc_dt::sc_fix" = type { %"class.sc_dt::sc_fxnum" }
%"class.sc_dt::sc_fxnum" = type { ptr, %"class.sc_dt::scfx_params", i8, i8, ptr }
%"class.sc_dt::scfx_params" = type { %"class.sc_dt::sc_fxtype_params", i32, %"class.sc_dt::sc_fxcast_switch" }
%"class.sc_dt::sc_fxtype_params" = type { i32, i32, i32, i32, i32 }
%"class.sc_dt::sc_fxcast_switch" = type { i32 }
%"class.sc_core::sc_report" = type { %"class.std::exception", i32, ptr, ptr, ptr, i32, ptr, ptr, i32, ptr }
%"class.std::exception" = type { ptr }

@.str = external hidden unnamed_addr constant [93 x i8], align 1
@_ZN7sc_core21SC_ID_CANNOT_CONVERT_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZTIN7sc_core9sc_reportE = external constant ptr
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt14convert_to_binB5cxx11EPKc(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i1, align 1
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.sc_dt::sc_fix", align 8
  %13 = alloca %"class.sc_dt::sc_fxcast_switch", align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.sc_core::sc_report", align 8
  %18 = alloca [8192 x i8], align 16
  %19 = alloca i1, align 1
  %20 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %2
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core21SC_ID_CANNOT_CONVERT_E, ptr noundef @.str.2, ptr noundef @.str, i32 noundef 317)
  br label %24

24:                                               ; preds = %23, %2
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core21SC_ID_CANNOT_CONVERT_E, ptr noundef @.str.3, ptr noundef @.str, i32 noundef 321)
  br label %30

30:                                               ; preds = %29, %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call i64 @strlen(ptr noundef %31) #11
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr %5, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  store i32 0, ptr %6, align 4, !tbaa !10
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 0
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 45
  br i1 %38, label %45, label %39

39:                                               ; preds = %30
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 0
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 %43, 43
  br i1 %44, label %45, label %48

45:                                               ; preds = %39, %30
  %46 = load i32, ptr %6, align 4, !tbaa !10
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %6, align 4, !tbaa !10
  br label %48

48:                                               ; preds = %45, %39
  %49 = load i32, ptr %5, align 4, !tbaa !10
  %50 = load i32, ptr %6, align 4, !tbaa !10
  %51 = add nsw i32 %50, 2
  %52 = icmp sgt i32 %49, %51
  br i1 %52, label %53, label %281

53:                                               ; preds = %48
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load i32, ptr %6, align 4, !tbaa !10
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i8, ptr %54, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !9
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 48
  br i1 %60, label %61, label %281

61:                                               ; preds = %53
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load i32, ptr %6, align 4, !tbaa !10
  %64 = add nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i8, ptr %62, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !9
  %68 = sext i8 %67 to i32
  %69 = icmp eq i32 %68, 98
  br i1 %69, label %79, label %70

70:                                               ; preds = %61
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !10
  %73 = add nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %71, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !9
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 66
  br i1 %78, label %79, label %115

79:                                               ; preds = %70, %61
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !10
  %82 = add nsw i32 %81, 2
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %80, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 48
  br i1 %87, label %97, label %88

88:                                               ; preds = %79
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !10
  %91 = add nsw i32 %90, 2
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %89, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !9
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %95, 49
  br i1 %96, label %97, label %114

97:                                               ; preds = %88, %79
  store i1 false, ptr %7, align 1
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i64 2
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %99, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %100 unwind label %104

100:                                              ; preds = %97
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #10
  %101 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.4)
          to label %102 unwind label %108

102:                                              ; preds = %100
  store i1 true, ptr %7, align 1
  store i32 1, ptr %11, align 4
  %103 = load i1, ptr %7, align 1
  br i1 %103, label %113, label %112

104:                                              ; preds = %97
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #10
  br label %298

108:                                              ; preds = %100
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #10
  br label %298

112:                                              ; preds = %102
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #10
  br label %113

113:                                              ; preds = %112, %102
  br label %297

114:                                              ; preds = %88
  br label %115

115:                                              ; preds = %114, %70
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !10
  %118 = add nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %116, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !9
  %122 = sext i8 %121 to i32
  %123 = icmp eq i32 %122, 98
  br i1 %123, label %205, label %124

124:                                              ; preds = %115
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !10
  %127 = add nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %125, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !9
  %131 = sext i8 %130 to i32
  %132 = icmp eq i32 %131, 66
  br i1 %132, label %205, label %133

133:                                              ; preds = %124
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = load i32, ptr %6, align 4, !tbaa !10
  %136 = add nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %134, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !9
  %140 = sext i8 %139 to i32
  %141 = icmp eq i32 %140, 99
  br i1 %141, label %205, label %142

142:                                              ; preds = %133
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load i32, ptr %6, align 4, !tbaa !10
  %145 = add nsw i32 %144, 1
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i8, ptr %143, i64 %146
  %148 = load i8, ptr %147, align 1, !tbaa !9
  %149 = sext i8 %148 to i32
  %150 = icmp eq i32 %149, 67
  br i1 %150, label %205, label %151

151:                                              ; preds = %142
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = load i32, ptr %6, align 4, !tbaa !10
  %154 = add nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %152, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !9
  %158 = sext i8 %157 to i32
  %159 = icmp eq i32 %158, 100
  br i1 %159, label %205, label %160

160:                                              ; preds = %151
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = load i32, ptr %6, align 4, !tbaa !10
  %163 = add nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i8, ptr %161, i64 %164
  %166 = load i8, ptr %165, align 1, !tbaa !9
  %167 = sext i8 %166 to i32
  %168 = icmp eq i32 %167, 68
  br i1 %168, label %205, label %169

169:                                              ; preds = %160
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = load i32, ptr %6, align 4, !tbaa !10
  %172 = add nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i8, ptr %170, i64 %173
  %175 = load i8, ptr %174, align 1, !tbaa !9
  %176 = sext i8 %175 to i32
  %177 = icmp eq i32 %176, 111
  br i1 %177, label %205, label %178

178:                                              ; preds = %169
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = load i32, ptr %6, align 4, !tbaa !10
  %181 = add nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i8, ptr %179, i64 %182
  %184 = load i8, ptr %183, align 1, !tbaa !9
  %185 = sext i8 %184 to i32
  %186 = icmp eq i32 %185, 79
  br i1 %186, label %205, label %187

187:                                              ; preds = %178
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = load i32, ptr %6, align 4, !tbaa !10
  %190 = add nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds i8, ptr %188, i64 %191
  %193 = load i8, ptr %192, align 1, !tbaa !9
  %194 = sext i8 %193 to i32
  %195 = icmp eq i32 %194, 120
  br i1 %195, label %205, label %196

196:                                              ; preds = %187
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = load i32, ptr %6, align 4, !tbaa !10
  %199 = add nsw i32 %198, 1
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds i8, ptr %197, i64 %200
  %202 = load i8, ptr %201, align 1, !tbaa !9
  %203 = sext i8 %202 to i32
  %204 = icmp eq i32 %203, 88
  br i1 %204, label %205, label %280

205:                                              ; preds = %196, %187, %178, %169, %160, %151, %142, %133, %124, %115
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #10
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = load i32, ptr %5, align 4, !tbaa !10
  %208 = mul nsw i32 %207, 4
  %209 = load i32, ptr %5, align 4, !tbaa !10
  %210 = mul nsw i32 %209, 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  invoke void @_ZN5sc_dt16sc_fxcast_switchC2ENS_9sc_switchE(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef 1)
          to label %211 unwind label %238

211:                                              ; preds = %205
  invoke void @_ZN5sc_dt6sc_fixC2EPKciiNS_9sc_q_modeENS_9sc_o_modeEiRKNS_16sc_fxcast_switchEPNS_17sc_fxnum_observerE(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef %206, i32 noundef %208, i32 noundef %210, i32 noundef 5, i32 noundef 3, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef null)
          to label %212 unwind label %238

212:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #10
  invoke void @_ZNK5sc_dt8sc_fxnum6to_binB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %213 unwind label %242

213:                                              ; preds = %212
  %214 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.4)
          to label %215 unwind label %246

215:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %216 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  %217 = getelementptr inbounds i8, ptr %216, i64 2
  store ptr %217, ptr %15, align 8, !tbaa !5
  br label %218

218:                                              ; preds = %235, %215
  %219 = load ptr, ptr %15, align 8, !tbaa !5
  %220 = getelementptr inbounds i8, ptr %219, i64 1
  %221 = load i8, ptr %220, align 1, !tbaa !9
  %222 = icmp ne i8 %221, 0
  br i1 %222, label %223, label %233

223:                                              ; preds = %218
  %224 = load ptr, ptr %15, align 8, !tbaa !5
  %225 = getelementptr inbounds i8, ptr %224, i64 0
  %226 = load i8, ptr %225, align 1, !tbaa !9
  %227 = sext i8 %226 to i32
  %228 = load ptr, ptr %15, align 8, !tbaa !5
  %229 = getelementptr inbounds i8, ptr %228, i64 1
  %230 = load i8, ptr %229, align 1, !tbaa !9
  %231 = sext i8 %230 to i32
  %232 = icmp eq i32 %227, %231
  br label %233

233:                                              ; preds = %223, %218
  %234 = phi i1 [ false, %218 ], [ %232, %223 ]
  br i1 %234, label %235, label %250

235:                                              ; preds = %233
  %236 = load ptr, ptr %15, align 8, !tbaa !5
  %237 = getelementptr inbounds i8, ptr %236, i32 1
  store ptr %237, ptr %15, align 8, !tbaa !5
  br label %218, !llvm.loop !12

238:                                              ; preds = %211, %205
  %239 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %9, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %259

242:                                              ; preds = %212
  %243 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %9, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %10, align 4
  br label %258

246:                                              ; preds = %213
  %247 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %9, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %10, align 4
  br label %257

250:                                              ; preds = %233
  %251 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %251, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %252 unwind label %253

252:                                              ; preds = %250
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #10
  call void @_ZN5sc_dt8sc_fxnumD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #10
  br label %297

253:                                              ; preds = %250
  %254 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %9, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %257

257:                                              ; preds = %253, %246
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %258

258:                                              ; preds = %257, %242
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #10
  call void @_ZN5sc_dt8sc_fxnumD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #10
  br label %259

259:                                              ; preds = %258, %238
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #10
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %10, align 4
  %262 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN7sc_core9sc_reportE) #10
  %263 = icmp eq i32 %261, %262
  br i1 %263, label %264, label %298

264:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 80, ptr %17) #10
  %265 = load ptr, ptr %9, align 8
  %266 = call ptr @__cxa_get_exception_ptr(ptr %265) #10
  invoke void @_ZN7sc_core9sc_reportC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %17, ptr noundef nonnull align 8 dereferenceable(80) %266)
          to label %267 unwind label %304

267:                                              ; preds = %264
  %268 = call ptr @__cxa_begin_catch(ptr %265) #10
  call void @llvm.lifetime.start.p0(i64 8192, ptr %18) #10
  %269 = getelementptr inbounds [8192 x i8], ptr %18, i64 0, i64 0
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %269, ptr noundef @.str.5, ptr noundef %270) #10
  %272 = getelementptr inbounds [8192 x i8], ptr %18, i64 0, i64 0
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core21SC_ID_CANNOT_CONVERT_E, ptr noundef %272, ptr noundef @.str, i32 noundef 360)
          to label %273 unwind label %274

273:                                              ; preds = %267
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #10
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8192, ptr %18) #10
  call void @_ZN7sc_core9sc_reportD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %17) #10
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #10
  br label %297

274:                                              ; preds = %267
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %9, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8192, ptr %18) #10
  call void @_ZN7sc_core9sc_reportD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %17) #10
  invoke void @__cxa_end_catch()
          to label %278 unwind label %304

278:                                              ; preds = %274
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #10
  br label %298

279:                                              ; No predecessors!
  br label %280

280:                                              ; preds = %279, %196
  br label %281

281:                                              ; preds = %280, %53, %48
  store i1 false, ptr %19, align 1
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %282, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %283 unwind label %287

283:                                              ; preds = %281
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #10
  %284 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef @.str.6)
          to label %285 unwind label %291

285:                                              ; preds = %283
  store i1 true, ptr %19, align 1
  store i32 1, ptr %11, align 4
  %286 = load i1, ptr %19, align 1
  br i1 %286, label %296, label %295

287:                                              ; preds = %281
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %9, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #10
  br label %298

291:                                              ; preds = %283
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %9, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #10
  br label %298

295:                                              ; preds = %285
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #10
  br label %296

296:                                              ; preds = %295, %285
  br label %297

297:                                              ; preds = %296, %273, %252, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  ret void

298:                                              ; preds = %291, %287, %278, %260, %108, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  br label %299

299:                                              ; preds = %298
  %300 = load ptr, ptr %9, align 8
  %301 = load i32, ptr %10, align 4
  %302 = insertvalue { ptr, i32 } poison, ptr %300, 0
  %303 = insertvalue { ptr, i32 } %302, i32 %301, 1
  resume { ptr, i32 } %303

304:                                              ; preds = %274, %264
  %305 = landingpad { ptr, i32 }
          catch ptr null
  %306 = extractvalue { ptr, i32 } %305, 0
  call void @__clang_call_terminate(ptr %306) #12
  unreachable
}

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt16sc_fxcast_switchC2ENS_9sc_switchE(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt6sc_fixC2EPKciiNS_9sc_q_modeENS_9sc_o_modeEiRKNS_16sc_fxcast_switchEPNS_17sc_fxnum_observerE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) unnamed_addr #6 align 2

declare void @_ZNK5sc_dt8sc_fxnum6to_binB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #0

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_get_exception_ptr(ptr)

declare void @_ZN7sc_core9sc_reportC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #8

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #9

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

; Function Attrs: nounwind
declare void @_ZN7sc_core9sc_reportD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #9

declare void @__cxa_end_catch()

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

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

attributes #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 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "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 "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 #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { noreturn nounwind }

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

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


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.sc_dt::sc_fix" = type { %"class.sc_dt::sc_fxnum" }
%"class.sc_dt::sc_fxnum" = type { ptr, %"class.sc_dt::scfx_params", i8, i8, ptr }
%"class.sc_dt::scfx_params" = type { %"class.sc_dt::sc_fxtype_params", i32, %"class.sc_dt::sc_fxcast_switch" }
%"class.sc_dt::sc_fxtype_params" = type { i32, i32, i32, i32, i32 }
%"class.sc_dt::sc_fxcast_switch" = type { i32 }
%"class.sc_core::sc_report" = type { %"class.std::exception", i32, ptr, ptr, ptr, i32, ptr, ptr, i32, ptr }
%"class.std::exception" = type { ptr }

@.str = external hidden unnamed_addr constant [93 x i8], align 1
@_ZN7sc_core21SC_ID_CANNOT_CONVERT_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZTIN7sc_core9sc_reportE = external constant ptr
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt14convert_to_binB5cxx11EPKc(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.sc_dt::sc_fix", align 8
  %5 = alloca %"class.sc_dt::sc_fxcast_switch", align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.sc_core::sc_report", align 8
  %9 = alloca [8192 x i8], align 16
  %10 = alloca %"class.std::allocator", align 1
  %11 = icmp eq ptr %1, null
  br i1 %11, label %12, label %13

12:                                               ; preds = %2
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core21SC_ID_CANNOT_CONVERT_E, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 317)
  br label %13

13:                                               ; preds = %12, %2
  %14 = load i8, ptr %1, align 1, !tbaa !5
  %15 = icmp eq i8 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core21SC_ID_CANNOT_CONVERT_E, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str, i32 noundef 321)
  %.pre = load i8, ptr %1, align 1, !tbaa !5
  br label %17

17:                                               ; preds = %16, %13
  %18 = phi i8 [ %.pre, %16 ], [ %14, %13 ]
  %19 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #11
  %20 = trunc i64 %19 to i32
  %21 = add i8 %18, -43
  %switch.and = and i8 %21, -3
  %switch.selectcmp = icmp eq i8 %switch.and, 0
  %22 = zext i1 %switch.selectcmp to i32
  %23 = or disjoint i32 %22, 2
  %24 = icmp slt i32 %23, %20
  br i1 %24, label %25, label %84

25:                                               ; preds = %17
  %26 = zext i1 %switch.selectcmp to i64
  %27 = getelementptr inbounds i8, ptr %1, i64 %26
  %28 = load i8, ptr %27, align 1, !tbaa !5
  %29 = icmp eq i8 %28, 48
  br i1 %29, label %30, label %84

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %27, i64 1
  %32 = load i8, ptr %31, align 1, !tbaa !5
  switch i8 %32, label %84 [
    i8 98, label %33
    i8 66, label %33
    i8 99, label %47
    i8 67, label %47
    i8 100, label %47
    i8 68, label %47
    i8 111, label %47
    i8 79, label %47
    i8 120, label %47
    i8 88, label %47
  ]

33:                                               ; preds = %30, %30
  %34 = zext nneg i32 %23 to i64
  %35 = getelementptr inbounds i8, ptr %1, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !5
  %37 = and i8 %36, -2
  %switch = icmp eq i8 %37, 48
  br i1 %switch, label %38, label %46

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %1, i64 2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #12
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %39, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %40 unwind label %42

40:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #12
  %41 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.4)
          to label %91 unwind label %44

42:                                               ; preds = %38
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #12
  br label %92

44:                                               ; preds = %40
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #12
  br label %92

46:                                               ; preds = %33
  switch i8 %32, label %84 [
    i8 98, label %47
    i8 66, label %47
    i8 88, label %47
    i8 67, label %47
    i8 79, label %47
    i8 68, label %47
  ]

47:                                               ; preds = %46, %46, %30, %30, %30, %30, %30, %30, %30, %30, %46, %46, %46, %46
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #12
  %48 = shl nsw i32 %20, 2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #12
  call void @_ZN5sc_dt16sc_fxcast_switchC2ENS_9sc_switchE(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 1)
  invoke void @_ZN5sc_dt6sc_fixC2EPKciiNS_9sc_q_modeENS_9sc_o_modeEiRKNS_16sc_fxcast_switchEPNS_17sc_fxnum_observerE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull %1, i32 noundef %48, i32 noundef %48, i32 noundef 5, i32 noundef 3, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef null)
          to label %49 unwind label %61

49:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #12
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #12
  invoke void @_ZNK5sc_dt8sc_fxnum6to_binB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %50 unwind label %63

50:                                               ; preds = %49
  %51 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.4)
          to label %52 unwind label %65

52:                                               ; preds = %50
  %53 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #12
  %54 = getelementptr inbounds i8, ptr %53, i64 2
  br label %55

55:                                               ; preds = %58, %52
  %.0 = phi ptr [ %54, %52 ], [ %56, %58 ]
  %56 = getelementptr inbounds i8, ptr %.0, i64 1
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %.not = icmp eq i8 %57, 0
  br i1 %.not, label %.critedge, label %58

58:                                               ; preds = %55
  %59 = load i8, ptr %.0, align 1, !tbaa !5
  %60 = icmp eq i8 %59, %57
  br i1 %60, label %55, label %.critedge, !llvm.loop !8

61:                                               ; preds = %47
  %62 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #12
  br label %72

63:                                               ; preds = %49
  %64 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  br label %71

65:                                               ; preds = %50
  %66 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  br label %70

.critedge:                                        ; preds = %55, %58
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #12
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #12
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %.0, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %67 unwind label %68

67:                                               ; preds = %.critedge
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #12
  call void @_ZN5sc_dt8sc_fxnumD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #12
  br label %91

68:                                               ; preds = %.critedge
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN7sc_core9sc_reportE
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #12
  br label %70

70:                                               ; preds = %68, %65
  %.pn = phi { ptr, i32 } [ %69, %68 ], [ %66, %65 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #12
  br label %71

71:                                               ; preds = %70, %63
  %.pn.pn = phi { ptr, i32 } [ %.pn, %70 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #12
  call void @_ZN5sc_dt8sc_fxnumD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #12
  br label %72

72:                                               ; preds = %71, %61
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %71 ], [ %62, %61 ]
  %.2 = extractvalue { ptr, i32 } %.pn.pn.pn, 1
  %.257 = extractvalue { ptr, i32 } %.pn.pn.pn, 0
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #12
  %73 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN7sc_core9sc_reportE) #12
  %74 = icmp eq i32 %.2, %73
  br i1 %74, label %75, label %92

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #12
  %76 = call ptr @__cxa_get_exception_ptr(ptr %.257) #12
  invoke void @_ZN7sc_core9sc_reportC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(80) %76)
          to label %77 unwind label %93

77:                                               ; preds = %75
  %78 = call ptr @__cxa_begin_catch(ptr %.257) #12
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %9) #12
  %79 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull %1) #12
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core21SC_ID_CANNOT_CONVERT_E, ptr noundef nonnull %9, ptr noundef nonnull @.str, i32 noundef 360)
          to label %80 unwind label %81

80:                                               ; preds = %77
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #12
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %9) #12
  call void @_ZN7sc_core9sc_reportD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #12
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #12
  br label %91

81:                                               ; preds = %77
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %9) #12
  call void @_ZN7sc_core9sc_reportD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #12
  invoke void @__cxa_end_catch()
          to label %83 unwind label %93

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #12
  br label %92

84:                                               ; preds = %30, %46, %25, %17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #12
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #12
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %85 unwind label %87

85:                                               ; preds = %84
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #12
  %86 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.6)
          to label %91 unwind label %89

87:                                               ; preds = %84
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #12
  br label %92

89:                                               ; preds = %85
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #12
  br label %92

91:                                               ; preds = %85, %40, %80, %67
  ret void

92:                                               ; preds = %89, %87, %83, %72, %44, %42
  %.merged = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ], [ %82, %83 ], [ %.pn.pn.pn, %72 ], [ %90, %89 ], [ %88, %87 ]
  resume { ptr, i32 } %.merged

93:                                               ; preds = %81, %75
  %94 = landingpad { ptr, i32 }
          catch ptr null
  %95 = extractvalue { ptr, i32 } %94, 0
  call void @__clang_call_terminate(ptr %95) #13
  unreachable
}

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt16sc_fxcast_switchC2ENS_9sc_switchE(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt6sc_fixC2EPKciiNS_9sc_q_modeENS_9sc_o_modeEiRKNS_16sc_fxcast_switchEPNS_17sc_fxnum_observerE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) unnamed_addr #6 align 2

declare void @_ZNK5sc_dt8sc_fxnum6to_binB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_get_exception_ptr(ptr) local_unnamed_addr

declare void @_ZN7sc_core9sc_reportC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #8

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

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

; Function Attrs: nounwind
declare void @_ZN7sc_core9sc_reportD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #10

declare void @__cxa_end_catch() local_unnamed_addr

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nofree nosync nounwind memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "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 = { 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 #10 = { 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 #11 = { nounwind willreturn memory(read) }
attributes #12 = { nounwind }
attributes #13 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass