; LLVM IR from junhyeokahn/PyPnC :: external_source/yaml/src/stream.ll (ZN4YAML6StreamC2ERSi)

; 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.YAML::Stream" = type { ptr, %"struct.YAML::Mark", i32, %"class.std::deque", ptr, i64, i64 }
%"struct.YAML::Mark" = type { i32, i32, i32 }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl" }
%"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl" = type { %"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl_data" }
%"struct.std::_Deque_base<char, std::allocator<char>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@_ZN4YAMLL17s_introFinalStateE = external hidden global [19 x i8], align 16
@_ZN4YAMLL18s_introTransitionsE = external hidden global [18 x [8 x i32]], align 16
@_ZN4YAMLL17s_introUngetCountE = external hidden global [18 x [8 x i8]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4YAML6StreamC2ERSi(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [4 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @_ZN4YAML11noncopyableC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14)
  %15 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %16, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 1
  invoke void @_ZN4YAML4MarkC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %18 unwind label %34

18:                                               ; preds = %2
  %19 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 3
  invoke void @_ZNSt5dequeIcSaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19)
          to label %20 unwind label %34

20:                                               ; preds = %18
  %21 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 4
  %22 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef 2048) #7
          to label %23 unwind label %38

23:                                               ; preds = %20
  store ptr %22, ptr %21, align 8, !tbaa !9
  %24 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 5
  store i64 0, ptr %24, align 8, !tbaa !20
  %25 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 6
  store i64 0, ptr %25, align 8, !tbaa !21
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !22
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %26, i64 %29
  %31 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %30)
          to label %32 unwind label %38

32:                                               ; preds = %23
  br i1 %31, label %33, label %42

33:                                               ; preds = %32
  br label %143

34:                                               ; preds = %18, %2
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %5, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %6, align 4
  br label %150

38:                                               ; preds = %23, %20
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %5, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %6, align 4
  br label %149

42:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !25
  br label %43

43:                                               ; preds = %122, %42
  %44 = load i32, ptr %9, align 4, !tbaa !25
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds [19 x i8], ptr @_ZN4YAMLL17s_introFinalStateE, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !27, !range !29, !noundef !30
  %48 = trunc i8 %47 to i1
  %49 = xor i1 %48, true
  br i1 %49, label %50, label %126

50:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = invoke noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %51)
          to label %53 unwind label %105

53:                                               ; preds = %50
  store i32 %52, ptr %10, align 4, !tbaa !24
  %54 = load i32, ptr %10, align 4, !tbaa !24
  %55 = load i32, ptr %8, align 4, !tbaa !24
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %8, align 4, !tbaa !24
  %57 = sext i32 %55 to i64
  %58 = getelementptr inbounds [4 x i32], ptr %7, i64 0, i64 %57
  store i32 %54, ptr %58, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %59 = load i32, ptr %10, align 4, !tbaa !24
  %60 = invoke noundef i32 @_ZN4YAML15IntroCharTypeOfEi(i32 noundef %59)
          to label %61 unwind label %109

61:                                               ; preds = %53
  store i32 %60, ptr %11, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %62 = load i32, ptr %9, align 4, !tbaa !25
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds [18 x [8 x i32]], ptr @_ZN4YAMLL18s_introTransitionsE, i64 0, i64 %63
  %65 = load i32, ptr %11, align 4, !tbaa !31
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds [8 x i32], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !25
  store i32 %68, ptr %12, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %69 = load i32, ptr %9, align 4, !tbaa !25
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds [18 x [8 x i8]], ptr @_ZN4YAMLL17s_introUngetCountE, i64 0, i64 %70
  %72 = load i32, ptr %11, align 4, !tbaa !31
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds [8 x i8], ptr %71, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !33
  %76 = sext i8 %75 to i32
  store i32 %76, ptr %13, align 4, !tbaa !24
  %77 = load i32, ptr %13, align 4, !tbaa !24
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %122

79:                                               ; preds = %61
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !22
  %82 = getelementptr i8, ptr %81, i64 -24
  %83 = load i64, ptr %82, align 8
  %84 = getelementptr inbounds i8, ptr %80, i64 %83
  invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %84, i32 noundef 0)
          to label %85 unwind label %113

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %118, %85
  %87 = load i32, ptr %13, align 4, !tbaa !24
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %121

89:                                               ; preds = %86
  %90 = call noundef i32 @_ZNSt11char_traitsIcE3eofEv() #8
  %91 = load i32, ptr %8, align 4, !tbaa !24
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr %8, align 4, !tbaa !24
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [4 x i32], ptr %7, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !24
  %96 = icmp ne i32 %90, %95
  br i1 %96, label %97, label %117

97:                                               ; preds = %89
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !24
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [4 x i32], ptr %7, i64 0, i64 %100
  %102 = call noundef signext i8 @_ZNSt11char_traitsIcE12to_char_typeERKi(ptr noundef nonnull align 4 dereferenceable(4) %101) #8
  %103 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16) %98, i8 noundef signext %102)
          to label %104 unwind label %113

104:                                              ; preds = %97
  br label %117

105:                                              ; preds = %50
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %5, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %6, align 4
  br label %125

109:                                              ; preds = %53
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %5, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %6, align 4
  br label %124

113:                                              ; preds = %97, %79
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %5, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %124

117:                                              ; preds = %104, %89
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %13, align 4, !tbaa !24
  %120 = add nsw i32 %119, -1
  store i32 %120, ptr %13, align 4, !tbaa !24
  br label %86, !llvm.loop !34

121:                                              ; preds = %86
  br label %122

122:                                              ; preds = %121, %61
  %123 = load i32, ptr %12, align 4, !tbaa !25
  store i32 %123, ptr %9, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %43, !llvm.loop !36

124:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %125

125:                                              ; preds = %124, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %148

126:                                              ; preds = %43
  %127 = load i32, ptr %9, align 4, !tbaa !25
  switch i32 %127, label %138 [
    i32 17, label %128
    i32 10, label %130
    i32 5, label %132
    i32 11, label %134
    i32 4, label %136
  ]

128:                                              ; preds = %126
  %129 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 2
  store i32 0, ptr %129, align 4, !tbaa !37
  br label %140

130:                                              ; preds = %126
  %131 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 2
  store i32 1, ptr %131, align 4, !tbaa !37
  br label %140

132:                                              ; preds = %126
  %133 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 2
  store i32 2, ptr %133, align 4, !tbaa !37
  br label %140

134:                                              ; preds = %126
  %135 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 2
  store i32 3, ptr %135, align 4, !tbaa !37
  br label %140

136:                                              ; preds = %126
  %137 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 2
  store i32 4, ptr %137, align 4, !tbaa !37
  br label %140

138:                                              ; preds = %126
  %139 = getelementptr inbounds %"class.YAML::Stream", ptr %14, i32 0, i32 2
  store i32 0, ptr %139, align 4, !tbaa !37
  br label %140

140:                                              ; preds = %138, %136, %134, %132, %130, %128
  %141 = invoke noundef zeroext i1 @_ZNK4YAML6Stream11ReadAheadToEm(ptr noundef nonnull align 8 dereferenceable(128) %14, i64 noundef 0)
          to label %142 unwind label %144

142:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  br label %143

143:                                              ; preds = %142, %33
  ret void

144:                                              ; preds = %140
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %5, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %6, align 4
  br label %148

148:                                              ; preds = %144, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  br label %149

149:                                              ; preds = %148, %38
  call void @_ZNSt5dequeIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #8
  br label %150

150:                                              ; preds = %149, %34
  call void @_ZN4YAML11noncopyableD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %5, align 8
  %153 = load i32, ptr %6, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

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

declare noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4YAML15IntroCharTypeOfEi(i32 noundef) #5

declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264), i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt11char_traitsIcE3eofEv() #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNSt11char_traitsIcE12to_char_typeERKi(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4YAML6Stream11ReadAheadToEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4YAML11noncopyableD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 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 = { nobuiltin allocsize(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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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, !6, i64 104}
!10 = !{!"_ZTSN4YAML6StreamE", !6, i64 0, !11, i64 8, !13, i64 20, !14, i64 24, !6, i64 104, !18, i64 112, !18, i64 120}
!11 = !{!"_ZTSN4YAML4MarkE", !12, i64 0, !12, i64 4, !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN4YAML6Stream12CharacterSetE", !7, i64 0}
!14 = !{!"_ZTSSt5dequeIcSaIcEE", !15, i64 0}
!15 = !{!"_ZTSSt11_Deque_baseIcSaIcEE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseIcSaIcEE11_Deque_implE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseIcSaIcEE16_Deque_impl_dataE", !6, i64 0, !18, i64 8, !19, i64 16, !19, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt15_Deque_iteratorIcRcPcE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!10, !18, i64 112}
!21 = !{!10, !18, i64 120}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !8, i64 0}
!24 = !{!12, !12, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"_ZTSN4YAML13UtfIntroStateE", !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"bool", !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!32, !32, i64 0}
!32 = !{!"_ZTSN4YAML16UtfIntroCharTypeE", !7, i64 0}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!10, !13, i64 20}


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

@_ZN4YAMLL17s_introFinalStateE = external hidden local_unnamed_addr global [19 x i8], align 16
@_ZN4YAMLL18s_introTransitionsE = external hidden local_unnamed_addr global [18 x [8 x i32]], align 16
@_ZN4YAMLL17s_introUngetCountE = external hidden local_unnamed_addr global [18 x [8 x i8]], align 16
@switch.table._ZN4YAML6StreamC2ERSi = private unnamed_addr constant [8 x i32] [i32 4, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1, i32 3], align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4YAML6StreamC2ERSi(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [4 x i32], align 16
  tail call void @_ZN4YAML11noncopyableC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0)
  store ptr %1, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN4YAML4MarkC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  invoke void @_ZNSt5dequeIcSaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %6 unwind label %17

6:                                                ; preds = %2
  %7 = invoke noalias noundef nonnull dereferenceable(2048) ptr @_Znam(i64 noundef 2048) #8
          to label %8 unwind label %19

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %7, ptr %9, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  %11 = load ptr, ptr %1, align 8, !tbaa !20
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr %1, i64 %13
  %15 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %14)
          to label %16 unwind label %19

16:                                               ; preds = %8
  br i1 %15, label %65, label %21

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %70

19:                                               ; preds = %8, %6
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %69

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  %22 = load i8, ptr @_ZN4YAMLL17s_introFinalStateE, align 16, !tbaa !22, !range !24, !noundef !25
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %21, %.loopexit
  %24 = phi i64 [ %56, %.loopexit ], [ 0, %21 ]
  %.02743 = phi i32 [ %.229, %.loopexit ], [ 0, %21 ]
  %25 = invoke noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %26 unwind label %50

26:                                               ; preds = %.lr.ph
  %27 = add i32 %.02743, 1
  %28 = sext i32 %.02743 to i64
  %29 = getelementptr inbounds [4 x i32], ptr %3, i64 0, i64 %28
  store i32 %25, ptr %29, align 4, !tbaa !26
  %30 = call noundef i32 @_ZN4YAML15IntroCharTypeOfEi(i32 noundef %25)
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds [18 x [8 x i32]], ptr @_ZN4YAMLL18s_introTransitionsE, i64 0, i64 %24, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !27
  %34 = getelementptr inbounds [18 x [8 x i8]], ptr @_ZN4YAMLL17s_introUngetCountE, i64 0, i64 %24, i64 %31
  %35 = load i8, ptr %34, align 1, !tbaa !29
  %36 = icmp sgt i8 %35, 0
  br i1 %36, label %37, label %.loopexit

37:                                               ; preds = %26
  %38 = load ptr, ptr %1, align 8, !tbaa !20
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr %1, i64 %40
  invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %41, i32 noundef 0)
          to label %.preheader.preheader unwind label %.loopexit.split-lp

.preheader.preheader:                             ; preds = %37
  %42 = zext nneg i8 %35 to i32
  %43 = sext i32 %27 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %52
  %indvars.iv = phi i64 [ %43, %.preheader.preheader ], [ %indvars.iv.next, %52 ]
  %.042 = phi i32 [ %42, %.preheader.preheader ], [ %53, %52 ]
  %44 = call noundef i32 @_ZNSt11char_traitsIcE3eofEv() #9
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %45 = getelementptr inbounds [4 x i32], ptr %3, i64 0, i64 %indvars.iv.next
  %46 = load i32, ptr %45, align 4, !tbaa !26
  %.not = icmp eq i32 %44, %46
  br i1 %.not, label %52, label %47

