; LLVM IR from sp-nitech/SPTK :: src/input (input_source_from_vector)

; 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.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.sptk::InputSourceFromVector" = type <{ %"class.sptk::InputSourceInterface", i8, [3 x i8], i32, i32, [4 x i8], ptr, i32, i8, [3 x i8] }>
%"class.sptk::InputSourceInterface" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk21InputSourceFromVector3GetEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef %1) unnamed_addr #1 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca double, align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = icmp eq ptr null, %28
  br i1 %29, label %40, label %30

30:                                               ; preds = %2
  %31 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 8
  %32 = load i8, ptr %31, align 4, !tbaa !9, !range !14, !noundef !15
  %33 = trunc i8 %32 to i1
  br i1 %33, label %34, label %40

34:                                               ; preds = %30
  %35 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 4
  %36 = load i32, ptr %35, align 8, !tbaa !16
  %37 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  %38 = load i32, ptr %37, align 8, !tbaa !17
  %39 = icmp sle i32 %36, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %34, %30, %2
  store i1 false, ptr %3, align 1
  br label %161

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %42 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  %43 = load i32, ptr %42, align 8, !tbaa !17
  %44 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 3
  %45 = load i32, ptr %44, align 4, !tbaa !18
  %46 = add nsw i32 %43, %45
  store i32 %46, ptr %6, align 4, !tbaa !19
  %47 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 1
  %48 = load i8, ptr %47, align 8, !tbaa !20, !range !14, !noundef !15
  %49 = trunc i8 %48 to i1
  br i1 %49, label %56, label %50

50:                                               ; preds = %41
  %51 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 4
  %52 = load i32, ptr %51, align 8, !tbaa !16
  %53 = load i32, ptr %6, align 4, !tbaa !19
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %55, label %56

55:                                               ; preds = %50
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %160

56:                                               ; preds = %50, %41
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #4
  %59 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 3
  %60 = load i32, ptr %59, align 4, !tbaa !18
  %61 = sext i32 %60 to i64
  %62 = icmp ne i64 %58, %61
  br i1 %62, label %63, label %68

63:                                               ; preds = %56
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 3
  %66 = load i32, ptr %65, align 4, !tbaa !18
  %67 = sext i32 %66 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %67)
  br label %68

68:                                               ; preds = %63, %56
  %69 = load i32, ptr %6, align 4, !tbaa !19
  %70 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 4
  %71 = load i32, ptr %70, align 8, !tbaa !16
  %72 = icmp sle i32 %69, %71
  br i1 %72, label %73, label %102

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %74 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #4
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %9, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  %78 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  %79 = load i32, ptr %78, align 8, !tbaa !17
  %80 = sext i32 %79 to i64
  %81 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %80) #4
  %82 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %8, i32 0, i32 0
  store ptr %81, ptr %82, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %83 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #4
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %11, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = load i32, ptr %6, align 4, !tbaa !19
  %88 = sext i32 %87 to i64
  %89 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %88) #4
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %10, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #4
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %8, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %10, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8
  %100 = call ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEENS1_IPdS6_EEET0_T_SB_SA_(ptr %95, ptr %97, ptr %99)
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %157

102:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %103 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 4
  %104 = load i32, ptr %103, align 8, !tbaa !16
  %105 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  %106 = load i32, ptr %105, align 8, !tbaa !17
  %107 = sub nsw i32 %104, %106
  store i32 %107, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %108 = load i32, ptr %6, align 4, !tbaa !19
  %109 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 4
  %110 = load i32, ptr %109, align 8, !tbaa !16
  %111 = sub nsw i32 %108, %110
  store i32 %111, ptr %15, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %112 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !21
  %114 = call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #4
  %115 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %17, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  %116 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  %117 = load i32, ptr %116, align 8, !tbaa !17
  %118 = sext i32 %117 to i64
  %119 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef %118) #4
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %16, i32 0, i32 0
  store ptr %119, ptr %120, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %121 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !21
  %123 = call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #4
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %20, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  %125 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  %126 = load i32, ptr %125, align 8, !tbaa !17
  %127 = sext i32 %126 to i64
  %128 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef %127) #4
  %129 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %19, i32 0, i32 0
  store ptr %128, ptr %129, align 8
  %130 = load i32, ptr %14, align 4, !tbaa !19
  %131 = sext i32 %130 to i64
  %132 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %19, i64 noundef %131) #4
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %18, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #4
  %136 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %16, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %18, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8
  %141 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8
  %143 = call ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEENS1_IPdS6_EEET0_T_SB_SA_(ptr %138, ptr %140, ptr %142)
  %144 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %143, ptr %144, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %145) #4
  %147 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  %148 = load i32, ptr %14, align 4, !tbaa !19
  %149 = sext i32 %148 to i64
  %150 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef %149) #4
  %151 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %150, ptr %151, align 8
  %152 = load i32, ptr %15, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  store double 0.000000e+00, ptr %25, align 8, !tbaa !22
  %153 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8
  %155 = call ptr @_ZSt6fill_nIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEidET_S7_T0_RKT1_(ptr %154, i32 noundef %152, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %157

157:                                              ; preds = %102, %73
  %158 = load i32, ptr %6, align 4, !tbaa !19
  %159 = getelementptr inbounds %"class.sptk::InputSourceFromVector", ptr %27, i32 0, i32 7
  store i32 %158, ptr %159, align 8, !tbaa !17
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %160

160:                                              ; preds = %157, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %161

161:                                              ; preds = %160, %40
  %162 = load i1, ptr %3, align 1
  ret i1 %162
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEENS1_IPdS6_EEET0_T_SB_SA_(ptr, ptr, ptr) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6fill_nIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEidET_S7_T0_RKT1_(ptr, i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

attributes #0 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !12, i64 36}
!10 = !{!"_ZTSN4sptk21InputSourceFromVectorE", !11, i64 0, !12, i64 8, !13, i64 12, !13, i64 16, !6, i64 24, !13, i64 32, !12, i64 36}
!11 = !{!"_ZTSN4sptk20InputSourceInterfaceE"}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!10, !13, i64 16}
!17 = !{!10, !13, i64 32}
!18 = !{!10, !13, i64 12}
!19 = !{!13, !13, i64 0}
!20 = !{!10, !12, i64 8}
!21 = !{!10, !6, i64 24}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}


; 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.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk21InputSourceFromVector3GetEPSt6vectorIdSaIdEE(ptr nocapture noundef nonnull align 8 dereferenceable(37) %0, ptr noundef %1) unnamed_addr #1 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca double, align 8
  %10 = icmp eq ptr %1, null
  br i1 %10, label %71, label %11

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 36
  %13 = load i8, ptr %12, align 4, !tbaa !5, !range !13, !noundef !14
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %15, label %71

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load i32, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %19 = load i32, ptr %18, align 8, !tbaa !16
  %.not = icmp sgt i32 %17, %19
  br i1 %.not, label %20, label %71

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %0, i64 12
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = add nsw i32 %22, %19
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = load i8, ptr %24, align 8, !tbaa !18, !range !13, !noundef !14
  %26 = trunc nuw i8 %25 to i1
  %27 = icmp sge i32 %17, %23
  %or.cond.not = select i1 %26, i1 true, i1 %27
  br i1 %or.cond.not, label %28, label %71

28:                                               ; preds = %20
  %29 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %30 = load i32, ptr %21, align 4, !tbaa !17
  %31 = sext i32 %30 to i64
  %.not31 = icmp eq i64 %29, %31
  br i1 %.not31, label %33, label %32

32:                                               ; preds = %28
  tail call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %31)
  br label %33

33:                                               ; preds = %32, %28
  %34 = load i32, ptr %16, align 8, !tbaa !15
  %.not32 = icmp sgt i32 %23, %34
  br i1 %.not32, label %48, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = tail call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  store ptr %38, ptr %3, align 8
  %39 = load i32, ptr %18, align 8, !tbaa !16
  %40 = sext i32 %39 to i64
  %41 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %40) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %42 = load ptr, ptr %36, align 8, !tbaa !19
  %43 = call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #4
  store ptr %43, ptr %4, align 8
  %44 = sext i32 %23 to i64
  %45 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %44) #4
  %46 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %47 = call ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEENS1_IPdS6_EEET0_T_SB_SA_(ptr %41, ptr %45, ptr %46)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %70

48:                                               ; preds = %33
  %49 = load i32, ptr %18, align 8, !tbaa !16
  %50 = sub nsw i32 %34, %49
  %51 = sub nsw i32 %23, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %52 = getelementptr inbounds i8, ptr %0, i64 24
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = tail call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #4
  store ptr %54, ptr %5, align 8
  %55 = load i32, ptr %18, align 8, !tbaa !16
  %56 = sext i32 %55 to i64
  %57 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %56) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %58 = load ptr, ptr %52, align 8, !tbaa !19
  %59 = call ptr @_ZNKSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #4
  store ptr %59, ptr %7, align 8
  %60 = load i32, ptr %18, align 8, !tbaa !16
  %61 = sext i32 %60 to i64
  %62 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %61) #4
  store ptr %62, ptr %6, align 8
  %63 = sext i32 %50 to i64
  %64 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %63) #4
  %65 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %66 = call ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEENS1_IPdS6_EEET0_T_SB_SA_(ptr %57, ptr %64, ptr %65)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %67 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store ptr %67, ptr %8, align 8
  %68 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %63) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store double 0.000000e+00, ptr %9, align 8, !tbaa !20
  %69 = call ptr @_ZSt6fill_nIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEidET_S7_T0_RKT1_(ptr %68, i32 noundef %51, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %70

70:                                               ; preds = %48, %35
  store i32 %23, ptr %18, align 8, !tbaa !16
  br label %71

71:                                               ; preds = %70, %20, %2, %11, %15
  %.1 = phi i1 [ false, %15 ], [ false, %11 ], [ false, %2 ], [ true, %70 ], [ false, %20 ]
  ret i1 %.1
}

; 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 uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEENS1_IPdS6_EEET0_T_SB_SA_(ptr, ptr, ptr) local_unnamed_addr #3

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

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

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

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

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

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

attributes #0 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !8, i64 36}
!6 = !{!"_ZTSN4sptk21InputSourceFromVectorE", !7, i64 0, !8, i64 8, !11, i64 12, !11, i64 16, !12, i64 24, !11, i64 32, !8, i64 36}
!7 = !{!"_ZTSN4sptk20InputSourceInterfaceE"}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!6, !11, i64 16}
!16 = !{!6, !11, i64 32}
!17 = !{!6, !11, i64 12}
!18 = !{!6, !8, i64 8}
!19 = !{!6, !12, i64 24}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass