; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics (LargeIslandSplitter)

; 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.JPH::LargeIslandSplitter" = type <{ i32, [4 x i8], ptr, ptr, ptr, i32, %"struct.std::atomic.0", i32, [4 x i8], ptr, %"struct.std::atomic.0", [4 x i8] }>
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i32 }
%"class.JPH::LargeIslandSplitter::Splits" = type <{ [32 x %"struct.JPH::LargeIslandSplitter::Split"], i32, i32, i32, i32, i32, [4 x i8], %"struct.std::atomic", %"struct.std::atomic.0", [4 x i8] }>
%"struct.JPH::LargeIslandSplitter::Split" = type { i32, i32, i32, i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }

; 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
declare dso_local noundef i32 @_ZN3JPH19LargeIslandSplitter6Splits14FetchNextBatchERjS2_S2_S2_Rb(ptr noundef nonnull align 8 dereferenceable(548), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3JPH19LargeIslandSplitter14FetchNextBatchERjRPjS3_S3_S3_Rb(ptr noundef nonnull align 8 dereferenceable(60) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6) #1 align 2 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %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 i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %24 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %25 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 10
  %26 = call noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %25, i32 noundef 2) #3
  store i32 %26, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  %27 = load i32, ptr %16, align 4, !tbaa !9
  %28 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 7
  %29 = load i32, ptr %28, align 8, !tbaa !11
  %30 = icmp eq i32 %27, %29
  %31 = zext i1 %30 to i8
  store i8 %31, ptr %17, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %32 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 9
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  store ptr %33, ptr %22, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %83, %7
  %35 = load ptr, ptr %22, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 9
  %37 = load ptr, ptr %36, align 8, !tbaa !17
  %38 = load i32, ptr %16, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %37, i64 %39
  %41 = icmp ult ptr %35, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %34
  store i32 2, ptr %23, align 4
  br label %86

43:                                               ; preds = %34
  %44 = load ptr, ptr %22, align 8, !tbaa !5
  %45 = load ptr, ptr %15, align 8, !tbaa !5
  %46 = call noundef i32 @_ZN3JPH19LargeIslandSplitter6Splits14FetchNextBatchERjS2_S2_S2_Rb(ptr noundef nonnull align 8 dereferenceable(548) %44, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 1 dereferenceable(1) %45)
  switch i32 %46, label %82 [
    i32 2, label %82
    i32 0, label %47
    i32 1, label %48
  ]

47:                                               ; preds = %43
  store i8 0, ptr %17, align 1, !tbaa !15
  br label %82

48:                                               ; preds = %43
  %49 = load ptr, ptr %22, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 9
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  %52 = ptrtoint ptr %49 to i64
  %53 = ptrtoint ptr %51 to i64
  %54 = sub i64 %52, %53
  %55 = sdiv exact i64 %54, 552
  %56 = trunc i64 %55 to i32
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %56, ptr %57, align 4, !tbaa !9
  %58 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = load i32, ptr %18, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %59, i64 %61
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %62, ptr %63, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  %66 = load i32, ptr %19, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %68, ptr %69, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = load i32, ptr %20, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds i32, ptr %71, i64 %73
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %74, ptr %75, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %24, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = load i32, ptr %21, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %80, ptr %81, align 8, !tbaa !5
  store i32 1, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %86

82:                                               ; preds = %47, %43, %43
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %84, i32 1
  store ptr %85, ptr %22, align 8, !tbaa !5
  br label %34, !llvm.loop !19

86:                                               ; preds = %48, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  %87 = load i32, ptr %23, align 4
  switch i32 %87, label %93 [
    i32 2, label %88
  ]

88:                                               ; preds = %86
  %89 = load i8, ptr %17, align 1, !tbaa !15, !range !21, !noundef !22
  %90 = trunc i8 %89 to i1
  %91 = zext i1 %90 to i64
  %92 = select i1 %90, i32 2, i32 0
  store i32 %92, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %93

93:                                               ; preds = %88, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  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 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  %94 = load i32, ptr %8, align 4
  ret i32 %94
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #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 = { alwaysinline 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}
!11 = !{!12, !10, i64 40}
!12 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !13, i64 36, !10, i64 40, !6, i64 48, !13, i64 56}
!13 = !{!"_ZTSSt6atomicIjE", !14, i64 0}
!14 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!12, !6, i64 48}
!18 = !{!12, !6, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{i8 0, i8 2}
!22 = !{}


; 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.JPH::LargeIslandSplitter::Splits" = type <{ [32 x %"struct.JPH::LargeIslandSplitter::Split"], i32, i32, i32, i32, i32, [4 x i8], %"struct.std::atomic", %"struct.std::atomic.0", [4 x i8] }>
%"struct.JPH::LargeIslandSplitter::Split" = type { i32, i32, i32, i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i32 }

; 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
declare dso_local noundef i32 @_ZN3JPH19LargeIslandSplitter6Splits14FetchNextBatchERjS2_S2_S2_Rb(ptr noundef nonnull align 8 dereferenceable(548), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 3) i32 @_ZN3JPH19LargeIslandSplitter14FetchNextBatchERjRPjS3_S3_S3_Rb(ptr noundef nonnull align 8 dereferenceable(60) %0, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %3, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %4, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6) local_unnamed_addr #1 align 2 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = tail call noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 noundef 2) #3
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = icmp eq i32 %13, %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  %17 = getelementptr inbounds i8, ptr %0, i64 48
  %18 = zext i32 %13 to i64
  %.not21.not = icmp eq i32 %13, 0
  br i1 %.not21.not, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %7
  %19 = load ptr, ptr %17, align 8, !tbaa !13
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %.01523 = phi ptr [ %47, %46 ], [ %19, %.lr.ph.preheader ]
  %.01622 = phi i1 [ %.1, %46 ], [ %16, %.lr.ph.preheader ]
  %20 = call noundef i32 @_ZN3JPH19LargeIslandSplitter6Splits14FetchNextBatchERjS2_S2_S2_Rb(ptr noundef nonnull align 8 dereferenceable(548) %.01523, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(1) %6)
  switch i32 %20, label %46 [
    i32 1, label %22
    i32 0, label %21
  ]

21:                                               ; preds = %.lr.ph
  br label %46

22:                                               ; preds = %.lr.ph
  %23 = load ptr, ptr %17, align 8, !tbaa !13
  %24 = ptrtoint ptr %.01523 to i64
  %25 = ptrtoint ptr %23 to i64
  %26 = sub i64 %24, %25
  %27 = sdiv exact i64 %26, 552
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %1, align 4, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = load i32, ptr %8, align 4, !tbaa !14
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %30, i64 %32
  store ptr %33, ptr %2, align 8, !tbaa !16
  %34 = load ptr, ptr %29, align 8, !tbaa !15
  %35 = load i32, ptr %9, align 4, !tbaa !14
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %34, i64 %36
  store ptr %37, ptr %3, align 8, !tbaa !16
  %38 = load ptr, ptr %29, align 8, !tbaa !15
  %39 = load i32, ptr %10, align 4, !tbaa !14
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %38, i64 %40
  store ptr %41, ptr %4, align 8, !tbaa !16
  %42 = load ptr, ptr %29, align 8, !tbaa !15
  %43 = load i32, ptr %11, align 4, !tbaa !14
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %42, i64 %44
  store ptr %45, ptr %5, align 8, !tbaa !16
  br label %51

46:                                               ; preds = %.lr.ph, %21
  %.1 = phi i1 [ %.01622, %.lr.ph ], [ false, %21 ]
  %47 = getelementptr inbounds i8, ptr %.01523, i64 552
  %48 = load ptr, ptr %17, align 8, !tbaa !13
  %49 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %48, i64 %18
  %.not = icmp ult ptr %47, %49
  br i1 %.not, label %.lr.ph, label %.critedge, !llvm.loop !17

.critedge:                                        ; preds = %46, %7
  %.016.lcssa = phi i1 [ %16, %7 ], [ %.1, %46 ]
  %50 = select i1 %.016.lcssa, i32 2, i32 0
  br label %51

51:                                               ; preds = %22, %.critedge
  %.118 = phi i32 [ %50, %.critedge ], [ 1, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  ret i32 %.118
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt13__atomic_baseIjE4loadESt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) 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 = { alwaysinline 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, !7, i64 40}
!6 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !11, i64 36, !7, i64 40, !10, i64 48, !11, i64 56}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSSt6atomicIjE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIjE", !7, i64 0}
!13 = !{!6, !10, i64 48}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !10, i64 24}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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