; LLVM IR from ROCm/aomp :: test/smoke-fails/flang-314750/NPB_FT/sys (setparams)

; 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.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [50 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @check_info(i32 noundef %0, i8 noundef signext %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  %5 = load i8, ptr %4, align 1, !tbaa !9
  %6 = sext i8 %5 to i32
  %7 = icmp ne i32 %6, 83
  br i1 %7, label %8, label %41

8:                                                ; preds = %2
  %9 = load i8, ptr %4, align 1, !tbaa !9
  %10 = sext i8 %9 to i32
  %11 = icmp ne i32 %10, 87
  br i1 %11, label %12, label %41

12:                                               ; preds = %8
  %13 = load i8, ptr %4, align 1, !tbaa !9
  %14 = sext i8 %13 to i32
  %15 = icmp ne i32 %14, 65
  br i1 %15, label %16, label %41

16:                                               ; preds = %12
  %17 = load i8, ptr %4, align 1, !tbaa !9
  %18 = sext i8 %17 to i32
  %19 = icmp ne i32 %18, 66
  br i1 %19, label %20, label %41

20:                                               ; preds = %16
  %21 = load i8, ptr %4, align 1, !tbaa !9
  %22 = sext i8 %21 to i32
  %23 = icmp ne i32 %22, 67
  br i1 %23, label %24, label %41

24:                                               ; preds = %20
  %25 = load i8, ptr %4, align 1, !tbaa !9
  %26 = sext i8 %25 to i32
  %27 = icmp ne i32 %26, 68
  br i1 %27, label %28, label %41

28:                                               ; preds = %24
  %29 = load i8, ptr %4, align 1, !tbaa !9
  %30 = sext i8 %29 to i32
  %31 = icmp ne i32 %30, 69
  br i1 %31, label %32, label %41

32:                                               ; preds = %28
  %33 = load i8, ptr %4, align 1, !tbaa !9
  %34 = sext i8 %33 to i32
  %35 = icmp ne i32 %34, 70
  br i1 %35, label %36, label %41

36:                                               ; preds = %32
  %37 = load i8, ptr %4, align 1, !tbaa !9
  %38 = sext i8 %37 to i32
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef %38)
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  call void @exit(i32 noundef 1) #3
  unreachable

41:                                               ; preds = %32, %28, %24, %20, %16, %12, %8, %2
  %42 = load i8, ptr %4, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 %43, 69
  br i1 %44, label %45, label %51

45:                                               ; preds = %41
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 8
  br i1 %47, label %75, label %48

48:                                               ; preds = %45
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = icmp eq i32 %49, 9
  br i1 %50, label %75, label %51

51:                                               ; preds = %48, %41
  %52 = load i8, ptr %4, align 1, !tbaa !9
  %53 = sext i8 %52 to i32
  %54 = icmp eq i32 %53, 70
  br i1 %54, label %55, label %64

55:                                               ; preds = %51
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 5
  br i1 %57, label %75, label %58

58:                                               ; preds = %55
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 8
  br i1 %60, label %75, label %61

61:                                               ; preds = %58
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 9
  br i1 %63, label %75, label %64

64:                                               ; preds = %61, %51
  %65 = load i8, ptr %4, align 1, !tbaa !9
  %66 = sext i8 %65 to i32
  %67 = icmp eq i32 %66, 67
  br i1 %67, label %72, label %68

68:                                               ; preds = %64
  %69 = load i8, ptr %4, align 1, !tbaa !9
  %70 = sext i8 %69 to i32
  %71 = icmp eq i32 %70, 68
  br i1 %71, label %72, label %89

72:                                               ; preds = %68, %64
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = icmp eq i32 %73, 9
  br i1 %74, label %75, label %89

75:                                               ; preds = %72, %61, %58, %55, %48, %45
  %76 = load i8, ptr %4, align 1, !tbaa !9
  %77 = sext i8 %76 to i32
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = icmp eq i32 %78, 5
  br i1 %79, label %80, label %81

80:                                               ; preds = %75
  br label %86

81:                                               ; preds = %75
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = icmp eq i32 %82, 8
  %84 = zext i1 %83 to i64
  %85 = select i1 %83, ptr @.str.19, ptr @.str.21
  br label %86

86:                                               ; preds = %81, %80
  %87 = phi ptr [ @.str.13, %80 ], [ %85, %81 ]
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.25, i32 noundef %77, ptr noundef %87)
  call void @exit(i32 noundef 1) #3
  unreachable

89:                                               ; preds = %72, %68
  ret void
}

attributes #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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !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"

@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [50 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @check_info(i32 noundef %0, i8 noundef signext %1) local_unnamed_addr #2 {
  %3 = sext i8 %1 to i32
  switch i8 %1, label %4 [
    i8 69, label %7
    i8 70, label %9
    i8 65, label %10
    i8 66, label %10
    i8 67, label %10
    i8 68, label %10
    i8 83, label %10
    i8 87, label %10
  ]

4:                                                ; preds = %2
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %3)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  tail call void @exit(i32 noundef 1) #3
  unreachable

7:                                                ; preds = %2
  %8 = and i32 %0, -2
  %or.cond22 = icmp eq i32 %8, 8
  br i1 %or.cond22, label %13, label %.thread

9:                                                ; preds = %2
  switch i32 %0, label %.thread [
    i32 5, label %16
    i32 8, label %13
    i32 9, label %13
  ]

10:                                               ; preds = %2, %2, %2, %2, %2, %2
  %11 = add nsw i8 %1, -67
  %or.cond29 = icmp ult i8 %11, 2
  %12 = icmp eq i32 %0, 9
  %or.cond31 = and i1 %12, %or.cond29
  br i1 %or.cond31, label %13, label %.thread

13:                                               ; preds = %7, %10, %9, %9
  %14 = icmp eq i32 %0, 8
  %15 = select i1 %14, ptr @.str.19, ptr @.str.21
  br label %16

16:                                               ; preds = %9, %13
  %17 = phi ptr [ %15, %13 ], [ @.str.13, %9 ]
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, i32 noundef %3, ptr noundef nonnull %17)
  tail call void @exit(i32 noundef 1) #3
  unreachable

.thread:                                          ; preds = %9, %7, %10
  ret void
}

attributes #0 = { nofree 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 = { 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 = { 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)"}


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