; LLVM IR from eyangch/competitive-programming :: AdventOfCode/2020/day11/1.ll (Z3cntxx)

; 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::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@dx = external dso_local global [8 x i64], align 16
@dy = external dso_local global [8 x i64], align 16
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@_Z1bB5cxx11 = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z3cntxx(i64 noundef %0, i64 noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %54, %2
  %11 = load i64, ptr %6, align 8, !tbaa !5
  %12 = icmp slt i64 %11, 8
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %57

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = load i64, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds [8 x i64], ptr @dx, i64 0, i64 %16
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %19 = add nsw i64 %15, %18
  store i64 %19, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %20 = load i64, ptr %4, align 8, !tbaa !5
  %21 = load i64, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds [8 x i64], ptr @dy, i64 0, i64 %21
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = add nsw i64 %20, %23
  store i64 %24, ptr %9, align 8, !tbaa !5
  %25 = load i64, ptr %8, align 8, !tbaa !5
  %26 = icmp slt i64 %25, 0
  br i1 %26, label %38, label %27

27:                                               ; preds = %14
  %28 = load i64, ptr %9, align 8, !tbaa !5
  %29 = icmp slt i64 %28, 0
  br i1 %29, label %38, label %30

30:                                               ; preds = %27
  %31 = load i64, ptr %8, align 8, !tbaa !5
  %32 = load i64, ptr @N, align 8, !tbaa !5
  %33 = icmp sge i64 %31, %32
  br i1 %33, label %38, label %34

34:                                               ; preds = %30
  %35 = load i64, ptr %9, align 8, !tbaa !5
  %36 = load i64, ptr @M, align 8, !tbaa !5
  %37 = icmp sge i64 %35, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %34, %30, %27, %14
  store i32 4, ptr %7, align 4
  br label %51

39:                                               ; preds = %34
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %40) #3
  %42 = load i64, ptr %9, align 8, !tbaa !5
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %41, i64 noundef %42)
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 %45, 35
  br i1 %46, label %47, label %50

47:                                               ; preds = %39
  %48 = load i64, ptr %5, align 8, !tbaa !5
  %49 = add nsw i64 %48, 1
  store i64 %49, ptr %5, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %47, %39
  store i32 0, ptr %7, align 4
  br label %51

51:                                               ; preds = %50, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %52 = load i32, ptr %7, align 4
  switch i32 %52, label %59 [
    i32 0, label %53
    i32 4, label %54
  ]

53:                                               ; preds = %51
  br label %54

54:                                               ; preds = %53, %51
  %55 = load i64, ptr %6, align 8, !tbaa !5
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %6, align 8, !tbaa !5
  br label %10, !llvm.loop !10

57:                                               ; preds = %13
  %58 = load i64, ptr %5, align 8, !tbaa !5
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret i64 %58

59:                                               ; preds = %51
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

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

@dx = external dso_local local_unnamed_addr global [8 x i64], align 16
@dy = external dso_local local_unnamed_addr global [8 x i64], align 16
@N = external dso_local local_unnamed_addr global i64, align 8
@M = external dso_local local_unnamed_addr global i64, align 8
@_Z1bB5cxx11 = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i64 @_Z3cntxx(i64 noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = load i64, ptr @dx, align 16, !tbaa !5
  %4 = add nsw i64 %3, %0
  %5 = load i64, ptr @dy, align 16, !tbaa !5
  %6 = add nsw i64 %5, %1
  %7 = icmp sgt i64 %4, -1
  %8 = icmp sgt i64 %6, -1
  %or.cond.not23 = select i1 %7, i1 %8, i1 false
  %9 = load i64, ptr @N, align 8
  %.not = icmp slt i64 %4, %9
  %or.cond19 = select i1 %or.cond.not23, i1 %.not, i1 false
  %10 = load i64, ptr @M, align 8
  %.not18 = icmp slt i64 %6, %10
  %or.cond20 = select i1 %or.cond19, i1 %.not18, i1 false
  br i1 %or.cond20, label %11, label %17

11:                                               ; preds = %2
  %12 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %4) #1
  %13 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %12, i64 noundef %6)
  %14 = load i8, ptr %13, align 1, !tbaa !9
  %15 = icmp eq i8 %14, 35
  %16 = zext i1 %15 to i64
  %.pre = load i64, ptr @N, align 8
  %.pre26 = load i64, ptr @M, align 8
  br label %17

17:                                               ; preds = %2, %11
  %18 = phi i64 [ %.pre26, %11 ], [ %10, %2 ]
  %19 = phi i64 [ %.pre, %11 ], [ %9, %2 ]
  %.2 = phi i64 [ %16, %11 ], [ 0, %2 ]
  %20 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 8), align 8, !tbaa !5
  %21 = add nsw i64 %20, %0
  %22 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 8), align 8, !tbaa !5
  %23 = add nsw i64 %22, %1
  %24 = icmp sgt i64 %21, -1
  %25 = icmp sgt i64 %23, -1
  %or.cond.not23.1 = select i1 %24, i1 %25, i1 false
  %.not.1 = icmp slt i64 %21, %19
  %or.cond19.1 = select i1 %or.cond.not23.1, i1 %.not.1, i1 false
  %.not18.1 = icmp slt i64 %23, %18
  %or.cond20.1 = select i1 %or.cond19.1, i1 %.not18.1, i1 false
  br i1 %or.cond20.1, label %26, label %32

26:                                               ; preds = %17
  %27 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %21) #1
  %28 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %27, i64 noundef %23)
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = icmp eq i8 %29, 35
  %31 = zext i1 %30 to i64
  %spec.select.1 = add nuw nsw i64 %.2, %31
  %.pre27 = load i64, ptr @N, align 8
  %.pre28 = load i64, ptr @M, align 8
  br label %32

32:                                               ; preds = %26, %17
  %33 = phi i64 [ %.pre28, %26 ], [ %18, %17 ]
  %34 = phi i64 [ %.pre27, %26 ], [ %19, %17 ]
  %.2.1 = phi i64 [ %spec.select.1, %26 ], [ %.2, %17 ]
  %35 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 16), align 16, !tbaa !5
  %36 = add nsw i64 %35, %0
  %37 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 16), align 16, !tbaa !5
  %38 = add nsw i64 %37, %1
  %39 = icmp sgt i64 %36, -1
  %40 = icmp sgt i64 %38, -1
  %or.cond.not23.2 = select i1 %39, i1 %40, i1 false
  %.not.2 = icmp slt i64 %36, %34
  %or.cond19.2 = select i1 %or.cond.not23.2, i1 %.not.2, i1 false
  %.not18.2 = icmp slt i64 %38, %33
  %or.cond20.2 = select i1 %or.cond19.2, i1 %.not18.2, i1 false
  br i1 %or.cond20.2, label %41, label %47

41:                                               ; preds = %32
  %42 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %36) #1
  %43 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %42, i64 noundef %38)
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %45 = icmp eq i8 %44, 35
  %46 = zext i1 %45 to i64
  %spec.select.2 = add nuw nsw i64 %.2.1, %46
  %.pre29 = load i64, ptr @N, align 8
  %.pre30 = load i64, ptr @M, align 8
  br label %47

47:                                               ; preds = %41, %32
  %48 = phi i64 [ %.pre30, %41 ], [ %33, %32 ]
  %49 = phi i64 [ %.pre29, %41 ], [ %34, %32 ]
  %.2.2 = phi i64 [ %spec.select.2, %41 ], [ %.2.1, %32 ]
  %50 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 24), align 8, !tbaa !5
  %51 = add nsw i64 %50, %0
  %52 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 24), align 8, !tbaa !5
  %53 = add nsw i64 %52, %1
  %54 = icmp sgt i64 %51, -1
  %55 = icmp sgt i64 %53, -1
  %or.cond.not23.3 = select i1 %54, i1 %55, i1 false
  %.not.3 = icmp slt i64 %51, %49
  %or.cond19.3 = select i1 %or.cond.not23.3, i1 %.not.3, i1 false
  %.not18.3 = icmp slt i64 %53, %48
  %or.cond20.3 = select i1 %or.cond19.3, i1 %.not18.3, i1 false
  br i1 %or.cond20.3, label %56, label %62

56:                                               ; preds = %47
  %57 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %51) #1
  %58 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %57, i64 noundef %53)
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = icmp eq i8 %59, 35
  %61 = zext i1 %60 to i64
  %spec.select.3 = add nuw nsw i64 %.2.2, %61
  %.pre31 = load i64, ptr @N, align 8
  %.pre32 = load i64, ptr @M, align 8
  br label %62

62:                                               ; preds = %56, %47
  %63 = phi i64 [ %.pre32, %56 ], [ %48, %47 ]
  %64 = phi i64 [ %.pre31, %56 ], [ %49, %47 ]
  %.2.3 = phi i64 [ %spec.select.3, %56 ], [ %.2.2, %47 ]
  %65 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 32), align 16, !tbaa !5
  %66 = add nsw i64 %65, %0
  %67 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 32), align 16, !tbaa !5
  %68 = add nsw i64 %67, %1
  %69 = icmp sgt i64 %66, -1
  %70 = icmp sgt i64 %68, -1
  %or.cond.not23.4 = select i1 %69, i1 %70, i1 false
  %.not.4 = icmp slt i64 %66, %64
  %or.cond19.4 = select i1 %or.cond.not23.4, i1 %.not.4, i1 false
  %.not18.4 = icmp slt i64 %68, %63
  %or.cond20.4 = select i1 %or.cond19.4, i1 %.not18.4, i1 false
  br i1 %or.cond20.4, label %71, label %77

71:                                               ; preds = %62
  %72 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %66) #1
  %73 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %72, i64 noundef %68)
  %74 = load i8, ptr %73, align 1, !tbaa !9
  %75 = icmp eq i8 %74, 35
  %76 = zext i1 %75 to i64
  %spec.select.4 = add nuw nsw i64 %.2.3, %76
  %.pre33 = load i64, ptr @N, align 8
  %.pre34 = load i64, ptr @M, align 8
  br label %77

77:                                               ; preds = %71, %62
  %78 = phi i64 [ %.pre34, %71 ], [ %63, %62 ]
  %79 = phi i64 [ %.pre33, %71 ], [ %64, %62 ]
  %.2.4 = phi i64 [ %spec.select.4, %71 ], [ %.2.3, %62 ]
  %80 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 40), align 8, !tbaa !5
  %81 = add nsw i64 %80, %0
  %82 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 40), align 8, !tbaa !5
  %83 = add nsw i64 %82, %1
  %84 = icmp sgt i64 %81, -1
  %85 = icmp sgt i64 %83, -1
  %or.cond.not23.5 = select i1 %84, i1 %85, i1 false
  %.not.5 = icmp slt i64 %81, %79
  %or.cond19.5 = select i1 %or.cond.not23.5, i1 %.not.5, i1 false
  %.not18.5 = icmp slt i64 %83, %78
  %or.cond20.5 = select i1 %or.cond19.5, i1 %.not18.5, i1 false
  br i1 %or.cond20.5, label %86, label %92

86:                                               ; preds = %77
  %87 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %81) #1
  %88 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %87, i64 noundef %83)
  %89 = load i8, ptr %88, align 1, !tbaa !9
  %90 = icmp eq i8 %89, 35
  %91 = zext i1 %90 to i64
  %spec.select.5 = add nuw nsw i64 %.2.4, %91
  %.pre35 = load i64, ptr @N, align 8
  %.pre36 = load i64, ptr @M, align 8
  br label %92

92:                                               ; preds = %86, %77
  %93 = phi i64 [ %.pre36, %86 ], [ %78, %77 ]
  %94 = phi i64 [ %.pre35, %86 ], [ %79, %77 ]
  %.2.5 = phi i64 [ %spec.select.5, %86 ], [ %.2.4, %77 ]
  %95 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 48), align 16, !tbaa !5
  %96 = add nsw i64 %95, %0
  %97 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 48), align 16, !tbaa !5
  %98 = add nsw i64 %97, %1
  %99 = icmp sgt i64 %96, -1
  %100 = icmp sgt i64 %98, -1
  %or.cond.not23.6 = select i1 %99, i1 %100, i1 false
  %.not.6 = icmp slt i64 %96, %94
  %or.cond19.6 = select i1 %or.cond.not23.6, i1 %.not.6, i1 false
  %.not18.6 = icmp slt i64 %98, %93
  %or.cond20.6 = select i1 %or.cond19.6, i1 %.not18.6, i1 false
  br i1 %or.cond20.6, label %101, label %107

101:                                              ; preds = %92
  %102 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %96) #1
  %103 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %102, i64 noundef %98)
  %104 = load i8, ptr %103, align 1, !tbaa !9
  %105 = icmp eq i8 %104, 35
  %106 = zext i1 %105 to i64
  %spec.select.6 = add nuw nsw i64 %.2.5, %106
  %.pre37 = load i64, ptr @N, align 8
  %.pre38 = load i64, ptr @M, align 8
  br label %107

107:                                              ; preds = %101, %92
  %108 = phi i64 [ %.pre38, %101 ], [ %93, %92 ]
  %109 = phi i64 [ %.pre37, %101 ], [ %94, %92 ]
  %.2.6 = phi i64 [ %spec.select.6, %101 ], [ %.2.5, %92 ]
  %110 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 56), align 8, !tbaa !5
  %111 = add nsw i64 %110, %0
  %112 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 56), align 8, !tbaa !5
  %113 = add nsw i64 %112, %1
  %114 = icmp sgt i64 %111, -1
  %115 = icmp sgt i64 %113, -1
  %or.cond.not23.7 = select i1 %114, i1 %115, i1 false
  %.not.7 = icmp slt i64 %111, %109
  %or.cond19.7 = select i1 %or.cond.not23.7, i1 %.not.7, i1 false
  %.not18.7 = icmp slt i64 %113, %108
  %or.cond20.7 = select i1 %or.cond19.7, i1 %.not18.7, i1 false
  br i1 %or.cond20.7, label %116, label %122

116:                                              ; preds = %107
  %117 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1bB5cxx11, i64 noundef %111) #1
  %118 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %117, i64 noundef %113)
  %119 = load i8, ptr %118, align 1, !tbaa !9
  %120 = icmp eq i8 %119, 35
  %121 = zext i1 %120 to i64
  %spec.select.7 = add nuw nsw i64 %.2.6, %121
  br label %122

122:                                              ; preds = %116, %107
  %.2.7 = phi i64 [ %spec.select.7, %116 ], [ %.2.6, %107 ]
  ret i64 %.2.7
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), 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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass