; LLVM IR from NervanaSystems/ngraph :: src/ngraph (coordinate_transform)

; 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.ngraph::CoordinateTransform" = type { %"class.ngraph::Shape", %"class.ngraph::Coordinate", %"class.ngraph::Coordinate", %"class.ngraph::Strides", %"class.ngraph::AxisVector", %"class.ngraph::CoordinateDiff", %"class.ngraph::CoordinateDiff", %"class.ngraph::Strides", %"class.ngraph::Shape", i64, %"class.ngraph::CoordinateTransform::Iterator" }
%"class.ngraph::Coordinate" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::AxisVector" = type { %"class.std::vector" }
%"class.ngraph::CoordinateDiff" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Strides" = type { %"class.std::vector" }
%"class.ngraph::Shape" = type { %"class.std::vector" }
%"class.ngraph::CoordinateTransform::Iterator" = type <{ %"class.ngraph::Shape", %"class.ngraph::Shape", %"class.ngraph::Coordinate", i8, i8, [6 x i8] }>

@_ZTISt12domain_error = external constant ptr
@.str.12 = external hidden unnamed_addr constant [68 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt12domain_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt12domain_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6ngraph19CoordinateTransform21has_source_coordinateERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  %18 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 9
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = icmp ne i64 %17, %19
  br i1 %20, label %21, label %28

21:                                               ; preds = %2
  %22 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt12domain_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef @.str.12)
          to label %23 unwind label %24

23:                                               ; preds = %21
  call void @__cxa_throw(ptr %22, ptr @_ZTISt12domain_error, ptr @_ZNSt12domain_errorD1Ev) #6
  unreachable

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %6, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %7, align 4
  call void @__cxa_free_exception(ptr %22) #5
  br label %123

28:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !27
  br label %29

29:                                               ; preds = %115, %28
  %30 = load i64, ptr %8, align 8, !tbaa !27
  %31 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 9
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  store i32 2, ptr %9, align 4
  br label %118

35:                                               ; preds = %29
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load i64, ptr %8, align 8, !tbaa !27
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %37) #5
  %39 = load i64, ptr %38, align 8, !tbaa !27
  %40 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 8
  %41 = load i64, ptr %8, align 8, !tbaa !27
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #5
  %43 = load i64, ptr %42, align 8, !tbaa !27
  %44 = icmp uge i64 %39, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %35
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %118

46:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %47 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 4
  %48 = load i64, ptr %8, align 8, !tbaa !27
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48) #5
  %50 = load i64, ptr %49, align 8, !tbaa !27
  store i64 %50, ptr %10, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load i64, ptr %8, align 8, !tbaa !27
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %52) #5
  %54 = load i64, ptr %53, align 8, !tbaa !27
  store i64 %54, ptr %11, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %55 = load i64, ptr %11, align 8, !tbaa !27
  %56 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 3
  %57 = load i64, ptr %10, align 8, !tbaa !27
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %57) #5
  %59 = load i64, ptr %58, align 8, !tbaa !27
  %60 = mul i64 %55, %59
  store i64 %60, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %61 = load i64, ptr %12, align 8, !tbaa !27
  %62 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 1
  %63 = load i64, ptr %10, align 8, !tbaa !27
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %63) #5
  %65 = load i64, ptr %64, align 8, !tbaa !27
  %66 = add i64 %61, %65
  store i64 %66, ptr %13, align 8, !tbaa !27
  %67 = load i64, ptr %13, align 8, !tbaa !27
  %68 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 5
  %69 = load i64, ptr %8, align 8, !tbaa !27
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %69) #5
  %71 = load i64, ptr %70, align 8, !tbaa !27
  %72 = icmp slt i64 %67, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %46
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %112

74:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %75 = load i64, ptr %13, align 8, !tbaa !27
  %76 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 5
  %77 = load i64, ptr %8, align 8, !tbaa !27
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %77) #5
  %79 = load i64, ptr %78, align 8, !tbaa !27
  %80 = sub nsw i64 %75, %79
  store i64 %80, ptr %14, align 8, !tbaa !27
  %81 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 0
  %82 = load i64, ptr %10, align 8, !tbaa !27
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %82) #5
  %84 = load i64, ptr %83, align 8, !tbaa !27
  %85 = icmp eq i64 %84, 0
  br i1 %85, label %100, label %86

86:                                               ; preds = %74
  %87 = load i64, ptr %14, align 8, !tbaa !27
  %88 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 0
  %89 = load i64, ptr %10, align 8, !tbaa !27
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %89) #5
  %91 = load i64, ptr %90, align 8, !tbaa !27
  %92 = sub nsw i64 %91, 1
  %93 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 7
  %94 = load i64, ptr %8, align 8, !tbaa !27
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %94) #5
  %96 = load i64, ptr %95, align 8, !tbaa !27
  %97 = mul nsw i64 %92, %96
  %98 = add nsw i64 %97, 1
  %99 = icmp sge i64 %87, %98
  br i1 %99, label %100, label %101

100:                                              ; preds = %86, %74
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %111

101:                                              ; preds = %86
  %102 = load i64, ptr %14, align 8, !tbaa !27
  %103 = getelementptr inbounds %"class.ngraph::CoordinateTransform", ptr %15, i32 0, i32 7
  %104 = load i64, ptr %8, align 8, !tbaa !27
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %104) #5
  %106 = load i64, ptr %105, align 8, !tbaa !27
  %107 = urem i64 %102, %106
  %108 = icmp ne i64 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %101
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %111

110:                                              ; preds = %101
  store i32 0, ptr %9, align 4
  br label %111

111:                                              ; preds = %110, %109, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %112

112:                                              ; preds = %111, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %113 = load i32, ptr %9, align 4
  switch i32 %113, label %118 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114
  %116 = load i64, ptr %8, align 8, !tbaa !27
  %117 = add i64 %116, 1
  store i64 %117, ptr %8, align 8, !tbaa !27
  br label %29, !llvm.loop !28

118:                                              ; preds = %112, %45, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %119 = load i32, ptr %9, align 4
  switch i32 %119, label %128 [
    i32 2, label %120
    i32 1, label %121
  ]

120:                                              ; preds = %118
  store i1 true, ptr %3, align 1
  br label %121

121:                                              ; preds = %120, %118
  %122 = load i1, ptr %3, align 1
  ret i1 %122

123:                                              ; preds = %24
  %124 = load ptr, ptr %6, align 8
  %125 = load i32, ptr %7, align 4
  %126 = insertvalue { ptr, i32 } poison, ptr %124, 0
  %127 = insertvalue { ptr, i32 } %126, i32 %125, 1
  resume { ptr, i32 } %127

128:                                              ; preds = %118
  unreachable
}

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 = { "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 "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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn }

!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, !24, i64 216}
!10 = !{!"_ZTSN6ngraph19CoordinateTransformE", !11, i64 0, !16, i64 24, !16, i64 48, !17, i64 72, !18, i64 96, !19, i64 120, !19, i64 144, !17, i64 168, !11, i64 192, !24, i64 216, !25, i64 224}
!11 = !{!"_ZTSN6ngraph5ShapeE", !12, i64 0}
!12 = !{!"_ZTSSt6vectorImSaImEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseImSaImEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSN6ngraph10CoordinateE", !12, i64 0}
!17 = !{!"_ZTSN6ngraph7StridesE", !12, i64 0}
!18 = !{!"_ZTSN6ngraph10AxisVectorE", !12, i64 0}
!19 = !{!"_ZTSN6ngraph14CoordinateDiffE", !20, i64 0}
!20 = !{!"_ZTSSt6vectorIlSaIlEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIlSaIlEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN6ngraph19CoordinateTransform8IteratorE", !11, i64 0, !11, i64 24, !16, i64 48, !26, i64 72, !26, i64 73}
!26 = !{!"bool", !7, i64 0}
!27 = !{!24, !24, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"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"

@_ZTISt12domain_error = external constant ptr
@.str.12 = external hidden unnamed_addr constant [68 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt12domain_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt12domain_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6ngraph19CoordinateTransform21has_source_coordinateERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %4 = getelementptr inbounds i8, ptr %0, i64 216
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i64 %3, %5
  br i1 %.not, label %.preheader, label %13

.preheader:                                       ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 96
  %7 = icmp eq i64 %3, 0
  br i1 %7, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  %12 = getelementptr inbounds i8, ptr %0, i64 168
  br label %21

13:                                               ; preds = %2
  %14 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt12domain_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull @.str.12)
          to label %15 unwind label %16

15:                                               ; preds = %13
  tail call void @__cxa_throw(ptr nonnull %14, ptr nonnull @_ZTISt12domain_error, ptr nonnull @_ZNSt12domain_errorD1Ev) #5
  unreachable

16:                                               ; preds = %13
  %17 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %14) #4
  resume { ptr, i32 } %17

18:                                               ; preds = %54
  %19 = add nuw i64 %.02839, 1
  %20 = load i64, ptr %4, align 8, !tbaa !5
  %.not50 = icmp ult i64 %19, %20
  br i1 %.not50, label %21, label %.thread, !llvm.loop !26

21:                                               ; preds = %.lr.ph, %18
  %.02839 = phi i64 [ 0, %.lr.ph ], [ %19, %18 ]
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02839) #4
  %23 = load i64, ptr %22, align 8, !tbaa !28
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.02839) #4
  %25 = load i64, ptr %24, align 8, !tbaa !28
  %.not34 = icmp ult i64 %23, %25
  br i1 %.not34, label %26, label %.thread

26:                                               ; preds = %21
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.02839) #4
  %28 = load i64, ptr %27, align 8, !tbaa !28
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02839) #4
  %30 = load i64, ptr %29, align 8, !tbaa !28
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %28) #4
  %32 = load i64, ptr %31, align 8, !tbaa !28
  %33 = mul i64 %32, %30
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %28) #4
  %35 = load i64, ptr %34, align 8, !tbaa !28
  %36 = add i64 %35, %33
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.02839) #4
  %38 = load i64, ptr %37, align 8, !tbaa !28
  %39 = icmp slt i64 %36, %38
  br i1 %39, label %.thread, label %40

40:                                               ; preds = %26
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.02839) #4
  %42 = load i64, ptr %41, align 8, !tbaa !28
  %43 = sub nsw i64 %36, %42
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28) #4
  %45 = load i64, ptr %44, align 8, !tbaa !28
  %46 = icmp eq i64 %45, 0
  br i1 %46, label %.thread, label %47

47:                                               ; preds = %40
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28) #4
  %49 = load i64, ptr %48, align 8, !tbaa !28
  %50 = add nsw i64 %49, -1
  %51 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.02839) #4
  %52 = load i64, ptr %51, align 8, !tbaa !28
  %53 = mul nsw i64 %52, %50
  %.not35.not = icmp sgt i64 %43, %53
  br i1 %.not35.not, label %.thread, label %54

54:                                               ; preds = %47
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.02839) #4
  %56 = load i64, ptr %55, align 8, !tbaa !28
  %57 = urem i64 %43, %56
  %.not36 = icmp eq i64 %57, 0
  br i1 %.not36, label %18, label %.thread

.thread:                                          ; preds = %18, %21, %26, %47, %40, %54, %.preheader
  %.lcssa = phi i1 [ true, %.preheader ], [ false, %54 ], [ false, %40 ], [ false, %47 ], [ false, %26 ], [ false, %21 ], [ true, %18 ]
  ret i1 %.lcssa
}

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 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nounwind }
attributes #5 = { noreturn }

!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, !23, i64 216}
!6 = !{!"_ZTSN6ngraph19CoordinateTransformE", !7, i64 0, !15, i64 24, !15, i64 48, !16, i64 72, !17, i64 96, !18, i64 120, !18, i64 144, !16, i64 168, !7, i64 192, !23, i64 216, !24, i64 224}
!7 = !{!"_ZTSN6ngraph5ShapeE", !8, i64 0}
!8 = !{!"_ZTSSt6vectorImSaImEE", !9, i64 0}
!9 = !{!"_ZTSSt12_Vector_baseImSaImEE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !11, i64 0}
!11 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"_ZTSN6ngraph10CoordinateE", !8, i64 0}
!16 = !{!"_ZTSN6ngraph7StridesE", !8, i64 0}
!17 = !{!"_ZTSN6ngraph10AxisVectorE", !8, i64 0}
!18 = !{!"_ZTSN6ngraph14CoordinateDiffE", !19, i64 0}
!19 = !{!"_ZTSSt6vectorIlSaIlEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIlSaIlEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!"long", !13, i64 0}
!24 = !{!"_ZTSN6ngraph19CoordinateTransform8IteratorE", !7, i64 0, !7, i64 24, !15, i64 48, !25, i64 72, !25, i64 73}
!25 = !{!"bool", !13, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!23, !23, i64 0}


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