; LLVM IR from libxsmm/libxsmm :: src (generator_common_aarch64)

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

@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [291 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_generator_prepare_coeffs_sigmoid_ps_rational_78_aarch64_asimd = external hidden unnamed_addr constant [400 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @libxsmm_aarch64_instruction_broadcast_scalar_to_vec_asimd(ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @libxsmm_generator_prepare_coeffs_tanh_ps_rational_78_aarch64_asimd(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_prepare_coeffs_sigmoid_ps_rational_78_aarch64_asimd(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12, i32 noundef %13, i32 noundef %14) #2 {
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  store ptr %0, ptr %16, align 8, !tbaa !5
  store i32 %1, ptr %17, align 4, !tbaa !9
  store i32 %2, ptr %18, align 4, !tbaa !9
  store i32 %3, ptr %19, align 4, !tbaa !9
  store i32 %4, ptr %20, align 4, !tbaa !9
  store i32 %5, ptr %21, align 4, !tbaa !9
  store i32 %6, ptr %22, align 4, !tbaa !9
  store i32 %7, ptr %23, align 4, !tbaa !9
  store i32 %8, ptr %24, align 4, !tbaa !9
  store i32 %9, ptr %25, align 4, !tbaa !9
  store i32 %10, ptr %26, align 4, !tbaa !9
  store i32 %11, ptr %27, align 4, !tbaa !9
  store i32 %12, ptr %28, align 4, !tbaa !9
  store i32 %13, ptr %29, align 4, !tbaa !9
  store i32 %14, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  store i64 1056964608, ptr %31, align 8, !tbaa !11
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  %33 = load i32, ptr %28, align 4, !tbaa !9
  %34 = trunc i32 %33 to i8
  %35 = zext i8 %34 to i32
  %36 = icmp eq i32 0, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %15
  %38 = load i32, ptr %28, align 4, !tbaa !9
  %39 = trunc i32 %38 to i8
  %40 = zext i8 %39 to i32
  %41 = icmp slt i32 0, %40
  br i1 %41, label %42, label %60

42:                                               ; preds = %37, %15
  %43 = load i32, ptr %28, align 4, !tbaa !9
  %44 = zext i32 %43 to i64
  %45 = mul i64 1, %44
  %46 = icmp ult i64 %45, 255
  br i1 %46, label %47, label %51

47:                                               ; preds = %42
  %48 = load i32, ptr %28, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = mul i64 1, %49
  br label %52

51:                                               ; preds = %42
  br label %52

52:                                               ; preds = %51, %47
  %53 = phi i64 [ %50, %47 ], [ 255, %51 ]
  %54 = icmp ule i64 %53, 255
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load i32, ptr %28, align 4, !tbaa !9
  %57 = uitofp i32 %56 to double
  %58 = fcmp ole double 0.000000e+00, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %55
  br label %61

60:                                               ; preds = %55, %52, %37
  call void @__assert_fail(ptr noundef @.str.35, ptr noundef @.str.1, i32 noundef 3849, ptr noundef @__PRETTY_FUNCTION__.libxsmm_generator_prepare_coeffs_sigmoid_ps_rational_78_aarch64_asimd) #4
  unreachable

61:                                               ; preds = %59
  %62 = load i32, ptr %28, align 4, !tbaa !9
  %63 = trunc i32 %62 to i8
  %64 = load i32, ptr %29, align 4, !tbaa !9
  %65 = load i32, ptr %30, align 4, !tbaa !9
  %66 = load i64, ptr %31, align 8, !tbaa !11
  call void @libxsmm_aarch64_instruction_broadcast_scalar_to_vec_asimd(ptr noundef %32, i8 noundef zeroext %63, i32 noundef %64, i32 noundef %65, i64 noundef %66)
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = load i32, ptr %17, align 4, !tbaa !9
  %69 = load i32, ptr %18, align 4, !tbaa !9
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = load i32, ptr %20, align 4, !tbaa !9
  %72 = load i32, ptr %21, align 4, !tbaa !9
  %73 = load i32, ptr %22, align 4, !tbaa !9
  %74 = load i32, ptr %23, align 4, !tbaa !9
  %75 = load i32, ptr %24, align 4, !tbaa !9
  %76 = load i32, ptr %25, align 4, !tbaa !9
  %77 = load i32, ptr %26, align 4, !tbaa !9
  %78 = load i32, ptr %27, align 4, !tbaa !9
  %79 = load i32, ptr %29, align 4, !tbaa !9
  %80 = load i32, ptr %30, align 4, !tbaa !9
  call void @libxsmm_generator_prepare_coeffs_tanh_ps_rational_78_aarch64_asimd(ptr noundef %67, i32 noundef %68, i32 noundef %69, i32 noundef %70, i32 noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74, i32 noundef %75, i32 noundef %76, i32 noundef %77, i32 noundef %78, i32 noundef %79, i32 noundef %80)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #2 = { 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 }
attributes #4 = { noreturn 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !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"

; Function Attrs: nounwind uwtable
declare dso_local void @libxsmm_aarch64_instruction_broadcast_scalar_to_vec_asimd(ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_prepare_coeffs_sigmoid_ps_rational_78_aarch64_asimd(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12, i32 noundef %13, i32 noundef %14) local_unnamed_addr #0 {
  %16 = trunc i32 %12 to i8
  tail call void @libxsmm_aarch64_instruction_broadcast_scalar_to_vec_asimd(ptr noundef %0, i8 noundef zeroext %16, i32 noundef %13, i32 noundef %14, i64 noundef 1056964608)
  tail call void @libxsmm_generator_prepare_coeffs_tanh_ps_rational_78_aarch64_asimd(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %13, i32 noundef %14)
  ret void
}

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

!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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass