; LLVM IR from Hunterdii/GeeksforGeeks-POTD :: April 2025 GFG SOLUTION (April-26)

; 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.Node = type { i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @createQueue(i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @isEmpty(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @enqueue(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @dequeue(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @front(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @newNode(i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local ptr @buildTree(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [100000 x ptr], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call i64 @strlen(ptr noundef %13) #5
  %15 = icmp eq i64 %14, 0
  br i1 %15, label %22, label %16

16:                                               ; preds = %1
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 0
  %19 = load i8, ptr %18, align 1, !tbaa !9
  %20 = sext i8 %19 to i32
  %21 = icmp eq i32 %20, 78
  br i1 %21, label %22, label %23

22:                                               ; preds = %16, %1
  store ptr null, ptr %2, align 8
  br label %109

23:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call ptr @strtok(ptr noundef %24, ptr noundef @.str) #6
  store ptr %25, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 800000, ptr %6) #6
  br label %26

26:                                               ; preds = %29, %23
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %36

29:                                               ; preds = %26
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !10
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %5, align 4, !tbaa !10
  %33 = sext i32 %31 to i64
  %34 = getelementptr inbounds [100000 x ptr], ptr %6, i64 0, i64 %33
  store ptr %30, ptr %34, align 8, !tbaa !5
  %35 = call ptr @strtok(ptr noundef null, ptr noundef @.str) #6
  store ptr %35, ptr %4, align 8, !tbaa !5
  br label %26, !llvm.loop !12

36:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %37 = getelementptr inbounds [100000 x ptr], ptr %6, i64 0, i64 0
  %38 = load ptr, ptr %37, align 16, !tbaa !5
  %39 = call i32 @atoi(ptr noundef %38) #5
  %40 = call ptr @newNode(i32 noundef %39)
  store ptr %40, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %41 = load i32, ptr %5, align 4, !tbaa !10
  %42 = call ptr @createQueue(i32 noundef %41)
  store ptr %42, ptr %8, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  call void @enqueue(ptr noundef %43, ptr noundef %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !10
  br label %45

45:                                               ; preds = %106, %36
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = call i32 @isEmpty(ptr noundef %46)
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %53, label %49

49:                                               ; preds = %45
  %50 = load i32, ptr %9, align 4, !tbaa !10
  %51 = load i32, ptr %5, align 4, !tbaa !10
  %52 = icmp slt i32 %50, %51
  br label %53

53:                                               ; preds = %49, %45
  %54 = phi i1 [ false, %45 ], [ %52, %49 ]
  br i1 %54, label %55, label %107

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = call ptr @front(ptr noundef %56)
  store ptr %57, ptr %10, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  call void @dequeue(ptr noundef %58)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %59 = load i32, ptr %9, align 4, !tbaa !10
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100000 x ptr], ptr %6, i64 0, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  store ptr %62, ptr %11, align 8, !tbaa !5
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = call i32 @strcmp(ptr noundef %63, ptr noundef @.str.1) #5
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %76

66:                                               ; preds = %55
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = call i32 @atoi(ptr noundef %67) #5
  %69 = call ptr @newNode(i32 noundef %68)
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.Node, ptr %70, i32 0, i32 1
  store ptr %69, ptr %71, align 8, !tbaa !14
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.Node, ptr %73, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  call void @enqueue(ptr noundef %72, ptr noundef %75)
  br label %76

76:                                               ; preds = %66, %55
  %77 = load i32, ptr %9, align 4, !tbaa !10
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %9, align 4, !tbaa !10
  %79 = load i32, ptr %9, align 4, !tbaa !10
  %80 = load i32, ptr %5, align 4, !tbaa !10
  %81 = icmp sge i32 %79, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %76
  store i32 5, ptr %12, align 4
  br label %104

83:                                               ; preds = %76
  %84 = load i32, ptr %9, align 4, !tbaa !10
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100000 x ptr], ptr %6, i64 0, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  store ptr %87, ptr %11, align 8, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = call i32 @strcmp(ptr noundef %88, ptr noundef @.str.1) #5
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %101

91:                                               ; preds = %83
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = call i32 @atoi(ptr noundef %92) #5
  %94 = call ptr @newNode(i32 noundef %93)
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.Node, ptr %95, i32 0, i32 2
  store ptr %94, ptr %96, align 8, !tbaa !16
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Node, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !16
  call void @enqueue(ptr noundef %97, ptr noundef %100)
  br label %101

101:                                              ; preds = %91, %83
  %102 = load i32, ptr %9, align 4, !tbaa !10
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %9, align 4, !tbaa !10
  store i32 0, ptr %12, align 4
  br label %104

104:                                              ; preds = %101, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %105 = load i32, ptr %12, align 4
  switch i32 %105, label %111 [
    i32 0, label %106
    i32 5, label %107
  ]

106:                                              ; preds = %104
  br label %45, !llvm.loop !17

107:                                              ; preds = %104, %53
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %108, ptr %2, align 8
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 800000, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %109

109:                                              ; preds = %107, %22
  %110 = load ptr, ptr %2, align 8
  ret ptr %110

111:                                              ; preds = %104
  unreachable
}

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strtok(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind willreturn memory(read) "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 = { inlinehint nounwind willreturn memory(read) 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 willreturn memory(read) }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 8}
!15 = !{!"Node", !11, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!15, !6, i64 16}
!17 = distinct !{!17, !13}


; 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"

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @createQueue(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @isEmpty(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @enqueue(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @dequeue(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @front(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @newNode(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @buildTree(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [100000 x ptr], align 16
  %char0 = load i8, ptr %0, align 1
  switch i8 %char0, label %3 [
    i8 0, label %37
    i8 78, label %37
  ]

3:                                                ; preds = %1
  %4 = tail call ptr @strtok(ptr noundef nonnull %0, ptr noundef nonnull @.str) #6
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %2) #6
  %.not45 = icmp ne ptr %4, null
  tail call void @llvm.assume(i1 %.not45)
  br label %.lr.ph

.lr.ph:                                           ; preds = %3, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %3 ]
  %.03447 = phi ptr [ %6, %.lr.ph ], [ %4, %3 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %5 = getelementptr inbounds [100000 x ptr], ptr %2, i64 0, i64 %indvars.iv
  store ptr %.03447, ptr %5, align 8, !tbaa !5
  %6 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #6
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !9

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %7 = trunc nuw i64 %indvars.iv.next to i32
  %.pre = load ptr, ptr %2, align 16, !tbaa !5
  %8 = tail call i32 @atoi(ptr nocapture noundef %.pre) #7
  %9 = tail call ptr @newNode(i32 noundef %8)
  %10 = tail call ptr @createQueue(i32 noundef %7)
  tail call void @enqueue(ptr noundef %10, ptr noundef %9)
  %11 = tail call i32 @isEmpty(ptr noundef %10)
  %.not3848 = icmp eq i32 %11, 0
  %12 = icmp ne i64 %indvars.iv, 0
  %13 = and i1 %.not3848, %12
  br i1 %13, label %.lr.ph51.preheader, label %.thread

.lr.ph51.preheader:                               ; preds = %._crit_edge.loopexit
  %14 = and i64 %indvars.iv.next, 4294967295
  br label %.lr.ph51

.lr.ph51:                                         ; preds = %.lr.ph51.preheader, %33
  %indvars.iv54 = phi i64 [ 1, %.lr.ph51.preheader ], [ %indvars.iv.next55, %33 ]
  %15 = tail call ptr @front(ptr noundef %10)
  tail call void @dequeue(ptr noundef %10)
  %16 = getelementptr inbounds [100000 x ptr], ptr %2, i64 0, i64 %indvars.iv54
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.1) #7
  %.not39 = icmp eq i32 %18, 0
  br i1 %.not39, label %23, label %19

19:                                               ; preds = %.lr.ph51
  %20 = tail call i32 @atoi(ptr nocapture noundef %17) #7
  %21 = tail call ptr @newNode(i32 noundef %20)
  %22 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %21, ptr %22, align 8, !tbaa !11
  tail call void @enqueue(ptr noundef %10, ptr noundef %21)
  br label %23

23:                                               ; preds = %19, %.lr.ph51
  %24 = add nuw nsw i64 %indvars.iv54, 1
  %.not40 = icmp ult i64 %24, %14
  br i1 %.not40, label %25, label %.thread

25:                                               ; preds = %23
  %26 = getelementptr inbounds [100000 x ptr], ptr %2, i64 0, i64 %24
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) @.str.1) #7
  %.not41 = icmp eq i32 %28, 0
  br i1 %.not41, label %33, label %29

29:                                               ; preds = %25
  %30 = tail call i32 @atoi(ptr nocapture noundef %27) #7
  %31 = tail call ptr @newNode(i32 noundef %30)
  %32 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %31, ptr %32, align 8, !tbaa !14
  tail call void @enqueue(ptr noundef %10, ptr noundef %31)
  br label %33

33:                                               ; preds = %25, %29
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 2
  %34 = tail call i32 @isEmpty(ptr noundef %10)
  %.not38 = icmp eq i32 %34, 0
  %35 = icmp ult i64 %indvars.iv.next55, %14
  %36 = select i1 %.not38, i1 %35, i1 false
  br i1 %36, label %.lr.ph51, label %.thread

.thread:                                          ; preds = %33, %23, %._crit_edge.loopexit
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %2) #6
  br label %37

37:                                               ; preds = %1, %1, %.thread
  %.032 = phi ptr [ %9, %.thread ], [ null, %1 ], [ null, %1 ]
  ret ptr %.032
}

; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #5

attributes #0 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn "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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 8}
!12 = !{!"Node", !13, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !6, i64 16}


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