; LLVM IR from fritzsedlazeck/SURVIVOR :: src/analysis_sv/MT_identifier.ll (Z13parse_entriesPKcRSt6vectorI11segment_strSaIS2_EE)

; 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.segment_str = type <{ i32, [4 x i8], %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z16parse_read_startNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef, i1 noundef zeroext) #0

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13parse_entriesPKcRSt6vectorI11segment_strSaIS2_EE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.segment_str, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %struct.segment_str, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 5, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #6
  call void @_ZN11segment_strC2Ev(ptr noundef nonnull align 8 dereferenceable(52) %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %14 unwind label %40

14:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %15

15:                                               ; preds = %150, %14
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = load i64, ptr %5, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %16, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !13
  %20 = sext i8 %19 to i32
  %21 = icmp ne i32 %20, 9
  br i1 %21, label %22, label %151

22:                                               ; preds = %15
  %23 = load i32, ptr %6, align 4, !tbaa !11
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %48

25:                                               ; preds = %22
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = load i64, ptr %5, align 8, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %26, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !13
  %30 = sext i8 %29 to i32
  %31 = icmp ne i32 %30, 44
  br i1 %31, label %32, label %48

32:                                               ; preds = %25
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = load i64, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %33, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !13
  %37 = getelementptr inbounds %struct.segment_str, ptr %7, i32 0, i32 2
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %37, i8 noundef signext %36)
          to label %39 unwind label %44

39:                                               ; preds = %32
  br label %48

40:                                               ; preds = %2
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %10, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %153

44:                                               ; preds = %137, %113, %95, %32
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  br label %152

48:                                               ; preds = %39, %25, %22
  %49 = load i32, ptr %6, align 4, !tbaa !11
  %50 = icmp eq i32 %49, 1
  br i1 %50, label %51, label %65

51:                                               ; preds = %48
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load i64, ptr %5, align 8, !tbaa !9
  %54 = sub i64 %53, 1
  %55 = getelementptr inbounds i8, ptr %52, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !13
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 44
  br i1 %58, label %59, label %65

59:                                               ; preds = %51
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load i64, ptr %5, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %60, i64 %61
  %63 = call i32 @atoi(ptr noundef %62) #7
  %64 = getelementptr inbounds %struct.segment_str, ptr %7, i32 0, i32 0
  store i32 %63, ptr %64, align 8, !tbaa !14
  br label %65

65:                                               ; preds = %59, %51, %48
  %66 = load i32, ptr %6, align 4, !tbaa !11
  %67 = icmp eq i32 %66, 2
  br i1 %67, label %68, label %85

68:                                               ; preds = %65
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = load i64, ptr %5, align 8, !tbaa !9
  %71 = sub i64 %70, 1
  %72 = getelementptr inbounds i8, ptr %69, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = sext i8 %73 to i32
  %75 = icmp eq i32 %74, 44
  br i1 %75, label %76, label %85

76:                                               ; preds = %68
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = load i64, ptr %5, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %77, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !13
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %81, 43
  %83 = getelementptr inbounds %struct.segment_str, ptr %7, i32 0, i32 3
  %84 = zext i1 %82 to i8
  store i8 %84, ptr %83, align 8, !tbaa !19
  br label %85

85:                                               ; preds = %76, %68, %65
  %86 = load i32, ptr %6, align 4, !tbaa !11
  %87 = icmp eq i32 %86, 3
  br i1 %87, label %88, label %102

88:                                               ; preds = %85
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = load i64, ptr %5, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %89, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !13
  %93 = sext i8 %92 to i32
  %94 = icmp ne i32 %93, 44
  br i1 %94, label %95, label %102

95:                                               ; preds = %88
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = load i64, ptr %5, align 8, !tbaa !9
  %98 = getelementptr inbounds i8, ptr %96, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !13
  %100 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %8, i8 noundef signext %99)
          to label %101 unwind label %44

101:                                              ; preds = %95
  br label %102

102:                                              ; preds = %101, %88, %85
  %103 = load i32, ptr %6, align 4, !tbaa !11
  %104 = icmp eq i32 %103, 4
  br i1 %104, label %105, label %130

105:                                              ; preds = %102
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = load i64, ptr %5, align 8, !tbaa !9
  %108 = sub i64 %107, 1
  %109 = getelementptr inbounds i8, ptr %106, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !13
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %111, 44
  br i1 %112, label %113, label %130

113:                                              ; preds = %105
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %114 unwind label %44

114:                                              ; preds = %113
  %115 = getelementptr inbounds %struct.segment_str, ptr %7, i32 0, i32 3
  %116 = load i8, ptr %115, align 8, !tbaa !19, !range !20, !noundef !21
  %117 = trunc i8 %116 to i1
  %118 = invoke noundef i32 @_Z16parse_read_startNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef %12, i1 noundef zeroext %117)
          to label %119 unwind label %126

119:                                              ; preds = %114
  %120 = getelementptr inbounds %struct.segment_str, ptr %7, i32 0, i32 6
  store i32 %118, ptr %120, align 8, !tbaa !22
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = load i64, ptr %5, align 8, !tbaa !9
  %123 = getelementptr inbounds i8, ptr %121, i64 %122
  %124 = call i32 @atoi(ptr noundef %123) #7
  %125 = getelementptr inbounds %struct.segment_str, ptr %7, i32 0, i32 5
  store i32 %124, ptr %125, align 4, !tbaa !23
  br label %130

126:                                              ; preds = %114
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %10, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %152

130:                                              ; preds = %119, %105, %102
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = load i64, ptr %5, align 8, !tbaa !9
  %133 = getelementptr inbounds i8, ptr %131, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !13
  %135 = sext i8 %134 to i32
  %136 = icmp eq i32 %135, 59
  br i1 %136, label %137, label %140

137:                                              ; preds = %130
  invoke void @_ZN11segment_strC2ERKS_(ptr noundef nonnull align 8 dereferenceable(52) %13, ptr noundef nonnull align 8 dereferenceable(52) %7)
          to label %138 unwind label %44

138:                                              ; preds = %137
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_Z11insert_sort11segment_strRSt6vectorIS_SaIS_EE(ptr noundef %13, ptr noundef nonnull align 8 dereferenceable(24) %139)
  call void @_ZN11segment_strD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %13) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %140

140:                                              ; preds = %138, %130
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = load i64, ptr %5, align 8, !tbaa !9
  %143 = getelementptr inbounds i8, ptr %141, i64 %142
  %144 = load i8, ptr %143, align 1, !tbaa !13
  %145 = sext i8 %144 to i32
  %146 = icmp eq i32 %145, 44
  br i1 %146, label %147, label %150

147:                                              ; preds = %140
  %148 = load i32, ptr %6, align 4, !tbaa !11
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %6, align 4, !tbaa !11
  br label %150

150:                                              ; preds = %147, %140
  br label %15, !llvm.loop !24

151:                                              ; preds = %15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @_ZN11segment_strD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void

152:                                              ; preds = %126, %44
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %153

153:                                              ; preds = %152, %40
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @_ZN11segment_strD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %154

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

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

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN11segment_strC2ERKS_(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint mustprogress nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !12, i64 0}
!15 = !{!"_ZTS11segment_str", !12, i64 0, !16, i64 8, !18, i64 40, !12, i64 44, !12, i64 48}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !10, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!15, !18, i64 40}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!15, !12, i64 48}
!23 = !{!15, !12, i64 44}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


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

%struct.segment_str = type <{ i32, [4 x i8], %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z16parse_read_startNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13parse_entriesPKcRSt6vectorI11segment_strSaIS2_EE(ptr nocapture noundef readonly %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.segment_str, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %struct.segment_str, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #6
  call void @_ZN11segment_strC2Ev(ptr noundef nonnull align 8 dereferenceable(52) %3) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %8 unwind label %19

8:                                                ; preds = %2
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  %9 = getelementptr inbounds i8, ptr %0, i64 5
  %10 = load i8, ptr %9, align 1, !tbaa !5
  %.not44 = icmp eq i8 %10, 9
  br i1 %.not44, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %8
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %12 = getelementptr inbounds i8, ptr %0, i64 4
  %13 = getelementptr inbounds i8, ptr %3, i64 40
  %14 = getelementptr inbounds i8, ptr %3, i64 48
  %15 = getelementptr inbounds i8, ptr %3, i64 44
  br label %16

16:                                               ; preds = %.lr.ph, %.thread43
  %17 = phi i8 [ %10, %.lr.ph ], [ %55, %.thread43 ]
  %.03645 = phi i32 [ 0, %.lr.ph ], [ %spec.select, %.thread43 ]
  %18 = icmp ne i32 %.03645, 0
  %.not39 = icmp eq i8 %17, 44
  %or.cond = or i1 %18, %.not39
  br i1 %or.cond, label %23, label %.invoke

19:                                               ; preds = %2
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  br label %59

21:                                               ; preds = %.invoke, %53, %41
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %58

23:                                               ; preds = %16
  switch i32 %.03645, label %thread-pre-split [
    i32 1, label %24
    i32 2, label %29
    i32 3, label %35
    i32 4, label %38
  ]

24:                                               ; preds = %23
  %25 = load i8, ptr %12, align 1, !tbaa !5
  %26 = icmp eq i8 %25, 44
  br i1 %26, label %27, label %thread-pre-split

27:                                               ; preds = %24
  %28 = call i32 @atoi(ptr nocapture noundef %9) #7
  store i32 %28, ptr %3, align 8, !tbaa !8
  br label %thread-pre-split

29:                                               ; preds = %23
  %30 = load i8, ptr %12, align 1, !tbaa !5
  %31 = icmp eq i8 %30, 44
  br i1 %31, label %32, label %thread-pre-split

32:                                               ; preds = %29
  %33 = icmp eq i8 %17, 43
  %34 = zext i1 %33 to i8
  store i8 %34, ptr %13, align 8, !tbaa !16
  br label %50

35:                                               ; preds = %23
  br i1 %.not39, label %.thread43, label %.invoke

.invoke:                                          ; preds = %16, %35
  %36 = phi ptr [ %4, %35 ], [ %11, %16 ]
  %37 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %36, i8 noundef signext %17)
          to label %thread-pre-split unwind label %21

38:                                               ; preds = %23
  %39 = load i8, ptr %12, align 1, !tbaa !5
  %40 = icmp eq i8 %39, 44
  br i1 %40, label %41, label %thread-pre-split

41:                                               ; preds = %38
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %42 unwind label %21

42:                                               ; preds = %41
  %43 = load i8, ptr %13, align 8, !tbaa !16, !range !17, !noundef !18
  %44 = trunc nuw i8 %43 to i1
  %45 = invoke noundef i32 @_Z16parse_read_startNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull %6, i1 noundef zeroext %44)
          to label %46 unwind label %48

46:                                               ; preds = %42
  store i32 %45, ptr %14, align 8, !tbaa !19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  %47 = call i32 @atoi(ptr nocapture noundef %9) #7
  store i32 %47, ptr %15, align 4, !tbaa !20
  br label %thread-pre-split

48:                                               ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %58

thread-pre-split:                                 ; preds = %.invoke, %38, %46, %23, %27, %24, %29
  %.pr = load i8, ptr %9, align 1, !tbaa !5
  br label %50

50:                                               ; preds = %thread-pre-split, %32
  %51 = phi i8 [ %.pr, %thread-pre-split ], [ %17, %32 ]
  %52 = icmp eq i8 %51, 59
  br i1 %52, label %53, label %.thread43

53:                                               ; preds = %50
  invoke void @_ZN11segment_strC2ERKS_(ptr noundef nonnull align 8 dereferenceable(52) %7, ptr noundef nonnull align 8 dereferenceable(52) %3)
          to label %54 unwind label %21

54:                                               ; preds = %53
  call void @_Z11insert_sort11segment_strRSt6vectorIS_SaIS_EE(ptr noundef nonnull %7, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN11segment_strD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %7) #6
  %.pre = load i8, ptr %9, align 1, !tbaa !5
  br label %.thread43

.thread43:                                        ; preds = %35, %54, %50
  %55 = phi i8 [ %.pre, %54 ], [ %51, %50 ], [ 44, %35 ]
  %.137 = phi i32 [ 0, %54 ], [ %.03645, %50 ], [ 3, %35 ]
  %56 = icmp eq i8 %55, 44
  %57 = zext i1 %56 to i32
  %spec.select = add nsw i32 %.137, %57
  %.not = icmp eq i8 %55, 9
  br i1 %.not, label %._crit_edge, label %16, !llvm.loop !21

._crit_edge:                                      ; preds = %.thread43, %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN11segment_strD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #6
  ret void

58:                                               ; preds = %48, %21
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %49, %48 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %59

59:                                               ; preds = %58, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %58 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN11segment_strD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN11segment_strC2ERKS_(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTS11segment_str", !10, i64 0, !11, i64 8, !15, i64 40, !10, i64 44, !10, i64 48}
!10 = !{!"int", !6, i64 0}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !6, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!"long", !6, i64 0}
!15 = !{!"bool", !6, i64 0}
!16 = !{!9, !15, i64 40}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!9, !10, i64 48}
!20 = !{!9, !10, i64 44}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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