; LLVM IR from viveakrt/Competitive-programing :: SPOJ/qtree.ll (Z3hldii)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }

@t = external dso_local global i32, align 4
@adj = external dso_local global [10001 x %"class.std::vector"], align 16
@in = external dso_local global [10001 x i32], align 16
@out = external dso_local global [10001 x i32], align 16
@nxt = external dso_local global [10001 x i32], align 16
@va = external dso_local global [10001 x i32], align 16
@vid = external dso_local global [10001 x i32], align 16

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; 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) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3hldii(i32 noundef %0, i32 noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.std::tuple", align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  %12 = load i32, ptr @t, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr @t, align 4, !tbaa !5
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [10001 x i32], ptr @in, i64 0, i64 %15
  store i32 %13, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [10001 x %"class.std::vector"], ptr @adj, i64 0, i64 %18
  store ptr %19, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  %21 = call ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = call ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %87, %2
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %89

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #5
  %30 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %30, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12) %8) #5
  store ptr %31, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12) %8) #5
  store ptr %32, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12) %8) #5
  store ptr %33, ptr %11, align 8, !tbaa !9
  %34 = load ptr, ptr %10, align 8, !tbaa !9
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp ne i32 %35, %36
  br i1 %37, label %38, label %86

38:                                               ; preds = %29
  %39 = load ptr, ptr %10, align 8, !tbaa !9
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [10001 x %"class.std::vector"], ptr @adj, i64 0, i64 %42
  %44 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef 0) #5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %44) #5
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp eq i32 %40, %46
  br i1 %47, label %48, label %57

48:                                               ; preds = %38
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [10001 x i32], ptr @nxt, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = load ptr, ptr %10, align 8, !tbaa !9
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [10001 x i32], ptr @nxt, i64 0, i64 %55
  store i32 %52, ptr %56, align 4, !tbaa !5
  br label %64

57:                                               ; preds = %38
  %58 = load ptr, ptr %10, align 8, !tbaa !9
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load ptr, ptr %10, align 8, !tbaa !9
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [10001 x i32], ptr @nxt, i64 0, i64 %62
  store i32 %59, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %57, %48
  %65 = load ptr, ptr %10, align 8, !tbaa !9
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z3hldii(i32 noundef %66, i32 noundef %67)
  %68 = load ptr, ptr %9, align 8, !tbaa !9
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !9
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [10001 x i32], ptr @in, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [10001 x i32], ptr @va, i64 0, i64 %75
  store i32 %69, ptr %76, align 4, !tbaa !5
  %77 = load ptr, ptr %10, align 8, !tbaa !9
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [10001 x i32], ptr @in, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [10001 x i32], ptr @vid, i64 0, i64 %84
  store i32 %81, ptr %85, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %64, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #5
  br label %87

87:                                               ; preds = %86
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %26

89:                                               ; preds = %28
  %90 = load i32, ptr @t, align 4, !tbaa !5
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [10001 x i32], ptr @out, i64 0, i64 %92
  store i32 %90, ptr %93, align 4, !tbaa !5
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }

@t = external dso_local local_unnamed_addr global i32, align 4
@adj = external dso_local global [10001 x %"class.std::vector"], align 16
@in = external dso_local local_unnamed_addr global [10001 x i32], align 16
@out = external dso_local local_unnamed_addr global [10001 x i32], align 16
@nxt = external dso_local local_unnamed_addr global [10001 x i32], align 16
@va = external dso_local local_unnamed_addr global [10001 x i32], align 16
@vid = external dso_local local_unnamed_addr global [10001 x i32], align 16

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z3hldii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.std::tuple", align 4
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, 1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %8 = sext i32 %0 to i64
  %9 = getelementptr inbounds [10001 x i32], ptr @in, i64 0, i64 %8
  store i32 %7, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds [10001 x %"class.std::vector"], ptr @adj, i64 0, i64 %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %11 = tail call ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  store ptr %11, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %12 = tail call ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  store ptr %12, ptr %4, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %14 = getelementptr inbounds [10001 x i32], ptr @nxt, i64 0, i64 %8
  br label %17

._crit_edge:                                      ; preds = %53, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %15 = load i32, ptr @t, align 4, !tbaa !5
  %16 = getelementptr inbounds [10001 x i32], ptr @out, i64 0, i64 %8
  store i32 %15, ptr %16, align 4, !tbaa !5
  ret void

17:                                               ; preds = %.lr.ph, %53
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  %18 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %18, i64 12, i1 false)
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12) %5) #4
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12) %5) #4
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 4 dereferenceable(12) %5) #4
  %22 = load i32, ptr %20, align 4, !tbaa !5
  %.not = icmp eq i32 %22, %1
  br i1 %.not, label %53, label %23

23:                                               ; preds = %17
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5tupleIJiiiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #4
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %24) #4
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = icmp eq i32 %22, %26
  br i1 %27, label %28, label %33

28:                                               ; preds = %23
  %29 = load i32, ptr %14, align 4, !tbaa !5
  %30 = load i32, ptr %20, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [10001 x i32], ptr @nxt, i64 0, i64 %31
  store i32 %29, ptr %32, align 4, !tbaa !5
  %.pre = load i32, ptr %20, align 4, !tbaa !5
  br label %37

33:                                               ; preds = %23
  %34 = load i32, ptr %20, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [10001 x i32], ptr @nxt, i64 0, i64 %35
  store i32 %34, ptr %36, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %33, %28
  %38 = phi i32 [ %34, %33 ], [ %.pre, %28 ]
  call void @_Z3hldii(i32 noundef %38, i32 noundef %0)
  %39 = load i32, ptr %19, align 4, !tbaa !5
  %40 = load i32, ptr %20, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [10001 x i32], ptr @in, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [10001 x i32], ptr @va, i64 0, i64 %44
  store i32 %39, ptr %45, align 4, !tbaa !5
  %46 = load i32, ptr %20, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10001 x i32], ptr @in, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %21, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [10001 x i32], ptr @vid, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %37, %17
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %55, label %17, label %._crit_edge
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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


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