; 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.47 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [31 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

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

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local void @write_cg_info(ptr noundef %0, i8 noundef signext %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr @.str.82, ptr %10, align 8, !tbaa !5
  %11 = load i8, ptr %4, align 1, !tbaa !9
  %12 = sext i8 %11 to i32
  %13 = icmp eq i32 %12, 83
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  store i32 1400, ptr %5, align 4, !tbaa !10
  store i32 7, ptr %6, align 4, !tbaa !10
  store i32 15, ptr %7, align 4, !tbaa !10
  store ptr @.str.83, ptr %9, align 8, !tbaa !5
  br label %61

15:                                               ; preds = %2
  %16 = load i8, ptr %4, align 1, !tbaa !9
  %17 = sext i8 %16 to i32
  %18 = icmp eq i32 %17, 87
  br i1 %18, label %19, label %20

19:                                               ; preds = %15
  store i32 7000, ptr %5, align 4, !tbaa !10
  store i32 8, ptr %6, align 4, !tbaa !10
  store i32 15, ptr %7, align 4, !tbaa !10
  store ptr @.str.84, ptr %9, align 8, !tbaa !5
  br label %60

20:                                               ; preds = %15
  %21 = load i8, ptr %4, align 1, !tbaa !9
  %22 = sext i8 %21 to i32
  %23 = icmp eq i32 %22, 65
  br i1 %23, label %24, label %25

24:                                               ; preds = %20
  store i32 14000, ptr %5, align 4, !tbaa !10
  store i32 11, ptr %6, align 4, !tbaa !10
  store i32 15, ptr %7, align 4, !tbaa !10
  store ptr @.str.85, ptr %9, align 8, !tbaa !5
  br label %59

25:                                               ; preds = %20
  %26 = load i8, ptr %4, align 1, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %27, 66
  br i1 %28, label %29, label %30

29:                                               ; preds = %25
  store i32 75000, ptr %5, align 4, !tbaa !10
  store i32 13, ptr %6, align 4, !tbaa !10
  store i32 75, ptr %7, align 4, !tbaa !10
  store ptr @.str.86, ptr %9, align 8, !tbaa !5
  br label %58

30:                                               ; preds = %25
  %31 = load i8, ptr %4, align 1, !tbaa !9
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 67
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  store i32 150000, ptr %5, align 4, !tbaa !10
  store i32 15, ptr %6, align 4, !tbaa !10
  store i32 75, ptr %7, align 4, !tbaa !10
  store ptr @.str.87, ptr %9, align 8, !tbaa !5
  br label %57

35:                                               ; preds = %30
  %36 = load i8, ptr %4, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 68
  br i1 %38, label %39, label %40

39:                                               ; preds = %35
  store i32 1500000, ptr %5, align 4, !tbaa !10
  store i32 21, ptr %6, align 4, !tbaa !10
  store i32 100, ptr %7, align 4, !tbaa !10
  store ptr @.str.88, ptr %9, align 8, !tbaa !5
  br label %56

40:                                               ; preds = %35
  %41 = load i8, ptr %4, align 1, !tbaa !9
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 69
  br i1 %43, label %44, label %45

44:                                               ; preds = %40
  store i32 9000000, ptr %5, align 4, !tbaa !10
  store i32 26, ptr %6, align 4, !tbaa !10
  store i32 100, ptr %7, align 4, !tbaa !10
  store ptr @.str.89, ptr %9, align 8, !tbaa !5
  br label %55

45:                                               ; preds = %40
  %46 = load i8, ptr %4, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 70
  br i1 %48, label %49, label %50

49:                                               ; preds = %45
  store i32 54000000, ptr %5, align 4, !tbaa !10
  store i32 31, ptr %6, align 4, !tbaa !10
  store i32 100, ptr %7, align 4, !tbaa !10
  store ptr @.str.90, ptr %9, align 8, !tbaa !5
  br label %54

50:                                               ; preds = %45
  %51 = load i8, ptr %4, align 1, !tbaa !9
  %52 = sext i8 %51 to i32
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.69, i32 noundef %52)
  call void @exit(i32 noundef 1) #6
  unreachable

54:                                               ; preds = %49
  br label %55

55:                                               ; preds = %54, %44
  br label %56

56:                                               ; preds = %55, %39
  br label %57

57:                                               ; preds = %56, %34
  br label %58

58:                                               ; preds = %57, %29
  br label %59

59:                                               ; preds = %58, %24
  br label %60

60:                                               ; preds = %59, %19
  br label %61

61:                                               ; preds = %60, %14
  %62 = load i32, ptr %5, align 4, !tbaa !10
  %63 = icmp sge i32 %62, 9000000
  %64 = zext i1 %63 to i64
  %65 = select i1 %63, i32 8, i32 4
  store i32 %65, ptr %8, align 4, !tbaa !10
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.91, ptr noundef @.str.47) #5
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.92, ptr noundef @.str.47) #5
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !10
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.93, ptr noundef @.str.47, i32 noundef %71) #5
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = load i32, ptr %6, align 4, !tbaa !10
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.94, ptr noundef @.str.95, i32 noundef %74) #5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !10
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.96, ptr noundef @.str.95, i32 noundef %77) #5
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.97, ptr noundef @.str.95, ptr noundef %80) #5
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.98, ptr noundef @.str.95, ptr noundef %83) #5
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !10
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.99, ptr noundef @.str.47, i32 noundef %86) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 "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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !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.47 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [31 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @write_cg_info(ptr nocapture noundef %0, i8 noundef signext %1) local_unnamed_addr #2 {
  switch i8 %1, label %10 [
    i8 83, label %13
    i8 87, label %3
    i8 65, label %4
    i8 66, label %5
    i8 67, label %6
    i8 68, label %7
    i8 69, label %8
    i8 70, label %9
  ]

3:                                                ; preds = %2
  br label %13

4:                                                ; preds = %2
  br label %13

5:                                                ; preds = %2
  br label %13

6:                                                ; preds = %2
  br label %13

7:                                                ; preds = %2
  br label %13

8:                                                ; preds = %2
  br label %13

9:                                                ; preds = %2
  br label %13

10:                                               ; preds = %2
  %11 = sext i8 %1 to i32
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.69, i32 noundef %11)
  tail call void @exit(i32 noundef 1) #3
  unreachable

13:                                               ; preds = %2, %3, %5, %7, %9, %8, %6, %4
  %.025 = phi i32 [ 15, %3 ], [ 15, %4 ], [ 75, %5 ], [ 75, %6 ], [ 100, %7 ], [ 100, %8 ], [ 100, %9 ], [ 15, %2 ]
  %.024 = phi i32 [ 8, %3 ], [ 11, %4 ], [ 13, %5 ], [ 15, %6 ], [ 21, %7 ], [ 26, %8 ], [ 31, %9 ], [ 7, %2 ]
  %.023 = phi ptr [ @.str.84, %3 ], [ @.str.85, %4 ], [ @.str.86, %5 ], [ @.str.87, %6 ], [ @.str.88, %7 ], [ @.str.89, %8 ], [ @.str.90, %9 ], [ @.str.83, %2 ]
  %14 = phi i32 [ 4, %3 ], [ 4, %4 ], [ 4, %5 ], [ 4, %6 ], [ 4, %7 ], [ 8, %8 ], [ 8, %9 ], [ 4, %2 ]
  %.0 = phi i32 [ 7000, %3 ], [ 14000, %4 ], [ 75000, %5 ], [ 150000, %6 ], [ 1500000, %7 ], [ 9000000, %8 ], [ 54000000, %9 ], [ 1400, %2 ]
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.91, ptr noundef nonnull @.str.47) #4
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, ptr noundef nonnull @.str.47) #4
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.93, ptr noundef nonnull @.str.47, i32 noundef %.0) #4
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull @.str.95, i32 noundef %.024) #4
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.96, ptr noundef nonnull @.str.95, i32 noundef %.025) #4
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.97, ptr noundef nonnull @.str.95, ptr noundef nonnull %.023) #4
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.98, ptr noundef nonnull @.str.95, ptr noundef nonnull @.str.82) #4
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.47, i32 noundef %14) #4
  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 }
attributes #4 = { 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,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass