; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/datatypes/fx/sc_fxval.ll (ZN5sc_dt13sc_fxval_fast11from_stringEPKc)

; 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.sc_dt::scfx_ieee_double" = type { %"union.sc_dt::ieee_double" }
%"union.sc_dt::ieee_double" = type { double }
%"class.sc_dt::scfx_string" = type { i64, i64, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt11scfx_stringC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt11scfx_stringpLEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN5sc_dt13sc_fxval_fast11from_stringEPKc(ptr noundef %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %5 = alloca %"class.sc_dt::scfx_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %15 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %16 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %17 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %18 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %24 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %25 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %29 = alloca double, align 8
  %30 = alloca i8, align 1
  %31 = alloca double, align 8
  %32 = alloca i8, align 1
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %42, label %37

37:                                               ; preds = %1
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %44

42:                                               ; preds = %37, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %4)
  %43 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store double %43, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %419

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  call void @_ZN5sc_dt11scfx_stringC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZN5sc_dt11scfx_stringpLEPKc(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef %45)
          to label %46 unwind label %53

46:                                               ; preds = %44
  invoke void @_ZN5sc_dt11scfx_stringpLEc(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef signext 0)
          to label %47 unwind label %53

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %48 = invoke noundef i32 @_ZN5sc_dt15scfx_parse_signERPKcRb(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %49 unwind label %57

49:                                               ; preds = %47
  store i32 %48, ptr %9, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %50 = invoke noundef i32 @_ZN5sc_dt17scfx_parse_prefixERPKc(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %51 unwind label %61

51:                                               ; preds = %49
  store i32 %50, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !10
  %52 = load i32, ptr %10, align 4, !tbaa !12
  switch i32 %52, label %150 [
    i32 10, label %65
    i32 2, label %95
    i32 17, label %95
    i32 18, label %107
    i32 8, label %108
    i32 19, label %108
    i32 20, label %120
    i32 16, label %121
    i32 21, label %121
    i32 22, label %133
    i32 23, label %134
  ]

53:                                               ; preds = %46, %44
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  br label %418

57:                                               ; preds = %47
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %6, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %7, align 4
  br label %417

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  br label %416

65:                                               ; preds = %51
  store i32 10, ptr %11, align 4, !tbaa !10
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = invoke noundef zeroext i1 @_ZN5sc_dt11scfx_is_nanEPKc(ptr noundef %66)
          to label %68 unwind label %73

68:                                               ; preds = %65
  br i1 %67, label %69, label %81

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %12)
          to label %70 unwind label %77

70:                                               ; preds = %69
  %71 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %72 unwind label %77

72:                                               ; preds = %70
  store double %71, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  store i32 1, ptr %13, align 4
  br label %414

73:                                               ; preds = %146, %145, %81, %65
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  br label %415

77:                                               ; preds = %70, %69
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %415

81:                                               ; preds = %68
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = invoke noundef zeroext i1 @_ZN5sc_dt11scfx_is_infEPKc(ptr noundef %82)
          to label %84 unwind label %73

84:                                               ; preds = %81
  br i1 %83, label %85, label %94

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %86 = load i32, ptr %9, align 4, !tbaa !10
  invoke void @_ZN5sc_dt16scfx_ieee_double3infEi(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %14, i32 noundef %86)
          to label %87 unwind label %90

87:                                               ; preds = %85
  %88 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %89 unwind label %90

89:                                               ; preds = %87
  store double %88, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  store i32 1, ptr %13, align 4
  br label %414

90:                                               ; preds = %87, %85
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %6, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %415

94:                                               ; preds = %84
  br label %151

95:                                               ; preds = %51, %51
  %96 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %97 = trunc i8 %96 to i1
  br i1 %97, label %98, label %106

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %15)
          to label %99 unwind label %102

99:                                               ; preds = %98
  %100 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %101 unwind label %102

101:                                              ; preds = %99
  store double %100, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  store i32 1, ptr %13, align 4
  br label %414

102:                                              ; preds = %99, %98
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %6, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %415

106:                                              ; preds = %95
  store i32 2, ptr %11, align 4, !tbaa !10
  br label %151

107:                                              ; preds = %51
  store i32 2, ptr %11, align 4, !tbaa !10
  br label %151

108:                                              ; preds = %51, %51
  %109 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %119

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %16)
          to label %112 unwind label %115

112:                                              ; preds = %111
  %113 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %114 unwind label %115

114:                                              ; preds = %112
  store double %113, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  store i32 1, ptr %13, align 4
  br label %414

115:                                              ; preds = %112, %111
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %415

119:                                              ; preds = %108
  store i32 8, ptr %11, align 4, !tbaa !10
  br label %151

120:                                              ; preds = %51
  store i32 8, ptr %11, align 4, !tbaa !10
  br label %151

121:                                              ; preds = %51, %51
  %122 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %123 = trunc i8 %122 to i1
  br i1 %123, label %124, label %132

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %17)
          to label %125 unwind label %128

125:                                              ; preds = %124
  %126 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %127 unwind label %128

127:                                              ; preds = %125
  store double %126, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  store i32 1, ptr %13, align 4
  br label %414

128:                                              ; preds = %125, %124
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %6, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %415

132:                                              ; preds = %121
  store i32 16, ptr %11, align 4, !tbaa !10
  br label %151

133:                                              ; preds = %51
  store i32 16, ptr %11, align 4, !tbaa !10
  br label %151

134:                                              ; preds = %51
  %135 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %136 = trunc i8 %135 to i1
  br i1 %136, label %137, label %145

137:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %18)
          to label %138 unwind label %141

138:                                              ; preds = %137
  %139 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %140 unwind label %141

140:                                              ; preds = %138
  store double %139, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  store i32 1, ptr %13, align 4
  br label %414

141:                                              ; preds = %138, %137
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %6, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %415

145:                                              ; preds = %134
  store i32 2, ptr %11, align 4, !tbaa !10
  invoke void @_ZN5sc_dt11scfx_csd2tcERNS_11scfx_stringE(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %146 unwind label %73

146:                                              ; preds = %145
  %147 = invoke noundef ptr @_ZN5sc_dt11scfx_stringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %148 unwind label %73

148:                                              ; preds = %146
  %149 = getelementptr inbounds i8, ptr %147, i64 4
  store ptr %149, ptr %3, align 8, !tbaa !5
  store i32 2, ptr %10, align 4, !tbaa !12
  br label %151

150:                                              ; preds = %51
  br label %151

151:                                              ; preds = %150, %148, %133, %132, %120, %119, %107, %106, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %152, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  store i8 0, ptr %20, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !10
  br label %153

153:                                              ; preds = %207, %151
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = load i8, ptr %154, align 1, !tbaa !9
  %156 = icmp ne i8 %155, 0
  br i1 %156, label %157, label %210

157:                                              ; preds = %153
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = invoke noundef zeroext i1 @_ZN5sc_dt14scfx_exp_startEPKc(ptr noundef %158)
          to label %160 unwind label %162

160:                                              ; preds = %157
  br i1 %159, label %161, label %166

161:                                              ; preds = %160
  br label %210

162:                                              ; preds = %183, %157
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %6, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %7, align 4
  br label %413

166:                                              ; preds = %160
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = load i8, ptr %167, align 1, !tbaa !9
  %169 = sext i8 %168 to i32
  %170 = icmp eq i32 %169, 46
  br i1 %170, label %171, label %183

171:                                              ; preds = %166
  %172 = load i8, ptr %20, align 1, !tbaa !14, !range !16, !noundef !17
  %173 = trunc i8 %172 to i1
  br i1 %173, label %174, label %182

174:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %23)
          to label %175 unwind label %178

175:                                              ; preds = %174
  %176 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %177 unwind label %178

177:                                              ; preds = %175
  store double %176, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  store i32 1, ptr %13, align 4
  br label %412

178:                                              ; preds = %175, %174
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %6, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %413

182:                                              ; preds = %171
  store i8 1, ptr %20, align 1, !tbaa !14
  br label %207

183:                                              ; preds = %166
  %184 = load ptr, ptr %19, align 8, !tbaa !5
  %185 = load i8, ptr %184, align 1, !tbaa !9
  %186 = load i32, ptr %10, align 4, !tbaa !12
  %187 = invoke noundef zeroext i1 @_ZN5sc_dt13scfx_is_digitEcNS_9sc_numrepE(i8 noundef signext %185, i32 noundef %186)
          to label %188 unwind label %162

188:                                              ; preds = %183
  br i1 %187, label %197, label %189

189:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %24)
          to label %190 unwind label %193

190:                                              ; preds = %189
  %191 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %192 unwind label %193

192:                                              ; preds = %190
  store double %191, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  store i32 1, ptr %13, align 4
  br label %412

193:                                              ; preds = %190, %189
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %6, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %413

197:                                              ; preds = %188
  %198 = load i8, ptr %20, align 1, !tbaa !14, !range !16, !noundef !17
  %199 = trunc i8 %198 to i1
  br i1 %199, label %200, label %203

200:                                              ; preds = %197
  %201 = load i32, ptr %22, align 4, !tbaa !10
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %22, align 4, !tbaa !10
  br label %206

203:                                              ; preds = %197
  %204 = load i32, ptr %21, align 4, !tbaa !10
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %21, align 4, !tbaa !10
  br label %206

206:                                              ; preds = %203, %200
  br label %207

207:                                              ; preds = %206, %182
  %208 = load ptr, ptr %19, align 8, !tbaa !5
  %209 = getelementptr inbounds i8, ptr %208, i32 1
  store ptr %209, ptr %19, align 8, !tbaa !5
  br label %153, !llvm.loop !18

210:                                              ; preds = %161, %153
  %211 = load i32, ptr %21, align 4, !tbaa !10
  %212 = icmp eq i32 %211, 0
  br i1 %212, label %213, label %224

213:                                              ; preds = %210
  %214 = load i32, ptr %22, align 4, !tbaa !10
  %215 = icmp eq i32 %214, 0
  br i1 %215, label %216, label %224

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %25)
          to label %217 unwind label %220

217:                                              ; preds = %216
  %218 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %219 unwind label %220

219:                                              ; preds = %217
  store double %218, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  store i32 1, ptr %13, align 4
  br label %412

220:                                              ; preds = %217, %216
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %6, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %413

224:                                              ; preds = %213, %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !10
  %225 = load ptr, ptr %19, align 8, !tbaa !5
  %226 = load i8, ptr %225, align 1, !tbaa !9
  %227 = icmp ne i8 %226, 0
  br i1 %227, label %228, label %264

228:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %229 = load ptr, ptr %19, align 8, !tbaa !5
  %230 = getelementptr inbounds i8, ptr %229, i64 2
  store ptr %230, ptr %27, align 8, !tbaa !5
  br label %231

231:                                              ; preds = %254, %228
  %232 = load ptr, ptr %27, align 8, !tbaa !5
  %233 = load i8, ptr %232, align 1, !tbaa !9
  %234 = icmp ne i8 %233, 0
  br i1 %234, label %236, label %235

235:                                              ; preds = %231
  store i32 5, ptr %13, align 4
  br label %257

236:                                              ; preds = %231
  %237 = load ptr, ptr %27, align 8, !tbaa !5
  %238 = load i8, ptr %237, align 1, !tbaa !9
  %239 = invoke noundef zeroext i1 @_ZN5sc_dt13scfx_is_digitEcNS_9sc_numrepE(i8 noundef signext %238, i32 noundef 10)
          to label %240 unwind label %245

240:                                              ; preds = %236
  br i1 %239, label %253, label %241

241:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %28)
          to label %242 unwind label %249

242:                                              ; preds = %241
  %243 = invoke noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %244 unwind label %249

244:                                              ; preds = %242
  store double %243, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  store i32 1, ptr %13, align 4
  br label %257

245:                                              ; preds = %236
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %6, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %7, align 4
  br label %259

249:                                              ; preds = %242, %241
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %6, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %259

253:                                              ; preds = %240
  br label %254

254:                                              ; preds = %253
  %255 = load ptr, ptr %27, align 8, !tbaa !5
  %256 = getelementptr inbounds i8, ptr %255, i32 1
  store ptr %256, ptr %27, align 8, !tbaa !5
  br label %231, !llvm.loop !20

257:                                              ; preds = %244, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %258 = load i32, ptr %13, align 4
  switch i32 %258, label %410 [
    i32 5, label %260
  ]

259:                                              ; preds = %249, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %411

260:                                              ; preds = %257
  %261 = load ptr, ptr %19, align 8, !tbaa !5
  %262 = getelementptr inbounds i8, ptr %261, i64 1
  %263 = call i32 @atoi(ptr noundef %262) #9
  store i32 %263, ptr %26, align 4, !tbaa !10
  br label %264

264:                                              ; preds = %260, %224
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  store double 0.000000e+00, ptr %29, align 8, !tbaa !21
  %265 = load i32, ptr %21, align 4, !tbaa !10
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %267, label %325

267:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #8
  store i8 1, ptr %30, align 1, !tbaa !14
  br label %268

268:                                              ; preds = %321, %267
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = load ptr, ptr %19, align 8, !tbaa !5
  %271 = icmp ult ptr %269, %270
  br i1 %271, label %272, label %324

272:                                              ; preds = %268
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  %274 = load i8, ptr %273, align 1, !tbaa !9
  %275 = sext i8 %274 to i32
  %276 = icmp eq i32 %275, 46
  br i1 %276, label %277, label %278

277:                                              ; preds = %272
  br label %324

278:                                              ; preds = %272
  %279 = load i8, ptr %30, align 1, !tbaa !14, !range !16, !noundef !17
  %280 = trunc i8 %279 to i1
  br i1 %280, label %281, label %307

281:                                              ; preds = %278
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = load i8, ptr %282, align 1, !tbaa !9
  %284 = load i32, ptr %10, align 4, !tbaa !12
  %285 = invoke noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %283, i32 noundef %284)
          to label %286 unwind label %289

286:                                              ; preds = %281
  %287 = sitofp i32 %285 to double
  store double %287, ptr %29, align 8, !tbaa !21
  %288 = load i32, ptr %10, align 4, !tbaa !12
  switch i32 %288, label %305 [
    i32 2, label %293
    i32 8, label %293
    i32 16, label %293
  ]

289:                                              ; preds = %307, %281
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %6, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #8
  br label %409

293:                                              ; preds = %286, %286, %286
  %294 = load double, ptr %29, align 8, !tbaa !21
  %295 = load i32, ptr %11, align 4, !tbaa !10
  %296 = ashr i32 %295, 1
  %297 = sitofp i32 %296 to double
  %298 = fcmp oge double %294, %297
  br i1 %298, label %299, label %304

299:                                              ; preds = %293
  %300 = load i32, ptr %11, align 4, !tbaa !10
  %301 = sitofp i32 %300 to double
  %302 = load double, ptr %29, align 8, !tbaa !21
  %303 = fsub double %302, %301
  store double %303, ptr %29, align 8, !tbaa !21
  br label %304

304:                                              ; preds = %299, %293
  br label %306

305:                                              ; preds = %286
  br label %306

306:                                              ; preds = %305, %304
  store i8 0, ptr %30, align 1, !tbaa !14
  br label %320

307:                                              ; preds = %278
  %308 = load i32, ptr %11, align 4, !tbaa !10
  %309 = sitofp i32 %308 to double
  %310 = load double, ptr %29, align 8, !tbaa !21
  %311 = fmul double %310, %309
  store double %311, ptr %29, align 8, !tbaa !21
  %312 = load ptr, ptr %3, align 8, !tbaa !5
  %313 = load i8, ptr %312, align 1, !tbaa !9
  %314 = load i32, ptr %10, align 4, !tbaa !12
  %315 = invoke noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %313, i32 noundef %314)
          to label %316 unwind label %289

316:                                              ; preds = %307
  %317 = sitofp i32 %315 to double
  %318 = load double, ptr %29, align 8, !tbaa !21
  %319 = fadd double %318, %317
  store double %319, ptr %29, align 8, !tbaa !21
  br label %320

320:                                              ; preds = %316, %306
  br label %321

321:                                              ; preds = %320
  %322 = load ptr, ptr %3, align 8, !tbaa !5
  %323 = getelementptr inbounds i8, ptr %322, i32 1
  store ptr %323, ptr %3, align 8, !tbaa !5
  br label %268, !llvm.loop !23

324:                                              ; preds = %277, %268
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #8
  br label %325

325:                                              ; preds = %324, %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  store double 0.000000e+00, ptr %31, align 8, !tbaa !21
  %326 = load i32, ptr %22, align 4, !tbaa !10
  %327 = icmp ne i32 %326, 0
  br i1 %327, label %328, label %389

328:                                              ; preds = %325
  %329 = load ptr, ptr %3, align 8, !tbaa !5
  %330 = getelementptr inbounds i8, ptr %329, i32 1
  store ptr %330, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #8
  %331 = load i32, ptr %21, align 4, !tbaa !10
  %332 = icmp eq i32 %331, 0
  %333 = zext i1 %332 to i8
  store i8 %333, ptr %32, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  store double 1.000000e+00, ptr %33, align 8, !tbaa !21
  br label %334

334:                                              ; preds = %385, %328
  %335 = load ptr, ptr %3, align 8, !tbaa !5
  %336 = load ptr, ptr %19, align 8, !tbaa !5
  %337 = icmp ult ptr %335, %336
  br i1 %337, label %338, label %388

338:                                              ; preds = %334
  %339 = load i32, ptr %11, align 4, !tbaa !10
  %340 = sitofp i32 %339 to double
  %341 = load double, ptr %33, align 8, !tbaa !21
  %342 = fdiv double %341, %340
  store double %342, ptr %33, align 8, !tbaa !21
  %343 = load i8, ptr %32, align 1, !tbaa !14, !range !16, !noundef !17
  %344 = trunc i8 %343 to i1
  br i1 %344, label %345, label %374

345:                                              ; preds = %338
  %346 = load ptr, ptr %3, align 8, !tbaa !5
  %347 = load i8, ptr %346, align 1, !tbaa !9
  %348 = load i32, ptr %10, align 4, !tbaa !12
  %349 = invoke noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %347, i32 noundef %348)
          to label %350 unwind label %353

350:                                              ; preds = %345
  %351 = sitofp i32 %349 to double
  store double %351, ptr %31, align 8, !tbaa !21
  %352 = load i32, ptr %10, align 4, !tbaa !12
  switch i32 %352, label %369 [
    i32 2, label %357
    i32 8, label %357
    i32 16, label %357
  ]

353:                                              ; preds = %374, %345
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %6, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %409

357:                                              ; preds = %350, %350, %350
  %358 = load double, ptr %31, align 8, !tbaa !21
  %359 = load i32, ptr %11, align 4, !tbaa !10
  %360 = ashr i32 %359, 1
  %361 = sitofp i32 %360 to double
  %362 = fcmp oge double %358, %361
  br i1 %362, label %363, label %368

363:                                              ; preds = %357
  %364 = load i32, ptr %11, align 4, !tbaa !10
  %365 = sitofp i32 %364 to double
  %366 = load double, ptr %31, align 8, !tbaa !21
  %367 = fsub double %366, %365
  store double %367, ptr %31, align 8, !tbaa !21
  br label %368

368:                                              ; preds = %363, %357
  br label %370

369:                                              ; preds = %350
  br label %370

370:                                              ; preds = %369, %368
  %371 = load double, ptr %33, align 8, !tbaa !21
  %372 = load double, ptr %31, align 8, !tbaa !21
  %373 = fmul double %372, %371
  store double %373, ptr %31, align 8, !tbaa !21
  store i8 0, ptr %32, align 1, !tbaa !14
  br label %384

374:                                              ; preds = %338
  %375 = load ptr, ptr %3, align 8, !tbaa !5
  %376 = load i8, ptr %375, align 1, !tbaa !9
  %377 = load i32, ptr %10, align 4, !tbaa !12
  %378 = invoke noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %376, i32 noundef %377)
          to label %379 unwind label %353

379:                                              ; preds = %374
  %380 = sitofp i32 %378 to double
  %381 = load double, ptr %33, align 8, !tbaa !21
  %382 = load double, ptr %31, align 8, !tbaa !21
  %383 = call double @llvm.fmuladd.f64(double %380, double %381, double %382)
  store double %383, ptr %31, align 8, !tbaa !21
  br label %384

384:                                              ; preds = %379, %370
  br label %385

385:                                              ; preds = %384
  %386 = load ptr, ptr %3, align 8, !tbaa !5
  %387 = getelementptr inbounds i8, ptr %386, i32 1
  store ptr %387, ptr %3, align 8, !tbaa !5
  br label %334, !llvm.loop !24

388:                                              ; preds = %334
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #8
  br label %389

389:                                              ; preds = %388, %325
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %390 = load i32, ptr %26, align 4, !tbaa !10
  %391 = icmp ne i32 %390, 0
  br i1 %391, label %392, label %398

392:                                              ; preds = %389
  %393 = load i32, ptr %11, align 4, !tbaa !10
  %394 = sitofp i32 %393 to double
  %395 = load i32, ptr %26, align 4, !tbaa !10
  %396 = sitofp i32 %395 to double
  %397 = call double @pow(double noundef %394, double noundef %396) #8
  br label %399

398:                                              ; preds = %389
  br label %399

399:                                              ; preds = %398, %392
  %400 = phi double [ %397, %392 ], [ 1.000000e+00, %398 ]
  store double %400, ptr %34, align 8, !tbaa !21
  %401 = load i32, ptr %9, align 4, !tbaa !10
  %402 = sitofp i32 %401 to double
  %403 = load double, ptr %29, align 8, !tbaa !21
  %404 = load double, ptr %31, align 8, !tbaa !21
  %405 = fadd double %403, %404
  %406 = fmul double %402, %405
  %407 = load double, ptr %34, align 8, !tbaa !21
  %408 = fmul double %406, %407
  store double %408, ptr %2, align 8
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %410

409:                                              ; preds = %353, %289
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %411

410:                                              ; preds = %399, %257
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %412

411:                                              ; preds = %409, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %413

412:                                              ; preds = %410, %219, %192, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %414

413:                                              ; preds = %411, %220, %193, %178, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %415

414:                                              ; preds = %412, %140, %127, %114, %101, %89, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @_ZN5sc_dt11scfx_stringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  br label %419

415:                                              ; preds = %413, %141, %128, %115, %102, %90, %77, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %416

416:                                              ; preds = %415, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %417

417:                                              ; preds = %416, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  br label %418

418:                                              ; preds = %417, %53
  call void @_ZN5sc_dt11scfx_stringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  br label %421

419:                                              ; preds = %414, %42
  %420 = load double, ptr %2, align 8
  ret double %420

421:                                              ; preds = %418
  %422 = load ptr, ptr %6, align 8
  %423 = load i32, ptr %7, align 4
  %424 = insertvalue { ptr, i32 } poison, ptr %422, 0
  %425 = insertvalue { ptr, i32 } %424, i32 %423, 1
  resume { ptr, i32 } %425
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::scfx_ieee_double") align 8) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt11scfx_stringpLEc(ptr noundef nonnull align 8 dereferenceable(24), i8 noundef signext) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt11scfx_is_nanEPKc(ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt11scfx_is_infEPKc(ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt16scfx_ieee_double3infEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::scfx_ieee_double") align 8, i32 noundef) #1 align 2

declare void @_ZN5sc_dt11scfx_csd2tcERNS_11scfx_stringE(ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt14scfx_exp_startEPKc(ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt13scfx_is_digitEcNS_9sc_numrepE(i8 noundef signext, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!13, !13, i64 0}
!13 = !{!"_ZTSN5sc_dt9sc_numrepE", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !7, i64 0}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}


; 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.sc_dt::scfx_ieee_double" = type { %"union.sc_dt::ieee_double" }
%"union.sc_dt::ieee_double" = type { double }
%"class.sc_dt::scfx_string" = type { i64, i64, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt11scfx_stringC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt11scfx_stringpLEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN5sc_dt13sc_fxval_fast11from_stringEPKc(ptr noundef %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %4 = alloca %"class.sc_dt::scfx_string", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %7 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %8 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %9 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %10 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %11 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %12 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %13 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %14 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  %15 = alloca %"class.sc_dt::scfx_ieee_double", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = icmp eq ptr %0, null
  br i1 %16, label %20, label %17

17:                                               ; preds = %1
  %18 = load i8, ptr %0, align 1, !tbaa !9
  %19 = icmp eq i8 %18, 0
  br i1 %19, label %20, label %22

20:                                               ; preds = %17, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %3)
  %21 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %249

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN5sc_dt11scfx_stringC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN5sc_dt11scfx_stringpLEPKc(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %23)
          to label %24 unwind label %28

24:                                               ; preds = %22
  invoke void @_ZN5sc_dt11scfx_stringpLEc(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 noundef signext 0)
          to label %25 unwind label %28

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  %26 = call noundef i32 @_ZN5sc_dt15scfx_parse_signERPKcRb(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %27 = call noundef i32 @_ZN5sc_dt17scfx_parse_prefixERPKc(ptr noundef nonnull align 8 dereferenceable(8) %2)
  switch i32 %27, label %88 [
    i32 10, label %30
    i32 2, label %49
    i32 17, label %49
    i32 18, label %57
    i32 8, label %58
    i32 19, label %58
    i32 20, label %66
    i32 16, label %67
    i32 21, label %67
    i32 22, label %75
    i32 23, label %76
  ]

28:                                               ; preds = %24, %22
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %248

30:                                               ; preds = %25
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = invoke noundef zeroext i1 @_ZN5sc_dt11scfx_is_nanEPKc(ptr noundef %31)
          to label %33 unwind label %37

33:                                               ; preds = %30
  br i1 %32, label %34, label %41

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %6)
          to label %35 unwind label %39

35:                                               ; preds = %34
  %36 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %246

37:                                               ; preds = %84, %30
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %247

39:                                               ; preds = %34
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %247

41:                                               ; preds = %33
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN5sc_dt11scfx_is_infEPKc(ptr noundef %42)
  br i1 %43, label %44, label %88

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3infEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %7, i32 noundef %26)
          to label %45 unwind label %47

45:                                               ; preds = %44
  %46 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %246

47:                                               ; preds = %44
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %247

49:                                               ; preds = %25, %25
  %50 = load i8, ptr %5, align 1, !tbaa !10, !range !12, !noundef !13
  %51 = trunc nuw i8 %50 to i1
  br i1 %51, label %52, label %88

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %8)
          to label %53 unwind label %55

53:                                               ; preds = %52
  %54 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %246

55:                                               ; preds = %52
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %247

57:                                               ; preds = %25
  br label %88

58:                                               ; preds = %25, %25
  %59 = load i8, ptr %5, align 1, !tbaa !10, !range !12, !noundef !13
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %61, label %88

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %9)
          to label %62 unwind label %64

62:                                               ; preds = %61
  %63 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %246

64:                                               ; preds = %61
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %247

66:                                               ; preds = %25
  br label %88

67:                                               ; preds = %25, %25
  %68 = load i8, ptr %5, align 1, !tbaa !10, !range !12, !noundef !13
  %69 = trunc nuw i8 %68 to i1
  br i1 %69, label %70, label %88

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %10)
          to label %71 unwind label %73

71:                                               ; preds = %70
  %72 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %246

73:                                               ; preds = %70
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %247

75:                                               ; preds = %25
  br label %88

76:                                               ; preds = %25
  %77 = load i8, ptr %5, align 1, !tbaa !10, !range !12, !noundef !13
  %78 = trunc nuw i8 %77 to i1
  br i1 %78, label %79, label %84

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %11)
          to label %80 unwind label %82

80:                                               ; preds = %79
  %81 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %246

82:                                               ; preds = %79
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %247

84:                                               ; preds = %76
  invoke void @_ZN5sc_dt11scfx_csd2tcERNS_11scfx_stringE(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %85 unwind label %37

85:                                               ; preds = %84
  %86 = call noundef ptr @_ZN5sc_dt11scfx_stringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %87 = getelementptr inbounds i8, ptr %86, i64 4
  store ptr %87, ptr %2, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %67, %58, %49, %25, %41, %85, %75, %66, %57
  %.085 = phi i32 [ %27, %25 ], [ 2, %85 ], [ %27, %75 ], [ %27, %66 ], [ %27, %57 ], [ 10, %41 ], [ %27, %49 ], [ %27, %58 ], [ %27, %67 ]
  %.084 = phi i32 [ 0, %25 ], [ 2, %85 ], [ 16, %75 ], [ 8, %66 ], [ 2, %57 ], [ 10, %41 ], [ 2, %49 ], [ 8, %58 ], [ 16, %67 ]
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %.not120 = icmp eq i8 %90, 0
  br i1 %.not120, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %88, %115
  %.076124 = phi i32 [ %.177, %115 ], [ 0, %88 ]
  %.078123 = phi i32 [ %.179, %115 ], [ 0, %88 ]
  %.080122 = phi i8 [ %.181, %115 ], [ 0, %88 ]
  %.082121 = phi ptr [ %116, %115 ], [ %89, %88 ]
  %91 = call noundef zeroext i1 @_ZN5sc_dt14scfx_exp_startEPKc(ptr noundef nonnull %.082121)
  br i1 %91, label %._crit_edge, label %92

92:                                               ; preds = %.lr.ph
  %93 = load i8, ptr %.082121, align 1, !tbaa !9
  %94 = icmp eq i8 %93, 46
  br i1 %94, label %95, label %102

95:                                               ; preds = %92
  %96 = trunc nuw i8 %.080122 to i1
  br i1 %96, label %97, label %115

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %12)
          to label %98 unwind label %100

98:                                               ; preds = %97
  %99 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %246

100:                                              ; preds = %97
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %247

102:                                              ; preds = %92
  %103 = call noundef zeroext i1 @_ZN5sc_dt13scfx_is_digitEcNS_9sc_numrepE(i8 noundef signext %93, i32 noundef %.085)
  br i1 %103, label %109, label %104

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %13)
          to label %105 unwind label %107

105:                                              ; preds = %104
  %106 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %246

107:                                              ; preds = %104
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %247

109:                                              ; preds = %102
  %110 = trunc nuw i8 %.080122 to i1
  br i1 %110, label %111, label %113

111:                                              ; preds = %109
  %112 = add nsw i32 %.076124, 1
  br label %115

113:                                              ; preds = %109
  %114 = add nsw i32 %.078123, 1
  br label %115

115:                                              ; preds = %95, %111, %113
  %.181 = phi i8 [ %.080122, %111 ], [ %.080122, %113 ], [ 1, %95 ]
  %.179 = phi i32 [ %.078123, %111 ], [ %114, %113 ], [ %.078123, %95 ]
  %.177 = phi i32 [ %112, %111 ], [ %.076124, %113 ], [ %.076124, %95 ]
  %116 = getelementptr inbounds i8, ptr %.082121, i64 1
  %117 = load i8, ptr %116, align 1, !tbaa !9
  %.not = icmp eq i8 %117, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %115, %.lr.ph, %88
  %.082.lcssa = phi ptr [ %89, %88 ], [ %.082121, %.lr.ph ], [ %116, %115 ]
  %.078.lcssa = phi i32 [ 0, %88 ], [ %.078123, %.lr.ph ], [ %.179, %115 ]
  %.076.lcssa = phi i32 [ 0, %88 ], [ %.076124, %.lr.ph ], [ %.177, %115 ]
  %118 = icmp eq i32 %.078.lcssa, 0
  %119 = icmp eq i32 %.076.lcssa, 0
  %or.cond = select i1 %118, i1 %119, i1 false
  br i1 %or.cond, label %120, label %125

120:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %14)
          to label %121 unwind label %123

121:                                              ; preds = %120
  %122 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %246

123:                                              ; preds = %120
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %247

125:                                              ; preds = %._crit_edge
  %126 = load i8, ptr %.082.lcssa, align 1, !tbaa !9
  %.not104 = icmp eq i8 %126, 0
  br i1 %.not104, label %142, label %127

127:                                              ; preds = %125
  %128 = getelementptr inbounds i8, ptr %.082.lcssa, i64 2
  %129 = load i8, ptr %128, align 1, !tbaa !9
  %.not105131 = icmp eq i8 %129, 0
  br i1 %.not105131, label %._crit_edge135, label %.lr.ph134

130:                                              ; preds = %.lr.ph134
  %131 = getelementptr inbounds i8, ptr %.074132, i64 1
  %132 = load i8, ptr %131, align 1, !tbaa !9
  %.not105 = icmp eq i8 %132, 0
  br i1 %.not105, label %._crit_edge135, label %.lr.ph134, !llvm.loop !16

.lr.ph134:                                        ; preds = %127, %130
  %133 = phi i8 [ %132, %130 ], [ %129, %127 ]
  %.074132 = phi ptr [ %131, %130 ], [ %128, %127 ]
  %134 = call noundef zeroext i1 @_ZN5sc_dt13scfx_is_digitEcNS_9sc_numrepE(i8 noundef signext %133, i32 noundef 10)
  br i1 %134, label %130, label %135

135:                                              ; preds = %.lr.ph134
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  invoke void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::scfx_ieee_double") align 8 %15)
          to label %138 unwind label %136

136:                                              ; preds = %135
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %247

138:                                              ; preds = %135
  %139 = call noundef double @_ZNK5sc_dt16scfx_ieee_doublecvdEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %246

._crit_edge135:                                   ; preds = %130, %127
  %140 = getelementptr inbounds i8, ptr %.082.lcssa, i64 1
  %141 = call i32 @atoi(ptr nocapture noundef %140) #9
  br label %142

142:                                              ; preds = %._crit_edge135, %125
  %.075 = phi i32 [ %141, %._crit_edge135 ], [ 0, %125 ]
  br i1 %118, label %.loopexit113, label %.preheader

.preheader:                                       ; preds = %142
  %143 = load ptr, ptr %2, align 8, !tbaa !5
  %144 = icmp ult ptr %143, %.082.lcssa
  br i1 %144, label %.lr.ph138, label %.loopexit113

.lr.ph138:                                        ; preds = %.preheader
  %145 = uitofp nneg i32 %.084 to double
  %146 = lshr exact i32 %.084, 1
  %147 = uitofp nneg i32 %146 to double
  switch i32 %.085, label %.lr.ph138.split.peel [
    i32 2, label %.lr.ph138.split.us.peel
    i32 8, label %.lr.ph138.split.us.peel
    i32 16, label %.lr.ph138.split.us.peel
  ]

.lr.ph138.split.us.peel:                          ; preds = %.lr.ph138, %.lr.ph138, %.lr.ph138
  %148 = load i8, ptr %143, align 1, !tbaa !9
  %149 = icmp eq i8 %148, 46
  br i1 %149, label %.loopexit113, label %150

150:                                              ; preds = %.lr.ph138.split.us.peel
  %151 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %148, i32 noundef %.085)
  %152 = sitofp i32 %151 to double
  %153 = fcmp ult double %152, %147
  %154 = fsub double %152, %145
  %.272.us.peel = select i1 %153, double %152, double %154
  %155 = load ptr, ptr %2, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i64 1
  store ptr %156, ptr %2, align 8, !tbaa !5
  %157 = icmp ult ptr %156, %.082.lcssa
  br i1 %157, label %.lr.ph138.split.us, label %.loopexit113

.lr.ph138.split.peel:                             ; preds = %.lr.ph138
  %158 = load i8, ptr %143, align 1, !tbaa !9
  %159 = icmp eq i8 %158, 46
  br i1 %159, label %.loopexit113, label %160

160:                                              ; preds = %.lr.ph138.split.peel
  %161 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %158, i32 noundef %.085)
  %162 = sitofp i32 %161 to double
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i64 1
  store ptr %164, ptr %2, align 8, !tbaa !5
  %165 = icmp ult ptr %164, %.082.lcssa
  br i1 %165, label %.lr.ph138.split, label %.loopexit113

.lr.ph138.split.us:                               ; preds = %150, %169
  %166 = phi ptr [ %175, %169 ], [ %156, %150 ]
  %.070136.us = phi double [ %173, %169 ], [ %.272.us.peel, %150 ]
  %167 = load i8, ptr %166, align 1, !tbaa !9
  %168 = icmp eq i8 %167, 46
  br i1 %168, label %.loopexit113, label %169

169:                                              ; preds = %.lr.ph138.split.us
  %170 = fmul double %.070136.us, %145
  %171 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %167, i32 noundef %.085)
  %172 = sitofp i32 %171 to double
  %173 = fadd double %170, %172
  %174 = load ptr, ptr %2, align 8, !tbaa !5
  %175 = getelementptr inbounds i8, ptr %174, i64 1
  store ptr %175, ptr %2, align 8, !tbaa !5
  %176 = icmp ult ptr %175, %.082.lcssa
  br i1 %176, label %.lr.ph138.split.us, label %.loopexit113, !llvm.loop !17

.lr.ph138.split:                                  ; preds = %160, %180
  %177 = phi ptr [ %186, %180 ], [ %164, %160 ]
  %.070136 = phi double [ %184, %180 ], [ %162, %160 ]
  %178 = load i8, ptr %177, align 1, !tbaa !9
  %179 = icmp eq i8 %178, 46
  br i1 %179, label %.loopexit113, label %180

180:                                              ; preds = %.lr.ph138.split
  %181 = fmul double %.070136, %145
  %182 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %178, i32 noundef %.085)
  %183 = sitofp i32 %182 to double
  %184 = fadd double %181, %183
  %185 = load ptr, ptr %2, align 8, !tbaa !5
  %186 = getelementptr inbounds i8, ptr %185, i64 1
  store ptr %186, ptr %2, align 8, !tbaa !5
  %187 = icmp ult ptr %186, %.082.lcssa
  br i1 %187, label %.lr.ph138.split, label %.loopexit113, !llvm.loop !19

.loopexit113:                                     ; preds = %.lr.ph138.split.us.peel, %150, %.lr.ph138.split.us, %169, %.lr.ph138.split.peel, %160, %.lr.ph138.split, %180, %.preheader, %142
  %.373 = phi double [ 0.000000e+00, %142 ], [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.lr.ph138.split.peel ], [ %162, %160 ], [ %184, %180 ], [ %.070136, %.lr.ph138.split ], [ 0.000000e+00, %.lr.ph138.split.us.peel ], [ %.272.us.peel, %150 ], [ %173, %169 ], [ %.070136.us, %.lr.ph138.split.us ]
  br i1 %119, label %.loopexit, label %188

188:                                              ; preds = %.loopexit113
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = getelementptr inbounds i8, ptr %189, i64 1
  store ptr %190, ptr %2, align 8, !tbaa !5
  %191 = icmp ult ptr %190, %.082.lcssa
  br i1 %191, label %.lr.ph147, label %.loopexit

.lr.ph147:                                        ; preds = %188
  %192 = uitofp nneg i32 %.084 to double
  %193 = lshr exact i32 %.084, 1
  %194 = uitofp nneg i32 %193 to double
  switch i32 %.085, label %.lr.ph147.split.peel [
    i32 2, label %.lr.ph147.split.us.peel
    i32 8, label %.lr.ph147.split.us.peel
    i32 16, label %.lr.ph147.split.us.peel
  ]

.lr.ph147.split.us.peel:                          ; preds = %.lr.ph147, %.lr.ph147, %.lr.ph147
  %195 = fdiv double 1.000000e+00, %192
  %196 = load i8, ptr %190, align 1, !tbaa !9
  %197 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %196, i32 noundef %.085)
  %198 = sitofp i32 %197 to double
  br i1 %118, label %201, label %199

199:                                              ; preds = %.lr.ph147.split.us.peel
  %200 = call double @llvm.fmuladd.f64(double %198, double %195, double 0.000000e+00)
  br label %205

201:                                              ; preds = %.lr.ph147.split.us.peel
  %202 = fcmp ult double %198, %194
  %203 = select i1 %202, double 0.000000e+00, double %192
  %.165.us.peel = fsub double %198, %203
  %204 = fmul double %195, %.165.us.peel
  br label %205

205:                                              ; preds = %201, %199
  %.266.us.peel = phi double [ %204, %201 ], [ %200, %199 ]
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds i8, ptr %206, i64 1
  store ptr %207, ptr %2, align 8, !tbaa !5
  %208 = icmp ult ptr %207, %.082.lcssa
  br i1 %208, label %.lr.ph147.split.us, label %.loopexit

.lr.ph147.split.peel:                             ; preds = %.lr.ph147
  %209 = fdiv double 1.000000e+00, %192
  %210 = load i8, ptr %190, align 1, !tbaa !9
  %211 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %210, i32 noundef %.085)
  %212 = sitofp i32 %211 to double
  %213 = fmul double %209, %212
  %214 = call double @llvm.fmuladd.f64(double %212, double %209, double 0.000000e+00)
  %.266.peel = select i1 %118, double %213, double %214
  %215 = load ptr, ptr %2, align 8, !tbaa !5
  %216 = getelementptr inbounds i8, ptr %215, i64 1
  store ptr %216, ptr %2, align 8, !tbaa !5
  %217 = icmp ult ptr %216, %.082.lcssa
  br i1 %217, label %.lr.ph147.split, label %.loopexit

.lr.ph147.split.us:                               ; preds = %205, %.lr.ph147.split.us
  %218 = phi ptr [ %225, %.lr.ph147.split.us ], [ %207, %205 ]
  %.061145.us = phi double [ %219, %.lr.ph147.split.us ], [ %195, %205 ]
  %.064143.us = phi double [ %223, %.lr.ph147.split.us ], [ %.266.us.peel, %205 ]
  %219 = fdiv double %.061145.us, %192
  %220 = load i8, ptr %218, align 1, !tbaa !9
  %221 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %220, i32 noundef %.085)
  %222 = sitofp i32 %221 to double
  %223 = call double @llvm.fmuladd.f64(double %222, double %219, double %.064143.us)
  %224 = load ptr, ptr %2, align 8, !tbaa !5
  %225 = getelementptr inbounds i8, ptr %224, i64 1
  store ptr %225, ptr %2, align 8, !tbaa !5
  %226 = icmp ult ptr %225, %.082.lcssa
  br i1 %226, label %.lr.ph147.split.us, label %.loopexit, !llvm.loop !20

.lr.ph147.split:                                  ; preds = %.lr.ph147.split.peel, %.lr.ph147.split
  %227 = phi ptr [ %234, %.lr.ph147.split ], [ %216, %.lr.ph147.split.peel ]
  %.061145 = phi double [ %228, %.lr.ph147.split ], [ %209, %.lr.ph147.split.peel ]
  %.064143 = phi double [ %232, %.lr.ph147.split ], [ %.266.peel, %.lr.ph147.split.peel ]
  %228 = fdiv double %.061145, %192
  %229 = load i8, ptr %227, align 1, !tbaa !9
  %230 = call noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext %229, i32 noundef %.085)
  %231 = sitofp i32 %230 to double
  %232 = call double @llvm.fmuladd.f64(double %231, double %228, double %.064143)
  %233 = load ptr, ptr %2, align 8, !tbaa !5
  %234 = getelementptr inbounds i8, ptr %233, i64 1
  store ptr %234, ptr %2, align 8, !tbaa !5
  %235 = icmp ult ptr %234, %.082.lcssa
  br i1 %235, label %.lr.ph147.split, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %205, %.lr.ph147.split.us, %.lr.ph147.split.peel, %.lr.ph147.split, %188, %.loopexit113
  %.367 = phi double [ 0.000000e+00, %.loopexit113 ], [ 0.000000e+00, %188 ], [ %.266.peel, %.lr.ph147.split.peel ], [ %232, %.lr.ph147.split ], [ %.266.us.peel, %205 ], [ %223, %.lr.ph147.split.us ]
  %.not108 = icmp eq i32 %.075, 0
  br i1 %.not108, label %240, label %236

236:                                              ; preds = %.loopexit
  %237 = uitofp nneg i32 %.084 to double
  %238 = sitofp i32 %.075 to double
  %239 = call double @pow(double noundef %237, double noundef %238) #8
  br label %240

240:                                              ; preds = %.loopexit, %236
  %241 = phi double [ %239, %236 ], [ 1.000000e+00, %.loopexit ]
  %242 = sitofp i32 %26 to double
  %243 = fadd double %.373, %.367
  %244 = fmul double %243, %242
  %245 = fmul double %244, %241
  br label %246

246:                                              ; preds = %138, %98, %105, %121, %240, %80, %71, %62, %53, %45, %35
  %.3 = phi double [ %81, %80 ], [ %72, %71 ], [ %63, %62 ], [ %54, %53 ], [ %36, %35 ], [ %46, %45 ], [ %122, %121 ], [ %99, %98 ], [ %106, %105 ], [ %245, %240 ], [ %139, %138 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @_ZN5sc_dt11scfx_stringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %249

247:                                              ; preds = %100, %107, %123, %136, %82, %73, %64, %55, %47, %39, %37
  %.pn.pn = phi { ptr, i32 } [ %83, %82 ], [ %38, %37 ], [ %74, %73 ], [ %65, %64 ], [ %56, %55 ], [ %40, %39 ], [ %48, %47 ], [ %124, %123 ], [ %137, %136 ], [ %101, %100 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br label %248

248:                                              ; preds = %247, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %247 ], [ %29, %28 ]
  call void @_ZN5sc_dt11scfx_stringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn.pn.pn

249:                                              ; preds = %246, %20
  %.4 = phi double [ %21, %20 ], [ %.3, %246 ]
  ret double %.4
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt16scfx_ieee_double3nanEv(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::scfx_ieee_double") align 8) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt11scfx_stringpLEc(ptr noundef nonnull align 8 dereferenceable(24), i8 noundef signext) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt11scfx_is_nanEPKc(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt11scfx_is_infEPKc(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt16scfx_ieee_double3infEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::scfx_ieee_double") align 8, i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZN5sc_dt11scfx_csd2tcERNS_11scfx_stringE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt14scfx_exp_startEPKc(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5sc_dt13scfx_is_digitEcNS_9sc_numrepE(i8 noundef signext, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5sc_dt13scfx_to_digitEcNS_9sc_numrepE(i8 noundef signext, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"bool", !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15, !18}
!18 = !{!"llvm.loop.peeled.count", i32 1}
!19 = distinct !{!19, !15, !18}
!20 = distinct !{!20, !15, !18}
!21 = distinct !{!21, !15, !18}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass