; LLVM IR from thepowersgang/mrustc :: tools/minicargo/cfg.ll (ZN13CfgParseLexer8get_nextEv)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.CfgParseLexer::Tok" = type { i32, ptr, ptr, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.CfgParseLexer = type { ptr, ptr, %"class.CfgParseLexer::Tok" }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13CfgParseLexer8get_nextEv(ptr dead_on_unwind noalias writable sret(%"class.CfgParseLexer::Tok") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i1, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  br label %14

14:                                               ; preds = %20, %2
  %15 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = load i8, ptr %16, align 1, !tbaa !16
  %18 = sext i8 %17 to i32
  %19 = icmp eq i32 %18, 32
  br i1 %19, label %20, label %24

20:                                               ; preds = %14
  %21 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %22, i32 1
  store ptr %23, ptr %21, align 8, !tbaa !9
  br label %14, !llvm.loop !17

24:                                               ; preds = %14
  %25 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = load i8, ptr %26, align 1, !tbaa !16
  %28 = sext i8 %27 to i32
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %24
  call void @_ZN13CfgParseLexer3TokC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0)
  br label %152

31:                                               ; preds = %24
  %32 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = load i8, ptr %33, align 1, !tbaa !16
  %35 = sext i8 %34 to i32
  switch i32 %35, label %95 [
    i32 40, label %36
    i32 41, label %36
    i32 44, label %36
    i32 61, label %36
    i32 34, label %40
  ]

36:                                               ; preds = %31, %31, %31, %31
  %37 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %38, i32 1
  store ptr %39, ptr %37, align 8, !tbaa !9
  call void @_ZN13CfgParseLexer3TokC2EPKc(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %38)
  br label %152

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %41 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  store ptr %42, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %44, i32 1
  store ptr %45, ptr %43, align 8, !tbaa !9
  br label %46

46:                                               ; preds = %77, %40
  %47 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = load i8, ptr %48, align 1, !tbaa !16
  %50 = sext i8 %49 to i32
  %51 = icmp ne i32 %50, 34
  br i1 %51, label %52, label %81

52:                                               ; preds = %46
  %53 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = load i8, ptr %54, align 1, !tbaa !16
  %56 = sext i8 %55 to i32
  %57 = icmp eq i32 %56, 92
  br i1 %57, label %58, label %72

58:                                               ; preds = %52
  br label %59

59:                                               ; preds = %58
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
          to label %61 unwind label %66

61:                                               ; preds = %59
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef @.str.1)
          to label %63 unwind label %66

63:                                               ; preds = %61
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %65 unwind label %66

65:                                               ; preds = %63
  call void @abort() #9
  unreachable

66:                                               ; preds = %81, %72, %63, %61, %59
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  br label %94

70:                                               ; No predecessors!
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71, %52
  %73 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = load i8, ptr %74, align 1, !tbaa !16
  %76 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %5, i8 noundef signext %75)
          to label %77 unwind label %66

77:                                               ; preds = %72
  %78 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %79, i32 1
  store ptr %80, ptr %78, align 8, !tbaa !9
  br label %46, !llvm.loop !19

81:                                               ; preds = %46
  %82 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds i8, ptr %83, i32 1
  store ptr %84, ptr %82, align 8, !tbaa !9
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %88 unwind label %66

88:                                               ; preds = %81
  invoke void @_ZN13CfgParseLexer3TokC2EPKcS2_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %85, ptr noundef %87, ptr noundef %9)
          to label %89 unwind label %90

89:                                               ; preds = %88
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  br label %152

90:                                               ; preds = %88
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %7, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %94

94:                                               ; preds = %90, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  br label %153

95:                                               ; preds = %31
  %96 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  %98 = load i8, ptr %97, align 1, !tbaa !16
  %99 = sext i8 %98 to i32
  %100 = call i32 @isalnum(i32 noundef %99) #10
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %108, label %102

102:                                              ; preds = %95
  %103 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = load i8, ptr %104, align 1, !tbaa !16
  %106 = sext i8 %105 to i32
  %107 = icmp eq i32 %106, 95
  br i1 %107, label %108, label %134

108:                                              ; preds = %102, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %109 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  store ptr %110, ptr %10, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %126, %108
  %112 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = load i8, ptr %113, align 1, !tbaa !16
  %115 = sext i8 %114 to i32
  %116 = call i32 @isalnum(i32 noundef %115) #10
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %124, label %118

118:                                              ; preds = %111
  %119 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  %121 = load i8, ptr %120, align 1, !tbaa !16
  %122 = sext i8 %121 to i32
  %123 = icmp eq i32 %122, 95
  br label %124

124:                                              ; preds = %118, %111
  %125 = phi i1 [ true, %111 ], [ %123, %118 ]
  br i1 %125, label %126, label %130

126:                                              ; preds = %124
  %127 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = getelementptr inbounds i8, ptr %128, i32 1
  store ptr %129, ptr %127, align 8, !tbaa !9
  br label %111, !llvm.loop !20

130:                                              ; preds = %124
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !9
  call void @_ZN13CfgParseLexer3TokC2EPKcS2_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %131, ptr noundef %133)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %152

134:                                              ; preds = %102
  store i1 true, ptr %12, align 1
  %135 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  %136 = getelementptr inbounds %class.CfgParseLexer, ptr %13, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  invoke void @_Z6formatIJA33_ccEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 1 dereferenceable(33) @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %137)
          to label %138 unwind label %140

138:                                              ; preds = %134
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %139 unwind label %144

139:                                              ; preds = %138
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %135, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #11
          to label %158 unwind label %144

140:                                              ; preds = %134
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %7, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %8, align 4
  br label %148

144:                                              ; preds = %139, %138
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %7, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %148

148:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  %149 = load i1, ptr %12, align 1
  br i1 %149, label %150, label %151

150:                                              ; preds = %148
  call void @__cxa_free_exception(ptr %135) #8
  br label %151

151:                                              ; preds = %150, %148
  br label %153

152:                                              ; preds = %130, %89, %36, %30
  ret void

153:                                              ; preds = %151, %94
  %154 = load ptr, ptr %7, align 8
  %155 = load i32, ptr %8, align 4
  %156 = insertvalue { ptr, i32 } poison, ptr %154, 0
  %157 = insertvalue { ptr, i32 } %156, i32 %155, 1
  resume { ptr, i32 } %157

158:                                              ; preds = %139
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: noreturn nounwind
declare void @abort() #4

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

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

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

!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, !6, i64 8}
!10 = !{!"_ZTS13CfgParseLexer", !6, i64 0, !6, i64 8, !11, i64 16}
!11 = !{!"_ZTSN13CfgParseLexer3TokE", !12, i64 0, !6, i64 8, !6, i64 16, !13, i64 24}
!12 = !{!"_ZTSN13CfgParseLexer3Tok4TypeE", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.CfgParseLexer::Tok" = type { i32, ptr, ptr, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13CfgParseLexer8get_nextEv(ptr dead_on_unwind noalias writable sret(%"class.CfgParseLexer::Tok") align 8 %0, ptr nocapture noundef nonnull align 8 dereferenceable(72) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %.promoted = load ptr, ptr %6, align 8, !tbaa !5
  br label %7

7:                                                ; preds = %9, %2
  %.lcssa32.promoted = phi ptr [ %10, %9 ], [ %.promoted, %2 ]
  %8 = load i8, ptr %.lcssa32.promoted, align 1, !tbaa !15
  switch i8 %8, label %33 [
    i8 32, label %9
    i8 0, label %11
    i8 40, label %12
    i8 41, label %12
    i8 44, label %12
    i8 61, label %12
    i8 34, label %14
  ]

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %.lcssa32.promoted, i64 1
  store ptr %10, ptr %6, align 8, !tbaa !5
  br label %7, !llvm.loop !16

11:                                               ; preds = %7
  tail call void @_ZN13CfgParseLexer3TokC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0)
  br label %53

12:                                               ; preds = %7, %7, %7, %7
  %13 = getelementptr inbounds i8, ptr %.lcssa32.promoted, i64 1
  store ptr %13, ptr %6, align 8, !tbaa !5
  tail call void @_ZN13CfgParseLexer3TokC2EPKc(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %.lcssa32.promoted)
  br label %53

14:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %28, %14
  %.pn = phi ptr [ %15, %14 ], [ %29, %28 ]
  %storemerge = getelementptr inbounds i8, ptr %.pn, i64 1
  store ptr %storemerge, ptr %6, align 8, !tbaa !5
  %17 = load i8, ptr %storemerge, align 1, !tbaa !15
  switch i8 %17, label %26 [
    i8 34, label %30
    i8 92, label %18
  ]

18:                                               ; preds = %16
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
          to label %20 unwind label %.loopexit.split-lp

20:                                               ; preds = %18
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str.1)
          to label %22 unwind label %.loopexit.split-lp

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %24 unwind label %.loopexit.split-lp

24:                                               ; preds = %22
  call void @abort() #9
  unreachable

.loopexit:                                        ; preds = %26
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %25

.loopexit.split-lp:                               ; preds = %18, %20, %22, %30
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %25

25:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %54

26:                                               ; preds = %16
  %27 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %3, i8 noundef signext %17)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %26
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  br label %16, !llvm.loop !18

30:                                               ; preds = %16
  %31 = getelementptr inbounds i8, ptr %.pn, i64 2
  store ptr %31, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %32 unwind label %.loopexit.split-lp

32:                                               ; preds = %30
  call void @_ZN13CfgParseLexer3TokC2EPKcS2_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %15, ptr noundef nonnull %31, ptr noundef nonnull %4)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %53

33:                                               ; preds = %7
  %34 = sext i8 %8 to i32
  %35 = tail call i32 @isalnum(i32 noundef %34) #10
  %.not11 = icmp ne i32 %35, 0
  %36 = icmp eq i8 %8, 95
  %or.cond = or i1 %36, %.not11
  br i1 %or.cond, label %.critedge, label %43

.critedge:                                        ; preds = %33, %.critedge
  %37 = phi ptr [ %38, %.critedge ], [ %.lcssa32.promoted, %33 ]
  %38 = getelementptr inbounds i8, ptr %37, i64 1
  store ptr %38, ptr %6, align 8, !tbaa !5
  %39 = load i8, ptr %38, align 1, !tbaa !15
  %40 = sext i8 %39 to i32
  %41 = tail call i32 @isalnum(i32 noundef %40) #10
  %.not15 = icmp ne i32 %41, 0
  %42 = icmp eq i8 %39, 95
  %or.cond16 = or i1 %42, %.not15
  br i1 %or.cond16, label %.critedge, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %.critedge
  tail call void @_ZN13CfgParseLexer3TokC2EPKcS2_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %.lcssa32.promoted, ptr noundef nonnull %38)
  br label %53

43:                                               ; preds = %33
  %44 = tail call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_Z6formatIJA33_ccEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 1 dereferenceable(33) @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %45)
          to label %46 unwind label %.thread

46:                                               ; preds = %43
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %48 unwind label %.thread20

.thread20:                                        ; preds = %46
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %52

48:                                               ; preds = %46
  invoke void @__cxa_throw(ptr nonnull %44, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
          to label %55 unwind label %50

.thread:                                          ; preds = %43
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %52

50:                                               ; preds = %48
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %54

52:                                               ; preds = %.thread20, %.thread
  %.pn1219 = phi { ptr, i32 } [ %49, %.thread ], [ %47, %.thread20 ]
  call void @__cxa_free_exception(ptr %44) #8
  br label %54

53:                                               ; preds = %._crit_edge, %32, %12, %11
  ret void

54:                                               ; preds = %50, %52, %25
  %.pn12.pn = phi { ptr, i32 } [ %.pn1219, %52 ], [ %51, %50 ], [ %lpad.phi, %25 ]
  resume { ptr, i32 } %.pn12.pn

55:                                               ; preds = %48
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isalnum(i32 noundef) local_unnamed_addr #5

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

!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, !7, i64 8}
!6 = !{!"_ZTS13CfgParseLexer", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN13CfgParseLexer3TokE", !11, i64 0, !7, i64 8, !7, i64 16, !12, i64 24}
!11 = !{!"_ZTSN13CfgParseLexer3Tok4TypeE", !8, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !8, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!8, !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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