; LLVM IR from SSBMTonberry/pocketlzma :: ref_spec/lzma1900/CPP/Common (TextConfig)

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

%struct.CTextConfigPair = type { %class.UString, %class.UString }
%class.UString = type { ptr, i32, i32 }
%class.AString = type { ptr, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z13GetTextConfigRK7AStringR13CObjectVectorI15CTextConfigPairE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.CTextConfigPair, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.AString, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.AString, align 8
  %14 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN13CObjectVectorI15CTextConfigPairE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %171, %2
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  br label %176

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @_ZN15CTextConfigPairC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = invoke noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %23 unwind label %32

23:                                               ; preds = %20
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds i8, ptr %22, i64 %25
  invoke void @_ZL11GetIDStringPKcRj(ptr dead_on_unwind writable sret(%class.AString) align 8 %9, ptr noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %27 unwind label %32

27:                                               ; preds = %23
  %28 = getelementptr inbounds %struct.CTextConfigPair, ptr %7, i32 0, i32 0
  %29 = invoke noundef zeroext i1 @_Z20ConvertUTF8ToUnicodeRK7AStringR7UString(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %30 unwind label %36

30:                                               ; preds = %27
  br i1 %29, label %40, label %31

31:                                               ; preds = %30
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %169

32:                                               ; preds = %23, %20
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %10, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %11, align 4
  br label %175

36:                                               ; preds = %70, %63, %52, %44, %27
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %10, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %11, align 4
  br label %174

40:                                               ; preds = %30
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %169

44:                                               ; preds = %40
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = add i32 %46, %45
  store i32 %47, ptr %6, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = invoke noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %50 unwind label %36

50:                                               ; preds = %44
  br i1 %49, label %52, label %51

51:                                               ; preds = %50
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %169

52:                                               ; preds = %50
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %55 unwind label %36

55:                                               ; preds = %52
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %54, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = sext i8 %59 to i32
  %61 = icmp ne i32 %60, 61
  br i1 %61, label %62, label %63

62:                                               ; preds = %55
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %169

63:                                               ; preds = %55
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = add i32 %64, 1
  store i32 %65, ptr %6, align 4, !tbaa !9
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = invoke noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %68 unwind label %36

68:                                               ; preds = %63
  br i1 %67, label %70, label %69

69:                                               ; preds = %68
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %169

70:                                               ; preds = %68
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = invoke noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %71)
          to label %73 unwind label %36

73:                                               ; preds = %70
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %72, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !11
  %78 = sext i8 %77 to i32
  %79 = icmp ne i32 %78, 34
  br i1 %79, label %80, label %81

80:                                               ; preds = %73
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %169

81:                                               ; preds = %73
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = add i32 %82, 1
  store i32 %83, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  invoke void @_ZN7AStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %84 unwind label %92

84:                                               ; preds = %81
  br label %85

85:                                               ; preds = %158, %84
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = invoke noundef i32 @_ZNK7AString3LenEv(ptr noundef nonnull align 8 dereferenceable(16) %87)
          to label %89 unwind label %96

89:                                               ; preds = %85
  %90 = icmp uge i32 %86, %88
  br i1 %90, label %91, label %100

91:                                               ; preds = %89
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %168

92:                                               ; preds = %81
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %10, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %11, align 4
  br label %173

96:                                               ; preds = %164, %159, %85
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  br label %172

100:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = invoke noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %101)
          to label %103 unwind label %113

103:                                              ; preds = %100
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = add i32 %104, 1
  store i32 %105, ptr %6, align 4, !tbaa !9
  %106 = zext i32 %104 to i64
  %107 = getelementptr inbounds i8, ptr %102, i64 %106
  %108 = load i8, ptr %107, align 1, !tbaa !11
  store i8 %108, ptr %14, align 1, !tbaa !11
  %109 = load i8, ptr %14, align 1, !tbaa !11
  %110 = sext i8 %109 to i32
  %111 = icmp eq i32 %110, 34
  br i1 %111, label %112, label %117

112:                                              ; preds = %103
  store i32 4, ptr %12, align 4
  br label %156

113:                                              ; preds = %151, %146, %144, %141, %138, %135, %132, %121, %100
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %10, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %172

117:                                              ; preds = %103
  %118 = load i8, ptr %14, align 1, !tbaa !11
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 92
  br i1 %120, label %121, label %151

121:                                              ; preds = %117
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = invoke noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %122)
          to label %124 unwind label %113

124:                                              ; preds = %121
  %125 = load i32, ptr %6, align 4, !tbaa !9
  %126 = add i32 %125, 1
  store i32 %126, ptr %6, align 4, !tbaa !9
  %127 = zext i32 %125 to i64
  %128 = getelementptr inbounds i8, ptr %123, i64 %127
  %129 = load i8, ptr %128, align 1, !tbaa !11
  store i8 %129, ptr %14, align 1, !tbaa !11
  %130 = load i8, ptr %14, align 1, !tbaa !11
  %131 = sext i8 %130 to i32
  switch i32 %131, label %144 [
    i32 110, label %132
    i32 116, label %135
    i32 92, label %138
    i32 34, label %141
  ]

132:                                              ; preds = %124
  %133 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext 10)
          to label %134 unwind label %113

134:                                              ; preds = %132
  br label %150

135:                                              ; preds = %124
  %136 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext 9)
          to label %137 unwind label %113

137:                                              ; preds = %135
  br label %150

138:                                              ; preds = %124
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext 92)
          to label %140 unwind label %113

140:                                              ; preds = %138
  br label %150

141:                                              ; preds = %124
  %142 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext 34)
          to label %143 unwind label %113

143:                                              ; preds = %141
  br label %150

144:                                              ; preds = %124
  %145 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext 92)
          to label %146 unwind label %113

146:                                              ; preds = %144
  %147 = load i8, ptr %14, align 1, !tbaa !11
  %148 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext %147)
          to label %149 unwind label %113

149:                                              ; preds = %146
  br label %150

150:                                              ; preds = %149, %143, %140, %137, %134
  br label %155

151:                                              ; preds = %117
  %152 = load i8, ptr %14, align 1, !tbaa !11
  %153 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext %152)
          to label %154 unwind label %113

154:                                              ; preds = %151
  br label %155

155:                                              ; preds = %154, %150
  store i32 0, ptr %12, align 4
  br label %156

156:                                              ; preds = %155, %112
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  %157 = load i32, ptr %12, align 4
  switch i32 %157, label %184 [
    i32 0, label %158
    i32 4, label %159
  ]

158:                                              ; preds = %156
  br label %85, !llvm.loop !12

159:                                              ; preds = %156
  %160 = getelementptr inbounds %struct.CTextConfigPair, ptr %7, i32 0, i32 1
  %161 = invoke noundef zeroext i1 @_Z20ConvertUTF8ToUnicodeRK7AStringR7UString(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %160)
          to label %162 unwind label %96

162:                                              ; preds = %159
  br i1 %161, label %164, label %163

163:                                              ; preds = %162
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %168

164:                                              ; preds = %162
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = invoke noundef i32 @_ZN13CObjectVectorI15CTextConfigPairE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %165, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %167 unwind label %96

167:                                              ; preds = %164
  store i32 0, ptr %12, align 4
  br label %168

168:                                              ; preds = %167, %163, %91
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %169

169:                                              ; preds = %168, %80, %69, %62, %51, %43, %31
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @_ZN15CTextConfigPairD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  %170 = load i32, ptr %12, align 4
  switch i32 %170, label %177 [
    i32 0, label %171
  ]

171:                                              ; preds = %169
  br label %16, !llvm.loop !14

172:                                              ; preds = %113, %96
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  br label %173

173:                                              ; preds = %172, %92
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %174

174:                                              ; preds = %173, %36
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  br label %175

175:                                              ; preds = %174, %32
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @_ZN15CTextConfigPairD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %179

176:                                              ; preds = %19
  store i1 true, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %177

177:                                              ; preds = %176, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %178 = load i1, ptr %3, align 1
  ret i1 %178

179:                                              ; preds = %175
  %180 = load ptr, ptr %10, align 8
  %181 = load i32, ptr %11, align 4
  %182 = insertvalue { ptr, i32 } poison, ptr %180, 0
  %183 = insertvalue { ptr, i32 } %182, i32 %181, 1
  resume { ptr, i32 } %183

