; LLVM IR from ROCm/aomp :: test/smoke-fails/clang-298140/NPB_LU/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.66 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [8 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 [28 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [28 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.91, ptr %11, align 8, !tbaa !5
  br label %50

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.92, ptr %11, align 8, !tbaa !5
  br label %49

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.93, ptr %11, align 8, !tbaa !5
  br label %48

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.93, ptr %11, align 8, !tbaa !5
  br label %47

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.94, ptr %11, align 8, !tbaa !5
  br label %46

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 515000, ptr %5, align 4, !tbaa !10
  store i32 19500000, 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.95, ptr %11, align 8, !tbaa !5
  br label %45

41:                                               ; preds = %36
  %42 = load i8, ptr %4, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.66, i32 noundef %43)
  call void @exit(i32 noundef 1) #6
  unreachable

45:                                               ; preds = %40
  br label %46

46:                                               ; preds = %45, %35
  br label %47

47:                                               ; preds = %46, %30
  br label %48

48:                                               ; preds = %47, %25
  br label %49

49:                                               ; preds = %48, %20
  br label %50

50:                                               ; preds = %49, %15
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load i32, ptr %5, align 4, !tbaa !10
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.96, i32 noundef %52) #5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i32, ptr %6, align 4, !tbaa !10
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.97, i32 noundef %55) #5
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !10
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef @.str.98, i32 noundef %58) #5
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load i32, ptr %10, align 4, !tbaa !10
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.99, i32 noundef %61) #5
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = load i32, ptr %8, align 4, !tbaa !10
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.100, i32 noundef %64) #5
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = load i32, ptr %9, align 4, !tbaa !10
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.101, i32 noundef %67) #5
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = load i8, ptr %4, align 1, !tbaa !9
  %71 = sext i8 %70 to i32
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.102, i32 noundef %71) #5
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.103, ptr noundef %74) #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.66 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [8 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 [28 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [28 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 %9 [
    i8 83, label %11
    i8 87, label %4
    i8 65, label %5
    i8 66, label %6
    i8 67, label %7
    i8 68, label %8
  ]

4:                                                ; preds = %2
  br label %11

5:                                                ; preds = %2
  br label %11

6:                                                ; preds = %2
  br label %11

7:                                                ; preds = %2
  br label %11

8:                                                ; preds = %2
  br label %11

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

11:                                               ; preds = %2, %4, %6, %8, %7, %5
  %.026 = phi i32 [ 26700, %4 ], [ 92700, %5 ], [ 334600, %6 ], [ 1262100, %7 ], [ 19500000, %8 ], [ 11600, %2 ]
  %.025 = phi i32 [ 5, %4 ], [ 6, %5 ], [ 7, %6 ], [ 8, %7 ], [ 10, %8 ], [ 4, %2 ]
  %.024 = phi i32 [ 100, %4 ], [ 200, %5 ], [ 200, %6 ], [ 200, %7 ], [ 250, %8 ], [ 50, %2 ]
  %.022 = phi i32 [ 700, %4 ], [ 2400, %5 ], [ 8800, %6 ], [ 33500, %7 ], [ 515000, %8 ], [ 250, %2 ]
  %.0 = phi ptr [ @.str.92, %4 ], [ @.str.93, %5 ], [ @.str.93, %6 ], [ @.str.94, %7 ], [ @.str.95, %8 ], [ @.str.91, %2 ]
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.96, i32 noundef %.022) #4
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.97, i32 noundef %.026) #4
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.98, i32 noundef %.025) #4
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.99, i32 noundef 5) #4
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.100, i32 noundef %.024) #4
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.101, i32 noundef 10) #4
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.102, i32 noundef %3) #4
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.103, 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