; LLVM IR from UBIC-repo/core :: PassportReader/LDS/LDSParser.ll (ZN9LDSParser11getSequenceEv)

; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl" }
%"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl" = type { %"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%class.LDSParser = type { [64000 x i8], i32 }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9LDSParser11getSequenceEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8 %0, ptr noundef nonnull align 4 dereferenceable(64004) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [3 x i8], align 1
  %9 = alloca i32, align 4
  %10 = alloca i1, align 1
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i1, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !9
  %18 = getelementptr inbounds %class.LDSParser, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds [64000 x i8], ptr %18, i64 0, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !11
  %23 = zext i8 %22 to i32
  %24 = icmp ne i32 %23, 48
  br i1 %24, label %25, label %34

25:                                               ; preds = %2
  %26 = getelementptr inbounds %class.LDSParser, ptr %17, i32 0, i32 0
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds [64000 x i8], ptr %26, i64 0, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = zext i8 %30 to i32
  %32 = icmp ne i32 %31, 49
  br i1 %32, label %33, label %34

33:                                               ; preds = %25
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorI9LDSParserSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  store i32 1, ptr %6, align 4
  br label %143

34:                                               ; preds = %25, %2
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = add i32 %35, 1
  store i32 %36, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 3, ptr %8) #8
  %37 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %38 = getelementptr inbounds %class.LDSParser, ptr %17, i32 0, i32 0
  %39 = getelementptr inbounds [64000 x i8], ptr %38, i64 0, i64 0
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %39, i64 %41
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %37, ptr align 1 %42, i64 3, i1 false)
  %43 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  call void @_ZN14PassportCrypto9asn1ToIntEPhPj(ptr noundef %43, ptr noundef %7)
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = add i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !9
  %46 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = zext i8 %47 to i32
  %49 = icmp eq i32 %48, 130
  br i1 %49, label %50, label %53

50:                                               ; preds = %34
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = add i32 %51, 2
  store i32 %52, ptr %5, align 4, !tbaa !9
  br label %62

53:                                               ; preds = %34
  %54 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = zext i8 %55 to i32
  %57 = icmp eq i32 %56, 129
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = add i32 %59, 1
  store i32 %60, ptr %5, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %58, %53
  br label %62

62:                                               ; preds = %61, %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = add i32 %63, %64
  store i32 %65, ptr %9, align 4, !tbaa !9
  store i1 false, ptr %10, align 1
  call void @_ZNSt6vectorI9LDSParserSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  br label %66

66:                                               ; preds = %122, %62
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = icmp ult i32 %67, %68
  br i1 %69, label %70, label %139

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %71 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %71, ptr %11, align 4, !tbaa !9
  %72 = load i32, ptr %5, align 4, !tbaa !9
  %73 = add i32 %72, 1
  store i32 %73, ptr %5, align 4, !tbaa !9
  %74 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %75 = getelementptr inbounds %class.LDSParser, ptr %17, i32 0, i32 0
  %76 = getelementptr inbounds [64000 x i8], ptr %75, i64 0, i64 0
  %77 = load i32, ptr %5, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %74, ptr align 1 %79, i64 3, i1 false)
  %80 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  invoke void @_ZN14PassportCrypto9asn1ToIntEPhPj(ptr noundef %80, ptr noundef %7)
          to label %81 unwind label %91

81:                                               ; preds = %70
  %82 = load i32, ptr %5, align 4, !tbaa !9
  %83 = add i32 %82, 1
  store i32 %83, ptr %5, align 4, !tbaa !9
  %84 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = zext i8 %85 to i32
  %87 = icmp eq i32 %86, 130
  br i1 %87, label %88, label %95

88:                                               ; preds = %81
  %89 = load i32, ptr %5, align 4, !tbaa !9
  %90 = add i32 %89, 2
  store i32 %90, ptr %5, align 4, !tbaa !9
  br label %104

91:                                               ; preds = %104, %70
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %12, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %13, align 4
  br label %138

95:                                               ; preds = %81
  %96 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %97 = load i8, ptr %96, align 1, !tbaa !11
  %98 = zext i8 %97 to i32
  %99 = icmp eq i32 %98, 129
  br i1 %99, label %100, label %103

100:                                              ; preds = %95
  %101 = load i32, ptr %5, align 4, !tbaa !9
  %102 = add i32 %101, 1
  store i32 %102, ptr %5, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %100, %95
  br label %104

104:                                              ; preds = %103, %88
  %105 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64004) #9
          to label %106 unwind label %91

106:                                              ; preds = %104
  store i1 true, ptr %16, align 1
  %107 = getelementptr inbounds %class.LDSParser, ptr %17, i32 0, i32 0
  %108 = getelementptr inbounds [64000 x i8], ptr %107, i64 0, i64 0
  %109 = load i32, ptr %11, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i8, ptr %108, i64 %110
  %112 = getelementptr inbounds %class.LDSParser, ptr %17, i32 0, i32 0
  %113 = getelementptr inbounds [64000 x i8], ptr %112, i64 0, i64 0
  %114 = load i32, ptr %5, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds i8, ptr %113, i64 %115
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds i8, ptr %116, i64 %118
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  invoke void @_ZNSt6vectorIhSaIhEEC2IPhvEET_S4_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef %111, ptr noundef %119, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %120 unwind label %126

120:                                              ; preds = %106
  invoke void @_ZN9LDSParserC1ESt6vectorIhSaIhEE(ptr noundef nonnull align 4 dereferenceable(64004) %105, ptr noundef %14)
          to label %121 unwind label %130

121:                                              ; preds = %120
  store i1 false, ptr %16, align 1
  invoke void @_ZNSt6vectorI9LDSParserSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(64004) %105)
          to label %122 unwind label %130

122:                                              ; preds = %121
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = load i32, ptr %5, align 4, !tbaa !9
  %125 = add i32 %124, %123
  store i32 %125, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %66, !llvm.loop !12

126:                                              ; preds = %106
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %12, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %13, align 4
  br label %134

130:                                              ; preds = %121, %120
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %12, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %13, align 4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %134

134:                                              ; preds = %130, %126
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  %135 = load i1, ptr %16, align 1
  br i1 %135, label %136, label %137

136:                                              ; preds = %134
  call void @_ZdlPvm(ptr noundef %105, i64 noundef 64004) #10
  br label %137

137:                                              ; preds = %136, %134
  br label %138

138:                                              ; preds = %137, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @_ZNSt6vectorI9LDSParserSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 3, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %144

139:                                              ; preds = %66
  store i1 true, ptr %10, align 1
  store i32 1, ptr %6, align 4
  %140 = load i1, ptr %10, align 1
  br i1 %140, label %142, label %141

141:                                              ; preds = %139
  call void @_ZNSt6vectorI9LDSParserSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  br label %142

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

143:                                              ; preds = %142, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void

144:                                              ; preds = %138
  %145 = load ptr, ptr %12, align 8
  %146 = load i32, ptr %13, align 4
  %147 = insertvalue { ptr, i32 } poison, ptr %145, 0
  %148 = insertvalue { ptr, i32 } %147, i32 %146, 1
  resume { ptr, i32 } %148
}

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

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

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

declare void @_ZN14PassportCrypto9asn1ToIntEPhPj(ptr noundef, ptr noundef) #5

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

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

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

declare void @_ZN9LDSParserC1ESt6vectorIhSaIhEE(ptr, ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl" }
%"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl" = type { %"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LDSParser, std::allocator<LDSParser>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9LDSParser11getSequenceEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8 %0, ptr noundef nonnull align 4 dereferenceable(64004) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca [3 x i8], align 1
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = load i8, ptr %1, align 4, !tbaa !5
  %8 = and i8 %7, -2
  %switch = icmp eq i8 %8, 48
  br i1 %switch, label %10, label %9

9:                                                ; preds = %2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  tail call void @_ZNSt6vectorI9LDSParserSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  br label %45

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %4) #8
  %11 = getelementptr inbounds i8, ptr %1, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %4, ptr noundef nonnull align 1 dereferenceable(3) %11, i64 3, i1 false)
  call void @_ZN14PassportCrypto9asn1ToIntEPhPj(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %12 = load i8, ptr %4, align 1, !tbaa !5
  %switch.selectcmp = icmp eq i8 %12, -127
  %switch.select = select i1 %switch.selectcmp, i32 3, i32 2
  %switch.selectcmp35 = icmp eq i8 %12, -126
  %switch.select36 = select i1 %switch.selectcmp35, i32 4, i32 %switch.select
  %13 = load i32, ptr %3, align 4, !tbaa !8
  %14 = add i32 %switch.select36, %13
  call void @_ZNSt6vectorI9LDSParserSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %15 = icmp ult i32 %switch.select36, %14
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10, %36
  %.12841 = phi i32 [ %38, %36 ], [ %switch.select36, %10 ]
  %16 = add nuw i32 %.12841, 1
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds i8, ptr %1, i64 %17
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %4, ptr noundef nonnull align 1 dereferenceable(3) %18, i64 3, i1 false)
  invoke void @_ZN14PassportCrypto9asn1ToIntEPhPj(ptr noundef nonnull %4, ptr noundef nonnull %3)
          to label %19 unwind label %24

19:                                               ; preds = %.lr.ph
  %20 = load i8, ptr %4, align 1, !tbaa !5
  %21 = icmp eq i8 %20, -126
  %22 = icmp eq i8 %20, -127
  %spec.select.v = select i1 %22, i32 3, i32 2
  %.2.v = select i1 %21, i32 4, i32 %spec.select.v
  %.2 = add i32 %.12841, %.2.v
  %23 = invoke noalias noundef nonnull dereferenceable(64004) ptr @_Znwm(i64 noundef 64004) #9
          to label %26 unwind label %24

24:                                               ; preds = %19, %.lr.ph
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %44

26:                                               ; preds = %19
  %27 = sext i32 %.12841 to i64
  %28 = getelementptr inbounds i8, ptr %1, i64 %27
  %29 = zext i32 %.2 to i64
  %30 = getelementptr inbounds i8, ptr %1, i64 %29
  %31 = load i32, ptr %3, align 4, !tbaa !8
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds i8, ptr %30, i64 %32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIhSaIhEEC2IPhvEET_S4_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull %28, ptr noundef nonnull %33, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %34 unwind label %.thread

34:                                               ; preds = %26
  invoke void @_ZN9LDSParserC1ESt6vectorIhSaIhEE(ptr noundef nonnull align 4 dereferenceable(64004) %23, ptr noundef nonnull %5)
          to label %35 unwind label %41

35:                                               ; preds = %34
  invoke void @_ZNSt6vectorI9LDSParserSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(64004) %23)
          to label %36 unwind label %41

36:                                               ; preds = %35
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  %37 = load i32, ptr %3, align 4, !tbaa !8
  %38 = add i32 %37, %.2
  %39 = icmp ult i32 %38, %14
  br i1 %39, label %.lr.ph, label %._crit_edge, !llvm.loop !10

.thread:                                          ; preds = %26
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br label %43

41:                                               ; preds = %34, %35
  %.0 = phi i1 [ false, %35 ], [ true, %34 ]
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br i1 %.0, label %43, label %44

43:                                               ; preds = %.thread, %41
  %.pn39 = phi { ptr, i32 } [ %40, %.thread ], [ %42, %41 ]
  call void @_ZdlPvm(ptr noundef nonnull %23, i64 noundef 64004) #10
  br label %44

44:                                               ; preds = %41, %43, %24
  %.pn.pn = phi { ptr, i32 } [ %.pn39, %43 ], [ %42, %41 ], [ %25, %24 ]
  call void @_ZNSt6vectorI9LDSParserSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn.pn

._crit_edge:                                      ; preds = %36, %10
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %45

45:                                               ; preds = %._crit_edge, %9
  ret void
}

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare void @_ZN14PassportCrypto9asn1ToIntEPhPj(ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

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

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

declare void @_ZN9LDSParserC1ESt6vectorIhSaIhEE(ptr, ptr) local_unnamed_addr

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


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