47:                                               ; preds = %.preheader
  %48 = call noundef signext i8 @_ZNSt11char_traitsIcE12to_char_typeERKi(ptr noundef nonnull align 4 dereferenceable(4) %45) #9
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16) %1, i8 noundef signext %48)
          to label %52 unwind label %.loopexit36

50:                                               ; preds = %.lr.ph
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %68

.loopexit36:                                      ; preds = %47
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %68

.loopexit.split-lp:                               ; preds = %37
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %68

52:                                               ; preds = %.preheader, %47
  %53 = add nsw i32 %.042, -1
  %54 = icmp sgt i32 %.042, 1
  br i1 %54, label %.preheader, label %.loopexit.loopexit, !llvm.loop !30

.loopexit.loopexit:                               ; preds = %52
  %55 = trunc nsw i64 %indvars.iv.next to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %26
  %.229 = phi i32 [ %27, %26 ], [ %55, %.loopexit.loopexit ]
  %56 = zext i32 %33 to i64
  %57 = getelementptr inbounds [19 x i8], ptr @_ZN4YAMLL17s_introFinalStateE, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !22, !range !24, !noundef !25
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %._crit_edge, label %.lr.ph, !llvm.loop !32

._crit_edge:                                      ; preds = %.loopexit
  %switch.tableidx = add i32 %33, -4
  %60 = icmp ult i32 %switch.tableidx, 8
  br i1 %60, label %switch.lookup, label %._crit_edge.thread

switch.lookup:                                    ; preds = %._crit_edge
  %61 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [8 x i32], ptr @switch.table._ZN4YAML6StreamC2ERSi, i64 0, i64 %61
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %switch.lookup, %._crit_edge, %21
  %.sink = phi i32 [ 0, %21 ], [ 0, %._crit_edge ], [ %switch.load, %switch.lookup ]
  %62 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %.sink, ptr %62, align 4, !tbaa !33
  %63 = invoke noundef zeroext i1 @_ZNK4YAML6Stream11ReadAheadToEm(ptr noundef nonnull align 8 dereferenceable(128) %0, i64 noundef 0)
          to label %64 unwind label %66

64:                                               ; preds = %._crit_edge.thread
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  br label %65

65:                                               ; preds = %16, %64
  ret void

66:                                               ; preds = %._crit_edge.thread
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %68

68:                                               ; preds = %.loopexit36, %.loopexit.split-lp, %50, %66
  %.pn.pn = phi { ptr, i32 } [ %67, %66 ], [ %51, %50 ], [ %lpad.loopexit, %.loopexit36 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  br label %69

69:                                               ; preds = %68, %19
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %68 ], [ %20, %19 ]
  call void @_ZNSt5dequeIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #9
  br label %70

70:                                               ; preds = %69, %17
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %69 ], [ %18, %17 ]
  call void @_ZN4YAML11noncopyableD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) 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) #3

declare noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4YAML15IntroCharTypeOfEi(i32 noundef) local_unnamed_addr #5

declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt11char_traitsIcE3eofEv() local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNSt11char_traitsIcE12to_char_typeERKi(ptr noundef nonnull align 4 dereferenceable(4)) local_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) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4YAML6Stream11ReadAheadToEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) local_unnamed_addr #6 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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 = { nobuiltin allocsize(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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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, !6, i64 104}
!10 = !{!"_ZTSN4YAML6StreamE", !6, i64 0, !11, i64 8, !13, i64 20, !14, i64 24, !6, i64 104, !18, i64 112, !18, i64 120}
!11 = !{!"_ZTSN4YAML4MarkE", !12, i64 0, !12, i64 4, !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN4YAML6Stream12CharacterSetE", !7, i64 0}
!14 = !{!"_ZTSSt5dequeIcSaIcEE", !15, i64 0}
!15 = !{!"_ZTSSt11_Deque_baseIcSaIcEE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseIcSaIcEE11_Deque_implE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseIcSaIcEE16_Deque_impl_dataE", !6, i64 0, !18, i64 8, !19, i64 16, !19, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt15_Deque_iteratorIcRcPcE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!12, !12, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"_ZTSN4YAML13UtfIntroStateE", !7, i64 0}
!29 = !{!7, !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!10, !13, i64 20}


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