; 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.95 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [35 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_ua_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 i32, align 4
  %10 = alloca i32, align 4
  %11 = 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 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i32 5, ptr %10, align 4, !tbaa !10
  %12 = load i8, ptr %4, align 1, !tbaa !9
  %13 = sext i8 %12 to i32
  %14 = icmp eq i32 %13, 83
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  store i32 250, ptr %5, align 4, !tbaa !10
  store i32 11600, ptr %6, align 4, !tbaa !10
  store i32 4, ptr %7, align 4, !tbaa !10
  store i32 50, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.100, ptr %11, align 8, !tbaa !5
  br label %56

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

20:                                               ; preds = %16
  store i32 700, ptr %5, align 4, !tbaa !10
  store i32 26700, ptr %6, align 4, !tbaa !10
  store i32 5, ptr %7, align 4, !tbaa !10
  store i32 100, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.101, ptr %11, align 8, !tbaa !5
  br label %55

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

25:                                               ; preds = %21
  store i32 2400, ptr %5, align 4, !tbaa !10
  store i32 92700, ptr %6, align 4, !tbaa !10
  store i32 6, ptr %7, align 4, !tbaa !10
  store i32 200, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.102, ptr %11, align 8, !tbaa !5
  br label %54

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

30:                                               ; preds = %26
  store i32 8800, ptr %5, align 4, !tbaa !10
  store i32 334600, ptr %6, align 4, !tbaa !10
  store i32 7, ptr %7, align 4, !tbaa !10
  store i32 200, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.102, ptr %11, align 8, !tbaa !5
  br label %53

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

35:                                               ; preds = %31
  store i32 33500, ptr %5, align 4, !tbaa !10
  store i32 1262100, ptr %6, align 4, !tbaa !10
  store i32 8, ptr %7, align 4, !tbaa !10
  store i32 200, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.103, ptr %11, align 8, !tbaa !5
  br label %52

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

40:                                               ; preds = %36
  store i32 514400, ptr %5, align 4, !tbaa !10
  store i32 19134400, ptr %6, align 4, !tbaa !10
  store i32 10, ptr %7, align 4, !tbaa !10
  store i32 250, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.104, ptr %11, align 8, !tbaa !5
  br label %51

41:                                               ; preds = %36
  %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 %46

45:                                               ; preds = %41
  store i32 7844800, ptr %5, align 4, !tbaa !10
  store i32 291302900, ptr %6, align 4, !tbaa !10
  store i32 12, ptr %7, align 4, !tbaa !10
  store i32 250, ptr %8, align 4, !tbaa !10
  store i32 10, ptr %9, align 4, !tbaa !10
  store ptr @.str.105, ptr %11, align 8, !tbaa !5
  br label %50

46:                                               ; preds = %41
  %47 = load i8, ptr %4, align 1, !tbaa !9
  %48 = sext i8 %47 to i32
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.69, i32 noundef %48)
  call void @exit(i32 noundef 1) #6
  unreachable

50:                                               ; preds = %45
  br label %51

51:                                               ; preds = %50, %40
  br label %52

52:                                               ; preds = %51, %35
  br label %53

53:                                               ; preds = %52, %30
  br label %54

54:                                               ; preds = %53, %25
  br label %55

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

56:                                               ; preds = %55, %15
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef @.str.106, ptr noundef @.str.47) #5
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef @.str.107, ptr noundef @.str.47) #5
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.108, ptr noundef @.str.47) #5
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.109, ptr noundef @.str.47) #5
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !10
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.110, ptr noundef @.str.47, i32 noundef %66) #5
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !10
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.111, ptr noundef @.str.95, i32 noundef %69) #5
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !10
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.112, ptr noundef @.str.95, i32 noundef %72) #5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = load i32, ptr %10, align 4, !tbaa !10
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.113, ptr noundef @.str.95, i32 noundef %75) #5
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = load i32, ptr %8, align 4, !tbaa !10
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.114, ptr noundef @.str.95, i32 noundef %78) #5
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load i32, ptr %9, align 4, !tbaa !10
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.115, ptr noundef @.str.95, i32 noundef %81) #5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = load i8, ptr %4, align 1, !tbaa !9
  %85 = sext i8 %84 to i32
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.116, ptr noundef @.str.95, i32 noundef %85) #5
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.117, ptr noundef @.str.95, ptr noundef %88) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, 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.95 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [35 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_ua_info(ptr nocapture noundef %0, i8 noundef signext %1) local_unnamed_addr #2 {
  %3 = sext i8 %1 to i32
  switch i8 %1, label %10 [
    i8 83, label %12
    i8 87, label %4
    i8 65, label %5
    i8 66, label %6
    i8 67, label %7
    i8 68, label %8
    i8 69, label %9
  ]

4:                                                ; preds = %2
  br label %12

5:                                                ; preds = %2
  br label %12

6:                                                ; preds = %2
  br label %12

7:                                                ; preds = %2
  br label %12

8:                                                ; preds = %2
  br label %12

9:                                                ; preds = %2
  br label %12

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

12:                                               ; preds = %2, %4, %6, %8, %9, %7, %5
  %.031 = phi i32 [ 26700, %4 ], [ 92700, %5 ], [ 334600, %6 ], [ 1262100, %7 ], [ 19134400, %8 ], [ 291302900, %9 ], [ 11600, %2 ]
  %.030 = phi i32 [ 5, %4 ], [ 6, %5 ], [ 7, %6 ], [ 8, %7 ], [ 10, %8 ], [ 12, %9 ], [ 4, %2 ]
  %.029 = phi i32 [ 100, %4 ], [ 200, %5 ], [ 200, %6 ], [ 200, %7 ], [ 250, %8 ], [ 250, %9 ], [ 50, %2 ]
  %.027 = phi i32 [ 700, %4 ], [ 2400, %5 ], [ 8800, %6 ], [ 33500, %7 ], [ 514400, %8 ], [ 7844800, %9 ], [ 250, %2 ]
  %.0 = phi ptr [ @.str.101, %4 ], [ @.str.102, %5 ], [ @.str.102, %6 ], [ @.str.103, %7 ], [ @.str.104, %8 ], [ @.str.105, %9 ], [ @.str.100, %2 ]
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.106, ptr noundef nonnull @.str.47) #4
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.107, ptr noundef nonnull @.str.47) #4
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.108, ptr noundef nonnull @.str.47) #4
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.109, ptr noundef nonnull @.str.47) #4
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.110, ptr noundef nonnull @.str.47, i32 noundef %.027) #4
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.111, ptr noundef nonnull @.str.95, i32 noundef %.031) #4
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.112, ptr noundef nonnull @.str.95, i32 noundef %.030) #4
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.113, ptr noundef nonnull @.str.95, i32 noundef 5) #4
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.114, ptr noundef nonnull @.str.95, i32 noundef %.029) #4
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.115, ptr noundef nonnull @.str.95, i32 noundef 10) #4
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.116, ptr noundef nonnull @.str.95, i32 noundef %3) #4
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.117, ptr noundef nonnull @.str.95, ptr noundef nonnull %.0) #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