; LLVM IR from microsoft/LightAIMD :: src (standard_grid)

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

@STANDARD_GRID_SG2 = external dso_local global <{ <{ i64, i64, [8 x i64] }>, [10 x i64], <{ i64, i64, [8 x i64] }>, [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], <{ i64, i64, [8 x i64] }>, [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }> }>, align 16
@STANDARD_GRID_SG3 = external dso_local global <{ <{ i64, i64, [16 x i64] }>, <{ [10 x i64], [8 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ [10 x i64], [8 x i64] }>, [18 x i64], [18 x i64], [18 x i64], <{ [10 x i64], [8 x i64] }>, [18 x i64], [18 x i64], <{ i64, i64, [16 x i64] }>, <{ [10 x i64], [8 x i64] }>, <{ [10 x i64], [8 x i64] }>, [18 x i64], [18 x i64], [18 x i64], [18 x i64], [18 x i64], <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }> }>, align 16
@GRID_SCHEME_SG2 = external constant i64, align 8
@GRID_SCHEME_SG3 = external constant i64, align 8

; 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: nounwind uwtable
define dso_local i64 @get_standard_grid_radial_point_num(i64 noundef %0, i64 noundef %1) #1 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  store i64 0, ptr %5, align 8, !tbaa !5
  %8 = load i64, ptr %4, align 8, !tbaa !5
  %9 = load i64, ptr @GRID_SCHEME_SG2, align 8, !tbaa !5
  %10 = icmp eq i64 %8, %9
  br i1 %10, label %11, label %29

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

12:                                               ; preds = %25, %11
  %13 = load i64, ptr %6, align 8, !tbaa !5
  %14 = icmp ult i64 %13, 5
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  br label %28

16:                                               ; preds = %12
  %17 = load i64, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds [119 x [10 x i64]], ptr @STANDARD_GRID_SG2, i64 0, i64 %17
  %19 = load i64, ptr %6, align 8, !tbaa !5
  %20 = mul i64 %19, 2
  %21 = getelementptr inbounds [10 x i64], ptr %18, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = load i64, ptr %5, align 8, !tbaa !5
  %24 = add i64 %23, %22
  store i64 %24, ptr %5, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %16
  %26 = load i64, ptr %6, align 8, !tbaa !5
  %27 = add i64 %26, 1
  store i64 %27, ptr %6, align 8, !tbaa !5
  br label %12, !llvm.loop !9

28:                                               ; preds = %15
  br label %29

29:                                               ; preds = %28, %2
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = load i64, ptr @GRID_SCHEME_SG3, align 8, !tbaa !5
  %32 = icmp eq i64 %30, %31
  br i1 %32, label %33, label %51

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

34:                                               ; preds = %47, %33
  %35 = load i64, ptr %7, align 8, !tbaa !5
  %36 = icmp ult i64 %35, 9
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  br label %50

38:                                               ; preds = %34
  %39 = load i64, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %39
  %41 = load i64, ptr %7, align 8, !tbaa !5
  %42 = mul i64 %41, 2
  %43 = getelementptr inbounds [18 x i64], ptr %40, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = load i64, ptr %5, align 8, !tbaa !5
  %46 = add i64 %45, %44
  store i64 %46, ptr %5, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %38
  %48 = load i64, ptr %7, align 8, !tbaa !5
  %49 = add i64 %48, 1
  store i64 %49, ptr %7, align 8, !tbaa !5
  br label %34, !llvm.loop !11

50:                                               ; preds = %37
  br label %51

51:                                               ; preds = %50, %29
  %52 = load i64, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  ret i64 %52
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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

@STANDARD_GRID_SG2 = external dso_local local_unnamed_addr global <{ <{ i64, i64, [8 x i64] }>, [10 x i64], <{ i64, i64, [8 x i64] }>, [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], <{ i64, i64, [8 x i64] }>, [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], [10 x i64], <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }>, <{ i64, i64, [8 x i64] }> }>, align 16
@STANDARD_GRID_SG3 = external dso_local local_unnamed_addr global <{ <{ i64, i64, [16 x i64] }>, <{ [10 x i64], [8 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ [10 x i64], [8 x i64] }>, [18 x i64], [18 x i64], [18 x i64], <{ [10 x i64], [8 x i64] }>, [18 x i64], [18 x i64], <{ i64, i64, [16 x i64] }>, <{ [10 x i64], [8 x i64] }>, <{ [10 x i64], [8 x i64] }>, [18 x i64], [18 x i64], [18 x i64], [18 x i64], [18 x i64], <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }>, <{ i64, i64, [16 x i64] }> }>, align 16
@GRID_SCHEME_SG2 = external local_unnamed_addr constant i64, align 8
@GRID_SCHEME_SG3 = external local_unnamed_addr constant i64, align 8

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable
define dso_local i64 @get_standard_grid_radial_point_num(i64 noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = load i64, ptr @GRID_SCHEME_SG2, align 8, !tbaa !5
  %4 = icmp eq i64 %3, %1
  br i1 %4, label %.preheader15.preheader, label %.loopexit16

.preheader15.preheader:                           ; preds = %2
  %5 = getelementptr inbounds [119 x [10 x i64]], ptr @STANDARD_GRID_SG2, i64 0, i64 %0, i64 0
  %6 = load i64, ptr %5, align 16, !tbaa !5
  %7 = getelementptr inbounds [119 x [10 x i64]], ptr @STANDARD_GRID_SG2, i64 0, i64 %0, i64 2
  %8 = load i64, ptr %7, align 16, !tbaa !5
  %9 = add i64 %8, %6
  %10 = getelementptr inbounds [119 x [10 x i64]], ptr @STANDARD_GRID_SG2, i64 0, i64 %0, i64 4
  %11 = load i64, ptr %10, align 16, !tbaa !5
  %12 = add i64 %11, %9
  %13 = getelementptr inbounds [119 x [10 x i64]], ptr @STANDARD_GRID_SG2, i64 0, i64 %0, i64 6
  %14 = load i64, ptr %13, align 16, !tbaa !5
  %15 = add i64 %14, %12
  %16 = getelementptr inbounds [119 x [10 x i64]], ptr @STANDARD_GRID_SG2, i64 0, i64 %0, i64 8
  %17 = load i64, ptr %16, align 16, !tbaa !5
  %18 = add i64 %17, %15
  br label %.loopexit16

.loopexit16:                                      ; preds = %.preheader15.preheader, %2
  %.1 = phi i64 [ 0, %2 ], [ %18, %.preheader15.preheader ]
  %19 = load i64, ptr @GRID_SCHEME_SG3, align 8, !tbaa !5
  %20 = icmp eq i64 %19, %1
  br i1 %20, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %.loopexit16
  %21 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 0
  %22 = load i64, ptr %21, align 16, !tbaa !5
  %23 = add i64 %22, %.1
  %24 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 2
  %25 = load i64, ptr %24, align 16, !tbaa !5
  %26 = add i64 %25, %23
  %27 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 4
  %28 = load i64, ptr %27, align 16, !tbaa !5
  %29 = add i64 %28, %26
  %30 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 6
  %31 = load i64, ptr %30, align 16, !tbaa !5
  %32 = add i64 %31, %29
  %33 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 8
  %34 = load i64, ptr %33, align 16, !tbaa !5
  %35 = add i64 %34, %32
  %36 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 10
  %37 = load i64, ptr %36, align 16, !tbaa !5
  %38 = add i64 %37, %35
  %39 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 12
  %40 = load i64, ptr %39, align 16, !tbaa !5
  %41 = add i64 %40, %38
  %42 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 14
  %43 = load i64, ptr %42, align 16, !tbaa !5
  %44 = add i64 %43, %41
  %45 = getelementptr inbounds [119 x [18 x i64]], ptr @STANDARD_GRID_SG3, i64 0, i64 %0, i64 16
  %46 = load i64, ptr %45, align 16, !tbaa !5
  %47 = add i64 %46, %44
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %.loopexit16
  %.3 = phi i64 [ %.1, %.loopexit16 ], [ %47, %.preheader.preheader ]
  ret i64 %.3
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) 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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass