; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

; 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.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [31 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @r82poly2_type_print(i32 noundef %0) #1 {
  %2 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = icmp eq i32 %3, 1
  br i1 %4, label %5, label %7

5:                                                ; preds = %1
  %6 = call i32 (ptr, ...) @printf(ptr noundef @.str.57)
  br label %77

7:                                                ; preds = %1
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = icmp eq i32 %8, 2
  br i1 %9, label %10, label %12

10:                                               ; preds = %7
  %11 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  br label %76

12:                                               ; preds = %7
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp eq i32 %13, 3
  br i1 %14, label %15, label %17

15:                                               ; preds = %12
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  br label %75

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = icmp eq i32 %18, 4
  br i1 %19, label %20, label %23

20:                                               ; preds = %17
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.61)
  br label %74

23:                                               ; preds = %17
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 5
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.62)
  br label %73

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp eq i32 %29, 6
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str.63)
  br label %72

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 7
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.64)
  br label %71

38:                                               ; preds = %33
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = icmp eq i32 %39, 8
  br i1 %40, label %41, label %44

41:                                               ; preds = %38
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.65)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.61)
  br label %70

44:                                               ; preds = %38
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 9
  br i1 %46, label %47, label %49

47:                                               ; preds = %44
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.66)
  br label %69

49:                                               ; preds = %44
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = icmp eq i32 %50, 10
  br i1 %51, label %52, label %54

52:                                               ; preds = %49
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.67)
  br label %68

54:                                               ; preds = %49
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 11
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.68)
  br label %67

59:                                               ; preds = %54
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 12
  br i1 %61, label %62, label %64

62:                                               ; preds = %59
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.69)
  br label %66

64:                                               ; preds = %59
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.70)
  br label %66

66:                                               ; preds = %64, %62
  br label %67

67:                                               ; preds = %66, %57
  br label %68

68:                                               ; preds = %67, %52
  br label %69

69:                                               ; preds = %68, %47
  br label %70

70:                                               ; preds = %69, %41
  br label %71

71:                                               ; preds = %70, %36
  br label %72

72:                                               ; preds = %71, %31
  br label %73

73:                                               ; preds = %72, %26
  br label %74

74:                                               ; preds = %73, %20
  br label %75

75:                                               ; preds = %74, %15
  br label %76

76:                                               ; preds = %75, %10
  br label %77

77:                                               ; preds = %76, %5
  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 = { 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" }

!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"}


; 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.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.70 = 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: nofree nounwind uwtable
define dso_local void @r82poly2_type_print(i32 noundef %0) local_unnamed_addr #1 {
  switch i32 %0, label %15 [
    i32 1, label %16
    i32 2, label %2
    i32 3, label %3
    i32 4, label %4
    i32 5, label %6
    i32 6, label %7
    i32 7, label %8
    i32 8, label %9
    i32 9, label %11
    i32 10, label %12
    i32 11, label %13
    i32 12, label %14
  ]

2:                                                ; preds = %1
  br label %16

3:                                                ; preds = %1
  br label %16

4:                                                ; preds = %1
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  br label %16

6:                                                ; preds = %1
  br label %16

7:                                                ; preds = %1
  br label %16

8:                                                ; preds = %1
  br label %16

9:                                                ; preds = %1
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.65)
  br label %16

11:                                               ; preds = %1
  br label %16

12:                                               ; preds = %1
  br label %16

13:                                               ; preds = %1
  br label %16

14:                                               ; preds = %1
  br label %16

15:                                               ; preds = %1
  br label %16

16:                                               ; preds = %1, %2, %4, %7, %9, %12, %14, %15, %13, %11, %8, %6, %3
  %.str.58.sink = phi ptr [ @.str.58, %2 ], [ @.str.61, %4 ], [ @.str.63, %7 ], [ @.str.61, %9 ], [ @.str.67, %12 ], [ @.str.69, %14 ], [ @.str.70, %15 ], [ @.str.68, %13 ], [ @.str.66, %11 ], [ @.str.64, %8 ], [ @.str.62, %6 ], [ @.str.59, %3 ], [ @.str.57, %1 ]
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.58.sink)
  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 = { nofree 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" }

!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: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass