; LLVM IR from siavashserver/neonrvm :: neonrvm (neonrvm_create_param)

; 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.neonrvm_param = type { i64, double, double, double, double, double, i64 }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__.neonrvm_create_param = external hidden unnamed_addr constant [91 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @is_finite(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @nmalloc(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @neonrvm_create_param(ptr noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, i64 noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store double %1, ptr %9, align 8, !tbaa !9
  store double %2, ptr %10, align 8, !tbaa !9
  store double %3, ptr %11, align 8, !tbaa !9
  store double %4, ptr %12, align 8, !tbaa !9
  store double %5, ptr %13, align 8, !tbaa !9
  store i64 %6, ptr %14, align 8, !tbaa !11
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = icmp eq ptr null, %15
  br i1 %16, label %17, label %18

17:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 301, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

18:                                               ; preds = %7
  %19 = call zeroext i1 @is_finite(ptr noundef %9, i64 noundef 1)
  %20 = zext i1 %19 to i32
  %21 = icmp eq i32 0, %20
  br i1 %21, label %25, label %22

22:                                               ; preds = %18
  %23 = load double, ptr %9, align 8, !tbaa !9
  %24 = fcmp oge double 0.000000e+00, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %22, %18
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 306, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

26:                                               ; preds = %22
  %27 = call zeroext i1 @is_finite(ptr noundef %10, i64 noundef 1)
  %28 = zext i1 %27 to i32
  %29 = icmp eq i32 0, %28
  br i1 %29, label %37, label %30

30:                                               ; preds = %26
  %31 = load double, ptr %10, align 8, !tbaa !9
  %32 = fcmp oge double 0.000000e+00, %31
  br i1 %32, label %37, label %33

33:                                               ; preds = %30
  %34 = load double, ptr %9, align 8, !tbaa !9
  %35 = load double, ptr %10, align 8, !tbaa !9
  %36 = fcmp oge double %34, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %33, %30, %26
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 311, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

38:                                               ; preds = %33
  %39 = call zeroext i1 @is_finite(ptr noundef %11, i64 noundef 1)
  %40 = zext i1 %39 to i32
  %41 = icmp eq i32 0, %40
  br i1 %41, label %45, label %42

42:                                               ; preds = %38
  %43 = load double, ptr %11, align 8, !tbaa !9
  %44 = fcmp oge double 0.000000e+00, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %42, %38
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 316, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

46:                                               ; preds = %42
  %47 = call zeroext i1 @is_finite(ptr noundef %12, i64 noundef 1)
  %48 = zext i1 %47 to i32
  %49 = icmp eq i32 0, %48
  br i1 %49, label %53, label %50

50:                                               ; preds = %46
  %51 = load double, ptr %12, align 8, !tbaa !9
  %52 = fcmp oge double 0.000000e+00, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %50, %46
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 321, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

54:                                               ; preds = %50
  %55 = call zeroext i1 @is_finite(ptr noundef %13, i64 noundef 1)
  %56 = zext i1 %55 to i32
  %57 = icmp eq i32 0, %56
  br i1 %57, label %64, label %58

58:                                               ; preds = %54
  %59 = load double, ptr %13, align 8, !tbaa !9
  %60 = fcmp ogt double 0.000000e+00, %59
  br i1 %60, label %64, label %61

61:                                               ; preds = %58
  %62 = load double, ptr %13, align 8, !tbaa !9
  %63 = fcmp olt double 1.000000e+02, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %61, %58, %54
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 326, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

65:                                               ; preds = %61
  %66 = load i64, ptr %14, align 8, !tbaa !11
  %67 = icmp ugt i64 1, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 331, ptr noundef @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

69:                                               ; preds = %65
  %70 = call ptr @nmalloc(i64 noundef 1, i64 noundef 56)
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %70, ptr %71, align 8, !tbaa !5
  %72 = load double, ptr %9, align 8, !tbaa !9
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.neonrvm_param, ptr %74, i32 0, i32 1
  store double %72, ptr %75, align 8, !tbaa !13
  %76 = load double, ptr %10, align 8, !tbaa !9
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.neonrvm_param, ptr %78, i32 0, i32 2
  store double %76, ptr %79, align 8, !tbaa !15
  %80 = load double, ptr %11, align 8, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.neonrvm_param, ptr %82, i32 0, i32 3
  store double %80, ptr %83, align 8, !tbaa !16
  %84 = load double, ptr %12, align 8, !tbaa !9
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.neonrvm_param, ptr %86, i32 0, i32 4
  store double %84, ptr %87, align 8, !tbaa !17
  %88 = load double, ptr %13, align 8, !tbaa !9
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.neonrvm_param, ptr %90, i32 0, i32 5
  store double %88, ptr %91, align 8, !tbaa !18
  %92 = load i64, ptr %14, align 8, !tbaa !11
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.neonrvm_param, ptr %94, i32 0, i32 6
  store i64 %92, ptr %95, align 8, !tbaa !19
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.neonrvm_param, ptr %97, i32 0, i32 0
  store i64 44252, ptr %98, align 8, !tbaa !20
  ret i32 0
}

attributes #0 = { 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 #1 = { 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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"neonrvm_param", !12, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !12, i64 48}
!15 = !{!14, !10, i64 16}
!16 = !{!14, !10, i64 24}
!17 = !{!14, !10, i64 32}
!18 = !{!14, !10, i64 40}
!19 = !{!14, !12, i64 48}
!20 = !{!14, !12, 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"

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__.neonrvm_create_param = external hidden unnamed_addr constant [91 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @is_finite(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @nmalloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @neonrvm_create_param(ptr noundef writeonly %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, i64 noundef %6) local_unnamed_addr #1 {
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  store double %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !5
  store double %3, ptr %10, align 8, !tbaa !5
  store double %4, ptr %11, align 8, !tbaa !5
  store double %5, ptr %12, align 8, !tbaa !5
  %13 = icmp eq ptr %0, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 301, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

15:                                               ; preds = %7
  %16 = call zeroext i1 @is_finite(ptr noundef nonnull %8, i64 noundef 1)
  %17 = load double, ptr %8, align 8
  %18 = fcmp ugt double %17, 0.000000e+00
  %or.cond.not = select i1 %16, i1 %18, i1 false
  br i1 %or.cond.not, label %20, label %19

19:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 306, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

20:                                               ; preds = %15
  %21 = call zeroext i1 @is_finite(ptr noundef nonnull %9, i64 noundef 1)
  %22 = load double, ptr %9, align 8
  %23 = fcmp ugt double %22, 0.000000e+00
  %or.cond3.not = select i1 %21, i1 %23, i1 false
  %24 = load double, ptr %8, align 8
  %25 = fcmp ult double %24, %22
  %or.cond = select i1 %or.cond3.not, i1 %25, i1 false
  br i1 %or.cond, label %27, label %26

26:                                               ; preds = %20
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 311, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

27:                                               ; preds = %20
  %28 = call zeroext i1 @is_finite(ptr noundef nonnull %10, i64 noundef 1)
  %29 = load double, ptr %10, align 8
  %30 = fcmp ugt double %29, 0.000000e+00
  %or.cond5.not = select i1 %28, i1 %30, i1 false
  br i1 %or.cond5.not, label %32, label %31

31:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 316, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

32:                                               ; preds = %27
  %33 = call zeroext i1 @is_finite(ptr noundef nonnull %11, i64 noundef 1)
  %34 = load double, ptr %11, align 8
  %35 = fcmp ugt double %34, 0.000000e+00
  %or.cond7.not = select i1 %33, i1 %35, i1 false
  br i1 %or.cond7.not, label %37, label %36

36:                                               ; preds = %32
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 321, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

37:                                               ; preds = %32
  %38 = call zeroext i1 @is_finite(ptr noundef nonnull %12, i64 noundef 1)
  %39 = load double, ptr %12, align 8
  %40 = fcmp uge double %39, 0.000000e+00
  %41 = fcmp ule double %39, 1.000000e+02
  %.not25 = and i1 %40, %41
  %or.cond11.not = select i1 %38, i1 %.not25, i1 false
  br i1 %or.cond11.not, label %43, label %42

42:                                               ; preds = %37
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 326, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

43:                                               ; preds = %37
  %44 = icmp eq i64 %6, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %43
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 331, ptr noundef nonnull @__PRETTY_FUNCTION__.neonrvm_create_param) #2
  unreachable

46:                                               ; preds = %43
  %47 = call ptr @nmalloc(i64 noundef 1, i64 noundef 56)
  store ptr %47, ptr %0, align 8, !tbaa !9
  %48 = load double, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %47, i64 8
  store double %48, ptr %49, align 8, !tbaa !11
  %50 = load double, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %47, i64 16
  store double %50, ptr %51, align 8, !tbaa !14
  %52 = load double, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %47, i64 24
  store double %52, ptr %53, align 8, !tbaa !15
  %54 = load double, ptr %11, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %47, i64 32
  store double %54, ptr %55, align 8, !tbaa !16
  %56 = load double, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %47, i64 40
  store double %56, ptr %57, align 8, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %47, i64 48
  store i64 %6, ptr %58, align 8, !tbaa !18
  store i64 44252, ptr %47, align 8, !tbaa !19
  ret i32 0
}

attributes #0 = { 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 #1 = { 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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"neonrvm_param", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 16}
!15 = !{!12, !6, i64 24}
!16 = !{!12, !6, i64 32}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !13, i64 48}
!19 = !{!12, !13, i64 0}


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