184:                                              ; preds = %156
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13CObjectVectorI15CTextConfigPairE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11GetIDStringPKcRj(ptr dead_on_unwind noalias writable sret(%class.AString) align 8, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #0

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

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_Z20ConvertUTF8ToUnicodeRK7AStringR7UString(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

declare void @_ZN7AStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) #0 align 2

; 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
declare dso_local noundef i32 @_ZN13CObjectVectorI15CTextConfigPairE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { "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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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

%struct.CTextConfigPair = type { %class.UString, %class.UString }
%class.UString = type { ptr, i32, i32 }
%class.AString = type { ptr, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z13GetTextConfigRK7AStringR13CObjectVectorI15CTextConfigPairE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %struct.CTextConfigPair, align 8
  %5 = alloca i32, align 4
  %6 = alloca %class.AString, align 8
  %7 = alloca %class.AString, align 8
  tail call void @_ZN13CObjectVectorI15CTextConfigPairE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %4, i64 16
  br label %9

9:                                                ; preds = %85, %2
  %10 = call noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br i1 %10, label %11, label %90

11:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN15CTextConfigPairC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %12 = call noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = getelementptr inbounds i8, ptr %12, i64 %14
  invoke void @_ZL11GetIDStringPKcRj(ptr dead_on_unwind nonnull writable sret(%class.AString) align 8 %6, ptr noundef %15, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %16 unwind label %19

16:                                               ; preds = %11
  %17 = invoke noundef zeroext i1 @_Z20ConvertUTF8ToUnicodeRK7AStringR7UString(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %18 unwind label %21

18:                                               ; preds = %16
  br i1 %17, label %23, label %85

19:                                               ; preds = %11
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %89

21:                                               ; preds = %37, %26, %16
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %88

23:                                               ; preds = %18
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %85, label %26

26:                                               ; preds = %23
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = add i32 %27, %24
  store i32 %28, ptr %3, align 4, !tbaa !5
  %29 = invoke noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %30 unwind label %21

30:                                               ; preds = %26
  br i1 %29, label %31, label %85

31:                                               ; preds = %30
  %32 = call noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds i8, ptr %32, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %.not = icmp eq i8 %36, 61
  br i1 %.not, label %37, label %85

37:                                               ; preds = %31
  %38 = add i32 %33, 1
  store i32 %38, ptr %3, align 4, !tbaa !5
  %39 = invoke noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %40 unwind label %21

40:                                               ; preds = %37
  br i1 %39, label %41, label %85

41:                                               ; preds = %40
  %42 = call noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds i8, ptr %42, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %.not33 = icmp eq i8 %46, 34
  br i1 %.not33, label %47, label %85

47:                                               ; preds = %41
  %48 = add i32 %43, 1
  store i32 %48, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  invoke void @_ZN7AStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %.preheader unwind label %51

.preheader:                                       ; preds = %47
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = call noundef i32 @_ZNK7AString3LenEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %.not3446 = icmp ult i32 %49, %50
  br i1 %.not3446, label %.lr.ph, label %.loopexit

51:                                               ; preds = %47
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %87

53:                                               ; preds = %83, %80
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %86

.lr.ph:                                           ; preds = %.preheader, %77
  %55 = call noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = add i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !5
  %58 = zext i32 %56 to i64
  %59 = getelementptr inbounds i8, ptr %55, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !9
  switch i8 %60, label %.invoke [
    i8 34, label %80
    i8 92, label %63
  ]

61:                                               ; preds = %.invoke, %73
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %86

63:                                               ; preds = %.lr.ph
  %64 = call noundef ptr @_ZNK7AStringcvPKcEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = add i32 %65, 1
  store i32 %66, ptr %3, align 4, !tbaa !5
  %67 = zext i32 %65 to i64
  %68 = getelementptr inbounds i8, ptr %64, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !9
  switch i8 %69, label %73 [
    i8 110, label %.invoke
    i8 116, label %70
    i8 92, label %71
    i8 34, label %72
  ]

70:                                               ; preds = %63
  br label %.invoke

71:                                               ; preds = %63
  br label %.invoke

72:                                               ; preds = %63
  br label %.invoke

73:                                               ; preds = %63
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 noundef signext 92)
          to label %.invoke unwind label %61

.invoke:                                          ; preds = %.lr.ph, %73, %63, %70, %71, %72
  %75 = phi i8 [ %69, %72 ], [ %69, %71 ], [ 9, %70 ], [ 10, %63 ], [ %69, %73 ], [ %60, %.lr.ph ]
  %76 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 noundef signext %75)
          to label %77 unwind label %61

77:                                               ; preds = %.invoke
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = call noundef i32 @_ZNK7AString3LenEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %.not34 = icmp ult i32 %78, %79
  br i1 %.not34, label %.lr.ph, label %.loopexit

80:                                               ; preds = %.lr.ph
  %81 = invoke noundef zeroext i1 @_Z20ConvertUTF8ToUnicodeRK7AStringR7UString(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %82 unwind label %53

82:                                               ; preds = %80
  br i1 %81, label %83, label %.loopexit

83:                                               ; preds = %82
  %84 = invoke noundef i32 @_ZN13CObjectVectorI15CTextConfigPairE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %.loopexit unwind label %53

.loopexit:                                        ; preds = %77, %.preheader, %83, %82
  %.1 = phi i32 [ 1, %82 ], [ 0, %83 ], [ 1, %.preheader ], [ 1, %77 ]
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br label %85

85:                                               ; preds = %41, %40, %31, %30, %23, %18, %.loopexit
  %.2 = phi i32 [ %.1, %.loopexit ], [ 1, %18 ], [ 1, %23 ], [ 1, %30 ], [ 1, %31 ], [ 1, %40 ], [ 1, %41 ]
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @_ZN15CTextConfigPairD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %cond = icmp eq i32 %.2, 0
  br i1 %cond, label %9, label %90, !llvm.loop !10

86:                                               ; preds = %61, %53
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %62, %61 ]
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  br label %87

87:                                               ; preds = %86, %51
  %.pn.pn = phi { ptr, i32 } [ %.pn, %86 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br label %88

88:                                               ; preds = %87, %21
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %87 ], [ %22, %21 ]
  call void @_ZN7AStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br label %89

89:                                               ; preds = %88, %19
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %88 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @_ZN15CTextConfigPairD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn.pn

90:                                               ; preds = %9, %85
  %.330 = xor i1 %10, true
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i1 %.330
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13CObjectVectorI15CTextConfigPairE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; 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 uwtable
declare hidden noundef zeroext i1 @_ZL10SkipSpacesRK7AStringRj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11GetIDStringPKcRj(ptr dead_on_unwind noalias writable sret(%class.AString) align 8, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_Z20ConvertUTF8ToUnicodeRK7AStringR7UString(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

declare void @_ZN7AStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN7AStringpLEc(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN13CObjectVectorI15CTextConfigPairE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { "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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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