; LLVM IR from djeada/Algorithms-And-Data-Structures :: src/backtracking/cpp/knight_tour/src (knight_tour)

; 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.std::array" = type { [8 x %"struct.std::pair"] }
%"struct.std::pair" = type { i32, i32 }

@_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves = external hidden constant %"struct.std::array", align 4

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

; 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 @_Z10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef 0) #3
  %27 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #3
  %28 = mul i64 %24, %27
  %29 = icmp eq i64 %22, %28
  br i1 %29, label %30, label %33

30:                                               ; preds = %6
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(24) %32)
  br label %113

33:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr @_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %34 = call noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE5beginEv(ptr noundef nonnull align 4 dereferenceable(64) @_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves) #3
  store ptr %34, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %35 = call noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE3endEv(ptr noundef nonnull align 4 dereferenceable(64) @_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves) #3
  store ptr %35, ptr %15, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %110, %33
  %37 = load ptr, ptr %14, align 8, !tbaa !5
  %38 = load ptr, ptr %15, align 8, !tbaa !5
  %39 = icmp ne ptr %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %113

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %42, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %43 = load ptr, ptr %16, align 8, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS4_(ptr noundef nonnull align 4 dereferenceable(8) %43) #3
  store ptr %44, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS4_(ptr noundef nonnull align 4 dereferenceable(8) %45) #3
  store ptr %46, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = add nsw i32 %47, %49
  store i32 %50, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = add nsw i32 %51, %53
  store i32 %54, ptr %20, align 4, !tbaa !9
  %55 = load i32, ptr %19, align 4, !tbaa !9
  %56 = icmp sge i32 %55, 0
  br i1 %56, label %57, label %109

57:                                               ; preds = %41
  %58 = load i32, ptr %19, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #3
  %62 = icmp ult i64 %59, %61
  br i1 %62, label %63, label %109

63:                                               ; preds = %57
  %64 = load i32, ptr %20, align 4, !tbaa !9
  %65 = icmp sge i32 %64, 0
  br i1 %65, label %66, label %109

66:                                               ; preds = %63
  %67 = load i32, ptr %20, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef 0) #3
  %71 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #3
  %72 = icmp ult i64 %68, %71
  br i1 %72, label %73, label %109

73:                                               ; preds = %66
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load i32, ptr %19, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #3
  %78 = load i32, ptr %20, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #3
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = icmp eq i32 %81, -1
  br i1 %82, label %83, label %109

83:                                               ; preds = %73
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = load i32, ptr %19, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #3
  %89 = load i32, ptr %20, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #3
  store i32 %84, ptr %91, align 4, !tbaa !9
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load i32, ptr %19, align 4, !tbaa !9
  %96 = load i32, ptr %20, align 4, !tbaa !9
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_Z10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EE(ptr noundef nonnull align 8 dereferenceable(24) %94, i32 noundef %95, i32 noundef %96, i32 noundef %98, ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 8 dereferenceable(24) %100)
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #3
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load i32, ptr %19, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %104) #3
  %106 = load i32, ptr %20, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %107) #3
  store i32 -1, ptr %108, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %83, %73, %66, %63, %57, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.std::pair", ptr %111, i32 1
  store ptr %112, ptr %14, align 8, !tbaa !5
  br label %36

113:                                              ; preds = %40, %30
  ret void
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE5beginEv(ptr noundef nonnull align 4 dereferenceable(64)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE3endEv(ptr noundef nonnull align 4 dereferenceable(64)) #2 align 2

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

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

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

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

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

attributes #0 = { nocallback nofree nosync 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 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 = { 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}


; 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.std::array" = type { [8 x %"struct.std::pair"] }
%"struct.std::pair" = type { i32, i32 }

@_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves = external hidden constant %"struct.std::array", align 4

; 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 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 @_Z10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) local_unnamed_addr #1 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = sext i32 %3 to i64
  %10 = tail call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %11 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #3
  %12 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  %13 = mul i64 %12, %10
  %14 = icmp eq i64 %13, %9
  br i1 %14, label %15, label %16

15:                                               ; preds = %6
  tail call void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %4)
  br label %.loopexit

16:                                               ; preds = %6
  %17 = tail call noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE5beginEv(ptr noundef nonnull align 4 dereferenceable(64) @_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves) #3
  %18 = tail call noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE3endEv(ptr noundef nonnull align 4 dereferenceable(64) @_ZZ10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EEE14possible_moves) #3
  %.not29 = icmp eq ptr %17, %18
  br i1 %.not29, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %16
  %19 = add nsw i32 %3, 1
  br label %20

20:                                               ; preds = %.lr.ph, %64
  %.030 = phi ptr [ %17, %.lr.ph ], [ %65, %64 ]
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS4_(ptr noundef nonnull align 4 dereferenceable(8) %.030) #3
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS4_(ptr noundef nonnull align 4 dereferenceable(8) %.030) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %23 = load i32, ptr %21, align 4, !tbaa !5
  %24 = add nsw i32 %23, %1
  store i32 %24, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  %25 = load i32, ptr %22, align 4, !tbaa !5
  %26 = add nsw i32 %25, %2
  store i32 %26, ptr %8, align 4, !tbaa !5
  %27 = icmp sgt i32 %24, -1
  br i1 %27, label %28, label %64

28:                                               ; preds = %20
  %29 = zext nneg i32 %24 to i64
  %30 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %31 = icmp ugt i64 %30, %29
  %32 = load i32, ptr %8, align 4
  %33 = icmp sgt i32 %32, -1
  %or.cond = select i1 %31, i1 %33, i1 false
  br i1 %or.cond, label %34, label %64

34:                                               ; preds = %28
  %35 = zext nneg i32 %32 to i64
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #3
  %37 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #3
  %38 = icmp ugt i64 %37, %35
  br i1 %38, label %39, label %64

39:                                               ; preds = %34
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %41) #3
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44) #3
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %64

48:                                               ; preds = %39
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %50) #3
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #3
  store i32 %3, ptr %54, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !5
  call void @_Z10find_toursRSt6vectorIS_IiSaIiEESaIS1_EEiiiRS_ISt4pairIiiESaIS6_EERS_IS8_SaIS8_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %56, i32 noundef %57, i32 noundef %19, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %59) #3
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62) #3
  store i32 -1, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %48, %39, %34, %28, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  %65 = getelementptr inbounds i8, ptr %.030, i64 8
  %.not = icmp eq ptr %65, %18
  br i1 %.not, label %.loopexit, label %20

.loopexit:                                        ; preds = %64, %16, %15
  ret void
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE5beginEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayISt4pairIiiELm8EE3endEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2 align 2

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync 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 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 = { 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,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass